app-service.js 2.7 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665626666266762668626696267062671626726267362674626756267662677626786267962680626816268262683626846268562686626876268862689626906269162692626936269462695626966269762698626996270062701627026270362704627056270662707627086270962710627116271262713627146271562716627176271862719627206272162722627236272462725627266272762728627296273062731627326273362734627356273662737627386273962740627416274262743627446274562746627476274862749627506275162752627536275462755627566275762758627596276062761627626276362764627656276662767627686276962770627716277262773627746277562776627776277862779627806278162782627836278462785627866278762788627896279062791627926279362794627956279662797627986279962800628016280262803628046280562806628076280862809628106281162812628136281462815628166281762818628196282062821628226282362824628256282662827628286282962830628316283262833628346283562836628376283862839628406284162842628436284462845628466284762848628496285062851628526285362854628556285662857628586285962860628616286262863628646286562866628676286862869628706287162872628736287462875628766287762878628796288062881628826288362884628856288662887628886288962890628916289262893628946289562896628976289862899629006290162902629036290462905629066290762908629096291062911629126291362914629156291662917629186291962920629216292262923629246292562926629276292862929629306293162932629336293462935629366293762938629396294062941629426294362944629456294662947629486294962950629516295262953629546295562956629576295862959629606296162962629636296462965629666296762968629696297062971629726297362974629756297662977629786297962980629816298262983629846298562986629876298862989629906299162992629936299462995629966299762998629996300063001630026300363004630056300663007630086300963010630116301263013630146301563016630176301863019630206302163022630236302463025630266302763028630296303063031630326303363034630356303663037630386303963040630416304263043630446304563046630476304863049630506305163052630536305463055630566305763058630596306063061630626306363064630656306663067630686306963070630716307263073630746307563076630776307863079630806308163082630836308463085630866308763088630896309063091630926309363094630956309663097630986309963100631016310263103631046310563106631076310863109631106311163112631136311463115631166311763118631196312063121631226312363124631256312663127631286312963130631316313263133631346313563136631376313863139631406314163142631436314463145631466314763148631496315063151631526315363154631556315663157631586315963160631616316263163631646316563166631676316863169631706317163172631736317463175631766317763178631796318063181631826318363184631856318663187631886318963190631916319263193631946319563196631976319863199632006320163202632036320463205632066320763208632096321063211632126321363214632156321663217632186321963220632216322263223632246322563226632276322863229632306323163232632336323463235632366323763238632396324063241632426324363244632456324663247632486324963250632516325263253632546325563256632576325863259632606326163262632636326463265632666326763268632696327063271632726327363274632756327663277632786327963280632816328263283632846328563286632876328863289632906329163292632936329463295632966329763298632996330063301633026330363304633056330663307633086330963310633116331263313633146331563316633176331863319633206332163322633236332463325633266332763328633296333063331633326333363334633356333663337633386333963340633416334263343633446334563346633476334863349633506335163352633536335463355633566335763358633596336063361633626336363364633656336663367633686336963370633716337263373633746337563376633776337863379633806338163382633836338463385633866338763388633896339063391633926339363394633956339663397633986339963400634016340263403634046340563406634076340863409634106341163412634136341463415634166341763418634196342063421634226342363424634256342663427634286342963430634316343263433634346343563436634376343863439634406344163442634436344463445634466344763448634496345063451634526345363454634556345663457634586345963460634616346263463634646346563466634676346863469634706347163472634736347463475634766347763478634796348063481634826348363484634856348663487634886348963490634916349263493634946349563496634976349863499635006350163502635036350463505635066350763508635096351063511635126351363514635156351663517635186351963520635216352263523635246352563526635276352863529635306353163532635336353463535635366353763538635396354063541635426354363544635456354663547635486354963550635516355263553635546355563556635576355863559635606356163562635636356463565635666356763568635696357063571635726357363574635756357663577635786357963580635816358263583635846358563586635876358863589635906359163592635936359463595635966359763598635996360063601636026360363604636056360663607636086360963610636116361263613636146361563616636176361863619636206362163622636236362463625636266362763628636296363063631636326363363634636356363663637636386363963640636416364263643636446364563646636476364863649636506365163652636536365463655636566365763658636596366063661636626366363664636656366663667636686366963670636716367263673636746367563676636776367863679636806368163682636836368463685636866368763688636896369063691636926369363694636956369663697636986369963700637016370263703637046370563706637076370863709637106371163712637136371463715637166371763718637196372063721637226372363724637256372663727637286372963730637316373263733637346373563736637376373863739637406374163742637436374463745637466374763748637496375063751637526375363754637556375663757637586375963760637616376263763637646376563766637676376863769637706377163772637736377463775637766377763778637796378063781637826378363784637856378663787637886378963790637916379263793637946379563796637976379863799638006380163802638036380463805638066380763808638096381063811638126381363814638156381663817638186381963820638216382263823638246382563826638276382863829638306383163832638336383463835638366383763838638396384063841638426384363844638456384663847638486384963850638516385263853638546385563856638576385863859638606386163862638636386463865638666386763868638696387063871638726387363874638756387663877638786387963880638816388263883638846388563886638876388863889638906389163892638936389463895638966389763898638996390063901639026390363904639056390663907639086390963910639116391263913639146391563916639176391863919639206392163922639236392463925639266392763928639296393063931639326393363934639356393663937639386393963940639416394263943639446394563946639476394863949639506395163952639536395463955639566395763958639596396063961639626396363964639656396663967639686396963970639716397263973639746397563976639776397863979639806398163982639836398463985639866398763988639896399063991639926399363994639956399663997639986399964000640016400264003640046400564006640076400864009640106401164012640136401464015640166401764018640196402064021640226402364024640256402664027640286402964030640316403264033640346403564036640376403864039640406404164042640436404464045640466404764048640496405064051640526405364054640556405664057640586405964060640616406264063640646406564066640676406864069640706407164072640736407464075640766407764078640796408064081640826408364084640856408664087640886408964090640916409264093640946409564096640976409864099641006410164102641036410464105641066410764108641096411064111641126411364114641156411664117641186411964120641216412264123641246412564126641276412864129641306413164132641336413464135641366413764138641396414064141641426414364144641456414664147641486414964150641516415264153641546415564156641576415864159641606416164162641636416464165641666416764168641696417064171641726417364174641756417664177641786417964180641816418264183641846418564186641876418864189641906419164192641936419464195641966419764198641996420064201642026420364204642056420664207642086420964210642116421264213642146421564216642176421864219642206422164222642236422464225642266422764228642296423064231642326423364234642356423664237642386423964240642416424264243642446424564246642476424864249642506425164252642536425464255642566425764258642596426064261642626426364264642656426664267642686426964270642716427264273642746427564276642776427864279642806428164282642836428464285642866428764288642896429064291642926429364294642956429664297642986429964300643016430264303643046430564306643076430864309643106431164312643136431464315643166431764318643196432064321643226432364324643256432664327643286432964330643316433264333643346433564336643376433864339643406434164342643436434464345643466434764348643496435064351643526435364354643556435664357643586435964360643616436264363643646436564366643676436864369643706437164372643736437464375643766437764378643796438064381643826438364384643856438664387643886438964390643916439264393643946439564396643976439864399644006440164402644036440464405644066440764408644096441064411644126441364414644156441664417644186441964420644216442264423644246442564426644276442864429644306443164432644336443464435644366443764438644396444064441644426444364444644456444664447644486444964450644516445264453644546445564456644576445864459644606446164462644636446464465644666446764468644696447064471644726447364474644756447664477644786447964480644816448264483644846448564486644876448864489644906449164492644936449464495644966449764498644996450064501645026450364504645056450664507645086450964510645116451264513645146451564516645176451864519645206452164522645236452464525645266452764528645296453064531645326453364534645356453664537645386453964540645416454264543645446454564546645476454864549645506455164552645536455464555645566455764558645596456064561645626456364564645656456664567645686456964570645716457264573645746457564576645776457864579645806458164582645836458464585645866458764588645896459064591645926459364594
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global2 = uni.requireGlobal();
  15. ArrayBuffer = global2.ArrayBuffer;
  16. Int8Array = global2.Int8Array;
  17. Uint8Array = global2.Uint8Array;
  18. Uint8ClampedArray = global2.Uint8ClampedArray;
  19. Int16Array = global2.Int16Array;
  20. Uint16Array = global2.Uint16Array;
  21. Int32Array = global2.Int32Array;
  22. Uint32Array = global2.Uint32Array;
  23. Float32Array = global2.Float32Array;
  24. Float64Array = global2.Float64Array;
  25. BigInt64Array = global2.BigInt64Array;
  26. BigUint64Array = global2.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. const _export_sfc = (sfc, props2) => {
  35. const target = sfc.__vccOpts || sfc;
  36. for (const [key, val] of props2) {
  37. target[key] = val;
  38. }
  39. return target;
  40. };
  41. const _sfc_main$2y = {
  42. data() {
  43. return {};
  44. },
  45. onLoad() {
  46. this.navigatHandler();
  47. },
  48. methods: {
  49. navigatHandler: function() {
  50. uni.reLaunch({
  51. url: "/pages/index/index",
  52. animationType: "pop-in",
  53. animationDuration: 100
  54. });
  55. }
  56. }
  57. };
  58. function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
  59. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  60. vue.createElementVNode("view")
  61. ]);
  62. }
  63. const PagesCommonLaunch = /* @__PURE__ */ _export_sfc(_sfc_main$2y, [["render", _sfc_render$2L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/common/launch.vue"]]);
  64. const ON_SHOW = "onShow";
  65. const ON_LOAD = "onLoad";
  66. const ON_READY = "onReady";
  67. const ON_UNLOAD = "onUnload";
  68. const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";
  69. function requireNativePlugin(name) {
  70. return weex.requireModule(name);
  71. }
  72. function formatAppLog(type2, filename, ...args) {
  73. if (uni.__log__) {
  74. uni.__log__(type2, filename, ...args);
  75. } else {
  76. console[type2].apply(console, [...args, filename]);
  77. }
  78. }
  79. function resolveEasycom(component, easycom) {
  80. return typeof component === "string" ? easycom : component;
  81. }
  82. const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
  83. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  84. };
  85. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  86. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  87. const onReady = /* @__PURE__ */ createHook(ON_READY);
  88. const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
  89. const onNavigationBarButtonTap = /* @__PURE__ */ createHook(ON_NAVIGATION_BAR_BUTTON_TAP);
  90. let Request$1 = class Request {
  91. http(router, data = {}, method, contentType) {
  92. let path = "https://userapp.his.cdwjyyh.com";
  93. uni.setStorageSync("requestPath", path);
  94. return new Promise((resolve, reject2) => {
  95. let token = uni.getStorageSync("AppToken");
  96. let CompanyUserToken = uni.getStorageSync("CompanyUserToken");
  97. var httpContentType = "application/x-www-form-urlencoded";
  98. if (contentType != void 0) {
  99. httpContentType = contentType;
  100. }
  101. uni.request({
  102. header: {
  103. // 'Content-Type': 'application/x-www-form-urlencoded',
  104. "Content-Type": httpContentType,
  105. "AppToken": token,
  106. "CompanyUserToken": CompanyUserToken
  107. },
  108. url: `${path}${router}`,
  109. data,
  110. method,
  111. success: (res) => {
  112. if (res.data.code == 401) {
  113. let pages2 = getCurrentPages();
  114. let url2 = pages2[pages2.length - 1];
  115. formatAppLog("log", "at common/request.js:37", url2);
  116. if (url2 != void 0 && url2.route == "pages/auth/login") {
  117. resolve(res.data);
  118. return;
  119. }
  120. uni.navigateTo({
  121. url: "/pages/auth/login",
  122. success: () => {
  123. },
  124. fail: () => {
  125. }
  126. });
  127. return;
  128. }
  129. if (res.data.token) {
  130. uni.setStorageSync("AppToken", res.data.token);
  131. }
  132. resolve(res.data);
  133. },
  134. fail: (res) => {
  135. },
  136. complete: (res) => {
  137. if (res.data.code == 401) {
  138. return false;
  139. }
  140. }
  141. });
  142. });
  143. }
  144. };
  145. let request$n = new Request$1().http;
  146. function wxLogin(data) {
  147. return request$n("/app/wx/login", data, "POST", "application/json;charset=UTF-8");
  148. }
  149. function loginByMiniApp(data) {
  150. return request$n("/app/wx/loginByMiniApp", data, "POST", "application/json;charset=UTF-8");
  151. }
  152. function getUserInfo$1() {
  153. return request$n("/app/user/getUserInfo", null, "GET");
  154. }
  155. function checkLogin() {
  156. return request$n("/app/user/checkLogin", null, "GET");
  157. }
  158. function editUser(data) {
  159. return request$n("/app/user/editUser", data, "POST", "application/json;charset=UTF-8");
  160. }
  161. function registerDoctor(data) {
  162. return request$n("/app/user/registerDoctor", data, "POST", "application/json;charset=UTF-8");
  163. }
  164. function getMyCouponList(data) {
  165. return request$n("/app/user/getMyCouponList", data, "GET");
  166. }
  167. function getMyEnableCouponList(data) {
  168. return request$n("/app/user/getMyEnableCouponList", data, "GET");
  169. }
  170. const _sfc_main$2x = {
  171. data() {
  172. return {
  173. isAgreement: false,
  174. code: null
  175. };
  176. },
  177. computed: {},
  178. onLoad(option) {
  179. uni.$on("refreshLogin", () => {
  180. uni.navigateBack({
  181. delta: 1
  182. });
  183. });
  184. this.getCode();
  185. },
  186. onUnload() {
  187. },
  188. mounted() {
  189. },
  190. methods: {
  191. wxLogin() {
  192. var that = this;
  193. if (!this.isAgreement) {
  194. uni.showToast({
  195. icon: "none",
  196. title: "请先同意协议后再登录"
  197. });
  198. return false;
  199. }
  200. uni.showLoading({
  201. title: "处理中..."
  202. });
  203. that.$getProvider().then((provider) => {
  204. formatAppLog("log", "at pages/auth/login.vue:78", "当前的环境商", provider);
  205. if (!provider) {
  206. reject();
  207. }
  208. uni.login({
  209. provider,
  210. success: async (loginRes) => {
  211. formatAppLog("log", "at pages/auth/login.vue:86", loginRes);
  212. let code2 = loginRes.code;
  213. var tuiUserId = uni.getStorageSync("tuiUserId");
  214. loginByMiniApp({
  215. // encryptedData: e.mp.detail.encryptedData,
  216. // iv: e.mp.detail.iv,
  217. code: code2,
  218. tuiUserId
  219. }).then((res) => {
  220. uni.hideLoading();
  221. if (res.code == 200) {
  222. uni.showToast({
  223. icon: "none",
  224. title: "登录成功"
  225. });
  226. uni.setStorageSync("AppToken", res.token);
  227. uni.setStorageSync("userId", res.user.userId);
  228. uni.setStorageSync("avatar", res.user.avatar);
  229. uni.setStorageSync("nickName", res.user.nickName);
  230. uni.$emit("refreshLogin");
  231. } else {
  232. uni.showToast({
  233. icon: "none",
  234. title: "授权登录失败,请重新登录"
  235. });
  236. }
  237. }).catch((error2) => {
  238. formatAppLog("log", "at pages/auth/login.vue:119", error2);
  239. uni.hideLoading();
  240. uni.showToast({
  241. icon: "none",
  242. title: "登录接口调用失败"
  243. });
  244. });
  245. }
  246. });
  247. }).catch((err) => {
  248. uni.showToast({
  249. icon: "none",
  250. title: err
  251. });
  252. });
  253. },
  254. handleAgree() {
  255. if (!this.isAgreement) {
  256. uni.showToast({
  257. icon: "none",
  258. title: "请先同意协议后再登录"
  259. });
  260. }
  261. },
  262. openContent(type2) {
  263. formatAppLog("log", "at pages/auth/login.vue:146", type2);
  264. uni.navigateTo({
  265. url: "/pages_user/agreement?type=" + type2
  266. });
  267. },
  268. handleAgreement() {
  269. this.isAgreement = !this.isAgreement;
  270. },
  271. getCode() {
  272. var that = this;
  273. that.$getProvider().then((provider) => {
  274. if (!provider) {
  275. reject();
  276. }
  277. uni.login({
  278. provider,
  279. success: async (loginRes) => {
  280. that.code = loginRes.code;
  281. }
  282. });
  283. }).catch((err) => {
  284. });
  285. },
  286. // 微信用户手机号登录
  287. phoneLogin(e) {
  288. uni.showLoading({
  289. title: "处理中"
  290. });
  291. formatAppLog("log", "at pages/auth/login.vue:181", e);
  292. if (e.detail.errMsg == "getPhoneNumber:ok") {
  293. this.$getProvider().then((provider) => {
  294. formatAppLog("log", "at pages/auth/login.vue:185", "当前的环境商", provider);
  295. if (!provider) {
  296. reject();
  297. }
  298. uni.login({
  299. provider,
  300. success: async (loginRes) => {
  301. formatAppLog("log", "at pages/auth/login.vue:193", loginRes);
  302. let code2 = loginRes.code;
  303. var tuiUserId = uni.getStorageSync("tuiUserId");
  304. wxLogin({
  305. encryptedData: e.detail.encryptedData,
  306. iv: e.detail.iv,
  307. code: code2,
  308. tuiUserId
  309. }).then((res) => {
  310. uni.hideLoading();
  311. if (res.code == 200) {
  312. uni.showToast({
  313. icon: "none",
  314. title: "登录成功"
  315. });
  316. uni.setStorageSync("AppToken", res.token);
  317. uni.setStorageSync("userId", res.user.userId);
  318. uni.setStorageSync("avatar", res.user.avatar);
  319. uni.setStorageSync("nickName", res.user.nickName);
  320. uni.$emit("refreshLogin");
  321. uni.$emit("refreshIM");
  322. } else {
  323. uni.showToast({
  324. icon: "none",
  325. title: "授权登录失败,请重新登录"
  326. });
  327. }
  328. }).catch((error2) => {
  329. formatAppLog("log", "at pages/auth/login.vue:226", error2);
  330. uni.hideLoading();
  331. uni.showToast({
  332. icon: "none",
  333. title: "授权登录失败,请重新登录"
  334. });
  335. });
  336. }
  337. });
  338. }).catch((err) => {
  339. });
  340. } else {
  341. uni.showToast({
  342. title: "已拒绝授权",
  343. icon: "none",
  344. duration: 2e3
  345. });
  346. }
  347. },
  348. back() {
  349. uni.reLaunch({
  350. url: "/pages/index/index",
  351. animationType: "pop-in",
  352. animationDuration: 100
  353. });
  354. }
  355. }
  356. };
  357. function _sfc_render$2K(_ctx, _cache, $props, $setup, $data, $options) {
  358. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  359. vue.createElementVNode("view", { class: "force-login-wrap" }, [
  360. vue.createElementVNode("view", { class: "force-login__content y-f" }, [
  361. vue.createElementVNode("view", { class: "logo" }, [
  362. vue.createElementVNode("view", { class: "logo-img" }, [
  363. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png" })
  364. ]),
  365. vue.createElementVNode("view", { class: "title" }, "芸医汇互联网医院")
  366. ]),
  367. vue.createElementVNode("view", { class: "login-notice" }, "为了提供更优质的服务,请先登录"),
  368. vue.createElementVNode("view", { class: "btns" }, [
  369. vue.createElementVNode(
  370. "button",
  371. {
  372. class: "author-btn",
  373. "open-type": "getPhoneNumber",
  374. onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.phoneLogin && $options.phoneLogin(...args))
  375. },
  376. "一键授权手机号登录",
  377. 32
  378. /* NEED_HYDRATION */
  379. ),
  380. $data.isAgreement == false ? (vue.openBlock(), vue.createElementBlock("button", {
  381. key: 0,
  382. class: "author-btn",
  383. onClick: _cache[1] || (_cache[1] = ($event) => $options.handleAgree())
  384. }, "一键授权手机号登录")) : vue.createCommentVNode("v-if", true)
  385. ]),
  386. vue.createCommentVNode(' <button\r\n class="author-btn"\r\n @click="wxLogin()" >微信授权登录</button> '),
  387. vue.createElementVNode("button", {
  388. class: "close-btn",
  389. onClick: _cache[2] || (_cache[2] = (...args) => $options.back && $options.back(...args))
  390. }, "暂不登录"),
  391. vue.createElementVNode("view", { class: "tips" }, [
  392. vue.createElementVNode("checkbox", {
  393. checked: $data.isAgreement,
  394. onClick: _cache[3] || (_cache[3] = ($event) => $options.handleAgreement())
  395. }, null, 8, ["checked"]),
  396. vue.createElementVNode("view", {
  397. onClick: _cache[4] || (_cache[4] = ($event) => $options.handleAgreement())
  398. }, "您同意并接受"),
  399. vue.createElementVNode("view", {
  400. class: "btn",
  401. onClick: _cache[5] || (_cache[5] = ($event) => $options.openContent("userRegister"))
  402. }, "《用户协议》"),
  403. vue.createElementVNode("view", {
  404. class: "btn",
  405. onClick: _cache[6] || (_cache[6] = ($event) => $options.openContent("userPrivacy"))
  406. }, "《隐私保护》")
  407. ])
  408. ])
  409. ])
  410. ]);
  411. }
  412. const PagesAuthLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["render", _sfc_render$2K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/auth/login.vue"]]);
  413. const version = "3";
  414. {
  415. formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
  416. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  417. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  418. }
  419. const config$2 = {
  420. v: version,
  421. version,
  422. // 主题名称
  423. type: [
  424. "primary",
  425. "success",
  426. "info",
  427. "error",
  428. "warning"
  429. ],
  430. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  431. color: {
  432. "u-primary": "#2979ff",
  433. "u-warning": "#ff9900",
  434. "u-success": "#19be6b",
  435. "u-error": "#fa3534",
  436. "u-info": "#909399",
  437. "u-main-color": "#303133",
  438. "u-content-color": "#606266",
  439. "u-tips-color": "#909399",
  440. "u-light-color": "#c0c4cc"
  441. },
  442. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  443. unit: "px"
  444. };
  445. const ActionSheet = {
  446. // action-sheet组件
  447. actionSheet: {
  448. show: false,
  449. title: "",
  450. description: "",
  451. actions: () => [],
  452. index: "",
  453. cancelText: "",
  454. closeOnClickAction: true,
  455. safeAreaInsetBottom: true,
  456. openType: "",
  457. closeOnClickOverlay: true,
  458. round: 0
  459. }
  460. };
  461. const Album = {
  462. // album 组件
  463. album: {
  464. urls: () => [],
  465. keyName: "",
  466. singleSize: 180,
  467. multipleSize: 70,
  468. space: 6,
  469. singleMode: "scaleToFill",
  470. multipleMode: "aspectFill",
  471. maxCount: 9,
  472. previewFullImage: true,
  473. rowCount: 3,
  474. showMore: true
  475. }
  476. };
  477. const Alert = {
  478. // alert警告组件
  479. alert: {
  480. title: "",
  481. type: "warning",
  482. description: "",
  483. closable: false,
  484. showIcon: false,
  485. effect: "light",
  486. center: false,
  487. fontSize: 14
  488. }
  489. };
  490. const Avatar = {
  491. // avatar 组件
  492. avatar: {
  493. src: "",
  494. shape: "circle",
  495. size: 40,
  496. mode: "scaleToFill",
  497. text: "",
  498. bgColor: "#c0c4cc",
  499. color: "#ffffff",
  500. fontSize: 18,
  501. icon: "",
  502. mpAvatar: false,
  503. randomBgColor: false,
  504. defaultUrl: "",
  505. colorIndex: "",
  506. name: ""
  507. }
  508. };
  509. const AvatarGroup = {
  510. // avatarGroup 组件
  511. avatarGroup: {
  512. urls: () => [],
  513. maxCount: 5,
  514. shape: "circle",
  515. mode: "scaleToFill",
  516. showMore: true,
  517. size: 40,
  518. keyName: "",
  519. gap: 0.5,
  520. extraValue: 0
  521. }
  522. };
  523. const Backtop = {
  524. // backtop组件
  525. backtop: {
  526. mode: "circle",
  527. icon: "arrow-upward",
  528. text: "",
  529. duration: 100,
  530. scrollTop: 0,
  531. top: 400,
  532. bottom: 100,
  533. right: 20,
  534. zIndex: 9,
  535. iconStyle: () => ({
  536. color: "#909399",
  537. fontSize: "19px"
  538. })
  539. }
  540. };
  541. const Badge = {
  542. // 徽标数组件
  543. badge: {
  544. isDot: false,
  545. value: "",
  546. show: true,
  547. max: 999,
  548. type: "error",
  549. showZero: false,
  550. bgColor: null,
  551. color: null,
  552. shape: "circle",
  553. numberType: "overflow",
  554. offset: () => [],
  555. inverted: false,
  556. absolute: false
  557. }
  558. };
  559. const Button = {
  560. // button组件
  561. button: {
  562. hairline: false,
  563. type: "info",
  564. size: "normal",
  565. shape: "square",
  566. plain: false,
  567. disabled: false,
  568. loading: false,
  569. loadingText: "",
  570. loadingMode: "spinner",
  571. loadingSize: 15,
  572. openType: "",
  573. formType: "",
  574. appParameter: "",
  575. hoverStopPropagation: true,
  576. lang: "en",
  577. sessionFrom: "",
  578. sendMessageTitle: "",
  579. sendMessagePath: "",
  580. sendMessageImg: "",
  581. showMessageCard: false,
  582. dataName: "",
  583. throttleTime: 0,
  584. hoverStartTime: 0,
  585. hoverStayTime: 200,
  586. text: "",
  587. icon: "",
  588. iconColor: "",
  589. color: ""
  590. }
  591. };
  592. const Calendar = {
  593. // calendar 组件
  594. calendar: {
  595. title: "日期选择",
  596. showTitle: true,
  597. showSubtitle: true,
  598. mode: "single",
  599. startText: "开始",
  600. endText: "结束",
  601. customList: () => [],
  602. color: "#3c9cff",
  603. minDate: 0,
  604. maxDate: 0,
  605. defaultDate: null,
  606. maxCount: Number.MAX_SAFE_INTEGER,
  607. // Infinity
  608. rowHeight: 56,
  609. formatter: null,
  610. showLunar: false,
  611. showMark: true,
  612. confirmText: "确定",
  613. confirmDisabledText: "确定",
  614. show: false,
  615. closeOnClickOverlay: false,
  616. readonly: false,
  617. showConfirm: true,
  618. maxRange: Number.MAX_SAFE_INTEGER,
  619. // Infinity
  620. rangePrompt: "",
  621. showRangePrompt: true,
  622. allowSameDay: false,
  623. round: 0,
  624. monthNum: 3
  625. }
  626. };
  627. const CarKeyboard = {
  628. // 车牌号键盘
  629. carKeyboard: {
  630. random: false
  631. }
  632. };
  633. const Cell = {
  634. // cell组件的props
  635. cell: {
  636. customClass: "",
  637. title: "",
  638. label: "",
  639. value: "",
  640. icon: "",
  641. disabled: false,
  642. border: true,
  643. center: false,
  644. url: "",
  645. linkType: "navigateTo",
  646. clickable: false,
  647. isLink: false,
  648. required: false,
  649. arrowDirection: "",
  650. iconStyle: {},
  651. rightIconStyle: {},
  652. rightIcon: "arrow-right",
  653. titleStyle: {},
  654. size: "",
  655. stop: true,
  656. name: ""
  657. }
  658. };
  659. const CellGroup = {
  660. // cell-group组件的props
  661. cellGroup: {
  662. title: "",
  663. border: true,
  664. customStyle: {}
  665. }
  666. };
  667. const Checkbox = {
  668. // checkbox组件
  669. checkbox: {
  670. name: "",
  671. shape: "",
  672. size: "",
  673. checkbox: false,
  674. disabled: "",
  675. activeColor: "",
  676. inactiveColor: "",
  677. iconSize: "",
  678. iconColor: "",
  679. label: "",
  680. labelSize: "",
  681. labelColor: "",
  682. labelDisabled: ""
  683. }
  684. };
  685. const CheckboxGroup = {
  686. // checkbox-group组件
  687. checkboxGroup: {
  688. name: "",
  689. value: () => [],
  690. shape: "square",
  691. disabled: false,
  692. activeColor: "#2979ff",
  693. inactiveColor: "#c8c9cc",
  694. size: 18,
  695. placement: "row",
  696. labelSize: 14,
  697. labelColor: "#303133",
  698. labelDisabled: false,
  699. iconColor: "#ffffff",
  700. iconSize: 12,
  701. iconPlacement: "left",
  702. borderBottom: false
  703. }
  704. };
  705. const CircleProgress = {
  706. // circleProgress 组件
  707. circleProgress: {
  708. percentage: 30
  709. }
  710. };
  711. const Code = {
  712. // code 组件
  713. code: {
  714. seconds: 60,
  715. startText: "获取验证码",
  716. changeText: "X秒重新获取",
  717. endText: "重新获取",
  718. keepRunning: false,
  719. uniqueKey: ""
  720. }
  721. };
  722. const CodeInput = {
  723. // codeInput 组件
  724. codeInput: {
  725. adjustPosition: true,
  726. maxlength: 6,
  727. dot: false,
  728. mode: "box",
  729. hairline: false,
  730. space: 10,
  731. value: "",
  732. focus: false,
  733. bold: false,
  734. color: "#606266",
  735. fontSize: 18,
  736. size: 35,
  737. disabledKeyboard: false,
  738. borderColor: "#c9cacc",
  739. disabledDot: true
  740. }
  741. };
  742. const Col = {
  743. // col 组件
  744. col: {
  745. span: 12,
  746. offset: 0,
  747. justify: "start",
  748. align: "stretch",
  749. textAlign: "left"
  750. }
  751. };
  752. const Collapse = {
  753. // collapse 组件
  754. collapse: {
  755. value: null,
  756. accordion: false,
  757. border: true
  758. }
  759. };
  760. const CollapseItem = {
  761. // collapseItem 组件
  762. collapseItem: {
  763. title: "",
  764. value: "",
  765. label: "",
  766. disabled: false,
  767. isLink: true,
  768. clickable: true,
  769. border: true,
  770. align: "left",
  771. name: "",
  772. icon: "",
  773. duration: 300
  774. }
  775. };
  776. const ColumnNotice = {
  777. // columnNotice 组件
  778. columnNotice: {
  779. text: "",
  780. icon: "volume",
  781. mode: "",
  782. color: "#f9ae3d",
  783. bgColor: "#fdf6ec",
  784. fontSize: 14,
  785. speed: 80,
  786. step: false,
  787. duration: 1500,
  788. disableTouch: true
  789. }
  790. };
  791. const CountDown = {
  792. // u-count-down 计时器组件
  793. countDown: {
  794. time: 0,
  795. format: "HH:mm:ss",
  796. autoStart: true,
  797. millisecond: false
  798. }
  799. };
  800. const CountTo = {
  801. // countTo 组件
  802. countTo: {
  803. startVal: 0,
  804. endVal: 0,
  805. duration: 2e3,
  806. autoplay: true,
  807. decimals: 0,
  808. useEasing: true,
  809. decimal: ".",
  810. color: "#606266",
  811. fontSize: 22,
  812. bold: false,
  813. separator: ""
  814. }
  815. };
  816. const DatetimePicker = {
  817. // datetimePicker 组件
  818. datetimePicker: {
  819. show: false,
  820. showToolbar: true,
  821. value: "",
  822. title: "",
  823. mode: "datetime",
  824. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  825. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  826. minHour: 0,
  827. maxHour: 23,
  828. minMinute: 0,
  829. maxMinute: 59,
  830. filter: null,
  831. formatter: null,
  832. loading: false,
  833. itemHeight: 44,
  834. cancelText: "取消",
  835. confirmText: "确认",
  836. cancelColor: "#909193",
  837. confirmColor: "#3c9cff",
  838. visibleItemCount: 5,
  839. closeOnClickOverlay: false,
  840. defaultIndex: () => []
  841. }
  842. };
  843. const Divider = {
  844. // divider组件
  845. divider: {
  846. dashed: false,
  847. hairline: true,
  848. dot: false,
  849. textPosition: "center",
  850. text: "",
  851. textSize: 14,
  852. textColor: "#909399",
  853. lineColor: "#dcdfe6"
  854. }
  855. };
  856. const Empty = {
  857. // empty组件
  858. empty: {
  859. icon: "",
  860. text: "",
  861. textColor: "#c0c4cc",
  862. textSize: 14,
  863. iconColor: "#c0c4cc",
  864. iconSize: 90,
  865. mode: "data",
  866. width: 160,
  867. height: 160,
  868. show: true,
  869. marginTop: 0
  870. }
  871. };
  872. const Form = {
  873. // form 组件
  874. form: {
  875. model: () => ({}),
  876. rules: () => ({}),
  877. errorType: "message",
  878. borderBottom: true,
  879. labelPosition: "left",
  880. labelWidth: 45,
  881. labelAlign: "left",
  882. labelStyle: () => ({})
  883. }
  884. };
  885. const GormItem = {
  886. // formItem 组件
  887. formItem: {
  888. label: "",
  889. prop: "",
  890. borderBottom: "",
  891. labelWidth: "",
  892. rightIcon: "",
  893. leftIcon: "",
  894. required: false,
  895. leftIconStyle: ""
  896. }
  897. };
  898. const Gap = {
  899. // gap组件
  900. gap: {
  901. bgColor: "transparent",
  902. height: 20,
  903. marginTop: 0,
  904. marginBottom: 0,
  905. customStyle: {}
  906. }
  907. };
  908. const Grid = {
  909. // grid组件
  910. grid: {
  911. col: 3,
  912. border: false,
  913. align: "left"
  914. }
  915. };
  916. const GridItem = {
  917. // grid-item组件
  918. gridItem: {
  919. name: null,
  920. bgColor: "transparent"
  921. }
  922. };
  923. const {
  924. color: color$3
  925. } = config$2;
  926. const Icon = {
  927. // icon组件
  928. icon: {
  929. name: "",
  930. color: color$3["u-content-color"],
  931. size: "16px",
  932. bold: false,
  933. index: "",
  934. hoverClass: "",
  935. customPrefix: "uicon",
  936. label: "",
  937. labelPos: "right",
  938. labelSize: "15px",
  939. labelColor: color$3["u-content-color"],
  940. space: "3px",
  941. imgMode: "",
  942. width: "",
  943. height: "",
  944. top: 0,
  945. stop: false
  946. }
  947. };
  948. const Image$1 = {
  949. // image组件
  950. image: {
  951. src: "",
  952. mode: "aspectFill",
  953. width: "300",
  954. height: "225",
  955. shape: "square",
  956. radius: 0,
  957. lazyLoad: true,
  958. showMenuByLongpress: true,
  959. loadingIcon: "photo",
  960. errorIcon: "error-circle",
  961. showLoading: true,
  962. showError: true,
  963. fade: true,
  964. webp: false,
  965. duration: 500,
  966. bgColor: "#f3f4f6"
  967. }
  968. };
  969. const IndexAnchor = {
  970. // indexAnchor 组件
  971. indexAnchor: {
  972. text: "",
  973. color: "#606266",
  974. size: 14,
  975. bgColor: "#dedede",
  976. height: 32
  977. }
  978. };
  979. const IndexList = {
  980. // indexList 组件
  981. indexList: {
  982. inactiveColor: "#606266",
  983. activeColor: "#5677fc",
  984. indexList: () => [],
  985. sticky: true,
  986. customNavHeight: 0
  987. }
  988. };
  989. const Input = {
  990. // index 组件
  991. input: {
  992. value: "",
  993. type: "text",
  994. fixed: false,
  995. disabled: false,
  996. disabledColor: "#f5f7fa",
  997. clearable: false,
  998. password: false,
  999. maxlength: -1,
  1000. placeholder: null,
  1001. placeholderClass: "input-placeholder",
  1002. placeholderStyle: "color: #c0c4cc",
  1003. showWordLimit: false,
  1004. confirmType: "done",
  1005. confirmHold: false,
  1006. holdKeyboard: false,
  1007. focus: false,
  1008. autoBlur: false,
  1009. disableDefaultPadding: false,
  1010. cursor: -1,
  1011. cursorSpacing: 30,
  1012. selectionStart: -1,
  1013. selectionEnd: -1,
  1014. adjustPosition: true,
  1015. inputAlign: "left",
  1016. fontSize: "15px",
  1017. color: "#303133",
  1018. prefixIcon: "",
  1019. prefixIconStyle: "",
  1020. suffixIcon: "",
  1021. suffixIconStyle: "",
  1022. border: "surround",
  1023. readonly: false,
  1024. shape: "square",
  1025. formatter: null
  1026. }
  1027. };
  1028. const Keyboard = {
  1029. // 键盘组件
  1030. keyboard: {
  1031. mode: "number",
  1032. dotDisabled: false,
  1033. tooltip: true,
  1034. showTips: true,
  1035. tips: "",
  1036. showCancel: true,
  1037. showConfirm: true,
  1038. random: false,
  1039. safeAreaInsetBottom: true,
  1040. closeOnClickOverlay: true,
  1041. show: false,
  1042. overlay: true,
  1043. zIndex: 10075,
  1044. cancelText: "取消",
  1045. confirmText: "确定",
  1046. autoChange: false
  1047. }
  1048. };
  1049. const Line = {
  1050. // line组件
  1051. line: {
  1052. color: "#d6d7d9",
  1053. length: "100%",
  1054. direction: "row",
  1055. hairline: true,
  1056. margin: 0,
  1057. dashed: false
  1058. }
  1059. };
  1060. const LineProgress = {
  1061. // lineProgress 组件
  1062. lineProgress: {
  1063. activeColor: "#19be6b",
  1064. inactiveColor: "#ececec",
  1065. percentage: 0,
  1066. showText: true,
  1067. height: 12
  1068. }
  1069. };
  1070. const {
  1071. color: color$2
  1072. } = config$2;
  1073. const Link = {
  1074. // link超链接组件props参数
  1075. link: {
  1076. color: color$2["u-primary"],
  1077. fontSize: 15,
  1078. underLine: false,
  1079. href: "",
  1080. mpTips: "链接已复制,请在浏览器打开",
  1081. lineColor: "",
  1082. text: ""
  1083. }
  1084. };
  1085. const List = {
  1086. // list 组件
  1087. list: {
  1088. showScrollbar: false,
  1089. lowerThreshold: 50,
  1090. upperThreshold: 0,
  1091. scrollTop: 0,
  1092. offsetAccuracy: 10,
  1093. enableFlex: false,
  1094. pagingEnabled: false,
  1095. scrollable: true,
  1096. scrollIntoView: "",
  1097. scrollWithAnimation: false,
  1098. enableBackToTop: false,
  1099. height: 0,
  1100. width: 0,
  1101. preLoadScreen: 1
  1102. }
  1103. };
  1104. const ListItem = {
  1105. // listItem 组件
  1106. listItem: {
  1107. anchor: ""
  1108. }
  1109. };
  1110. const {
  1111. color: color$1
  1112. } = config$2;
  1113. const LoadingIcon = {
  1114. // loading-icon加载中图标组件
  1115. loadingIcon: {
  1116. show: true,
  1117. color: color$1["u-tips-color"],
  1118. textColor: color$1["u-tips-color"],
  1119. vertical: false,
  1120. mode: "spinner",
  1121. size: 24,
  1122. textSize: 15,
  1123. text: "",
  1124. timingFunction: "ease-in-out",
  1125. duration: 1200,
  1126. inactiveColor: ""
  1127. }
  1128. };
  1129. const LoadingPage = {
  1130. // loading-page组件
  1131. loadingPage: {
  1132. loadingText: "正在加载",
  1133. image: "",
  1134. loadingMode: "circle",
  1135. loading: false,
  1136. bgColor: "#ffffff",
  1137. color: "#C8C8C8",
  1138. fontSize: 19,
  1139. iconSize: 28,
  1140. loadingColor: "#C8C8C8"
  1141. }
  1142. };
  1143. const Loadmore = {
  1144. // loadmore 组件
  1145. loadmore: {
  1146. status: "loadmore",
  1147. bgColor: "transparent",
  1148. icon: true,
  1149. fontSize: 14,
  1150. iconSize: 17,
  1151. color: "#606266",
  1152. loadingIcon: "spinner",
  1153. loadmoreText: "加载更多",
  1154. loadingText: "正在加载...",
  1155. nomoreText: "没有更多了",
  1156. isDot: false,
  1157. iconColor: "#b7b7b7",
  1158. marginTop: 10,
  1159. marginBottom: 10,
  1160. height: "auto",
  1161. line: false,
  1162. lineColor: "#E6E8EB",
  1163. dashed: false
  1164. }
  1165. };
  1166. const Modal = {
  1167. // modal 组件
  1168. modal: {
  1169. show: false,
  1170. title: "",
  1171. content: "",
  1172. confirmText: "确认",
  1173. cancelText: "取消",
  1174. showConfirmButton: true,
  1175. showCancelButton: false,
  1176. confirmColor: "#2979ff",
  1177. cancelColor: "#606266",
  1178. buttonReverse: false,
  1179. zoom: true,
  1180. asyncClose: false,
  1181. closeOnClickOverlay: false,
  1182. negativeTop: 0,
  1183. width: "650rpx",
  1184. confirmButtonShape: ""
  1185. }
  1186. };
  1187. const color = {
  1188. primary: "#3c9cff",
  1189. info: "#909399",
  1190. default: "#909399",
  1191. warning: "#f9ae3d",
  1192. error: "#f56c6c",
  1193. success: "#5ac725",
  1194. mainColor: "#303133",
  1195. contentColor: "#606266",
  1196. tipsColor: "#909399",
  1197. lightColor: "#c0c4cc",
  1198. borderColor: "#e4e7ed"
  1199. };
  1200. const Navbar = {
  1201. // navbar 组件
  1202. navbar: {
  1203. safeAreaInsetTop: true,
  1204. placeholder: false,
  1205. fixed: true,
  1206. border: false,
  1207. leftIcon: "arrow-left",
  1208. leftText: "",
  1209. rightText: "",
  1210. rightIcon: "",
  1211. title: "",
  1212. bgColor: "#ffffff",
  1213. titleWidth: "400rpx",
  1214. height: "44px",
  1215. leftIconSize: 20,
  1216. leftIconColor: color.mainColor,
  1217. autoBack: false,
  1218. titleStyle: ""
  1219. }
  1220. };
  1221. const NoNetwork = {
  1222. // noNetwork
  1223. noNetwork: {
  1224. tips: "哎呀,网络信号丢失",
  1225. zIndex: "",
  1226. 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"
  1227. }
  1228. };
  1229. const NoticeBar = {
  1230. // noticeBar
  1231. noticeBar: {
  1232. text: () => [],
  1233. direction: "row",
  1234. step: false,
  1235. icon: "volume",
  1236. mode: "",
  1237. color: "#f9ae3d",
  1238. bgColor: "#fdf6ec",
  1239. speed: 80,
  1240. fontSize: 14,
  1241. duration: 2e3,
  1242. disableTouch: true,
  1243. url: "",
  1244. linkType: "navigateTo"
  1245. }
  1246. };
  1247. const Notify = {
  1248. // notify组件
  1249. notify: {
  1250. top: 0,
  1251. type: "primary",
  1252. color: "#ffffff",
  1253. bgColor: "",
  1254. message: "",
  1255. duration: 3e3,
  1256. fontSize: 15,
  1257. safeAreaInsetTop: false
  1258. }
  1259. };
  1260. const NumberBox = {
  1261. // 步进器组件
  1262. numberBox: {
  1263. name: "",
  1264. value: 0,
  1265. min: 1,
  1266. max: Number.MAX_SAFE_INTEGER,
  1267. step: 1,
  1268. integer: false,
  1269. disabled: false,
  1270. disabledInput: false,
  1271. asyncChange: false,
  1272. inputWidth: 35,
  1273. showMinus: true,
  1274. showPlus: true,
  1275. decimalLength: null,
  1276. longPress: true,
  1277. color: "#323233",
  1278. buttonSize: 30,
  1279. bgColor: "#EBECEE",
  1280. cursorSpacing: 100,
  1281. disableMinus: false,
  1282. disablePlus: false,
  1283. iconStyle: ""
  1284. }
  1285. };
  1286. const NumberKeyboard = {
  1287. // 数字键盘
  1288. numberKeyboard: {
  1289. mode: "number",
  1290. dotDisabled: false,
  1291. random: false
  1292. }
  1293. };
  1294. const Overlay = {
  1295. // overlay组件
  1296. overlay: {
  1297. show: false,
  1298. zIndex: 10070,
  1299. duration: 300,
  1300. opacity: 0.5
  1301. }
  1302. };
  1303. const Parse = {
  1304. // parse
  1305. parse: {
  1306. copyLink: true,
  1307. errorImg: "",
  1308. lazyLoad: false,
  1309. loadingImg: "",
  1310. pauseVideo: true,
  1311. previewImg: true,
  1312. setTitle: true,
  1313. showImgMenu: true
  1314. }
  1315. };
  1316. const Picker = {
  1317. // picker
  1318. picker: {
  1319. show: false,
  1320. showToolbar: true,
  1321. title: "",
  1322. columns: () => [],
  1323. loading: false,
  1324. itemHeight: 44,
  1325. cancelText: "取消",
  1326. confirmText: "确定",
  1327. cancelColor: "#909193",
  1328. confirmColor: "#3c9cff",
  1329. visibleItemCount: 5,
  1330. keyName: "text",
  1331. closeOnClickOverlay: false,
  1332. defaultIndex: () => [],
  1333. immediateChange: false
  1334. }
  1335. };
  1336. const Popup = {
  1337. // popup组件
  1338. popup: {
  1339. show: false,
  1340. overlay: true,
  1341. mode: "bottom",
  1342. duration: 300,
  1343. closeable: false,
  1344. overlayStyle: () => {
  1345. },
  1346. closeOnClickOverlay: true,
  1347. zIndex: 10075,
  1348. safeAreaInsetBottom: true,
  1349. safeAreaInsetTop: false,
  1350. closeIconPos: "top-right",
  1351. round: 0,
  1352. zoom: true,
  1353. bgColor: "",
  1354. overlayOpacity: 0.5
  1355. }
  1356. };
  1357. const Radio = {
  1358. // radio组件
  1359. radio: {
  1360. name: "",
  1361. shape: "",
  1362. disabled: "",
  1363. labelDisabled: "",
  1364. activeColor: "",
  1365. inactiveColor: "",
  1366. iconSize: "",
  1367. labelSize: "",
  1368. label: "",
  1369. labelColor: "",
  1370. size: "",
  1371. iconColor: "",
  1372. placement: ""
  1373. }
  1374. };
  1375. const RadioGroup = {
  1376. // radio-group组件
  1377. radioGroup: {
  1378. value: "",
  1379. disabled: false,
  1380. shape: "circle",
  1381. activeColor: "#2979ff",
  1382. inactiveColor: "#c8c9cc",
  1383. name: "",
  1384. size: 18,
  1385. placement: "row",
  1386. label: "",
  1387. labelColor: "#303133",
  1388. labelSize: 14,
  1389. labelDisabled: false,
  1390. iconColor: "#ffffff",
  1391. iconSize: 12,
  1392. borderBottom: false,
  1393. iconPlacement: "left"
  1394. }
  1395. };
  1396. const Rate = {
  1397. // rate组件
  1398. rate: {
  1399. value: 1,
  1400. count: 5,
  1401. disabled: false,
  1402. size: 18,
  1403. inactiveColor: "#b2b2b2",
  1404. activeColor: "#FA3534",
  1405. gutter: 4,
  1406. minCount: 1,
  1407. allowHalf: false,
  1408. activeIcon: "star-fill",
  1409. inactiveIcon: "star",
  1410. touchable: true
  1411. }
  1412. };
  1413. const ReadMore = {
  1414. // readMore
  1415. readMore: {
  1416. showHeight: 400,
  1417. toggle: false,
  1418. closeText: "展开阅读全文",
  1419. openText: "收起",
  1420. color: "#2979ff",
  1421. fontSize: 14,
  1422. textIndent: "2em",
  1423. name: ""
  1424. }
  1425. };
  1426. const Row = {
  1427. // row
  1428. row: {
  1429. gutter: 0,
  1430. justify: "start",
  1431. align: "center"
  1432. }
  1433. };
  1434. const RowNotice = {
  1435. // rowNotice
  1436. rowNotice: {
  1437. text: "",
  1438. icon: "volume",
  1439. mode: "",
  1440. color: "#f9ae3d",
  1441. bgColor: "#fdf6ec",
  1442. fontSize: 14,
  1443. speed: 80
  1444. }
  1445. };
  1446. const ScrollList = {
  1447. // scrollList
  1448. scrollList: {
  1449. indicatorWidth: 50,
  1450. indicatorBarWidth: 20,
  1451. indicator: true,
  1452. indicatorColor: "#f2f2f2",
  1453. indicatorActiveColor: "#3c9cff",
  1454. indicatorStyle: ""
  1455. }
  1456. };
  1457. const Search = {
  1458. // search
  1459. search: {
  1460. shape: "round",
  1461. bgColor: "#f2f2f2",
  1462. placeholder: "请输入关键字",
  1463. clearabled: true,
  1464. focus: false,
  1465. showAction: true,
  1466. actionStyle: () => ({}),
  1467. actionText: "搜索",
  1468. inputAlign: "left",
  1469. inputStyle: () => ({}),
  1470. disabled: false,
  1471. borderColor: "transparent",
  1472. searchIconColor: "#909399",
  1473. searchIconSize: 22,
  1474. color: "#606266",
  1475. placeholderColor: "#909399",
  1476. searchIcon: "search",
  1477. margin: "0",
  1478. animation: false,
  1479. value: "",
  1480. maxlength: "-1",
  1481. height: 32,
  1482. label: null
  1483. }
  1484. };
  1485. const Section = {
  1486. // u-section组件
  1487. section: {
  1488. title: "",
  1489. subTitle: "更多",
  1490. right: true,
  1491. fontSize: 15,
  1492. bold: true,
  1493. color: "#303133",
  1494. subColor: "#909399",
  1495. showLine: true,
  1496. lineColor: "",
  1497. arrow: true
  1498. }
  1499. };
  1500. const Skeleton = {
  1501. // skeleton
  1502. skeleton: {
  1503. loading: true,
  1504. animate: true,
  1505. rows: 0,
  1506. rowsWidth: "100%",
  1507. rowsHeight: 18,
  1508. title: true,
  1509. titleWidth: "50%",
  1510. titleHeight: 18,
  1511. avatar: false,
  1512. avatarSize: 32,
  1513. avatarShape: "circle"
  1514. }
  1515. };
  1516. const Slider = {
  1517. // slider组件
  1518. slider: {
  1519. value: 0,
  1520. blockSize: 18,
  1521. min: 0,
  1522. max: 100,
  1523. step: 1,
  1524. activeColor: "#2979ff",
  1525. inactiveColor: "#c0c4cc",
  1526. blockColor: "#ffffff",
  1527. showValue: false,
  1528. disabled: false,
  1529. blockStyle: () => {
  1530. }
  1531. }
  1532. };
  1533. const StatusBar = {
  1534. // statusBar
  1535. statusBar: {
  1536. bgColor: "transparent"
  1537. }
  1538. };
  1539. const Steps = {
  1540. // steps组件
  1541. steps: {
  1542. direction: "row",
  1543. current: 0,
  1544. activeColor: "#3c9cff",
  1545. inactiveColor: "#969799",
  1546. activeIcon: "",
  1547. inactiveIcon: "",
  1548. dot: false
  1549. }
  1550. };
  1551. const StepsItem = {
  1552. // steps-item组件
  1553. stepsItem: {
  1554. title: "",
  1555. desc: "",
  1556. iconSize: 17,
  1557. error: false
  1558. }
  1559. };
  1560. const Sticky = {
  1561. // sticky组件
  1562. sticky: {
  1563. offsetTop: 0,
  1564. customNavHeight: 0,
  1565. disabled: false,
  1566. bgColor: "transparent",
  1567. zIndex: "",
  1568. index: ""
  1569. }
  1570. };
  1571. const Subsection = {
  1572. // subsection组件
  1573. subsection: {
  1574. list: [],
  1575. current: 0,
  1576. activeColor: "#3c9cff",
  1577. inactiveColor: "#303133",
  1578. mode: "button",
  1579. fontSize: 12,
  1580. bold: true,
  1581. bgColor: "#eeeeef",
  1582. keyName: "name"
  1583. }
  1584. };
  1585. const SwipeAction = {
  1586. // swipe-action组件
  1587. swipeAction: {
  1588. autoClose: true
  1589. }
  1590. };
  1591. const SwipeActionItem = {
  1592. // swipeActionItem 组件
  1593. swipeActionItem: {
  1594. show: false,
  1595. name: "",
  1596. disabled: false,
  1597. threshold: 20,
  1598. autoClose: true,
  1599. options: [],
  1600. duration: 300
  1601. }
  1602. };
  1603. const Swiper = {
  1604. // swiper 组件
  1605. swiper: {
  1606. list: () => [],
  1607. indicator: false,
  1608. indicatorActiveColor: "#FFFFFF",
  1609. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  1610. indicatorStyle: "",
  1611. indicatorMode: "line",
  1612. autoplay: true,
  1613. current: 0,
  1614. currentItemId: "",
  1615. interval: 3e3,
  1616. duration: 300,
  1617. circular: false,
  1618. previousMargin: 0,
  1619. nextMargin: 0,
  1620. acceleration: false,
  1621. displayMultipleItems: 1,
  1622. easingFunction: "default",
  1623. keyName: "url",
  1624. imgMode: "aspectFill",
  1625. height: 130,
  1626. bgColor: "#f3f4f6",
  1627. radius: 4,
  1628. loading: false,
  1629. showTitle: false
  1630. }
  1631. };
  1632. const SwipterIndicator = {
  1633. // swiperIndicator 组件
  1634. swiperIndicator: {
  1635. length: 0,
  1636. current: 0,
  1637. indicatorActiveColor: "",
  1638. indicatorInactiveColor: "",
  1639. indicatorMode: "line"
  1640. }
  1641. };
  1642. const Switch = {
  1643. // switch
  1644. switch: {
  1645. loading: false,
  1646. disabled: false,
  1647. size: 25,
  1648. activeColor: "#2979ff",
  1649. inactiveColor: "#ffffff",
  1650. value: false,
  1651. activeValue: true,
  1652. inactiveValue: false,
  1653. asyncChange: false,
  1654. space: 0
  1655. }
  1656. };
  1657. const Tabbar = {
  1658. // tabbar
  1659. tabbar: {
  1660. value: null,
  1661. safeAreaInsetBottom: true,
  1662. border: true,
  1663. zIndex: 1,
  1664. activeColor: "#1989fa",
  1665. inactiveColor: "#7d7e80",
  1666. fixed: true,
  1667. placeholder: true
  1668. }
  1669. };
  1670. const TabbarItem = {
  1671. //
  1672. tabbarItem: {
  1673. name: null,
  1674. icon: "",
  1675. badge: null,
  1676. dot: false,
  1677. text: "",
  1678. badgeStyle: "top: 6px;right:2px;"
  1679. }
  1680. };
  1681. const Tabs = {
  1682. //
  1683. tabs: {
  1684. duration: 300,
  1685. list: () => [],
  1686. lineColor: "#3c9cff",
  1687. activeStyle: () => ({
  1688. color: "#303133"
  1689. }),
  1690. inactiveStyle: () => ({
  1691. color: "#606266"
  1692. }),
  1693. lineWidth: 20,
  1694. lineHeight: 3,
  1695. lineBgSize: "cover",
  1696. itemStyle: () => ({
  1697. height: "44px"
  1698. }),
  1699. scrollable: true,
  1700. current: 0,
  1701. keyName: "name"
  1702. }
  1703. };
  1704. const Tag = {
  1705. // tag 组件
  1706. tag: {
  1707. type: "primary",
  1708. disabled: false,
  1709. size: "medium",
  1710. shape: "square",
  1711. text: "",
  1712. bgColor: "",
  1713. color: "",
  1714. borderColor: "",
  1715. closeColor: "#C6C7CB",
  1716. name: "",
  1717. plainFill: false,
  1718. plain: false,
  1719. closable: false,
  1720. show: true,
  1721. icon: ""
  1722. }
  1723. };
  1724. const Text = {
  1725. // text 组件
  1726. text: {
  1727. type: "",
  1728. show: true,
  1729. text: "",
  1730. prefixIcon: "",
  1731. suffixIcon: "",
  1732. mode: "",
  1733. href: "",
  1734. format: "",
  1735. call: false,
  1736. openType: "",
  1737. bold: false,
  1738. block: false,
  1739. lines: "",
  1740. color: "#303133",
  1741. size: 15,
  1742. iconStyle: () => ({
  1743. fontSize: "15px"
  1744. }),
  1745. decoration: "none",
  1746. margin: 0,
  1747. lineHeight: "",
  1748. align: "left",
  1749. wordWrap: "normal"
  1750. }
  1751. };
  1752. const Textarea = {
  1753. // textarea 组件
  1754. textarea: {
  1755. value: "",
  1756. placeholder: "",
  1757. placeholderClass: "textarea-placeholder",
  1758. placeholderStyle: "color: #c0c4cc",
  1759. height: 70,
  1760. confirmType: "done",
  1761. disabled: false,
  1762. count: false,
  1763. focus: false,
  1764. autoHeight: false,
  1765. fixed: false,
  1766. cursorSpacing: 0,
  1767. cursor: "",
  1768. showConfirmBar: true,
  1769. selectionStart: -1,
  1770. selectionEnd: -1,
  1771. adjustPosition: true,
  1772. disableDefaultPadding: false,
  1773. holdKeyboard: false,
  1774. maxlength: 140,
  1775. border: "surround",
  1776. formatter: null
  1777. }
  1778. };
  1779. const Toast = {
  1780. // toast组件
  1781. toast: {
  1782. zIndex: 10090,
  1783. loading: false,
  1784. text: "",
  1785. icon: "",
  1786. type: "",
  1787. loadingMode: "",
  1788. show: "",
  1789. overlay: false,
  1790. position: "center",
  1791. params: () => {
  1792. },
  1793. duration: 2e3,
  1794. isTab: false,
  1795. url: "",
  1796. callback: null,
  1797. back: false
  1798. }
  1799. };
  1800. const Toolbar = {
  1801. // toolbar 组件
  1802. toolbar: {
  1803. show: true,
  1804. cancelText: "取消",
  1805. confirmText: "确认",
  1806. cancelColor: "#909193",
  1807. confirmColor: "#3c9cff",
  1808. title: ""
  1809. }
  1810. };
  1811. const Tooltip = {
  1812. // tooltip 组件
  1813. tooltip: {
  1814. text: "",
  1815. copyText: "",
  1816. size: 14,
  1817. color: "#606266",
  1818. bgColor: "transparent",
  1819. direction: "top",
  1820. zIndex: 10071,
  1821. showCopy: true,
  1822. buttons: () => [],
  1823. overlay: true,
  1824. showToast: true
  1825. }
  1826. };
  1827. const Transition = {
  1828. // transition动画组件的props
  1829. transition: {
  1830. show: false,
  1831. mode: "fade",
  1832. duration: "300",
  1833. timingFunction: "ease-out"
  1834. }
  1835. };
  1836. const Upload = {
  1837. // upload组件
  1838. upload: {
  1839. accept: "image",
  1840. capture: () => ["album", "camera"],
  1841. compressed: true,
  1842. camera: "back",
  1843. maxDuration: 60,
  1844. uploadIcon: "camera-fill",
  1845. uploadIconColor: "#D3D4D6",
  1846. useBeforeRead: false,
  1847. previewFullImage: true,
  1848. maxCount: 52,
  1849. disabled: false,
  1850. imageMode: "aspectFill",
  1851. name: "",
  1852. sizeType: () => ["original", "compressed"],
  1853. multiple: false,
  1854. deletable: true,
  1855. maxSize: Number.MAX_VALUE,
  1856. fileList: () => [],
  1857. uploadText: "",
  1858. width: 80,
  1859. height: 80,
  1860. previewImage: true
  1861. }
  1862. };
  1863. const drawer = {
  1864. // 抽屉组件
  1865. drawer: {
  1866. // 是否显示
  1867. show: false,
  1868. // 点击遮罩是否关闭
  1869. mask: true,
  1870. // // 是否显示关闭按钮
  1871. // closeBtn:true,
  1872. // 抽屉宽度
  1873. width: "40%",
  1874. // 抽屉位置
  1875. placement: "left",
  1876. // 权重
  1877. zIndex: 100
  1878. }
  1879. };
  1880. const props$y = {
  1881. ...ActionSheet,
  1882. ...Album,
  1883. ...Alert,
  1884. ...Avatar,
  1885. ...AvatarGroup,
  1886. ...Backtop,
  1887. ...Badge,
  1888. ...Button,
  1889. ...Calendar,
  1890. ...CarKeyboard,
  1891. ...Cell,
  1892. ...CellGroup,
  1893. ...Checkbox,
  1894. ...CheckboxGroup,
  1895. ...CircleProgress,
  1896. ...Code,
  1897. ...CodeInput,
  1898. ...Col,
  1899. ...Collapse,
  1900. ...CollapseItem,
  1901. ...ColumnNotice,
  1902. ...CountDown,
  1903. ...CountTo,
  1904. ...DatetimePicker,
  1905. ...Divider,
  1906. ...Empty,
  1907. ...Form,
  1908. ...GormItem,
  1909. ...Gap,
  1910. ...Grid,
  1911. ...GridItem,
  1912. ...Icon,
  1913. ...Image$1,
  1914. ...IndexAnchor,
  1915. ...IndexList,
  1916. ...Input,
  1917. ...Keyboard,
  1918. ...Line,
  1919. ...LineProgress,
  1920. ...Link,
  1921. ...List,
  1922. ...ListItem,
  1923. ...LoadingIcon,
  1924. ...LoadingPage,
  1925. ...Loadmore,
  1926. ...Modal,
  1927. ...Navbar,
  1928. ...NoNetwork,
  1929. ...NoticeBar,
  1930. ...Notify,
  1931. ...NumberBox,
  1932. ...NumberKeyboard,
  1933. ...Overlay,
  1934. ...Parse,
  1935. ...Picker,
  1936. ...Popup,
  1937. ...Radio,
  1938. ...RadioGroup,
  1939. ...Rate,
  1940. ...ReadMore,
  1941. ...Row,
  1942. ...RowNotice,
  1943. ...ScrollList,
  1944. ...Search,
  1945. ...Section,
  1946. ...Skeleton,
  1947. ...Slider,
  1948. ...StatusBar,
  1949. ...Steps,
  1950. ...StepsItem,
  1951. ...Sticky,
  1952. ...Subsection,
  1953. ...SwipeAction,
  1954. ...SwipeActionItem,
  1955. ...Swiper,
  1956. ...SwipterIndicator,
  1957. ...Switch,
  1958. ...Tabbar,
  1959. ...TabbarItem,
  1960. ...Tabs,
  1961. ...Tag,
  1962. ...Text,
  1963. ...Textarea,
  1964. ...Toast,
  1965. ...Toolbar,
  1966. ...Tooltip,
  1967. ...Transition,
  1968. ...Upload,
  1969. ...drawer
  1970. };
  1971. const props$x = {
  1972. props: {
  1973. // 是否显示组件
  1974. show: {
  1975. type: Boolean,
  1976. default: props$y.loadingIcon.show
  1977. },
  1978. // 颜色
  1979. color: {
  1980. type: String,
  1981. default: props$y.loadingIcon.color
  1982. },
  1983. // 提示文字颜色
  1984. textColor: {
  1985. type: String,
  1986. default: props$y.loadingIcon.textColor
  1987. },
  1988. // 文字和图标是否垂直排列
  1989. vertical: {
  1990. type: Boolean,
  1991. default: props$y.loadingIcon.vertical
  1992. },
  1993. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  1994. mode: {
  1995. type: String,
  1996. default: props$y.loadingIcon.mode
  1997. },
  1998. // 图标大小,单位默认px
  1999. size: {
  2000. type: [String, Number],
  2001. default: props$y.loadingIcon.size
  2002. },
  2003. // 文字大小
  2004. textSize: {
  2005. type: [String, Number],
  2006. default: props$y.loadingIcon.textSize
  2007. },
  2008. // 文字内容
  2009. text: {
  2010. type: [String, Number],
  2011. default: props$y.loadingIcon.text
  2012. },
  2013. // 动画模式
  2014. timingFunction: {
  2015. type: String,
  2016. default: props$y.loadingIcon.timingFunction
  2017. },
  2018. // 动画执行周期时间
  2019. duration: {
  2020. type: [String, Number],
  2021. default: props$y.loadingIcon.duration
  2022. },
  2023. // mode=circle时的暗边颜色
  2024. inactiveColor: {
  2025. type: String,
  2026. default: props$y.loadingIcon.inactiveColor
  2027. }
  2028. }
  2029. };
  2030. const mpMixin = {};
  2031. const mixin = {
  2032. // 定义每个组件都可能需要用到的外部样式以及类名
  2033. props: {
  2034. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  2035. customStyle: {
  2036. type: [Object, String],
  2037. default: () => ({})
  2038. },
  2039. customClass: {
  2040. type: String,
  2041. default: ""
  2042. },
  2043. // 跳转的页面路径
  2044. url: {
  2045. type: String,
  2046. default: ""
  2047. },
  2048. // 页面跳转的类型
  2049. linkType: {
  2050. type: String,
  2051. default: "navigateTo"
  2052. }
  2053. },
  2054. data() {
  2055. return {};
  2056. },
  2057. onLoad() {
  2058. this.$u.getRect = this.$uGetRect;
  2059. },
  2060. created() {
  2061. this.$u.getRect = this.$uGetRect;
  2062. },
  2063. computed: {
  2064. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  2065. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  2066. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  2067. $u() {
  2068. return uni.$u.deepMerge(uni.$u, {
  2069. props: void 0,
  2070. http: void 0,
  2071. mixin: void 0
  2072. });
  2073. },
  2074. /**
  2075. * 生成bem规则类名
  2076. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  2077. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  2078. * @param {String} name 组件名称
  2079. * @param {Array} fixed 一直会存在的类名
  2080. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  2081. * @returns {Array|string}
  2082. */
  2083. bem() {
  2084. return function(name, fixed, change) {
  2085. const prefix = `u-${name}--`;
  2086. const classes = {};
  2087. if (fixed) {
  2088. fixed.map((item) => {
  2089. classes[prefix + this[item]] = true;
  2090. });
  2091. }
  2092. if (change) {
  2093. change.map((item) => {
  2094. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  2095. });
  2096. }
  2097. return Object.keys(classes);
  2098. };
  2099. }
  2100. },
  2101. methods: {
  2102. // 跳转某一个页面
  2103. openPage(urlKey = "url") {
  2104. const url2 = this[urlKey];
  2105. if (url2) {
  2106. this.$u.route({ type: this.linkType, url: url2 });
  2107. }
  2108. },
  2109. // 查询节点信息
  2110. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  2111. // 解决办法为在组件根部再套一个没有任何作用的view元素
  2112. $uGetRect(selector, all) {
  2113. return new Promise((resolve) => {
  2114. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  2115. if (all && Array.isArray(rect) && rect.length) {
  2116. resolve(rect);
  2117. }
  2118. if (!all && rect) {
  2119. resolve(rect);
  2120. }
  2121. }).exec();
  2122. });
  2123. },
  2124. getParentData(parentName = "") {
  2125. if (!this.parent)
  2126. this.parent = {};
  2127. this.parent = uni.$u.$parent.call(this, parentName);
  2128. if (this.parent.children) {
  2129. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  2130. }
  2131. if (this.parent && this.parentData) {
  2132. Object.keys(this.parentData).map((key) => {
  2133. this.parentData[key] = this.parent[key];
  2134. });
  2135. }
  2136. },
  2137. // 阻止事件冒泡
  2138. preventEvent(e) {
  2139. e && typeof e.stopPropagation === "function" && e.stopPropagation();
  2140. },
  2141. // 空操作
  2142. noop(e) {
  2143. this.preventEvent(e);
  2144. }
  2145. },
  2146. onReachBottom() {
  2147. uni.$emit("uOnReachBottom");
  2148. },
  2149. beforeDestroy() {
  2150. if (this.parent && uni.$u.test.array(this.parent.children)) {
  2151. const childrenList = this.parent.children;
  2152. childrenList.map((child, index2) => {
  2153. if (child === this) {
  2154. childrenList.splice(index2, 1);
  2155. }
  2156. });
  2157. }
  2158. }
  2159. };
  2160. const _sfc_main$2w = {
  2161. name: "u-loading-icon",
  2162. mixins: [mpMixin, mixin, props$x],
  2163. data() {
  2164. return {
  2165. // Array.form可以通过一个伪数组对象创建指定长度的数组
  2166. // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
  2167. array12: Array.from({
  2168. length: 12
  2169. }),
  2170. // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
  2171. // 在iOS nvue上,则会一开始默认执行两个周期的动画
  2172. aniAngel: 360,
  2173. // 动画旋转角度
  2174. webviewHide: false,
  2175. // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
  2176. loading: false
  2177. // 是否运行中,针对nvue使用
  2178. };
  2179. },
  2180. computed: {
  2181. // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
  2182. // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
  2183. // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
  2184. otherBorderColor() {
  2185. const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
  2186. if (this.mode === "circle") {
  2187. return this.inactiveColor ? this.inactiveColor : lightColor;
  2188. } else {
  2189. return "transparent";
  2190. }
  2191. }
  2192. },
  2193. watch: {
  2194. show(n) {
  2195. }
  2196. },
  2197. mounted() {
  2198. this.init();
  2199. },
  2200. methods: {
  2201. init() {
  2202. setTimeout(() => {
  2203. this.show && this.addEventListenerToWebview();
  2204. }, 20);
  2205. },
  2206. // 监听webview的显示与隐藏
  2207. addEventListenerToWebview() {
  2208. const pages2 = getCurrentPages();
  2209. const page2 = pages2[pages2.length - 1];
  2210. const currentWebview = page2.$getAppWebview();
  2211. currentWebview.addEventListener("hide", () => {
  2212. this.webviewHide = true;
  2213. });
  2214. currentWebview.addEventListener("show", () => {
  2215. this.webviewHide = false;
  2216. });
  2217. }
  2218. }
  2219. };
  2220. function _sfc_render$2J(_ctx, _cache, $props, $setup, $data, $options) {
  2221. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  2222. "view",
  2223. {
  2224. key: 0,
  2225. class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
  2226. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  2227. },
  2228. [
  2229. !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
  2230. "view",
  2231. {
  2232. key: 0,
  2233. class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
  2234. ref: "ani",
  2235. style: vue.normalizeStyle({
  2236. color: _ctx.color,
  2237. width: _ctx.$u.addUnit(_ctx.size),
  2238. height: _ctx.$u.addUnit(_ctx.size),
  2239. borderTopColor: _ctx.color,
  2240. borderBottomColor: $options.otherBorderColor,
  2241. borderLeftColor: $options.otherBorderColor,
  2242. borderRightColor: $options.otherBorderColor,
  2243. "animation-duration": `${_ctx.duration}ms`,
  2244. "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
  2245. })
  2246. },
  2247. [
  2248. _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
  2249. vue.Fragment,
  2250. { key: 0 },
  2251. vue.renderList($data.array12, (item, index2) => {
  2252. return vue.openBlock(), vue.createElementBlock("view", {
  2253. key: index2,
  2254. class: "u-loading-icon__dot"
  2255. });
  2256. }),
  2257. 128
  2258. /* KEYED_FRAGMENT */
  2259. )) : vue.createCommentVNode("v-if", true)
  2260. ],
  2261. 6
  2262. /* CLASS, STYLE */
  2263. )) : vue.createCommentVNode("v-if", true),
  2264. _ctx.text ? (vue.openBlock(), vue.createElementBlock(
  2265. "text",
  2266. {
  2267. key: 1,
  2268. class: "u-loading-icon__text",
  2269. style: vue.normalizeStyle({
  2270. fontSize: _ctx.$u.addUnit(_ctx.textSize),
  2271. color: _ctx.textColor
  2272. })
  2273. },
  2274. vue.toDisplayString(_ctx.text),
  2275. 5
  2276. /* TEXT, STYLE */
  2277. )) : vue.createCommentVNode("v-if", true)
  2278. ],
  2279. 6
  2280. /* CLASS, STYLE */
  2281. )) : vue.createCommentVNode("v-if", true);
  2282. }
  2283. const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$2w, [["render", _sfc_render$2J], ["__scopeId", "data-v-2af81691"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
  2284. const props$w = {
  2285. props: {
  2286. // 轮播的长度
  2287. length: {
  2288. type: [String, Number],
  2289. default: props$y.swiperIndicator.length
  2290. },
  2291. // 当前处于活动状态的轮播的索引
  2292. current: {
  2293. type: [String, Number],
  2294. default: props$y.swiperIndicator.current
  2295. },
  2296. // 指示器非激活颜色
  2297. indicatorActiveColor: {
  2298. type: String,
  2299. default: props$y.swiperIndicator.indicatorActiveColor
  2300. },
  2301. // 指示器的激活颜色
  2302. indicatorInactiveColor: {
  2303. type: String,
  2304. default: props$y.swiperIndicator.indicatorInactiveColor
  2305. },
  2306. // 指示器模式,line-线型,dot-点型
  2307. indicatorMode: {
  2308. type: String,
  2309. default: props$y.swiperIndicator.indicatorMode
  2310. }
  2311. }
  2312. };
  2313. const _sfc_main$2v = {
  2314. name: "u-swiper-indicator",
  2315. mixins: [mpMixin, mixin, props$w],
  2316. data() {
  2317. return {
  2318. lineWidth: 22
  2319. };
  2320. },
  2321. computed: {
  2322. // 指示器为线型的样式
  2323. lineStyle() {
  2324. let style = {};
  2325. style.width = uni.$u.addUnit(this.lineWidth);
  2326. style.transform = `translateX(${uni.$u.addUnit(this.current * this.lineWidth)})`;
  2327. style.backgroundColor = this.indicatorActiveColor;
  2328. return style;
  2329. },
  2330. // 指示器为点型的样式
  2331. dotStyle() {
  2332. return (index2) => {
  2333. let style = {};
  2334. style.backgroundColor = index2 === this.current ? this.indicatorActiveColor : this.indicatorInactiveColor;
  2335. return style;
  2336. };
  2337. }
  2338. }
  2339. };
  2340. function _sfc_render$2I(_ctx, _cache, $props, $setup, $data, $options) {
  2341. return vue.openBlock(), vue.createElementBlock("view", { class: "u-swiper-indicator" }, [
  2342. _ctx.indicatorMode === "line" ? (vue.openBlock(), vue.createElementBlock(
  2343. "view",
  2344. {
  2345. key: 0,
  2346. class: vue.normalizeClass(["u-swiper-indicator__wrapper", [`u-swiper-indicator__wrapper--${_ctx.indicatorMode}`]]),
  2347. style: vue.normalizeStyle({
  2348. width: _ctx.$u.addUnit($data.lineWidth * _ctx.length),
  2349. backgroundColor: _ctx.indicatorInactiveColor
  2350. })
  2351. },
  2352. [
  2353. vue.createElementVNode(
  2354. "view",
  2355. {
  2356. class: "u-swiper-indicator__wrapper--line__bar",
  2357. style: vue.normalizeStyle([$options.lineStyle])
  2358. },
  2359. null,
  2360. 4
  2361. /* STYLE */
  2362. )
  2363. ],
  2364. 6
  2365. /* CLASS, STYLE */
  2366. )) : vue.createCommentVNode("v-if", true),
  2367. _ctx.indicatorMode === "dot" ? (vue.openBlock(), vue.createElementBlock("view", {
  2368. key: 1,
  2369. class: "u-swiper-indicator__wrapper"
  2370. }, [
  2371. (vue.openBlock(true), vue.createElementBlock(
  2372. vue.Fragment,
  2373. null,
  2374. vue.renderList(_ctx.length, (item, index2) => {
  2375. return vue.openBlock(), vue.createElementBlock(
  2376. "view",
  2377. {
  2378. class: vue.normalizeClass(["u-swiper-indicator__wrapper__dot", [index2 === _ctx.current && "u-swiper-indicator__wrapper__dot--active"]]),
  2379. key: index2,
  2380. style: vue.normalizeStyle([$options.dotStyle(index2)])
  2381. },
  2382. null,
  2383. 6
  2384. /* CLASS, STYLE */
  2385. );
  2386. }),
  2387. 128
  2388. /* KEYED_FRAGMENT */
  2389. ))
  2390. ])) : vue.createCommentVNode("v-if", true)
  2391. ]);
  2392. }
  2393. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$2v, [["render", _sfc_render$2I], ["__scopeId", "data-v-7b7c7ea6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue"]]);
  2394. const props$v = {
  2395. props: {
  2396. // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
  2397. list: {
  2398. type: Array,
  2399. default: props$y.swiper.list
  2400. },
  2401. // 是否显示面板指示器
  2402. indicator: {
  2403. type: Boolean,
  2404. default: props$y.swiper.indicator
  2405. },
  2406. // 指示器非激活颜色
  2407. indicatorActiveColor: {
  2408. type: String,
  2409. default: props$y.swiper.indicatorActiveColor
  2410. },
  2411. // 指示器的激活颜色
  2412. indicatorInactiveColor: {
  2413. type: String,
  2414. default: props$y.swiper.indicatorInactiveColor
  2415. },
  2416. // 指示器样式,可通过bottom,left,right进行定位
  2417. indicatorStyle: {
  2418. type: [String, Object],
  2419. default: props$y.swiper.indicatorStyle
  2420. },
  2421. // 指示器模式,line-线型,dot-点型
  2422. indicatorMode: {
  2423. type: String,
  2424. default: props$y.swiper.indicatorMode
  2425. },
  2426. // 是否自动切换
  2427. autoplay: {
  2428. type: Boolean,
  2429. default: props$y.swiper.autoplay
  2430. },
  2431. // 当前所在滑块的 index
  2432. current: {
  2433. type: [String, Number],
  2434. default: props$y.swiper.current
  2435. },
  2436. // 当前所在滑块的 item-id ,不能与 current 被同时指定
  2437. currentItemId: {
  2438. type: String,
  2439. default: props$y.swiper.currentItemId
  2440. },
  2441. // 滑块自动切换时间间隔
  2442. interval: {
  2443. type: [String, Number],
  2444. default: props$y.swiper.interval
  2445. },
  2446. // 滑块切换过程所需时间
  2447. duration: {
  2448. type: [String, Number],
  2449. default: props$y.swiper.duration
  2450. },
  2451. // 播放到末尾后是否重新回到开头
  2452. circular: {
  2453. type: Boolean,
  2454. default: props$y.swiper.circular
  2455. },
  2456. // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
  2457. previousMargin: {
  2458. type: [String, Number],
  2459. default: props$y.swiper.previousMargin
  2460. },
  2461. // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
  2462. nextMargin: {
  2463. type: [String, Number],
  2464. default: props$y.swiper.nextMargin
  2465. },
  2466. // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
  2467. acceleration: {
  2468. type: Boolean,
  2469. default: props$y.swiper.acceleration
  2470. },
  2471. // 同时显示的滑块数量,nvue、支付宝小程序不支持
  2472. displayMultipleItems: {
  2473. type: Number,
  2474. default: props$y.swiper.displayMultipleItems
  2475. },
  2476. // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
  2477. // 只对微信小程序有效
  2478. easingFunction: {
  2479. type: String,
  2480. default: props$y.swiper.easingFunction
  2481. },
  2482. // list数组中指定对象的目标属性名
  2483. keyName: {
  2484. type: String,
  2485. default: props$y.swiper.keyName
  2486. },
  2487. // 图片的裁剪模式
  2488. imgMode: {
  2489. type: String,
  2490. default: props$y.swiper.imgMode
  2491. },
  2492. // 组件高度
  2493. height: {
  2494. type: [String, Number],
  2495. default: props$y.swiper.height
  2496. },
  2497. // 背景颜色
  2498. bgColor: {
  2499. type: String,
  2500. default: props$y.swiper.bgColor
  2501. },
  2502. // 组件圆角,数值或带单位的字符串
  2503. radius: {
  2504. type: [String, Number],
  2505. default: props$y.swiper.radius
  2506. },
  2507. // 是否加载中
  2508. loading: {
  2509. type: Boolean,
  2510. default: props$y.swiper.loading
  2511. },
  2512. // 是否显示标题,要求数组对象中有title属性
  2513. showTitle: {
  2514. type: Boolean,
  2515. default: props$y.swiper.showTitle
  2516. }
  2517. }
  2518. };
  2519. const _sfc_main$2u = {
  2520. name: "u-swiper",
  2521. mixins: [mpMixin, mixin, props$v],
  2522. data() {
  2523. return {
  2524. currentIndex: 0
  2525. };
  2526. },
  2527. watch: {
  2528. current(val, preVal) {
  2529. if (val === preVal)
  2530. return;
  2531. this.currentIndex = val;
  2532. }
  2533. },
  2534. computed: {
  2535. itemStyle() {
  2536. return (index2) => {
  2537. const style = {};
  2538. if (this.nextMargin && this.previousMargin) {
  2539. style.borderRadius = uni.$u.addUnit(this.radius);
  2540. if (index2 !== this.currentIndex)
  2541. style.transform = "scale(0.92)";
  2542. }
  2543. return style;
  2544. };
  2545. }
  2546. },
  2547. methods: {
  2548. getItemType(item) {
  2549. if (typeof item === "string")
  2550. return uni.$u.test.video(this.getSource(item)) ? "video" : "image";
  2551. if (typeof item === "object" && this.keyName) {
  2552. if (!item.type)
  2553. return uni.$u.test.video(this.getSource(item)) ? "video" : "image";
  2554. if (item.type === "image")
  2555. return "image";
  2556. if (item.type === "video")
  2557. return "video";
  2558. return "image";
  2559. }
  2560. },
  2561. // 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName
  2562. getSource(item) {
  2563. if (typeof item === "string")
  2564. return item;
  2565. if (typeof item === "object" && this.keyName)
  2566. return item[this.keyName];
  2567. else
  2568. uni.$u.error("请按格式传递列表参数");
  2569. return "";
  2570. },
  2571. // 轮播切换事件
  2572. change(e) {
  2573. const {
  2574. current
  2575. } = e.detail;
  2576. this.pauseVideo(this.currentIndex);
  2577. this.currentIndex = current;
  2578. this.$emit("change", e.detail);
  2579. },
  2580. // 切换轮播时,暂停视频播放
  2581. pauseVideo(index2) {
  2582. const lastItem = this.getSource(this.list[index2]);
  2583. if (uni.$u.test.video(lastItem)) {
  2584. const video2 = uni.createVideoContext(`video-${index2}`, this);
  2585. video2.pause();
  2586. }
  2587. },
  2588. // 当一个轮播item为视频时,获取它的视频海报
  2589. getPoster(item) {
  2590. return typeof item === "object" && item.poster ? item.poster : "";
  2591. },
  2592. // 点击某个item
  2593. clickHandler(index2) {
  2594. this.$emit("click", index2);
  2595. }
  2596. }
  2597. };
  2598. function _sfc_render$2H(_ctx, _cache, $props, $setup, $data, $options) {
  2599. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
  2600. const _component_u_swiper_indicator = resolveEasycom(vue.resolveDynamicComponent("u-swiper-indicator"), __easycom_1$7);
  2601. return vue.openBlock(), vue.createElementBlock(
  2602. "view",
  2603. {
  2604. class: "u-swiper",
  2605. style: vue.normalizeStyle({
  2606. backgroundColor: _ctx.bgColor,
  2607. height: _ctx.$u.addUnit(_ctx.height),
  2608. borderRadius: _ctx.$u.addUnit(_ctx.radius)
  2609. })
  2610. },
  2611. [
  2612. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  2613. key: 0,
  2614. class: "u-swiper__loading"
  2615. }, [
  2616. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  2617. ])) : (vue.openBlock(), vue.createElementBlock("swiper", {
  2618. key: 1,
  2619. class: "u-swiper__wrapper",
  2620. style: vue.normalizeStyle({
  2621. height: _ctx.$u.addUnit(_ctx.height)
  2622. }),
  2623. onChange: _cache[0] || (_cache[0] = (...args) => $options.change && $options.change(...args)),
  2624. circular: _ctx.circular,
  2625. interval: _ctx.interval,
  2626. duration: _ctx.duration,
  2627. autoplay: _ctx.autoplay,
  2628. current: _ctx.current,
  2629. currentItemId: _ctx.currentItemId,
  2630. previousMargin: _ctx.$u.addUnit(_ctx.previousMargin),
  2631. nextMargin: _ctx.$u.addUnit(_ctx.nextMargin),
  2632. acceleration: _ctx.acceleration,
  2633. displayMultipleItems: _ctx.displayMultipleItems,
  2634. easingFunction: _ctx.easingFunction
  2635. }, [
  2636. (vue.openBlock(true), vue.createElementBlock(
  2637. vue.Fragment,
  2638. null,
  2639. vue.renderList(_ctx.list, (item, index2) => {
  2640. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  2641. class: "u-swiper__wrapper__item",
  2642. key: index2
  2643. }, [
  2644. vue.createElementVNode(
  2645. "view",
  2646. {
  2647. class: "u-swiper__wrapper__item__wrapper",
  2648. style: vue.normalizeStyle([$options.itemStyle(index2)])
  2649. },
  2650. [
  2651. vue.createCommentVNode(" 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 "),
  2652. $options.getItemType(item) === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  2653. key: 0,
  2654. class: "u-swiper__wrapper__item__wrapper__image",
  2655. src: $options.getSource(item),
  2656. mode: _ctx.imgMode,
  2657. onClick: ($event) => $options.clickHandler(index2),
  2658. style: vue.normalizeStyle({
  2659. height: _ctx.$u.addUnit(_ctx.height),
  2660. borderRadius: _ctx.$u.addUnit(_ctx.radius)
  2661. })
  2662. }, null, 12, ["src", "mode", "onClick"])) : vue.createCommentVNode("v-if", true),
  2663. $options.getItemType(item) === "video" ? (vue.openBlock(), vue.createElementBlock("video", {
  2664. key: 1,
  2665. class: "u-swiper__wrapper__item__wrapper__video",
  2666. id: `video-${index2}`,
  2667. "enable-progress-gesture": false,
  2668. src: $options.getSource(item),
  2669. poster: $options.getPoster(item),
  2670. title: _ctx.showTitle && _ctx.$u.test.object(item) && item.title ? item.title : "",
  2671. style: vue.normalizeStyle({
  2672. height: _ctx.$u.addUnit(_ctx.height)
  2673. }),
  2674. controls: "",
  2675. onClick: ($event) => $options.clickHandler(index2)
  2676. }, null, 12, ["id", "src", "poster", "title", "onClick"])) : vue.createCommentVNode("v-if", true),
  2677. _ctx.showTitle && _ctx.$u.test.object(item) && item.title && _ctx.$u.test.image($options.getSource(item)) ? (vue.openBlock(), vue.createElementBlock(
  2678. "text",
  2679. {
  2680. key: 2,
  2681. class: "u-swiper__wrapper__item__wrapper__title u-line-1"
  2682. },
  2683. vue.toDisplayString(item.title),
  2684. 1
  2685. /* TEXT */
  2686. )) : vue.createCommentVNode("v-if", true)
  2687. ],
  2688. 4
  2689. /* STYLE */
  2690. )
  2691. ]);
  2692. }),
  2693. 128
  2694. /* KEYED_FRAGMENT */
  2695. ))
  2696. ], 44, ["circular", "interval", "duration", "autoplay", "current", "currentItemId", "previousMargin", "nextMargin", "acceleration", "displayMultipleItems", "easingFunction"])),
  2697. vue.createElementVNode(
  2698. "view",
  2699. {
  2700. class: "u-swiper__indicator",
  2701. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.indicatorStyle)])
  2702. },
  2703. [
  2704. vue.renderSlot(_ctx.$slots, "indicator", {}, () => [
  2705. !_ctx.loading && _ctx.indicator && !_ctx.showTitle ? (vue.openBlock(), vue.createBlock(_component_u_swiper_indicator, {
  2706. key: 0,
  2707. indicatorActiveColor: _ctx.indicatorActiveColor,
  2708. indicatorInactiveColor: _ctx.indicatorInactiveColor,
  2709. length: _ctx.list.length,
  2710. current: $data.currentIndex,
  2711. indicatorMode: _ctx.indicatorMode
  2712. }, null, 8, ["indicatorActiveColor", "indicatorInactiveColor", "length", "current", "indicatorMode"])) : vue.createCommentVNode("v-if", true)
  2713. ], true)
  2714. ],
  2715. 4
  2716. /* STYLE */
  2717. )
  2718. ],
  2719. 4
  2720. /* STYLE */
  2721. );
  2722. }
  2723. const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$2u, [["render", _sfc_render$2H], ["__scopeId", "data-v-4e7d0c90"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-swiper/u-swiper.vue"]]);
  2724. let request$m = new Request$1().http;
  2725. function getCitys(data) {
  2726. return request$m("/app/common/getCitys", data, "GET");
  2727. }
  2728. function getTlsSig(data) {
  2729. return request$m("/app/common/getTlsSig", data, "GET");
  2730. }
  2731. function getDictByKey(data) {
  2732. return request$m("/app/common/getDictByKey", data, "GET");
  2733. }
  2734. function getConfigByKey(data) {
  2735. return request$m("/app/common/getConfigByKey", data, "GET");
  2736. }
  2737. function getHospitalList$1(data) {
  2738. return request$m("/app/common/getHospitalList", data, "GET");
  2739. }
  2740. function getDepartmentList$1(data) {
  2741. return request$m("/app/common/getDepartmentList", data, "GET");
  2742. }
  2743. let request$l = new Request$1().http;
  2744. function getPackagCateList(data) {
  2745. return request$l("/app/package/getPackagCateList", data, "GET");
  2746. }
  2747. function getPackageList(data) {
  2748. return request$l("/app/package/getPackageList", data, "GET");
  2749. }
  2750. function getPackageById(data) {
  2751. return request$l("/app/package/getPackageById", data, "GET");
  2752. }
  2753. function getPackageDoctorList(data) {
  2754. return request$l("/app/package/getPackageDoctorList", data, "GET");
  2755. }
  2756. let request$k = new Request$1().http;
  2757. function getDoctorArticleCateList(data) {
  2758. return request$k("/app/doctorArticle/getDoctorArticleCateList", data, "GET");
  2759. }
  2760. function getDoctorArticleList(data) {
  2761. return request$k("/app/doctorArticle/getDoctorArticleList", data, "GET");
  2762. }
  2763. function getDoctorArticleById(data) {
  2764. return request$k("/app/doctorArticle/getDoctorArticleById", data, "GET");
  2765. }
  2766. let request$j = new Request$1().http;
  2767. function getMyDoctorList(data) {
  2768. return request$j("/app/doctor/getMyDoctorList", data, "GET");
  2769. }
  2770. function getDoctorDetails(data) {
  2771. return request$j("/app/doctor/getDoctorDetails", data, "GET");
  2772. }
  2773. function getDoctorPingList(data) {
  2774. return request$j("/app/doctor/getDoctorPingList", data, "GET");
  2775. }
  2776. function getDoctorList(data) {
  2777. return request$j("/app/doctor/getDoctorList", data, "GET");
  2778. }
  2779. function checkFollow(data) {
  2780. return request$j("/app/doctor/checkFollow", data, "GET");
  2781. }
  2782. function doFollow$1(data) {
  2783. return request$j("/app/doctor/doFollow", data, "POST", "application/json;charset=UTF-8");
  2784. }
  2785. let request$i = new Request$1().http;
  2786. function getArticleList(data) {
  2787. return request$i("/app/article/getArticleList", data, "GET");
  2788. }
  2789. function getArticleById(data) {
  2790. return request$i("/app/article/getArticleById", data, "GET");
  2791. }
  2792. function getArticleCateList$1(data) {
  2793. return request$i("/app/article/getArticleCateList", data, "GET");
  2794. }
  2795. let request$h = new Request$1().http;
  2796. function getAdvList(data) {
  2797. return request$h("/app/adv/getAdvList", data, "GET");
  2798. }
  2799. let request$g = new Request$1().http;
  2800. function getDepartmentList(data) {
  2801. return request$g("/app/department/getDepartmentList", data, "GET");
  2802. }
  2803. const _sfc_main$2t = {
  2804. data() {
  2805. return {
  2806. layouts: [],
  2807. yangshengs: [
  2808. { id: "1", title: "药膳食疗", page: "/pages_index/medicatedFoodList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3cfbd47911cf4753aa9497eac500728d.png" },
  2809. { id: "2", title: "经络穴位", page: "/pages_index/vesselList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e93536a9dc1a4f8ca09545097b12fdea.png" },
  2810. { id: "3", title: "问答专区", page: "/pages_index/questionsList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e896972bd56f4e358188af36f2c5af42.png" },
  2811. { id: "4", title: "疾病", page: "/pages_index/diseaseList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d6f1851cccae414b8baf2ba07782f91b.png" },
  2812. { id: "5", title: "中药图解", page: "/pages_index/chineseMedicineList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ff43572d0d004285b5a3b0ef2663c471.png" },
  2813. { id: "6", title: "名方今用", page: "/pages_index/famousPrescribeList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45db770e58c34963b0d2ba24a958b617.png" },
  2814. { id: "7", title: "康复医案", page: "/pages_doctor/doctorArticleList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e793942797b24035b51f94d894bdfa0b.png" },
  2815. { id: "8", title: "更多", page: "", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3ee6160289914ee4a8126573fe4dc0ae.png" }
  2816. ],
  2817. isTop: false,
  2818. titleColor: "#2A2B2E",
  2819. descColor: "#626468",
  2820. top: 0,
  2821. // 状态栏的高度
  2822. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  2823. advImgs: [],
  2824. doctors: [],
  2825. advs: [],
  2826. articles: [],
  2827. depts: [],
  2828. doctocArticles: [],
  2829. hosLevelOptions: [],
  2830. packages: []
  2831. };
  2832. },
  2833. onLoad() {
  2834. this.getDictByKey("sys_hospital_level");
  2835. uni.$on("refreshMsgCount", () => {
  2836. try {
  2837. let totalUnreadCount = uni.$TUIKit.getTotalUnreadMessageCount();
  2838. if (totalUnreadCount > 0) {
  2839. try {
  2840. uni.setTabBarBadge({
  2841. //显示数字
  2842. index: 1,
  2843. //tabbar下标
  2844. text: totalUnreadCount + ""
  2845. //数字
  2846. });
  2847. } catch (e) {
  2848. }
  2849. } else {
  2850. try {
  2851. uni.hideTabBarRedDot({
  2852. //隐藏红点
  2853. index: 1
  2854. //tabbar下标
  2855. });
  2856. } catch (e) {
  2857. }
  2858. }
  2859. } catch (e) {
  2860. }
  2861. });
  2862. },
  2863. onShow() {
  2864. this.getDoctorList();
  2865. this.getArticleList();
  2866. this.getAdvList();
  2867. this.getDepartmentList();
  2868. this.getDoctorArticleList();
  2869. this.getPackageList();
  2870. this.getConfigByKey("his.appShow");
  2871. uni.$emit("refreshMsgCount");
  2872. },
  2873. onPageScroll(e) {
  2874. this.top = e.scrollTop;
  2875. },
  2876. //发送给朋友
  2877. onShareAppMessage(res) {
  2878. if (this.$isLogin()) {
  2879. return {
  2880. title: "御君方互联网医院",
  2881. path: "/pages/index/index",
  2882. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  2883. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  2884. };
  2885. }
  2886. },
  2887. //分享到朋友圈
  2888. onShareTimeline(res) {
  2889. if (this.utils.isLogin()) {
  2890. return {
  2891. title: "御君方互联网医院",
  2892. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  2893. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  2894. };
  2895. }
  2896. },
  2897. computed: {
  2898. bg: function() {
  2899. var top = this.top / 120;
  2900. formatAppLog("log", "at pages/index/index.vue:371", top);
  2901. if (top > 0) {
  2902. this.isTop = true;
  2903. this.titleColor = "#fff";
  2904. this.descColor = "#fff";
  2905. } else {
  2906. this.isTop = false;
  2907. this.titleColor = "#2A2B2E";
  2908. this.descColor = "#626468";
  2909. }
  2910. return "rgba(195,154,88, " + top + ")";
  2911. }
  2912. },
  2913. methods: {
  2914. dev() {
  2915. uni.showToast({
  2916. icon: "none",
  2917. title: "敬请期待"
  2918. });
  2919. },
  2920. getConfigByKey(key) {
  2921. var that = this;
  2922. var data = { key };
  2923. getConfigByKey(data).then(
  2924. (res) => {
  2925. if (res.code == 200) {
  2926. this.layouts = JSON.parse(res.data);
  2927. this.layouts.sort((a, b) => a.sort - b.sort);
  2928. formatAppLog("log", "at pages/index/index.vue:400", this.layouts);
  2929. this.layouts.forEach(function(element) {
  2930. if (element.id == "4") {
  2931. if (!element.isShow) {
  2932. that.yangshengs.splice(6, 1);
  2933. }
  2934. }
  2935. });
  2936. }
  2937. },
  2938. (rej) => {
  2939. }
  2940. );
  2941. },
  2942. yangshengClick(item) {
  2943. if (item.page == "") {
  2944. uni.showToast({
  2945. icon: "none",
  2946. title: "暂无更多"
  2947. });
  2948. return;
  2949. }
  2950. uni.navigateTo({
  2951. url: item.page
  2952. });
  2953. },
  2954. switchTab(url2) {
  2955. uni.switchTab({
  2956. url: url2
  2957. });
  2958. },
  2959. navToMiniProgram() {
  2960. uni.navigateToMiniProgram({
  2961. // appid 写你要跳转的小程序的 appid
  2962. appId: "wx45cf09091aead547",
  2963. // 路径写 src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
  2964. path: "/pages/common/launch",
  2965. extraData: {
  2966. // 'type': 'out'
  2967. },
  2968. // 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
  2969. envVersion: "develop",
  2970. success(res) {
  2971. },
  2972. fail(err) {
  2973. }
  2974. });
  2975. },
  2976. getDictByKey(key) {
  2977. var data = { key };
  2978. getDictByKey(data).then(
  2979. (res) => {
  2980. if (res.code == 200) {
  2981. if (key == "sys_hospital_level") {
  2982. this.hosLevelOptions = res.data;
  2983. }
  2984. }
  2985. },
  2986. (err) => {
  2987. }
  2988. );
  2989. },
  2990. getDoctorArticleList(page2) {
  2991. var data = {
  2992. pageNum: 1,
  2993. pageSize: 10
  2994. };
  2995. getDoctorArticleList(data).then((res) => {
  2996. if (res.code == 200) {
  2997. this.doctocArticles = res.data.list;
  2998. }
  2999. });
  3000. },
  3001. getDepartmentList(page2) {
  3002. var data = {
  3003. isTui: 1
  3004. };
  3005. getDepartmentList(data).then((res) => {
  3006. if (res.code == 200) {
  3007. this.depts = res.data;
  3008. }
  3009. });
  3010. },
  3011. handleAdvClick(index2) {
  3012. var ad = this.advs[index2];
  3013. formatAppLog("log", "at pages/index/index.vue:498", ad.advUrl);
  3014. if (ad.showType == 1) {
  3015. uni.setStorageSync("url", ad.advUrl);
  3016. uni.navigateTo({
  3017. url: "h5"
  3018. });
  3019. } else if (ad.showType == 2) {
  3020. uni.navigateTo({
  3021. url: ad.advUrl
  3022. });
  3023. } else if (ad.showType == 3) {
  3024. uni.setStorageSync("content", ad.content);
  3025. uni.navigateTo({
  3026. url: "content"
  3027. });
  3028. }
  3029. },
  3030. getAdvList() {
  3031. var that = this;
  3032. var data = {
  3033. advType: 1
  3034. };
  3035. getAdvList(data).then((res) => {
  3036. if (res.code == 200) {
  3037. that.advImgs = [];
  3038. that.advs = [];
  3039. res.data.forEach(function(element) {
  3040. if (element.imageUrl != null && element.imageUrl != "") {
  3041. that.advs.push(element);
  3042. that.advImgs.push(element.imageUrl);
  3043. }
  3044. });
  3045. } else {
  3046. uni.showToast({
  3047. icon: "none",
  3048. title: "请求失败"
  3049. });
  3050. }
  3051. });
  3052. },
  3053. getArticleList() {
  3054. var data = {
  3055. isTui: 1,
  3056. pageNum: 1,
  3057. pageSize: 10
  3058. };
  3059. getArticleList(data).then((res) => {
  3060. if (res.code == 200) {
  3061. this.articles = res.data.list;
  3062. } else {
  3063. uni.showToast({
  3064. icon: "none",
  3065. title: "请求失败"
  3066. });
  3067. }
  3068. });
  3069. },
  3070. getDoctorList() {
  3071. var data = {
  3072. isTui: 1,
  3073. pageNum: 1,
  3074. pageSize: 10
  3075. };
  3076. getDoctorList(data).then((res) => {
  3077. if (res.code == 200) {
  3078. this.doctors = res.data.list;
  3079. this.doctors.forEach(function(value2, index2, array3) {
  3080. value2.prices = JSON.parse(value2.priceJson);
  3081. });
  3082. } else {
  3083. uni.showToast({
  3084. icon: "none",
  3085. title: "请求失败"
  3086. });
  3087. }
  3088. });
  3089. },
  3090. getPackageList() {
  3091. var data = {
  3092. isShow: 1,
  3093. pageNum: 1,
  3094. pageSize: 10
  3095. };
  3096. getPackageList(data).then((res) => {
  3097. if (res.code == 200) {
  3098. this.packages = res.data.list;
  3099. } else {
  3100. uni.showToast({
  3101. icon: "none",
  3102. title: "请求失败"
  3103. });
  3104. }
  3105. });
  3106. },
  3107. loginNavTo(url2) {
  3108. this.$isLogin().then(
  3109. (res) => {
  3110. if (res) {
  3111. formatAppLog("log", "at pages/index/index.vue:607", res);
  3112. uni.navigateTo({
  3113. url: url2
  3114. });
  3115. } else {
  3116. uni.navigateTo({
  3117. url: "/pages/auth/login"
  3118. });
  3119. }
  3120. }
  3121. );
  3122. },
  3123. navTo(url2) {
  3124. if (url2 == "dev") {
  3125. uni.showToast({
  3126. icon: "none",
  3127. title: "尽情期待..."
  3128. });
  3129. return;
  3130. }
  3131. formatAppLog("log", "at pages/index/index.vue:629", url2);
  3132. uni.navigateTo({
  3133. url: url2
  3134. });
  3135. }
  3136. }
  3137. };
  3138. function _sfc_render$2G(_ctx, _cache, $props, $setup, $data, $options) {
  3139. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  3140. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  3141. vue.createElementVNode("view", { class: "cont" }, [
  3142. vue.createElementVNode("view", { class: "bg" }, [
  3143. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4e7d59d18291491a81c67ed2cfd95a4c.png" })
  3144. ]),
  3145. vue.createElementVNode(
  3146. "view",
  3147. {
  3148. class: "top-box",
  3149. style: vue.normalizeStyle({ background: $options.bg })
  3150. },
  3151. [
  3152. vue.createElementVNode(
  3153. "view",
  3154. {
  3155. class: "status_bar",
  3156. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  3157. },
  3158. null,
  3159. 4
  3160. /* STYLE */
  3161. ),
  3162. vue.createElementVNode("view", { class: "top-title" }, [
  3163. vue.createElementVNode(
  3164. "view",
  3165. {
  3166. class: "name",
  3167. style: vue.normalizeStyle({ color: $data.titleColor })
  3168. },
  3169. "芸医汇互联网医院",
  3170. 4
  3171. /* STYLE */
  3172. ),
  3173. vue.createElementVNode("view", { class: "desc-box" }, [
  3174. !$data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
  3175. key: 0,
  3176. src: "/static/images/dui.png"
  3177. })) : vue.createCommentVNode("v-if", true),
  3178. $data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
  3179. key: 1,
  3180. src: "/static/images/dui1.png"
  3181. })) : vue.createCommentVNode("v-if", true),
  3182. vue.createElementVNode(
  3183. "view",
  3184. {
  3185. class: "desc",
  3186. style: vue.normalizeStyle({ color: $data.descColor })
  3187. },
  3188. "国家卫健委权威认证机构、世界各地千万用户健康选择",
  3189. 4
  3190. /* STYLE */
  3191. )
  3192. ])
  3193. ]),
  3194. vue.createElementVNode("view", { class: "search" }, [
  3195. vue.createElementVNode("view", {
  3196. class: "search-box",
  3197. onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_index/search"))
  3198. }, [
  3199. vue.createElementVNode("image", {
  3200. class: "img",
  3201. src: "/static/images/icon_search.png",
  3202. mode: ""
  3203. }),
  3204. vue.createElementVNode("input", {
  3205. disabled: "",
  3206. type: "text",
  3207. placeholder: "搜索医生/疾病/知识",
  3208. "placeholder-class": "input-place"
  3209. })
  3210. ]),
  3211. vue.createElementVNode("view", { class: "msg" }, [
  3212. !$data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
  3213. key: 0,
  3214. class: "msg",
  3215. src: "/static/images/msg.png"
  3216. })) : vue.createCommentVNode("v-if", true),
  3217. $data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
  3218. key: 1,
  3219. class: "msg",
  3220. src: "/static/images/msg1.png"
  3221. })) : vue.createCommentVNode("v-if", true),
  3222. vue.createElementVNode("button", {
  3223. class: "contact-btn",
  3224. "open-type": "contact"
  3225. })
  3226. ])
  3227. ])
  3228. ],
  3229. 4
  3230. /* STYLE */
  3231. ),
  3232. vue.createElementVNode("view", { class: "cont-box" }, [
  3233. vue.createElementVNode(
  3234. "view",
  3235. {
  3236. class: "status_bar",
  3237. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  3238. },
  3239. null,
  3240. 4
  3241. /* STYLE */
  3242. ),
  3243. vue.createElementVNode("view", { style: { "padding-bottom": "178rpx" } }),
  3244. $data.advImgs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3245. key: 0,
  3246. class: "banner"
  3247. }, [
  3248. vue.createVNode(_component_u_swiper, {
  3249. list: $data.advImgs,
  3250. indicator: "",
  3251. indicatorMode: "line",
  3252. circular: "",
  3253. onClick: $options.handleAdvClick
  3254. }, null, 8, ["list", "onClick"])
  3255. ])) : vue.createCommentVNode("v-if", true),
  3256. vue.createElementVNode("view", { class: "btns" }, [
  3257. vue.createElementVNode("view", {
  3258. class: "btn1",
  3259. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_doctor/doctorList"))
  3260. }, [
  3261. vue.createElementVNode("view", { class: "title-box" }, [
  3262. vue.createElementVNode("view", { class: "title" }, "专家问诊"),
  3263. vue.createElementVNode("view", { class: "desc" }, "名医问诊处方")
  3264. ]),
  3265. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4c28bef97d714e569e672e006ee471e2.png" }),
  3266. vue.createElementVNode("image", {
  3267. class: "mask",
  3268. src: "/static/images/mask.png"
  3269. })
  3270. ]),
  3271. vue.createElementVNode("view", {
  3272. class: "btn2",
  3273. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_order/inquirySelectType"))
  3274. }, [
  3275. vue.createElementVNode("view", { class: "title-box" }, [
  3276. vue.createElementVNode("view", { class: "title" }, "健康会诊"),
  3277. vue.createElementVNode("view", { class: "desc" }, "快速会诊咨询")
  3278. ]),
  3279. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/86e6f39efbc54d2dadf058dde269e573.png" }),
  3280. vue.createElementVNode("image", {
  3281. class: "mask",
  3282. src: "/static/images/mask.png"
  3283. })
  3284. ])
  3285. ]),
  3286. vue.createElementVNode("view", { class: "modules" }, [
  3287. (vue.openBlock(true), vue.createElementBlock(
  3288. vue.Fragment,
  3289. null,
  3290. vue.renderList($data.layouts, (item, index2) => {
  3291. return vue.openBlock(), vue.createElementBlock("view", { class: "module" }, [
  3292. item.id == 1 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3293. key: 0,
  3294. class: "menus"
  3295. }, [
  3296. vue.createElementVNode(
  3297. "view",
  3298. { class: "title" },
  3299. vue.toDisplayString(item.name),
  3300. 1
  3301. /* TEXT */
  3302. ),
  3303. vue.createElementVNode("view", { class: "menu-box" }, [
  3304. vue.createElementVNode("view", {
  3305. class: "menu",
  3306. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_index/testList"))
  3307. }, [
  3308. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6104b270481040dd8340859c9d901c09.png" })
  3309. ]),
  3310. vue.createElementVNode("view", {
  3311. class: "menu",
  3312. onClick: _cache[4] || (_cache[4] = ($event) => $options.loginNavTo("/pages_user/integralGoodsList"))
  3313. }, [
  3314. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f9f2f6c6b4d24f1ba9a637dfed74f8c3.png" })
  3315. ]),
  3316. vue.createElementVNode("view", {
  3317. class: "menu",
  3318. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_order/inquirySelect?inquiryType=3"))
  3319. }, [
  3320. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/76f15105ebe442398da1fe57e080bcd4.png" })
  3321. ]),
  3322. vue.createElementVNode("view", {
  3323. class: "menu",
  3324. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab("/pages/store/index"))
  3325. }, [
  3326. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240509/908255a8d8134a5482f0314bfbb42c02.png" })
  3327. ])
  3328. ])
  3329. ])) : vue.createCommentVNode("v-if", true),
  3330. item.id == 2 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3331. key: 1,
  3332. class: "depts"
  3333. }, [
  3334. vue.createElementVNode(
  3335. "view",
  3336. { class: "title" },
  3337. vue.toDisplayString(item.name),
  3338. 1
  3339. /* TEXT */
  3340. ),
  3341. vue.createElementVNode("view", { class: "dept-box" }, [
  3342. (vue.openBlock(true), vue.createElementBlock(
  3343. vue.Fragment,
  3344. null,
  3345. vue.renderList($data.depts, (item2, index3) => {
  3346. return vue.openBlock(), vue.createElementBlock("view", {
  3347. onClick: ($event) => $options.navTo("/pages_doctor/doctorList?deptId=" + item2.deptId),
  3348. class: "dept"
  3349. }, [
  3350. vue.createElementVNode("image", {
  3351. class: "icon",
  3352. src: item2.iconUrl
  3353. }, null, 8, ["src"]),
  3354. vue.createElementVNode(
  3355. "view",
  3356. { class: "title" },
  3357. vue.toDisplayString(item2.deptName),
  3358. 1
  3359. /* TEXT */
  3360. )
  3361. ], 8, ["onClick"]);
  3362. }),
  3363. 256
  3364. /* UNKEYED_FRAGMENT */
  3365. )),
  3366. vue.createElementVNode("view", {
  3367. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_doctor/doctorList?deptId=0")),
  3368. class: "dept"
  3369. }, [
  3370. vue.createElementVNode("image", {
  3371. class: "icon",
  3372. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/acbb520df8284c6aaff601cb06411c2a.png"
  3373. }),
  3374. vue.createElementVNode("view", { class: "title" }, "更多科室")
  3375. ])
  3376. ])
  3377. ])) : vue.createCommentVNode("v-if", true),
  3378. item.id == 3 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3379. key: 2,
  3380. class: "depts"
  3381. }, [
  3382. vue.createElementVNode(
  3383. "view",
  3384. { class: "title" },
  3385. vue.toDisplayString(item.name),
  3386. 1
  3387. /* TEXT */
  3388. ),
  3389. vue.createElementVNode("view", { class: "dept-box" }, [
  3390. (vue.openBlock(true), vue.createElementBlock(
  3391. vue.Fragment,
  3392. null,
  3393. vue.renderList($data.yangshengs, (item2, index3) => {
  3394. return vue.openBlock(), vue.createElementBlock("view", {
  3395. onClick: ($event) => $options.yangshengClick(item2),
  3396. class: "dept"
  3397. }, [
  3398. vue.createElementVNode("image", {
  3399. class: "icon",
  3400. src: item2.icon
  3401. }, null, 8, ["src"]),
  3402. vue.createElementVNode(
  3403. "view",
  3404. { class: "title" },
  3405. vue.toDisplayString(item2.title) + vue.toDisplayString(item2.isShow),
  3406. 1
  3407. /* TEXT */
  3408. )
  3409. ], 8, ["onClick"]);
  3410. }),
  3411. 256
  3412. /* UNKEYED_FRAGMENT */
  3413. ))
  3414. ])
  3415. ])) : vue.createCommentVNode("v-if", true),
  3416. item.id == 4 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3417. key: 3,
  3418. class: "doctor-articles"
  3419. }, [
  3420. vue.createElementVNode("view", { class: "title-box" }, [
  3421. vue.createElementVNode(
  3422. "view",
  3423. { class: "title" },
  3424. vue.toDisplayString(item.name),
  3425. 1
  3426. /* TEXT */
  3427. ),
  3428. vue.createElementVNode("view", {
  3429. class: "more",
  3430. onClick: _cache[8] || (_cache[8] = ($event) => $options.navTo("/pages_doctor/doctorArticleList"))
  3431. }, [
  3432. vue.createElementVNode("view", { class: "text" }, "更多"),
  3433. vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
  3434. ])
  3435. ]),
  3436. vue.createElementVNode("scroll-view", {
  3437. "scroll-x": true,
  3438. style: { "white-space": "nowrap" }
  3439. }, [
  3440. vue.createElementVNode("view", { class: "article-box" }, [
  3441. (vue.openBlock(true), vue.createElementBlock(
  3442. vue.Fragment,
  3443. null,
  3444. vue.renderList($data.doctocArticles, (item2, index3) => {
  3445. return vue.openBlock(), vue.createElementBlock("view", {
  3446. class: "article",
  3447. onClick: ($event) => $options.navTo("/pages_doctor/doctorArticleDetails?articleId=" + item2.articleId)
  3448. }, [
  3449. vue.createElementVNode("view", { class: "image-box" }, [
  3450. vue.createElementVNode("image", {
  3451. mode: "aspectFill",
  3452. src: item2.imageUrl
  3453. }, null, 8, ["src"]),
  3454. vue.createElementVNode(
  3455. "view",
  3456. { class: "views" },
  3457. vue.toDisplayString(item2.views) + "人观看 ",
  3458. 1
  3459. /* TEXT */
  3460. ),
  3461. vue.createElementVNode("view", { class: "doctor" }, [
  3462. vue.createElementVNode("image", {
  3463. mode: "aspectFill",
  3464. src: item2.avatar
  3465. }, null, 8, ["src"]),
  3466. vue.createElementVNode("view", { class: "right" }, [
  3467. vue.createElementVNode(
  3468. "view",
  3469. { class: "doc-name ellipsis" },
  3470. vue.toDisplayString(item2.doctorName),
  3471. 1
  3472. /* TEXT */
  3473. ),
  3474. vue.createElementVNode(
  3475. "view",
  3476. { class: "doc-position ellipsis" },
  3477. vue.toDisplayString(item2.position),
  3478. 1
  3479. /* TEXT */
  3480. )
  3481. ])
  3482. ])
  3483. ]),
  3484. vue.createElementVNode("view", { class: "article-title-box" }, [
  3485. vue.createElementVNode(
  3486. "view",
  3487. { class: "article-title ellipsis" },
  3488. vue.toDisplayString(item2.title),
  3489. 1
  3490. /* TEXT */
  3491. )
  3492. ])
  3493. ], 8, ["onClick"]);
  3494. }),
  3495. 256
  3496. /* UNKEYED_FRAGMENT */
  3497. ))
  3498. ])
  3499. ])
  3500. ])) : vue.createCommentVNode("v-if", true),
  3501. item.id == 5 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3502. key: 4,
  3503. class: "doctors"
  3504. }, [
  3505. vue.createElementVNode("view", { class: "title-box" }, [
  3506. vue.createElementVNode(
  3507. "view",
  3508. { class: "title" },
  3509. vue.toDisplayString(item.name),
  3510. 1
  3511. /* TEXT */
  3512. ),
  3513. vue.createElementVNode("view", {
  3514. class: "more",
  3515. onClick: _cache[9] || (_cache[9] = ($event) => $options.navTo("/pages_doctor/doctorList"))
  3516. }, [
  3517. vue.createElementVNode("view", { class: "text" }, "更多"),
  3518. vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
  3519. ])
  3520. ]),
  3521. $data.doctors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3522. key: 0,
  3523. class: "doctor-box"
  3524. }, [
  3525. (vue.openBlock(true), vue.createElementBlock(
  3526. vue.Fragment,
  3527. null,
  3528. vue.renderList($data.doctors, (item2, index3) => {
  3529. return vue.openBlock(), vue.createElementBlock("view", {
  3530. class: "doctor",
  3531. onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item2.doctorId)
  3532. }, [
  3533. vue.createElementVNode("view", { class: "item" }, [
  3534. vue.createElementVNode("view", { class: "left" }, [
  3535. vue.createElementVNode("view", { class: "head-box" }, [
  3536. vue.createElementVNode("image", {
  3537. mode: "aspectFill",
  3538. class: "doc-img",
  3539. src: item2.avatar
  3540. }, null, 8, ["src"]),
  3541. item2.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  3542. key: 0,
  3543. class: "isline"
  3544. }, [
  3545. vue.createElementVNode("view", { class: "img" }, [
  3546. vue.createElementVNode("image", { src: "/static/images/isline.png" }),
  3547. vue.createElementVNode("view", { class: "name" }, "在线")
  3548. ])
  3549. ])) : vue.createCommentVNode("v-if", true)
  3550. ])
  3551. ]),
  3552. vue.createElementVNode("view", { class: "right" }, [
  3553. vue.createElementVNode("view", { class: "doc-box" }, [
  3554. vue.createElementVNode(
  3555. "view",
  3556. { class: "doc-name" },
  3557. vue.toDisplayString(item2.doctorName),
  3558. 1
  3559. /* TEXT */
  3560. ),
  3561. vue.createElementVNode(
  3562. "view",
  3563. { class: "doc-position" },
  3564. vue.toDisplayString(item2.position),
  3565. 1
  3566. /* TEXT */
  3567. ),
  3568. vue.createElementVNode(
  3569. "view",
  3570. { class: "doc-dept" },
  3571. vue.toDisplayString(item2.deptName),
  3572. 1
  3573. /* TEXT */
  3574. )
  3575. ]),
  3576. vue.createElementVNode("view", { class: "hospital-box" }, [
  3577. item2.hospitalLevel != null ? (vue.openBlock(), vue.createElementBlock("view", {
  3578. key: 0,
  3579. class: "tag"
  3580. }, [
  3581. vue.createElementVNode(
  3582. "text",
  3583. null,
  3584. vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item2.hospitalLevel)),
  3585. 1
  3586. /* TEXT */
  3587. )
  3588. ])) : vue.createCommentVNode("v-if", true),
  3589. vue.createElementVNode(
  3590. "view",
  3591. { class: "name" },
  3592. vue.toDisplayString(item2.hospitalName),
  3593. 1
  3594. /* TEXT */
  3595. )
  3596. ]),
  3597. vue.createElementVNode("view", { class: "doc-spec" }, [
  3598. vue.createElementVNode(
  3599. "view",
  3600. { class: "spec ellipsis2" },
  3601. vue.toDisplayString(item2.speciality),
  3602. 1
  3603. /* TEXT */
  3604. )
  3605. ]),
  3606. vue.createElementVNode("view", { class: "doc-count" }, [
  3607. vue.createElementVNode("view", { class: "name" }, "好评:"),
  3608. vue.createElementVNode(
  3609. "view",
  3610. { class: "count" },
  3611. vue.toDisplayString(item2.pingStar) + "分",
  3612. 1
  3613. /* TEXT */
  3614. ),
  3615. vue.createElementVNode("view", { class: "name" }, "接诊量:"),
  3616. vue.createElementVNode(
  3617. "view",
  3618. { class: "count" },
  3619. vue.toDisplayString(item2.orderNumber),
  3620. 1
  3621. /* TEXT */
  3622. ),
  3623. vue.createElementVNode("view", { class: "name" }, "平均响应:"),
  3624. vue.createElementVNode("view", { class: "count" })
  3625. ]),
  3626. vue.createElementVNode("view", { class: "doc-price" }, [
  3627. vue.createElementVNode("view", { class: "btn" }, [
  3628. vue.createTextVNode(" 咨询医生¥ "),
  3629. (vue.openBlock(true), vue.createElementBlock(
  3630. vue.Fragment,
  3631. null,
  3632. vue.renderList(item2.prices, (price, index4) => {
  3633. return vue.openBlock(), vue.createElementBlock("text", null, [
  3634. vue.createTextVNode(
  3635. vue.toDisplayString(price.price.toFixed(2)) + " ",
  3636. 1
  3637. /* TEXT */
  3638. ),
  3639. index4 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
  3640. ]);
  3641. }),
  3642. 256
  3643. /* UNKEYED_FRAGMENT */
  3644. ))
  3645. ])
  3646. ])
  3647. ])
  3648. ])
  3649. ], 8, ["onClick"]);
  3650. }),
  3651. 256
  3652. /* UNKEYED_FRAGMENT */
  3653. ))
  3654. ])) : vue.createCommentVNode("v-if", true)
  3655. ])) : vue.createCommentVNode("v-if", true),
  3656. item.id == 6 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3657. key: 5,
  3658. class: "articles"
  3659. }, [
  3660. vue.createElementVNode("view", { class: "title-box" }, [
  3661. vue.createElementVNode(
  3662. "view",
  3663. { class: "title" },
  3664. vue.toDisplayString(item.name),
  3665. 1
  3666. /* TEXT */
  3667. ),
  3668. vue.createElementVNode("view", {
  3669. class: "more",
  3670. onClick: _cache[10] || (_cache[10] = ($event) => $options.navTo("/pages_index/articleList"))
  3671. }, [
  3672. vue.createElementVNode("view", { class: "text" }, "更多"),
  3673. vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
  3674. ])
  3675. ]),
  3676. $data.articles.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3677. key: 0,
  3678. class: "article-box"
  3679. }, [
  3680. (vue.openBlock(true), vue.createElementBlock(
  3681. vue.Fragment,
  3682. null,
  3683. vue.renderList($data.articles, (item2, index3) => {
  3684. return vue.openBlock(), vue.createElementBlock("view", {
  3685. class: "item",
  3686. onClick: ($event) => $options.navTo("/pages_index/articleDetails?articleId=" + item2.articleId)
  3687. }, [
  3688. vue.createElementVNode("view", { class: "left" }, [
  3689. vue.createElementVNode(
  3690. "view",
  3691. { class: "title" },
  3692. vue.toDisplayString(item2.title),
  3693. 1
  3694. /* TEXT */
  3695. ),
  3696. vue.createElementVNode(
  3697. "view",
  3698. { class: "views" },
  3699. " 浏览量 " + vue.toDisplayString(item2.views),
  3700. 1
  3701. /* TEXT */
  3702. )
  3703. ]),
  3704. vue.createElementVNode("view", { class: "right" }, [
  3705. vue.createElementVNode("image", {
  3706. src: item2.imageUrl
  3707. }, null, 8, ["src"])
  3708. ])
  3709. ], 8, ["onClick"]);
  3710. }),
  3711. 256
  3712. /* UNKEYED_FRAGMENT */
  3713. ))
  3714. ])) : vue.createCommentVNode("v-if", true)
  3715. ])) : vue.createCommentVNode("v-if", true),
  3716. item.id == 7 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3717. key: 6,
  3718. class: "packages"
  3719. }, [
  3720. vue.createElementVNode("view", { class: "title-box" }, [
  3721. vue.createElementVNode(
  3722. "view",
  3723. { class: "title" },
  3724. vue.toDisplayString(item.name),
  3725. 1
  3726. /* TEXT */
  3727. ),
  3728. vue.createElementVNode("view", {
  3729. class: "more",
  3730. onClick: _cache[11] || (_cache[11] = ($event) => $options.navTo("/pages_index/packageList"))
  3731. }, [
  3732. vue.createElementVNode("view", { class: "text" }, "更多"),
  3733. vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
  3734. ])
  3735. ]),
  3736. vue.createElementVNode("view", { class: "package-box" }, [
  3737. (vue.openBlock(true), vue.createElementBlock(
  3738. vue.Fragment,
  3739. null,
  3740. vue.renderList($data.packages, (item2, index3) => {
  3741. return vue.openBlock(), vue.createElementBlock("view", {
  3742. class: "item",
  3743. onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item2.packageId)
  3744. }, [
  3745. vue.createElementVNode("view", { class: "top" }, [
  3746. vue.createElementVNode("image", {
  3747. src: item2.imgUrl
  3748. }, null, 8, ["src"])
  3749. ]),
  3750. vue.createElementVNode("view", { class: "bottom" }, [
  3751. vue.createElementVNode(
  3752. "view",
  3753. { class: "title ellipsis2" },
  3754. vue.toDisplayString(item2.packageName),
  3755. 1
  3756. /* TEXT */
  3757. ),
  3758. vue.createElementVNode("view", { class: "price-box" }, [
  3759. vue.createElementVNode(
  3760. "view",
  3761. { class: "price" },
  3762. "¥" + vue.toDisplayString(item2.price.toFixed(2)) + "元/日",
  3763. 1
  3764. /* TEXT */
  3765. ),
  3766. vue.createElementVNode(
  3767. "view",
  3768. { class: "count" },
  3769. vue.toDisplayString(item2.sales) + "人已购",
  3770. 1
  3771. /* TEXT */
  3772. )
  3773. ])
  3774. ])
  3775. ], 8, ["onClick"]);
  3776. }),
  3777. 256
  3778. /* UNKEYED_FRAGMENT */
  3779. ))
  3780. ])
  3781. ])) : vue.createCommentVNode("v-if", true)
  3782. ]);
  3783. }),
  3784. 256
  3785. /* UNKEYED_FRAGMENT */
  3786. ))
  3787. ])
  3788. ])
  3789. ])
  3790. ]);
  3791. }
  3792. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2t, [["render", _sfc_render$2G], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/index/index.vue"]]);
  3793. const _sfc_main$2s = {
  3794. data() {
  3795. return {
  3796. url: ""
  3797. };
  3798. },
  3799. onLoad(val) {
  3800. this.url = uni.getStorageSync("url");
  3801. formatAppLog("log", "at pages/index/h5.vue:17", this.url);
  3802. }
  3803. };
  3804. function _sfc_render$2F(_ctx, _cache, $props, $setup, $data, $options) {
  3805. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  3806. vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"])
  3807. ]);
  3808. }
  3809. const PagesIndexH5 = /* @__PURE__ */ _export_sfc(_sfc_main$2s, [["render", _sfc_render$2F], ["__scopeId", "data-v-41e99781"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/index/h5.vue"]]);
  3810. const _sfc_main$2r = {
  3811. data() {
  3812. return {
  3813. content: ""
  3814. };
  3815. },
  3816. onLoad(val) {
  3817. uni.getStorageSync("content");
  3818. formatAppLog("log", "at pages/index/content.vue:16", this.content);
  3819. }
  3820. };
  3821. function _sfc_render$2E(_ctx, _cache, $props, $setup, $data, $options) {
  3822. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  3823. vue.createElementVNode("view", { innerHTML: $data.content }, null, 8, ["innerHTML"])
  3824. ]);
  3825. }
  3826. const PagesIndexContent = /* @__PURE__ */ _export_sfc(_sfc_main$2r, [["render", _sfc_render$2E], ["__scopeId", "data-v-a27a44e8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/index/content.vue"]]);
  3827. const _sfc_main$2q = {
  3828. data() {
  3829. return {
  3830. depts: [],
  3831. doctors: []
  3832. };
  3833. },
  3834. onShow() {
  3835. this.getDepartmentList();
  3836. this.getDoctorList();
  3837. },
  3838. methods: {
  3839. getDoctorList() {
  3840. var data = {
  3841. isTui: 1,
  3842. pageNum: 1,
  3843. pageSize: 10
  3844. };
  3845. getDoctorList(data).then((res) => {
  3846. if (res.code == 200) {
  3847. res.data.list.forEach(function(value2, index2, array3) {
  3848. value2.prices = JSON.parse(value2.priceJson);
  3849. });
  3850. this.doctors = res.data.list;
  3851. formatAppLog("log", "at pages/doctor/index.vue:102", this.doctors);
  3852. } else {
  3853. uni.showToast({
  3854. icon: "none",
  3855. title: "请求失败"
  3856. });
  3857. }
  3858. });
  3859. },
  3860. getDepartmentList(page2) {
  3861. var data = {};
  3862. getDepartmentList(data).then((res) => {
  3863. if (res.code == 200) {
  3864. this.depts = res.data;
  3865. } else {
  3866. uni.showToast({
  3867. icon: "none",
  3868. title: "请求失败"
  3869. });
  3870. }
  3871. });
  3872. },
  3873. navTo(url2) {
  3874. uni.navigateTo({
  3875. url: url2
  3876. });
  3877. }
  3878. }
  3879. };
  3880. function _sfc_render$2D(_ctx, _cache, $props, $setup, $data, $options) {
  3881. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  3882. vue.createElementVNode("view", { class: "search" }, [
  3883. vue.createElementVNode("view", { class: "search-box" }, [
  3884. vue.createElementVNode("image", {
  3885. class: "img",
  3886. src: "/static/images/icon_search.png",
  3887. mode: ""
  3888. }),
  3889. vue.createElementVNode("input", {
  3890. disabled: "",
  3891. type: "text",
  3892. placeholder: "搜索医院/医生/疾病/知识",
  3893. "placeholder-class": "input-place"
  3894. })
  3895. ])
  3896. ]),
  3897. vue.createElementVNode("view", { class: "depts" }, [
  3898. vue.createElementVNode("view", { class: "title-box" }, [
  3899. vue.createElementVNode("view", { class: "line" }),
  3900. vue.createElementVNode("view", { class: "title" }, "全部科室")
  3901. ]),
  3902. vue.createElementVNode("view", { class: "dept-box" }, [
  3903. (vue.openBlock(true), vue.createElementBlock(
  3904. vue.Fragment,
  3905. null,
  3906. vue.renderList($data.depts, (item, index2) => {
  3907. return vue.openBlock(), vue.createElementBlock("view", {
  3908. class: "dept",
  3909. onClick: ($event) => $options.navTo("./doctorList?deptId=" + item.deptId)
  3910. }, [
  3911. vue.createElementVNode("image", {
  3912. src: item.iconUrl
  3913. }, null, 8, ["src"]),
  3914. vue.createElementVNode(
  3915. "view",
  3916. { class: "dept-name" },
  3917. vue.toDisplayString(item.deptName),
  3918. 1
  3919. /* TEXT */
  3920. )
  3921. ], 8, ["onClick"]);
  3922. }),
  3923. 256
  3924. /* UNKEYED_FRAGMENT */
  3925. ))
  3926. ])
  3927. ]),
  3928. vue.createElementVNode("view", { class: "doctors" }, [
  3929. vue.createElementVNode("view", { class: "title-box" }, [
  3930. vue.createElementVNode("view", { class: "line" }),
  3931. vue.createElementVNode("view", { class: "title" }, "专家推荐")
  3932. ]),
  3933. vue.createElementVNode("view", { class: "doctor-box" }, [
  3934. (vue.openBlock(true), vue.createElementBlock(
  3935. vue.Fragment,
  3936. null,
  3937. vue.renderList($data.doctors, (item, index2) => {
  3938. return vue.openBlock(), vue.createElementBlock("view", {
  3939. class: "doctor",
  3940. onClick: ($event) => $options.navTo("./doctorDetails?doctorId=" + item.doctorId)
  3941. }, [
  3942. vue.createElementVNode("view", { class: "item" }, [
  3943. vue.createElementVNode("image", {
  3944. mode: "aspectFill",
  3945. class: "doc-img",
  3946. src: item.avatar
  3947. }, null, 8, ["src"]),
  3948. vue.createElementVNode("view", { class: "right" }, [
  3949. vue.createElementVNode("view", { class: "doc-box" }, [
  3950. vue.createElementVNode(
  3951. "view",
  3952. { class: "doc-name" },
  3953. vue.toDisplayString(item.doctorName),
  3954. 1
  3955. /* TEXT */
  3956. ),
  3957. vue.createElementVNode(
  3958. "view",
  3959. { class: "doc-position" },
  3960. vue.toDisplayString(item.position),
  3961. 1
  3962. /* TEXT */
  3963. )
  3964. ]),
  3965. vue.createElementVNode(
  3966. "view",
  3967. { class: "hospital" },
  3968. vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName),
  3969. 1
  3970. /* TEXT */
  3971. ),
  3972. vue.createElementVNode("view", { class: "doc-spec" }, [
  3973. vue.createElementVNode("view", { class: "title" }, "擅长:"),
  3974. vue.createElementVNode(
  3975. "view",
  3976. { class: "spec ellipsis" },
  3977. vue.toDisplayString(item.speciality),
  3978. 1
  3979. /* TEXT */
  3980. )
  3981. ]),
  3982. vue.createElementVNode("view", { class: "doc-ping" }, [
  3983. vue.createElementVNode(
  3984. "view",
  3985. { class: "ping" },
  3986. "好评:" + vue.toDisplayString(item.pingStar) + "分",
  3987. 1
  3988. /* TEXT */
  3989. ),
  3990. vue.createElementVNode(
  3991. "view",
  3992. { class: "count" },
  3993. "咨询量:" + vue.toDisplayString(item.orderNumber),
  3994. 1
  3995. /* TEXT */
  3996. )
  3997. ]),
  3998. vue.createElementVNode("view", { class: "doc-price" }, [
  3999. vue.createElementVNode("view", { class: "left" }, [
  4000. vue.createTextVNode("¥ "),
  4001. (vue.openBlock(true), vue.createElementBlock(
  4002. vue.Fragment,
  4003. null,
  4004. vue.renderList(item.prices, (price, index3) => {
  4005. return vue.openBlock(), vue.createElementBlock("text", null, [
  4006. vue.createTextVNode(
  4007. vue.toDisplayString(price.price.toFixed(2)) + " ",
  4008. 1
  4009. /* TEXT */
  4010. ),
  4011. index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
  4012. ]);
  4013. }),
  4014. 256
  4015. /* UNKEYED_FRAGMENT */
  4016. ))
  4017. ]),
  4018. vue.createElementVNode("view", { class: "btns" }, [
  4019. vue.createElementVNode("view", { class: "btn" }, " 咨询医生 ")
  4020. ])
  4021. ])
  4022. ])
  4023. ])
  4024. ], 8, ["onClick"]);
  4025. }),
  4026. 256
  4027. /* UNKEYED_FRAGMENT */
  4028. ))
  4029. ])
  4030. ])
  4031. ]);
  4032. }
  4033. const PagesDoctorIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2q, [["render", _sfc_render$2D], ["__scopeId", "data-v-43416ddf"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/doctor/index.vue"]]);
  4034. const GlobalOption = {
  4035. down: {
  4036. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  4037. offset: 80,
  4038. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  4039. native: false
  4040. // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  4041. },
  4042. up: {
  4043. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  4044. offset: 150,
  4045. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  4046. toTop: {
  4047. // 回到顶部按钮,需配置src才显示
  4048. src: "https://www.mescroll.com/img/mescroll-totop.png",
  4049. // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  4050. offset: 1e3,
  4051. // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  4052. right: 20,
  4053. // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4054. bottom: 120,
  4055. // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4056. width: 72
  4057. // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4058. },
  4059. empty: {
  4060. use: true,
  4061. // 是否显示空布局
  4062. icon: "https://www.mescroll.com/img/mescroll-empty.png"
  4063. // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  4064. }
  4065. },
  4066. // 国际化配置
  4067. i18n: {
  4068. // 中文
  4069. zh: {
  4070. down: {
  4071. textInOffset: "下拉刷新",
  4072. // 下拉的距离在offset范围内的提示文本
  4073. textOutOffset: "释放更新",
  4074. // 下拉的距离大于offset范围的提示文本
  4075. textLoading: "加载中 ...",
  4076. // 加载中的提示文本
  4077. textSuccess: "加载成功",
  4078. // 加载成功的文本
  4079. textErr: "加载失败"
  4080. // 加载失败的文本
  4081. },
  4082. up: {
  4083. textLoading: "加载中 ...",
  4084. // 加载中的提示文本
  4085. textNoMore: "-- END --",
  4086. // 没有更多数据的提示文本
  4087. empty: {
  4088. tip: "~ 空空如也 ~"
  4089. // 空提示
  4090. }
  4091. }
  4092. },
  4093. // 英文
  4094. en: {
  4095. down: {
  4096. textInOffset: "drop down refresh",
  4097. textOutOffset: "release updates",
  4098. textLoading: "loading ...",
  4099. textSuccess: "loaded successfully",
  4100. textErr: "loading failed"
  4101. },
  4102. up: {
  4103. textLoading: "loading ...",
  4104. textNoMore: "-- END --",
  4105. empty: {
  4106. tip: "~ absolutely empty ~"
  4107. }
  4108. }
  4109. }
  4110. }
  4111. };
  4112. const mescrollI18n = {
  4113. // 默认语言
  4114. def: "zh",
  4115. // 获取当前语言类型
  4116. getType() {
  4117. return uni.getStorageSync("mescroll-i18n") || this.def;
  4118. },
  4119. // 设置当前语言类型
  4120. setType(type2) {
  4121. uni.setStorageSync("mescroll-i18n", type2);
  4122. }
  4123. };
  4124. const _sfc_main$2p = {
  4125. props: {
  4126. // empty的配置项: 默认为GlobalOption.up.empty
  4127. option: {
  4128. type: Object,
  4129. default() {
  4130. return {};
  4131. }
  4132. }
  4133. },
  4134. // 使用computed获取配置,用于支持option的动态配置
  4135. computed: {
  4136. // 图标
  4137. icon() {
  4138. if (this.option.icon != null) {
  4139. return this.option.icon;
  4140. } else {
  4141. let i18nType = mescrollI18n.getType();
  4142. if (this.option.i18n) {
  4143. return this.option.i18n[i18nType].icon;
  4144. } else {
  4145. return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
  4146. }
  4147. }
  4148. },
  4149. // 文本提示
  4150. tip() {
  4151. if (this.option.tip != null) {
  4152. return this.option.tip;
  4153. } else {
  4154. let i18nType = mescrollI18n.getType();
  4155. if (this.option.i18n) {
  4156. return this.option.i18n[i18nType].tip;
  4157. } else {
  4158. return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
  4159. }
  4160. }
  4161. },
  4162. // 按钮文本
  4163. btnText() {
  4164. if (this.option.i18n) {
  4165. let i18nType = mescrollI18n.getType();
  4166. return this.option.i18n[i18nType].btnText;
  4167. } else {
  4168. return this.option.btnText;
  4169. }
  4170. }
  4171. },
  4172. methods: {
  4173. // 点击按钮
  4174. emptyClick() {
  4175. this.$emit("emptyclick");
  4176. }
  4177. }
  4178. };
  4179. function _sfc_render$2C(_ctx, _cache, $props, $setup, $data, $options) {
  4180. return vue.openBlock(), vue.createElementBlock(
  4181. "view",
  4182. {
  4183. class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
  4184. style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
  4185. },
  4186. [
  4187. vue.createElementVNode("view", null, [
  4188. $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  4189. key: 0,
  4190. class: "empty-icon",
  4191. src: $options.icon,
  4192. mode: "widthFix"
  4193. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true)
  4194. ]),
  4195. $options.tip ? (vue.openBlock(), vue.createElementBlock(
  4196. "view",
  4197. {
  4198. key: 0,
  4199. class: "empty-tip"
  4200. },
  4201. vue.toDisplayString($options.tip),
  4202. 1
  4203. /* TEXT */
  4204. )) : vue.createCommentVNode("v-if", true),
  4205. $options.btnText ? (vue.openBlock(), vue.createElementBlock(
  4206. "view",
  4207. {
  4208. key: 1,
  4209. class: "empty-btn",
  4210. onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
  4211. },
  4212. vue.toDisplayString($options.btnText),
  4213. 1
  4214. /* TEXT */
  4215. )) : vue.createCommentVNode("v-if", true)
  4216. ],
  4217. 6
  4218. /* CLASS, STYLE */
  4219. );
  4220. }
  4221. const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$2p, [["render", _sfc_render$2C], ["__scopeId", "data-v-7cefd855"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue"]]);
  4222. function MeScroll(options, isScrollBody) {
  4223. let me = this;
  4224. me.version = "1.3.7";
  4225. me.options = options || {};
  4226. me.isScrollBody = isScrollBody || false;
  4227. me.isDownScrolling = false;
  4228. me.isUpScrolling = false;
  4229. let hasDownCallback = me.options.down && me.options.down.callback;
  4230. me.initDownScroll();
  4231. me.initUpScroll();
  4232. setTimeout(function() {
  4233. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  4234. if (me.optDown.autoShowLoading) {
  4235. me.triggerDownScroll();
  4236. } else {
  4237. me.optDown.callback && me.optDown.callback(me);
  4238. }
  4239. }
  4240. if (!me.isUpAutoLoad) {
  4241. setTimeout(function() {
  4242. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  4243. }, 100);
  4244. }
  4245. }, 30);
  4246. }
  4247. MeScroll.prototype.extendDownScroll = function(optDown) {
  4248. MeScroll.extend(optDown, {
  4249. use: true,
  4250. // 是否启用下拉刷新; 默认true
  4251. auto: true,
  4252. // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  4253. native: false,
  4254. // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  4255. autoShowLoading: false,
  4256. // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  4257. isLock: false,
  4258. // 是否锁定下拉刷新,默认false;
  4259. offset: 80,
  4260. // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  4261. startTop: 100,
  4262. // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  4263. inOffsetRate: 1,
  4264. // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  4265. outOffsetRate: 0.2,
  4266. // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  4267. bottomOffset: 20,
  4268. // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  4269. minAngle: 45,
  4270. // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  4271. textInOffset: "下拉刷新",
  4272. // 下拉的距离在offset范围内的提示文本
  4273. textOutOffset: "释放更新",
  4274. // 下拉的距离大于offset范围的提示文本
  4275. textLoading: "加载中 ...",
  4276. // 加载中的提示文本
  4277. textSuccess: "加载成功",
  4278. // 加载成功的文本
  4279. textErr: "加载失败",
  4280. // 加载失败的文本
  4281. beforeEndDelay: 0,
  4282. // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
  4283. bgColor: "transparent",
  4284. // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  4285. textColor: "gray",
  4286. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  4287. inited: null,
  4288. // 下拉刷新初始化完毕的回调
  4289. inOffset: null,
  4290. // 下拉的距离进入offset范围内那一刻的回调
  4291. outOffset: null,
  4292. // 下拉的距离大于offset那一刻的回调
  4293. onMoving: null,
  4294. // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  4295. beforeLoading: null,
  4296. // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  4297. showLoading: null,
  4298. // 显示下拉刷新进度的回调
  4299. afterLoading: null,
  4300. // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  4301. beforeEndDownScroll: null,
  4302. // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  4303. endDownScroll: null,
  4304. // 结束下拉刷新的回调
  4305. afterEndDownScroll: null,
  4306. // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  4307. callback: function(mescroll) {
  4308. mescroll.resetUpScroll();
  4309. }
  4310. });
  4311. };
  4312. MeScroll.prototype.extendUpScroll = function(optUp) {
  4313. MeScroll.extend(optUp, {
  4314. use: true,
  4315. // 是否启用上拉加载; 默认true
  4316. auto: true,
  4317. // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  4318. isLock: false,
  4319. // 是否锁定上拉加载,默认false;
  4320. isBoth: true,
  4321. // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  4322. callback: null,
  4323. // 上拉加载的回调;function(page,mescroll){ }
  4324. page: {
  4325. num: 0,
  4326. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  4327. size: 10,
  4328. // 每页数据的数量
  4329. time: null
  4330. // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  4331. },
  4332. noMoreSize: 5,
  4333. // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  4334. offset: 150,
  4335. // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  4336. textLoading: "加载中 ...",
  4337. // 加载中的提示文本
  4338. textNoMore: "-- END --",
  4339. // 没有更多数据的提示文本
  4340. bgColor: "transparent",
  4341. // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  4342. textColor: "gray",
  4343. // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  4344. inited: null,
  4345. // 初始化完毕的回调
  4346. showLoading: null,
  4347. // 显示加载中的回调
  4348. showNoMore: null,
  4349. // 显示无更多数据的回调
  4350. hideUpScroll: null,
  4351. // 隐藏上拉加载的回调
  4352. errDistance: 60,
  4353. // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  4354. toTop: {
  4355. // 回到顶部按钮,需配置src才显示
  4356. src: null,
  4357. // 图片路径,默认null (绝对路径或网络图)
  4358. offset: 1e3,
  4359. // 列表滚动多少距离才显示回到顶部按钮,默认1000
  4360. duration: 300,
  4361. // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  4362. btnClick: null,
  4363. // 点击按钮的回调
  4364. onShow: null,
  4365. // 是否显示的回调
  4366. zIndex: 9990,
  4367. // fixed定位z-index值
  4368. left: null,
  4369. // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4370. right: 20,
  4371. // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4372. bottom: 120,
  4373. // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4374. safearea: false,
  4375. // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  4376. width: 72,
  4377. // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4378. radius: "50%"
  4379. // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4380. },
  4381. empty: {
  4382. use: true,
  4383. // 是否显示空布局
  4384. icon: null,
  4385. // 图标路径
  4386. tip: "~ 暂无相关数据 ~",
  4387. // 提示
  4388. btnText: "",
  4389. // 按钮
  4390. btnClick: null,
  4391. // 点击按钮的回调
  4392. onShow: null,
  4393. // 是否显示的回调
  4394. fixed: false,
  4395. // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  4396. top: "100rpx",
  4397. // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  4398. zIndex: 99
  4399. // fixed定位z-index值
  4400. },
  4401. onScroll: false
  4402. // 是否监听滚动事件
  4403. });
  4404. };
  4405. MeScroll.extend = function(userOption, defaultOption) {
  4406. if (!userOption)
  4407. return defaultOption;
  4408. for (let key in defaultOption) {
  4409. if (userOption[key] == null) {
  4410. let def = defaultOption[key];
  4411. if (def != null && typeof def === "object") {
  4412. userOption[key] = MeScroll.extend({}, def);
  4413. } else {
  4414. userOption[key] = def;
  4415. }
  4416. } else if (typeof userOption[key] === "object") {
  4417. MeScroll.extend(userOption[key], defaultOption[key]);
  4418. }
  4419. }
  4420. return userOption;
  4421. };
  4422. MeScroll.prototype.hasColor = function(color2) {
  4423. if (!color2)
  4424. return false;
  4425. let c = color2.toLowerCase();
  4426. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  4427. };
  4428. MeScroll.prototype.initDownScroll = function() {
  4429. let me = this;
  4430. me.optDown = me.options.down || {};
  4431. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
  4432. me.optDown.textColor = "#fff";
  4433. me.extendDownScroll(me.optDown);
  4434. if (me.isScrollBody && me.optDown.native) {
  4435. me.optDown.use = false;
  4436. } else {
  4437. me.optDown.native = false;
  4438. }
  4439. me.downHight = 0;
  4440. if (me.optDown.use && me.optDown.inited) {
  4441. setTimeout(function() {
  4442. me.optDown.inited(me);
  4443. }, 0);
  4444. }
  4445. };
  4446. MeScroll.prototype.touchstartEvent = function(e) {
  4447. if (!this.optDown.use)
  4448. return;
  4449. this.startPoint = this.getPoint(e);
  4450. this.startTop = this.getScrollTop();
  4451. this.startAngle = 0;
  4452. this.lastPoint = this.startPoint;
  4453. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
  4454. this.inTouchend = false;
  4455. };
  4456. MeScroll.prototype.touchmoveEvent = function(e) {
  4457. if (!this.optDown.use)
  4458. return;
  4459. let me = this;
  4460. let scrollTop = me.getScrollTop();
  4461. let curPoint = me.getPoint(e);
  4462. let moveY = curPoint.y - me.startPoint.y;
  4463. if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
  4464. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
  4465. if (!me.startAngle)
  4466. me.startAngle = me.getAngle(me.lastPoint, curPoint);
  4467. if (me.startAngle < me.optDown.minAngle)
  4468. return;
  4469. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  4470. me.inTouchend = true;
  4471. me.touchendEvent();
  4472. return;
  4473. }
  4474. me.preventDefault(e);
  4475. let diff = curPoint.y - me.lastPoint.y;
  4476. if (me.downHight < me.optDown.offset) {
  4477. if (me.movetype !== 1) {
  4478. me.movetype = 1;
  4479. me.isDownEndSuccess = null;
  4480. me.optDown.inOffset && me.optDown.inOffset(me);
  4481. me.isMoveDown = true;
  4482. }
  4483. me.downHight += diff * me.optDown.inOffsetRate;
  4484. } else {
  4485. if (me.movetype !== 2) {
  4486. me.movetype = 2;
  4487. me.optDown.outOffset && me.optDown.outOffset(me);
  4488. me.isMoveDown = true;
  4489. }
  4490. if (diff > 0) {
  4491. me.downHight += diff * me.optDown.outOffsetRate;
  4492. } else {
  4493. me.downHight += diff;
  4494. }
  4495. }
  4496. me.downHight = Math.round(me.downHight);
  4497. let rate = me.downHight / me.optDown.offset;
  4498. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
  4499. }
  4500. }
  4501. me.lastPoint = curPoint;
  4502. };
  4503. MeScroll.prototype.touchendEvent = function(e) {
  4504. if (!this.optDown.use)
  4505. return;
  4506. if (this.isMoveDown) {
  4507. if (this.downHight >= this.optDown.offset) {
  4508. this.triggerDownScroll();
  4509. } else {
  4510. this.downHight = 0;
  4511. this.endDownScrollCall(this);
  4512. }
  4513. this.movetype = 0;
  4514. this.isMoveDown = false;
  4515. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
  4516. let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
  4517. if (isScrollUp) {
  4518. let angle = this.getAngle(this.getPoint(e), this.startPoint);
  4519. if (angle > 80) {
  4520. this.triggerUpScroll(true);
  4521. }
  4522. }
  4523. }
  4524. };
  4525. MeScroll.prototype.getPoint = function(e) {
  4526. if (!e) {
  4527. return {
  4528. x: 0,
  4529. y: 0
  4530. };
  4531. }
  4532. if (e.touches && e.touches[0]) {
  4533. return {
  4534. x: e.touches[0].pageX,
  4535. y: e.touches[0].pageY
  4536. };
  4537. } else if (e.changedTouches && e.changedTouches[0]) {
  4538. return {
  4539. x: e.changedTouches[0].pageX,
  4540. y: e.changedTouches[0].pageY
  4541. };
  4542. } else {
  4543. return {
  4544. x: e.clientX,
  4545. y: e.clientY
  4546. };
  4547. }
  4548. };
  4549. MeScroll.prototype.getAngle = function(p1, p2) {
  4550. let x = Math.abs(p1.x - p2.x);
  4551. let y = Math.abs(p1.y - p2.y);
  4552. let z = Math.sqrt(x * x + y * y);
  4553. let angle = 0;
  4554. if (z !== 0) {
  4555. angle = Math.asin(y / z) / Math.PI * 180;
  4556. }
  4557. return angle;
  4558. };
  4559. MeScroll.prototype.triggerDownScroll = function() {
  4560. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
  4561. ;
  4562. else {
  4563. this.showDownScroll();
  4564. !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
  4565. }
  4566. };
  4567. MeScroll.prototype.showDownScroll = function() {
  4568. this.isDownScrolling = true;
  4569. if (this.optDown.native) {
  4570. uni.startPullDownRefresh();
  4571. this.showDownLoadingCall(0);
  4572. } else {
  4573. this.downHight = this.optDown.offset;
  4574. this.showDownLoadingCall(this.downHight);
  4575. }
  4576. };
  4577. MeScroll.prototype.showDownLoadingCall = function(downHight) {
  4578. this.optDown.showLoading && this.optDown.showLoading(this, downHight);
  4579. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
  4580. };
  4581. MeScroll.prototype.onPullDownRefresh = function() {
  4582. this.isDownScrolling = true;
  4583. this.showDownLoadingCall(0);
  4584. this.optDown.callback && this.optDown.callback(this);
  4585. };
  4586. MeScroll.prototype.endDownScroll = function() {
  4587. if (this.optDown.native) {
  4588. this.isDownScrolling = false;
  4589. this.endDownScrollCall(this);
  4590. uni.stopPullDownRefresh();
  4591. return;
  4592. }
  4593. let me = this;
  4594. let endScroll = function() {
  4595. me.downHight = 0;
  4596. me.isDownScrolling = false;
  4597. me.endDownScrollCall(me);
  4598. if (!me.isScrollBody) {
  4599. me.setScrollHeight(0);
  4600. me.scrollTo(0, 0);
  4601. }
  4602. };
  4603. let delay = 0;
  4604. if (me.optDown.beforeEndDownScroll) {
  4605. delay = me.optDown.beforeEndDownScroll(me);
  4606. if (me.isDownEndSuccess == null)
  4607. delay = 0;
  4608. }
  4609. if (typeof delay === "number" && delay > 0) {
  4610. setTimeout(endScroll, delay);
  4611. } else {
  4612. endScroll();
  4613. }
  4614. };
  4615. MeScroll.prototype.endDownScrollCall = function() {
  4616. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  4617. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  4618. };
  4619. MeScroll.prototype.lockDownScroll = function(isLock) {
  4620. if (isLock == null)
  4621. isLock = true;
  4622. this.optDown.isLock = isLock;
  4623. };
  4624. MeScroll.prototype.lockUpScroll = function(isLock) {
  4625. if (isLock == null)
  4626. isLock = true;
  4627. this.optUp.isLock = isLock;
  4628. };
  4629. MeScroll.prototype.initUpScroll = function() {
  4630. let me = this;
  4631. me.optUp = me.options.up || { use: false };
  4632. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
  4633. me.optUp.textColor = "#fff";
  4634. me.extendUpScroll(me.optUp);
  4635. if (me.optUp.use === false)
  4636. return;
  4637. me.optUp.hasNext = true;
  4638. me.startNum = me.optUp.page.num + 1;
  4639. if (me.optUp.inited) {
  4640. setTimeout(function() {
  4641. me.optUp.inited(me);
  4642. }, 0);
  4643. }
  4644. };
  4645. MeScroll.prototype.onReachBottom = function() {
  4646. if (this.isScrollBody && !this.isUpScrolling) {
  4647. if (!this.optUp.isLock && this.optUp.hasNext) {
  4648. this.triggerUpScroll();
  4649. }
  4650. }
  4651. };
  4652. MeScroll.prototype.onPageScroll = function(e) {
  4653. if (!this.isScrollBody)
  4654. return;
  4655. this.setScrollTop(e.scrollTop);
  4656. if (e.scrollTop >= this.optUp.toTop.offset) {
  4657. this.showTopBtn();
  4658. } else {
  4659. this.hideTopBtn();
  4660. }
  4661. };
  4662. MeScroll.prototype.scroll = function(e, onScroll) {
  4663. this.setScrollTop(e.scrollTop);
  4664. this.setScrollHeight(e.scrollHeight);
  4665. if (this.preScrollY == null)
  4666. this.preScrollY = 0;
  4667. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  4668. this.preScrollY = e.scrollTop;
  4669. this.isScrollUp && this.triggerUpScroll(true);
  4670. if (e.scrollTop >= this.optUp.toTop.offset) {
  4671. this.showTopBtn();
  4672. } else {
  4673. this.hideTopBtn();
  4674. }
  4675. this.optUp.onScroll && onScroll && onScroll();
  4676. };
  4677. MeScroll.prototype.triggerUpScroll = function(isCheck) {
  4678. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  4679. if (isCheck === true) {
  4680. let canUp = false;
  4681. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  4682. if (this.getScrollBottom() <= this.optUp.offset) {
  4683. canUp = true;
  4684. }
  4685. }
  4686. if (canUp === false)
  4687. return;
  4688. }
  4689. this.showUpScroll();
  4690. this.optUp.page.num++;
  4691. this.isUpAutoLoad = true;
  4692. this.num = this.optUp.page.num;
  4693. this.size = this.optUp.page.size;
  4694. this.time = this.optUp.page.time;
  4695. this.optUp.callback(this);
  4696. }
  4697. };
  4698. MeScroll.prototype.showUpScroll = function() {
  4699. this.isUpScrolling = true;
  4700. this.optUp.showLoading && this.optUp.showLoading(this);
  4701. };
  4702. MeScroll.prototype.showNoMore = function() {
  4703. this.optUp.hasNext = false;
  4704. this.optUp.showNoMore && this.optUp.showNoMore(this);
  4705. };
  4706. MeScroll.prototype.hideUpScroll = function() {
  4707. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
  4708. };
  4709. MeScroll.prototype.endUpScroll = function(isShowNoMore) {
  4710. if (isShowNoMore != null) {
  4711. if (isShowNoMore) {
  4712. this.showNoMore();
  4713. } else {
  4714. this.hideUpScroll();
  4715. }
  4716. }
  4717. this.isUpScrolling = false;
  4718. };
  4719. MeScroll.prototype.resetUpScroll = function(isShowLoading) {
  4720. if (this.optUp && this.optUp.use) {
  4721. let page2 = this.optUp.page;
  4722. this.prePageNum = page2.num;
  4723. this.prePageTime = page2.time;
  4724. page2.num = this.startNum;
  4725. page2.time = null;
  4726. if (!this.isDownScrolling && isShowLoading !== false) {
  4727. if (isShowLoading == null) {
  4728. this.removeEmpty();
  4729. this.showUpScroll();
  4730. } else {
  4731. this.showDownScroll();
  4732. }
  4733. }
  4734. this.isUpAutoLoad = true;
  4735. this.num = page2.num;
  4736. this.size = page2.size;
  4737. this.time = page2.time;
  4738. this.optUp.callback && this.optUp.callback(this);
  4739. }
  4740. };
  4741. MeScroll.prototype.setPageNum = function(num) {
  4742. this.optUp.page.num = num - 1;
  4743. };
  4744. MeScroll.prototype.setPageSize = function(size) {
  4745. this.optUp.page.size = size;
  4746. };
  4747. MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
  4748. let hasNext;
  4749. if (this.optUp.use && totalPage != null)
  4750. hasNext = this.optUp.page.num < totalPage;
  4751. this.endSuccess(dataSize, hasNext, systime);
  4752. };
  4753. MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
  4754. let hasNext;
  4755. if (this.optUp.use && totalSize != null) {
  4756. let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
  4757. hasNext = loadSize < totalSize;
  4758. }
  4759. this.endSuccess(dataSize, hasNext, systime);
  4760. };
  4761. MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
  4762. let me = this;
  4763. if (me.isDownScrolling) {
  4764. me.isDownEndSuccess = true;
  4765. me.endDownScroll();
  4766. }
  4767. if (me.optUp.use) {
  4768. let isShowNoMore;
  4769. if (dataSize != null) {
  4770. let pageNum = me.optUp.page.num;
  4771. let pageSize = me.optUp.page.size;
  4772. if (pageNum === 1) {
  4773. if (systime)
  4774. me.optUp.page.time = systime;
  4775. }
  4776. if (dataSize < pageSize || hasNext === false) {
  4777. me.optUp.hasNext = false;
  4778. if (dataSize === 0 && pageNum === 1) {
  4779. isShowNoMore = false;
  4780. me.showEmpty();
  4781. } else {
  4782. let allDataSize = (pageNum - 1) * pageSize + dataSize;
  4783. if (allDataSize < me.optUp.noMoreSize) {
  4784. isShowNoMore = false;
  4785. } else {
  4786. isShowNoMore = true;
  4787. }
  4788. me.removeEmpty();
  4789. }
  4790. } else {
  4791. isShowNoMore = false;
  4792. me.optUp.hasNext = true;
  4793. me.removeEmpty();
  4794. }
  4795. }
  4796. me.endUpScroll(isShowNoMore);
  4797. }
  4798. };
  4799. MeScroll.prototype.endErr = function(errDistance) {
  4800. if (this.isDownScrolling) {
  4801. this.isDownEndSuccess = false;
  4802. let page2 = this.optUp.page;
  4803. if (page2 && this.prePageNum) {
  4804. page2.num = this.prePageNum;
  4805. page2.time = this.prePageTime;
  4806. }
  4807. this.endDownScroll();
  4808. }
  4809. if (this.isUpScrolling) {
  4810. this.optUp.page.num--;
  4811. this.endUpScroll(false);
  4812. if (this.isScrollBody && errDistance !== 0) {
  4813. if (!errDistance)
  4814. errDistance = this.optUp.errDistance;
  4815. this.scrollTo(this.getScrollTop() - errDistance, 0);
  4816. }
  4817. }
  4818. };
  4819. MeScroll.prototype.showEmpty = function() {
  4820. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  4821. };
  4822. MeScroll.prototype.removeEmpty = function() {
  4823. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  4824. };
  4825. MeScroll.prototype.showTopBtn = function() {
  4826. if (!this.topBtnShow) {
  4827. this.topBtnShow = true;
  4828. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  4829. }
  4830. };
  4831. MeScroll.prototype.hideTopBtn = function() {
  4832. if (this.topBtnShow) {
  4833. this.topBtnShow = false;
  4834. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  4835. }
  4836. };
  4837. MeScroll.prototype.getScrollTop = function() {
  4838. return this.scrollTop || 0;
  4839. };
  4840. MeScroll.prototype.setScrollTop = function(y) {
  4841. this.scrollTop = y;
  4842. };
  4843. MeScroll.prototype.scrollTo = function(y, t) {
  4844. this.myScrollTo && this.myScrollTo(y, t);
  4845. };
  4846. MeScroll.prototype.resetScrollTo = function(myScrollTo) {
  4847. this.myScrollTo = myScrollTo;
  4848. };
  4849. MeScroll.prototype.getScrollBottom = function() {
  4850. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  4851. };
  4852. MeScroll.prototype.getStep = function(star, end, callback, t, rate) {
  4853. let diff = end - star;
  4854. if (t === 0 || diff === 0) {
  4855. callback && callback(end);
  4856. return;
  4857. }
  4858. t = t || 300;
  4859. rate = rate || 30;
  4860. let count = t / rate;
  4861. let step = diff / count;
  4862. let i = 0;
  4863. let timer = setInterval(function() {
  4864. if (i < count - 1) {
  4865. star += step;
  4866. callback && callback(star, timer);
  4867. i++;
  4868. } else {
  4869. callback && callback(end, timer);
  4870. clearInterval(timer);
  4871. }
  4872. }, rate);
  4873. };
  4874. MeScroll.prototype.getClientHeight = function(isReal) {
  4875. let h = this.clientHeight || 0;
  4876. if (h === 0 && isReal !== true) {
  4877. h = this.getBodyHeight();
  4878. }
  4879. return h;
  4880. };
  4881. MeScroll.prototype.setClientHeight = function(h) {
  4882. this.clientHeight = h;
  4883. };
  4884. MeScroll.prototype.getScrollHeight = function() {
  4885. return this.scrollHeight || 0;
  4886. };
  4887. MeScroll.prototype.setScrollHeight = function(h) {
  4888. this.scrollHeight = h;
  4889. };
  4890. MeScroll.prototype.getBodyHeight = function() {
  4891. return this.bodyHeight || 0;
  4892. };
  4893. MeScroll.prototype.setBodyHeight = function(h) {
  4894. this.bodyHeight = h;
  4895. };
  4896. MeScroll.prototype.preventDefault = function(e) {
  4897. if (e && e.cancelable && !e.defaultPrevented)
  4898. e.preventDefault();
  4899. };
  4900. const _sfc_main$2o = {
  4901. props: {
  4902. // up.toTop的配置项
  4903. option: Object,
  4904. // 是否显示
  4905. value: false
  4906. },
  4907. computed: {
  4908. // 支付宝小程序需写成计算属性,prop定义default仍报错
  4909. mOption() {
  4910. return this.option || {};
  4911. },
  4912. // 优先显示左边
  4913. left() {
  4914. return this.mOption.left ? this.addUnit(this.mOption.left) : "auto";
  4915. },
  4916. // 右边距离 (优先显示左边)
  4917. right() {
  4918. return this.mOption.left ? "auto" : this.addUnit(this.mOption.right);
  4919. }
  4920. },
  4921. methods: {
  4922. addUnit(num) {
  4923. if (!num)
  4924. return 0;
  4925. if (typeof num === "number")
  4926. return num + "rpx";
  4927. return num;
  4928. },
  4929. toTopClick() {
  4930. this.$emit("input", false);
  4931. this.$emit("click");
  4932. }
  4933. }
  4934. };
  4935. function _sfc_render$2B(_ctx, _cache, $props, $setup, $data, $options) {
  4936. return $options.mOption.src ? (vue.openBlock(), vue.createElementBlock("image", {
  4937. key: 0,
  4938. class: vue.normalizeClass(["mescroll-totop", [$props.value ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $options.mOption.safearea }]]),
  4939. style: vue.normalizeStyle({ "z-index": $options.mOption.zIndex, "left": $options.left, "right": $options.right, "bottom": $options.addUnit($options.mOption.bottom), "width": $options.addUnit($options.mOption.width), "border-radius": $options.addUnit($options.mOption.radius) }),
  4940. src: $options.mOption.src,
  4941. mode: "widthFix",
  4942. onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
  4943. }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
  4944. }
  4945. const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$2o, [["render", _sfc_render$2B], ["__scopeId", "data-v-49fff3a8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mescroll-uni/components/mescroll-uni/components/mescroll-top.vue"]]);
  4946. const WxsMixin = {
  4947. data() {
  4948. return {
  4949. // 传入wxs视图层的数据 (响应式)
  4950. wxsProp: {
  4951. optDown: {},
  4952. // 下拉刷新的配置
  4953. scrollTop: 0,
  4954. // 滚动条的距离
  4955. bodyHeight: 0,
  4956. // body的高度
  4957. isDownScrolling: false,
  4958. // 是否正在下拉刷新中
  4959. isUpScrolling: false,
  4960. // 是否正在上拉加载中
  4961. isScrollBody: true,
  4962. // 是否为mescroll-body滚动
  4963. isUpBoth: true,
  4964. // 上拉加载时,是否同时可以下拉刷新
  4965. t: 0
  4966. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4967. },
  4968. // 标记调用wxs视图层的方法
  4969. callProp: {
  4970. callType: "",
  4971. // 方法名
  4972. t: 0
  4973. // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4974. }
  4975. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  4976. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  4977. };
  4978. },
  4979. methods: {
  4980. // wxs视图层调用逻辑层的回调
  4981. wxsCall(msg) {
  4982. if (msg.type === "setWxsProp") {
  4983. this.wxsProp = {
  4984. optDown: this.mescroll.optDown,
  4985. scrollTop: this.mescroll.getScrollTop(),
  4986. bodyHeight: this.mescroll.getBodyHeight(),
  4987. isDownScrolling: this.mescroll.isDownScrolling,
  4988. isUpScrolling: this.mescroll.isUpScrolling,
  4989. isUpBoth: this.mescroll.optUp.isBoth,
  4990. isScrollBody: this.mescroll.isScrollBody,
  4991. t: Date.now()
  4992. };
  4993. } else if (msg.type === "setLoadType") {
  4994. this.downLoadType = msg.downLoadType;
  4995. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  4996. this.$set(this.mescroll, "isDownEndSuccess", null);
  4997. } else if (msg.type === "triggerDownScroll") {
  4998. this.mescroll.triggerDownScroll();
  4999. } else if (msg.type === "endDownScroll") {
  5000. this.mescroll.endDownScroll();
  5001. } else if (msg.type === "triggerUpScroll") {
  5002. this.mescroll.triggerUpScroll(true);
  5003. }
  5004. }
  5005. },
  5006. mounted() {
  5007. this.mescroll.optDown.afterLoading = () => {
  5008. this.callProp = { callType: "showLoading", t: Date.now() };
  5009. };
  5010. this.mescroll.optDown.afterEndDownScroll = () => {
  5011. this.callProp = { callType: "endDownScroll", t: Date.now() };
  5012. let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
  5013. setTimeout(() => {
  5014. if (this.downLoadType === 4 || this.downLoadType === 0) {
  5015. this.callProp = { callType: "clearTransform", t: Date.now() };
  5016. }
  5017. this.$set(this.mescroll, "downLoadType", this.downLoadType);
  5018. }, delay);
  5019. };
  5020. this.wxsCall({ type: "setWxsProp" });
  5021. }
  5022. };
  5023. const block0$1 = (Comp) => {
  5024. (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
  5025. (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
  5026. };
  5027. const block1 = (Comp) => {
  5028. (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
  5029. (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "1ca30ca9";
  5030. };
  5031. const _sfc_main$2n = {
  5032. name: "mescroll-body",
  5033. mixins: [WxsMixin],
  5034. components: {
  5035. MescrollTop
  5036. },
  5037. props: {
  5038. down: Object,
  5039. up: Object,
  5040. i18n: Object,
  5041. top: [String, Number],
  5042. topbar: [Boolean, String],
  5043. bottom: [String, Number],
  5044. safearea: Boolean,
  5045. height: [String, Number],
  5046. bottombar: {
  5047. type: Boolean,
  5048. default: true
  5049. },
  5050. sticky: Boolean
  5051. },
  5052. data() {
  5053. return {
  5054. mescroll: { optDown: {}, optUp: {} },
  5055. // mescroll实例
  5056. downHight: 0,
  5057. //下拉刷新: 容器高度
  5058. downRate: 0,
  5059. // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
  5060. downLoadType: 0,
  5061. // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
  5062. upLoadType: 0,
  5063. // 上拉加载状态:0(loading前),1(loading中),2(没有更多了,显示END文本提示),3(没有更多了,不显示END文本提示)
  5064. isShowEmpty: false,
  5065. // 是否显示空布局
  5066. isShowToTop: false,
  5067. // 是否显示回到顶部按钮
  5068. windowHeight: 0,
  5069. // 可使用窗口的高度
  5070. windowBottom: 0,
  5071. // 可使用窗口的底部位置
  5072. statusBarHeight: 0
  5073. // 状态栏高度
  5074. };
  5075. },
  5076. computed: {
  5077. // mescroll最小高度,默认windowHeight,使列表不满屏仍可下拉
  5078. minHeight() {
  5079. return this.toPx(this.height || "100%") + "px";
  5080. },
  5081. // 下拉布局往下偏移的距离 (px)
  5082. numTop() {
  5083. return this.toPx(this.top);
  5084. },
  5085. padTop() {
  5086. return this.numTop + "px";
  5087. },
  5088. // 上拉布局往上偏移 (px)
  5089. numBottom() {
  5090. return this.toPx(this.bottom);
  5091. },
  5092. padBottom() {
  5093. return this.numBottom + "px";
  5094. },
  5095. // 是否为重置下拉的状态
  5096. isDownReset() {
  5097. return this.downLoadType === 3 || this.downLoadType === 4;
  5098. },
  5099. // 过渡
  5100. transition() {
  5101. return this.isDownReset ? "transform 300ms" : "";
  5102. },
  5103. translateY() {
  5104. return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
  5105. },
  5106. // 是否在加载中
  5107. isDownLoading() {
  5108. return this.downLoadType === 3;
  5109. },
  5110. // 旋转的角度
  5111. downRotate() {
  5112. return "rotate(" + 360 * this.downRate + "deg)";
  5113. },
  5114. // 文本提示
  5115. downText() {
  5116. if (!this.mescroll)
  5117. return "";
  5118. switch (this.downLoadType) {
  5119. case 1:
  5120. return this.mescroll.optDown.textInOffset;
  5121. case 2:
  5122. return this.mescroll.optDown.textOutOffset;
  5123. case 3:
  5124. return this.mescroll.optDown.textLoading;
  5125. case 4:
  5126. return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
  5127. default:
  5128. return this.mescroll.optDown.textInOffset;
  5129. }
  5130. }
  5131. },
  5132. methods: {
  5133. //number,rpx,upx,px,% --> px的数值
  5134. toPx(num) {
  5135. if (typeof num === "string") {
  5136. if (num.indexOf("px") !== -1) {
  5137. if (num.indexOf("rpx") !== -1) {
  5138. num = num.replace("rpx", "");
  5139. } else if (num.indexOf("upx") !== -1) {
  5140. num = num.replace("upx", "");
  5141. } else {
  5142. return Number(num.replace("px", ""));
  5143. }
  5144. } else if (num.indexOf("%") !== -1) {
  5145. let rate = Number(num.replace("%", "")) / 100;
  5146. return this.windowHeight * rate;
  5147. }
  5148. }
  5149. return num ? uni.upx2px(Number(num)) : 0;
  5150. },
  5151. // 点击空布局的按钮回调
  5152. emptyClick() {
  5153. this.$emit("emptyclick", this.mescroll);
  5154. },
  5155. // 点击回到顶部的按钮回调
  5156. toTopClick() {
  5157. this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
  5158. this.$emit("topclick", this.mescroll);
  5159. }
  5160. },
  5161. // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
  5162. created() {
  5163. let vm = this;
  5164. let diyOption = {
  5165. // 下拉刷新的配置
  5166. down: {
  5167. inOffset() {
  5168. vm.downLoadType = 1;
  5169. },
  5170. outOffset() {
  5171. vm.downLoadType = 2;
  5172. },
  5173. onMoving(mescroll, rate, downHight) {
  5174. vm.downHight = downHight;
  5175. vm.downRate = rate;
  5176. },
  5177. showLoading(mescroll, downHight) {
  5178. vm.downLoadType = 3;
  5179. vm.downHight = downHight;
  5180. },
  5181. beforeEndDownScroll(mescroll) {
  5182. vm.downLoadType = 4;
  5183. return mescroll.optDown.beforeEndDelay;
  5184. },
  5185. endDownScroll() {
  5186. vm.downLoadType = 4;
  5187. vm.downHight = 0;
  5188. if (vm.downResetTimer) {
  5189. clearTimeout(vm.downResetTimer);
  5190. vm.downResetTimer = null;
  5191. }
  5192. vm.downResetTimer = setTimeout(() => {
  5193. if (vm.downLoadType === 4)
  5194. vm.downLoadType = 0;
  5195. }, 300);
  5196. },
  5197. // 派发下拉刷新的回调
  5198. callback: function(mescroll) {
  5199. vm.$emit("down", mescroll);
  5200. }
  5201. },
  5202. // 上拉加载的配置
  5203. up: {
  5204. // 显示加载中的回调
  5205. showLoading() {
  5206. vm.upLoadType = 1;
  5207. },
  5208. // 显示无更多数据的回调
  5209. showNoMore() {
  5210. vm.upLoadType = 2;
  5211. },
  5212. // 隐藏上拉加载的回调
  5213. hideUpScroll(mescroll) {
  5214. vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
  5215. },
  5216. // 空布局
  5217. empty: {
  5218. onShow(isShow) {
  5219. vm.isShowEmpty = isShow;
  5220. }
  5221. },
  5222. // 回到顶部
  5223. toTop: {
  5224. onShow(isShow) {
  5225. vm.isShowToTop = isShow;
  5226. }
  5227. },
  5228. // 派发上拉加载的回调
  5229. callback: function(mescroll) {
  5230. vm.$emit("up", mescroll);
  5231. }
  5232. }
  5233. };
  5234. let i18nType = mescrollI18n.getType();
  5235. let i18nOption = { type: i18nType };
  5236. MeScroll.extend(i18nOption, vm.i18n);
  5237. MeScroll.extend(i18nOption, GlobalOption.i18n);
  5238. MeScroll.extend(diyOption, i18nOption[i18nType]);
  5239. MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
  5240. let myOption = JSON.parse(JSON.stringify({ down: vm.down, up: vm.up }));
  5241. MeScroll.extend(myOption, diyOption);
  5242. vm.mescroll = new MeScroll(myOption, true);
  5243. vm.mescroll.i18n = i18nOption;
  5244. vm.$emit("init", vm.mescroll);
  5245. const sys2 = uni.getSystemInfoSync();
  5246. if (sys2.windowHeight)
  5247. vm.windowHeight = sys2.windowHeight;
  5248. if (sys2.windowBottom)
  5249. vm.windowBottom = sys2.windowBottom;
  5250. if (sys2.statusBarHeight)
  5251. vm.statusBarHeight = sys2.statusBarHeight;
  5252. vm.mescroll.setBodyHeight(sys2.windowHeight);
  5253. vm.mescroll.resetScrollTo((y, t) => {
  5254. if (typeof y === "string") {
  5255. setTimeout(() => {
  5256. let selector;
  5257. if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
  5258. selector = "#" + y;
  5259. } else {
  5260. selector = y;
  5261. if (y.indexOf(">>>") != -1) {
  5262. selector = y.split(">>>")[1].trim();
  5263. }
  5264. }
  5265. uni.createSelectorQuery().select(selector).boundingClientRect(function(rect) {
  5266. if (rect) {
  5267. let top = rect.top;
  5268. top += vm.mescroll.getScrollTop();
  5269. uni.pageScrollTo({
  5270. scrollTop: top,
  5271. duration: t
  5272. });
  5273. } else {
  5274. formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue:352", selector + " does not exist");
  5275. }
  5276. }).exec();
  5277. }, 30);
  5278. } else {
  5279. uni.pageScrollTo({
  5280. scrollTop: y,
  5281. duration: t
  5282. });
  5283. }
  5284. });
  5285. if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
  5286. ;
  5287. else {
  5288. vm.mescroll.optUp.toTop.safearea = vm.safearea;
  5289. }
  5290. uni.$on("setMescrollGlobalOption", (options) => {
  5291. if (!options)
  5292. return;
  5293. let i18nType2 = options.i18n ? options.i18n.type : null;
  5294. if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
  5295. vm.mescroll.i18n.type = i18nType2;
  5296. mescrollI18n.setType(i18nType2);
  5297. MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
  5298. }
  5299. if (options.down) {
  5300. let down = MeScroll.extend({}, options.down);
  5301. vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
  5302. }
  5303. if (options.up) {
  5304. let up = MeScroll.extend({}, options.up);
  5305. vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
  5306. }
  5307. });
  5308. },
  5309. destroyed() {
  5310. uni.$off("setMescrollGlobalOption");
  5311. }
  5312. };
  5313. function _sfc_render$2A(_ctx, _cache, $props, $setup, $data, $options) {
  5314. const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$d);
  5315. const _component_mescroll_top = vue.resolveComponent("mescroll-top");
  5316. return vue.openBlock(), vue.createElementBlock("view", {
  5317. class: vue.normalizeClass(["mescroll-body mescroll-render-touch", { "mescorll-sticky": $props.sticky }]),
  5318. style: vue.normalizeStyle({ "minHeight": $options.minHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom }),
  5319. onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
  5320. onTouchmove: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
  5321. onTouchend: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  5322. onTouchcancel: _cache[4] || (_cache[4] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
  5323. "change:prop": _ctx.wxsBiz.propObserver,
  5324. prop: vue.wp(_ctx.wxsProp)
  5325. }, [
  5326. vue.createCommentVNode(" 状态栏 "),
  5327. $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
  5328. "view",
  5329. {
  5330. key: 0,
  5331. class: "mescroll-topbar",
  5332. style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
  5333. },
  5334. null,
  5335. 4
  5336. /* STYLE */
  5337. )) : vue.createCommentVNode("v-if", true),
  5338. vue.createElementVNode("view", {
  5339. class: "mescroll-body-content mescroll-wxs-content",
  5340. style: vue.normalizeStyle({ transform: $options.translateY, transition: $options.transition }),
  5341. "change:prop": _ctx.wxsBiz.callObserver,
  5342. prop: vue.wp(_ctx.callProp)
  5343. }, [
  5344. vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
  5345. vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
  5346. $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
  5347. "view",
  5348. {
  5349. key: 0,
  5350. class: "mescroll-downwarp",
  5351. style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
  5352. },
  5353. [
  5354. vue.createElementVNode("view", { class: "downwarp-content" }, [
  5355. vue.createElementVNode(
  5356. "view",
  5357. {
  5358. class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
  5359. style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
  5360. },
  5361. null,
  5362. 6
  5363. /* CLASS, STYLE */
  5364. ),
  5365. vue.createElementVNode(
  5366. "view",
  5367. { class: "downwarp-tip" },
  5368. vue.toDisplayString($options.downText),
  5369. 1
  5370. /* TEXT */
  5371. )
  5372. ])
  5373. ],
  5374. 4
  5375. /* STYLE */
  5376. )) : vue.createCommentVNode("v-if", true),
  5377. vue.createCommentVNode(" 列表内容 "),
  5378. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  5379. vue.createCommentVNode(" 空布局 "),
  5380. $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
  5381. key: 1,
  5382. option: $data.mescroll.optUp.empty,
  5383. onEmptyclick: $options.emptyClick
  5384. }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
  5385. vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
  5386. vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
  5387. $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
  5388. "view",
  5389. {
  5390. key: 2,
  5391. class: "mescroll-upwarp",
  5392. style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
  5393. },
  5394. [
  5395. vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
  5396. vue.withDirectives(vue.createElementVNode(
  5397. "view",
  5398. null,
  5399. [
  5400. vue.createElementVNode(
  5401. "view",
  5402. {
  5403. class: "upwarp-progress mescroll-rotate",
  5404. style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
  5405. },
  5406. null,
  5407. 4
  5408. /* STYLE */
  5409. ),
  5410. vue.createElementVNode(
  5411. "view",
  5412. { class: "upwarp-tip" },
  5413. vue.toDisplayString($data.mescroll.optUp.textLoading),
  5414. 1
  5415. /* TEXT */
  5416. )
  5417. ],
  5418. 512
  5419. /* NEED_PATCH */
  5420. ), [
  5421. [vue.vShow, $data.upLoadType === 1]
  5422. ]),
  5423. vue.createCommentVNode(" 无数据 "),
  5424. $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
  5425. "view",
  5426. {
  5427. key: 0,
  5428. class: "upwarp-nodata"
  5429. },
  5430. vue.toDisplayString($data.mescroll.optUp.textNoMore),
  5431. 1
  5432. /* TEXT */
  5433. )) : vue.createCommentVNode("v-if", true)
  5434. ],
  5435. 4
  5436. /* STYLE */
  5437. )) : vue.createCommentVNode("v-if", true)
  5438. ], 12, ["change:prop", "prop"]),
  5439. vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
  5440. vue.createCommentVNode(" 适配iPhoneX "),
  5441. $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
  5442. key: 1,
  5443. class: "mescroll-safearea"
  5444. })) : vue.createCommentVNode("v-if", true),
  5445. vue.createCommentVNode(" 回到顶部按钮 (fixed元素需写在transform外面,防止降级为absolute)"),
  5446. vue.createVNode(_component_mescroll_top, {
  5447. modelValue: $data.isShowToTop,
  5448. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.isShowToTop = $event),
  5449. option: $data.mescroll.optUp.toTop,
  5450. onClick: $options.toTopClick
  5451. }, null, 8, ["modelValue", "option", "onClick"]),
  5452. vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
  5453. vue.createElementVNode("view", {
  5454. "change:prop": _ctx.renderBiz.propObserver,
  5455. prop: vue.wp(_ctx.wxsProp)
  5456. }, null, 8, ["change:prop", "prop"])
  5457. ], 46, ["change:prop", "prop"]);
  5458. }
  5459. if (typeof block0$1 === "function")
  5460. block0$1(_sfc_main$2n);
  5461. if (typeof block1 === "function")
  5462. block1(_sfc_main$2n);
  5463. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["render", _sfc_render$2A], ["__scopeId", "data-v-151374fc"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue"]]);
  5464. const _sfc_main$2m = {
  5465. components: {},
  5466. data() {
  5467. return {
  5468. cateId: 0,
  5469. menuCurrent: 0
  5470. //轮播下标
  5471. };
  5472. },
  5473. props: {
  5474. list: {
  5475. type: Array,
  5476. default: []
  5477. },
  5478. menu: {
  5479. default: 4
  5480. },
  5481. imgW: {
  5482. type: Number,
  5483. default: 88
  5484. }
  5485. },
  5486. computed: {
  5487. carousel() {
  5488. if (this.list) {
  5489. let data = this.sortData(this.list, this.menu * 2);
  5490. return data;
  5491. }
  5492. }
  5493. },
  5494. created() {
  5495. },
  5496. methods: {
  5497. // 数据分层
  5498. sortData(oArr, length) {
  5499. let arr = [];
  5500. let minArr = [];
  5501. oArr.forEach((c) => {
  5502. if (minArr.length === length) {
  5503. minArr = [];
  5504. }
  5505. if (minArr.length === 0) {
  5506. arr.push(minArr);
  5507. }
  5508. minArr.push(c);
  5509. });
  5510. return arr;
  5511. },
  5512. // 轮播
  5513. onSwiper(e) {
  5514. this.menuCurrent = e.detail.current;
  5515. },
  5516. routerTo(item) {
  5517. this.cateId = item.cateId;
  5518. this.$emit("menuClick", item);
  5519. }
  5520. }
  5521. };
  5522. function _sfc_render$2z(_ctx, _cache, $props, $setup, $data, $options) {
  5523. return $options.carousel ? (vue.openBlock(), vue.createElementBlock(
  5524. "view",
  5525. {
  5526. key: 0,
  5527. class: "menu-list-box",
  5528. style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:160rpx` : `height:320rpx`)
  5529. },
  5530. [
  5531. vue.createElementVNode(
  5532. "swiper",
  5533. {
  5534. class: "menu-swiper-box",
  5535. style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:160rpx` : `height:320rpx`),
  5536. onChange: _cache[0] || (_cache[0] = (...args) => $options.onSwiper && $options.onSwiper(...args)),
  5537. circular: "",
  5538. autoplay: false,
  5539. interval: 3e3,
  5540. duration: 1e3
  5541. },
  5542. [
  5543. (vue.openBlock(true), vue.createElementBlock(
  5544. vue.Fragment,
  5545. null,
  5546. vue.renderList($options.carousel, (itemList, index2) => {
  5547. return vue.openBlock(), vue.createElementBlock(
  5548. "swiper-item",
  5549. {
  5550. class: "menu-swiper-item",
  5551. key: index2,
  5552. style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:200rpx` : `height:340rpx`)
  5553. },
  5554. [
  5555. vue.createElementVNode("view", { class: "menu-tab-box" }, [
  5556. (vue.openBlock(true), vue.createElementBlock(
  5557. vue.Fragment,
  5558. null,
  5559. vue.renderList(itemList, (item) => {
  5560. return vue.openBlock(), vue.createElementBlock("view", {
  5561. class: "tab-list",
  5562. key: item.cateId,
  5563. onClick: ($event) => $options.routerTo(item)
  5564. }, [
  5565. vue.createElementVNode("image", {
  5566. class: "tab-img",
  5567. style: vue.normalizeStyle({ width: $props.imgW + "rpx", height: $props.imgW + "rpx" }),
  5568. src: item.imgUrl
  5569. }, null, 12, ["src"]),
  5570. vue.createElementVNode(
  5571. "text",
  5572. {
  5573. class: vue.normalizeClass($data.cateId == item.cateId ? "tab-title active" : "tab-title")
  5574. },
  5575. vue.toDisplayString(item.cateName),
  5576. 3
  5577. /* TEXT, CLASS */
  5578. )
  5579. ], 8, ["onClick"]);
  5580. }),
  5581. 128
  5582. /* KEYED_FRAGMENT */
  5583. ))
  5584. ])
  5585. ],
  5586. 4
  5587. /* STYLE */
  5588. );
  5589. }),
  5590. 128
  5591. /* KEYED_FRAGMENT */
  5592. ))
  5593. ],
  5594. 36
  5595. /* STYLE, NEED_HYDRATION */
  5596. ),
  5597. $options.carousel.length > 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  5598. key: 0,
  5599. class: "menu-dots"
  5600. }, [
  5601. (vue.openBlock(true), vue.createElementBlock(
  5602. vue.Fragment,
  5603. null,
  5604. vue.renderList($options.carousel.length, (dot, index2) => {
  5605. return vue.openBlock(), vue.createElementBlock(
  5606. "text",
  5607. {
  5608. class: vue.normalizeClass($data.menuCurrent === index2 ? "dot-active" : "dot"),
  5609. key: index2
  5610. },
  5611. null,
  5612. 2
  5613. /* CLASS */
  5614. );
  5615. }),
  5616. 128
  5617. /* KEYED_FRAGMENT */
  5618. ))
  5619. ])) : vue.createCommentVNode("v-if", true)
  5620. ],
  5621. 4
  5622. /* STYLE */
  5623. )) : vue.createCommentVNode("v-if", true);
  5624. }
  5625. const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$2m, [["render", _sfc_render$2z], ["__scopeId", "data-v-758a2c95"], ["__file", "E:/Project/2023/问诊平台/his_user_app/components/Menu.vue"]]);
  5626. const MescrollMixin = {
  5627. data() {
  5628. return {
  5629. mescroll: null
  5630. //mescroll实例对象
  5631. };
  5632. },
  5633. // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  5634. onPullDownRefresh() {
  5635. this.mescroll && this.mescroll.onPullDownRefresh();
  5636. },
  5637. // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  5638. onPageScroll(e) {
  5639. this.mescroll && this.mescroll.onPageScroll(e);
  5640. },
  5641. // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  5642. onReachBottom() {
  5643. this.mescroll && this.mescroll.onReachBottom();
  5644. },
  5645. methods: {
  5646. // mescroll组件初始化的回调,可获取到mescroll对象
  5647. mescrollInit(mescroll) {
  5648. this.mescroll = mescroll;
  5649. this.mescrollInitByRef();
  5650. },
  5651. // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序)
  5652. mescrollInitByRef() {
  5653. if (!this.mescroll || !this.mescroll.resetUpScroll) {
  5654. let mescrollRef = this.$refs.mescrollRef;
  5655. if (mescrollRef)
  5656. this.mescroll = mescrollRef.mescroll;
  5657. }
  5658. },
  5659. // 下拉刷新的回调 (mixin默认resetUpScroll)
  5660. downCallback() {
  5661. if (this.mescroll.optUp.use) {
  5662. this.mescroll.resetUpScroll();
  5663. } else {
  5664. setTimeout(() => {
  5665. this.mescroll.endSuccess();
  5666. }, 500);
  5667. }
  5668. },
  5669. // 上拉加载的回调
  5670. upCallback() {
  5671. setTimeout(() => {
  5672. this.mescroll.endErr();
  5673. }, 500);
  5674. }
  5675. },
  5676. mounted() {
  5677. this.mescrollInitByRef();
  5678. }
  5679. };
  5680. const _sfc_main$2l = {
  5681. components: { Menu },
  5682. mixins: [MescrollMixin],
  5683. // 使用mixin
  5684. data() {
  5685. return {
  5686. top: null,
  5687. cates: [],
  5688. diseaseType: 0,
  5689. keyword: "",
  5690. mescroll: null,
  5691. downOption: {
  5692. //下拉刷新
  5693. use: true,
  5694. auto: false
  5695. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  5696. },
  5697. upOption: {
  5698. onScroll: false,
  5699. use: true,
  5700. // 是否启用上拉加载; 默认true
  5701. page: {
  5702. pae: 0,
  5703. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  5704. size: 10
  5705. // 每页数据的数量,默认10
  5706. },
  5707. noMoreSize: 10,
  5708. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  5709. textNoMore: "已经到底了",
  5710. empty: {
  5711. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  5712. tip: "暂无数据"
  5713. }
  5714. },
  5715. dataList: []
  5716. };
  5717. },
  5718. onLoad() {
  5719. this.getPackagCateList(1);
  5720. },
  5721. methods: {
  5722. menuClick(item) {
  5723. this.diseaseType = item.cateId;
  5724. this.mescroll.resetUpScroll();
  5725. },
  5726. getPackagCateList(type2) {
  5727. var data = { type: type2 };
  5728. var that = this;
  5729. getPackagCateList(data).then(
  5730. (res) => {
  5731. if (res.code == 200) {
  5732. this.cates = res.data;
  5733. var query = uni.createSelectorQuery().in(that);
  5734. setTimeout(function() {
  5735. query.select(".top-content").boundingClientRect((data2) => {
  5736. if (data2) {
  5737. formatAppLog("log", "at pages/store/index.vue:91", "View height:", data2.height + "px");
  5738. that.top = data2.height + "px";
  5739. }
  5740. }).exec();
  5741. }, 500);
  5742. }
  5743. },
  5744. (err) => {
  5745. }
  5746. );
  5747. },
  5748. doSearch() {
  5749. this.mescroll.resetUpScroll();
  5750. },
  5751. navTo(url2) {
  5752. uni.navigateTo({
  5753. url: url2
  5754. });
  5755. },
  5756. mescrollInit(mescroll) {
  5757. this.mescroll = mescroll;
  5758. },
  5759. /*下拉刷新的回调 */
  5760. downCallback() {
  5761. this.mescroll.resetUpScroll();
  5762. },
  5763. /*上拉加载的回调*/
  5764. upCallback(page2) {
  5765. var that = this;
  5766. var data = {
  5767. isShow: 1,
  5768. diseaseType: this.diseaseType,
  5769. keyword: this.keyword,
  5770. pageNum: page2.num,
  5771. pageSize: page2.size
  5772. };
  5773. getPackageList(data).then((res) => {
  5774. if (res.code == 200) {
  5775. if (page2.num == 1) {
  5776. that.dataList = res.data.list;
  5777. } else {
  5778. that.dataList = that.dataList.concat(res.data.list);
  5779. }
  5780. that.mescroll.endBySize(res.data.list.length, res.data.total);
  5781. } else {
  5782. uni.showToast({
  5783. icon: "none",
  5784. title: "请求失败"
  5785. });
  5786. that.dataList = null;
  5787. that.mescroll.endErr();
  5788. }
  5789. });
  5790. }
  5791. }
  5792. };
  5793. function _sfc_render$2y(_ctx, _cache, $props, $setup, $data, $options) {
  5794. const _component_Menu = vue.resolveComponent("Menu");
  5795. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  5796. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  5797. vue.createElementVNode("view", { class: "top-content" }, [
  5798. vue.createCommentVNode(" 搜索框 "),
  5799. vue.createElementVNode("view", { class: "search-cont" }, [
  5800. vue.createElementVNode("view", { class: "inner" }, [
  5801. vue.createElementVNode("image", {
  5802. class: "icon-search",
  5803. src: "/static/images/icon_search.png",
  5804. mode: ""
  5805. }),
  5806. vue.withDirectives(vue.createElementVNode(
  5807. "input",
  5808. {
  5809. type: "text",
  5810. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  5811. placeholder: "输入关键字搜索",
  5812. "confirm-type": "search",
  5813. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  5814. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  5815. },
  5816. null,
  5817. 544
  5818. /* NEED_HYDRATION, NEED_PATCH */
  5819. ), [
  5820. [vue.vModelText, $data.keyword]
  5821. ])
  5822. ])
  5823. ]),
  5824. vue.createElementVNode("view", { class: "cate-list" }, [
  5825. $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
  5826. key: 0,
  5827. list: $data.cates,
  5828. onMenuClick: $options.menuClick,
  5829. style: { "width": "100%" }
  5830. }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true)
  5831. ])
  5832. ]),
  5833. $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
  5834. key: 0,
  5835. top: $data.top,
  5836. bottom: "0",
  5837. ref: "mescrollRef",
  5838. onInit: $options.mescrollInit,
  5839. down: $data.downOption,
  5840. up: $data.upOption,
  5841. onDown: $options.downCallback,
  5842. onUp: $options.upCallback
  5843. }, {
  5844. default: vue.withCtx(() => [
  5845. vue.createElementVNode("view", { class: "package-box" }, [
  5846. (vue.openBlock(true), vue.createElementBlock(
  5847. vue.Fragment,
  5848. null,
  5849. vue.renderList($data.dataList, (item, index2) => {
  5850. return vue.openBlock(), vue.createElementBlock("view", {
  5851. class: "item",
  5852. onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item.packageId)
  5853. }, [
  5854. vue.createElementVNode("view", { class: "top" }, [
  5855. vue.createElementVNode("image", {
  5856. src: item.imgUrl
  5857. }, null, 8, ["src"])
  5858. ]),
  5859. vue.createElementVNode("view", { class: "bottom" }, [
  5860. vue.createElementVNode(
  5861. "view",
  5862. { class: "title ellipsis2" },
  5863. vue.toDisplayString(item.packageName),
  5864. 1
  5865. /* TEXT */
  5866. ),
  5867. vue.createElementVNode("view", { class: "price-box" }, [
  5868. vue.createElementVNode(
  5869. "view",
  5870. { class: "price" },
  5871. "¥" + vue.toDisplayString(item.price.toFixed(2)) + "元/日",
  5872. 1
  5873. /* TEXT */
  5874. ),
  5875. vue.createElementVNode(
  5876. "view",
  5877. { class: "count" },
  5878. vue.toDisplayString(item.sales) + "人已购",
  5879. 1
  5880. /* TEXT */
  5881. )
  5882. ])
  5883. ])
  5884. ], 8, ["onClick"]);
  5885. }),
  5886. 256
  5887. /* UNKEYED_FRAGMENT */
  5888. ))
  5889. ])
  5890. ]),
  5891. _: 1
  5892. /* STABLE */
  5893. }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])) : vue.createCommentVNode("v-if", true)
  5894. ]);
  5895. }
  5896. const PagesStoreIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["render", _sfc_render$2y], ["__scopeId", "data-v-f73eb578"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/store/index.vue"]]);
  5897. const props$u = {
  5898. props: {
  5899. color: {
  5900. type: String,
  5901. default: props$y.line.color
  5902. },
  5903. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  5904. length: {
  5905. type: [String, Number],
  5906. default: props$y.line.length
  5907. },
  5908. // 线条方向,col-竖向,row-横向
  5909. direction: {
  5910. type: String,
  5911. default: props$y.line.direction
  5912. },
  5913. // 是否显示细边框
  5914. hairline: {
  5915. type: Boolean,
  5916. default: props$y.line.hairline
  5917. },
  5918. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  5919. margin: {
  5920. type: [String, Number],
  5921. default: props$y.line.margin
  5922. },
  5923. // 是否虚线,true-虚线,false-实线
  5924. dashed: {
  5925. type: Boolean,
  5926. default: props$y.line.dashed
  5927. }
  5928. }
  5929. };
  5930. const _sfc_main$2k = {
  5931. name: "u-line",
  5932. mixins: [mpMixin, mixin, props$u],
  5933. computed: {
  5934. lineStyle() {
  5935. const style = {};
  5936. style.margin = this.margin;
  5937. if (this.direction === "row") {
  5938. style.borderBottomWidth = "1px";
  5939. style.borderBottomStyle = this.dashed ? "dashed" : "solid";
  5940. style.width = uni.$u.addUnit(this.length);
  5941. if (this.hairline)
  5942. style.transform = "scaleY(0.5)";
  5943. } else {
  5944. style.borderLeftWidth = "1px";
  5945. style.borderLeftStyle = this.dashed ? "dashed" : "solid";
  5946. style.height = uni.$u.addUnit(this.length);
  5947. if (this.hairline)
  5948. style.transform = "scaleX(0.5)";
  5949. }
  5950. style.borderColor = this.color;
  5951. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  5952. }
  5953. }
  5954. };
  5955. function _sfc_render$2x(_ctx, _cache, $props, $setup, $data, $options) {
  5956. return vue.openBlock(), vue.createElementBlock(
  5957. "view",
  5958. {
  5959. class: "u-line",
  5960. style: vue.normalizeStyle([$options.lineStyle])
  5961. },
  5962. null,
  5963. 4
  5964. /* STYLE */
  5965. );
  5966. }
  5967. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["render", _sfc_render$2x], ["__scopeId", "data-v-72791e59"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-line/u-line.vue"]]);
  5968. const props$t = {
  5969. props: {
  5970. // 是否展示组件
  5971. show: {
  5972. type: Boolean,
  5973. default: props$y.transition.show
  5974. },
  5975. // 使用的动画模式
  5976. mode: {
  5977. type: String,
  5978. default: props$y.transition.mode
  5979. },
  5980. // 动画的执行时间,单位ms
  5981. duration: {
  5982. type: [String, Number],
  5983. default: props$y.transition.duration
  5984. },
  5985. // 使用的动画过渡函数
  5986. timingFunction: {
  5987. type: String,
  5988. default: props$y.transition.timingFunction
  5989. }
  5990. }
  5991. };
  5992. const getClassNames = (name) => ({
  5993. enter: `u-${name}-enter u-${name}-enter-active`,
  5994. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  5995. leave: `u-${name}-leave u-${name}-leave-active`,
  5996. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  5997. });
  5998. const transition = {
  5999. methods: {
  6000. // 组件被点击发出事件
  6001. clickHandler() {
  6002. this.$emit("click");
  6003. },
  6004. // vue版本的组件进场处理
  6005. vueEnter() {
  6006. const classNames = getClassNames(this.mode);
  6007. this.status = "enter";
  6008. this.$emit("beforeEnter");
  6009. this.inited = true;
  6010. this.display = true;
  6011. this.classes = classNames.enter;
  6012. this.$nextTick(async () => {
  6013. this.$emit("enter");
  6014. this.transitionEnded = false;
  6015. this.$emit("afterEnter");
  6016. this.classes = classNames["enter-to"];
  6017. });
  6018. },
  6019. // 动画离场处理
  6020. vueLeave() {
  6021. if (!this.display)
  6022. return;
  6023. const classNames = getClassNames(this.mode);
  6024. this.status = "leave";
  6025. this.$emit("beforeLeave");
  6026. this.classes = classNames.leave;
  6027. this.$nextTick(() => {
  6028. this.transitionEnded = false;
  6029. this.$emit("leave");
  6030. setTimeout(this.onTransitionEnd, this.duration);
  6031. this.classes = classNames["leave-to"];
  6032. });
  6033. },
  6034. // 完成过渡后触发
  6035. onTransitionEnd() {
  6036. if (this.transitionEnded)
  6037. return;
  6038. this.transitionEnded = true;
  6039. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  6040. if (!this.show && this.display) {
  6041. this.display = false;
  6042. this.inited = false;
  6043. }
  6044. }
  6045. }
  6046. };
  6047. const _sfc_main$2j = {
  6048. name: "u-transition",
  6049. data() {
  6050. return {
  6051. inited: false,
  6052. // 是否显示/隐藏组件
  6053. viewStyle: {},
  6054. // 组件内部的样式
  6055. status: "",
  6056. // 记录组件动画的状态
  6057. transitionEnded: false,
  6058. // 组件是否结束的标记
  6059. display: false,
  6060. // 组件是否展示
  6061. classes: ""
  6062. // 应用的类名
  6063. };
  6064. },
  6065. computed: {
  6066. mergeStyle() {
  6067. const { viewStyle, customStyle } = this;
  6068. return {
  6069. transitionDuration: `${this.duration}ms`,
  6070. // display: `${this.display ? '' : 'none'}`,
  6071. transitionTimingFunction: this.timingFunction,
  6072. // 避免自定义样式影响到动画属性,所以写在viewStyle前面
  6073. ...uni.$u.addStyle(customStyle),
  6074. ...viewStyle
  6075. };
  6076. }
  6077. },
  6078. // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
  6079. mixins: [mpMixin, mixin, transition, props$t],
  6080. watch: {
  6081. show: {
  6082. handler(newVal) {
  6083. newVal ? this.vueEnter() : this.vueLeave();
  6084. },
  6085. // 表示同时监听初始化时的props的show的意思
  6086. immediate: true
  6087. }
  6088. }
  6089. };
  6090. function _sfc_render$2w(_ctx, _cache, $props, $setup, $data, $options) {
  6091. return $data.inited ? (vue.openBlock(), vue.createElementBlock(
  6092. "view",
  6093. {
  6094. key: 0,
  6095. class: vue.normalizeClass(["u-transition", $data.classes]),
  6096. ref: "u-transition",
  6097. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
  6098. style: vue.normalizeStyle([$options.mergeStyle]),
  6099. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
  6100. },
  6101. [
  6102. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6103. ],
  6104. 38
  6105. /* CLASS, STYLE, NEED_HYDRATION */
  6106. )) : vue.createCommentVNode("v-if", true);
  6107. }
  6108. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$2j, [["render", _sfc_render$2w], ["__scopeId", "data-v-5cec8177"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]);
  6109. const props$s = {
  6110. props: {
  6111. // 是否显示遮罩
  6112. show: {
  6113. type: Boolean,
  6114. default: props$y.overlay.show
  6115. },
  6116. // 层级z-index
  6117. zIndex: {
  6118. type: [String, Number],
  6119. default: props$y.overlay.zIndex
  6120. },
  6121. // 遮罩的过渡时间,单位为ms
  6122. duration: {
  6123. type: [String, Number],
  6124. default: props$y.overlay.duration
  6125. },
  6126. // 不透明度值,当做rgba的第四个参数
  6127. opacity: {
  6128. type: [String, Number],
  6129. default: props$y.overlay.opacity
  6130. }
  6131. }
  6132. };
  6133. const _sfc_main$2i = {
  6134. name: "u-overlay",
  6135. mixins: [mpMixin, mixin, props$s],
  6136. computed: {
  6137. overlayStyle() {
  6138. const style = {
  6139. position: "fixed",
  6140. top: 0,
  6141. left: 0,
  6142. right: 0,
  6143. zIndex: this.zIndex,
  6144. bottom: 0,
  6145. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  6146. };
  6147. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6148. }
  6149. },
  6150. methods: {
  6151. clickHandler() {
  6152. this.$emit("click");
  6153. }
  6154. }
  6155. };
  6156. function _sfc_render$2v(_ctx, _cache, $props, $setup, $data, $options) {
  6157. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
  6158. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  6159. show: _ctx.show,
  6160. "custom-class": "u-overlay",
  6161. duration: _ctx.duration,
  6162. "custom-style": $options.overlayStyle,
  6163. onClick: $options.clickHandler
  6164. }, {
  6165. default: vue.withCtx(() => [
  6166. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6167. ]),
  6168. _: 3
  6169. /* FORWARDED */
  6170. }, 8, ["show", "duration", "custom-style", "onClick"]);
  6171. }
  6172. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$2i, [["render", _sfc_render$2v], ["__scopeId", "data-v-9112bed9"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  6173. const props$r = {
  6174. props: {
  6175. bgColor: {
  6176. type: String,
  6177. default: props$y.statusBar.bgColor
  6178. }
  6179. }
  6180. };
  6181. const _sfc_main$2h = {
  6182. name: "u-status-bar",
  6183. mixins: [mpMixin, mixin, props$r],
  6184. data() {
  6185. return {};
  6186. },
  6187. computed: {
  6188. style() {
  6189. const style = {};
  6190. style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
  6191. style.backgroundColor = this.bgColor;
  6192. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6193. }
  6194. }
  6195. };
  6196. function _sfc_render$2u(_ctx, _cache, $props, $setup, $data, $options) {
  6197. return vue.openBlock(), vue.createElementBlock(
  6198. "view",
  6199. {
  6200. style: vue.normalizeStyle([$options.style]),
  6201. class: "u-status-bar"
  6202. },
  6203. [
  6204. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  6205. ],
  6206. 4
  6207. /* STYLE */
  6208. );
  6209. }
  6210. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["render", _sfc_render$2u], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
  6211. const icons = {
  6212. "uicon-level": "",
  6213. "uicon-column-line": "",
  6214. "uicon-checkbox-mark": "",
  6215. "uicon-folder": "",
  6216. "uicon-movie": "",
  6217. "uicon-star-fill": "",
  6218. "uicon-star": "",
  6219. "uicon-phone-fill": "",
  6220. "uicon-phone": "",
  6221. "uicon-apple-fill": "",
  6222. "uicon-chrome-circle-fill": "",
  6223. "uicon-backspace": "",
  6224. "uicon-attach": "",
  6225. "uicon-cut": "",
  6226. "uicon-empty-car": "",
  6227. "uicon-empty-coupon": "",
  6228. "uicon-empty-address": "",
  6229. "uicon-empty-favor": "",
  6230. "uicon-empty-permission": "",
  6231. "uicon-empty-news": "",
  6232. "uicon-empty-search": "",
  6233. "uicon-github-circle-fill": "",
  6234. "uicon-rmb": "",
  6235. "uicon-person-delete-fill": "",
  6236. "uicon-reload": "",
  6237. "uicon-order": "",
  6238. "uicon-server-man": "",
  6239. "uicon-search": "",
  6240. "uicon-fingerprint": "",
  6241. "uicon-more-dot-fill": "",
  6242. "uicon-scan": "",
  6243. "uicon-share-square": "",
  6244. "uicon-map": "",
  6245. "uicon-map-fill": "",
  6246. "uicon-tags": "",
  6247. "uicon-tags-fill": "",
  6248. "uicon-bookmark-fill": "",
  6249. "uicon-bookmark": "",
  6250. "uicon-eye": "",
  6251. "uicon-eye-fill": "",
  6252. "uicon-mic": "",
  6253. "uicon-mic-off": "",
  6254. "uicon-calendar": "",
  6255. "uicon-calendar-fill": "",
  6256. "uicon-trash": "",
  6257. "uicon-trash-fill": "",
  6258. "uicon-play-left": "",
  6259. "uicon-play-right": "",
  6260. "uicon-minus": "",
  6261. "uicon-plus": "",
  6262. "uicon-info": "",
  6263. "uicon-info-circle": "",
  6264. "uicon-info-circle-fill": "",
  6265. "uicon-question": "",
  6266. "uicon-error": "",
  6267. "uicon-close": "",
  6268. "uicon-checkmark": "",
  6269. "uicon-android-circle-fill": "",
  6270. "uicon-android-fill": "",
  6271. "uicon-ie": "",
  6272. "uicon-IE-circle-fill": "",
  6273. "uicon-google": "",
  6274. "uicon-google-circle-fill": "",
  6275. "uicon-setting-fill": "",
  6276. "uicon-setting": "",
  6277. "uicon-minus-square-fill": "",
  6278. "uicon-plus-square-fill": "",
  6279. "uicon-heart": "",
  6280. "uicon-heart-fill": "",
  6281. "uicon-camera": "",
  6282. "uicon-camera-fill": "",
  6283. "uicon-more-circle": "",
  6284. "uicon-more-circle-fill": "",
  6285. "uicon-chat": "",
  6286. "uicon-chat-fill": "",
  6287. "uicon-bag-fill": "",
  6288. "uicon-bag": "",
  6289. "uicon-error-circle-fill": "",
  6290. "uicon-error-circle": "",
  6291. "uicon-close-circle": "",
  6292. "uicon-close-circle-fill": "",
  6293. "uicon-checkmark-circle": "",
  6294. "uicon-checkmark-circle-fill": "",
  6295. "uicon-question-circle-fill": "",
  6296. "uicon-question-circle": "",
  6297. "uicon-share": "",
  6298. "uicon-share-fill": "",
  6299. "uicon-shopping-cart": "",
  6300. "uicon-shopping-cart-fill": "",
  6301. "uicon-bell": "",
  6302. "uicon-bell-fill": "",
  6303. "uicon-list": "",
  6304. "uicon-list-dot": "",
  6305. "uicon-zhihu": "",
  6306. "uicon-zhihu-circle-fill": "",
  6307. "uicon-zhifubao": "",
  6308. "uicon-zhifubao-circle-fill": "",
  6309. "uicon-weixin-circle-fill": "",
  6310. "uicon-weixin-fill": "",
  6311. "uicon-twitter-circle-fill": "",
  6312. "uicon-twitter": "",
  6313. "uicon-taobao-circle-fill": "",
  6314. "uicon-taobao": "",
  6315. "uicon-weibo-circle-fill": "",
  6316. "uicon-weibo": "",
  6317. "uicon-qq-fill": "",
  6318. "uicon-qq-circle-fill": "",
  6319. "uicon-moments-circel-fill": "",
  6320. "uicon-moments": "",
  6321. "uicon-qzone": "",
  6322. "uicon-qzone-circle-fill": "",
  6323. "uicon-baidu-circle-fill": "",
  6324. "uicon-baidu": "",
  6325. "uicon-facebook-circle-fill": "",
  6326. "uicon-facebook": "",
  6327. "uicon-car": "",
  6328. "uicon-car-fill": "",
  6329. "uicon-warning-fill": "",
  6330. "uicon-warning": "",
  6331. "uicon-clock-fill": "",
  6332. "uicon-clock": "",
  6333. "uicon-edit-pen": "",
  6334. "uicon-edit-pen-fill": "",
  6335. "uicon-email": "",
  6336. "uicon-email-fill": "",
  6337. "uicon-minus-circle": "",
  6338. "uicon-minus-circle-fill": "",
  6339. "uicon-plus-circle": "",
  6340. "uicon-plus-circle-fill": "",
  6341. "uicon-file-text": "",
  6342. "uicon-file-text-fill": "",
  6343. "uicon-pushpin": "",
  6344. "uicon-pushpin-fill": "",
  6345. "uicon-grid": "",
  6346. "uicon-grid-fill": "",
  6347. "uicon-play-circle": "",
  6348. "uicon-play-circle-fill": "",
  6349. "uicon-pause-circle-fill": "",
  6350. "uicon-pause": "",
  6351. "uicon-pause-circle": "",
  6352. "uicon-eye-off": "",
  6353. "uicon-eye-off-outline": "",
  6354. "uicon-gift-fill": "",
  6355. "uicon-gift": "",
  6356. "uicon-rmb-circle-fill": "",
  6357. "uicon-rmb-circle": "",
  6358. "uicon-kefu-ermai": "",
  6359. "uicon-server-fill": "",
  6360. "uicon-coupon-fill": "",
  6361. "uicon-coupon": "",
  6362. "uicon-integral": "",
  6363. "uicon-integral-fill": "",
  6364. "uicon-home-fill": "",
  6365. "uicon-home": "",
  6366. "uicon-hourglass-half-fill": "",
  6367. "uicon-hourglass": "",
  6368. "uicon-account": "",
  6369. "uicon-plus-people-fill": "",
  6370. "uicon-minus-people-fill": "",
  6371. "uicon-account-fill": "",
  6372. "uicon-thumb-down-fill": "",
  6373. "uicon-thumb-down": "",
  6374. "uicon-thumb-up": "",
  6375. "uicon-thumb-up-fill": "",
  6376. "uicon-lock-fill": "",
  6377. "uicon-lock-open": "",
  6378. "uicon-lock-opened-fill": "",
  6379. "uicon-lock": "",
  6380. "uicon-red-packet-fill": "",
  6381. "uicon-photo-fill": "",
  6382. "uicon-photo": "",
  6383. "uicon-volume-off-fill": "",
  6384. "uicon-volume-off": "",
  6385. "uicon-volume-fill": "",
  6386. "uicon-volume": "",
  6387. "uicon-red-packet": "",
  6388. "uicon-download": "",
  6389. "uicon-arrow-up-fill": "",
  6390. "uicon-arrow-down-fill": "",
  6391. "uicon-play-left-fill": "",
  6392. "uicon-play-right-fill": "",
  6393. "uicon-rewind-left-fill": "",
  6394. "uicon-rewind-right-fill": "",
  6395. "uicon-arrow-downward": "",
  6396. "uicon-arrow-leftward": "",
  6397. "uicon-arrow-rightward": "",
  6398. "uicon-arrow-upward": "",
  6399. "uicon-arrow-down": "",
  6400. "uicon-arrow-right": "",
  6401. "uicon-arrow-left": "",
  6402. "uicon-arrow-up": "",
  6403. "uicon-skip-back-left": "",
  6404. "uicon-skip-forward-right": "",
  6405. "uicon-rewind-right": "",
  6406. "uicon-rewind-left": "",
  6407. "uicon-arrow-right-double": "",
  6408. "uicon-arrow-left-double": "",
  6409. "uicon-wifi-off": "",
  6410. "uicon-wifi": "",
  6411. "uicon-empty-data": "",
  6412. "uicon-empty-history": "",
  6413. "uicon-empty-list": "",
  6414. "uicon-empty-page": "",
  6415. "uicon-empty-order": "",
  6416. "uicon-man": "",
  6417. "uicon-woman": "",
  6418. "uicon-man-add": "",
  6419. "uicon-man-add-fill": "",
  6420. "uicon-man-delete": "",
  6421. "uicon-man-delete-fill": "",
  6422. "uicon-zh": "",
  6423. "uicon-en": ""
  6424. };
  6425. const props$q = {
  6426. props: {
  6427. // 图标类名
  6428. name: {
  6429. type: String,
  6430. default: props$y.icon.name
  6431. },
  6432. // 图标颜色,可接受主题色
  6433. color: {
  6434. type: String,
  6435. default: props$y.icon.color
  6436. },
  6437. // 字体大小,单位px
  6438. size: {
  6439. type: [String, Number],
  6440. default: props$y.icon.size
  6441. },
  6442. // 是否显示粗体
  6443. bold: {
  6444. type: Boolean,
  6445. default: props$y.icon.bold
  6446. },
  6447. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  6448. index: {
  6449. type: [String, Number],
  6450. default: props$y.icon.index
  6451. },
  6452. // 触摸图标时的类名
  6453. hoverClass: {
  6454. type: String,
  6455. default: props$y.icon.hoverClass
  6456. },
  6457. // 自定义扩展前缀,方便用户扩展自己的图标库
  6458. customPrefix: {
  6459. type: String,
  6460. default: props$y.icon.customPrefix
  6461. },
  6462. // 图标右边或者下面的文字
  6463. label: {
  6464. type: [String, Number],
  6465. default: props$y.icon.label
  6466. },
  6467. // label的位置,只能右边或者下边
  6468. labelPos: {
  6469. type: String,
  6470. default: props$y.icon.labelPos
  6471. },
  6472. // label的大小
  6473. labelSize: {
  6474. type: [String, Number],
  6475. default: props$y.icon.labelSize
  6476. },
  6477. // label的颜色
  6478. labelColor: {
  6479. type: String,
  6480. default: props$y.icon.labelColor
  6481. },
  6482. // label与图标的距离
  6483. space: {
  6484. type: [String, Number],
  6485. default: props$y.icon.space
  6486. },
  6487. // 图片的mode
  6488. imgMode: {
  6489. type: String,
  6490. default: props$y.icon.imgMode
  6491. },
  6492. // 用于显示图片小图标时,图片的宽度
  6493. width: {
  6494. type: [String, Number],
  6495. default: props$y.icon.width
  6496. },
  6497. // 用于显示图片小图标时,图片的高度
  6498. height: {
  6499. type: [String, Number],
  6500. default: props$y.icon.height
  6501. },
  6502. // 用于解决某些情况下,让图标垂直居中的用途
  6503. top: {
  6504. type: [String, Number],
  6505. default: props$y.icon.top
  6506. },
  6507. // 是否阻止事件传播
  6508. stop: {
  6509. type: Boolean,
  6510. default: props$y.icon.stop
  6511. }
  6512. }
  6513. };
  6514. const _sfc_main$2g = {
  6515. name: "u-icon",
  6516. data() {
  6517. return {};
  6518. },
  6519. emits: ["click"],
  6520. mixins: [mpMixin, mixin, props$q],
  6521. computed: {
  6522. uClasses() {
  6523. let classes = [];
  6524. classes.push(this.customPrefix + "-" + this.name);
  6525. if (this.color && uni.$u.config.type.includes(this.color))
  6526. classes.push("u-icon__icon--" + this.color);
  6527. return classes;
  6528. },
  6529. iconStyle() {
  6530. let style = {};
  6531. style = {
  6532. fontSize: uni.$u.addUnit(this.size),
  6533. lineHeight: uni.$u.addUnit(this.size),
  6534. fontWeight: this.bold ? "bold" : "normal",
  6535. // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
  6536. top: uni.$u.addUnit(this.top)
  6537. };
  6538. if (this.color && !uni.$u.config.type.includes(this.color))
  6539. style.color = this.color;
  6540. return style;
  6541. },
  6542. // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
  6543. isImg() {
  6544. return this.name.indexOf("/") !== -1;
  6545. },
  6546. imgStyle() {
  6547. let style = {};
  6548. style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
  6549. style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
  6550. return style;
  6551. },
  6552. // 通过图标名,查找对应的图标
  6553. icon() {
  6554. return icons["uicon-" + this.name] || this.name;
  6555. }
  6556. },
  6557. methods: {
  6558. clickHandler(e) {
  6559. this.$emit("click", this.index);
  6560. this.stop && this.preventEvent(e);
  6561. }
  6562. }
  6563. };
  6564. function _sfc_render$2t(_ctx, _cache, $props, $setup, $data, $options) {
  6565. return vue.openBlock(), vue.createElementBlock(
  6566. "view",
  6567. {
  6568. class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
  6569. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  6570. },
  6571. [
  6572. $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
  6573. key: 0,
  6574. class: "u-icon__img",
  6575. src: _ctx.name,
  6576. mode: _ctx.imgMode,
  6577. style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  6578. }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
  6579. key: 1,
  6580. class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
  6581. style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  6582. "hover-class": _ctx.hoverClass
  6583. }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
  6584. vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
  6585. _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
  6586. "text",
  6587. {
  6588. key: 2,
  6589. class: "u-icon__label",
  6590. style: vue.normalizeStyle({
  6591. color: _ctx.labelColor,
  6592. fontSize: _ctx.$u.addUnit(_ctx.labelSize),
  6593. marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
  6594. marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
  6595. marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
  6596. marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
  6597. })
  6598. },
  6599. vue.toDisplayString(_ctx.label),
  6600. 5
  6601. /* TEXT, STYLE */
  6602. )) : vue.createCommentVNode("v-if", true)
  6603. ],
  6604. 2
  6605. /* CLASS */
  6606. );
  6607. }
  6608. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$2g, [["render", _sfc_render$2t], ["__scopeId", "data-v-ac70166d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]);
  6609. const props$p = {
  6610. props: {}
  6611. };
  6612. const _sfc_main$2f = {
  6613. name: "u-safe-bottom",
  6614. mixins: [mpMixin, mixin, props$p],
  6615. data() {
  6616. return {
  6617. safeAreaBottomHeight: 0,
  6618. isNvue: false
  6619. };
  6620. },
  6621. computed: {
  6622. style() {
  6623. const style = {};
  6624. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6625. }
  6626. },
  6627. mounted() {
  6628. }
  6629. };
  6630. function _sfc_render$2s(_ctx, _cache, $props, $setup, $data, $options) {
  6631. return vue.openBlock(), vue.createElementBlock(
  6632. "view",
  6633. {
  6634. class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
  6635. style: vue.normalizeStyle([$options.style])
  6636. },
  6637. null,
  6638. 6
  6639. /* CLASS, STYLE */
  6640. );
  6641. }
  6642. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["render", _sfc_render$2s], ["__scopeId", "data-v-f3d22cfe"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]);
  6643. const props$o = {
  6644. props: {
  6645. // 是否展示弹窗
  6646. show: {
  6647. type: Boolean,
  6648. default: props$y.popup.show
  6649. },
  6650. // 是否显示遮罩
  6651. overlay: {
  6652. type: Boolean,
  6653. default: props$y.popup.overlay
  6654. },
  6655. // 弹出的方向,可选值为 top bottom right left center
  6656. mode: {
  6657. type: String,
  6658. default: props$y.popup.mode
  6659. },
  6660. // 动画时长,单位ms
  6661. duration: {
  6662. type: [String, Number],
  6663. default: props$y.popup.duration
  6664. },
  6665. // 是否显示关闭图标
  6666. closeable: {
  6667. type: Boolean,
  6668. default: props$y.popup.closeable
  6669. },
  6670. // 自定义遮罩的样式
  6671. overlayStyle: {
  6672. type: [Object, String],
  6673. default: props$y.popup.overlayStyle
  6674. },
  6675. // 点击遮罩是否关闭弹窗
  6676. closeOnClickOverlay: {
  6677. type: Boolean,
  6678. default: props$y.popup.closeOnClickOverlay
  6679. },
  6680. // 层级
  6681. zIndex: {
  6682. type: [String, Number],
  6683. default: props$y.popup.zIndex
  6684. },
  6685. // 是否为iPhoneX留出底部安全距离
  6686. safeAreaInsetBottom: {
  6687. type: Boolean,
  6688. default: props$y.popup.safeAreaInsetBottom
  6689. },
  6690. // 是否留出顶部安全距离(状态栏高度)
  6691. safeAreaInsetTop: {
  6692. type: Boolean,
  6693. default: props$y.popup.safeAreaInsetTop
  6694. },
  6695. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  6696. closeIconPos: {
  6697. type: String,
  6698. default: props$y.popup.closeIconPos
  6699. },
  6700. // 是否显示圆角
  6701. round: {
  6702. type: [Boolean, String, Number],
  6703. default: props$y.popup.round
  6704. },
  6705. // mode=center,也即中部弹出时,是否使用缩放模式
  6706. zoom: {
  6707. type: Boolean,
  6708. default: props$y.popup.zoom
  6709. },
  6710. // 弹窗背景色,设置为transparent可去除白色背景
  6711. bgColor: {
  6712. type: String,
  6713. default: props$y.popup.bgColor
  6714. },
  6715. // 遮罩的透明度,0-1之间
  6716. overlayOpacity: {
  6717. type: [Number, String],
  6718. default: props$y.popup.overlayOpacity
  6719. }
  6720. }
  6721. };
  6722. const _sfc_main$2e = {
  6723. name: "u-popup",
  6724. mixins: [mpMixin, mixin, props$o],
  6725. data() {
  6726. return {
  6727. overlayDuration: this.duration + 50
  6728. };
  6729. },
  6730. watch: {
  6731. show(newValue, oldValue) {
  6732. }
  6733. },
  6734. computed: {
  6735. transitionStyle() {
  6736. const style = {
  6737. zIndex: this.zIndex,
  6738. position: "fixed",
  6739. display: "flex"
  6740. };
  6741. style[this.mode] = 0;
  6742. if (this.mode === "left") {
  6743. return uni.$u.deepMerge(style, {
  6744. bottom: 0,
  6745. top: 0
  6746. });
  6747. } else if (this.mode === "right") {
  6748. return uni.$u.deepMerge(style, {
  6749. bottom: 0,
  6750. top: 0
  6751. });
  6752. } else if (this.mode === "top") {
  6753. return uni.$u.deepMerge(style, {
  6754. left: 0,
  6755. right: 0
  6756. });
  6757. } else if (this.mode === "bottom") {
  6758. return uni.$u.deepMerge(style, {
  6759. left: 0,
  6760. right: 0
  6761. });
  6762. } else if (this.mode === "center") {
  6763. return uni.$u.deepMerge(style, {
  6764. alignItems: "center",
  6765. "justify-content": "center",
  6766. top: 0,
  6767. left: 0,
  6768. right: 0,
  6769. bottom: 0
  6770. });
  6771. }
  6772. },
  6773. contentStyle() {
  6774. const style = {};
  6775. uni.$u.sys();
  6776. if (this.mode !== "center") {
  6777. style.flex = 1;
  6778. }
  6779. if (this.bgColor) {
  6780. style.backgroundColor = this.bgColor;
  6781. }
  6782. if (this.round) {
  6783. const value2 = uni.$u.addUnit(this.round);
  6784. if (this.mode === "top") {
  6785. style.borderBottomLeftRadius = value2;
  6786. style.borderBottomRightRadius = value2;
  6787. } else if (this.mode === "bottom") {
  6788. style.borderTopLeftRadius = value2;
  6789. style.borderTopRightRadius = value2;
  6790. } else if (this.mode === "center") {
  6791. style.borderRadius = value2;
  6792. }
  6793. }
  6794. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  6795. },
  6796. position() {
  6797. if (this.mode === "center") {
  6798. return this.zoom ? "fade-zoom" : "fade";
  6799. }
  6800. if (this.mode === "left") {
  6801. return "slide-left";
  6802. }
  6803. if (this.mode === "right") {
  6804. return "slide-right";
  6805. }
  6806. if (this.mode === "bottom") {
  6807. return "slide-up";
  6808. }
  6809. if (this.mode === "top") {
  6810. return "slide-down";
  6811. }
  6812. }
  6813. },
  6814. methods: {
  6815. // 点击遮罩
  6816. overlayClick() {
  6817. if (this.closeOnClickOverlay) {
  6818. this.$emit("close");
  6819. }
  6820. },
  6821. close(e) {
  6822. this.$emit("close");
  6823. },
  6824. afterEnter() {
  6825. this.$emit("open");
  6826. },
  6827. clickHandler() {
  6828. if (this.mode === "center") {
  6829. this.overlayClick();
  6830. }
  6831. this.$emit("click");
  6832. }
  6833. }
  6834. };
  6835. function _sfc_render$2r(_ctx, _cache, $props, $setup, $data, $options) {
  6836. const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$c);
  6837. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b);
  6838. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  6839. const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$2);
  6840. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
  6841. return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
  6842. _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
  6843. key: 0,
  6844. show: _ctx.show,
  6845. onClick: $options.overlayClick,
  6846. duration: $data.overlayDuration,
  6847. customStyle: _ctx.overlayStyle,
  6848. opacity: _ctx.overlayOpacity
  6849. }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
  6850. vue.createVNode(_component_u_transition, {
  6851. show: _ctx.show,
  6852. customStyle: $options.transitionStyle,
  6853. mode: $options.position,
  6854. duration: _ctx.duration,
  6855. onAfterEnter: $options.afterEnter,
  6856. onClick: $options.clickHandler
  6857. }, {
  6858. default: vue.withCtx(() => [
  6859. vue.createElementVNode(
  6860. "view",
  6861. {
  6862. class: "u-popup__content",
  6863. style: vue.normalizeStyle([$options.contentStyle]),
  6864. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
  6865. },
  6866. [
  6867. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  6868. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  6869. _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
  6870. "view",
  6871. {
  6872. key: 1,
  6873. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
  6874. class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
  6875. "hover-class": "u-popup__content__close--hover",
  6876. "hover-stay-time": "150"
  6877. },
  6878. [
  6879. vue.createVNode(_component_u_icon, {
  6880. name: "close",
  6881. color: "#909399",
  6882. size: "18",
  6883. bold: ""
  6884. })
  6885. ],
  6886. 2
  6887. /* CLASS */
  6888. )) : vue.createCommentVNode("v-if", true),
  6889. _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
  6890. ],
  6891. 4
  6892. /* STYLE */
  6893. )
  6894. ]),
  6895. _: 3
  6896. /* FORWARDED */
  6897. }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
  6898. ]);
  6899. }
  6900. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["render", _sfc_render$2r], ["__scopeId", "data-v-05c24e9b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]);
  6901. const props$n = {
  6902. props: {
  6903. // 是否展示modal
  6904. show: {
  6905. type: Boolean,
  6906. default: props$y.modal.show
  6907. },
  6908. // 标题
  6909. title: {
  6910. type: [String],
  6911. default: props$y.modal.title
  6912. },
  6913. // 弹窗内容
  6914. content: {
  6915. type: String,
  6916. default: props$y.modal.content
  6917. },
  6918. // 确认文案
  6919. confirmText: {
  6920. type: String,
  6921. default: props$y.modal.confirmText
  6922. },
  6923. // 取消文案
  6924. cancelText: {
  6925. type: String,
  6926. default: props$y.modal.cancelText
  6927. },
  6928. // 是否显示确认按钮
  6929. showConfirmButton: {
  6930. type: Boolean,
  6931. default: props$y.modal.showConfirmButton
  6932. },
  6933. // 是否显示取消按钮
  6934. showCancelButton: {
  6935. type: Boolean,
  6936. default: props$y.modal.showCancelButton
  6937. },
  6938. // 确认按钮颜色
  6939. confirmColor: {
  6940. type: String,
  6941. default: props$y.modal.confirmColor
  6942. },
  6943. // 取消文字颜色
  6944. cancelColor: {
  6945. type: String,
  6946. default: props$y.modal.cancelColor
  6947. },
  6948. // 对调确认和取消的位置
  6949. buttonReverse: {
  6950. type: Boolean,
  6951. default: props$y.modal.buttonReverse
  6952. },
  6953. // 是否开启缩放效果
  6954. zoom: {
  6955. type: Boolean,
  6956. default: props$y.modal.zoom
  6957. },
  6958. // 是否异步关闭,只对确定按钮有效
  6959. asyncClose: {
  6960. type: Boolean,
  6961. default: props$y.modal.asyncClose
  6962. },
  6963. // 是否允许点击遮罩关闭modal
  6964. closeOnClickOverlay: {
  6965. type: Boolean,
  6966. default: props$y.modal.closeOnClickOverlay
  6967. },
  6968. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  6969. negativeTop: {
  6970. type: [String, Number],
  6971. default: props$y.modal.negativeTop
  6972. },
  6973. // modal宽度,不支持百分比,可以数值,px,rpx单位
  6974. width: {
  6975. type: [String, Number],
  6976. default: props$y.modal.width
  6977. },
  6978. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  6979. confirmButtonShape: {
  6980. type: String,
  6981. default: props$y.modal.confirmButtonShape
  6982. }
  6983. }
  6984. };
  6985. const _sfc_main$2d = {
  6986. name: "u-modal",
  6987. mixins: [mpMixin, mixin, props$n],
  6988. data() {
  6989. return {
  6990. loading: false
  6991. };
  6992. },
  6993. watch: {
  6994. show(n) {
  6995. if (n && this.loading)
  6996. this.loading = false;
  6997. }
  6998. },
  6999. methods: {
  7000. // 点击确定按钮
  7001. confirmHandler() {
  7002. if (this.asyncClose) {
  7003. this.loading = true;
  7004. }
  7005. this.$emit("confirm");
  7006. },
  7007. // 点击取消按钮
  7008. cancelHandler() {
  7009. this.$emit("cancel");
  7010. },
  7011. // 点击遮罩
  7012. // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
  7013. // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
  7014. // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
  7015. // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
  7016. clickHandler() {
  7017. if (this.closeOnClickOverlay) {
  7018. this.$emit("close");
  7019. }
  7020. }
  7021. }
  7022. };
  7023. function _sfc_render$2q(_ctx, _cache, $props, $setup, $data, $options) {
  7024. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5);
  7025. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
  7026. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  7027. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  7028. mode: "center",
  7029. zoom: _ctx.zoom,
  7030. show: _ctx.show,
  7031. customStyle: {
  7032. borderRadius: "6px",
  7033. overflow: "hidden",
  7034. marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
  7035. },
  7036. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  7037. safeAreaInsetBottom: false,
  7038. duration: 400,
  7039. onClick: $options.clickHandler
  7040. }, {
  7041. default: vue.withCtx(() => [
  7042. vue.createElementVNode(
  7043. "view",
  7044. {
  7045. class: "u-modal",
  7046. style: vue.normalizeStyle({
  7047. width: _ctx.$u.addUnit(_ctx.width)
  7048. })
  7049. },
  7050. [
  7051. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  7052. "text",
  7053. {
  7054. key: 0,
  7055. class: "u-modal__title"
  7056. },
  7057. vue.toDisplayString(_ctx.title),
  7058. 1
  7059. /* TEXT */
  7060. )) : vue.createCommentVNode("v-if", true),
  7061. vue.createElementVNode(
  7062. "view",
  7063. {
  7064. class: "u-modal__content",
  7065. style: vue.normalizeStyle({
  7066. paddingTop: `${_ctx.title ? 12 : 25}px`
  7067. })
  7068. },
  7069. [
  7070. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  7071. vue.createElementVNode(
  7072. "text",
  7073. { class: "u-modal__content__text" },
  7074. vue.toDisplayString(_ctx.content),
  7075. 1
  7076. /* TEXT */
  7077. )
  7078. ], true)
  7079. ],
  7080. 4
  7081. /* STYLE */
  7082. ),
  7083. _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
  7084. key: 1,
  7085. class: "u-modal__button-group--confirm-button"
  7086. }, [
  7087. vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
  7088. ])) : (vue.openBlock(), vue.createElementBlock(
  7089. vue.Fragment,
  7090. { key: 2 },
  7091. [
  7092. vue.createVNode(_component_u_line),
  7093. vue.createElementVNode(
  7094. "view",
  7095. {
  7096. class: "u-modal__button-group",
  7097. style: vue.normalizeStyle({
  7098. flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
  7099. })
  7100. },
  7101. [
  7102. _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
  7103. "view",
  7104. {
  7105. key: 0,
  7106. 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"]]),
  7107. "hover-stay-time": 150,
  7108. "hover-class": "u-modal__button-group__wrapper--hover",
  7109. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
  7110. },
  7111. [
  7112. vue.createElementVNode(
  7113. "text",
  7114. {
  7115. class: "u-modal__button-group__wrapper__text",
  7116. style: vue.normalizeStyle({
  7117. color: _ctx.cancelColor
  7118. })
  7119. },
  7120. vue.toDisplayString(_ctx.cancelText),
  7121. 5
  7122. /* TEXT, STYLE */
  7123. )
  7124. ],
  7125. 2
  7126. /* CLASS */
  7127. )) : vue.createCommentVNode("v-if", true),
  7128. _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  7129. key: 1,
  7130. direction: "column"
  7131. })) : vue.createCommentVNode("v-if", true),
  7132. _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
  7133. "view",
  7134. {
  7135. key: 2,
  7136. 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"]]),
  7137. "hover-stay-time": 150,
  7138. "hover-class": "u-modal__button-group__wrapper--hover",
  7139. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
  7140. },
  7141. [
  7142. $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
  7143. "text",
  7144. {
  7145. key: 1,
  7146. class: "u-modal__button-group__wrapper__text",
  7147. style: vue.normalizeStyle({
  7148. color: _ctx.confirmColor
  7149. })
  7150. },
  7151. vue.toDisplayString(_ctx.confirmText),
  7152. 5
  7153. /* TEXT, STYLE */
  7154. ))
  7155. ],
  7156. 2
  7157. /* CLASS */
  7158. )) : vue.createCommentVNode("v-if", true)
  7159. ],
  7160. 4
  7161. /* STYLE */
  7162. )
  7163. ],
  7164. 64
  7165. /* STABLE_FRAGMENT */
  7166. ))
  7167. ],
  7168. 4
  7169. /* STYLE */
  7170. )
  7171. ]),
  7172. _: 3
  7173. /* FORWARDED */
  7174. }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
  7175. }
  7176. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$2d, [["render", _sfc_render$2q], ["__scopeId", "data-v-f667648f"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]);
  7177. function getDevtoolsGlobalHook() {
  7178. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  7179. }
  7180. function getTarget() {
  7181. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  7182. }
  7183. const isProxyAvailable = typeof Proxy === "function";
  7184. const HOOK_SETUP = "devtools-plugin:setup";
  7185. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  7186. class ApiProxy {
  7187. constructor(plugin, hook) {
  7188. this.target = null;
  7189. this.targetQueue = [];
  7190. this.onQueue = [];
  7191. this.plugin = plugin;
  7192. this.hook = hook;
  7193. const defaultSettings = {};
  7194. if (plugin.settings) {
  7195. for (const id in plugin.settings) {
  7196. const item = plugin.settings[id];
  7197. defaultSettings[id] = item.defaultValue;
  7198. }
  7199. }
  7200. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  7201. let currentSettings = { ...defaultSettings };
  7202. try {
  7203. const raw = localStorage.getItem(localSettingsSaveId);
  7204. const data = JSON.parse(raw);
  7205. Object.assign(currentSettings, data);
  7206. } catch (e) {
  7207. }
  7208. this.fallbacks = {
  7209. getSettings() {
  7210. return currentSettings;
  7211. },
  7212. setSettings(value2) {
  7213. try {
  7214. localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
  7215. } catch (e) {
  7216. }
  7217. currentSettings = value2;
  7218. }
  7219. };
  7220. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
  7221. if (pluginId === this.plugin.id) {
  7222. this.fallbacks.setSettings(value2);
  7223. }
  7224. });
  7225. this.proxiedOn = new Proxy({}, {
  7226. get: (_target, prop) => {
  7227. if (this.target) {
  7228. return this.target.on[prop];
  7229. } else {
  7230. return (...args) => {
  7231. this.onQueue.push({
  7232. method: prop,
  7233. args
  7234. });
  7235. };
  7236. }
  7237. }
  7238. });
  7239. this.proxiedTarget = new Proxy({}, {
  7240. get: (_target, prop) => {
  7241. if (this.target) {
  7242. return this.target[prop];
  7243. } else if (prop === "on") {
  7244. return this.proxiedOn;
  7245. } else if (Object.keys(this.fallbacks).includes(prop)) {
  7246. return (...args) => {
  7247. this.targetQueue.push({
  7248. method: prop,
  7249. args,
  7250. resolve: () => {
  7251. }
  7252. });
  7253. return this.fallbacks[prop](...args);
  7254. };
  7255. } else {
  7256. return (...args) => {
  7257. return new Promise((resolve) => {
  7258. this.targetQueue.push({
  7259. method: prop,
  7260. args,
  7261. resolve
  7262. });
  7263. });
  7264. };
  7265. }
  7266. }
  7267. });
  7268. }
  7269. async setRealTarget(target) {
  7270. this.target = target;
  7271. for (const item of this.onQueue) {
  7272. this.target.on[item.method](...item.args);
  7273. }
  7274. for (const item of this.targetQueue) {
  7275. item.resolve(await this.target[item.method](...item.args));
  7276. }
  7277. }
  7278. }
  7279. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  7280. const target = getTarget();
  7281. const hook = getDevtoolsGlobalHook();
  7282. const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy;
  7283. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  7284. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  7285. } else {
  7286. const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null;
  7287. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  7288. list.push({
  7289. pluginDescriptor,
  7290. setupFn,
  7291. proxy
  7292. });
  7293. if (proxy)
  7294. setupFn(proxy.proxiedTarget);
  7295. }
  7296. }
  7297. /*!
  7298. * vuex v4.1.0
  7299. * (c) 2022 Evan You
  7300. * @license MIT
  7301. */
  7302. var storeKey = "store";
  7303. function forEachValue(obj, fn) {
  7304. Object.keys(obj).forEach(function(key) {
  7305. return fn(obj[key], key);
  7306. });
  7307. }
  7308. function isObject$1(obj) {
  7309. return obj !== null && typeof obj === "object";
  7310. }
  7311. function isPromise(val) {
  7312. return val && typeof val.then === "function";
  7313. }
  7314. function assert(condition, msg) {
  7315. if (!condition) {
  7316. throw new Error("[vuex] " + msg);
  7317. }
  7318. }
  7319. function partial(fn, arg) {
  7320. return function() {
  7321. return fn(arg);
  7322. };
  7323. }
  7324. function genericSubscribe(fn, subs, options) {
  7325. if (subs.indexOf(fn) < 0) {
  7326. options && options.prepend ? subs.unshift(fn) : subs.push(fn);
  7327. }
  7328. return function() {
  7329. var i = subs.indexOf(fn);
  7330. if (i > -1) {
  7331. subs.splice(i, 1);
  7332. }
  7333. };
  7334. }
  7335. function resetStore(store2, hot) {
  7336. store2._actions = /* @__PURE__ */ Object.create(null);
  7337. store2._mutations = /* @__PURE__ */ Object.create(null);
  7338. store2._wrappedGetters = /* @__PURE__ */ Object.create(null);
  7339. store2._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  7340. var state2 = store2.state;
  7341. installModule(store2, state2, [], store2._modules.root, true);
  7342. resetStoreState(store2, state2, hot);
  7343. }
  7344. function resetStoreState(store2, state2, hot) {
  7345. var oldState = store2._state;
  7346. var oldScope = store2._scope;
  7347. store2.getters = {};
  7348. store2._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  7349. var wrappedGetters = store2._wrappedGetters;
  7350. var computedObj = {};
  7351. var computedCache = {};
  7352. var scope = vue.effectScope(true);
  7353. scope.run(function() {
  7354. forEachValue(wrappedGetters, function(fn, key) {
  7355. computedObj[key] = partial(fn, store2);
  7356. computedCache[key] = vue.computed(function() {
  7357. return computedObj[key]();
  7358. });
  7359. Object.defineProperty(store2.getters, key, {
  7360. get: function() {
  7361. return computedCache[key].value;
  7362. },
  7363. enumerable: true
  7364. // for local getters
  7365. });
  7366. });
  7367. });
  7368. store2._state = vue.reactive({
  7369. data: state2
  7370. });
  7371. store2._scope = scope;
  7372. if (store2.strict) {
  7373. enableStrictMode(store2);
  7374. }
  7375. if (oldState) {
  7376. if (hot) {
  7377. store2._withCommit(function() {
  7378. oldState.data = null;
  7379. });
  7380. }
  7381. }
  7382. if (oldScope) {
  7383. oldScope.stop();
  7384. }
  7385. }
  7386. function installModule(store2, rootState, path, module, hot) {
  7387. var isRoot = !path.length;
  7388. var namespace = store2._modules.getNamespace(path);
  7389. if (module.namespaced) {
  7390. if (store2._modulesNamespaceMap[namespace] && true) {
  7391. console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/"));
  7392. }
  7393. store2._modulesNamespaceMap[namespace] = module;
  7394. }
  7395. if (!isRoot && !hot) {
  7396. var parentState = getNestedState(rootState, path.slice(0, -1));
  7397. var moduleName = path[path.length - 1];
  7398. store2._withCommit(function() {
  7399. {
  7400. if (moduleName in parentState) {
  7401. console.warn(
  7402. '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"'
  7403. );
  7404. }
  7405. }
  7406. parentState[moduleName] = module.state;
  7407. });
  7408. }
  7409. var local = module.context = makeLocalContext(store2, namespace, path);
  7410. module.forEachMutation(function(mutation, key) {
  7411. var namespacedType = namespace + key;
  7412. registerMutation(store2, namespacedType, mutation, local);
  7413. });
  7414. module.forEachAction(function(action, key) {
  7415. var type2 = action.root ? key : namespace + key;
  7416. var handler = action.handler || action;
  7417. registerAction(store2, type2, handler, local);
  7418. });
  7419. module.forEachGetter(function(getter, key) {
  7420. var namespacedType = namespace + key;
  7421. registerGetter(store2, namespacedType, getter, local);
  7422. });
  7423. module.forEachChild(function(child, key) {
  7424. installModule(store2, rootState, path.concat(key), child, hot);
  7425. });
  7426. }
  7427. function makeLocalContext(store2, namespace, path) {
  7428. var noNamespace = namespace === "";
  7429. var local = {
  7430. dispatch: noNamespace ? store2.dispatch : function(_type, _payload, _options) {
  7431. var args = unifyObjectStyle(_type, _payload, _options);
  7432. var payload = args.payload;
  7433. var options = args.options;
  7434. var type2 = args.type;
  7435. if (!options || !options.root) {
  7436. type2 = namespace + type2;
  7437. if (!store2._actions[type2]) {
  7438. console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type2);
  7439. return;
  7440. }
  7441. }
  7442. return store2.dispatch(type2, payload);
  7443. },
  7444. commit: noNamespace ? store2.commit : function(_type, _payload, _options) {
  7445. var args = unifyObjectStyle(_type, _payload, _options);
  7446. var payload = args.payload;
  7447. var options = args.options;
  7448. var type2 = args.type;
  7449. if (!options || !options.root) {
  7450. type2 = namespace + type2;
  7451. if (!store2._mutations[type2]) {
  7452. console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type2);
  7453. return;
  7454. }
  7455. }
  7456. store2.commit(type2, payload, options);
  7457. }
  7458. };
  7459. Object.defineProperties(local, {
  7460. getters: {
  7461. get: noNamespace ? function() {
  7462. return store2.getters;
  7463. } : function() {
  7464. return makeLocalGetters(store2, namespace);
  7465. }
  7466. },
  7467. state: {
  7468. get: function() {
  7469. return getNestedState(store2.state, path);
  7470. }
  7471. }
  7472. });
  7473. return local;
  7474. }
  7475. function makeLocalGetters(store2, namespace) {
  7476. if (!store2._makeLocalGettersCache[namespace]) {
  7477. var gettersProxy = {};
  7478. var splitPos = namespace.length;
  7479. Object.keys(store2.getters).forEach(function(type2) {
  7480. if (type2.slice(0, splitPos) !== namespace) {
  7481. return;
  7482. }
  7483. var localType = type2.slice(splitPos);
  7484. Object.defineProperty(gettersProxy, localType, {
  7485. get: function() {
  7486. return store2.getters[type2];
  7487. },
  7488. enumerable: true
  7489. });
  7490. });
  7491. store2._makeLocalGettersCache[namespace] = gettersProxy;
  7492. }
  7493. return store2._makeLocalGettersCache[namespace];
  7494. }
  7495. function registerMutation(store2, type2, handler, local) {
  7496. var entry = store2._mutations[type2] || (store2._mutations[type2] = []);
  7497. entry.push(function wrappedMutationHandler(payload) {
  7498. handler.call(store2, local.state, payload);
  7499. });
  7500. }
  7501. function registerAction(store2, type2, handler, local) {
  7502. var entry = store2._actions[type2] || (store2._actions[type2] = []);
  7503. entry.push(function wrappedActionHandler(payload) {
  7504. var res = handler.call(store2, {
  7505. dispatch: local.dispatch,
  7506. commit: local.commit,
  7507. getters: local.getters,
  7508. state: local.state,
  7509. rootGetters: store2.getters,
  7510. rootState: store2.state
  7511. }, payload);
  7512. if (!isPromise(res)) {
  7513. res = Promise.resolve(res);
  7514. }
  7515. if (store2._devtoolHook) {
  7516. return res.catch(function(err) {
  7517. store2._devtoolHook.emit("vuex:error", err);
  7518. throw err;
  7519. });
  7520. } else {
  7521. return res;
  7522. }
  7523. });
  7524. }
  7525. function registerGetter(store2, type2, rawGetter, local) {
  7526. if (store2._wrappedGetters[type2]) {
  7527. {
  7528. console.error("[vuex] duplicate getter key: " + type2);
  7529. }
  7530. return;
  7531. }
  7532. store2._wrappedGetters[type2] = function wrappedGetter(store22) {
  7533. return rawGetter(
  7534. local.state,
  7535. // local state
  7536. local.getters,
  7537. // local getters
  7538. store22.state,
  7539. // root state
  7540. store22.getters
  7541. // root getters
  7542. );
  7543. };
  7544. }
  7545. function enableStrictMode(store2) {
  7546. vue.watch(function() {
  7547. return store2._state.data;
  7548. }, function() {
  7549. {
  7550. assert(store2._committing, "do not mutate vuex store state outside mutation handlers.");
  7551. }
  7552. }, { deep: true, flush: "sync" });
  7553. }
  7554. function getNestedState(state2, path) {
  7555. return path.reduce(function(state22, key) {
  7556. return state22[key];
  7557. }, state2);
  7558. }
  7559. function unifyObjectStyle(type2, payload, options) {
  7560. if (isObject$1(type2) && type2.type) {
  7561. options = payload;
  7562. payload = type2;
  7563. type2 = type2.type;
  7564. }
  7565. {
  7566. assert(typeof type2 === "string", "expects string as the type, but found " + typeof type2 + ".");
  7567. }
  7568. return { type: type2, payload, options };
  7569. }
  7570. var LABEL_VUEX_BINDINGS = "vuex bindings";
  7571. var MUTATIONS_LAYER_ID = "vuex:mutations";
  7572. var ACTIONS_LAYER_ID = "vuex:actions";
  7573. var INSPECTOR_ID = "vuex";
  7574. var actionId = 0;
  7575. function addDevtools(app, store2) {
  7576. setupDevtoolsPlugin(
  7577. {
  7578. id: "org.vuejs.vuex",
  7579. app,
  7580. label: "Vuex",
  7581. homepage: "https://next.vuex.vuejs.org/",
  7582. logo: "https://vuejs.org/images/icons/favicon-96x96.png",
  7583. packageName: "vuex",
  7584. componentStateTypes: [LABEL_VUEX_BINDINGS]
  7585. },
  7586. function(api) {
  7587. api.addTimelineLayer({
  7588. id: MUTATIONS_LAYER_ID,
  7589. label: "Vuex Mutations",
  7590. color: COLOR_LIME_500
  7591. });
  7592. api.addTimelineLayer({
  7593. id: ACTIONS_LAYER_ID,
  7594. label: "Vuex Actions",
  7595. color: COLOR_LIME_500
  7596. });
  7597. api.addInspector({
  7598. id: INSPECTOR_ID,
  7599. label: "Vuex",
  7600. icon: "storage",
  7601. treeFilterPlaceholder: "Filter stores..."
  7602. });
  7603. api.on.getInspectorTree(function(payload) {
  7604. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  7605. if (payload.filter) {
  7606. var nodes = [];
  7607. flattenStoreForInspectorTree(nodes, store2._modules.root, payload.filter, "");
  7608. payload.rootNodes = nodes;
  7609. } else {
  7610. payload.rootNodes = [
  7611. formatStoreForInspectorTree(store2._modules.root, "")
  7612. ];
  7613. }
  7614. }
  7615. });
  7616. api.on.getInspectorState(function(payload) {
  7617. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  7618. var modulePath = payload.nodeId;
  7619. makeLocalGetters(store2, modulePath);
  7620. payload.state = formatStoreForInspectorState(
  7621. getStoreModule(store2._modules, modulePath),
  7622. modulePath === "root" ? store2.getters : store2._makeLocalGettersCache,
  7623. modulePath
  7624. );
  7625. }
  7626. });
  7627. api.on.editInspectorState(function(payload) {
  7628. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  7629. var modulePath = payload.nodeId;
  7630. var path = payload.path;
  7631. if (modulePath !== "root") {
  7632. path = modulePath.split("/").filter(Boolean).concat(path);
  7633. }
  7634. store2._withCommit(function() {
  7635. payload.set(store2._state.data, path, payload.state.value);
  7636. });
  7637. }
  7638. });
  7639. store2.subscribe(function(mutation, state2) {
  7640. var data = {};
  7641. if (mutation.payload) {
  7642. data.payload = mutation.payload;
  7643. }
  7644. data.state = state2;
  7645. api.notifyComponentUpdate();
  7646. api.sendInspectorTree(INSPECTOR_ID);
  7647. api.sendInspectorState(INSPECTOR_ID);
  7648. api.addTimelineEvent({
  7649. layerId: MUTATIONS_LAYER_ID,
  7650. event: {
  7651. time: Date.now(),
  7652. title: mutation.type,
  7653. data
  7654. }
  7655. });
  7656. });
  7657. store2.subscribeAction({
  7658. before: function(action, state2) {
  7659. var data = {};
  7660. if (action.payload) {
  7661. data.payload = action.payload;
  7662. }
  7663. action._id = actionId++;
  7664. action._time = Date.now();
  7665. data.state = state2;
  7666. api.addTimelineEvent({
  7667. layerId: ACTIONS_LAYER_ID,
  7668. event: {
  7669. time: action._time,
  7670. title: action.type,
  7671. groupId: action._id,
  7672. subtitle: "start",
  7673. data
  7674. }
  7675. });
  7676. },
  7677. after: function(action, state2) {
  7678. var data = {};
  7679. var duration = Date.now() - action._time;
  7680. data.duration = {
  7681. _custom: {
  7682. type: "duration",
  7683. display: duration + "ms",
  7684. tooltip: "Action duration",
  7685. value: duration
  7686. }
  7687. };
  7688. if (action.payload) {
  7689. data.payload = action.payload;
  7690. }
  7691. data.state = state2;
  7692. api.addTimelineEvent({
  7693. layerId: ACTIONS_LAYER_ID,
  7694. event: {
  7695. time: Date.now(),
  7696. title: action.type,
  7697. groupId: action._id,
  7698. subtitle: "end",
  7699. data
  7700. }
  7701. });
  7702. }
  7703. });
  7704. }
  7705. );
  7706. }
  7707. var COLOR_LIME_500 = 8702998;
  7708. var COLOR_DARK = 6710886;
  7709. var COLOR_WHITE = 16777215;
  7710. var TAG_NAMESPACED = {
  7711. label: "namespaced",
  7712. textColor: COLOR_WHITE,
  7713. backgroundColor: COLOR_DARK
  7714. };
  7715. function extractNameFromPath(path) {
  7716. return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root";
  7717. }
  7718. function formatStoreForInspectorTree(module, path) {
  7719. return {
  7720. id: path || "root",
  7721. // all modules end with a `/`, we want the last segment only
  7722. // cart/ -> cart
  7723. // nested/cart/ -> cart
  7724. label: extractNameFromPath(path),
  7725. tags: module.namespaced ? [TAG_NAMESPACED] : [],
  7726. children: Object.keys(module._children).map(
  7727. function(moduleName) {
  7728. return formatStoreForInspectorTree(
  7729. module._children[moduleName],
  7730. path + moduleName + "/"
  7731. );
  7732. }
  7733. )
  7734. };
  7735. }
  7736. function flattenStoreForInspectorTree(result, module, filter, path) {
  7737. if (path.includes(filter)) {
  7738. result.push({
  7739. id: path || "root",
  7740. label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root",
  7741. tags: module.namespaced ? [TAG_NAMESPACED] : []
  7742. });
  7743. }
  7744. Object.keys(module._children).forEach(function(moduleName) {
  7745. flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/");
  7746. });
  7747. }
  7748. function formatStoreForInspectorState(module, getters, path) {
  7749. getters = path === "root" ? getters : getters[path];
  7750. var gettersKeys = Object.keys(getters);
  7751. var storeState = {
  7752. state: Object.keys(module.state).map(function(key) {
  7753. return {
  7754. key,
  7755. editable: true,
  7756. value: module.state[key]
  7757. };
  7758. })
  7759. };
  7760. if (gettersKeys.length) {
  7761. var tree = transformPathsToObjectTree(getters);
  7762. storeState.getters = Object.keys(tree).map(function(key) {
  7763. return {
  7764. key: key.endsWith("/") ? extractNameFromPath(key) : key,
  7765. editable: false,
  7766. value: canThrow(function() {
  7767. return tree[key];
  7768. })
  7769. };
  7770. });
  7771. }
  7772. return storeState;
  7773. }
  7774. function transformPathsToObjectTree(getters) {
  7775. var result = {};
  7776. Object.keys(getters).forEach(function(key) {
  7777. var path = key.split("/");
  7778. if (path.length > 1) {
  7779. var target = result;
  7780. var leafKey = path.pop();
  7781. path.forEach(function(p) {
  7782. if (!target[p]) {
  7783. target[p] = {
  7784. _custom: {
  7785. value: {},
  7786. display: p,
  7787. tooltip: "Module",
  7788. abstract: true
  7789. }
  7790. };
  7791. }
  7792. target = target[p]._custom.value;
  7793. });
  7794. target[leafKey] = canThrow(function() {
  7795. return getters[key];
  7796. });
  7797. } else {
  7798. result[key] = canThrow(function() {
  7799. return getters[key];
  7800. });
  7801. }
  7802. });
  7803. return result;
  7804. }
  7805. function getStoreModule(moduleMap, path) {
  7806. var names = path.split("/").filter(function(n) {
  7807. return n;
  7808. });
  7809. return names.reduce(
  7810. function(module, moduleName, i) {
  7811. var child = module[moduleName];
  7812. if (!child) {
  7813. throw new Error('Missing module "' + moduleName + '" for path "' + path + '".');
  7814. }
  7815. return i === names.length - 1 ? child : child._children;
  7816. },
  7817. path === "root" ? moduleMap : moduleMap.root._children
  7818. );
  7819. }
  7820. function canThrow(cb) {
  7821. try {
  7822. return cb();
  7823. } catch (e) {
  7824. return e;
  7825. }
  7826. }
  7827. var Module = function Module2(rawModule, runtime) {
  7828. this.runtime = runtime;
  7829. this._children = /* @__PURE__ */ Object.create(null);
  7830. this._rawModule = rawModule;
  7831. var rawState = rawModule.state;
  7832. this.state = (typeof rawState === "function" ? rawState() : rawState) || {};
  7833. };
  7834. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  7835. prototypeAccessors$1.namespaced.get = function() {
  7836. return !!this._rawModule.namespaced;
  7837. };
  7838. Module.prototype.addChild = function addChild(key, module) {
  7839. this._children[key] = module;
  7840. };
  7841. Module.prototype.removeChild = function removeChild(key) {
  7842. delete this._children[key];
  7843. };
  7844. Module.prototype.getChild = function getChild(key) {
  7845. return this._children[key];
  7846. };
  7847. Module.prototype.hasChild = function hasChild(key) {
  7848. return key in this._children;
  7849. };
  7850. Module.prototype.update = function update(rawModule) {
  7851. this._rawModule.namespaced = rawModule.namespaced;
  7852. if (rawModule.actions) {
  7853. this._rawModule.actions = rawModule.actions;
  7854. }
  7855. if (rawModule.mutations) {
  7856. this._rawModule.mutations = rawModule.mutations;
  7857. }
  7858. if (rawModule.getters) {
  7859. this._rawModule.getters = rawModule.getters;
  7860. }
  7861. };
  7862. Module.prototype.forEachChild = function forEachChild(fn) {
  7863. forEachValue(this._children, fn);
  7864. };
  7865. Module.prototype.forEachGetter = function forEachGetter(fn) {
  7866. if (this._rawModule.getters) {
  7867. forEachValue(this._rawModule.getters, fn);
  7868. }
  7869. };
  7870. Module.prototype.forEachAction = function forEachAction(fn) {
  7871. if (this._rawModule.actions) {
  7872. forEachValue(this._rawModule.actions, fn);
  7873. }
  7874. };
  7875. Module.prototype.forEachMutation = function forEachMutation(fn) {
  7876. if (this._rawModule.mutations) {
  7877. forEachValue(this._rawModule.mutations, fn);
  7878. }
  7879. };
  7880. Object.defineProperties(Module.prototype, prototypeAccessors$1);
  7881. var ModuleCollection = function ModuleCollection2(rawRootModule) {
  7882. this.register([], rawRootModule, false);
  7883. };
  7884. ModuleCollection.prototype.get = function get(path) {
  7885. return path.reduce(function(module, key) {
  7886. return module.getChild(key);
  7887. }, this.root);
  7888. };
  7889. ModuleCollection.prototype.getNamespace = function getNamespace(path) {
  7890. var module = this.root;
  7891. return path.reduce(function(namespace, key) {
  7892. module = module.getChild(key);
  7893. return namespace + (module.namespaced ? key + "/" : "");
  7894. }, "");
  7895. };
  7896. ModuleCollection.prototype.update = function update$1(rawRootModule) {
  7897. update2([], this.root, rawRootModule);
  7898. };
  7899. ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
  7900. var this$1$1 = this;
  7901. if (runtime === void 0)
  7902. runtime = true;
  7903. {
  7904. assertRawModule(path, rawModule);
  7905. }
  7906. var newModule = new Module(rawModule, runtime);
  7907. if (path.length === 0) {
  7908. this.root = newModule;
  7909. } else {
  7910. var parent = this.get(path.slice(0, -1));
  7911. parent.addChild(path[path.length - 1], newModule);
  7912. }
  7913. if (rawModule.modules) {
  7914. forEachValue(rawModule.modules, function(rawChildModule, key) {
  7915. this$1$1.register(path.concat(key), rawChildModule, runtime);
  7916. });
  7917. }
  7918. };
  7919. ModuleCollection.prototype.unregister = function unregister(path) {
  7920. var parent = this.get(path.slice(0, -1));
  7921. var key = path[path.length - 1];
  7922. var child = parent.getChild(key);
  7923. if (!child) {
  7924. {
  7925. console.warn(
  7926. "[vuex] trying to unregister module '" + key + "', which is not registered"
  7927. );
  7928. }
  7929. return;
  7930. }
  7931. if (!child.runtime) {
  7932. return;
  7933. }
  7934. parent.removeChild(key);
  7935. };
  7936. ModuleCollection.prototype.isRegistered = function isRegistered(path) {
  7937. var parent = this.get(path.slice(0, -1));
  7938. var key = path[path.length - 1];
  7939. if (parent) {
  7940. return parent.hasChild(key);
  7941. }
  7942. return false;
  7943. };
  7944. function update2(path, targetModule, newModule) {
  7945. {
  7946. assertRawModule(path, newModule);
  7947. }
  7948. targetModule.update(newModule);
  7949. if (newModule.modules) {
  7950. for (var key in newModule.modules) {
  7951. if (!targetModule.getChild(key)) {
  7952. {
  7953. console.warn(
  7954. "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed"
  7955. );
  7956. }
  7957. return;
  7958. }
  7959. update2(
  7960. path.concat(key),
  7961. targetModule.getChild(key),
  7962. newModule.modules[key]
  7963. );
  7964. }
  7965. }
  7966. }
  7967. var functionAssert = {
  7968. assert: function(value2) {
  7969. return typeof value2 === "function";
  7970. },
  7971. expected: "function"
  7972. };
  7973. var objectAssert = {
  7974. assert: function(value2) {
  7975. return typeof value2 === "function" || typeof value2 === "object" && typeof value2.handler === "function";
  7976. },
  7977. expected: 'function or object with "handler" function'
  7978. };
  7979. var assertTypes = {
  7980. getters: functionAssert,
  7981. mutations: functionAssert,
  7982. actions: objectAssert
  7983. };
  7984. function assertRawModule(path, rawModule) {
  7985. Object.keys(assertTypes).forEach(function(key) {
  7986. if (!rawModule[key]) {
  7987. return;
  7988. }
  7989. var assertOptions = assertTypes[key];
  7990. forEachValue(rawModule[key], function(value2, type2) {
  7991. assert(
  7992. assertOptions.assert(value2),
  7993. makeAssertionMessage(path, key, type2, value2, assertOptions.expected)
  7994. );
  7995. });
  7996. });
  7997. }
  7998. function makeAssertionMessage(path, key, type2, value2, expected) {
  7999. var buf = key + " should be " + expected + ' but "' + key + "." + type2 + '"';
  8000. if (path.length > 0) {
  8001. buf += ' in module "' + path.join(".") + '"';
  8002. }
  8003. buf += " is " + JSON.stringify(value2) + ".";
  8004. return buf;
  8005. }
  8006. function createStore(options) {
  8007. return new Store(options);
  8008. }
  8009. var Store = function Store2(options) {
  8010. var this$1$1 = this;
  8011. if (options === void 0)
  8012. options = {};
  8013. {
  8014. assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser.");
  8015. assert(this instanceof Store2, "store must be called with the new operator.");
  8016. }
  8017. var plugins2 = options.plugins;
  8018. if (plugins2 === void 0)
  8019. plugins2 = [];
  8020. var strict = options.strict;
  8021. if (strict === void 0)
  8022. strict = false;
  8023. var devtools = options.devtools;
  8024. this._committing = false;
  8025. this._actions = /* @__PURE__ */ Object.create(null);
  8026. this._actionSubscribers = [];
  8027. this._mutations = /* @__PURE__ */ Object.create(null);
  8028. this._wrappedGetters = /* @__PURE__ */ Object.create(null);
  8029. this._modules = new ModuleCollection(options);
  8030. this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  8031. this._subscribers = [];
  8032. this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  8033. this._scope = null;
  8034. this._devtools = devtools;
  8035. var store2 = this;
  8036. var ref = this;
  8037. var dispatch2 = ref.dispatch;
  8038. var commit2 = ref.commit;
  8039. this.dispatch = function boundDispatch(type2, payload) {
  8040. return dispatch2.call(store2, type2, payload);
  8041. };
  8042. this.commit = function boundCommit(type2, payload, options2) {
  8043. return commit2.call(store2, type2, payload, options2);
  8044. };
  8045. this.strict = strict;
  8046. var state2 = this._modules.root.state;
  8047. installModule(this, state2, [], this._modules.root);
  8048. resetStoreState(this, state2);
  8049. plugins2.forEach(function(plugin) {
  8050. return plugin(this$1$1);
  8051. });
  8052. };
  8053. var prototypeAccessors = { state: { configurable: true } };
  8054. Store.prototype.install = function install2(app, injectKey) {
  8055. app.provide(injectKey || storeKey, this);
  8056. app.config.globalProperties.$store = this;
  8057. var useDevtools = this._devtools !== void 0 ? this._devtools : true;
  8058. if (useDevtools) {
  8059. addDevtools(app, this);
  8060. }
  8061. };
  8062. prototypeAccessors.state.get = function() {
  8063. return this._state.data;
  8064. };
  8065. prototypeAccessors.state.set = function(v) {
  8066. {
  8067. assert(false, "use store.replaceState() to explicit replace store state.");
  8068. }
  8069. };
  8070. Store.prototype.commit = function commit(_type, _payload, _options) {
  8071. var this$1$1 = this;
  8072. var ref = unifyObjectStyle(_type, _payload, _options);
  8073. var type2 = ref.type;
  8074. var payload = ref.payload;
  8075. var options = ref.options;
  8076. var mutation = { type: type2, payload };
  8077. var entry = this._mutations[type2];
  8078. if (!entry) {
  8079. {
  8080. console.error("[vuex] unknown mutation type: " + type2);
  8081. }
  8082. return;
  8083. }
  8084. this._withCommit(function() {
  8085. entry.forEach(function commitIterator(handler) {
  8086. handler(payload);
  8087. });
  8088. });
  8089. this._subscribers.slice().forEach(function(sub) {
  8090. return sub(mutation, this$1$1.state);
  8091. });
  8092. if (options && options.silent) {
  8093. console.warn(
  8094. "[vuex] mutation type: " + type2 + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
  8095. );
  8096. }
  8097. };
  8098. Store.prototype.dispatch = function dispatch(_type, _payload) {
  8099. var this$1$1 = this;
  8100. var ref = unifyObjectStyle(_type, _payload);
  8101. var type2 = ref.type;
  8102. var payload = ref.payload;
  8103. var action = { type: type2, payload };
  8104. var entry = this._actions[type2];
  8105. if (!entry) {
  8106. {
  8107. console.error("[vuex] unknown action type: " + type2);
  8108. }
  8109. return;
  8110. }
  8111. try {
  8112. this._actionSubscribers.slice().filter(function(sub) {
  8113. return sub.before;
  8114. }).forEach(function(sub) {
  8115. return sub.before(action, this$1$1.state);
  8116. });
  8117. } catch (e) {
  8118. {
  8119. console.warn("[vuex] error in before action subscribers: ");
  8120. console.error(e);
  8121. }
  8122. }
  8123. var result = entry.length > 1 ? Promise.all(entry.map(function(handler) {
  8124. return handler(payload);
  8125. })) : entry[0](payload);
  8126. return new Promise(function(resolve, reject2) {
  8127. result.then(function(res) {
  8128. try {
  8129. this$1$1._actionSubscribers.filter(function(sub) {
  8130. return sub.after;
  8131. }).forEach(function(sub) {
  8132. return sub.after(action, this$1$1.state);
  8133. });
  8134. } catch (e) {
  8135. {
  8136. console.warn("[vuex] error in after action subscribers: ");
  8137. console.error(e);
  8138. }
  8139. }
  8140. resolve(res);
  8141. }, function(error2) {
  8142. try {
  8143. this$1$1._actionSubscribers.filter(function(sub) {
  8144. return sub.error;
  8145. }).forEach(function(sub) {
  8146. return sub.error(action, this$1$1.state, error2);
  8147. });
  8148. } catch (e) {
  8149. {
  8150. console.warn("[vuex] error in error action subscribers: ");
  8151. console.error(e);
  8152. }
  8153. }
  8154. reject2(error2);
  8155. });
  8156. });
  8157. };
  8158. Store.prototype.subscribe = function subscribe(fn, options) {
  8159. return genericSubscribe(fn, this._subscribers, options);
  8160. };
  8161. Store.prototype.subscribeAction = function subscribeAction(fn, options) {
  8162. var subs = typeof fn === "function" ? { before: fn } : fn;
  8163. return genericSubscribe(subs, this._actionSubscribers, options);
  8164. };
  8165. Store.prototype.watch = function watch$1(getter, cb, options) {
  8166. var this$1$1 = this;
  8167. {
  8168. assert(typeof getter === "function", "store.watch only accepts a function.");
  8169. }
  8170. return vue.watch(function() {
  8171. return getter(this$1$1.state, this$1$1.getters);
  8172. }, cb, Object.assign({}, options));
  8173. };
  8174. Store.prototype.replaceState = function replaceState(state2) {
  8175. var this$1$1 = this;
  8176. this._withCommit(function() {
  8177. this$1$1._state.data = state2;
  8178. });
  8179. };
  8180. Store.prototype.registerModule = function registerModule(path, rawModule, options) {
  8181. if (options === void 0)
  8182. options = {};
  8183. if (typeof path === "string") {
  8184. path = [path];
  8185. }
  8186. {
  8187. assert(Array.isArray(path), "module path must be a string or an Array.");
  8188. assert(path.length > 0, "cannot register the root module by using registerModule.");
  8189. }
  8190. this._modules.register(path, rawModule);
  8191. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  8192. resetStoreState(this, this.state);
  8193. };
  8194. Store.prototype.unregisterModule = function unregisterModule(path) {
  8195. var this$1$1 = this;
  8196. if (typeof path === "string") {
  8197. path = [path];
  8198. }
  8199. {
  8200. assert(Array.isArray(path), "module path must be a string or an Array.");
  8201. }
  8202. this._modules.unregister(path);
  8203. this._withCommit(function() {
  8204. var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
  8205. delete parentState[path[path.length - 1]];
  8206. });
  8207. resetStore(this);
  8208. };
  8209. Store.prototype.hasModule = function hasModule(path) {
  8210. if (typeof path === "string") {
  8211. path = [path];
  8212. }
  8213. {
  8214. assert(Array.isArray(path), "module path must be a string or an Array.");
  8215. }
  8216. return this._modules.isRegistered(path);
  8217. };
  8218. Store.prototype.hotUpdate = function hotUpdate(newOptions) {
  8219. this._modules.update(newOptions);
  8220. resetStore(this, true);
  8221. };
  8222. Store.prototype._withCommit = function _withCommit(fn) {
  8223. var committing = this._committing;
  8224. this._committing = true;
  8225. fn();
  8226. this._committing = committing;
  8227. };
  8228. Object.defineProperties(Store.prototype, prototypeAccessors);
  8229. const state = {
  8230. isLogin: false,
  8231. conversationList: [],
  8232. messageList: [],
  8233. conversation: {},
  8234. conversationID: "",
  8235. scrollTop: 0
  8236. };
  8237. const timStore = {
  8238. namespaced: true,
  8239. state,
  8240. getters: {
  8241. userInfo: (state2) => {
  8242. return state2.userInfo;
  8243. }
  8244. },
  8245. mutations: {
  8246. setscrollTop(state2, payload) {
  8247. state2.scrollTop = payload;
  8248. },
  8249. setImType(state2, payload) {
  8250. state2.imType = payload;
  8251. },
  8252. setType(state2, payload) {
  8253. state2.type = payload;
  8254. },
  8255. setOrderId(state2, payload) {
  8256. state2.orderId = payload;
  8257. },
  8258. setFollowId(state2, payload) {
  8259. state2.followId = payload;
  8260. },
  8261. setOrderType(state2, payload) {
  8262. state2.orderType = payload;
  8263. },
  8264. setConversationList(state2, payload) {
  8265. state2.conversationList = payload;
  8266. },
  8267. setConversation(state2, payload) {
  8268. state2.conversation = payload;
  8269. },
  8270. setConversationID(state2, payload) {
  8271. state2.conversationID = payload;
  8272. },
  8273. resetConversationID(state2) {
  8274. state2.conversationID = "";
  8275. },
  8276. setMessageList(state2, payload) {
  8277. state2.messageList = payload;
  8278. },
  8279. resetChat(state2) {
  8280. state2.messageList = [];
  8281. }
  8282. },
  8283. actions: {
  8284. //
  8285. }
  8286. };
  8287. const modules = {
  8288. timStore
  8289. };
  8290. const store = createStore({
  8291. modules
  8292. });
  8293. let request$f = new Request$1().http;
  8294. function getUserFollowDoctor() {
  8295. return request$f("/app/drugReport/getUserFollowDoctor", null, "GET");
  8296. }
  8297. function getDrugReportList(data) {
  8298. return request$f("/app/drugReport/getDrugReportList", data, "GET");
  8299. }
  8300. function getDrugReportById(data) {
  8301. return request$f("/app/drugReport/getDrugReportById", data, "GET");
  8302. }
  8303. function pingReport(data) {
  8304. return request$f("/app/drugReport/pingReport", data, "POST", "application/json;charset=UTF-8");
  8305. }
  8306. function startDrugReport(data) {
  8307. return request$f("/app/drugReport/startDrugReport", data, "POST", "application/json;charset=UTF-8");
  8308. }
  8309. const _sfc_main$2c = {
  8310. data() {
  8311. return {
  8312. isLogin: false,
  8313. show: false,
  8314. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  8315. user: {
  8316. nickName: "登录/注册",
  8317. phone: "",
  8318. integral: 0,
  8319. balance: 0
  8320. }
  8321. };
  8322. },
  8323. onLoad() {
  8324. },
  8325. onShow() {
  8326. this.$isLogin().then(
  8327. (res) => {
  8328. if (res) {
  8329. this.getUserInfo();
  8330. }
  8331. },
  8332. (rej) => {
  8333. }
  8334. );
  8335. },
  8336. onReachBottom() {
  8337. },
  8338. onPageScroll(e) {
  8339. },
  8340. methods: {
  8341. doIM() {
  8342. formatAppLog("log", "at pages/user/index.vue:204", 110);
  8343. getUserFollowDoctor().then(
  8344. (res) => {
  8345. if (res.code == 200) {
  8346. if (res.data != null) {
  8347. var data = { followId: res.data.followId };
  8348. startDrugReport(data).then(
  8349. (res2) => {
  8350. uni.switchTab({
  8351. url: "/pages/TUIKit/TUIPages/TUIConversation/index"
  8352. });
  8353. },
  8354. (rej) => {
  8355. }
  8356. );
  8357. } else {
  8358. uni.showToast({
  8359. icon: "none",
  8360. title: "当前没有药师为您服务"
  8361. });
  8362. }
  8363. } else {
  8364. uni.showToast({
  8365. icon: "none",
  8366. title: "请求失败"
  8367. });
  8368. }
  8369. },
  8370. (rej) => {
  8371. }
  8372. );
  8373. },
  8374. toIM() {
  8375. var that = this;
  8376. this.$isLogin().then(
  8377. (res) => {
  8378. formatAppLog("log", "at pages/user/index.vue:273", res);
  8379. if (res) {
  8380. that.doIM();
  8381. } else {
  8382. uni.navigateTo({
  8383. url: "/pages/auth/login"
  8384. });
  8385. }
  8386. }
  8387. );
  8388. },
  8389. callPhone() {
  8390. uni.makePhoneCall({
  8391. phoneNumber: "18696558100"
  8392. });
  8393. },
  8394. toCompany() {
  8395. this.$isLogin().then(
  8396. (res) => {
  8397. formatAppLog("log", "at pages/user/index.vue:293", res);
  8398. if (res) {
  8399. var token = uni.getStorageSync("CompanyUserToken");
  8400. if (token) {
  8401. uni.navigateTo({
  8402. url: "/pages_company/index"
  8403. });
  8404. } else {
  8405. uni.navigateTo({
  8406. url: "/pages_company/login"
  8407. });
  8408. }
  8409. } else {
  8410. uni.navigateTo({
  8411. url: "/pages/auth/login"
  8412. });
  8413. }
  8414. }
  8415. );
  8416. },
  8417. showLogout() {
  8418. this.show = true;
  8419. },
  8420. hideLogout() {
  8421. this.show = false;
  8422. },
  8423. logout() {
  8424. this.$logout();
  8425. uni.$TUIKit.logout();
  8426. if (uni.$TUICallKit != null) {
  8427. uni.$TUICallKit.logout();
  8428. }
  8429. uni.reLaunch({
  8430. url: "/pages/index/index",
  8431. animationType: "pop-in",
  8432. animationDuration: 100
  8433. });
  8434. this.isLogin = false;
  8435. },
  8436. getUserInfo() {
  8437. getUserInfo$1().then(
  8438. (res) => {
  8439. if (res.code == 200) {
  8440. if (res.user != null) {
  8441. this.isLogin = true;
  8442. this.user = res.user;
  8443. }
  8444. } else {
  8445. uni.showToast({
  8446. icon: "none",
  8447. title: "请求失败"
  8448. });
  8449. }
  8450. },
  8451. (rej) => {
  8452. }
  8453. );
  8454. },
  8455. navTo(url2) {
  8456. this.$isLogin().then(
  8457. (res) => {
  8458. formatAppLog("log", "at pages/user/index.vue:354", res);
  8459. if (res) {
  8460. uni.navigateTo({
  8461. url: url2
  8462. });
  8463. } else {
  8464. uni.navigateTo({
  8465. url: "/pages/auth/login"
  8466. });
  8467. }
  8468. }
  8469. );
  8470. }
  8471. }
  8472. };
  8473. function _sfc_render$2p(_ctx, _cache, $props, $setup, $data, $options) {
  8474. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_0$9);
  8475. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  8476. vue.createElementVNode("view", { class: "cont" }, [
  8477. vue.createElementVNode("view", { class: "bg" }, [
  8478. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/bbe743373f4d4b78852ea5fd9824ade4.png" })
  8479. ]),
  8480. vue.createElementVNode("view", { class: "cont-box" }, [
  8481. vue.createElementVNode(
  8482. "view",
  8483. {
  8484. class: "status_bar",
  8485. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  8486. },
  8487. null,
  8488. 4
  8489. /* STYLE */
  8490. ),
  8491. vue.createElementVNode("view", { class: "top-title" }),
  8492. vue.createElementVNode("view", {
  8493. class: "user",
  8494. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.navTo("/pages_user/personInfo"), ["stop"]))
  8495. }, [
  8496. vue.createElementVNode("view", { class: "left" }, [
  8497. vue.createElementVNode("image", {
  8498. src: $data.user.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/90d9eb0f8f87482b977611eb36b66d82.jpg" : $data.user.avatar
  8499. }, null, 8, ["src"])
  8500. ]),
  8501. vue.createElementVNode("view", { class: "right" }, [
  8502. vue.createElementVNode("view", { class: "name-box" }, [
  8503. vue.createElementVNode(
  8504. "view",
  8505. { class: "name" },
  8506. vue.toDisplayString($data.user.nickName),
  8507. 1
  8508. /* TEXT */
  8509. ),
  8510. vue.createElementVNode("view", { class: "btns" }, [
  8511. vue.createElementVNode("image", { src: "/static/images/icon_set.png" })
  8512. ])
  8513. ]),
  8514. $data.user.phone != "" ? (vue.openBlock(), vue.createElementBlock(
  8515. "view",
  8516. {
  8517. key: 0,
  8518. class: "phone"
  8519. },
  8520. vue.toDisplayString(_ctx.$parsePhone($data.user.phone)),
  8521. 1
  8522. /* TEXT */
  8523. )) : vue.createCommentVNode("v-if", true),
  8524. vue.createElementVNode("view", { class: "counts" }, [
  8525. vue.createElementVNode(
  8526. "view",
  8527. {
  8528. class: "count",
  8529. onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_user/integral"))
  8530. },
  8531. "积分 " + vue.toDisplayString($data.user.integral),
  8532. 1
  8533. /* TEXT */
  8534. ),
  8535. vue.createCommentVNode(' <view class="count">我的健康金 {{user.balance}}</view> ')
  8536. ])
  8537. ])
  8538. ]),
  8539. vue.createElementVNode("view", { class: "menus" }, [
  8540. vue.createElementVNode("view", { class: "title-box" }, [
  8541. vue.createElementVNode("view", { class: "line" }),
  8542. vue.createElementVNode("view", { class: "title" }, "我的订单")
  8543. ]),
  8544. vue.createElementVNode("view", { class: "menu-box" }, [
  8545. vue.createElementVNode("view", {
  8546. class: "menu",
  8547. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_order/inquiryOrderList"))
  8548. }, [
  8549. vue.createElementVNode("image", { src: "/static/images/icon_inquiry_order.png" }),
  8550. vue.createElementVNode("view", { class: "title" }, "问诊订单")
  8551. ]),
  8552. vue.createElementVNode("view", {
  8553. class: "menu",
  8554. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/storeOrderList"))
  8555. }, [
  8556. vue.createElementVNode("image", { src: "/static/images/icon_store_order.png" }),
  8557. vue.createElementVNode("view", { class: "title" }, "处方订单")
  8558. ]),
  8559. vue.createElementVNode("view", {
  8560. class: "menu",
  8561. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_order/packageOrderList"))
  8562. }, [
  8563. vue.createElementVNode("image", { src: "/static/images/icon_qianyue.png" }),
  8564. vue.createElementVNode("view", { class: "title" }, "服务包")
  8565. ]),
  8566. vue.createElementVNode("view", {
  8567. class: "menu",
  8568. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_order/storeOrderRefundList"))
  8569. }, [
  8570. vue.createElementVNode("image", { src: "/static/images/sales_orders_icon.png" }),
  8571. vue.createElementVNode("view", { class: "title" }, "售后服务")
  8572. ])
  8573. ])
  8574. ]),
  8575. vue.createElementVNode("view", { class: "menus" }, [
  8576. vue.createElementVNode("view", { class: "title-box" }, [
  8577. vue.createElementVNode("view", { class: "line" }),
  8578. vue.createElementVNode("view", { class: "title" }, "医疗服务")
  8579. ]),
  8580. vue.createElementVNode("view", { class: "menu-box" }, [
  8581. vue.createElementVNode("view", {
  8582. class: "menu",
  8583. onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("/pages_user/myDoctorList"))
  8584. }, [
  8585. vue.createElementVNode("image", { src: "/static/images/icon_my_doctor.png" }),
  8586. vue.createElementVNode("view", { class: "title" }, "我的医生")
  8587. ]),
  8588. vue.createElementVNode("view", {
  8589. class: "menu",
  8590. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_order/prescribeList"))
  8591. }, [
  8592. vue.createElementVNode("image", { src: "/static/images/icon_my_prescription.png" }),
  8593. vue.createElementVNode("view", { class: "title" }, "我的处方")
  8594. ]),
  8595. vue.createElementVNode("view", {
  8596. class: "menu",
  8597. onClick: _cache[8] || (_cache[8] = ($event) => $options.navTo("/pages_user/followList"))
  8598. }, [
  8599. vue.createElementVNode("image", { src: "/static/images/icon_my_follow.png" }),
  8600. vue.createElementVNode("view", { class: "title" }, "我的随访")
  8601. ]),
  8602. vue.createElementVNode("view", {
  8603. class: "menu",
  8604. onClick: _cache[9] || (_cache[9] = ($event) => $options.toIM())
  8605. }, [
  8606. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240429/6e68b42d9d824532945a1dda73350576.png" }),
  8607. vue.createElementVNode("view", { class: "title" }, "用药咨询")
  8608. ]),
  8609. vue.createElementVNode("view", {
  8610. class: "menu",
  8611. onClick: _cache[10] || (_cache[10] = ($event) => $options.navTo("/pages_user/drugReportList"))
  8612. }, [
  8613. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240429/6b9f340b16e74fa2bc095265d525769e.png" }),
  8614. vue.createElementVNode("view", { class: "title" }, "用药报告")
  8615. ])
  8616. ])
  8617. ]),
  8618. vue.createElementVNode("view", { class: "menus" }, [
  8619. vue.createElementVNode("view", { class: "title-box" }, [
  8620. vue.createElementVNode("view", { class: "line" }),
  8621. vue.createElementVNode("view", { class: "title" }, "常用应用")
  8622. ]),
  8623. vue.createElementVNode("view", { class: "menu-box" }, [
  8624. vue.createElementVNode("view", {
  8625. class: "menu",
  8626. onClick: _cache[11] || (_cache[11] = ($event) => $options.navTo("/pages_user/patient"))
  8627. }, [
  8628. vue.createElementVNode("image", {
  8629. class: "min-image",
  8630. src: "/static/images/icon_visitor_management.png"
  8631. }),
  8632. vue.createElementVNode("view", { class: "title" }, "就诊人管理")
  8633. ]),
  8634. vue.createElementVNode("view", {
  8635. class: "menu",
  8636. onClick: _cache[12] || (_cache[12] = ($event) => $options.navTo("/pages_user/address"))
  8637. }, [
  8638. vue.createElementVNode("image", {
  8639. class: "min-image",
  8640. src: "/static/images/icon_address_management.png"
  8641. }),
  8642. vue.createElementVNode("view", { class: "title" }, "地址管理")
  8643. ]),
  8644. vue.createElementVNode("view", {
  8645. class: "menu",
  8646. onClick: _cache[13] || (_cache[13] = ($event) => $options.navTo("/pages_order/inquiryOrderPingList"))
  8647. }, [
  8648. vue.createElementVNode("image", {
  8649. class: "min-image",
  8650. src: "/static/images/icon_my_comments.png"
  8651. }),
  8652. vue.createElementVNode("view", { class: "title" }, "我的评论")
  8653. ]),
  8654. vue.createElementVNode("view", {
  8655. class: "menu",
  8656. onClick: _cache[14] || (_cache[14] = ($event) => $options.navTo("/pages_user/myCouponList"))
  8657. }, [
  8658. vue.createElementVNode("image", {
  8659. class: "min-image",
  8660. src: "/static/images/icon_my_coupon.png"
  8661. }),
  8662. vue.createElementVNode("view", { class: "title" }, "我的优惠卷")
  8663. ])
  8664. ]),
  8665. vue.createElementVNode("view", { class: "menu-box" }, [
  8666. vue.createElementVNode("view", {
  8667. class: "menu",
  8668. onClick: _cache[15] || (_cache[15] = ($event) => $options.navTo("/pages_company/couponList?couponType=6"))
  8669. }, [
  8670. vue.createElementVNode("image", {
  8671. class: "min-image",
  8672. src: "/static/images/icon_coupon.png"
  8673. }),
  8674. vue.createElementVNode("view", { class: "title" }, "领券中心")
  8675. ]),
  8676. vue.createElementVNode("view", {
  8677. class: "menu",
  8678. onClick: _cache[16] || (_cache[16] = ($event) => $options.navTo("/pages_user/cert"))
  8679. }, [
  8680. vue.createElementVNode("image", {
  8681. class: "min-image",
  8682. src: "/static/images/cert.png"
  8683. }),
  8684. vue.createElementVNode("view", { class: "title" }, "资质证书")
  8685. ]),
  8686. vue.createElementVNode("view", { class: "menu" }, [
  8687. vue.createElementVNode("image", {
  8688. class: "min-image",
  8689. src: "/static/images/icon_service_center.png"
  8690. }),
  8691. vue.createElementVNode("view", { class: "title" }, "客服中心"),
  8692. vue.createElementVNode("button", {
  8693. class: "contact-btn",
  8694. "open-type": "contact"
  8695. })
  8696. ]),
  8697. vue.createElementVNode("view", {
  8698. class: "menu",
  8699. onClick: _cache[17] || (_cache[17] = ($event) => $options.navTo("/pages_user/about"))
  8700. }, [
  8701. vue.createElementVNode("image", {
  8702. class: "min-image",
  8703. src: "/static/images/icon_feedback.png"
  8704. }),
  8705. vue.createElementVNode("view", { class: "title" }, "关于我们")
  8706. ])
  8707. ])
  8708. ]),
  8709. vue.createElementVNode("view", { class: "menus" }, [
  8710. vue.createElementVNode("view", { class: "title-box" }, [
  8711. vue.createElementVNode("view", { class: "line" }),
  8712. vue.createElementVNode("view", { class: "title" }, "管理端")
  8713. ]),
  8714. vue.createElementVNode("view", { class: "menu-box" }, [
  8715. vue.createElementVNode("view", {
  8716. class: "menu",
  8717. onClick: _cache[18] || (_cache[18] = ($event) => $options.navTo("/pages_user/registerDoctor?type=1"))
  8718. }, [
  8719. vue.createElementVNode("image", {
  8720. class: "min-image",
  8721. src: "/static/images/doctor_reg.png"
  8722. }),
  8723. vue.createElementVNode("view", { class: "title" }, "医生入驻")
  8724. ]),
  8725. vue.createElementVNode("view", {
  8726. class: "menu",
  8727. onClick: _cache[19] || (_cache[19] = ($event) => $options.navTo("/pages_user/registerDoctor?type=2"))
  8728. }, [
  8729. vue.createElementVNode("image", {
  8730. class: "min-image",
  8731. src: "/static/images/doctor_reg.png"
  8732. }),
  8733. vue.createElementVNode("view", { class: "title" }, "药师入驻")
  8734. ]),
  8735. vue.createElementVNode("view", {
  8736. class: "menu",
  8737. onClick: _cache[20] || (_cache[20] = ($event) => $options.toCompany())
  8738. }, [
  8739. vue.createElementVNode("image", {
  8740. class: "min-image",
  8741. src: "/static/images/sales.png"
  8742. }),
  8743. vue.createElementVNode("view", { class: "title" }, "客服端")
  8744. ])
  8745. ])
  8746. ]),
  8747. $data.isLogin ? (vue.openBlock(), vue.createElementBlock("view", {
  8748. key: 0,
  8749. class: "btn-box"
  8750. }, [
  8751. vue.createElementVNode("view", {
  8752. class: "sub-btn",
  8753. onClick: _cache[21] || (_cache[21] = ($event) => $options.showLogout())
  8754. }, "退出登录")
  8755. ])) : vue.createCommentVNode("v-if", true),
  8756. vue.createElementVNode("view", { class: "tip" }, [
  8757. vue.createElementVNode("view", { class: "title" }, "技术支持 重庆云联融智科技有限公司 "),
  8758. vue.createCommentVNode(' <view class="tel">联系电话 18696558100 </view> ')
  8759. ])
  8760. ])
  8761. ]),
  8762. vue.createVNode(_component_u_modal, {
  8763. show: $data.show,
  8764. title: "提示",
  8765. showCancelButton: true,
  8766. onCancel: _cache[22] || (_cache[22] = ($event) => $options.hideLogout()),
  8767. onConfirm: _cache[23] || (_cache[23] = ($event) => $options.logout()),
  8768. content: "确认退出吗?"
  8769. }, null, 8, ["show"])
  8770. ]);
  8771. }
  8772. const PagesUserIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2c, [["render", _sfc_render$2p], ["__scopeId", "data-v-79e6a490"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/user/index.vue"]]);
  8773. function formatTime(secondTime) {
  8774. const time = secondTime;
  8775. let newTime;
  8776. let hour;
  8777. let minite;
  8778. let seconds;
  8779. if (time >= 3600) {
  8780. hour = parseInt(`${time / 3600}`, 10) < 10 ? `0${parseInt(`${time / 3600}`, 10)}` : parseInt(`${time / 3600}`, 10);
  8781. minite = parseInt(`${time % 60 / 60}`, 10) < 10 ? `0${parseInt(`${time % 60 / 60}`, 10)}` : parseInt(`${time % 60 / 60}`, 10);
  8782. seconds = time % 3600 < 10 ? `0${time % 3600}` : time % 3600;
  8783. if (seconds > 60) {
  8784. minite = parseInt(`${seconds / 60}`, 10) < 10 ? `0${parseInt(`${seconds / 60}`, 10)}` : parseInt(`${seconds / 60}`, 10);
  8785. seconds = seconds % 60 < 10 ? `0${seconds % 60}` : seconds % 60;
  8786. }
  8787. newTime = `${hour}:${minite}:${seconds}`;
  8788. } else if (time >= 60 && time < 3600) {
  8789. minite = parseInt(`${time / 60}`, 10) < 10 ? `0${parseInt(`${time / 60}`, 10)}` : parseInt(`${time / 60}`, 10);
  8790. seconds = time % 60 < 10 ? `0${time % 60}` : time % 60;
  8791. newTime = `00:${minite}:${seconds}`;
  8792. } else if (time < 60) {
  8793. seconds = time < 10 ? `0${time}` : time;
  8794. newTime = `00:00:${seconds}`;
  8795. }
  8796. return newTime;
  8797. }
  8798. function caculateTimeago(dateTimeStamp) {
  8799. const minute = 1e3 * 60;
  8800. const hour = minute * 60;
  8801. const day = hour * 24;
  8802. const week = day * 7;
  8803. const now = (/* @__PURE__ */ new Date()).getTime();
  8804. const diffValue = now - dateTimeStamp;
  8805. let result = "";
  8806. if (diffValue < 0) {
  8807. return;
  8808. }
  8809. const minC = diffValue / minute;
  8810. const hourC = diffValue / hour;
  8811. const dayC = diffValue / day;
  8812. const weekC = diffValue / week;
  8813. if (weekC >= 1 && weekC <= 4) {
  8814. result = ` ${parseInt(`${weekC}`, 10)}周前`;
  8815. } else if (dayC >= 1 && dayC <= 6) {
  8816. result = ` ${parseInt(`${dayC}`, 10)}天前`;
  8817. } else if (hourC >= 1 && hourC <= 23) {
  8818. result = ` ${parseInt(`${hourC}`, 10)}小时前`;
  8819. } else if (minC >= 1 && minC <= 59) {
  8820. result = ` ${parseInt(`${minC}`, 10)}分钟前`;
  8821. } else if (diffValue >= 0 && diffValue <= minute) {
  8822. result = "刚刚";
  8823. } else {
  8824. const datetime = /* @__PURE__ */ new Date();
  8825. datetime.setTime(dateTimeStamp);
  8826. const Nyear = datetime.getFullYear();
  8827. const Nmonth = datetime.getMonth() + 1 < 10 ? `0${datetime.getMonth() + 1}` : datetime.getMonth() + 1;
  8828. const Ndate = datetime.getDate() < 10 ? `0${datetime.getDate()}` : datetime.getDate();
  8829. result = `${Nyear}-${Nmonth}-${Ndate}`;
  8830. }
  8831. return result;
  8832. }
  8833. const TUIConversationList$1 = vue.defineComponent({
  8834. props: {
  8835. conversationList: {
  8836. type: Array,
  8837. default: () => {
  8838. return [];
  8839. }
  8840. },
  8841. currentID: {
  8842. type: String,
  8843. default: () => {
  8844. return "";
  8845. }
  8846. }
  8847. },
  8848. setup(props2, ctx) {
  8849. const obj = vue.reactive({
  8850. conversationList: [],
  8851. currentID: "",
  8852. isOpened: "none",
  8853. currentConversation: {},
  8854. dialogID: ""
  8855. });
  8856. vue.watchEffect(() => {
  8857. obj.conversationList = props2.conversationList;
  8858. obj.currentID = props2.currentID;
  8859. });
  8860. const handleItemAvator = (item) => {
  8861. var _a, _b, _c;
  8862. let avatar = "";
  8863. switch (item.type) {
  8864. case uni.$TIM.TYPES.CONV_C2C:
  8865. avatar = ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
  8866. break;
  8867. case uni.$TIM.TYPES.CONV_GROUP:
  8868. avatar = ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png";
  8869. break;
  8870. case uni.$TIM.TYPES.CONV_SYSTEM:
  8871. avatar = ((_c = item == null ? void 0 : item.groupProfile) == null ? void 0 : _c.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png";
  8872. break;
  8873. }
  8874. return avatar;
  8875. };
  8876. const handleItemName = (item) => {
  8877. var _a, _b;
  8878. let name = "";
  8879. switch (item.type) {
  8880. case uni.$TIM.TYPES.CONV_C2C:
  8881. name = (item == null ? void 0 : item.userProfile.nick) || ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.userID) || "";
  8882. break;
  8883. case uni.$TIM.TYPES.CONV_GROUP:
  8884. name = item.groupProfile.name || ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.groupID) || "";
  8885. break;
  8886. case uni.$TIM.TYPES.CONV_SYSTEM:
  8887. name = "系统通知";
  8888. break;
  8889. }
  8890. return name;
  8891. };
  8892. const handleItemTime = (time) => {
  8893. if (time > 0) {
  8894. return caculateTimeago(time * 1e3);
  8895. }
  8896. return "";
  8897. };
  8898. const handleItemMessage = (message) => {
  8899. switch (message.type) {
  8900. case uni.$TIM.TYPES.MSG_TEXT:
  8901. return message.payload.text;
  8902. default:
  8903. return message.messageForShow;
  8904. }
  8905. };
  8906. const handleGotoItem = (item) => {
  8907. ctx.emit("handleGotoItem", item);
  8908. };
  8909. const handleItemLongpress = (item) => {
  8910. obj.currentConversation = item;
  8911. obj.dialogID = item.conversationID;
  8912. if (item.type === "C2C") {
  8913. obj.currentuserID = item.userProfile.userID;
  8914. } else if (item.type === "GROUP") {
  8915. obj.currentuserID = item.groupProfile.groupID;
  8916. }
  8917. obj.conversationType = item.type;
  8918. };
  8919. const handlerIsOpened = (item) => {
  8920. if (item.conversationID === obj.doalogID) {
  8921. return "right";
  8922. } else {
  8923. return "none";
  8924. }
  8925. };
  8926. const handleConversation = (type2) => {
  8927. switch (type2) {
  8928. case "delete":
  8929. uni.$TUIKit.TUIConversationServer.deleteConversation(
  8930. obj.dialogID
  8931. ).then((imResponse) => {
  8932. imResponse.data;
  8933. });
  8934. obj.dialogID = "";
  8935. break;
  8936. case "ispinned":
  8937. if (type2 === "ispinned") {
  8938. const options = {
  8939. conversationID: obj.dialogID,
  8940. isPinned: true
  8941. };
  8942. uni.$TUIKit.TUIConversationServer.pinConversation(options).then(
  8943. (imResponse) => {
  8944. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:239", imResponse);
  8945. }
  8946. );
  8947. }
  8948. obj.dialogID = "";
  8949. break;
  8950. case "dispinned":
  8951. if (type2 === "dispinned") {
  8952. const options = {
  8953. conversationID: obj.dialogID,
  8954. isPinned: false
  8955. };
  8956. uni.$TUIKit.TUIConversationServer.pinConversation(options).then(
  8957. (imResponse) => {
  8958. }
  8959. );
  8960. }
  8961. obj.dialogID = "";
  8962. break;
  8963. case "mute":
  8964. if (type2 === "mute" && obj.conversationType === "C2C") {
  8965. const options = {
  8966. userIDList: [obj.currentuserID],
  8967. messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE
  8968. };
  8969. uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
  8970. (imResponse) => {
  8971. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:265", imResponse);
  8972. }
  8973. );
  8974. } else if (type2 === "mute" && obj.conversationType === "GROUP") {
  8975. const options = {
  8976. groupID: obj.currentuserID,
  8977. messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE
  8978. };
  8979. uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
  8980. (imResponse) => {
  8981. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:275", imResponse);
  8982. }
  8983. );
  8984. }
  8985. obj.dialogID = "";
  8986. break;
  8987. case "notMute":
  8988. if (type2 === "notMute" && obj.conversationType === "C2C") {
  8989. const options = {
  8990. userIDList: [obj.currentuserID],
  8991. messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE
  8992. };
  8993. uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
  8994. (imResponse) => {
  8995. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:289", imResponse);
  8996. }
  8997. );
  8998. } else if (type2 === "notMute" && obj.conversationType === "GROUP") {
  8999. const options = {
  9000. groupID: obj.currentuserID,
  9001. messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE
  9002. };
  9003. uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
  9004. (imResponse) => {
  9005. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:299", imResponse);
  9006. }
  9007. );
  9008. }
  9009. obj.dialogID = "";
  9010. break;
  9011. }
  9012. };
  9013. return {
  9014. ...vue.toRefs(obj),
  9015. handleGotoItem,
  9016. handleItemAvator,
  9017. handleItemTime,
  9018. handleItemMessage,
  9019. handleItemName,
  9020. handleItemLongpress,
  9021. handleConversation,
  9022. handlerIsOpened
  9023. };
  9024. }
  9025. });
  9026. const _imports_0$6 = "/assets/mute.7e6900f5.svg";
  9027. function _sfc_render$2o(_ctx, _cache, $props, $setup, $data, $options) {
  9028. return vue.openBlock(), vue.createElementBlock("view", {
  9029. class: "TUI-conversation-list",
  9030. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.dialogID = "")
  9031. }, [
  9032. _ctx.conversationList.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  9033. key: 0,
  9034. class: "no-data-box"
  9035. }, [
  9036. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" }),
  9037. vue.createElementVNode("view", { class: "empty-title" }, "暂无数据")
  9038. ])) : vue.createCommentVNode("v-if", true),
  9039. _ctx.conversationList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
  9040. vue.Fragment,
  9041. { key: 1 },
  9042. vue.renderList(_ctx.conversationList, (item, index2) => {
  9043. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  9044. vue.createElementVNode("view", {
  9045. class: vue.normalizeClass(["TUI-conversation-item", [
  9046. _ctx.dialogID === item.conversationID && "selected",
  9047. item.isPinned && "pinned"
  9048. ]]),
  9049. onClick: ($event) => _ctx.handleGotoItem(item),
  9050. onLongpress: ($event) => _ctx.handleItemLongpress(item)
  9051. }, [
  9052. vue.createElementVNode("aside", { class: "left" }, [
  9053. vue.createElementVNode("image", {
  9054. mode: "aspectFill",
  9055. class: "avatar",
  9056. src: _ctx.handleItemAvator(item)
  9057. }, null, 8, ["src"]),
  9058. item.unreadCount > 0 && item.messageRemindType !== "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock(
  9059. "span",
  9060. {
  9061. key: 0,
  9062. class: "num"
  9063. },
  9064. vue.toDisplayString(item.unreadCount > 99 ? "99+" : item.unreadCount),
  9065. 1
  9066. /* TEXT */
  9067. )) : vue.createCommentVNode("v-if", true),
  9068. item.unreadCount > 0 && item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("span", {
  9069. key: 1,
  9070. class: "num-notNotify"
  9071. })) : vue.createCommentVNode("v-if", true)
  9072. ]),
  9073. vue.createElementVNode("main", { class: "content" }, [
  9074. vue.createElementVNode("header", { class: "content-header" }, [
  9075. vue.createElementVNode("label", null, [
  9076. vue.createElementVNode(
  9077. "p",
  9078. { class: "name" },
  9079. vue.toDisplayString(_ctx.handleItemName(item)),
  9080. 1
  9081. /* TEXT */
  9082. )
  9083. ])
  9084. ]),
  9085. vue.createElementVNode("footer", { class: "content-footer" }, [
  9086. item.unreadCount > 0 && item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock(
  9087. "span",
  9088. {
  9089. key: 0,
  9090. class: "content-footer-unread"
  9091. },
  9092. "[" + vue.toDisplayString(item.unreadCount > 99 ? "99+" : item.unreadCount) + "条]",
  9093. 1
  9094. /* TEXT */
  9095. )) : vue.createCommentVNode("v-if", true),
  9096. vue.createElementVNode(
  9097. "span",
  9098. { class: "message-text" },
  9099. vue.toDisplayString(_ctx.handleItemMessage(item.lastMessage)),
  9100. 1
  9101. /* TEXT */
  9102. ),
  9103. vue.createElementVNode("view", { class: "conversation-line" })
  9104. ]),
  9105. vue.createElementVNode("view", { class: "item-footer" }, [
  9106. vue.createElementVNode(
  9107. "span",
  9108. { class: "time" },
  9109. vue.toDisplayString(_ctx.handleItemTime(item.lastMessage.lastTime)),
  9110. 1
  9111. /* TEXT */
  9112. ),
  9113. item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("image", {
  9114. key: 0,
  9115. class: "mute-icon",
  9116. src: _imports_0$6
  9117. })) : vue.createCommentVNode("v-if", true)
  9118. ])
  9119. ]),
  9120. item.conversationID === _ctx.dialogID ? (vue.openBlock(), vue.createElementBlock("view", {
  9121. key: 0,
  9122. class: "dialog-box dialog-item"
  9123. }, [
  9124. vue.createElementVNode("view", {
  9125. class: "conversation-options",
  9126. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => _ctx.handleConversation("delete", _ctx.dialogID), ["stop"]))
  9127. }, "删除会话"),
  9128. !item.isPinned ? (vue.openBlock(), vue.createElementBlock("view", {
  9129. key: 0,
  9130. class: "conversation-options",
  9131. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => _ctx.handleConversation("ispinned", _ctx.dialogID), ["stop"]))
  9132. }, "置顶会话")) : vue.createCommentVNode("v-if", true),
  9133. item.isPinned ? (vue.openBlock(), vue.createElementBlock("view", {
  9134. key: 1,
  9135. class: "conversation-options",
  9136. onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => _ctx.handleConversation("dispinned", _ctx.dialogID), ["stop"]))
  9137. }, "取消置顶")) : vue.createCommentVNode("v-if", true),
  9138. item.messageRemindType === "" || item.messageRemindType === "AcceptAndNotify" ? (vue.openBlock(), vue.createElementBlock("view", {
  9139. key: 2,
  9140. class: "conversation-options",
  9141. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => _ctx.handleConversation("mute", _ctx.dialogID), ["stop"]))
  9142. }, "消息免打扰")) : vue.createCommentVNode("v-if", true),
  9143. item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("view", {
  9144. key: 3,
  9145. class: "conversation-options",
  9146. onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => _ctx.handleConversation("notMute", _ctx.dialogID), ["stop"]))
  9147. }, "取消免打扰")) : vue.createCommentVNode("v-if", true)
  9148. ])) : vue.createCommentVNode("v-if", true)
  9149. ], 42, ["onClick", "onLongpress"])
  9150. ]);
  9151. }),
  9152. 128
  9153. /* KEYED_FRAGMENT */
  9154. )) : vue.createCommentVNode("v-if", true)
  9155. ]);
  9156. }
  9157. const TUIConversationList = /* @__PURE__ */ _export_sfc(TUIConversationList$1, [["render", _sfc_render$2o], ["__scopeId", "data-v-9a62e141"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue"]]);
  9158. const _sfc_main$2b = vue.defineComponent({
  9159. name: "dialog",
  9160. props: {
  9161. visible: {
  9162. type: Boolean,
  9163. default: () => {
  9164. return false;
  9165. }
  9166. },
  9167. styleConfig: {
  9168. type: Object,
  9169. default: () => {
  9170. return {
  9171. width: "240px",
  9172. // height: '120px',
  9173. padding: "16px",
  9174. top: "10px",
  9175. right: "10px"
  9176. };
  9177. }
  9178. },
  9179. handleClose: {
  9180. type: Function,
  9181. default: () => {
  9182. }
  9183. }
  9184. },
  9185. setup(props2, context) {
  9186. }
  9187. });
  9188. function _sfc_render$2n(_ctx, _cache, $props, $setup, $data, $options) {
  9189. return _ctx.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  9190. key: 0,
  9191. class: "dialog",
  9192. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))
  9193. }, [
  9194. vue.createElementVNode(
  9195. "view",
  9196. {
  9197. class: "dialog-container",
  9198. style: vue.normalizeStyle(_ctx.styleConfig)
  9199. },
  9200. [
  9201. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9202. ],
  9203. 4
  9204. /* STYLE */
  9205. )
  9206. ])) : vue.createCommentVNode("v-if", true);
  9207. }
  9208. const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$2b, [["render", _sfc_render$2n], ["__scopeId", "data-v-842d67a9"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/components/dialog.vue"]]);
  9209. const TUIConversation = vue.defineComponent({
  9210. name: "TUIConversation",
  9211. components: {
  9212. TUIConversationList,
  9213. Dialog
  9214. },
  9215. setup(props2) {
  9216. const timStore2 = store.state.timStore;
  9217. const data = vue.reactive({
  9218. conversationList: vue.computed(() => timStore2.conversationList),
  9219. currrentConversationID: "",
  9220. open: false,
  9221. searchUserID: "",
  9222. selectedList: [],
  9223. searchUserList: [],
  9224. step: 1,
  9225. showDialog: false,
  9226. item: {
  9227. flow: "out",
  9228. status: "success"
  9229. },
  9230. styleConfig: {
  9231. width: "150px",
  9232. // height: '160px',
  9233. padding: "16px 16px 0px",
  9234. top: "8px",
  9235. right: "8px"
  9236. },
  9237. chatList: [
  9238. {
  9239. imgType: "SINGLE",
  9240. type: uni.$TIM.TYPES.CONV_C2C,
  9241. id: 1,
  9242. content: "发起会话"
  9243. },
  9244. {
  9245. imgType: "GROUP",
  9246. type: uni.$TIM.TYPES.GRP_WORK,
  9247. id: 1,
  9248. content: "工作群"
  9249. },
  9250. {
  9251. imgType: "GROUP",
  9252. type: uni.$TIM.TYPES.GRP_PUBLIC,
  9253. id: 2,
  9254. content: "社交群"
  9255. },
  9256. {
  9257. imgType: "GROUP",
  9258. type: uni.$TIM.TYPES.GRP_MEETING,
  9259. id: 3,
  9260. content: "会议群"
  9261. }
  9262. ]
  9263. });
  9264. onUnload(() => {
  9265. uni.$TUIKit.TUIConversationServer.destroyed();
  9266. });
  9267. onNavigationBarButtonTap(() => {
  9268. data.showDialog = !data.showDialog;
  9269. });
  9270. onShow(() => {
  9271. uni.$emit("refreshIM");
  9272. store.commit("timStore/setConversationID", "");
  9273. });
  9274. const handleCurrrentConversation = (value2) => {
  9275. if (value2.lastMessage.cloudCustomData != null) {
  9276. try {
  9277. var json = JSON.parse(value2.lastMessage.cloudCustomData);
  9278. store.commit("timStore/setImType", json.imType);
  9279. store.commit("timStore/setOrderType", json.orderType);
  9280. store.commit("timStore/setOrderId", json.orderId);
  9281. store.commit("timStore/setFollowId", json.followId);
  9282. store.commit("timStore/setType", json.type);
  9283. } catch (e) {
  9284. }
  9285. }
  9286. data.currrentConversationID = value2.conversationID;
  9287. store.commit("timStore/setConversationID", value2.conversationID);
  9288. uni.navigateTo({
  9289. url: `../TUIChat/index?conversationName=${handleItemName(value2)}`
  9290. });
  9291. uni.$TUIKit.TUIConversationServer.setMessageRead(value2.conversationID);
  9292. const curConversation = data.conversationList.filter((item) => {
  9293. return item.conversationID === value2.conversationID;
  9294. });
  9295. store.commit("timStore/setConversation", curConversation);
  9296. uni.$TUIKit.TUIConversationServer.getConversationProfile(
  9297. value2.conversationID
  9298. ).then((res) => {
  9299. store.commit("timStore/setConversation", res.data.conversation);
  9300. });
  9301. };
  9302. const handleShow = () => {
  9303. data.showDialog = true;
  9304. };
  9305. const handleContentClick = (item) => {
  9306. data.showDialog = false;
  9307. uni.navigateTo({
  9308. url: `../TUIConversation/create?title=${item.content}&type=${item.type}`
  9309. });
  9310. };
  9311. const handleClose = () => {
  9312. data.showDialog = false;
  9313. };
  9314. const handleItemName = (item) => {
  9315. var _a, _b;
  9316. let name = "";
  9317. switch (item.type) {
  9318. case uni.$TIM.TYPES.CONV_C2C:
  9319. name = (item == null ? void 0 : item.userProfile.nick) || ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.userID) || "";
  9320. break;
  9321. case uni.$TIM.TYPES.CONV_GROUP:
  9322. name = item.groupProfile.name || ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.groupID) || "";
  9323. break;
  9324. case uni.$TIM.TYPES.CONV_SYSTEM:
  9325. name = "系统通知";
  9326. break;
  9327. }
  9328. return name;
  9329. };
  9330. return {
  9331. ...vue.toRefs(data),
  9332. handleCurrrentConversation,
  9333. handleContentClick,
  9334. handleItemName,
  9335. handleClose,
  9336. handleShow
  9337. };
  9338. }
  9339. });
  9340. const _imports_0$5 = "/assets/singlePerson.59f1319b.svg";
  9341. const _imports_1$2 = "/assets/multiPerson.63026248.svg";
  9342. function _sfc_render$2m(_ctx, _cache, $props, $setup, $data, $options) {
  9343. const _component_Dialog = vue.resolveComponent("Dialog");
  9344. const _component_TUIConversationList = vue.resolveComponent("TUIConversationList");
  9345. return vue.openBlock(), vue.createElementBlock(
  9346. vue.Fragment,
  9347. null,
  9348. [
  9349. vue.createVNode(_component_Dialog, {
  9350. visible: _ctx.showDialog,
  9351. styleConfig: _ctx.styleConfig,
  9352. handleClose: _ctx.handleClose
  9353. }, {
  9354. default: vue.withCtx(() => [
  9355. (vue.openBlock(true), vue.createElementBlock(
  9356. vue.Fragment,
  9357. null,
  9358. vue.renderList(_ctx.chatList, (item, index2) => {
  9359. return vue.openBlock(), vue.createElementBlock("view", {
  9360. key: index2,
  9361. class: "chat-container",
  9362. onClick: vue.withModifiers(($event) => _ctx.handleContentClick(item), ["stop"])
  9363. }, [
  9364. item.imgType === "SINGLE" ? (vue.openBlock(), vue.createElementBlock("image", {
  9365. key: 0,
  9366. class: "item-icon",
  9367. src: _imports_0$5
  9368. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9369. key: 1,
  9370. class: "item-icon",
  9371. src: _imports_1$2
  9372. })),
  9373. vue.createElementVNode(
  9374. "view",
  9375. null,
  9376. vue.toDisplayString(item.content),
  9377. 1
  9378. /* TEXT */
  9379. )
  9380. ], 8, ["onClick"]);
  9381. }),
  9382. 128
  9383. /* KEYED_FRAGMENT */
  9384. ))
  9385. ]),
  9386. _: 1
  9387. /* STABLE */
  9388. }, 8, ["visible", "styleConfig", "handleClose"]),
  9389. vue.createElementVNode("view", { class: "TUI-conversation" }, [
  9390. vue.createCommentVNode(' <view class="create-group" @click="handleShow"> + 发起聊天</view> '),
  9391. vue.createVNode(_component_TUIConversationList, {
  9392. currentID: _ctx.currrentConversationID,
  9393. conversationList: _ctx.conversationList,
  9394. onHandleGotoItem: _ctx.handleCurrrentConversation
  9395. }, null, 8, ["currentID", "conversationList", "onHandleGotoItem"])
  9396. ])
  9397. ],
  9398. 64
  9399. /* STABLE_FRAGMENT */
  9400. );
  9401. }
  9402. const PagesTUIKitTUIPagesTUIConversationIndex = /* @__PURE__ */ _export_sfc(TUIConversation, [["render", _sfc_render$2m], ["__scopeId", "data-v-653b394a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/index.vue"]]);
  9403. const _imports_0$4 = "/assets/selected.2c312a9c.svg";
  9404. const _sfc_main$2a = vue.defineComponent({
  9405. name: "Create",
  9406. props: {},
  9407. setup(props2, context) {
  9408. const TUIConversationServer2 = uni.$TUIKit.TUIConversationServer;
  9409. const { userInfo } = store.state.timStore;
  9410. const data = vue.reactive({
  9411. userID: (userInfo == null ? void 0 : userInfo.userID) || "",
  9412. inputUserID: "",
  9413. chooseUserList: [],
  9414. title: "发起会话",
  9415. myProfile: {},
  9416. type: uni.$TIM.TYPES.CONV_C2C
  9417. });
  9418. onLoad((options) => {
  9419. data.title = options && options.title || "发起会话";
  9420. data.type = options && options.type || uni.$TIM.TYPES.CONV_C2C;
  9421. });
  9422. const handleUserIdInput = (e) => {
  9423. data.inputUserID = e.detail.value;
  9424. uni.$TUIKit.getMyProfile().then((imResponse) => {
  9425. data.myProfile = imResponse.data;
  9426. }).catch((imError) => {
  9427. formatAppLog("warn", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:90", "getMyProfile error:", imError);
  9428. });
  9429. };
  9430. const handleGetUserProfileInfo = () => {
  9431. if (!data.inputUserID)
  9432. return;
  9433. const userIDList = [data.inputUserID];
  9434. uni.$TUIKit.getUserProfile({ userIDList }).then((imRes) => {
  9435. uni.hideLoading();
  9436. if (imRes.data.length > 0) {
  9437. const userInfo2 = {
  9438. ...imRes.data[0],
  9439. isChoose: false
  9440. };
  9441. if (data.chooseUserList.filter(
  9442. (obj) => userInfo2.userID === obj.userID
  9443. ).length === 0) {
  9444. data.chooseUserList.push(userInfo2);
  9445. }
  9446. } else {
  9447. uni.showToast({
  9448. title: "搜索用户不存在",
  9449. icon: "error"
  9450. });
  9451. data.inputUserID = "";
  9452. }
  9453. }).catch((err) => {
  9454. uni.hideLoading();
  9455. });
  9456. };
  9457. const handleChoose = (item) => {
  9458. const list = data.chooseUserList.map((obj) => {
  9459. if (item.userID == obj.userID) {
  9460. return {
  9461. ...obj,
  9462. isChoose: !obj.isChoose
  9463. };
  9464. } else {
  9465. return obj;
  9466. }
  9467. });
  9468. data.chooseUserList = list;
  9469. };
  9470. const handleCreateGroup = () => {
  9471. var _a, _b;
  9472. const chooseList = data.chooseUserList.filter((obj) => obj.isChoose);
  9473. if (chooseList.length > 0) {
  9474. switch (data.type) {
  9475. case uni.$TIM.TYPES.CONV_C2C: {
  9476. if (chooseList.length > 1) {
  9477. uni.showToast({
  9478. title: `“发起会话”仅能选择一个用户`,
  9479. icon: "none"
  9480. });
  9481. return;
  9482. } else {
  9483. const conversationId = `C2C${chooseList[0].userID}`;
  9484. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:154", conversationId);
  9485. handleJumpToChat(conversationId);
  9486. }
  9487. break;
  9488. }
  9489. case uni.$TIM.TYPES.GRP_WORK:
  9490. case uni.$TIM.TYPES.GRP_PUBLIC:
  9491. case uni.$TIM.TYPES.GRP_MEETING: {
  9492. let name = "";
  9493. if (chooseList.length > 2) {
  9494. name = chooseList.slice(0, 3).map((obj) => obj.nick || obj.userID).join(",") || "";
  9495. } else {
  9496. name = chooseList.map((obj) => obj.nick || obj.userID).join(",") + "、" + (((_a = data.myProfile) == null ? void 0 : _a.nick) || ((_b = data.myProfile) == null ? void 0 : _b.userID));
  9497. }
  9498. const groupOptions = {
  9499. avatar: "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png",
  9500. type: data.type,
  9501. name,
  9502. memberList: chooseList.map((obj) => ({
  9503. userID: obj.userID,
  9504. role: obj.role,
  9505. memberCustomField: obj.memberCustomField
  9506. }))
  9507. };
  9508. uni.showLoading({ title: "群组创建中…" });
  9509. uni.$TUIKit.createGroup(groupOptions).then((imResponse) => {
  9510. uni.hideLoading();
  9511. const { groupID } = imResponse.data && imResponse.data.group;
  9512. if (groupID) {
  9513. const conversationId = `GROUP${groupID}`;
  9514. handleJumpToChat(conversationId);
  9515. }
  9516. }).catch((err) => {
  9517. uni.showToast({ title: "群组创建失败!" });
  9518. uni.hideLoading();
  9519. });
  9520. break;
  9521. }
  9522. }
  9523. } else {
  9524. uni.showToast({
  9525. title: "请选择相关用户",
  9526. icon: "none"
  9527. });
  9528. }
  9529. };
  9530. const handleJumpToChat = (conversationId) => {
  9531. store.commit("timStore/setConversationID", conversationId);
  9532. TUIConversationServer2.setMessageRead(conversationId);
  9533. TUIConversationServer2.getConversationProfile(conversationId).then((res) => {
  9534. var _a;
  9535. const { conversation } = res.data;
  9536. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:221", "create conversation response = ", res);
  9537. store.commit("timStore/setConversation", conversation);
  9538. let url2 = "../TUIChat/index";
  9539. if (conversationId.slice(0, 5) === "GROUP") {
  9540. const { name } = conversation.groupProfile;
  9541. url2 = `${url2}?conversationName=${name}`;
  9542. } else if (conversationId.slice(0, 3) === "C2C") {
  9543. conversation.userProfile;
  9544. url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
  9545. }
  9546. uni.redirectTo({ url: url2 });
  9547. }).catch((err) => {
  9548. formatAppLog("warn", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:237", "获取 group profile 异常 = ", err);
  9549. });
  9550. };
  9551. return {
  9552. ...vue.toRefs(data),
  9553. handleUserIdInput,
  9554. handleGetUserProfileInfo,
  9555. handleChoose,
  9556. handleCreateGroup
  9557. };
  9558. }
  9559. });
  9560. function _sfc_render$2l(_ctx, _cache, $props, $setup, $data, $options) {
  9561. return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-Create-conversation-container" }, [
  9562. vue.createElementVNode("view", { class: "tui-search-area" }, [
  9563. vue.createElementVNode("view", { class: "tui-search-bar" }, [
  9564. vue.createCommentVNode(' <image class="tui-searchcion" src="/static/static/assets/serach-icon.svg"></image> '),
  9565. vue.createElementVNode("input", {
  9566. class: "tui-search-bar-input",
  9567. value: _ctx.inputUserID,
  9568. placeholder: "请输入用户ID",
  9569. onInput: _cache[0] || (_cache[0] = (...args) => _ctx.handleUserIdInput && _ctx.handleUserIdInput(...args)),
  9570. onConfirm: _cache[1] || (_cache[1] = (...args) => _ctx.handleGetUserProfileInfo && _ctx.handleGetUserProfileInfo(...args)),
  9571. onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleGetUserProfileInfo && _ctx.handleGetUserProfileInfo(...args))
  9572. }, null, 40, ["value"])
  9573. ]),
  9574. vue.createElementVNode("view", { class: "tui-showID" })
  9575. ]),
  9576. vue.createCommentVNode(" 用户列表 "),
  9577. vue.createElementVNode("view", { class: "tui-person-list-container" }, [
  9578. (vue.openBlock(true), vue.createElementBlock(
  9579. vue.Fragment,
  9580. null,
  9581. vue.renderList(_ctx.chooseUserList, (item, index2) => {
  9582. return vue.openBlock(), vue.createElementBlock("view", {
  9583. class: "tui-person-to-invite",
  9584. key: index2,
  9585. onClick: ($event) => _ctx.handleChoose(item)
  9586. }, [
  9587. vue.createElementVNode("view", { class: "tui-person-choose-container" }, [
  9588. item.isChoose ? (vue.openBlock(), vue.createElementBlock("image", {
  9589. key: 0,
  9590. class: "tui-normal-choose",
  9591. src: _imports_0$4
  9592. })) : (vue.openBlock(), vue.createElementBlock("view", {
  9593. key: 1,
  9594. class: "tui-normal-unchoose"
  9595. }))
  9596. ]),
  9597. vue.createElementVNode("view", { class: "tui-person-profile" }, [
  9598. vue.createElementVNode("image", {
  9599. class: "tui-person-profile-avatar",
  9600. src: item.avatar || "https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/avatar_21.png"
  9601. }, null, 8, ["src"]),
  9602. vue.createElementVNode("view", null, [
  9603. vue.createElementVNode(
  9604. "view",
  9605. { class: "tui-person-profile-nick" },
  9606. vue.toDisplayString(item.nick),
  9607. 1
  9608. /* TEXT */
  9609. ),
  9610. vue.createElementVNode(
  9611. "view",
  9612. { class: "tui-person-profile-userID" },
  9613. "用户ID:" + vue.toDisplayString(item.userID),
  9614. 1
  9615. /* TEXT */
  9616. )
  9617. ])
  9618. ])
  9619. ], 8, ["onClick"]);
  9620. }),
  9621. 128
  9622. /* KEYED_FRAGMENT */
  9623. ))
  9624. ]),
  9625. vue.createElementVNode("view", { class: "tui-confirm-btn-container" }, [
  9626. vue.createElementVNode("view", {
  9627. class: "tui-confirm-btn",
  9628. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleCreateGroup && _ctx.handleCreateGroup(...args))
  9629. }, "确认创建")
  9630. ])
  9631. ]);
  9632. }
  9633. const PagesTUIKitTUIPagesTUIConversationCreate = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["render", _sfc_render$2l], ["__scopeId", "data-v-d9bc6912"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIConversation/create.vue"]]);
  9634. const messageBubble = vue.defineComponent({
  9635. props: {
  9636. data: {
  9637. type: Object,
  9638. default: () => {
  9639. return {};
  9640. }
  9641. }
  9642. },
  9643. setup(props2, ctx) {
  9644. const data = vue.reactive({
  9645. message: {},
  9646. show: false
  9647. });
  9648. vue.watchEffect(() => {
  9649. data.message = props2.data;
  9650. });
  9651. const toggleDialog = () => {
  9652. data.show = !data.show;
  9653. };
  9654. return {
  9655. ...vue.toRefs(data),
  9656. toggleDialog
  9657. };
  9658. }
  9659. });
  9660. function _sfc_render$2k(_ctx, _cache, $props, $setup, $data, $options) {
  9661. var _a;
  9662. return vue.openBlock(), vue.createElementBlock(
  9663. "view",
  9664. {
  9665. class: vue.normalizeClass(["message-bubble", [_ctx.message.flow === "in" ? "" : "reverse"]])
  9666. },
  9667. [
  9668. vue.createElementVNode("image", {
  9669. class: "avatar",
  9670. src: ((_a = _ctx.message) == null ? void 0 : _a.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",
  9671. alt: ""
  9672. }, null, 8, ["src"]),
  9673. vue.createElementVNode("view", { class: "message-area" }, [
  9674. _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock(
  9675. "label",
  9676. {
  9677. key: 0,
  9678. class: "name"
  9679. },
  9680. vue.toDisplayString(_ctx.message.nick),
  9681. 1
  9682. /* TEXT */
  9683. )) : vue.createCommentVNode("v-if", true),
  9684. vue.createElementVNode(
  9685. "div",
  9686. {
  9687. class: vue.normalizeClass(["content content-" + _ctx.message.flow])
  9688. },
  9689. [
  9690. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  9691. ],
  9692. 2
  9693. /* CLASS */
  9694. )
  9695. ]),
  9696. _ctx.message.status === "fail" ? (vue.openBlock(), vue.createElementBlock("view", {
  9697. key: 0,
  9698. class: "message-label fail"
  9699. }, "!")) : vue.createCommentVNode("v-if", true),
  9700. _ctx.message.conversationType === "C2C" && _ctx.message.flow == "out" && _ctx.message.status !== "fail" ? (vue.openBlock(), vue.createElementBlock(
  9701. "view",
  9702. {
  9703. key: 1,
  9704. class: vue.normalizeClass(["message-label", [!_ctx.message.isPeerRead && "unRead"]])
  9705. },
  9706. [
  9707. !_ctx.message.isPeerRead ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "未读")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "已读"))
  9708. ],
  9709. 2
  9710. /* CLASS */
  9711. )) : vue.createCommentVNode("v-if", true)
  9712. ],
  9713. 2
  9714. /* CLASS */
  9715. );
  9716. }
  9717. const MessageBubble = /* @__PURE__ */ _export_sfc(messageBubble, [["render", _sfc_render$2k], ["__scopeId", "data-v-bdaa27cd"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-bubble.vue"]]);
  9718. const MessageText$1 = vue.defineComponent({
  9719. props: {
  9720. data: {
  9721. type: Object,
  9722. default: () => {
  9723. return {};
  9724. }
  9725. },
  9726. messageData: {
  9727. type: Object,
  9728. default: () => {
  9729. return {};
  9730. }
  9731. }
  9732. },
  9733. setup(props2, ctx) {
  9734. const data = vue.reactive({
  9735. data: {},
  9736. message: {}
  9737. });
  9738. vue.watchEffect(() => {
  9739. data.data = props2.data;
  9740. data.message = props2.messageData;
  9741. });
  9742. return {
  9743. ...vue.toRefs(data)
  9744. };
  9745. }
  9746. });
  9747. function _sfc_render$2j(_ctx, _cache, $props, $setup, $data, $options) {
  9748. return vue.openBlock(), vue.createElementBlock(
  9749. "view",
  9750. {
  9751. class: vue.normalizeClass(["content content-" + _ctx.message.flow])
  9752. },
  9753. [
  9754. (vue.openBlock(true), vue.createElementBlock(
  9755. vue.Fragment,
  9756. null,
  9757. vue.renderList(_ctx.data.text, (item, index2) => {
  9758. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  9759. item.name === "text" ? (vue.openBlock(), vue.createElementBlock(
  9760. "view",
  9761. { key: 0 },
  9762. vue.toDisplayString(item.text),
  9763. 1
  9764. /* TEXT */
  9765. )) : item.name === "img" ? (vue.openBlock(), vue.createElementBlock("img", {
  9766. key: 1,
  9767. class: "text-img",
  9768. src: item.src
  9769. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true)
  9770. ]);
  9771. }),
  9772. 128
  9773. /* KEYED_FRAGMENT */
  9774. ))
  9775. ],
  9776. 2
  9777. /* CLASS */
  9778. );
  9779. }
  9780. const MessageText = /* @__PURE__ */ _export_sfc(MessageText$1, [["render", _sfc_render$2j], ["__scopeId", "data-v-8469577b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-text.vue"]]);
  9781. const _sfc_main$29 = vue.defineComponent({
  9782. props: {
  9783. data: {
  9784. type: Array,
  9785. default: () => {
  9786. return [];
  9787. }
  9788. },
  9789. messageData: {
  9790. type: Object,
  9791. default: () => {
  9792. return {};
  9793. }
  9794. }
  9795. },
  9796. setup(props2, ctx) {
  9797. const data = vue.reactive({
  9798. imageInfo: [],
  9799. imageHeight: 0,
  9800. imageWidth: 0,
  9801. message: {}
  9802. });
  9803. vue.watchEffect(() => {
  9804. const DEFAULT_MAX_SIZE = 155;
  9805. let imageWidth = 0;
  9806. let imageHeight = 0;
  9807. data.message = props2.messageData;
  9808. data.imageInfo = props2.data.info[1];
  9809. if (data.imageInfo.width >= data.imageInfo.height) {
  9810. imageWidth = DEFAULT_MAX_SIZE;
  9811. imageHeight = DEFAULT_MAX_SIZE * data.imageInfo.height / data.imageInfo.width;
  9812. } else {
  9813. imageWidth = DEFAULT_MAX_SIZE * data.imageInfo.width / data.imageInfo.height;
  9814. imageHeight = DEFAULT_MAX_SIZE;
  9815. }
  9816. data.imageWidth = imageWidth + "px";
  9817. data.imageHeight = imageHeight + "px";
  9818. });
  9819. const handlePreviewImage = () => {
  9820. formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-image.vue:59", props2.data.info[0].url, "----linda");
  9821. uni.previewImage({
  9822. current: props2.data.info[0].url,
  9823. // 当前显示图片的http链接
  9824. urls: [props2.data.info[0].url]
  9825. });
  9826. };
  9827. return {
  9828. ...vue.toRefs(data),
  9829. handlePreviewImage
  9830. };
  9831. }
  9832. });
  9833. function _sfc_render$2i(_ctx, _cache, $props, $setup, $data, $options) {
  9834. return vue.openBlock(), vue.createElementBlock("view", {
  9835. class: "message-image",
  9836. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handlePreviewImage && _ctx.handlePreviewImage(...args))
  9837. }, [
  9838. vue.createElementVNode("image", {
  9839. src: _ctx.data.info[1].url,
  9840. style: vue.normalizeStyle({ height: _ctx.imageHeight, width: _ctx.imageWidth }),
  9841. class: vue.normalizeClass(["content-" + _ctx.message.flow])
  9842. }, null, 14, ["src"]),
  9843. vue.createCommentVNode(' <div class="progress" v-if="data.progress">\n <progress :value="data.progress" max="1"></progress>\n </div> ')
  9844. ]);
  9845. }
  9846. const MessageImage = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["render", _sfc_render$2i], ["__scopeId", "data-v-d71110be"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-image.vue"]]);
  9847. const MessageOperate$1 = vue.defineComponent({
  9848. props: {
  9849. data: {
  9850. type: Object,
  9851. default: () => {
  9852. return {};
  9853. }
  9854. }
  9855. },
  9856. setup(props2, ctx) {
  9857. const TUIServer = uni.$TUIKit.TUIChatServer;
  9858. const data = vue.reactive({
  9859. message: {}
  9860. });
  9861. vue.watchEffect(() => {
  9862. data.message = props2.data;
  9863. });
  9864. const handleMseeage = async (type2) => {
  9865. switch (type2) {
  9866. case "revoke":
  9867. await TUIServer.revokeMessage(data.message).catch((error2) => {
  9868. if (error2.code = 20016)
  9869. uni.showToast({
  9870. title: "消息超过了 2 分钟",
  9871. icon: "error"
  9872. });
  9873. });
  9874. data.dialogID = "";
  9875. break;
  9876. case "delete":
  9877. await TUIServer.deleteMessage([data.message]);
  9878. data.dialogID = "";
  9879. break;
  9880. case "resend":
  9881. await TUIServer.resendMessage(data.message);
  9882. data.dialogID = "";
  9883. break;
  9884. }
  9885. };
  9886. return {
  9887. ...vue.toRefs(data),
  9888. handleMseeage
  9889. };
  9890. }
  9891. });
  9892. const _imports_0$3 = "/assets/revoked.7c9df1a1.svg";
  9893. const _imports_1$1 = "/assets/delete.f7e3358f.svg";
  9894. const _imports_2$1 = "/assets/forword.ae89e5df.svg";
  9895. function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
  9896. return vue.openBlock(), vue.createElementBlock("view", { class: "dialog-container" }, [
  9897. _ctx.message.flow === "out" && _ctx.message.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  9898. key: 0,
  9899. class: "item-box",
  9900. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleMseeage("revoke"))
  9901. }, [
  9902. vue.createElementVNode("image", {
  9903. class: "item-icon",
  9904. src: _imports_0$3
  9905. }),
  9906. vue.createElementVNode("view", null, "撤回")
  9907. ])) : vue.createCommentVNode("v-if", true),
  9908. _ctx.message.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  9909. key: 1,
  9910. class: "item-box",
  9911. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleMseeage("delete"))
  9912. }, [
  9913. vue.createElementVNode("image", {
  9914. class: "item-icon",
  9915. src: _imports_1$1
  9916. }),
  9917. vue.createElementVNode("view", null, "删除")
  9918. ])) : vue.createCommentVNode("v-if", true),
  9919. vue.createCommentVNode(` <view class="item-box" v-if="message.status==='success'" @click="handleMseeage('forward')">
  9920. <img class="item-icon" src="/pages/TUIKit/assets/icon/forword.svg">
  9921. <view>转发</view>
  9922. </view> `),
  9923. _ctx.message.flow === "out" && _ctx.message.status === "fail" ? (vue.openBlock(), vue.createElementBlock("view", {
  9924. key: 2,
  9925. class: "item-box",
  9926. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handleMseeage("resend"))
  9927. }, [
  9928. vue.createElementVNode("image", {
  9929. class: "item-icon",
  9930. src: _imports_2$1
  9931. }),
  9932. vue.createElementVNode("view", null, "重发")
  9933. ])) : vue.createCommentVNode("v-if", true),
  9934. vue.createCommentVNode(' <view v-if="message.type === types.MSG_FILE || item.type === types.MSG_VIDEO || item.type === types.MSG_IMAGE"\n @click="openMessage(item)">打开</view> ')
  9935. ]);
  9936. }
  9937. const MessageOperate = /* @__PURE__ */ _export_sfc(MessageOperate$1, [["render", _sfc_render$2h], ["__scopeId", "data-v-928c104b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-operate.vue"]]);
  9938. const _sfc_main$28 = vue.defineComponent({
  9939. props: {
  9940. data: {
  9941. type: Object,
  9942. default: () => {
  9943. return {};
  9944. }
  9945. },
  9946. messageData: {
  9947. type: Object,
  9948. default: () => {
  9949. return {};
  9950. }
  9951. }
  9952. },
  9953. setup(props2, ctx) {
  9954. const data = vue.reactive({
  9955. video: {},
  9956. message: {},
  9957. show: false,
  9958. videoContext: null
  9959. });
  9960. vue.watchEffect(() => {
  9961. data.video = props2.data;
  9962. data.message = props2.messageData;
  9963. });
  9964. const toggleShow = () => {
  9965. uni.navigateTo({
  9966. url: `./components/message-elements/video-play?videoMessage=${data.video.url}`
  9967. });
  9968. };
  9969. return {
  9970. ...vue.toRefs(data),
  9971. toggleShow
  9972. };
  9973. }
  9974. });
  9975. const _imports_0$2 = "/assets/play_normal@2x.58b451c9.png";
  9976. function _sfc_render$2g(_ctx, _cache, $props, $setup, $data, $options) {
  9977. return vue.openBlock(), vue.createElementBlock("div", { class: "message-video" }, [
  9978. vue.createElementVNode(
  9979. "div",
  9980. {
  9981. class: vue.normalizeClass(["message-video-box", [!_ctx.video.progress && "message-video-cover"]]),
  9982. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleShow && _ctx.toggleShow(...args))
  9983. },
  9984. [
  9985. vue.createElementVNode("image", {
  9986. src: _ctx.video.snapshotUrl,
  9987. class: vue.normalizeClass(["message-video-box", ["content-" + _ctx.message.flow]])
  9988. }, null, 10, ["src"]),
  9989. vue.createElementVNode("image", {
  9990. src: _imports_0$2,
  9991. class: "video-play"
  9992. })
  9993. ],
  9994. 2
  9995. /* CLASS */
  9996. )
  9997. ]);
  9998. }
  9999. const MessageVideo = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$2g], ["__scopeId", "data-v-0e400482"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-video.vue"]]);
  10000. const audio = uni.createInnerAudioContext();
  10001. const MessageAudio$1 = vue.defineComponent({
  10002. props: {
  10003. data: {
  10004. type: Object,
  10005. default: () => {
  10006. return {};
  10007. }
  10008. },
  10009. messageData: {
  10010. type: Object,
  10011. default: () => {
  10012. return {};
  10013. }
  10014. }
  10015. },
  10016. setup(props2, ctx) {
  10017. const data = vue.reactive({
  10018. data: {},
  10019. message: {},
  10020. isPlay: false
  10021. });
  10022. vue.watchEffect(() => {
  10023. data.data = props2.data;
  10024. data.message = props2.messageData;
  10025. });
  10026. vue.onMounted(() => {
  10027. audio.onPlay(() => {
  10028. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:43", "开始播放");
  10029. });
  10030. audio.onEnded(() => {
  10031. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:46", "停止播放");
  10032. });
  10033. audio.onError((e) => {
  10034. formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:49", e, "onError");
  10035. });
  10036. });
  10037. const handlePlay = () => {
  10038. if (data.data.url) {
  10039. audio.src = data.data.url;
  10040. audio.play();
  10041. }
  10042. data.isPlay = true;
  10043. };
  10044. return {
  10045. ...vue.toRefs(data),
  10046. audio,
  10047. handlePlay
  10048. };
  10049. }
  10050. });
  10051. const _imports_0$1 = "/assets/audio-play.949caa88.svg";
  10052. function _sfc_render$2f(_ctx, _cache, $props, $setup, $data, $options) {
  10053. return vue.openBlock(), vue.createElementBlock(
  10054. "view",
  10055. {
  10056. class: vue.normalizeClass(["message-audio", ["content content-" + _ctx.message.flow]]),
  10057. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handlePlay && _ctx.handlePlay(...args))
  10058. },
  10059. [
  10060. _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock("image", {
  10061. key: 0,
  10062. class: "audio-icon audio-icon-in",
  10063. src: _imports_0$1
  10064. })) : vue.createCommentVNode("v-if", true),
  10065. vue.createElementVNode(
  10066. "view",
  10067. null,
  10068. vue.toDisplayString(_ctx.data.second) + "s",
  10069. 1
  10070. /* TEXT */
  10071. ),
  10072. _ctx.message.flow === "out" ? (vue.openBlock(), vue.createElementBlock("image", {
  10073. key: 1,
  10074. class: "audio-icon",
  10075. src: _imports_0$1
  10076. })) : vue.createCommentVNode("v-if", true),
  10077. vue.createCommentVNode(` <view class="play-icon" v-if="message.flow==='in' && !isPlay" ></view>
  10078. `)
  10079. ],
  10080. 2
  10081. /* CLASS */
  10082. );
  10083. }
  10084. const MessageAudio = /* @__PURE__ */ _export_sfc(MessageAudio$1, [["render", _sfc_render$2f], ["__scopeId", "data-v-53eee9af"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue"]]);
  10085. const MessageFace$1 = vue.defineComponent({
  10086. props: {
  10087. data: {
  10088. type: Object,
  10089. default: () => {
  10090. return {};
  10091. }
  10092. }
  10093. },
  10094. setup(props2, ctx) {
  10095. const data = vue.reactive({
  10096. data: {}
  10097. });
  10098. vue.watchEffect(() => {
  10099. data.data = props2.data;
  10100. });
  10101. return {
  10102. ...vue.toRefs(data)
  10103. };
  10104. }
  10105. });
  10106. function _sfc_render$2e(_ctx, _cache, $props, $setup, $data, $options) {
  10107. return vue.openBlock(), vue.createElementBlock("image", {
  10108. class: "message-image",
  10109. src: _ctx.data.url
  10110. }, null, 8, ["src"]);
  10111. }
  10112. const MessageFace = /* @__PURE__ */ _export_sfc(MessageFace$1, [["render", _sfc_render$2e], ["__scopeId", "data-v-579879ce"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-face.vue"]]);
  10113. const MessageCustom$1 = vue.defineComponent({
  10114. props: {
  10115. data: {
  10116. type: Object,
  10117. default: () => {
  10118. return {};
  10119. }
  10120. },
  10121. messageData: {
  10122. type: Object,
  10123. default: () => {
  10124. return {};
  10125. }
  10126. }
  10127. },
  10128. setup(props2, ctx) {
  10129. const data = vue.reactive({
  10130. data: {},
  10131. extension: {},
  10132. isCustom: "",
  10133. payload: {},
  10134. message: {}
  10135. });
  10136. vue.watchEffect(() => {
  10137. data.data = props2.data;
  10138. data.message = props2.messageData;
  10139. data.isCustom = props2.data.message.payload.data;
  10140. data.payload = props2.data.message.payload;
  10141. data.extension = JSON.parse(props2.data.message.payload.extension);
  10142. });
  10143. return {
  10144. ...vue.toRefs(data)
  10145. };
  10146. }
  10147. });
  10148. function _sfc_render$2d(_ctx, _cache, $props, $setup, $data, $options) {
  10149. return vue.openBlock(), vue.createElementBlock("view", { class: "custom" }, [
  10150. _ctx.isCustom === "order" ? (vue.openBlock(), vue.createElementBlock(
  10151. vue.Fragment,
  10152. { key: 0 },
  10153. [
  10154. vue.createCommentVNode(" <div>\n <h1></h1>\n {{extension.title}}\n </div> "),
  10155. vue.createElementVNode("view", { class: "order-item" }, [
  10156. vue.createElementVNode("view", { class: "title" }, "问诊订单 "),
  10157. vue.createElementVNode(
  10158. "view",
  10159. { class: "text" },
  10160. "患者:" + vue.toDisplayString(_ctx.extension.patientName) + " " + vue.toDisplayString(_ctx.extension.sex) + " " + vue.toDisplayString(_ctx.extension.mobile),
  10161. 1
  10162. /* TEXT */
  10163. ),
  10164. vue.createElementVNode(
  10165. "view",
  10166. { class: "text" },
  10167. "患病时间:" + vue.toDisplayString(_ctx.extension.duration),
  10168. 1
  10169. /* TEXT */
  10170. ),
  10171. vue.createElementVNode(
  10172. "view",
  10173. { class: "text" },
  10174. "就诊情况:" + vue.toDisplayString(_ctx.extension.isVisit),
  10175. 1
  10176. /* TEXT */
  10177. ),
  10178. vue.createElementVNode(
  10179. "view",
  10180. { class: "text" },
  10181. "病情描述:" + vue.toDisplayString(_ctx.extension.title),
  10182. 1
  10183. /* TEXT */
  10184. )
  10185. ])
  10186. ],
  10187. 64
  10188. /* STABLE_FRAGMENT */
  10189. )) : _ctx.isCustom === "prescribe" ? (vue.openBlock(), vue.createElementBlock("view", {
  10190. key: 1,
  10191. class: "prescribe-item"
  10192. }, [
  10193. vue.createElementVNode("view", { class: "title" }, "电子处方单 "),
  10194. vue.createElementVNode(
  10195. "view",
  10196. { class: "text" },
  10197. "诊断:" + vue.toDisplayString(_ctx.extension.diagnose),
  10198. 1
  10199. /* TEXT */
  10200. ),
  10201. vue.createElementVNode("view", { class: "btns" }, [
  10202. vue.createElementVNode("view", { class: "btn" }, "查看处方")
  10203. ])
  10204. ])) : _ctx.isCustom === "report" ? (vue.openBlock(), vue.createElementBlock("view", {
  10205. key: 2,
  10206. class: "report-item"
  10207. }, [
  10208. vue.createElementVNode("view", { class: "title" }, "问诊报告单 "),
  10209. vue.createElementVNode("view", { class: "btns" }, [
  10210. vue.createElementVNode("view", { class: "btn" }, "查看报告单")
  10211. ])
  10212. ])) : _ctx.isCustom === "follow" ? (vue.openBlock(), vue.createElementBlock("view", {
  10213. key: 3,
  10214. class: "prescribe-item"
  10215. }, [
  10216. vue.createElementVNode("view", { class: "title" }, "随访单 "),
  10217. vue.createElementVNode("view", { class: "btns" }, [
  10218. vue.createElementVNode("view", { class: "btn" }, "查看随访")
  10219. ])
  10220. ])) : _ctx.isCustom === "drugReport" ? (vue.openBlock(), vue.createElementBlock("view", {
  10221. key: 4,
  10222. class: "report-item"
  10223. }, [
  10224. vue.createElementVNode("view", { class: "title" }, "用药报告单 "),
  10225. vue.createElementVNode("view", { class: "btns" }, [
  10226. vue.createElementVNode("view", { class: "btn" }, "查看报告单")
  10227. ])
  10228. ])) : _ctx.isCustom === "startInquiry" ? (vue.openBlock(), vue.createElementBlock(
  10229. "span",
  10230. {
  10231. key: 5,
  10232. class: vue.normalizeClass(["content content-" + _ctx.message.flow])
  10233. },
  10234. vue.toDisplayString(_ctx.extension.title),
  10235. 3
  10236. /* TEXT, CLASS */
  10237. )) : _ctx.isCustom === "finishInquiry" ? (vue.openBlock(), vue.createElementBlock(
  10238. "span",
  10239. {
  10240. key: 6,
  10241. class: vue.normalizeClass(["content content-" + _ctx.message.flow])
  10242. },
  10243. vue.toDisplayString(_ctx.extension.title),
  10244. 3
  10245. /* TEXT, CLASS */
  10246. )) : (vue.openBlock(), vue.createElementBlock(
  10247. "span",
  10248. {
  10249. key: 7,
  10250. class: vue.normalizeClass(["content content-" + _ctx.message.flow])
  10251. },
  10252. vue.toDisplayString(_ctx.data.custom),
  10253. 3
  10254. /* TEXT, CLASS */
  10255. ))
  10256. ]);
  10257. }
  10258. const MessageCustom = /* @__PURE__ */ _export_sfc(MessageCustom$1, [["render", _sfc_render$2d], ["__scopeId", "data-v-2acfb6b8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-custom.vue"]]);
  10259. const MessageTip$1 = vue.defineComponent({
  10260. props: {
  10261. data: {
  10262. type: Object,
  10263. default: () => {
  10264. return {};
  10265. }
  10266. }
  10267. },
  10268. setup(props2, ctx) {
  10269. const data = vue.reactive({
  10270. message: {}
  10271. });
  10272. vue.watchEffect(() => {
  10273. data.message = props2.data;
  10274. });
  10275. return {
  10276. ...vue.toRefs(data)
  10277. };
  10278. }
  10279. });
  10280. function _sfc_render$2c(_ctx, _cache, $props, $setup, $data, $options) {
  10281. return vue.openBlock(), vue.createElementBlock(
  10282. "div",
  10283. { class: "message-tip" },
  10284. vue.toDisplayString(_ctx.message.text),
  10285. 1
  10286. /* TEXT */
  10287. );
  10288. }
  10289. const MessageTip = /* @__PURE__ */ _export_sfc(MessageTip$1, [["render", _sfc_render$2c], ["__scopeId", "data-v-eba994b3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-tip.vue"]]);
  10290. const MessageRevoked$1 = vue.defineComponent({
  10291. props: {
  10292. data: {
  10293. type: Object,
  10294. default: () => {
  10295. return {};
  10296. }
  10297. }
  10298. },
  10299. setup(props2, ctx) {
  10300. const data = vue.reactive({
  10301. message: {}
  10302. });
  10303. vue.watchEffect(() => {
  10304. data.message = props2.data;
  10305. });
  10306. const edit = () => {
  10307. ctx.emit("edit", data.message);
  10308. };
  10309. return {
  10310. ...vue.toRefs(data),
  10311. edit
  10312. };
  10313. }
  10314. });
  10315. function _sfc_render$2b(_ctx, _cache, $props, $setup, $data, $options) {
  10316. return vue.openBlock(), vue.createElementBlock("div", { class: "revoke" }, [
  10317. _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock(
  10318. "label",
  10319. { key: 0 },
  10320. vue.toDisplayString(_ctx.message.nick || _ctx.message.from),
  10321. 1
  10322. /* TEXT */
  10323. )) : (vue.openBlock(), vue.createElementBlock("label", { key: 1 }, "你")),
  10324. vue.createElementVNode("span", null, "撤回了一条消息"),
  10325. _ctx.message.flow === "out" ? (vue.openBlock(), vue.createElementBlock("span", {
  10326. key: 2,
  10327. class: "edit",
  10328. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.edit && _ctx.edit(...args))
  10329. }, "重新编辑")) : vue.createCommentVNode("v-if", true)
  10330. ]);
  10331. }
  10332. const MessageRevoked = /* @__PURE__ */ _export_sfc(MessageRevoked$1, [["render", _sfc_render$2b], ["__scopeId", "data-v-74cb0d08"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-revoked.vue"]]);
  10333. const emojiUrl = "https://web.sdk.qcloud.com/im/assets/emoji/";
  10334. const emojiMap = {
  10335. "[NO]": "emoji_0@2x.png",
  10336. "[OK]": "emoji_1@2x.png",
  10337. "[下雨]": "emoji_2@2x.png",
  10338. "[么么哒]": "emoji_3@2x.png",
  10339. "[乒乓]": "emoji_4@2x.png",
  10340. "[便便]": "emoji_5@2x.png",
  10341. "[信封]": "emoji_6@2x.png",
  10342. "[偷笑]": "emoji_7@2x.png",
  10343. "[傲慢]": "emoji_8@2x.png",
  10344. "[再见]": "emoji_9@2x.png",
  10345. "[冷汗]": "emoji_10@2x.png",
  10346. "[凋谢]": "emoji_11@2x.png",
  10347. "[刀]": "emoji_12@2x.png",
  10348. "[删除]": "emoji_13@2x.png",
  10349. "[勾引]": "emoji_14@2x.png",
  10350. "[发呆]": "emoji_15@2x.png",
  10351. "[发抖]": "emoji_16@2x.png",
  10352. "[可怜]": "emoji_17@2x.png",
  10353. "[可爱]": "emoji_18@2x.png",
  10354. "[右哼哼]": "emoji_19@2x.png",
  10355. "[右太极]": "emoji_20@2x.png",
  10356. "[右车头]": "emoji_21@2x.png",
  10357. "[吐]": "emoji_22@2x.png",
  10358. "[吓]": "emoji_23@2x.png",
  10359. "[咒骂]": "emoji_24@2x.png",
  10360. "[咖啡]": "emoji_25@2x.png",
  10361. "[啤酒]": "emoji_26@2x.png",
  10362. "[嘘]": "emoji_27@2x.png",
  10363. "[回头]": "emoji_28@2x.png",
  10364. "[困]": "emoji_29@2x.png",
  10365. "[坏笑]": "emoji_30@2x.png",
  10366. "[多云]": "emoji_31@2x.png",
  10367. "[大兵]": "emoji_32@2x.png",
  10368. "[大哭]": "emoji_33@2x.png",
  10369. "[太阳]": "emoji_34@2x.png",
  10370. "[奋斗]": "emoji_35@2x.png",
  10371. "[奶瓶]": "emoji_36@2x.png",
  10372. "[委屈]": "emoji_37@2x.png",
  10373. "[害羞]": "emoji_38@2x.png",
  10374. "[尴尬]": "emoji_39@2x.png",
  10375. "[左哼哼]": "emoji_40@2x.png",
  10376. "[左太极]": "emoji_41@2x.png",
  10377. "[左车头]": "emoji_42@2x.png",
  10378. "[差劲]": "emoji_43@2x.png",
  10379. "[弱]": "emoji_44@2x.png",
  10380. "[强]": "emoji_45@2x.png",
  10381. "[彩带]": "emoji_46@2x.png",
  10382. "[彩球]": "emoji_47@2x.png",
  10383. "[得意]": "emoji_48@2x.png",
  10384. "[微笑]": "emoji_49@2x.png",
  10385. "[心碎了]": "emoji_50@2x.png",
  10386. "[快哭了]": "emoji_51@2x.png",
  10387. "[怄火]": "emoji_52@2x.png",
  10388. "[怒]": "emoji_53@2x.png",
  10389. "[惊恐]": "emoji_54@2x.png",
  10390. "[惊讶]": "emoji_55@2x.png",
  10391. "[憨笑]": "emoji_56@2x.png",
  10392. "[手枪]": "emoji_57@2x.png",
  10393. "[打哈欠]": "emoji_58@2x.png",
  10394. "[抓狂]": "emoji_59@2x.png",
  10395. "[折磨]": "emoji_60@2x.png",
  10396. "[抠鼻]": "emoji_61@2x.png",
  10397. "[抱抱]": "emoji_62@2x.png",
  10398. "[抱拳]": "emoji_63@2x.png",
  10399. "[拳头]": "emoji_64@2x.png",
  10400. "[挥手]": "emoji_65@2x.png",
  10401. "[握手]": "emoji_66@2x.png",
  10402. "[撇嘴]": "emoji_67@2x.png",
  10403. "[擦汗]": "emoji_68@2x.png",
  10404. "[敲打]": "emoji_69@2x.png",
  10405. "[晕]": "emoji_70@2x.png",
  10406. "[月亮]": "emoji_71@2x.png",
  10407. "[棒棒糖]": "emoji_72@2x.png",
  10408. "[汽车]": "emoji_73@2x.png",
  10409. "[沙发]": "emoji_74@2x.png",
  10410. "[流汗]": "emoji_75@2x.png",
  10411. "[流泪]": "emoji_76@2x.png",
  10412. "[激动]": "emoji_77@2x.png",
  10413. "[灯泡]": "emoji_78@2x.png",
  10414. "[炸弹]": "emoji_79@2x.png",
  10415. "[熊猫]": "emoji_80@2x.png",
  10416. "[爆筋]": "emoji_81@2x.png",
  10417. "[爱你]": "emoji_82@2x.png",
  10418. "[爱心]": "emoji_83@2x.png",
  10419. "[爱情]": "emoji_84@2x.png",
  10420. "[猪头]": "emoji_85@2x.png",
  10421. "[猫咪]": "emoji_86@2x.png",
  10422. "[献吻]": "emoji_87@2x.png",
  10423. "[玫瑰]": "emoji_88@2x.png",
  10424. "[瓢虫]": "emoji_89@2x.png",
  10425. "[疑问]": "emoji_90@2x.png",
  10426. "[白眼]": "emoji_91@2x.png",
  10427. "[皮球]": "emoji_92@2x.png",
  10428. "[睡觉]": "emoji_93@2x.png",
  10429. "[磕头]": "emoji_94@2x.png",
  10430. "[示爱]": "emoji_95@2x.png",
  10431. "[礼品袋]": "emoji_96@2x.png",
  10432. "[礼物]": "emoji_97@2x.png",
  10433. "[篮球]": "emoji_98@2x.png",
  10434. "[米饭]": "emoji_99@2x.png",
  10435. "[糗大了]": "emoji_100@2x.png",
  10436. "[红双喜]": "emoji_101@2x.png",
  10437. "[红灯笼]": "emoji_102@2x.png",
  10438. "[纸巾]": "emoji_103@2x.png",
  10439. "[胜利]": "emoji_104@2x.png",
  10440. "[色]": "emoji_105@2x.png",
  10441. "[药]": "emoji_106@2x.png",
  10442. "[菜刀]": "emoji_107@2x.png",
  10443. "[蛋糕]": "emoji_108@2x.png",
  10444. "[蜡烛]": "emoji_109@2x.png",
  10445. "[街舞]": "emoji_110@2x.png",
  10446. "[衰]": "emoji_111@2x.png",
  10447. "[西瓜]": "emoji_112@2x.png",
  10448. "[调皮]": "emoji_113@2x.png",
  10449. "[象棋]": "emoji_114@2x.png",
  10450. "[跳绳]": "emoji_115@2x.png",
  10451. "[跳跳]": "emoji_116@2x.png",
  10452. "[车厢]": "emoji_117@2x.png",
  10453. "[转圈]": "emoji_118@2x.png",
  10454. "[鄙视]": "emoji_119@2x.png",
  10455. "[酷]": "emoji_120@2x.png",
  10456. "[钞票]": "emoji_121@2x.png",
  10457. "[钻戒]": "emoji_122@2x.png",
  10458. "[闪电]": "emoji_123@2x.png",
  10459. "[闭嘴]": "emoji_124@2x.png",
  10460. "[闹钟]": "emoji_125@2x.png",
  10461. "[阴险]": "emoji_126@2x.png",
  10462. "[难过]": "emoji_127@2x.png",
  10463. "[雨伞]": "emoji_128@2x.png",
  10464. "[青蛙]": "emoji_129@2x.png",
  10465. "[面条]": "emoji_130@2x.png",
  10466. "[鞭炮]": "emoji_131@2x.png",
  10467. "[风车]": "emoji_132@2x.png",
  10468. "[飞吻]": "emoji_133@2x.png",
  10469. "[飞机]": "emoji_134@2x.png",
  10470. "[饥饿]": "emoji_135@2x.png",
  10471. "[香蕉]": "emoji_136@2x.png",
  10472. "[骷髅]": "emoji_137@2x.png",
  10473. "[麦克风]": "emoji_138@2x.png",
  10474. "[麻将]": "emoji_139@2x.png",
  10475. "[鼓掌]": "emoji_140@2x.png",
  10476. "[龇牙]": "emoji_141@2x.png"
  10477. };
  10478. const emojiName = [
  10479. "[龇牙]",
  10480. "[调皮]",
  10481. "[流汗]",
  10482. "[偷笑]",
  10483. "[再见]",
  10484. "[敲打]",
  10485. "[擦汗]",
  10486. "[猪头]",
  10487. "[玫瑰]",
  10488. "[流泪]",
  10489. "[大哭]",
  10490. "[嘘]",
  10491. "[酷]",
  10492. "[抓狂]",
  10493. "[委屈]",
  10494. "[便便]",
  10495. "[炸弹]",
  10496. "[菜刀]",
  10497. "[可爱]",
  10498. "[色]",
  10499. "[害羞]",
  10500. "[得意]",
  10501. "[吐]",
  10502. "[微笑]",
  10503. "[怒]",
  10504. "[尴尬]",
  10505. "[惊恐]",
  10506. "[冷汗]",
  10507. "[爱心]",
  10508. "[示爱]",
  10509. "[白眼]",
  10510. "[傲慢]",
  10511. "[难过]",
  10512. "[惊讶]",
  10513. "[疑问]",
  10514. "[困]",
  10515. "[么么哒]",
  10516. "[憨笑]",
  10517. "[爱情]",
  10518. "[衰]",
  10519. "[撇嘴]",
  10520. "[阴险]",
  10521. "[奋斗]",
  10522. "[发呆]",
  10523. "[右哼哼]",
  10524. "[抱抱]",
  10525. "[坏笑]",
  10526. "[飞吻]",
  10527. "[鄙视]",
  10528. "[晕]",
  10529. "[大兵]",
  10530. "[可怜]",
  10531. "[强]",
  10532. "[弱]",
  10533. "[握手]",
  10534. "[胜利]",
  10535. "[抱拳]",
  10536. "[凋谢]",
  10537. "[米饭]",
  10538. "[蛋糕]",
  10539. "[西瓜]",
  10540. "[啤酒]",
  10541. "[瓢虫]",
  10542. "[勾引]",
  10543. "[OK]",
  10544. "[爱你]",
  10545. "[咖啡]",
  10546. "[月亮]",
  10547. "[刀]",
  10548. "[发抖]",
  10549. "[差劲]",
  10550. "[拳头]",
  10551. "[心碎了]",
  10552. "[太阳]",
  10553. "[礼物]",
  10554. "[皮球]",
  10555. "[骷髅]",
  10556. "[挥手]",
  10557. "[闪电]",
  10558. "[饥饿]",
  10559. "[咒骂]",
  10560. "[折磨]",
  10561. "[抠鼻]",
  10562. "[鼓掌]",
  10563. "[糗大了]",
  10564. "[左哼哼]",
  10565. "[打哈欠]",
  10566. "[快哭了]",
  10567. "[吓]",
  10568. "[篮球]",
  10569. "[乒乓]",
  10570. "[NO]",
  10571. "[跳跳]",
  10572. "[怄火]",
  10573. "[转圈]",
  10574. "[磕头]",
  10575. "[回头]",
  10576. "[跳绳]",
  10577. "[激动]",
  10578. "[街舞]",
  10579. "[献吻]",
  10580. "[左太极]",
  10581. "[右太极]",
  10582. "[闭嘴]",
  10583. "[猫咪]",
  10584. "[红双喜]",
  10585. "[鞭炮]",
  10586. "[红灯笼]",
  10587. "[麻将]",
  10588. "[麦克风]",
  10589. "[礼品袋]",
  10590. "[信封]",
  10591. "[象棋]",
  10592. "[彩带]",
  10593. "[蜡烛]",
  10594. "[爆筋]",
  10595. "[棒棒糖]",
  10596. "[奶瓶]",
  10597. "[面条]",
  10598. "[香蕉]",
  10599. "[飞机]",
  10600. "[左车头]",
  10601. "[车厢]",
  10602. "[右车头]",
  10603. "[多云]",
  10604. "[下雨]",
  10605. "[钞票]",
  10606. "[熊猫]",
  10607. "[灯泡]",
  10608. "[风车]",
  10609. "[闹钟]",
  10610. "[雨伞]",
  10611. "[彩球]",
  10612. "[钻戒]",
  10613. "[沙发]",
  10614. "[纸巾]",
  10615. "[手枪]",
  10616. "[青蛙]"
  10617. ];
  10618. const faceUrl = "https://web.sdk.qcloud.com/im/assets/face-elem/";
  10619. const bigEmojiList = [
  10620. {
  10621. icon: "yz00",
  10622. list: [
  10623. "yz00",
  10624. "yz01",
  10625. "yz02",
  10626. "yz03",
  10627. "yz04",
  10628. "yz05",
  10629. "yz06",
  10630. "yz07",
  10631. "yz08",
  10632. "yz09",
  10633. "yz10",
  10634. "yz11",
  10635. "yz12",
  10636. "yz13",
  10637. "yz14",
  10638. "yz15",
  10639. "yz16",
  10640. "yz17"
  10641. ]
  10642. },
  10643. {
  10644. icon: "ys00",
  10645. list: [
  10646. "ys00",
  10647. "ys01",
  10648. "ys02",
  10649. "ys03",
  10650. "ys04",
  10651. "ys05",
  10652. "ys06",
  10653. "ys07",
  10654. "ys08",
  10655. "ys09",
  10656. "ys10",
  10657. "ys11",
  10658. "ys12",
  10659. "ys13",
  10660. "ys14",
  10661. "ys15"
  10662. ]
  10663. },
  10664. {
  10665. icon: "gcs00",
  10666. list: [
  10667. "gcs00",
  10668. "gcs01",
  10669. "gcs02",
  10670. "gcs03",
  10671. "gcs04",
  10672. "gcs05",
  10673. "gcs06",
  10674. "gcs07",
  10675. "gcs08",
  10676. "gcs09",
  10677. "gcs10",
  10678. "gcs11",
  10679. "gcs12",
  10680. "gcs13",
  10681. "gcs14",
  10682. "gcs15",
  10683. "gcs16"
  10684. ]
  10685. }
  10686. ];
  10687. function decodeText(payload) {
  10688. const renderDom = [];
  10689. let temp = payload.text;
  10690. let left = -1;
  10691. let right = -1;
  10692. while (temp !== "") {
  10693. left = temp.indexOf("[");
  10694. right = temp.indexOf("]");
  10695. switch (left) {
  10696. case 0:
  10697. if (right === -1) {
  10698. renderDom.push({
  10699. name: "text",
  10700. text: temp
  10701. });
  10702. temp = "";
  10703. } else {
  10704. const emojiKey = temp.slice(0, right + 1);
  10705. if (emojiMap[emojiKey]) {
  10706. renderDom.push({
  10707. name: "img",
  10708. src: emojiUrl + emojiMap[emojiKey]
  10709. });
  10710. temp = temp.substring(right + 1);
  10711. } else {
  10712. renderDom.push({
  10713. name: "text",
  10714. text: "["
  10715. });
  10716. temp = temp.slice(1);
  10717. }
  10718. }
  10719. break;
  10720. case -1:
  10721. renderDom.push({
  10722. name: "text",
  10723. text: temp
  10724. });
  10725. temp = "";
  10726. break;
  10727. default:
  10728. renderDom.push({
  10729. name: "text",
  10730. text: temp.slice(0, left)
  10731. });
  10732. temp = temp.substring(left);
  10733. break;
  10734. }
  10735. }
  10736. return renderDom;
  10737. }
  10738. function handleTipMessageShowContext(message) {
  10739. const options = {
  10740. message,
  10741. text: ""
  10742. };
  10743. const userName = message.nick || message.payload.userIDList.join(",");
  10744. switch (message.payload.operationType) {
  10745. case uni.$TIM.TYPES.GRP_TIP_MBR_JOIN:
  10746. options.text = `群成员:${userName} 加入群组`;
  10747. break;
  10748. case uni.$TIM.TYPES.GRP_TIP_MBR_QUIT:
  10749. options.text = `群成员:${userName} 退出群组`;
  10750. break;
  10751. case uni.$TIM.TYPES.GRP_TIP_MBR_KICKED_OUT:
  10752. options.text = `群成员:${userName} 被 ${message.payload.operatorID} 踢出群组`;
  10753. break;
  10754. case uni.$TIM.TYPES.GRP_TIP_MBR_SET_ADMIN:
  10755. options.text = `群成员:${userName} 成为管理员`;
  10756. break;
  10757. case uni.$TIM.TYPES.GRP_TIP_MBR_CANCELED_ADMIN:
  10758. options.text = `群成员:${userName} 被撤销管理员`;
  10759. break;
  10760. case uni.$TIM.TYPES.GRP_TIP_GRP_PROFILE_UPDATED:
  10761. options.text = handleTipGrpUpdated(message);
  10762. break;
  10763. case uni.$TIM.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:
  10764. for (const member of message.payload.memberList) {
  10765. if (member.muteTime > 0) {
  10766. options.text = `群成员:${member.userID} 被禁言`;
  10767. } else {
  10768. options.text = `群成员:${member.userID} 被取消禁言`;
  10769. }
  10770. }
  10771. break;
  10772. default:
  10773. options.text = `[群提示消息]`;
  10774. break;
  10775. }
  10776. return options;
  10777. }
  10778. function handleTipGrpUpdated(message) {
  10779. const { payload } = message;
  10780. const { newGroupProfile } = payload;
  10781. const { operatorID } = payload;
  10782. let text = "";
  10783. const name = Object.keys(newGroupProfile)[0];
  10784. switch (name) {
  10785. case "ownerID":
  10786. text = `${newGroupProfile[name]} 成为新的群主`;
  10787. break;
  10788. case "groupName":
  10789. text = `${operatorID} 修改群名为 ${newGroupProfile[name]}`;
  10790. break;
  10791. case "notification":
  10792. text = `${operatorID} 发布新公告`;
  10793. break;
  10794. }
  10795. return text;
  10796. }
  10797. function handleTextMessageShowContext(item) {
  10798. const options = {
  10799. text: decodeText(item.payload)
  10800. };
  10801. return options;
  10802. }
  10803. function handleFaceMessageShowContext(item) {
  10804. const face = {
  10805. message: item,
  10806. name: "",
  10807. url: ""
  10808. };
  10809. const currentEmojiList = bigEmojiList.filter(
  10810. (emoItem) => emoItem.icon === item.payload.data
  10811. );
  10812. if (currentEmojiList.length > 0) {
  10813. face.name = currentEmojiList[0].list[item.payload.index];
  10814. }
  10815. if (item.payload.data.indexOf("@2x") > 0) {
  10816. face.name = item.payload.data;
  10817. } else {
  10818. face.name = `${item.payload.data}@2x`;
  10819. }
  10820. face.url = `https://web.sdk.qcloud.com/im/assets/face-elem/${face.name}.png`;
  10821. return face;
  10822. }
  10823. function handleLocationMessageShowContext(item) {
  10824. const location2 = {
  10825. lon: "",
  10826. lat: "",
  10827. href: "",
  10828. url: "",
  10829. description: "",
  10830. message: item
  10831. };
  10832. location2.lon = item.payload.longitude.toFixed(6);
  10833. location2.lat = item.payload.latitude.toFixed(6);
  10834. location2.href = `https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&pointx=${location2.lon}&pointy=${location2.lat}&name=${item.payload.description}`;
  10835. location2.url = `https://apis.map.qq.com/ws/staticmap/v2/?center=${location2.lat},${location2.lon}&zoom=10&size=300*150&maptype=roadmap&markers=size:large|color:0xFFCCFF|label:k|${location2.lat},${location2.lon}&key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD`;
  10836. location2.description = item.payload.description;
  10837. return location2;
  10838. }
  10839. function handleImageMessageShowContext(item) {
  10840. return {
  10841. progress: (item == null ? void 0 : item.status) === "unSend" && item.progress,
  10842. info: item.payload.imageInfoArray,
  10843. message: item
  10844. };
  10845. }
  10846. function handleVideoMessageShowContext(item) {
  10847. var _a, _b;
  10848. return {
  10849. progress: (item == null ? void 0 : item.status) === "unSend" && (item == null ? void 0 : item.progress),
  10850. url: (_a = item == null ? void 0 : item.payload) == null ? void 0 : _a.videoUrl,
  10851. snapshotUrl: (_b = item == null ? void 0 : item.payload) == null ? void 0 : _b.snapshotUrl,
  10852. message: item
  10853. };
  10854. }
  10855. function handleAudioMessageShowContext(item) {
  10856. return {
  10857. progress: (item == null ? void 0 : item.status) === "unSend" && item.progress,
  10858. url: item.payload.url,
  10859. message: item,
  10860. second: item.payload.second
  10861. };
  10862. }
  10863. function handleFileMessageShowContext(item) {
  10864. let size = "";
  10865. if (item.payload.fileSize >= 1024 * 1024) {
  10866. size = `${(item.payload.fileSize / (1024 * 1024)).toFixed(2)} Mb`;
  10867. } else if (item.payload.fileSize >= 1024) {
  10868. size = `${(item.payload.fileSize / 1024).toFixed(2)} Kb`;
  10869. } else {
  10870. size = `${item.payload.fileSize.toFixed(2)}B`;
  10871. }
  10872. return {
  10873. progress: (item == null ? void 0 : item.status) === "unSend" && item.progress,
  10874. url: item.payload.fileUrl,
  10875. message: item,
  10876. name: item.payload.fileName,
  10877. size
  10878. };
  10879. }
  10880. function handleMergerMessageShowContext(item) {
  10881. return { message: item, ...item.payload };
  10882. }
  10883. function extractCallingInfoFromMessage(message) {
  10884. let callingmessage = {};
  10885. let objectData = {};
  10886. try {
  10887. callingmessage = JSON.parse(message.payload.data);
  10888. } catch (error2) {
  10889. callingmessage = {};
  10890. }
  10891. if (callingmessage.businessID !== 1) {
  10892. return "";
  10893. }
  10894. try {
  10895. objectData = JSON.parse(callingmessage.data);
  10896. } catch (error2) {
  10897. objectData = {};
  10898. }
  10899. switch (callingmessage.actionType) {
  10900. case 1: {
  10901. if (objectData.call_end >= 0 && !callingmessage.groupID) {
  10902. return `通话时长 :${formatTime(objectData.call_end)}`;
  10903. }
  10904. if (callingmessage.groupID) {
  10905. return `结束群聊`;
  10906. }
  10907. if (objectData.data && objectData.data.cmd === "switchToAudio") {
  10908. return `切换语音通话`;
  10909. }
  10910. if (objectData.data && objectData.data.cmd === "switchToVideo") {
  10911. return `切换视频通话`;
  10912. }
  10913. return `发起通话`;
  10914. }
  10915. case 2:
  10916. return `取消通话`;
  10917. case 3:
  10918. if (objectData.data && objectData.data.cmd === "switchToAudio") {
  10919. return `切换语音通话`;
  10920. }
  10921. if (objectData.data && objectData.data.cmd === "switchToVideo") {
  10922. return `切换视频通话`;
  10923. }
  10924. return `已接听`;
  10925. case 4:
  10926. return `拒绝通话`;
  10927. case 5:
  10928. if (objectData.data && objectData.data.cmd === "switchToAudio") {
  10929. return `切换语音通话`;
  10930. }
  10931. if (objectData.data && objectData.data.cmd === "switchToVideo") {
  10932. return `切换视频通话`;
  10933. }
  10934. return `无应答`;
  10935. default:
  10936. return "";
  10937. }
  10938. }
  10939. function handleCustomMessageShowContext(item) {
  10940. var _a;
  10941. return {
  10942. message: item,
  10943. custom: extractCallingInfoFromMessage(item) || ((_a = item == null ? void 0 : item.payload) == null ? void 0 : _a.extension) || `[自定义消息]`
  10944. };
  10945. }
  10946. function translateGroupSystemNotice(message) {
  10947. var _a, _b;
  10948. const groupName = ((_a = message.payload.groupProfile) == null ? void 0 : _a.name) || ((_b = message.payload.groupProfile) == null ? void 0 : _b.groupID);
  10949. switch (message.payload.operationType) {
  10950. case 1:
  10951. return `${message.payload.operatorID} 申请加入群组:${groupName}`;
  10952. case 2:
  10953. return `成功加入群组:${groupName}`;
  10954. case 3:
  10955. return `申请加入群组:${groupName} 被拒绝`;
  10956. case 4:
  10957. return `你被管理员 ${message.payload.operatorID} 踢出群组:${groupName}`;
  10958. case 5:
  10959. return `群:${groupName} 被 ${message.payload.operatorID} 解散`;
  10960. case 6:
  10961. return `${message.payload.operatorID} 创建群:${groupName}`;
  10962. case 7:
  10963. return `${message.payload.operatorID} 邀请你加群:${groupName}`;
  10964. case 8:
  10965. return `你退出群组:${groupName}`;
  10966. case 9:
  10967. return `你被${message.payload.operatorID} 设置为群:${groupName} 的管理员`;
  10968. case 10:
  10969. return `你被 ${message.payload.operatorID} 撤销群:${groupName} 的管理员身份`;
  10970. case 12:
  10971. return `${message.payload.operatorID} 邀请你加群:${groupName}`;
  10972. case 13:
  10973. return `${message.payload.operatorID} 同意加群 :${groupName}`;
  10974. case 14:
  10975. return `${message.payload.operatorID} 拒接加群 :${groupName}`;
  10976. case 255:
  10977. return `自定义群系统通知: ${message.payload.userDefinedField}`;
  10978. }
  10979. }
  10980. const MessageSystem$1 = vue.defineComponent({
  10981. props: {
  10982. data: {
  10983. type: Array,
  10984. default: () => {
  10985. return [];
  10986. }
  10987. },
  10988. types: {
  10989. type: Object,
  10990. default: () => {
  10991. return {};
  10992. }
  10993. }
  10994. },
  10995. setup(props2, ctx) {
  10996. const data = vue.reactive({
  10997. messageList: [],
  10998. types: {}
  10999. });
  11000. vue.watchEffect(() => {
  11001. data.messageList = props2.data;
  11002. data.types = props2.types;
  11003. });
  11004. const handleApplication = () => {
  11005. uni.showActionSheet({
  11006. itemList: ["同意", "拒绝"],
  11007. success: (res) => {
  11008. const option = {
  11009. handleAction: "Agree",
  11010. handleMessage: "欢迎进群",
  11011. message: this.message
  11012. };
  11013. if (res.tapIndex === 1) {
  11014. option.handleAction = "Reject";
  11015. option.handleMessage = "拒绝申请";
  11016. }
  11017. uni.$TUIKit.handleGroupApplication(option).then(() => {
  11018. uni.showToast({
  11019. title: option.handleAction === "Agree" ? "已同意申请" : "已拒绝申请"
  11020. });
  11021. }).catch((error2) => {
  11022. uni.showToast({
  11023. title: error2.message || "处理失败",
  11024. icon: "none"
  11025. });
  11026. });
  11027. }
  11028. });
  11029. };
  11030. return {
  11031. ...vue.toRefs(data),
  11032. translateGroupSystemNotice,
  11033. handleApplication,
  11034. caculateTimeago
  11035. };
  11036. }
  11037. });
  11038. function _sfc_render$2a(_ctx, _cache, $props, $setup, $data, $options) {
  11039. return vue.openBlock(true), vue.createElementBlock(
  11040. vue.Fragment,
  11041. null,
  11042. vue.renderList(_ctx.messageList, (item, index2) => {
  11043. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  11044. item.payload.operationType === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11045. key: 0,
  11046. class: "card handle"
  11047. }, [
  11048. vue.createElementVNode("view", null, [
  11049. vue.createElementVNode(
  11050. "view",
  11051. { class: "time" },
  11052. vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)),
  11053. 1
  11054. /* TEXT */
  11055. ),
  11056. vue.createTextVNode(
  11057. " " + vue.toDisplayString(_ctx.translateGroupSystemNotice(item)),
  11058. 1
  11059. /* TEXT */
  11060. )
  11061. ]),
  11062. vue.createElementVNode("view", { class: "choose" }, [
  11063. vue.createElementVNode("view", {
  11064. class: "button",
  11065. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
  11066. }, "处理")
  11067. ])
  11068. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  11069. key: 1,
  11070. class: "card"
  11071. }, [
  11072. vue.createElementVNode(
  11073. "view",
  11074. { class: "time" },
  11075. vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)),
  11076. 1
  11077. /* TEXT */
  11078. ),
  11079. vue.createTextVNode(
  11080. " " + vue.toDisplayString(_ctx.translateGroupSystemNotice(item)),
  11081. 1
  11082. /* TEXT */
  11083. )
  11084. ]))
  11085. ]);
  11086. }),
  11087. 128
  11088. /* KEYED_FRAGMENT */
  11089. );
  11090. }
  11091. const MessageSystem = /* @__PURE__ */ _export_sfc(MessageSystem$1, [["render", _sfc_render$2a], ["__scopeId", "data-v-041bacfa"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-system.vue"]]);
  11092. const Face$1 = vue.defineComponent({
  11093. props: {
  11094. show: {
  11095. type: Boolean,
  11096. default: () => false
  11097. },
  11098. isMute: {
  11099. type: Boolean,
  11100. default: () => false
  11101. }
  11102. },
  11103. setup(props2, ctx) {
  11104. const data = vue.reactive({
  11105. emojiUrl,
  11106. emojiMap,
  11107. emojiName,
  11108. faceUrl,
  11109. bigEmojiList,
  11110. show: false,
  11111. currentIndex: 0,
  11112. isMute: false
  11113. });
  11114. const dialog = vue.ref();
  11115. vue.watchEffect(() => {
  11116. data.show = props2.show;
  11117. data.isMute = props2.isMute;
  11118. });
  11119. const toggleShow = () => {
  11120. if (!data.isMute) {
  11121. data.show = !data.show;
  11122. }
  11123. if (!data.show) {
  11124. selectFace(0);
  11125. }
  11126. };
  11127. const select = async (item, index2) => {
  11128. const options = {
  11129. name: item
  11130. };
  11131. if (data.currentIndex === 0) {
  11132. options.type = "emo";
  11133. options.url = emojiUrl + emojiMap[item];
  11134. options.template = `<image src="${emojiUrl + emojiMap[item]}"></image>`;
  11135. return ctx.emit("send", options);
  11136. }
  11137. try {
  11138. await uni.$TUIKit.TUIChatServer.sendFaceMessage({
  11139. index: index2,
  11140. data: item
  11141. });
  11142. } catch (error2) {
  11143. }
  11144. };
  11145. const list = vue.computed(() => {
  11146. const emjiList = [data.emojiName];
  11147. for (let i = 0; i < data.bigEmojiList.length; i++) {
  11148. emjiList.push(data.bigEmojiList[i].list);
  11149. }
  11150. return emjiList;
  11151. });
  11152. const selectFace = (index2) => {
  11153. data.currentIndex = index2;
  11154. };
  11155. const handleSendEmoji = () => {
  11156. return ctx.emit("handleSendEmoji");
  11157. };
  11158. return {
  11159. ...vue.toRefs(data),
  11160. toggleShow,
  11161. select,
  11162. selectFace,
  11163. list,
  11164. dialog,
  11165. handleSendEmoji
  11166. };
  11167. }
  11168. });
  11169. function _sfc_render$29(_ctx, _cache, $props, $setup, $data, $options) {
  11170. return vue.openBlock(), vue.createElementBlock("view", { class: "face" }, [
  11171. vue.createElementVNode("view", {
  11172. class: "icon icon-face",
  11173. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleShow && _ctx.toggleShow(...args))
  11174. }),
  11175. vue.withDirectives(vue.createElementVNode(
  11176. "view",
  11177. {
  11178. class: "face-main",
  11179. ref: "dialog"
  11180. },
  11181. [
  11182. (vue.openBlock(true), vue.createElementBlock(
  11183. vue.Fragment,
  11184. null,
  11185. vue.renderList(_ctx.list, (item, index2) => {
  11186. return vue.openBlock(), vue.createElementBlock("view", {
  11187. class: "face-main-box",
  11188. key: index2
  11189. }, [
  11190. _ctx.currentIndex === index2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11191. key: 0,
  11192. class: "face-list"
  11193. }, [
  11194. (vue.openBlock(true), vue.createElementBlock(
  11195. vue.Fragment,
  11196. null,
  11197. vue.renderList(item, (childrenItem, childrenIndex) => {
  11198. return vue.openBlock(), vue.createElementBlock("view", {
  11199. class: "face-list-item",
  11200. key: childrenIndex,
  11201. onClick: ($event) => _ctx.select(childrenItem, childrenIndex)
  11202. }, [
  11203. index2 === 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  11204. key: 0,
  11205. class: "emo-image",
  11206. src: _ctx.emojiUrl + _ctx.emojiMap[childrenItem]
  11207. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
  11208. key: 1,
  11209. class: "face-img",
  11210. src: _ctx.faceUrl + childrenItem + "@2x.png"
  11211. }, null, 8, ["src"]))
  11212. ], 8, ["onClick"]);
  11213. }),
  11214. 128
  11215. /* KEYED_FRAGMENT */
  11216. ))
  11217. ])) : vue.createCommentVNode("v-if", true)
  11218. ]);
  11219. }),
  11220. 128
  11221. /* KEYED_FRAGMENT */
  11222. )),
  11223. vue.createElementVNode("view", { class: "face-tab" }, [
  11224. vue.createElementVNode("view", {
  11225. class: "face-tab-item",
  11226. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.selectFace(0))
  11227. }, [
  11228. vue.createElementVNode("view", { class: "icon icon-face" })
  11229. ]),
  11230. (vue.openBlock(true), vue.createElementBlock(
  11231. vue.Fragment,
  11232. null,
  11233. vue.renderList(_ctx.bigEmojiList, (item, index2) => {
  11234. return vue.openBlock(), vue.createElementBlock("view", {
  11235. class: "face-tab-item",
  11236. key: index2,
  11237. onClick: ($event) => _ctx.selectFace(index2 + 1)
  11238. }, [
  11239. vue.createElementVNode("image", {
  11240. class: "face-icon",
  11241. src: _ctx.faceUrl + item.icon + "@2x.png"
  11242. }, null, 8, ["src"])
  11243. ], 8, ["onClick"]);
  11244. }),
  11245. 128
  11246. /* KEYED_FRAGMENT */
  11247. )),
  11248. vue.createElementVNode("view", {
  11249. class: "send-btn",
  11250. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleSendEmoji && _ctx.handleSendEmoji(...args))
  11251. }, "发送")
  11252. ])
  11253. ],
  11254. 512
  11255. /* NEED_PATCH */
  11256. ), [
  11257. [vue.vShow, _ctx.show]
  11258. ])
  11259. ]);
  11260. }
  11261. const Face = /* @__PURE__ */ _export_sfc(Face$1, [["render", _sfc_render$29], ["__scopeId", "data-v-cc73b204"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-input/message/face.vue"]]);
  11262. const recorderManager = uni.getRecorderManager();
  11263. const AudioMessage$1 = vue.defineComponent({
  11264. props: {
  11265. show: {
  11266. type: Boolean,
  11267. default: () => {
  11268. return false;
  11269. }
  11270. }
  11271. },
  11272. setup(props2, ctx) {
  11273. const data = vue.reactive({
  11274. popupToggle: false,
  11275. isRecording: false,
  11276. canSend: true,
  11277. text: "按住说话",
  11278. recorderManager: null,
  11279. title: " ",
  11280. recordTime: 0,
  11281. recordTimer: null
  11282. });
  11283. vue.onMounted(() => {
  11284. recorderManager.onStop((res) => {
  11285. clearInterval(data.recordTimer);
  11286. let msg = {
  11287. duration: res.duration ? res.duration : data.recordTime * 1e3,
  11288. tempFilePath: res.tempFilePath,
  11289. fileSize: res.fileSize ? res.fileSize : 48 * data.recordTime / 8 * 1024
  11290. };
  11291. uni.hideLoading();
  11292. if (data.canSend) {
  11293. if (msg.duration < 1e3) {
  11294. uni.showToast({
  11295. title: "录音时间太短",
  11296. icon: "none"
  11297. });
  11298. } else {
  11299. uni.$TUIKit.TUIChatServer.sendAudioMessage(msg);
  11300. }
  11301. }
  11302. data.popupToggle = false;
  11303. data.isRecording = false;
  11304. data.canSend = true;
  11305. data.title = " ";
  11306. data.text = "按住说话";
  11307. });
  11308. });
  11309. const handleLongPress = (e) => {
  11310. data.popupToggle = true, recorderManager.start({
  11311. duration: 6e4,
  11312. // 录音的时长,单位 ms,最大值 600000(10 分钟)
  11313. sampleRate: 44100,
  11314. // 采样率
  11315. numberOfChannels: 1,
  11316. // 录音通道数
  11317. encodeBitRate: 192e3,
  11318. // 编码码率
  11319. format: "aac"
  11320. // 音频格式,选择此格式创建的音频消息,可以在即时通信 IM 全平台(Android、iOS、微信小程序和Web)互通
  11321. });
  11322. data.startPoint = e.target, data.title = "正在录音", data.isRecording = true, data.recordTime = 0;
  11323. data.recordTimer = setInterval(() => {
  11324. data.recordTime++;
  11325. }, 1e3);
  11326. };
  11327. const handleTouchMove = (e) => {
  11328. if (data.isRecording) {
  11329. if (e.currentTarget.offsetTop - e.changedTouches[e.changedTouches.length - 1].clientY > 100) {
  11330. data.text = "抬起停止";
  11331. data.title = "松开手指,取消发送";
  11332. data.canSend = false;
  11333. } else if (e.currentTarget.offsetTop - e.changedTouches[e.changedTouches.length - 1].clientY > 20) {
  11334. data.text = "抬起停止";
  11335. data.title = "上划可取消";
  11336. data.canSend = true;
  11337. } else {
  11338. data.text = "抬起停止";
  11339. data.title = "正在录音";
  11340. data.canSend = true;
  11341. }
  11342. }
  11343. };
  11344. const handleTouchEnd = () => {
  11345. data.isRecording = false;
  11346. data.popupToggle = false;
  11347. data.text = "按住说话";
  11348. uni.hideLoading();
  11349. recorderManager.stop();
  11350. };
  11351. const sendUploadMessage = (e) => {
  11352. Video.TUIServer.sendVideoMessage(e.target);
  11353. };
  11354. return {
  11355. ...vue.toRefs(data),
  11356. sendUploadMessage,
  11357. handleLongPress,
  11358. handleTouchEnd,
  11359. handleTouchMove
  11360. };
  11361. }
  11362. });
  11363. function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) {
  11364. return vue.openBlock(), vue.createElementBlock(
  11365. "view",
  11366. {
  11367. class: "TUI-message-input-main",
  11368. onLongpress: _cache[3] || (_cache[3] = (...args) => _ctx.handleLongPress && _ctx.handleLongPress(...args)),
  11369. onTouchmove: _cache[4] || (_cache[4] = (...args) => _ctx.handleTouchMove && _ctx.handleTouchMove(...args)),
  11370. onTouchend: _cache[5] || (_cache[5] = (...args) => _ctx.handleTouchEnd && _ctx.handleTouchEnd(...args))
  11371. },
  11372. [
  11373. vue.createElementVNode(
  11374. "text",
  11375. null,
  11376. vue.toDisplayString(_ctx.text),
  11377. 1
  11378. /* TEXT */
  11379. ),
  11380. _ctx.popupToggle ? (vue.openBlock(), vue.createElementBlock(
  11381. "view",
  11382. {
  11383. key: 0,
  11384. class: "record-modal",
  11385. onLongpress: _cache[0] || (_cache[0] = (...args) => _ctx.handleLongPress && _ctx.handleLongPress(...args)),
  11386. onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchMove && _ctx.handleTouchMove(...args)),
  11387. onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.handleTouchEnd && _ctx.handleTouchEnd(...args))
  11388. },
  11389. [
  11390. vue.createElementVNode("view", { class: "wrapper" }, [
  11391. vue.createElementVNode("view", { class: "modal-loading" })
  11392. ]),
  11393. vue.createElementVNode(
  11394. "view",
  11395. { class: "modal-title" },
  11396. vue.toDisplayString(_ctx.title),
  11397. 1
  11398. /* TEXT */
  11399. )
  11400. ],
  11401. 32
  11402. /* NEED_HYDRATION */
  11403. )) : vue.createCommentVNode("v-if", true)
  11404. ],
  11405. 32
  11406. /* NEED_HYDRATION */
  11407. );
  11408. }
  11409. const AudioMessage = /* @__PURE__ */ _export_sfc(AudioMessage$1, [["render", _sfc_render$28], ["__scopeId", "data-v-764d0a96"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-input/message/audio.vue"]]);
  11410. const TUIChatInput$1 = vue.defineComponent({
  11411. components: {
  11412. Face,
  11413. AudioMessage
  11414. },
  11415. props: {
  11416. text: {
  11417. type: String,
  11418. default: () => {
  11419. return "";
  11420. }
  11421. },
  11422. conversationData: {
  11423. type: Object,
  11424. default: () => {
  11425. return "";
  11426. }
  11427. }
  11428. },
  11429. setup(props2) {
  11430. const TUIServer = uni.$TUIKit.TUIChatServer;
  11431. const data = vue.reactive({
  11432. imType: vue.computed(() => store.state.timStore.imType),
  11433. orderType: vue.computed(() => store.state.timStore.orderType),
  11434. firstSendMessage: true,
  11435. inputText: "",
  11436. extensionArea: false,
  11437. sendMessageBtn: false,
  11438. displayFlag: "",
  11439. isAudio: false,
  11440. displayServiceEvaluation: false,
  11441. displayCommonWords: false,
  11442. displayOrderList: false,
  11443. conversation: vue.computed(() => store.state.timStore.conversation)
  11444. });
  11445. vue.watchEffect(() => {
  11446. data.inputText = props2.text;
  11447. });
  11448. const handleSwitchAudio = () => {
  11449. data.isAudio = !data.isAudio;
  11450. };
  11451. const handleEmoji = () => {
  11452. data.displayFlag = data.displayFlag === "emoji" ? "" : "emoji";
  11453. };
  11454. const handleExtensions = (e) => {
  11455. data.displayFlag = data.displayFlag === "extension" ? "" : "extension";
  11456. };
  11457. const handleSendTextMessage = (e) => {
  11458. if (data.inputText.trimEnd()) {
  11459. uni.$TUIKit.TUIChatServer.sendTextMessage(
  11460. JSON.parse(JSON.stringify(data.inputText))
  11461. );
  11462. }
  11463. data.inputText = " ";
  11464. };
  11465. const handleOrder = (value2) => {
  11466. uni.navigateTo({
  11467. url: "/pages_order/inquiryOrderDetails?orderId=" + store.state.timStore.orderId
  11468. });
  11469. };
  11470. const handleFollow = (value2) => {
  11471. uni.navigateTo({
  11472. url: "/pages_user/followDetails?followId=" + store.state.timStore.followId
  11473. });
  11474. };
  11475. const handleStoreOrder = (value2) => {
  11476. uni.navigateTo({
  11477. url: "/pages_order/storeOrderDetail?orderId=" + store.state.timStore.orderId
  11478. });
  11479. };
  11480. const handleSend = (emo) => {
  11481. data.inputText += emo.name;
  11482. };
  11483. const handleSendImageMessage = (type2) => {
  11484. uni.chooseImage({
  11485. sourceType: [type2],
  11486. count: 1,
  11487. success: (res) => {
  11488. uni.getImageInfo({
  11489. src: res.tempFilePaths[0],
  11490. success(image2) {
  11491. formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:228", image2);
  11492. setTimeout(function() {
  11493. TUIServer.sendImageMessage(res, image2);
  11494. }, 500);
  11495. }
  11496. });
  11497. }
  11498. });
  11499. };
  11500. const handleSendVideoMessage = (type2) => {
  11501. uni.chooseVideo({
  11502. sourceType: [type2],
  11503. // 来源相册或者拍摄
  11504. maxDuration: 60,
  11505. // 设置最长时间60s
  11506. camera: "back",
  11507. // 后置摄像头
  11508. success: (res) => {
  11509. if (res) {
  11510. setTimeout(function() {
  11511. TUIServer.sendVideoMessage(res);
  11512. }, 500);
  11513. }
  11514. }
  11515. });
  11516. };
  11517. const handleCalling = (value2) => {
  11518. if (data.conversation.type === "GROUP") {
  11519. uni.showToast({
  11520. title: "群聊暂不支持",
  11521. icon: "none"
  11522. });
  11523. return;
  11524. }
  11525. const { userID } = data.conversation.userProfile;
  11526. if (typeof uni.$TUICallKit === "undefined") {
  11527. formatAppLog(
  11528. "error",
  11529. "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:271",
  11530. "请集成 TUICallKit 插件,使用真机运行并且自定义基座调试,请参考官网文档:https://cloud.tencent.com/document/product/269/83857"
  11531. );
  11532. uni.showToast({
  11533. title: "请集成 TUICallKit 插件哦 ~ ",
  11534. icon: "none",
  11535. duration: 3e3
  11536. });
  11537. } else {
  11538. uni.$TUICallKit.call(
  11539. {
  11540. userID,
  11541. callMediaType: value2
  11542. },
  11543. (res) => {
  11544. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:287", JSON.stringify(res));
  11545. }
  11546. );
  11547. }
  11548. };
  11549. return {
  11550. ...vue.toRefs(data),
  11551. handleExtensions,
  11552. handleSendImageMessage,
  11553. handleSendTextMessage,
  11554. handleSendVideoMessage,
  11555. handleEmoji,
  11556. handleSend,
  11557. handleSwitchAudio,
  11558. handleCalling,
  11559. handleOrder,
  11560. handleFollow,
  11561. handleStoreOrder
  11562. };
  11563. }
  11564. });
  11565. const _imports_0 = "/assets/audio.3e97d529.svg";
  11566. const _imports_1 = "/assets/emoji.ccca7654.svg";
  11567. const _imports_2 = "/assets/more.abda2f36.svg";
  11568. const _imports_3 = "/assets/take-photo.bbcbfd9a.svg";
  11569. const _imports_4 = "/assets/send-img.7ec35072.svg";
  11570. const _imports_5 = "/assets/take-video.3b38acb8.svg";
  11571. const _imports_6 = "/assets/audio-calling.ce9b3c0a.svg";
  11572. const _imports_7 = "/assets/inquiry.4da57648.svg";
  11573. function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) {
  11574. const _component_AudioMessage = vue.resolveComponent("AudioMessage");
  11575. const _component_Face = vue.resolveComponent("Face");
  11576. return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-message-input-container" }, [
  11577. vue.createElementVNode("view", { class: "TUI-message-input" }, [
  11578. vue.createElementVNode("image", {
  11579. class: "TUI-icon",
  11580. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleSwitchAudio && _ctx.handleSwitchAudio(...args)),
  11581. src: _imports_0
  11582. }),
  11583. !_ctx.isAudio ? (vue.openBlock(), vue.createElementBlock("view", {
  11584. key: 0,
  11585. class: "TUI-message-input-main"
  11586. }, [
  11587. vue.withDirectives(vue.createElementVNode(
  11588. "textarea",
  11589. {
  11590. class: "TUI-message-input-area",
  11591. "placeholder-class": "input-placeholder",
  11592. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputText = $event),
  11593. placeholder: "请输入想要咨询的问题...",
  11594. "auto-height": "",
  11595. "confirm-type": "send",
  11596. "confirm-hold": "true",
  11597. onConfirm: _cache[2] || (_cache[2] = (...args) => _ctx.handleSendTextMessage && _ctx.handleSendTextMessage(...args))
  11598. },
  11599. null,
  11600. 544
  11601. /* NEED_HYDRATION, NEED_PATCH */
  11602. ), [
  11603. [vue.vModelText, _ctx.inputText]
  11604. ])
  11605. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  11606. key: 1,
  11607. class: "TUI-message-input-main"
  11608. }, [
  11609. vue.createVNode(_component_AudioMessage)
  11610. ])),
  11611. vue.createElementVNode("view", {
  11612. class: "TUI-message-input-functions",
  11613. "hover-class": "none"
  11614. }, [
  11615. vue.createElementVNode("image", {
  11616. class: "TUI-icon",
  11617. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleEmoji && _ctx.handleEmoji(...args)),
  11618. src: _imports_1
  11619. }),
  11620. vue.createElementVNode("view", {
  11621. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleExtensions && _ctx.handleExtensions(...args))
  11622. }, [
  11623. vue.createElementVNode("image", {
  11624. class: "TUI-icon",
  11625. src: _imports_2
  11626. })
  11627. ])
  11628. ])
  11629. ]),
  11630. _ctx.displayFlag === "emoji" ? (vue.openBlock(), vue.createElementBlock("view", {
  11631. key: 0,
  11632. class: "TUI-Emoji-area"
  11633. }, [
  11634. vue.createVNode(_component_Face, {
  11635. show: _ctx.displayFlag === "emoji",
  11636. onSend: _ctx.handleSend,
  11637. onHandleSendEmoji: _ctx.handleSendTextMessage
  11638. }, null, 8, ["show", "onSend", "onHandleSendEmoji"])
  11639. ])) : vue.createCommentVNode("v-if", true),
  11640. _ctx.displayFlag === "extension" ? (vue.openBlock(), vue.createElementBlock("view", {
  11641. key: 1,
  11642. class: "TUI-Extensions"
  11643. }, [
  11644. vue.createCommentVNode(' TODO: 这里功能还没实现\r\n <! <camera device-position="back" flash="off" binderror="error" style="width: 100%; height: 300px;"></camera>'),
  11645. vue.createElementVNode("view", {
  11646. class: "TUI-Extension-slot",
  11647. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleSendImageMessage("camera"))
  11648. }, [
  11649. vue.createElementVNode("image", {
  11650. class: "TUI-Extension-icon",
  11651. src: _imports_3
  11652. }),
  11653. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "拍照")
  11654. ]),
  11655. vue.createElementVNode("view", {
  11656. class: "TUI-Extension-slot",
  11657. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.handleSendImageMessage("album"))
  11658. }, [
  11659. vue.createElementVNode("image", {
  11660. class: "TUI-Extension-icon",
  11661. src: _imports_4
  11662. }),
  11663. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "图片")
  11664. ]),
  11665. vue.createElementVNode("view", {
  11666. class: "TUI-Extension-slot",
  11667. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.handleSendVideoMessage("album"))
  11668. }, [
  11669. vue.createElementVNode("image", {
  11670. class: "TUI-Extension-icon",
  11671. src: _imports_5
  11672. }),
  11673. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "视频")
  11674. ]),
  11675. vue.createElementVNode("view", {
  11676. class: "TUI-Extension-slot",
  11677. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.handleSendVideoMessage("camera"))
  11678. }, [
  11679. vue.createElementVNode("image", {
  11680. class: "TUI-Extension-icon",
  11681. src: _imports_3
  11682. }),
  11683. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "录像")
  11684. ]),
  11685. _ctx.imType == 1 && _ctx.orderType == 2 || _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11686. key: 0,
  11687. class: "TUI-Extension-slot",
  11688. onClick: _cache[9] || (_cache[9] = ($event) => _ctx.handleCalling(1))
  11689. }, [
  11690. vue.createElementVNode("image", {
  11691. class: "TUI-Extension-icon",
  11692. src: _imports_6
  11693. }),
  11694. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "语音通话")
  11695. ])) : vue.createCommentVNode("v-if", true),
  11696. _ctx.imType == 1 && _ctx.orderType == 2 || _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11697. key: 1,
  11698. class: "TUI-Extension-slot",
  11699. onClick: _cache[10] || (_cache[10] = ($event) => _ctx.handleCalling(2))
  11700. }, [
  11701. vue.createElementVNode("image", {
  11702. class: "TUI-Extension-icon",
  11703. src: _imports_5
  11704. }),
  11705. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "视频通话")
  11706. ])) : vue.createCommentVNode("v-if", true),
  11707. _ctx.imType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11708. key: 2,
  11709. class: "TUI-Extension-slot",
  11710. onClick: _cache[11] || (_cache[11] = ($event) => _ctx.handleOrder())
  11711. }, [
  11712. vue.createElementVNode("image", {
  11713. class: "TUI-Extension-icon",
  11714. src: _imports_7
  11715. }),
  11716. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "问诊订单")
  11717. ])) : vue.createCommentVNode("v-if", true),
  11718. _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11719. key: 3,
  11720. class: "TUI-Extension-slot",
  11721. onClick: _cache[12] || (_cache[12] = ($event) => _ctx.handleFollow())
  11722. }, [
  11723. vue.createElementVNode("image", {
  11724. class: "TUI-Extension-icon",
  11725. src: _imports_7
  11726. }),
  11727. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "随访单")
  11728. ])) : vue.createCommentVNode("v-if", true),
  11729. _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11730. key: 4,
  11731. class: "TUI-Extension-slot",
  11732. onClick: _cache[13] || (_cache[13] = ($event) => _ctx.handleStoreOrder())
  11733. }, [
  11734. vue.createElementVNode("image", {
  11735. class: "TUI-Extension-icon",
  11736. src: _imports_7
  11737. }),
  11738. vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "药品订单")
  11739. ])) : vue.createCommentVNode("v-if", true)
  11740. ])) : vue.createCommentVNode("v-if", true)
  11741. ]);
  11742. }
  11743. const TUIChatInput = /* @__PURE__ */ _export_sfc(TUIChatInput$1, [["render", _sfc_render$27], ["__scopeId", "data-v-f3fabc48"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue"]]);
  11744. class IComponentServer {
  11745. /**
  11746. * 组件销毁
  11747. */
  11748. destroyed() {
  11749. }
  11750. /**
  11751. * 数据监听回调
  11752. *
  11753. * @param {any} oldValue 旧数据
  11754. * @param {any} newValue 新数据
  11755. */
  11756. updateStore(oldValue, newValue) {
  11757. }
  11758. }
  11759. class TUIConversationServer extends IComponentServer {
  11760. constructor(TUICore) {
  11761. super();
  11762. this.store = store.state.timStore;
  11763. this.TUICore = uni.$TUIKit;
  11764. uni.setStorageSync(`TIM_${uni.$chat_SDKAppID}_isTUIKit`, true);
  11765. if (uni.$aegis) {
  11766. uni.$aegis.reportEvent({
  11767. name: "platform",
  11768. ext1: "platform-APP-npm",
  11769. ext2: "uniTuikitExternalVue3",
  11770. ext3: `${uni.$chat_SDKAppID}`
  11771. });
  11772. }
  11773. this.bindTIMEvent();
  11774. if (uni.$chat_isSDKReady) {
  11775. this.getConversationList();
  11776. }
  11777. }
  11778. /**
  11779. * /////////////////////////////////////////////////////////////////////////////////
  11780. * //
  11781. * // TIM 事件监听注册接口
  11782. * //
  11783. * /////////////////////////////////////////////////////////////////////////////////
  11784. */
  11785. bindTIMEvent() {
  11786. this.TUICore.on(
  11787. uni.$TIM.EVENT.CONVERSATION_LIST_UPDATED,
  11788. this.handleConversationListUpdate,
  11789. this
  11790. );
  11791. }
  11792. unbindTIMEvent() {
  11793. this.TUICore.off(
  11794. uni.$TIM.EVENT.CONVERSATION_LIST_UPDATED,
  11795. this.handleConversationListUpdate
  11796. );
  11797. }
  11798. handleConversationListUpdate(res) {
  11799. uni.hideLoading();
  11800. if (res.data.length === 0)
  11801. ;
  11802. uni.$emit("refreshMsgCount");
  11803. res.data.forEach(function(element) {
  11804. formatAppLog("log", "at pages/TUIKit/TUICore/server/conversation/index.ts:96", "收到会话消息");
  11805. formatAppLog("log", "at pages/TUIKit/TUICore/server/conversation/index.ts:97", element);
  11806. });
  11807. store.commit("timStore/setConversationList", res.data);
  11808. }
  11809. /**
  11810. * 组件销毁
  11811. *
  11812. */
  11813. destroyed() {
  11814. this.unbindTIMEvent();
  11815. }
  11816. /*
  11817. * 获取 conversationList
  11818. *
  11819. * @returns {Promise}
  11820. */
  11821. async getConversationList() {
  11822. return new Promise(async (resolve, reject2) => {
  11823. try {
  11824. const imResponse = await uni.$TUIKit.getConversationList();
  11825. store.commit("timStore/setConversationList", imResponse.data.conversationList);
  11826. uni.hideLoading();
  11827. resolve(imResponse);
  11828. } catch (error2) {
  11829. reject2(error2);
  11830. }
  11831. });
  11832. }
  11833. /**
  11834. * 获取 conversationList
  11835. *
  11836. * @param {string} conversationID 会话ID
  11837. * @returns {Promise}
  11838. */
  11839. async getConversationProfile(conversationID) {
  11840. return new Promise(async (resolve, reject2) => {
  11841. try {
  11842. const imResponse = await this.TUICore.getConversationProfile(
  11843. conversationID
  11844. );
  11845. resolve(imResponse);
  11846. } catch (error2) {
  11847. reject2(error2);
  11848. }
  11849. });
  11850. }
  11851. /**
  11852. * 设置自定义值
  11853. */
  11854. async setConversationValue(conversationID, data) {
  11855. return new Promise(async (resolve, reject2) => {
  11856. try {
  11857. const imResponse = await this.TUICore.setConversationCustomData(
  11858. {
  11859. conversationIDList: [conversationID],
  11860. customData: data
  11861. }
  11862. );
  11863. resolve(imResponse);
  11864. } catch (error2) {
  11865. reject2(error2);
  11866. }
  11867. });
  11868. }
  11869. /**
  11870. * 删除会话
  11871. *
  11872. * @param {string} conversationID 会话ID
  11873. * @returns {Promise}
  11874. */
  11875. async deleteConversation(conversationID) {
  11876. return new Promise(async (resolve, reject2) => {
  11877. try {
  11878. const imResponse = await this.TUICore.deleteConversation(
  11879. conversationID
  11880. );
  11881. resolve(imResponse);
  11882. } catch (error2) {
  11883. reject2(error2);
  11884. }
  11885. });
  11886. }
  11887. /**
  11888. * 置顶会话
  11889. *
  11890. * @param {Object} options 置顶参数
  11891. * @returns {Promise}
  11892. */
  11893. async pinConversation(options) {
  11894. return new Promise(async (resolve, reject2) => {
  11895. try {
  11896. const imResponse = await this.TUICore.pinConversation(options);
  11897. resolve(imResponse);
  11898. } catch (error2) {
  11899. reject2(error2);
  11900. }
  11901. });
  11902. }
  11903. /**
  11904. * C2C消息免打扰
  11905. *
  11906. * @param {Object} options 消息免打扰参数
  11907. * @returns {Promise}
  11908. */
  11909. async muteConversation(options) {
  11910. return new Promise(async (resolve, reject2) => {
  11911. try {
  11912. const imResponse = await this.TUICore.setMessageRemindType(
  11913. options
  11914. );
  11915. resolve(imResponse);
  11916. } catch (error2) {
  11917. reject2(error2);
  11918. }
  11919. });
  11920. }
  11921. /**
  11922. * 设置已读
  11923. *
  11924. * @param {string} conversationID 会话ID
  11925. * @returns {Promise}
  11926. */
  11927. async setMessageRead(conversationID) {
  11928. return new Promise(async (resolve, reject2) => {
  11929. try {
  11930. const imResponse = await this.TUICore.setMessageRead({
  11931. conversationID
  11932. });
  11933. resolve(imResponse);
  11934. } catch (error2) {
  11935. reject2(error2);
  11936. }
  11937. });
  11938. }
  11939. }
  11940. class TUIChatServer extends IComponentServer {
  11941. constructor(TUICore) {
  11942. super();
  11943. this.currentStore = {};
  11944. this.store = store.state.timStore;
  11945. this.TUICore = uni.$TUIKit;
  11946. this.bindTIMEvent();
  11947. this.updateStore();
  11948. }
  11949. /**
  11950. * 组件销毁
  11951. */
  11952. destroyed() {
  11953. this.unbindTIMEvent();
  11954. }
  11955. /**
  11956. * 数据监听回调
  11957. *
  11958. * @param {any} newValue 新数据
  11959. * @param {any} oldValue 旧数据
  11960. *
  11961. */
  11962. updateStore() {
  11963. this.getMessageList({
  11964. conversationID: this.store.conversationID,
  11965. count: 15
  11966. });
  11967. store.commit("timStore/resetChat");
  11968. }
  11969. /**
  11970. * /////////////////////////////////////////////////////////////////////////////////
  11971. * //
  11972. * // TIM 事件监听注册接口
  11973. * //
  11974. * /////////////////////////////////////////////////////////////////////////////////
  11975. */
  11976. bindTIMEvent() {
  11977. this.TUICore.on(
  11978. uni.$TIM.EVENT.MESSAGE_RECEIVED,
  11979. this.handleMessageReceived,
  11980. this
  11981. );
  11982. this.TUICore.on(
  11983. uni.$TIM.EVENT.MESSAGE_MODIFIED,
  11984. this.handleMessageModified,
  11985. this
  11986. );
  11987. this.TUICore.on(
  11988. uni.$TIM.EVENT.MESSAGE_REVOKED,
  11989. this.handleMessageRevoked,
  11990. this
  11991. );
  11992. this.TUICore.on(
  11993. uni.$TIM.EVENT.MESSAGE_READ_BY_PEER,
  11994. this.handleMessageReadByPeer,
  11995. this
  11996. );
  11997. this.TUICore.on(
  11998. uni.$TIM.EVENT.GROUP_LIST_UPDATED,
  11999. this.handleGroupListUpdated,
  12000. this
  12001. );
  12002. }
  12003. unbindTIMEvent() {
  12004. this.TUICore.off(
  12005. uni.$TIM.EVENT.MESSAGE_RECEIVED,
  12006. this.handleMessageReceived
  12007. );
  12008. this.TUICore.off(
  12009. uni.$TIM.EVENT.MESSAGE_MODIFIED,
  12010. this.handleMessageModified
  12011. );
  12012. this.TUICore.off(uni.$TIM.EVENT.MESSAGE_REVOKED, this.handleMessageRevoked);
  12013. this.TUICore.off(
  12014. uni.$TIM.EVENT.MESSAGE_READ_BY_PEER,
  12015. this.handleMessageReadByPeer
  12016. );
  12017. this.TUICore.off(
  12018. uni.$TIM.EVENT.GROUP_LIST_UPDATED,
  12019. this.handleGroupListUpdated,
  12020. this
  12021. );
  12022. }
  12023. handleMessageReceived(event) {
  12024. event.data.forEach((item) => {
  12025. if (item.conversationID === this.store.conversationID) {
  12026. uni.$TUIKit.TUIConversationServer.setMessageRead(item.conversationID);
  12027. if (item.cloudCustomData != null && item.cloudCustomData != "") {
  12028. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:107", "收到消息");
  12029. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:108", item);
  12030. try {
  12031. var json = JSON.parse(item.cloudCustomData);
  12032. store.commit("timStore/setType", json.type);
  12033. store.commit("timStore/setImType", json.imType);
  12034. store.commit("timStore/setOrderId", json.orderId);
  12035. store.commit("timStore/setOrderType", json.orderType);
  12036. store.commit("timStore/setFollowId", json.followId);
  12037. if (json.type === "finishInquiry") {
  12038. store.commit("timStore/setImType", 0);
  12039. uni.navigateTo({
  12040. url: "/pages_order/pingOrder?orderId=" + json.orderId
  12041. });
  12042. } else if (json.type === "startInquiry") {
  12043. } else if (json.type === "inquiry") {
  12044. } else if (json.type === "startFollow") {
  12045. } else if (json.type === "follow") {
  12046. } else if (json.type === "finishFollow") {
  12047. } else if (json.type === "startDrugReport") {
  12048. } else if (json.type === "finishDrugReport") {
  12049. } else if (json.type === "drugReport") {
  12050. }
  12051. } catch (e) {
  12052. }
  12053. const messageList = [...this.store.messageList, item];
  12054. store.commit("timStore/setMessageList", messageList);
  12055. } else {
  12056. const messageList = [...this.store.messageList, item];
  12057. store.commit("timStore/setMessageList", messageList);
  12058. }
  12059. }
  12060. });
  12061. }
  12062. handleMessageModified(event) {
  12063. const middleData = this.store.messageList;
  12064. this.store.messageList = [];
  12065. this.store.messageList = middleData;
  12066. }
  12067. handleMessageRevoked(event) {
  12068. }
  12069. async handleMessageReadByPeer(event) {
  12070. const middleData = this.store.messageList;
  12071. await store.commit("timStore/setMessageList", middleData);
  12072. }
  12073. handleGroupListUpdated(event) {
  12074. event == null ? void 0 : event.data.map((item) => {
  12075. var _a, _b, _c;
  12076. if ((item == null ? void 0 : item.groupID) === ((_c = (_b = (_a = this == null ? void 0 : this.store) == null ? void 0 : _a.conversation) == null ? void 0 : _b.groupProfile) == null ? void 0 : _c.groupID)) {
  12077. this.store.conversation.groupProfile = item;
  12078. const midden = this.store.conversation;
  12079. this.store.conversation = {};
  12080. this.store.conversation = midden;
  12081. }
  12082. return item;
  12083. });
  12084. }
  12085. /**
  12086. * /////////////////////////////////////////////////////////////////////////////////
  12087. * //
  12088. * // 处理 TIM 接口参数及回调
  12089. * //
  12090. * /////////////////////////////////////////////////////////////////////////////////
  12091. */
  12092. /**
  12093. * 创建消息生成参数
  12094. *
  12095. * @param {Object} content 消息体
  12096. * @param {String} type 消息类型 text: 文本类型 file: 文件类型 face: 表情 location: 地址 custom: 自定义 merger: 合并 forward: 转发
  12097. * @param {Callback} callback 回调函数
  12098. * @param {any} to 发送的对象
  12099. * @returns {options} 消息参数
  12100. */
  12101. handleMessageOptions(content, type2, callback, to) {
  12102. var _a, _b, _c, _d, _e, _f;
  12103. var customerData = {
  12104. type: this.store.type,
  12105. imType: this.store.imType,
  12106. orderId: this.store.orderId,
  12107. followId: this.store.followId,
  12108. orderType: this.store.orderType
  12109. };
  12110. const options = {
  12111. cloudCustomData: JSON.stringify(customerData),
  12112. to: "",
  12113. conversationType: (to == null ? void 0 : to.type) || this.store.conversation.type,
  12114. payload: content,
  12115. needReadReceipt: true
  12116. };
  12117. if (type2 === "file" && callback) {
  12118. options.onProgress = callback;
  12119. }
  12120. switch (options.conversationType) {
  12121. case uni.$TIM.TYPES.CONV_C2C:
  12122. options.to = ((_a = to == null ? void 0 : to.userProfile) == null ? void 0 : _a.userID) || ((_c = (_b = this.store.conversation) == null ? void 0 : _b.userProfile) == null ? void 0 : _c.userID) || "";
  12123. break;
  12124. case uni.$TIM.TYPES.CONV_GROUP:
  12125. options.to = ((_d = to == null ? void 0 : to.groupProfile) == null ? void 0 : _d.groupID) || ((_f = (_e = this.store.conversation) == null ? void 0 : _e.groupProfile) == null ? void 0 : _f.groupID) || "";
  12126. break;
  12127. }
  12128. return options;
  12129. }
  12130. /**
  12131. * 处理异步函数
  12132. *
  12133. * @param {callback} callback 回调函数
  12134. * @returns {Promise} 返回异步函数
  12135. */
  12136. handlePromiseCallback(callback) {
  12137. return new Promise((resolve, reject2) => {
  12138. });
  12139. }
  12140. /**
  12141. * 文件上传进度函数处理
  12142. *
  12143. * @param {number} progress 文件上传进度 1表示完成
  12144. * @param {message} message 文件消息
  12145. */
  12146. handleUploadProgress(progress, message) {
  12147. this.store.messageList.map((item) => {
  12148. if (item.ID === message.ID) {
  12149. item.progress = progress;
  12150. }
  12151. return item;
  12152. });
  12153. }
  12154. /**
  12155. * /////////////////////////////////////////////////////////////////////////////////
  12156. * //
  12157. * // 对外方法
  12158. * //
  12159. * /////////////////////////////////////////////////////////////////////////////////
  12160. */
  12161. // /**
  12162. // * 发送文本消息
  12163. // *
  12164. // * @param {any} text 发送的消息
  12165. // * @returns {Promise}
  12166. // */
  12167. /**
  12168. * 发送文本消息
  12169. *
  12170. * @param {any} text 发送的消息
  12171. * @returns {Promise}
  12172. */
  12173. sendTextMessage(text) {
  12174. return new Promise(async (resolve, reject2) => {
  12175. try {
  12176. const options = this.handleMessageOptions({ text }, "text");
  12177. const message = this.TUICore.createTextMessage(options);
  12178. const messageList = [...this.store.messageList, message];
  12179. store.commit("timStore/setMessageList", messageList);
  12180. const imResponse = await this.TUICore.sendMessage(message);
  12181. this.store.messageList = this.store.messageList.map((item) => {
  12182. if (item.ID === imResponse.data.message.ID) {
  12183. return imResponse.data.message;
  12184. }
  12185. return item;
  12186. });
  12187. resolve(imResponse);
  12188. } catch (error2) {
  12189. reject2(error2);
  12190. const middleData = this.store.messageList;
  12191. store.commit("timStore/resetChat");
  12192. store.commit("timStore/setMessageList", middleData);
  12193. }
  12194. });
  12195. }
  12196. /**
  12197. * 发送表情消息
  12198. *
  12199. * @param {Object} data 消息内容
  12200. * @param {Number} data.index 表情索引
  12201. * @param {String} data.data 额外数据
  12202. * @returns {Promise}
  12203. */
  12204. sendFaceMessage(data) {
  12205. return new Promise(async (resolve, reject2) => {
  12206. try {
  12207. const options = this.handleMessageOptions(data, "face");
  12208. const message = this.TUICore.createFaceMessage(options);
  12209. const messageList = [...this.store.messageList, message];
  12210. store.commit("timStore/setMessageList", messageList);
  12211. const imResponse = await this.TUICore.sendMessage(message);
  12212. this.store.messageList = this.store.messageList.map((item) => {
  12213. if (item.ID === imResponse.data.message.ID) {
  12214. return imResponse.data.message;
  12215. }
  12216. return item;
  12217. });
  12218. resolve(imResponse);
  12219. } catch (error2) {
  12220. reject2(error2);
  12221. }
  12222. });
  12223. }
  12224. /**
  12225. * 发送图片消息
  12226. *
  12227. * @param {res} res 图片文件
  12228. * @param {image} 图片尺寸
  12229. * @returns {Promise}
  12230. */
  12231. sendImageMessage(res, image2) {
  12232. return new Promise(async (resolve, reject2) => {
  12233. try {
  12234. const options = this.handleMessageOptions({ file: res }, "file");
  12235. const message = this.TUICore.createImageMessage(options);
  12236. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:366", 111222);
  12237. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:367", options);
  12238. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:368", message);
  12239. message.payload.imageInfoArray[1].height = image2.height;
  12240. message.payload.imageInfoArray[1].width = image2.width;
  12241. const messageList = [...this.store.messageList, message];
  12242. store.commit("timStore/setMessageList", messageList);
  12243. const imResponse = await this.TUICore.sendMessage(message);
  12244. this.store.messageList = this.store.messageList.map((item) => {
  12245. if (item.ID === imResponse.data.message.ID) {
  12246. return imResponse.data.message;
  12247. }
  12248. return item;
  12249. });
  12250. resolve(imResponse);
  12251. } catch (error2) {
  12252. reject2(error2);
  12253. }
  12254. });
  12255. }
  12256. /**
  12257. * 发送视频消息
  12258. *
  12259. * @param {Video} video 图片文件
  12260. * @returns {Promise}
  12261. */
  12262. sendVideoMessage(res, video2) {
  12263. return new Promise(async (resolve, reject2) => {
  12264. try {
  12265. const options = this.handleMessageOptions({ file: res }, "file");
  12266. const message = this.TUICore.createVideoMessage(options);
  12267. const messageList = [...this.store.messageList, message];
  12268. store.commit("timStore/setMessageList", messageList);
  12269. const imResponse = await this.TUICore.sendMessage(message);
  12270. this.store.messageList = this.store.messageList.map((item) => {
  12271. if (item.ID === imResponse.data.message.ID) {
  12272. return imResponse.data.message;
  12273. }
  12274. return item;
  12275. });
  12276. resolve(imResponse);
  12277. } catch (error2) {
  12278. reject2(error2);
  12279. }
  12280. });
  12281. }
  12282. /**
  12283. * 发送语音消息
  12284. *
  12285. * @param {audio} audio 音频文件
  12286. * @returns {Promise}
  12287. */
  12288. sendAudioMessage(audio2) {
  12289. return new Promise(async (resolve, reject2) => {
  12290. try {
  12291. const options = this.handleMessageOptions(
  12292. { file: audio2 },
  12293. "file",
  12294. (progress) => {
  12295. this.handleUploadProgress(progress, message);
  12296. }
  12297. );
  12298. const message = this.TUICore.createAudioMessage(options);
  12299. const messageList = [...this.store.messageList, message];
  12300. store.commit("timStore/setMessageList", messageList);
  12301. const imResponse = await this.TUICore.sendMessage(message);
  12302. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:439", "发送音频消息完成", imResponse);
  12303. this.store.messageList = this.store.messageList.map((item) => {
  12304. if (item.ID === imResponse.data.message.ID) {
  12305. return imResponse.data.message;
  12306. }
  12307. return item;
  12308. });
  12309. resolve(imResponse);
  12310. } catch (error2) {
  12311. reject2(error2);
  12312. }
  12313. });
  12314. }
  12315. /**
  12316. * 发送文件消息
  12317. *
  12318. * @param {File} file 文件
  12319. * @returns {Promise}
  12320. */
  12321. sendFileMessage(file) {
  12322. return this.handlePromiseCallback(async (resolve, reject2) => {
  12323. try {
  12324. const options = this.handleMessageOptions(
  12325. { file },
  12326. "file",
  12327. (progress) => {
  12328. this.handleUploadProgress(progress, message);
  12329. }
  12330. );
  12331. const message = this.TUICore.createFileMessage(options);
  12332. this.currentStore.messageList.push(message);
  12333. const imResponse = await this.TUICore.sendMessage(message);
  12334. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:472", "发送文件消息完成", imResponse);
  12335. this.store.messageList = this.store.messageList.map((item) => {
  12336. if (item.ID === imResponse.data.message.ID) {
  12337. return imResponse.data.message;
  12338. }
  12339. return item;
  12340. });
  12341. resolve(imResponse);
  12342. } catch (error2) {
  12343. reject2(error2);
  12344. }
  12345. });
  12346. }
  12347. /**
  12348. * 发送自定义消息
  12349. *
  12350. * @param {Object} data 消息内容
  12351. * @param {String} data.data 自定义消息的数据字段
  12352. * @param {String} data.description 自定义消息的说明字段
  12353. * @param {String} data.extension 自定义消息的扩展字段
  12354. * @returns {Promise}
  12355. */
  12356. sendCustomMessage(data) {
  12357. return new Promise(async (resolve, reject2) => {
  12358. try {
  12359. const options = this.handleMessageOptions(data, "custom");
  12360. const message = this.TUICore.createCustomMessage(options);
  12361. const messageList = [...this.store.messageList, message];
  12362. store.commit("timStore/setMessageList", messageList);
  12363. const imResponse = await this.TUICore.sendMessage(message);
  12364. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:504", "发送自定义消息完成", imResponse);
  12365. this.store.messageList = this.store.messageList.map((item) => {
  12366. if (item.ID === imResponse.data.message.ID) {
  12367. return imResponse.data.message;
  12368. }
  12369. return item;
  12370. });
  12371. resolve(imResponse);
  12372. } catch (error2) {
  12373. reject2(error2);
  12374. }
  12375. });
  12376. }
  12377. /**
  12378. * 发送地理位置消息
  12379. *
  12380. * @param {Object} data 消息内容
  12381. * @param {String} data.description 地理位置描述信息
  12382. * @param {Number} data.longitude 经度
  12383. * @param {Number} data.latitude 纬度
  12384. * @returns {Promise}
  12385. */
  12386. sendLocationMessage(data) {
  12387. return this.handlePromiseCallback(async (resolve, reject2) => {
  12388. try {
  12389. const options = this.handleMessageOptions(data, "location");
  12390. const message = this.TUICore.createLocationMessage(options);
  12391. this.store.messageList.push(message);
  12392. const imResponse = await this.TUICore.sendMessage(message);
  12393. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:534", "发送地理位置消息完成", imResponse);
  12394. resolve(imResponse);
  12395. } catch (error2) {
  12396. reject2(error2);
  12397. }
  12398. });
  12399. }
  12400. /**
  12401. * 转发消息
  12402. *
  12403. * @param {message} message 消息实例
  12404. * @param {any} to 转发的对象
  12405. * @returns {Promise}
  12406. */
  12407. forwardMessage(message, to) {
  12408. return this.handlePromiseCallback(async (resolve, reject2) => {
  12409. try {
  12410. const options = this.handleMessageOptions(message, "forward", {}, to);
  12411. const imMessage = this.TUICore.createForwardMessage(options);
  12412. const imResponse = await this.TUICore.sendMessage(imMessage);
  12413. if (this.store.conversation.conversationID === imResponse.data.message.conversationID) {
  12414. this.store.messageList.push(imResponse.data.message);
  12415. }
  12416. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:561", "消息转发完成", imResponse);
  12417. resolve(imResponse);
  12418. } catch (error2) {
  12419. reject2(error2);
  12420. }
  12421. });
  12422. }
  12423. /**
  12424. * 发送@ 提醒功能的文本消息
  12425. *
  12426. * @param {Object} data 消息内容
  12427. * @param {String} data.text 文本消息
  12428. * @param {Array} data.atUserList 需要 @ 的用户列表,如果需要 @ALL,请传入 TIM.TYPES.MSG_AT_ALL
  12429. * @returns {message}
  12430. *
  12431. * - 注:此接口仅用于群聊
  12432. */
  12433. sendTextAtMessage(data) {
  12434. return new Promise(async (resolve, reject2) => {
  12435. try {
  12436. const options = this.handleMessageOptions(data, "text");
  12437. const message = this.TUICore.createTextAtMessage(options);
  12438. this.currentStore.messageList.push(message);
  12439. const imResponse = await this.TUICore.sendMessage(message);
  12440. this.currentStore.messageList = this.currentStore.messageList.map(
  12441. (item) => {
  12442. if (item.ID === imResponse.data.message.ID) {
  12443. return imResponse.data.message;
  12444. }
  12445. return item;
  12446. }
  12447. );
  12448. resolve(imResponse);
  12449. } catch (error2) {
  12450. reject2(error2);
  12451. }
  12452. });
  12453. }
  12454. /**
  12455. * 发送合并消息
  12456. *
  12457. * @param {Object} data 消息内容
  12458. * @param {Array.<Message>} data.messageList 合并的消息列表
  12459. * @param {String} data.title 合并的标题
  12460. * @param {String} data.abstractList 摘要列表,不同的消息类型可以设置不同的摘要信息
  12461. * @param {String} data.compatibleText 兼容文本
  12462. * @returns {Promise}
  12463. */
  12464. sendMergerMessage(data) {
  12465. return this.handlePromiseCallback(async (resolve, reject2) => {
  12466. try {
  12467. const options = this.handleMessageOptions(data, "merger");
  12468. const message = this.TUICore.createMergerMessage(options);
  12469. this.currentStore.messageList.push(message);
  12470. const imResponse = await this.TUICore.sendMessage(message);
  12471. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:618", "发送合并消息完成", imResponse);
  12472. this.currentStore.messageList = this.currentStore.messageList.map(
  12473. (item) => {
  12474. if (item.ID === imResponse.data.message.ID) {
  12475. return imResponse.data.message;
  12476. }
  12477. return item;
  12478. }
  12479. );
  12480. resolve(imResponse);
  12481. } catch (error2) {
  12482. reject2(error2);
  12483. }
  12484. });
  12485. }
  12486. /**
  12487. * 获取 messageList
  12488. *
  12489. * @param {any} options 获取 messageList 参数
  12490. * @param {Boolean} history 是否获取历史消息
  12491. * @returns {Promise}
  12492. */
  12493. async getMessageList(options, history) {
  12494. return new Promise(async (resolve, reject2) => {
  12495. try {
  12496. const imResponse = await this.TUICore.getMessageList(options);
  12497. let messageList;
  12498. if (!history) {
  12499. messageList = imResponse.data.messageList;
  12500. } else {
  12501. messageList = [
  12502. ...imResponse.data.messageList,
  12503. ...this.store.messageList
  12504. ];
  12505. }
  12506. this.currentStore.nextReqMessageID = imResponse.data.nextReqMessageID;
  12507. this.currentStore.isCompleted = imResponse.data.isCompleted;
  12508. store.commit("timStore/setMessageList", messageList);
  12509. resolve(imResponse.data);
  12510. } catch (error2) {
  12511. reject2(error2);
  12512. }
  12513. });
  12514. }
  12515. /**
  12516. * 获取历史消息
  12517. *
  12518. * @returns {Promise}
  12519. */
  12520. async getHistoryMessageList() {
  12521. return new Promise(async (resolve, reject2) => {
  12522. try {
  12523. const options = {
  12524. conversationID: this.store.conversation.conversationID,
  12525. nextReqMessageID: this.currentStore.nextReqMessageID,
  12526. count: 15
  12527. };
  12528. let messageList = [];
  12529. if (!this.currentStore.isCompleted) {
  12530. messageList = await this.getMessageList(options, true);
  12531. }
  12532. resolve(messageList);
  12533. } catch (error2) {
  12534. reject2(error2);
  12535. }
  12536. });
  12537. }
  12538. /**
  12539. * 消息撤回
  12540. *
  12541. * @param {message} message 消息实例
  12542. * @returns {Promise}
  12543. */
  12544. revokeMessage(message) {
  12545. return new Promise(async (resolve, reject2) => {
  12546. try {
  12547. const imResponse = await this.TUICore.revokeMessage(message);
  12548. resolve(imResponse);
  12549. } catch (error2) {
  12550. reject2(error2);
  12551. }
  12552. });
  12553. }
  12554. /**
  12555. * 重发消息
  12556. *
  12557. * @param {message} message 消息实例
  12558. * @returns {Promise}
  12559. */
  12560. resendMessage(message) {
  12561. return new Promise(async (resolve, reject2) => {
  12562. try {
  12563. const imResponse = await this.TUICore.resendMessage(message);
  12564. formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:715", "消息重发完成", imResponse);
  12565. let messageList = [];
  12566. messageList = this.store.messageList.filter(
  12567. (item) => item.ID !== message.ID
  12568. );
  12569. store.commit("timStore/setMessageList", messageList);
  12570. resolve(imResponse);
  12571. } catch (error2) {
  12572. reject2(error2);
  12573. }
  12574. });
  12575. }
  12576. /**
  12577. * 删除消息
  12578. *
  12579. * @param {Array.<message>} messages 消息实例
  12580. * @returns {Promise}
  12581. */
  12582. deleteMessage(messages2) {
  12583. return new Promise(async (resolve, reject2) => {
  12584. try {
  12585. const imResponse = await this.TUICore.deleteMessage(messages2);
  12586. let messageList = [];
  12587. messageList = this.store.messageList.filter(
  12588. (item) => item.ID !== messages2.ID
  12589. );
  12590. store.commit("timStore/setMessageList", messageList);
  12591. resolve(imResponse);
  12592. } catch (error2) {
  12593. reject2(error2);
  12594. }
  12595. });
  12596. }
  12597. }
  12598. class TUIProfileServer extends IComponentServer {
  12599. constructor(TUICore) {
  12600. super();
  12601. this.store = store.state.timStore;
  12602. this.currentStore = {};
  12603. this.TUICore = uni.$TUIKit;
  12604. this.bindTIMEvent();
  12605. }
  12606. /**
  12607. * 组件销毁
  12608. */
  12609. destroyed() {
  12610. this.unbindTIMEvent();
  12611. }
  12612. /**
  12613. * /////////////////////////////////////////////////////////////////////////////////
  12614. * //
  12615. * // TIM 事件监听注册接口
  12616. * //
  12617. * /////////////////////////////////////////////////////////////////////////////////
  12618. */
  12619. bindTIMEvent() {
  12620. this.TUICore.on(
  12621. uni.$TIM.EVENT.PROFILE_UPDATED,
  12622. this.handleProfileUpdated,
  12623. this
  12624. );
  12625. }
  12626. unbindTIMEvent() {
  12627. this.TUICore.off(uni.$TIM.EVENT.PROFILE_UPDATED, this.handleProfileUpdated);
  12628. }
  12629. handleProfileUpdated(event) {
  12630. formatAppLog("log", "at pages/TUIKit/TUICore/server/profile/index.ts:51", event);
  12631. }
  12632. }
  12633. const _sfc_main$27 = vue.defineComponent({
  12634. name: "TUIChat",
  12635. components: {
  12636. MessageText,
  12637. MessageImage,
  12638. MessageVideo,
  12639. MessageAudio,
  12640. MessageFace,
  12641. MessageCustom,
  12642. MessageBubble,
  12643. MessageTip,
  12644. MessageRevoked,
  12645. MessageSystem,
  12646. TUIChatInput,
  12647. MessageOperate
  12648. },
  12649. setup(props2) {
  12650. const timStore2 = store.state.timStore;
  12651. uni.$TUIKit.TUIChatServer = new TUIChatServer();
  12652. const TUICallKit = vue.shallowRef(null);
  12653. const TUIServer = uni.$TUIKit.TUIChatServer;
  12654. const left = 0;
  12655. const right = 0;
  12656. const defaultDialogPosition = {
  12657. top: -70,
  12658. left,
  12659. right
  12660. };
  12661. const data = vue.reactive({
  12662. messageList: vue.computed(() => timStore2.messageList),
  12663. conversation: vue.computed(() => timStore2.conversation),
  12664. triggered: false,
  12665. scrollTop: 999,
  12666. text: "",
  12667. types: uni.$TIM.TYPES,
  12668. currentMessage: {},
  12669. dialogID: "",
  12670. forwardStatus: false,
  12671. imageFlag: false,
  12672. isCompleted: false,
  12673. oldMessageTime: 0,
  12674. dialogPosition: defaultDialogPosition,
  12675. imType: vue.computed(() => timStore2.imType),
  12676. orderId: vue.computed(() => timStore2.orderId)
  12677. });
  12678. const conversationType = vue.computed(() => {
  12679. const conversation = data.conversation;
  12680. if (!(conversation == null ? void 0 : conversation.conversationID)) {
  12681. return "";
  12682. }
  12683. if ((conversation == null ? void 0 : conversation.type) === uni.$TIM.TYPES.CONV_SYSTEM) {
  12684. return "system";
  12685. }
  12686. return "chat";
  12687. });
  12688. const messages2 = vue.computed(() => {
  12689. if (data.messageList.length > 0) {
  12690. data.oldMessageTime = data.messageList[0].time;
  12691. return data.messageList.filter((item) => {
  12692. return !item.isDeleted;
  12693. });
  12694. }
  12695. });
  12696. onLoad((options) => {
  12697. uni.setNavigationBarTitle({
  12698. title: options && options.conversationName
  12699. });
  12700. if (store.state.timStore.imType == 1)
  12701. ;
  12702. else if (store.state.timStore.imType == 2)
  12703. ;
  12704. });
  12705. onUnload(() => {
  12706. TUIServer.destroyed();
  12707. });
  12708. vue.watch(messages2, (newVal, oldVal) => {
  12709. vue.nextTick(() => {
  12710. const newLastMessage = newVal[newVal.length - 1];
  12711. const oldLastMessage = oldVal ? oldVal[oldVal.length - 1] : {};
  12712. data.oldMessageTime = messages2.value[0].time;
  12713. handleShowTime();
  12714. if (oldVal && newLastMessage.ID !== oldLastMessage.ID) {
  12715. handleScrollBottom();
  12716. }
  12717. });
  12718. });
  12719. onReady(() => {
  12720. const options = {
  12721. sdkAppID: uni.$chat_SDKAppID,
  12722. // 开通实时音视频服务创建应用后分配的 SDKAppID
  12723. userID: uni.$chat_userID,
  12724. // 用户 ID,可以由您的帐号系统指定
  12725. userSig: uni.$chat_userSig,
  12726. // 身份签名,相当于登录密码的作用
  12727. tim: uni.$TUIKit
  12728. // tim 参数适用于业务中已存在 TIM 实例,为保证 TIM 实例唯一性
  12729. };
  12730. uni.$TUICallKit = TUICallKit;
  12731. vue.nextTick(() => {
  12732. uni.$TUICallKit.value !== null && uni.$TUICallKit.value.init(options);
  12733. });
  12734. setTimeout(() => {
  12735. handleScrollBottom();
  12736. }, 500);
  12737. });
  12738. vue.onMounted(() => {
  12739. handleShowTime();
  12740. setTimeout(function() {
  12741. uni.$TUIKit.TUIConversationServer.setMessageRead(
  12742. data.conversation.conversationID
  12743. );
  12744. uni.$emit("refreshMsgCount");
  12745. }, 2e3);
  12746. });
  12747. onNavigationBarButtonTap(() => {
  12748. var _a;
  12749. if (((_a = data.conversation) == null ? void 0 : _a.type) === uni.$TIM.TYPES.CONV_GROUP) {
  12750. uni.navigateTo({
  12751. url: "../TUIGroup/index"
  12752. });
  12753. } else {
  12754. uni.showToast({
  12755. title: "暂无信息"
  12756. });
  12757. }
  12758. });
  12759. const handleGetProfile = () => {
  12760. uni.navigateTo({
  12761. url: "../TUIGroup/index"
  12762. });
  12763. };
  12764. const handleShowTime = () => {
  12765. if (messages2.value) {
  12766. Array.from(messages2.value).forEach((item) => {
  12767. if (item.time - data.oldMessageTime > 5 * 60) {
  12768. data.oldMessageTime = item.time;
  12769. item.showTime = true;
  12770. } else {
  12771. item.showTime = false;
  12772. }
  12773. });
  12774. }
  12775. };
  12776. const handleScrollBottom = () => {
  12777. uni.createSelectorQuery().select(".TUI-message-list").boundingClientRect((res) => {
  12778. const scrollH = res.height;
  12779. data.scrollTop = scrollH;
  12780. }).exec();
  12781. };
  12782. const handleCustomerItem = (event, item) => {
  12783. if (item.payload.data == "order") {
  12784. uni.navigateTo({
  12785. url: "/pages_order/inquiryOrderDetails?orderId=" + item.payload.description
  12786. });
  12787. } else if (item.payload.data == "prescribe") {
  12788. var prescribe = JSON.parse(item.payload.extension);
  12789. uni.navigateTo({
  12790. url: "/pages_order/prescribeDetails?prescribeId=" + prescribe.prescribeId
  12791. });
  12792. } else if (item.payload.data == "follow") {
  12793. var follow = JSON.parse(item.payload.extension);
  12794. formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/index.vue:365", follow);
  12795. if (follow.writeStatus == 0) {
  12796. uni.navigateTo({
  12797. url: "/pages_user/doFollow?followId=" + follow.followId
  12798. });
  12799. } else if (follow.writeStatus == 1) {
  12800. uni.navigateTo({
  12801. url: "/pages_user/followDetails?followId=" + follow.followId
  12802. });
  12803. }
  12804. } else if (item.payload.data == "report") {
  12805. uni.navigateTo({
  12806. url: "/pages_order/inquiryOrderReport?orderId=" + item.payload.description
  12807. });
  12808. } else if (item.payload.data == "drugReport") {
  12809. uni.navigateTo({
  12810. url: "/pages_user/drugReportDetails?reportId=" + item.payload.description
  12811. });
  12812. }
  12813. };
  12814. const handleScroll = (e) => {
  12815. data.triggered = "restore";
  12816. };
  12817. const handleRefresher = () => {
  12818. data.triggered = true;
  12819. if (!data.isCompleted) {
  12820. TUIServer.getHistoryMessageList().then((res) => {
  12821. data.triggered = false;
  12822. data.isCompleted = res.isCompleted;
  12823. });
  12824. }
  12825. setTimeout(() => {
  12826. data.triggered = false;
  12827. }, 500);
  12828. };
  12829. const handleSend = (emo) => {
  12830. data.text += emo.name;
  12831. };
  12832. const handleItem = (event, item) => {
  12833. const { flow } = item;
  12834. try {
  12835. const query = uni.createSelectorQuery();
  12836. query.select(`#${item.flow + "-" + item.ID}`).boundingClientRect((res) => {
  12837. var _a;
  12838. const { top } = res;
  12839. if (top < 60 + 20) {
  12840. data.dialogPosition = {
  12841. ...data.dialogPosition,
  12842. top: ((_a = res.height) == null ? void 0 : _a.res) + 10
  12843. // 在下面展示弹框 + 10px 间隔
  12844. };
  12845. data.dialogPosition = {
  12846. ...data.dialogPosition,
  12847. right: flow === "out" ? 0 : null,
  12848. // 发出去的消息(弹框 right 都是 0)
  12849. left: flow === "in" ? 0 : null
  12850. // 接收的消息(弹框 left 都是 0)
  12851. };
  12852. } else {
  12853. data.dialogPosition = {
  12854. ...defaultDialogPosition,
  12855. right: flow === "out" ? 0 : null,
  12856. // 发出去的消息(弹框 right 都是 0)
  12857. left: flow === "in" ? 0 : null
  12858. // 接收的消息(弹框 left 都是 0)
  12859. };
  12860. }
  12861. }).exec((res) => {
  12862. data.currentMessage = item;
  12863. data.dialogID = item.ID;
  12864. });
  12865. } catch (error2) {
  12866. data.currentMessage = item;
  12867. data.dialogID = item.ID;
  12868. }
  12869. };
  12870. const handleTouchStart = () => {
  12871. uni.hideKeyboard();
  12872. };
  12873. const handleEdit = (item) => {
  12874. data.text = item.payload.text;
  12875. };
  12876. return {
  12877. ...vue.toRefs(data),
  12878. TUICallKit,
  12879. conversationType,
  12880. messages: messages2,
  12881. handleShowTime,
  12882. handleTouchStart,
  12883. handleRefresher,
  12884. handleScroll,
  12885. handleScrollBottom,
  12886. handleCustomerItem,
  12887. handleItem,
  12888. handleEdit,
  12889. handleTextMessageShowContext,
  12890. handleImageMessageShowContext,
  12891. handleVideoMessageShowContext,
  12892. handleAudioMessageShowContext,
  12893. handleFileMessageShowContext,
  12894. handleFaceMessageShowContext,
  12895. handleLocationMessageShowContext,
  12896. handleMergerMessageShowContext,
  12897. handleTipMessageShowContext,
  12898. handleCustomMessageShowContext,
  12899. handleSend,
  12900. caculateTimeago,
  12901. handleGetProfile
  12902. };
  12903. }
  12904. });
  12905. function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) {
  12906. var _a;
  12907. const _component_MessageTip = vue.resolveComponent("MessageTip");
  12908. const _component_Message_Operate = vue.resolveComponent("Message-Operate");
  12909. const _component_MessageText = vue.resolveComponent("MessageText");
  12910. const _component_MessageImage = vue.resolveComponent("MessageImage");
  12911. const _component_MessageVideo = vue.resolveComponent("MessageVideo");
  12912. const _component_MessageAudio = vue.resolveComponent("MessageAudio");
  12913. const _component_MessageFace = vue.resolveComponent("MessageFace");
  12914. const _component_MessageCustom = vue.resolveComponent("MessageCustom");
  12915. const _component_MessageBubble = vue.resolveComponent("MessageBubble");
  12916. const _component_MessageRevoked = vue.resolveComponent("MessageRevoked");
  12917. const _component_TUIChatInput = vue.resolveComponent("TUIChatInput");
  12918. const _component_MessageSystem = vue.resolveComponent("MessageSystem");
  12919. return vue.openBlock(), vue.createElementBlock(
  12920. vue.Fragment,
  12921. null,
  12922. [
  12923. _ctx.conversationType === "chat" ? (vue.openBlock(), vue.createElementBlock("view", {
  12924. key: 0,
  12925. class: "TUIChat"
  12926. }, [
  12927. ((_a = _ctx.conversation) == null ? void 0 : _a.type) === "GROUP" ? (vue.openBlock(), vue.createElementBlock("view", {
  12928. key: 0,
  12929. class: "more-btn",
  12930. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleGetProfile && _ctx.handleGetProfile(...args))
  12931. }, " 更多")) : vue.createCommentVNode("v-if", true),
  12932. vue.createElementVNode("view", { class: "TUIChat-container" }, [
  12933. vue.createElementVNode("scroll-view", {
  12934. class: "TUIChat-main",
  12935. "scroll-y": "true",
  12936. "scroll-with-animation": true,
  12937. "refresher-triggered": _ctx.triggered,
  12938. "refresher-enabled": true,
  12939. onRefresherrefresh: _cache[3] || (_cache[3] = (...args) => _ctx.handleRefresher && _ctx.handleRefresher(...args)),
  12940. "scroll-top": _ctx.scrollTop
  12941. }, [
  12942. vue.createElementVNode(
  12943. "view",
  12944. {
  12945. class: "TUI-message-list",
  12946. onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchStart && _ctx.handleTouchStart(...args)),
  12947. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.dialogID = "")
  12948. },
  12949. [
  12950. _ctx.isCompleted ? (vue.openBlock(), vue.createElementBlock("view", {
  12951. key: 0,
  12952. class: "loading-text"
  12953. }, "没有更多")) : vue.createCommentVNode("v-if", true),
  12954. (vue.openBlock(true), vue.createElementBlock(
  12955. vue.Fragment,
  12956. null,
  12957. vue.renderList(_ctx.messages, (item, index2) => {
  12958. return vue.openBlock(), vue.createElementBlock("view", {
  12959. key: item.ID,
  12960. id: "view" + item.ID
  12961. }, [
  12962. item.showTime ? (vue.openBlock(), vue.createElementBlock(
  12963. "view",
  12964. {
  12965. key: 0,
  12966. class: "time-container"
  12967. },
  12968. vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)),
  12969. 1
  12970. /* TEXT */
  12971. )) : vue.createCommentVNode("v-if", true),
  12972. !item.isRevoked && item.type === _ctx.types.MSG_GRP_TIP ? (vue.openBlock(), vue.createBlock(_component_MessageTip, {
  12973. key: 1,
  12974. data: _ctx.handleTipMessageShowContext(item)
  12975. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  12976. vue.createCommentVNode(' <MessageTip v-if="item.type === types.MSG_GRP_SYS_NOTICE" /> '),
  12977. !item.isRevoked && item.type !== _ctx.types.MSG_GRP_TIP ? (vue.openBlock(), vue.createBlock(_component_MessageBubble, {
  12978. key: 2,
  12979. data: item
  12980. }, {
  12981. default: vue.withCtx(() => [
  12982. _ctx.dialogID === item.ID ? (vue.openBlock(), vue.createBlock(_component_Message_Operate, {
  12983. key: 0,
  12984. data: item,
  12985. class: "dialog dialog-item",
  12986. style: vue.normalizeStyle({
  12987. top: _ctx.dialogPosition.top + "px",
  12988. right: _ctx.dialogPosition.right + "px",
  12989. left: _ctx.dialogPosition.left + "px"
  12990. })
  12991. }, null, 8, ["data", "style"])) : vue.createCommentVNode("v-if", true),
  12992. item.type === _ctx.types.MSG_TEXT ? (vue.openBlock(), vue.createBlock(_component_MessageText, {
  12993. key: 1,
  12994. id: item.flow + "-" + item.ID,
  12995. data: _ctx.handleTextMessageShowContext(item),
  12996. messageData: item,
  12997. onLongpress: ($event) => _ctx.handleItem($event, item)
  12998. }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
  12999. item.type === _ctx.types.MSG_IMAGE ? (vue.openBlock(), vue.createBlock(_component_MessageImage, {
  13000. key: 2,
  13001. id: item.flow + "-" + item.ID,
  13002. data: _ctx.handleImageMessageShowContext(item),
  13003. messageData: item,
  13004. onLongpress: ($event) => _ctx.handleItem($event, item)
  13005. }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
  13006. item.type === _ctx.types.MSG_VIDEO ? (vue.openBlock(), vue.createBlock(_component_MessageVideo, {
  13007. key: 3,
  13008. id: item.flow + "-" + item.ID,
  13009. data: _ctx.handleVideoMessageShowContext(item),
  13010. messageData: item,
  13011. onLongpress: ($event) => _ctx.handleItem($event, item)
  13012. }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
  13013. item.type === _ctx.types.MSG_AUDIO ? (vue.openBlock(), vue.createBlock(_component_MessageAudio, {
  13014. key: 4,
  13015. id: item.flow + "-" + item.ID,
  13016. data: _ctx.handleAudioMessageShowContext(item),
  13017. messageData: item,
  13018. onLongpress: ($event) => _ctx.handleItem($event, item)
  13019. }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
  13020. item.type === _ctx.types.MSG_FACE ? (vue.openBlock(), vue.createBlock(_component_MessageFace, {
  13021. key: 5,
  13022. id: item.flow + "-" + item.ID,
  13023. data: _ctx.handleFaceMessageShowContext(item),
  13024. messageData: item,
  13025. onLongpress: ($event) => _ctx.handleItem($event, item)
  13026. }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
  13027. item.type === _ctx.types.MSG_CUSTOM ? (vue.openBlock(), vue.createBlock(_component_MessageCustom, {
  13028. key: 6,
  13029. id: item.flow + "-" + item.ID,
  13030. data: _ctx.handleCustomMessageShowContext(item),
  13031. messageData: item,
  13032. onClick: ($event) => _ctx.handleCustomerItem($event, item),
  13033. onLongpress: ($event) => _ctx.handleItem($event, item)
  13034. }, null, 8, ["id", "data", "messageData", "onClick", "onLongpress"])) : vue.createCommentVNode("v-if", true)
  13035. ]),
  13036. _: 2
  13037. /* DYNAMIC */
  13038. }, 1032, ["data"])) : vue.createCommentVNode("v-if", true),
  13039. item.isRevoked ? (vue.openBlock(), vue.createBlock(_component_MessageRevoked, {
  13040. key: 3,
  13041. data: item,
  13042. onEdit: ($event) => _ctx.handleEdit(item)
  13043. }, null, 8, ["data", "onEdit"])) : vue.createCommentVNode("v-if", true)
  13044. ], 8, ["id"]);
  13045. }),
  13046. 128
  13047. /* KEYED_FRAGMENT */
  13048. ))
  13049. ],
  13050. 32
  13051. /* NEED_HYDRATION */
  13052. )
  13053. ], 40, ["refresher-triggered", "scroll-top"])
  13054. ]),
  13055. _ctx.imType == 1 || _ctx.imType == 2 ? (vue.openBlock(), vue.createBlock(_component_TUIChatInput, {
  13056. key: 1,
  13057. text: _ctx.text,
  13058. conversationData: _ctx.conversation
  13059. }, null, 8, ["text", "conversationData"])) : vue.createCommentVNode("v-if", true)
  13060. ])) : vue.createCommentVNode("v-if", true),
  13061. _ctx.conversationType === "system" ? (vue.openBlock(), vue.createElementBlock("view", {
  13062. key: 1,
  13063. class: "TUIChat"
  13064. }, [
  13065. vue.createVNode(_component_MessageSystem, {
  13066. data: _ctx.messages,
  13067. types: _ctx.types
  13068. }, null, 8, ["data", "types"])
  13069. ])) : vue.createCommentVNode("v-if", true)
  13070. ],
  13071. 64
  13072. /* STABLE_FRAGMENT */
  13073. );
  13074. }
  13075. const PagesTUIKitTUIPagesTUIChatIndex = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-1902a304"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/index.vue"]]);
  13076. const _sfc_main$26 = vue.defineComponent({
  13077. name: "videoPlay",
  13078. setup(props2) {
  13079. const data = vue.reactive({
  13080. videoData: "",
  13081. show: false,
  13082. videoContext: null,
  13083. direction: 0
  13084. });
  13085. onLoad((option) => {
  13086. data.videoData = option && option.videoMessage;
  13087. data.show = true;
  13088. });
  13089. onReady(() => {
  13090. data.videoContext = uni.createVideoContext("videoEle");
  13091. });
  13092. const toggleClose = () => {
  13093. data.show = false;
  13094. uni.navigateBack({
  13095. delta: 1
  13096. });
  13097. };
  13098. return {
  13099. ...vue.toRefs(data),
  13100. toggleClose
  13101. };
  13102. }
  13103. });
  13104. function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) {
  13105. return vue.openBlock(), vue.createElementBlock("view", { class: "dialog-video" }, [
  13106. _ctx.show ? (vue.openBlock(), vue.createElementBlock("video", {
  13107. key: 0,
  13108. class: "video-box",
  13109. src: _ctx.videoData,
  13110. id: "videoEle",
  13111. controls: "",
  13112. autoplay: ""
  13113. }, [
  13114. vue.createCommentVNode(' <cover-view class="video-close">\n <cover-image class="video-icon" @tap="toggleClose" src="/pages/TUIKit/assets/icon/close.svg"></cover-image>\n <cover-image class="video-icon" src="/pages/TUIKit/assets/icon/save.svg"></cover-image>\n </cover-view> ')
  13115. ], 8, ["src"])) : vue.createCommentVNode("v-if", true)
  13116. ]);
  13117. }
  13118. const PagesTUIKitTUIPagesTUIChatComponentsMessageElementsVideoPlay = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-b57b47b7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/TUIKit/TUIPages/TUIChat/components/message-elements/video-play.vue"]]);
  13119. let request$e = new Request$1().http;
  13120. function getTestList(data) {
  13121. return request$e("/app/test/getTestList", data, "GET");
  13122. }
  13123. function getTestDetails(data) {
  13124. return request$e("/app/test/getTestDetails", data, "GET");
  13125. }
  13126. function getTestTempDetails(data) {
  13127. return request$e("/app/test/getTestTempDetails", data, "GET");
  13128. }
  13129. function getTestReport(data) {
  13130. return request$e("/app/test/getTestReport", data, "GET");
  13131. }
  13132. function getTestReportImg(data) {
  13133. return request$e("/app/test/getTestReportImg", data, "GET");
  13134. }
  13135. function doReport(data) {
  13136. return request$e("/app/test/doReport", data, "POST", "application/json;charset=UTF-8");
  13137. }
  13138. const _sfc_main$25 = {
  13139. mixins: [MescrollMixin],
  13140. data() {
  13141. return {
  13142. mescroll: null,
  13143. downOption: {
  13144. //下拉刷新
  13145. use: true,
  13146. auto: false
  13147. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  13148. },
  13149. upOption: {
  13150. onScroll: false,
  13151. use: true,
  13152. // 是否启用上拉加载; 默认true
  13153. page: {
  13154. pae: 0,
  13155. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  13156. size: 10
  13157. // 每页数据的数量,默认10
  13158. },
  13159. noMoreSize: 10,
  13160. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  13161. textNoMore: "已经到底了",
  13162. empty: {
  13163. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  13164. tip: "暂无数据"
  13165. }
  13166. },
  13167. dataList: []
  13168. };
  13169. },
  13170. onShow() {
  13171. },
  13172. //发送给朋友
  13173. onShareAppMessage(res) {
  13174. if (this.$isLogin()) {
  13175. return {
  13176. title: "健康自测",
  13177. path: "/pages_index/testList",
  13178. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  13179. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  13180. };
  13181. }
  13182. },
  13183. //分享到朋友圈
  13184. onShareTimeline(res) {
  13185. if (this.utils.isLogin()) {
  13186. return {
  13187. title: "健康自测",
  13188. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  13189. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  13190. };
  13191. }
  13192. },
  13193. methods: {
  13194. mescrollInit(mescroll) {
  13195. this.mescroll = mescroll;
  13196. },
  13197. /*下拉刷新的回调 */
  13198. downCallback(mescroll) {
  13199. mescroll.resetUpScroll();
  13200. },
  13201. upCallback(page2) {
  13202. var that = this;
  13203. var data = {
  13204. pageNum: page2.num,
  13205. pageSize: page2.size
  13206. };
  13207. getTestList(data).then((res) => {
  13208. if (res.code == 200) {
  13209. if (page2.num == 1) {
  13210. that.dataList = res.data.list;
  13211. } else {
  13212. that.dataList = that.dataList.concat(res.data.list);
  13213. }
  13214. that.mescroll.endBySize(res.data.list.length, res.data.total);
  13215. } else {
  13216. uni.showToast({
  13217. icon: "none",
  13218. title: "请求失败"
  13219. });
  13220. that.dataList = null;
  13221. that.mescroll.endErr();
  13222. }
  13223. });
  13224. },
  13225. // 查看详情
  13226. showDetail(item) {
  13227. uni.navigateTo({
  13228. url: "/pages_index/testDetails?tempId=" + item.tempId
  13229. });
  13230. }
  13231. }
  13232. };
  13233. function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
  13234. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  13235. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  13236. vue.createElementVNode("view", { class: "bg" }, [
  13237. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/8e52ab17eabc4534b3ce56026fd5c624.jpg" })
  13238. ]),
  13239. vue.createVNode(_component_mescroll_body, {
  13240. top: "0rpx",
  13241. ref: "mescrollRef",
  13242. onInit: $options.mescrollInit,
  13243. onDown: $options.downCallback,
  13244. onUp: $options.upCallback,
  13245. down: $data.downOption,
  13246. up: $data.upOption
  13247. }, {
  13248. default: vue.withCtx(() => [
  13249. vue.createElementVNode("view", { class: "test-list" }, [
  13250. (vue.openBlock(true), vue.createElementBlock(
  13251. vue.Fragment,
  13252. null,
  13253. vue.renderList($data.dataList, (item, index2) => {
  13254. return vue.openBlock(), vue.createElementBlock("view", {
  13255. class: "item",
  13256. key: index2,
  13257. onClick: ($event) => $options.showDetail(item)
  13258. }, [
  13259. vue.createElementVNode("view", { class: "left" }, [
  13260. vue.createElementVNode(
  13261. "view",
  13262. { class: "title ellipsis2" },
  13263. vue.toDisplayString(item.name),
  13264. 1
  13265. /* TEXT */
  13266. ),
  13267. vue.createElementVNode(
  13268. "view",
  13269. { class: "subtitle ellipsis2" },
  13270. vue.toDisplayString(item.title),
  13271. 1
  13272. /* TEXT */
  13273. ),
  13274. vue.createElementVNode("view", { class: "info-box" }, [
  13275. vue.createElementVNode("view", { class: "people-num" }, [
  13276. vue.createElementVNode(
  13277. "text",
  13278. { class: "num" },
  13279. vue.toDisplayString(item.peopleNum) + "W",
  13280. 1
  13281. /* TEXT */
  13282. ),
  13283. vue.createTextVNode("人测过")
  13284. ]),
  13285. vue.createElementVNode(
  13286. "view",
  13287. { class: "time" },
  13288. vue.toDisplayString(item.num) + "题 | " + vue.toDisplayString(item.time) + "分钟",
  13289. 1
  13290. /* TEXT */
  13291. )
  13292. ])
  13293. ]),
  13294. vue.createElementVNode("view", { class: "right" }, [
  13295. vue.createElementVNode("image", {
  13296. src: item.img,
  13297. mode: "aspectFill"
  13298. }, null, 8, ["src"])
  13299. ])
  13300. ], 8, ["onClick"]);
  13301. }),
  13302. 128
  13303. /* KEYED_FRAGMENT */
  13304. ))
  13305. ])
  13306. ]),
  13307. _: 1
  13308. /* STABLE */
  13309. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  13310. ]);
  13311. }
  13312. const Pages_indexTestList = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testList.vue"]]);
  13313. const _sfc_main$24 = {
  13314. data() {
  13315. return {
  13316. tempId: null,
  13317. item: {}
  13318. };
  13319. },
  13320. onLoad(option) {
  13321. this.tempId = option.tempId;
  13322. },
  13323. onShow() {
  13324. this.getTestDetails();
  13325. },
  13326. //发送给朋友
  13327. onShareAppMessage(res) {
  13328. if (this.$isLogin()) {
  13329. return {
  13330. title: "健康自测",
  13331. path: "/pages_index/testDetails?tempId=" + this.tempId,
  13332. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  13333. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  13334. };
  13335. }
  13336. },
  13337. //分享到朋友圈
  13338. onShareTimeline(res) {
  13339. if (this.utils.isLogin()) {
  13340. return {
  13341. title: "健康自测",
  13342. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  13343. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  13344. };
  13345. }
  13346. },
  13347. methods: {
  13348. navTo(url2) {
  13349. this.$isLogin().then(
  13350. (res) => {
  13351. formatAppLog("log", "at pages_index/testDetails.vue:71", res);
  13352. if (res) {
  13353. uni.navigateTo({
  13354. url: url2
  13355. });
  13356. } else {
  13357. uni.navigateTo({
  13358. url: "/pages/auth/login"
  13359. });
  13360. }
  13361. }
  13362. );
  13363. },
  13364. getTestDetails() {
  13365. let data = { tempId: this.tempId };
  13366. getTestDetails(data).then(
  13367. (res) => {
  13368. if (res.code == 200) {
  13369. this.item = res.data;
  13370. uni.setNavigationBarTitle({
  13371. title: this.item.name + "自测"
  13372. });
  13373. } else {
  13374. uni.showToast({
  13375. icon: "none",
  13376. title: "请求失败"
  13377. });
  13378. }
  13379. },
  13380. (rej) => {
  13381. }
  13382. );
  13383. }
  13384. }
  13385. };
  13386. function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
  13387. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  13388. vue.createElementVNode("view", { class: "bg-box" }, [
  13389. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/71014b69fdcc4b56ae2a84bdc28f11c3.png" }),
  13390. vue.createElementVNode("view", { class: "title-box" }, [
  13391. vue.createElementVNode(
  13392. "view",
  13393. { class: "title" },
  13394. vue.toDisplayString($data.item.name),
  13395. 1
  13396. /* TEXT */
  13397. )
  13398. ])
  13399. ]),
  13400. vue.createElementVNode("view", { class: "cont" }, [
  13401. vue.createElementVNode("view", { class: "msg-box" }, [
  13402. vue.createElementVNode(
  13403. "view",
  13404. { class: "msg" },
  13405. vue.toDisplayString($data.item.msg),
  13406. 1
  13407. /* TEXT */
  13408. )
  13409. ]),
  13410. vue.createElementVNode("view", { class: "line" }),
  13411. vue.createElementVNode("view", { class: "desc-box" }, [
  13412. vue.createElementVNode("view", {
  13413. class: "desc",
  13414. innerHTML: $data.item.descs
  13415. }, null, 8, ["innerHTML"])
  13416. ]),
  13417. vue.createElementVNode("view", { class: "btn-box" }, [
  13418. vue.createElementVNode("view", {
  13419. class: "btn",
  13420. onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_index/test?tempId=" + $data.item.tempId))
  13421. }, "立即开始测试")
  13422. ]),
  13423. vue.createElementVNode("view", { class: "logo" }, [
  13424. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b95950e4208c493d8b74ce0de220c65c.png" })
  13425. ])
  13426. ])
  13427. ]);
  13428. }
  13429. const Pages_indexTestDetails = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testDetails.vue"]]);
  13430. const _sfc_main$23 = {
  13431. data() {
  13432. return {
  13433. scrollTop: 0,
  13434. //滚动条位置
  13435. formJson: null,
  13436. tempId: null,
  13437. patient: null,
  13438. items: {},
  13439. msgs: [],
  13440. index: 0,
  13441. item: null
  13442. };
  13443. },
  13444. onLoad(option) {
  13445. this.tempId = option.tempId;
  13446. var that = this;
  13447. uni.$on("refreshOrderPatient", (res) => {
  13448. that.patient = res;
  13449. });
  13450. },
  13451. onShow() {
  13452. this.getTestTempDetails();
  13453. this.getTestDetails();
  13454. },
  13455. //发送给朋友
  13456. onShareAppMessage(res) {
  13457. if (this.$isLogin()) {
  13458. return {
  13459. title: "健康体质检测",
  13460. path: "/pages_index/test?tempId=" + this.tempId,
  13461. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  13462. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  13463. };
  13464. }
  13465. },
  13466. //分享到朋友圈
  13467. onShareTimeline(res) {
  13468. if (this.utils.isLogin()) {
  13469. return {
  13470. title: "健康体质检测",
  13471. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  13472. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  13473. };
  13474. }
  13475. },
  13476. methods: {
  13477. getTestDetails() {
  13478. let data = { tempId: this.tempId };
  13479. getTestDetails(data).then(
  13480. (res) => {
  13481. if (res.code == 200) {
  13482. uni.setNavigationBarTitle({
  13483. title: res.data.name + "自测"
  13484. });
  13485. } else {
  13486. uni.showToast({
  13487. icon: "none",
  13488. title: "请求失败"
  13489. });
  13490. }
  13491. },
  13492. (rej) => {
  13493. }
  13494. );
  13495. },
  13496. addMsg(type2, content) {
  13497. var msg = { type: type2, content };
  13498. this.msgs.push(msg);
  13499. var that = this;
  13500. uni.createSelectorQuery().select(".msgs").boundingClientRect((res) => {
  13501. const scrollH = res.height;
  13502. that.scrollTop = scrollH;
  13503. formatAppLog("log", "at pages_index/test.vue:185", that.scrollTop);
  13504. }).exec();
  13505. },
  13506. optionClick(item, option) {
  13507. if (this.patient == null) {
  13508. uni.showToast({
  13509. icon: "none",
  13510. title: "请选择体验者"
  13511. });
  13512. return;
  13513. }
  13514. item.option = option.name;
  13515. formatAppLog("log", "at pages_index/test.vue:201", item.option);
  13516. this.addMsg(2, option.name);
  13517. this.index++;
  13518. if (this.index <= this.items.length - 1) {
  13519. this.item = this.items[this.index];
  13520. this.addMsg(1, this.item.title);
  13521. } else {
  13522. this.submit();
  13523. }
  13524. },
  13525. getTestTempDetails() {
  13526. var data = { tempId: this.tempId };
  13527. getTestTempDetails(data).then(
  13528. (res) => {
  13529. if (res.code == 200) {
  13530. this.items = res.items;
  13531. if (this.items.length > 0) {
  13532. this.item = this.items[0];
  13533. this.addMsg(1, this.item.title);
  13534. }
  13535. }
  13536. },
  13537. (err) => {
  13538. }
  13539. );
  13540. },
  13541. addPatient() {
  13542. uni.navigateTo({
  13543. url: "/pages_user/patient"
  13544. });
  13545. },
  13546. submit() {
  13547. var data = {
  13548. tempId: this.tempId,
  13549. patientId: this.patient.patientId,
  13550. formJson: JSON.stringify(this.items)
  13551. };
  13552. doReport(data).then((res) => {
  13553. if (res.code == 200) {
  13554. uni.redirectTo({
  13555. url: "/pages_index/testResult?reportId=" + res.reportId
  13556. });
  13557. } else {
  13558. uni.showToast({
  13559. icon: "none",
  13560. title: res.msg
  13561. });
  13562. }
  13563. });
  13564. }
  13565. }
  13566. };
  13567. function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
  13568. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  13569. vue.createElementVNode("view", { class: "patient-cont" }, [
  13570. vue.createElementVNode("view", { class: "chose-patient" }, [
  13571. $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
  13572. key: 0,
  13573. class: "patient-box",
  13574. onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
  13575. }, [
  13576. vue.createElementVNode("text", { class: "patient-title" }, "选择体验者"),
  13577. vue.createElementVNode("view", { class: "right" }, [
  13578. vue.createElementVNode("text", { class: "value" }, "请点击添加"),
  13579. vue.createElementVNode("image", {
  13580. src: "/static/images/arrow_gray.png",
  13581. mode: ""
  13582. })
  13583. ])
  13584. ])) : vue.createCommentVNode("v-if", true),
  13585. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  13586. key: 1,
  13587. class: "patient",
  13588. onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
  13589. }, [
  13590. vue.createElementVNode("view", { class: "left" }, [
  13591. vue.createElementVNode(
  13592. "view",
  13593. { class: "name" },
  13594. vue.toDisplayString($data.patient.patientName),
  13595. 1
  13596. /* TEXT */
  13597. ),
  13598. vue.createElementVNode("view", { class: "info" }, [
  13599. $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  13600. key: 0,
  13601. class: "text"
  13602. }, "男")) : vue.createCommentVNode("v-if", true),
  13603. $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  13604. key: 1,
  13605. class: "text"
  13606. }, "女")) : vue.createCommentVNode("v-if", true),
  13607. vue.createElementVNode(
  13608. "text",
  13609. { class: "text" },
  13610. vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
  13611. 1
  13612. /* TEXT */
  13613. ),
  13614. vue.createElementVNode(
  13615. "text",
  13616. { class: "text" },
  13617. vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
  13618. 1
  13619. /* TEXT */
  13620. )
  13621. ])
  13622. ]),
  13623. vue.createElementVNode("view", { class: "right" }, [
  13624. vue.createElementVNode("image", {
  13625. src: "/static/images/arrow_gray.png",
  13626. mode: ""
  13627. })
  13628. ])
  13629. ])) : vue.createCommentVNode("v-if", true)
  13630. ])
  13631. ]),
  13632. vue.createElementVNode("view", { class: "msg-cont" }, [
  13633. vue.createElementVNode("scroll-view", {
  13634. class: "msg-scroll",
  13635. "scroll-top": $data.scrollTop,
  13636. "scroll-y": "true",
  13637. "scroll-with-animation": true
  13638. }, [
  13639. vue.createElementVNode("view", { class: "msgs" }, [
  13640. (vue.openBlock(true), vue.createElementBlock(
  13641. vue.Fragment,
  13642. null,
  13643. vue.renderList($data.msgs, (item, index2) => {
  13644. return vue.openBlock(), vue.createElementBlock("view", { class: "msg-item" }, [
  13645. item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13646. key: 0,
  13647. class: "left"
  13648. }, [
  13649. vue.createElementVNode("image", {
  13650. class: "img",
  13651. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5fd36547a3ca4d0b9935e623d3d8e1c5.png"
  13652. }),
  13653. vue.createElementVNode(
  13654. "view",
  13655. { class: "msg-content" },
  13656. vue.toDisplayString(item.content),
  13657. 1
  13658. /* TEXT */
  13659. )
  13660. ])) : vue.createCommentVNode("v-if", true),
  13661. item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  13662. key: 1,
  13663. class: "right"
  13664. }, [
  13665. vue.createElementVNode(
  13666. "view",
  13667. { class: "msg-content" },
  13668. vue.toDisplayString(item.content),
  13669. 1
  13670. /* TEXT */
  13671. ),
  13672. vue.createElementVNode("image", {
  13673. class: "img",
  13674. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d7d49263e2e04f56a7a86fa7bfd35687.jpg"
  13675. })
  13676. ])) : vue.createCommentVNode("v-if", true)
  13677. ]);
  13678. }),
  13679. 256
  13680. /* UNKEYED_FRAGMENT */
  13681. ))
  13682. ])
  13683. ], 8, ["scroll-top"])
  13684. ]),
  13685. $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  13686. key: 0,
  13687. class: "option-cont"
  13688. }, [
  13689. vue.createElementVNode(
  13690. "view",
  13691. { class: "option-title" },
  13692. vue.toDisplayString($data.item.title),
  13693. 1
  13694. /* TEXT */
  13695. ),
  13696. vue.createElementVNode("view", { class: "options" }, [
  13697. (vue.openBlock(true), vue.createElementBlock(
  13698. vue.Fragment,
  13699. null,
  13700. vue.renderList(JSON.parse($data.item.scoreJson), (option) => {
  13701. return vue.openBlock(), vue.createElementBlock("view", {
  13702. class: "option-item",
  13703. onClick: ($event) => $options.optionClick($data.item, option)
  13704. }, vue.toDisplayString(option.name), 9, ["onClick"]);
  13705. }),
  13706. 256
  13707. /* UNKEYED_FRAGMENT */
  13708. ))
  13709. ])
  13710. ])) : vue.createCommentVNode("v-if", true),
  13711. vue.createCommentVNode(` <view class="title">\r
  13712. 体质测试以当下感受为准作答,人的体质有可能会随季节变化。 \r
  13713. </view>\r
  13714. <view class="chose-patient">\r
  13715. <view class="patient-box" @click="addPatient()" v-if="patient==null">\r
  13716. <text class="patient-title">选择体验者</text>\r
  13717. <view class="right" >\r
  13718. <image src="/static/images/arrow_gray.png" mode=""></image>\r
  13719. </view>\r
  13720. </view>\r
  13721. <view class="patient" @click="addPatient()" v-if="patient!=null">\r
  13722. <view class="left">\r
  13723. <view class="name">{{patient.patientName}}</view>\r
  13724. <view class="info">\r
  13725. <text class="text" v-if="patient.sex==1">男</text>\r
  13726. <text class="text" v-if="patient.sex==2">女</text>\r
  13727. <text class="text">{{$getAge(patient.birthday)}}岁</text>\r
  13728. <text class="text">{{$parseIdCard(patient.idCard)}}</text>\r
  13729. </view>\r
  13730. </view>\r
  13731. <view class="right" >\r
  13732. <image src="/static/images/arrow_gray.png" mode=""></image>\r
  13733. </view>\r
  13734. </view>\r
  13735. </view>\r
  13736. <view class="items">\r
  13737. <view class="item" v-for="(item,index) in items">\r
  13738. <view class="name">{{index+1}}{{item.title}}?</view>\r
  13739. <view class="options">\r
  13740. <view :class="item.option!=null&&item.option==option.name?'option active':'option'" @click="optionClick(item,option)" v-for="(option) in JSON.parse(item.scoreJson)">\r
  13741. {{option.name}}\r
  13742. </view>\r
  13743. </view>\r
  13744. </view>\r
  13745. \r
  13746. </view>\r
  13747. <view class="btns">\r
  13748. <view class="btn" @click="submit()">提交</view>\r
  13749. </view>\r
  13750. <view class="tips">\r
  13751. <view class="tip-title">提交代表你已接受以下声明</view>\r
  13752. <view class="desc">\r
  13753. 本测试不作为诊断和治疗的依据,对于已经医生确诊的疾病,应按照医嘱积极治疗。所提及的内容仅作为生活保健的咨询建议。如遇不适请及时就医。\r
  13754. </view>\r
  13755. </view> `)
  13756. ]);
  13757. }
  13758. const Pages_indexTest = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/test.vue"]]);
  13759. const _sfc_main$22 = {
  13760. data() {
  13761. return {
  13762. advImgs: [],
  13763. advs: [],
  13764. reportId: null,
  13765. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  13766. report: null
  13767. };
  13768. },
  13769. onLoad(option) {
  13770. this.reportId = option.reportId;
  13771. this.getTestReport();
  13772. },
  13773. onShow() {
  13774. this.getAdvList();
  13775. },
  13776. methods: {
  13777. shareImg() {
  13778. var data = { reportId: this.reportId };
  13779. getTestReportImg(data).then(
  13780. (res) => {
  13781. if (res.code == 200) {
  13782. formatAppLog("log", "at pages_index/testResult.vue:80", res);
  13783. wx.downloadFile({
  13784. url: res.img,
  13785. success: (res1) => {
  13786. formatAppLog("log", "at pages_index/testResult.vue:84", res1);
  13787. wx.showShareImageMenu({
  13788. path: res1.tempFilePath
  13789. });
  13790. },
  13791. fail: (res2) => {
  13792. formatAppLog("log", "at pages_index/testResult.vue:90", res2);
  13793. }
  13794. });
  13795. }
  13796. },
  13797. (err) => {
  13798. }
  13799. );
  13800. },
  13801. handleAdvClick(index2) {
  13802. var ad = this.advs[index2];
  13803. formatAppLog("log", "at pages_index/testResult.vue:105", ad.advUrl);
  13804. if (ad.showType == 1) {
  13805. uni.setStorageSync("url", ad.advUrl);
  13806. uni.navigateTo({
  13807. url: "h5"
  13808. });
  13809. } else if (ad.showType == 2) {
  13810. uni.navigateTo({
  13811. url: ad.advUrl
  13812. });
  13813. } else if (ad.showType == 3) {
  13814. uni.setStorageSync("content", ad.content);
  13815. uni.navigateTo({
  13816. url: "content"
  13817. });
  13818. }
  13819. },
  13820. getAdvList() {
  13821. var that = this;
  13822. var data = {
  13823. advType: 3
  13824. };
  13825. getAdvList(data).then((res) => {
  13826. if (res.code == 200) {
  13827. that.advImgs = [];
  13828. that.advs = res.data;
  13829. that.advs.forEach(function(element) {
  13830. if (element.imageUrl != null && element.imageUrl != "") {
  13831. that.advImgs.push(element.imageUrl);
  13832. }
  13833. });
  13834. formatAppLog("log", "at pages_index/testResult.vue:140", that.advImgs);
  13835. } else {
  13836. uni.showToast({
  13837. icon: "none",
  13838. title: "请求失败"
  13839. });
  13840. }
  13841. });
  13842. },
  13843. getTestReport() {
  13844. var data = { reportId: this.reportId };
  13845. getTestReport(data).then(
  13846. (res) => {
  13847. if (res.code == 200) {
  13848. this.report = res.report;
  13849. }
  13850. },
  13851. (err) => {
  13852. }
  13853. );
  13854. },
  13855. goBack() {
  13856. uni.navigateBack();
  13857. }
  13858. }
  13859. };
  13860. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  13861. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  13862. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  13863. vue.createElementVNode("view", { class: "cont" }, [
  13864. vue.createElementVNode("view", { class: "bg" }, [
  13865. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/8e52ab17eabc4534b3ce56026fd5c624.jpg" })
  13866. ]),
  13867. $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", {
  13868. key: 0,
  13869. class: "cont-box"
  13870. }, [
  13871. vue.createElementVNode("view", { class: "user" }, [
  13872. vue.createElementVNode("image", {
  13873. src: JSON.parse($data.report.patientJson).avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : JSON.parse($data.report.patientJson).avatar
  13874. }, null, 8, ["src"]),
  13875. vue.createElementVNode("view", { class: "user-box" }, [
  13876. vue.createElementVNode(
  13877. "view",
  13878. { class: "sex" },
  13879. "性别 " + vue.toDisplayString(JSON.parse($data.report.patientJson).sex == 1 ? "男" : "女"),
  13880. 1
  13881. /* TEXT */
  13882. ),
  13883. vue.createElementVNode(
  13884. "view",
  13885. { class: "username" },
  13886. "年龄 " + vue.toDisplayString(JSON.parse($data.report.patientJson).age) + "岁",
  13887. 1
  13888. /* TEXT */
  13889. )
  13890. ])
  13891. ]),
  13892. vue.createElementVNode("view", { class: "items" }, [
  13893. vue.createElementVNode("view", { class: "result-box" }, [
  13894. vue.createElementVNode(
  13895. "view",
  13896. { class: "time" },
  13897. "检测时间 " + vue.toDisplayString($data.report.createTime),
  13898. 1
  13899. /* TEXT */
  13900. ),
  13901. vue.createElementVNode(
  13902. "view",
  13903. { class: "title" },
  13904. "您属于" + vue.toDisplayString($data.report.testResult),
  13905. 1
  13906. /* TEXT */
  13907. ),
  13908. vue.createElementVNode(
  13909. "view",
  13910. { class: "name" },
  13911. vue.toDisplayString($data.report.testResult),
  13912. 1
  13913. /* TEXT */
  13914. ),
  13915. vue.createCommentVNode(' <view class="descs">{{report.testResult}}是一种身心和谐的表现,努力保持吧!</view> ')
  13916. ]),
  13917. (vue.openBlock(true), vue.createElementBlock(
  13918. vue.Fragment,
  13919. null,
  13920. vue.renderList(JSON.parse($data.report.conditioningPlanJson), (item, index2) => {
  13921. return vue.openBlock(), vue.createElementBlock("view", { class: "item-box" }, [
  13922. vue.createElementVNode("view", { class: "item" }, [
  13923. vue.createElementVNode("view", { class: "title-box" }, [
  13924. vue.createElementVNode(
  13925. "view",
  13926. { class: "title" },
  13927. vue.toDisplayString(item.name),
  13928. 1
  13929. /* TEXT */
  13930. )
  13931. ]),
  13932. vue.createElementVNode(
  13933. "view",
  13934. { class: "descs" },
  13935. vue.toDisplayString(item.value.replace(/\\n/g, "<br>")),
  13936. 1
  13937. /* TEXT */
  13938. )
  13939. ]),
  13940. index2 < JSON.parse($data.report.conditioningPlanJson).length - 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  13941. key: 0,
  13942. class: "line"
  13943. })) : vue.createCommentVNode("v-if", true)
  13944. ]);
  13945. }),
  13946. 256
  13947. /* UNKEYED_FRAGMENT */
  13948. ))
  13949. ]),
  13950. vue.createElementVNode("view", { class: "tips" }, " 注:报告内容仅供参考,具体情况以医生建议为准 "),
  13951. $data.advImgs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  13952. key: 0,
  13953. class: "banner"
  13954. }, [
  13955. vue.createVNode(_component_u_swiper, {
  13956. list: $data.advImgs,
  13957. circular: "",
  13958. onClick: $options.handleAdvClick
  13959. }, null, 8, ["list", "onClick"])
  13960. ])) : vue.createCommentVNode("v-if", true)
  13961. ])) : vue.createCommentVNode("v-if", true)
  13962. ]),
  13963. vue.createElementVNode("view", {
  13964. class: "share",
  13965. onClick: _cache[0] || (_cache[0] = ($event) => $options.shareImg())
  13966. }, [
  13967. vue.createElementVNode("text", null, "分享")
  13968. ])
  13969. ]);
  13970. }
  13971. const Pages_indexTestResult = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testResult.vue"]]);
  13972. const _sfc_main$21 = {
  13973. name: "Poster",
  13974. components: {},
  13975. props: {},
  13976. data: function() {
  13977. return {
  13978. url: null
  13979. };
  13980. },
  13981. mounted: function() {
  13982. this.getTestReportImg();
  13983. },
  13984. methods: {
  13985. shareImg: function() {
  13986. wx.downloadFile({
  13987. url: this.url,
  13988. success: (res) => {
  13989. wx.showShareImageMenu({
  13990. path: res.tempFilePath
  13991. });
  13992. }
  13993. });
  13994. },
  13995. getTestReportImg: function() {
  13996. let that = this;
  13997. var data = {
  13998. reportId: this.reportId
  13999. };
  14000. getTestReportImg(data).then(
  14001. (res) => {
  14002. that.url = res.url;
  14003. },
  14004. (err) => {
  14005. uni.showToast({
  14006. title: err.msg,
  14007. icon: "none",
  14008. duration: 2e3
  14009. });
  14010. }
  14011. );
  14012. },
  14013. downloadIamge(imgsrc, name) {
  14014. var that = this;
  14015. this.isDown = true;
  14016. var downloadUrl = imgsrc;
  14017. that.downloadFile(downloadUrl);
  14018. },
  14019. saveImg: function() {
  14020. this.downloadIamge(this.url, "poster");
  14021. },
  14022. downloadFile(url2) {
  14023. formatAppLog("log", "at pages_index/testResultImg.vue:106", url2);
  14024. uni.showLoading({
  14025. title: "图片保存中..."
  14026. });
  14027. uni.downloadFile({
  14028. url: url2,
  14029. fail: function(res) {
  14030. uni.showModal({
  14031. title: "提示",
  14032. content: "保存失败"
  14033. });
  14034. },
  14035. success: function(res) {
  14036. formatAppLog("log", "at pages_index/testResultImg.vue:119", res);
  14037. var tempFilePath = res.tempFilePath;
  14038. uni.saveImageToPhotosAlbum({
  14039. filePath: tempFilePath,
  14040. success: () => {
  14041. uni.showToast({
  14042. title: "保存成功",
  14043. duration: 2e3
  14044. });
  14045. },
  14046. fail: () => {
  14047. formatAppLog("log", "at pages_index/testResultImg.vue:132", "saveImageToPhotosAlbum 失败");
  14048. uni.hideLoading();
  14049. },
  14050. complete: function() {
  14051. uni.hideLoading();
  14052. }
  14053. });
  14054. }
  14055. });
  14056. }
  14057. }
  14058. };
  14059. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  14060. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  14061. vue.createElementVNode("view", { class: "banenr" }, [
  14062. vue.createElementVNode("image", {
  14063. class: "slide-image",
  14064. src: _ctx.url,
  14065. mode: "widthFix",
  14066. "show-menu-by-longpress": ""
  14067. }, null, 8, ["src"])
  14068. ]),
  14069. vue.createElementVNode("view", { class: "btn-box" }, [
  14070. vue.createElementVNode("view", {
  14071. class: "btn",
  14072. onClick: _cache[0] || (_cache[0] = ($event) => $options.shareImg())
  14073. }, "分享好友")
  14074. ])
  14075. ]);
  14076. }
  14077. const Pages_indexTestResultImg = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testResultImg.vue"]]);
  14078. const _sfc_main$20 = {
  14079. components: { Menu },
  14080. mixins: [MescrollMixin],
  14081. data() {
  14082. return {
  14083. top: null,
  14084. cates: [],
  14085. cateId: 0,
  14086. keyword: "",
  14087. mescroll: null,
  14088. downOption: {
  14089. //下拉刷新
  14090. use: true,
  14091. auto: false
  14092. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  14093. },
  14094. upOption: {
  14095. onScroll: false,
  14096. use: true,
  14097. // 是否启用上拉加载; 默认true
  14098. page: {
  14099. pae: 0,
  14100. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  14101. size: 10
  14102. // 每页数据的数量,默认10
  14103. },
  14104. noMoreSize: 10,
  14105. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  14106. textNoMore: "已经到底了",
  14107. empty: {
  14108. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  14109. tip: "暂无数据"
  14110. }
  14111. },
  14112. dataList: []
  14113. };
  14114. },
  14115. onShow() {
  14116. this.getArticleCateList();
  14117. },
  14118. methods: {
  14119. menuClick(item) {
  14120. this.cateId = item.cateId;
  14121. this.mescroll.resetUpScroll();
  14122. },
  14123. doSearch() {
  14124. this.mescroll.resetUpScroll();
  14125. },
  14126. getArticleCateList() {
  14127. var that = this;
  14128. let data = {};
  14129. getArticleCateList$1(data).then(
  14130. (res) => {
  14131. if (res.code == 200) {
  14132. this.cates = res.data;
  14133. var query = uni.createSelectorQuery().in(that);
  14134. setTimeout(function() {
  14135. query.select(".top-content").boundingClientRect((data2) => {
  14136. if (data2) {
  14137. formatAppLog("log", "at pages_index/articleList.vue:104", "View height:", data2.height + "px");
  14138. that.top = data2.height + "px";
  14139. }
  14140. }).exec();
  14141. }, 500);
  14142. } else {
  14143. uni.showToast({
  14144. icon: "none",
  14145. title: "请求失败"
  14146. });
  14147. }
  14148. },
  14149. (rej) => {
  14150. }
  14151. );
  14152. },
  14153. mescrollInit(mescroll) {
  14154. this.mescroll = mescroll;
  14155. },
  14156. /*下拉刷新的回调 */
  14157. downCallback(mescroll) {
  14158. mescroll.resetUpScroll();
  14159. },
  14160. upCallback(page2) {
  14161. var that = this;
  14162. var data = {
  14163. keyword: this.keyword,
  14164. cateId: this.cateId,
  14165. pageNum: page2.num,
  14166. pageSize: page2.size
  14167. };
  14168. getArticleList(data).then((res) => {
  14169. if (res.code == 200) {
  14170. if (page2.num == 1) {
  14171. that.dataList = res.data.list;
  14172. } else {
  14173. that.dataList = that.dataList.concat(res.data.list);
  14174. }
  14175. that.mescroll.endBySize(res.data.list.length, res.data.total);
  14176. } else {
  14177. uni.showToast({
  14178. icon: "none",
  14179. title: "请求失败"
  14180. });
  14181. that.dataList = null;
  14182. that.mescroll.endErr();
  14183. }
  14184. });
  14185. },
  14186. // 关键词选择
  14187. choseCate(item) {
  14188. this.cateId = item.cateId;
  14189. this.mescroll.resetUpScroll();
  14190. },
  14191. // 查看详情
  14192. showDetail(item) {
  14193. uni.navigateTo({
  14194. url: "./articleDetails?articleId=" + item.articleId
  14195. });
  14196. }
  14197. }
  14198. };
  14199. function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
  14200. const _component_Menu = vue.resolveComponent("Menu");
  14201. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  14202. return vue.openBlock(), vue.createElementBlock("view", null, [
  14203. vue.createElementVNode("view", { class: "top-content" }, [
  14204. vue.createCommentVNode(" 搜索框 "),
  14205. vue.createElementVNode("view", { class: "search-cont" }, [
  14206. vue.createElementVNode("view", { class: "inner" }, [
  14207. vue.createElementVNode("image", {
  14208. class: "icon-search",
  14209. src: "/static/images/icon_search.png",
  14210. mode: ""
  14211. }),
  14212. vue.withDirectives(vue.createElementVNode(
  14213. "input",
  14214. {
  14215. type: "text",
  14216. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  14217. placeholder: "输入关键字搜索",
  14218. "confirm-type": "search",
  14219. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  14220. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  14221. },
  14222. null,
  14223. 544
  14224. /* NEED_HYDRATION, NEED_PATCH */
  14225. ), [
  14226. [vue.vModelText, $data.keyword]
  14227. ])
  14228. ])
  14229. ]),
  14230. vue.createElementVNode("view", { class: "cate-list" }, [
  14231. $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
  14232. key: 0,
  14233. list: $data.cates,
  14234. onMenuClick: $options.menuClick,
  14235. style: { "width": "100%" }
  14236. }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true),
  14237. vue.createCommentVNode(" 关键字列表 "),
  14238. vue.createCommentVNode(` <view class="inner">\r
  14239. <view v-for="(item,index) in cates" :key="index" :class="cateId == item.cateId?'item active':'item'" @click="choseCate(item)">\r
  14240. <image class="icon" :src="item.imgUrl"></image>\r
  14241. <view class="title" >{{item.cateName}} </view>\r
  14242. </view>\r
  14243. </view> `)
  14244. ])
  14245. ]),
  14246. $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
  14247. key: 0,
  14248. top: $data.top,
  14249. ref: "mescrollRef",
  14250. onInit: $options.mescrollInit,
  14251. onDown: $options.downCallback,
  14252. onUp: $options.upCallback,
  14253. down: $data.downOption,
  14254. up: $data.upOption
  14255. }, {
  14256. default: vue.withCtx(() => [
  14257. vue.createElementVNode("view", { class: "article-list" }, [
  14258. (vue.openBlock(true), vue.createElementBlock(
  14259. vue.Fragment,
  14260. null,
  14261. vue.renderList($data.dataList, (item, index2) => {
  14262. return vue.openBlock(), vue.createElementBlock("view", {
  14263. class: "item",
  14264. key: index2,
  14265. onClick: ($event) => $options.showDetail(item)
  14266. }, [
  14267. vue.createElementVNode("view", { class: "left" }, [
  14268. vue.createElementVNode(
  14269. "view",
  14270. { class: "title ellipsis2" },
  14271. vue.toDisplayString(item.title),
  14272. 1
  14273. /* TEXT */
  14274. ),
  14275. vue.createElementVNode("view", { class: "info-box" }, [
  14276. vue.createElementVNode("view", { class: "readers" }, [
  14277. vue.createElementVNode("view", { class: "readings" }, [
  14278. vue.createElementVNode("image", {
  14279. class: "eye",
  14280. src: "/static/images/eye.png"
  14281. }),
  14282. vue.createElementVNode(
  14283. "text",
  14284. { class: "num" },
  14285. vue.toDisplayString(item.views),
  14286. 1
  14287. /* TEXT */
  14288. )
  14289. ])
  14290. ]),
  14291. vue.createElementVNode(
  14292. "view",
  14293. { class: "time" },
  14294. vue.toDisplayString(item.publishTime),
  14295. 1
  14296. /* TEXT */
  14297. )
  14298. ])
  14299. ]),
  14300. vue.createElementVNode("view", { class: "right" }, [
  14301. vue.createElementVNode("image", {
  14302. src: item.imageUrl,
  14303. mode: "aspectFill"
  14304. }, null, 8, ["src"])
  14305. ])
  14306. ], 8, ["onClick"]);
  14307. }),
  14308. 128
  14309. /* KEYED_FRAGMENT */
  14310. ))
  14311. ])
  14312. ]),
  14313. _: 1
  14314. /* STABLE */
  14315. }, 8, ["top", "onInit", "onDown", "onUp", "down", "up"])) : vue.createCommentVNode("v-if", true)
  14316. ]);
  14317. }
  14318. const Pages_indexArticleList = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/articleList.vue"]]);
  14319. const _sfc_main$1$ = {
  14320. data() {
  14321. return {
  14322. articleId: null,
  14323. item: {}
  14324. };
  14325. },
  14326. onLoad(option) {
  14327. this.articleId = option.articleId;
  14328. },
  14329. onShow() {
  14330. this.getArticleById();
  14331. },
  14332. //发送给朋友
  14333. onShareAppMessage(res) {
  14334. return {
  14335. title: this.item.title,
  14336. path: "/pages_index/articleDetails?articleId=" + this.articleId
  14337. };
  14338. },
  14339. //分享到朋友圈
  14340. onShareTimeline(res) {
  14341. return {
  14342. title: this.item.title,
  14343. query: "articleId=" + this.articleId
  14344. //页面参数
  14345. };
  14346. },
  14347. methods: {
  14348. getArticleById() {
  14349. let data = { articleId: this.articleId };
  14350. getArticleById(data).then(
  14351. (res) => {
  14352. if (res.code == 200) {
  14353. this.item = res.data;
  14354. } else {
  14355. uni.showToast({
  14356. icon: "none",
  14357. title: "请求失败"
  14358. });
  14359. }
  14360. },
  14361. (rej) => {
  14362. }
  14363. );
  14364. }
  14365. }
  14366. };
  14367. function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
  14368. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  14369. vue.createElementVNode("view", { class: "detail-cont" }, [
  14370. vue.createElementVNode(
  14371. "view",
  14372. { class: "title" },
  14373. vue.toDisplayString($data.item.title),
  14374. 1
  14375. /* TEXT */
  14376. ),
  14377. vue.createElementVNode("view", { class: "info" }, [
  14378. vue.createElementVNode(
  14379. "view",
  14380. { class: "reads" },
  14381. "阅读数:" + vue.toDisplayString($data.item.views),
  14382. 1
  14383. /* TEXT */
  14384. ),
  14385. vue.createElementVNode(
  14386. "view",
  14387. { class: "time" },
  14388. vue.toDisplayString($data.item.publishTime),
  14389. 1
  14390. /* TEXT */
  14391. )
  14392. ]),
  14393. vue.createCommentVNode(" 正文 "),
  14394. vue.createElementVNode("view", { class: "full-text" }, [
  14395. vue.createElementVNode("view", {
  14396. innerHTML: $data.item.contents
  14397. }, null, 8, ["innerHTML"])
  14398. ])
  14399. ]),
  14400. vue.createCommentVNode(" 咨询按钮 "),
  14401. vue.createElementVNode("view", { class: "inquiry" }, [
  14402. vue.createElementVNode("view", { class: "content" }, [
  14403. vue.createElementVNode("image", {
  14404. src: "/static/images/consult.png",
  14405. mode: ""
  14406. }),
  14407. vue.createElementVNode("text", { class: "text" }, "咨询"),
  14408. vue.createElementVNode("button", {
  14409. class: "contact-btn",
  14410. "open-type": "contact"
  14411. })
  14412. ])
  14413. ])
  14414. ]);
  14415. }
  14416. const Pages_indexArticleDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/articleDetails.vue"]]);
  14417. let request$d = new Request$1().http;
  14418. function getDiseaseList(data) {
  14419. return request$d("/app/disease/getDiseaseList", data, "GET");
  14420. }
  14421. function getDiseaseById(data) {
  14422. return request$d("/app/disease/getDiseaseById", data, "GET");
  14423. }
  14424. const _sfc_main$1_ = {
  14425. mixins: [MescrollMixin],
  14426. data() {
  14427. return {
  14428. depts: [],
  14429. deptId: 0,
  14430. keyword: "",
  14431. mescroll: null,
  14432. downOption: {
  14433. //下拉刷新
  14434. use: true,
  14435. auto: false
  14436. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  14437. },
  14438. upOption: {
  14439. onScroll: false,
  14440. use: true,
  14441. // 是否启用上拉加载; 默认true
  14442. page: {
  14443. pae: 0,
  14444. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  14445. size: 10
  14446. // 每页数据的数量,默认10
  14447. },
  14448. noMoreSize: 10,
  14449. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  14450. textNoMore: "已经到底了",
  14451. empty: {
  14452. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  14453. tip: "暂无数据"
  14454. }
  14455. },
  14456. dataList: []
  14457. };
  14458. },
  14459. onShow() {
  14460. this.getDepartmentList();
  14461. },
  14462. methods: {
  14463. doSearch() {
  14464. this.mescroll.resetUpScroll();
  14465. },
  14466. getDepartmentList() {
  14467. let data = {};
  14468. getDepartmentList(data).then(
  14469. (res) => {
  14470. if (res.code == 200) {
  14471. this.depts = res.data;
  14472. } else {
  14473. uni.showToast({
  14474. icon: "none",
  14475. title: "请求失败"
  14476. });
  14477. }
  14478. },
  14479. (rej) => {
  14480. }
  14481. );
  14482. },
  14483. mescrollInit(mescroll) {
  14484. this.mescroll = mescroll;
  14485. },
  14486. /*下拉刷新的回调 */
  14487. downCallback(mescroll) {
  14488. mescroll.resetUpScroll();
  14489. },
  14490. upCallback(page2) {
  14491. var that = this;
  14492. var data = {
  14493. keyword: this.keyword,
  14494. deptId: this.deptId,
  14495. pageNum: page2.num,
  14496. pageSize: page2.size
  14497. };
  14498. getDiseaseList(data).then((res) => {
  14499. if (res.code == 200) {
  14500. if (page2.num == 1) {
  14501. that.dataList = res.data.list;
  14502. } else {
  14503. that.dataList = that.dataList.concat(res.data.list);
  14504. }
  14505. that.mescroll.endBySize(res.data.list.length, res.data.total);
  14506. } else {
  14507. uni.showToast({
  14508. icon: "none",
  14509. title: "请求失败"
  14510. });
  14511. that.dataList = null;
  14512. that.mescroll.endErr();
  14513. }
  14514. });
  14515. },
  14516. choseDept(item) {
  14517. this.deptId = item.deptId;
  14518. this.mescroll.resetUpScroll();
  14519. },
  14520. showDetail(item) {
  14521. uni.navigateTo({
  14522. url: "./diseaseDetails?diseaseId=" + item.diseaseId
  14523. });
  14524. }
  14525. }
  14526. };
  14527. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  14528. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  14529. return vue.openBlock(), vue.createElementBlock("view", null, [
  14530. vue.createElementVNode("view", { class: "top-content" }, [
  14531. vue.createCommentVNode(" 搜索框 "),
  14532. vue.createElementVNode("view", { class: "search-cont" }, [
  14533. vue.createElementVNode("view", { class: "inner" }, [
  14534. vue.createElementVNode("image", {
  14535. class: "icon-search",
  14536. src: "/static/images/icon_search.png",
  14537. mode: ""
  14538. }),
  14539. vue.withDirectives(vue.createElementVNode(
  14540. "input",
  14541. {
  14542. type: "text",
  14543. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  14544. placeholder: "输入关键字搜索",
  14545. "confirm-type": "search",
  14546. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  14547. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  14548. },
  14549. null,
  14550. 544
  14551. /* NEED_HYDRATION, NEED_PATCH */
  14552. ), [
  14553. [vue.vModelText, $data.keyword]
  14554. ])
  14555. ])
  14556. ]),
  14557. vue.createElementVNode("view", { class: "dept-list" }, [
  14558. vue.createCommentVNode(" 关键字列表 "),
  14559. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  14560. vue.createElementVNode("view", { class: "inner" }, [
  14561. (vue.openBlock(true), vue.createElementBlock(
  14562. vue.Fragment,
  14563. null,
  14564. vue.renderList($data.depts, (item, index2) => {
  14565. return vue.openBlock(), vue.createElementBlock("view", {
  14566. key: index2,
  14567. class: vue.normalizeClass($data.deptId == item.deptId ? "item active" : "item"),
  14568. onClick: ($event) => $options.choseDept(item)
  14569. }, vue.toDisplayString(item.deptName), 11, ["onClick"]);
  14570. }),
  14571. 128
  14572. /* KEYED_FRAGMENT */
  14573. ))
  14574. ])
  14575. ])
  14576. ])
  14577. ]),
  14578. vue.createVNode(_component_mescroll_body, {
  14579. top: "192rpx",
  14580. ref: "mescrollRef",
  14581. onInit: $options.mescrollInit,
  14582. onDown: $options.downCallback,
  14583. onUp: $options.upCallback,
  14584. down: $data.downOption,
  14585. up: $data.upOption
  14586. }, {
  14587. default: vue.withCtx(() => [
  14588. vue.createElementVNode("view", { class: "disease-list" }, [
  14589. (vue.openBlock(true), vue.createElementBlock(
  14590. vue.Fragment,
  14591. null,
  14592. vue.renderList($data.dataList, (item, index2) => {
  14593. return vue.openBlock(), vue.createElementBlock("view", {
  14594. class: "item",
  14595. key: index2,
  14596. onClick: ($event) => $options.showDetail(item)
  14597. }, [
  14598. vue.createElementVNode("view", { class: "left" }, [
  14599. vue.createElementVNode(
  14600. "view",
  14601. { class: "title ellipsis1" },
  14602. vue.toDisplayString(item.diseaseName),
  14603. 1
  14604. /* TEXT */
  14605. )
  14606. ]),
  14607. vue.createElementVNode("view", { class: "right" }, [
  14608. vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
  14609. ])
  14610. ], 8, ["onClick"]);
  14611. }),
  14612. 128
  14613. /* KEYED_FRAGMENT */
  14614. ))
  14615. ])
  14616. ]),
  14617. _: 1
  14618. /* STABLE */
  14619. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  14620. ]);
  14621. }
  14622. const Pages_indexDiseaseList = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/diseaseList.vue"]]);
  14623. const _sfc_main$1Z = {
  14624. data() {
  14625. return {
  14626. advs: [],
  14627. advImgs: [],
  14628. diseaseId: null,
  14629. item: {}
  14630. };
  14631. },
  14632. onLoad(option) {
  14633. this.diseaseId = option.diseaseId;
  14634. },
  14635. onShow() {
  14636. this.getAdvList();
  14637. this.getDiseaseById();
  14638. },
  14639. onShareAppMessage(res) {
  14640. if (this.$isLogin()) {
  14641. return {
  14642. title: this.item.diseaseName,
  14643. path: "/pages_index/diseaseDetails?id=" + this.diseaseId,
  14644. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  14645. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  14646. };
  14647. }
  14648. },
  14649. //分享到朋友圈
  14650. onShareTimeline(res) {
  14651. if (this.utils.isLogin()) {
  14652. return {
  14653. title: this.item.diseaseName,
  14654. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  14655. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  14656. };
  14657. }
  14658. },
  14659. methods: {
  14660. handleAdvClick(index2) {
  14661. var ad = this.advs[index2];
  14662. formatAppLog("log", "at pages_index/diseaseDetails.vue:79", ad.advUrl);
  14663. if (ad.showType == 1) {
  14664. uni.setStorageSync("url", ad.advUrl);
  14665. uni.navigateTo({
  14666. url: "h5"
  14667. });
  14668. } else if (ad.showType == 2) {
  14669. uni.navigateTo({
  14670. url: ad.advUrl
  14671. });
  14672. } else if (ad.showType == 3) {
  14673. uni.setStorageSync("content", ad.content);
  14674. uni.navigateTo({
  14675. url: "content"
  14676. });
  14677. }
  14678. },
  14679. getAdvList() {
  14680. var that = this;
  14681. var data = {
  14682. advType: 7
  14683. };
  14684. getAdvList(data).then((res) => {
  14685. if (res.code == 200) {
  14686. that.advImgs = [];
  14687. that.advs = [];
  14688. res.data.forEach(function(element) {
  14689. if (element.imageUrl != null && element.imageUrl != "") {
  14690. that.advs.push(element);
  14691. that.advImgs.push(element.imageUrl);
  14692. }
  14693. });
  14694. } else {
  14695. uni.showToast({
  14696. icon: "none",
  14697. title: "请求失败"
  14698. });
  14699. }
  14700. });
  14701. },
  14702. getDiseaseById() {
  14703. let data = { diseaseId: this.diseaseId };
  14704. getDiseaseById(data).then(
  14705. (res) => {
  14706. if (res.code == 200) {
  14707. this.item = res.data;
  14708. } else {
  14709. uni.showToast({
  14710. icon: "none",
  14711. title: "请求失败"
  14712. });
  14713. }
  14714. },
  14715. (rej) => {
  14716. }
  14717. );
  14718. }
  14719. }
  14720. };
  14721. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  14722. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  14723. return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  14724. key: 0,
  14725. class: "content"
  14726. }, [
  14727. vue.createElementVNode("view", { class: "detail-cont" }, [
  14728. vue.createElementVNode("view", { class: "title-box" }, [
  14729. vue.createElementVNode("view", { class: "line" }),
  14730. vue.createElementVNode("view", { class: "title" }, "疾病名称")
  14731. ]),
  14732. vue.createElementVNode("view", {
  14733. class: "desc",
  14734. innerHTML: $data.item.diseaseName
  14735. }, null, 8, ["innerHTML"]),
  14736. vue.createElementVNode("view", { class: "title-box" }, [
  14737. vue.createElementVNode("view", { class: "line" }),
  14738. vue.createElementVNode("view", { class: "title" }, "病情症状")
  14739. ]),
  14740. vue.createElementVNode("view", {
  14741. class: "desc",
  14742. innerHTML: $data.item.symptom
  14743. }, null, 8, ["innerHTML"]),
  14744. vue.createElementVNode("view", { class: "title-box" }, [
  14745. vue.createElementVNode("view", { class: "line" }),
  14746. vue.createElementVNode("view", { class: "title" }, "病情诊断")
  14747. ]),
  14748. vue.createElementVNode("view", {
  14749. class: "desc",
  14750. innerHTML: $data.item.diagnose
  14751. }, null, 8, ["innerHTML"]),
  14752. vue.createElementVNode("view", { class: "title-box" }, [
  14753. vue.createElementVNode("view", { class: "line" }),
  14754. vue.createElementVNode("view", { class: "title" }, "相关检验")
  14755. ]),
  14756. vue.createElementVNode("view", {
  14757. class: "desc",
  14758. innerHTML: $data.item.inspect
  14759. }, null, 8, ["innerHTML"])
  14760. ]),
  14761. vue.createElementVNode("view", { class: "ad" }, [
  14762. vue.createVNode(_component_u_swiper, {
  14763. list: $data.advImgs,
  14764. indicator: "",
  14765. indicatorMode: "line",
  14766. circular: "",
  14767. onClick: $options.handleAdvClick
  14768. }, null, 8, ["list", "onClick"])
  14769. ])
  14770. ])) : vue.createCommentVNode("v-if", true);
  14771. }
  14772. const Pages_indexDiseaseDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/diseaseDetails.vue"]]);
  14773. let request$c = new Request$1().http;
  14774. function getHospitalList(data) {
  14775. return request$c("/app/hospital/getHospitalList", data, "GET");
  14776. }
  14777. function getHospitalById(data) {
  14778. return request$c("/app/hospital/getHospitalById", data, "GET");
  14779. }
  14780. const _sfc_main$1Y = {
  14781. mixins: [MescrollMixin],
  14782. data() {
  14783. return {
  14784. keyword: "",
  14785. mescroll: null,
  14786. downOption: {
  14787. //下拉刷新
  14788. use: true,
  14789. auto: false
  14790. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  14791. },
  14792. upOption: {
  14793. onScroll: false,
  14794. use: true,
  14795. // 是否启用上拉加载; 默认true
  14796. page: {
  14797. pae: 0,
  14798. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  14799. size: 10
  14800. // 每页数据的数量,默认10
  14801. },
  14802. noMoreSize: 10,
  14803. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  14804. textNoMore: "已经到底了",
  14805. empty: {
  14806. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  14807. tip: "暂无数据"
  14808. }
  14809. },
  14810. dataList: []
  14811. };
  14812. },
  14813. onShow() {
  14814. },
  14815. methods: {
  14816. doSearch() {
  14817. this.mescroll.resetUpScroll();
  14818. },
  14819. mescrollInit(mescroll) {
  14820. this.mescroll = mescroll;
  14821. },
  14822. /*下拉刷新的回调 */
  14823. downCallback(mescroll) {
  14824. mescroll.resetUpScroll();
  14825. },
  14826. upCallback(page2) {
  14827. var that = this;
  14828. var data = {
  14829. keyword: this.keyword,
  14830. pageNum: page2.num,
  14831. pageSize: page2.size
  14832. };
  14833. getHospitalList(data).then((res) => {
  14834. if (res.code == 200) {
  14835. if (page2.num == 1) {
  14836. that.dataList = res.data.list;
  14837. } else {
  14838. that.dataList = that.dataList.concat(res.data.list);
  14839. }
  14840. that.mescroll.endBySize(res.data.list.length, res.data.total);
  14841. } else {
  14842. uni.showToast({
  14843. icon: "none",
  14844. title: "请求失败"
  14845. });
  14846. that.dataList = null;
  14847. that.mescroll.endErr();
  14848. }
  14849. });
  14850. },
  14851. // 查看详情
  14852. showDetail(item) {
  14853. uni.navigateTo({
  14854. url: "./hospitalDetails?hospitalId=" + item.hospitalId
  14855. });
  14856. }
  14857. }
  14858. };
  14859. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  14860. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  14861. return vue.openBlock(), vue.createElementBlock("view", null, [
  14862. vue.createElementVNode("view", { class: "top-content" }, [
  14863. vue.createCommentVNode(" 搜索框 "),
  14864. vue.createElementVNode("view", { class: "search-cont" }, [
  14865. vue.createElementVNode("view", { class: "inner" }, [
  14866. vue.createElementVNode("image", {
  14867. class: "icon-search",
  14868. src: "/static/images/icon_search.png",
  14869. mode: ""
  14870. }),
  14871. vue.withDirectives(vue.createElementVNode(
  14872. "input",
  14873. {
  14874. type: "text",
  14875. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  14876. placeholder: "输入关键字搜索",
  14877. "confirm-type": "search",
  14878. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  14879. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  14880. },
  14881. null,
  14882. 544
  14883. /* NEED_HYDRATION, NEED_PATCH */
  14884. ), [
  14885. [vue.vModelText, $data.keyword]
  14886. ])
  14887. ])
  14888. ])
  14889. ]),
  14890. vue.createVNode(_component_mescroll_body, {
  14891. top: "88rpx",
  14892. ref: "mescrollRef",
  14893. onInit: $options.mescrollInit,
  14894. onDown: $options.downCallback,
  14895. onUp: $options.upCallback,
  14896. down: $data.downOption,
  14897. up: $data.upOption
  14898. }, {
  14899. default: vue.withCtx(() => [
  14900. vue.createElementVNode("view", { class: "hos-list" }, [
  14901. (vue.openBlock(true), vue.createElementBlock(
  14902. vue.Fragment,
  14903. null,
  14904. vue.renderList($data.dataList, (item, index2) => {
  14905. return vue.openBlock(), vue.createElementBlock("view", {
  14906. class: "item",
  14907. key: index2,
  14908. onClick: ($event) => $options.showDetail(item)
  14909. }, [
  14910. vue.createElementVNode("view", { class: "left" }, [
  14911. vue.createElementVNode("image", {
  14912. src: item.imgUrl,
  14913. mode: "aspectFit"
  14914. }, null, 8, ["src"])
  14915. ]),
  14916. vue.createElementVNode("view", { class: "right" }, [
  14917. vue.createElementVNode(
  14918. "view",
  14919. { class: "title one-t" },
  14920. vue.toDisplayString(item.hospitalName),
  14921. 1
  14922. /* TEXT */
  14923. ),
  14924. vue.createElementVNode("view", { class: "desc" }, [
  14925. vue.createElementVNode("text", { class: "tag" }, "二甲"),
  14926. vue.createElementVNode("text", { class: "tag" }, "综合医院")
  14927. ]),
  14928. vue.createElementVNode("view", { class: "address-box" }, [
  14929. vue.createElementVNode("view", { class: "address-left" }, [
  14930. vue.createElementVNode(
  14931. "view",
  14932. { class: "address one-t" },
  14933. vue.toDisplayString(item.address),
  14934. 1
  14935. /* TEXT */
  14936. )
  14937. ]),
  14938. vue.createElementVNode("view", { class: "address-right" }, [
  14939. vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
  14940. ])
  14941. ])
  14942. ])
  14943. ], 8, ["onClick"]);
  14944. }),
  14945. 128
  14946. /* KEYED_FRAGMENT */
  14947. ))
  14948. ])
  14949. ]),
  14950. _: 1
  14951. /* STABLE */
  14952. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  14953. ]);
  14954. }
  14955. const Pages_indexHospitalList = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/hospitalList.vue"]]);
  14956. const _sfc_main$1X = {
  14957. data() {
  14958. return {
  14959. hospitalId: null,
  14960. hospital: null,
  14961. doctors: []
  14962. };
  14963. },
  14964. onLoad(options) {
  14965. this.hospitalId = options.hospitalId;
  14966. this.getHospitalById();
  14967. this.getDoctorList();
  14968. },
  14969. methods: {
  14970. goMap() {
  14971. uni.openLocation({
  14972. latitude: parseFloat(this.hospital.lat),
  14973. longitude: parseFloat(this.hospital.lng),
  14974. scale: 18,
  14975. name: this.hospital.hospitalName,
  14976. address: this.hospital.address,
  14977. success: () => {
  14978. formatAppLog("log", "at pages_index/hospitalDetails.vue:113", "导航success");
  14979. }
  14980. });
  14981. },
  14982. getHospitalById() {
  14983. var data = {
  14984. hospitalId: this.hospitalId
  14985. };
  14986. getHospitalById(data).then((res) => {
  14987. if (res.code == 200) {
  14988. this.hospital = res.data;
  14989. } else {
  14990. uni.showToast({
  14991. icon: "none",
  14992. title: "请求失败"
  14993. });
  14994. }
  14995. });
  14996. },
  14997. getDoctorList() {
  14998. var data = {
  14999. hospitalId: this.hospitalId,
  15000. pageNum: 1,
  15001. pageSize: 10
  15002. };
  15003. getDoctorList(data).then((res) => {
  15004. if (res.code == 200) {
  15005. res.data.list.forEach(function(value2, index2, array3) {
  15006. value2.prices = JSON.parse(value2.priceJson);
  15007. });
  15008. this.doctors = res.data.list;
  15009. } else {
  15010. uni.showToast({
  15011. icon: "none",
  15012. title: "请求失败"
  15013. });
  15014. }
  15015. });
  15016. },
  15017. navTo(url2) {
  15018. uni.navigateTo({
  15019. url: url2
  15020. });
  15021. }
  15022. }
  15023. };
  15024. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  15025. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  15026. vue.createElementVNode("view", { class: "bg" }),
  15027. vue.createElementVNode("view", { class: "cont" }, [
  15028. vue.createElementVNode("view", { class: "hos-box" }, [
  15029. vue.createElementVNode("view", { class: "left" }, [
  15030. vue.createElementVNode("image", {
  15031. src: $data.hospital.imgUrl,
  15032. mode: "aspectFit"
  15033. }, null, 8, ["src"])
  15034. ]),
  15035. vue.createElementVNode("view", { class: "right" }, [
  15036. vue.createElementVNode("view", { class: "hos-name-box" }, [
  15037. vue.createElementVNode(
  15038. "view",
  15039. { class: "hos-name" },
  15040. vue.toDisplayString($data.hospital.hospitalName),
  15041. 1
  15042. /* TEXT */
  15043. )
  15044. ]),
  15045. vue.createElementVNode(
  15046. "view",
  15047. { class: "hos-desc-box" },
  15048. vue.toDisplayString($data.hospital.hospitalType),
  15049. 1
  15050. /* TEXT */
  15051. ),
  15052. vue.createElementVNode("view", {
  15053. class: "hos-address-box",
  15054. onClick: _cache[0] || (_cache[0] = ($event) => $options.goMap())
  15055. }, [
  15056. vue.createElementVNode("view", { class: "address-left" }, [
  15057. vue.createElementVNode(
  15058. "view",
  15059. { class: "address one-t" },
  15060. vue.toDisplayString($data.hospital.address),
  15061. 1
  15062. /* TEXT */
  15063. )
  15064. ]),
  15065. vue.createElementVNode("view", { class: "address-right" }, [
  15066. vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
  15067. ])
  15068. ])
  15069. ])
  15070. ]),
  15071. vue.createElementVNode("view", { class: "desc-box" }, [
  15072. vue.createElementVNode("view", { class: "title-box" }, [
  15073. vue.createElementVNode("view", { class: "line" }),
  15074. vue.createElementVNode("view", { class: "title" }, "医院介绍")
  15075. ]),
  15076. vue.createElementVNode(
  15077. "view",
  15078. { class: "desc" },
  15079. vue.toDisplayString($data.hospital.descs),
  15080. 1
  15081. /* TEXT */
  15082. )
  15083. ]),
  15084. vue.createElementVNode("view", { class: "doctor-box" }, [
  15085. vue.createElementVNode("view", { class: "title-box" }, [
  15086. vue.createElementVNode("view", { class: "line" }),
  15087. vue.createElementVNode("view", { class: "title" }, "医院专家")
  15088. ]),
  15089. $data.doctors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  15090. key: 0,
  15091. class: "doctors"
  15092. }, [
  15093. (vue.openBlock(true), vue.createElementBlock(
  15094. vue.Fragment,
  15095. null,
  15096. vue.renderList($data.doctors, (item, index2) => {
  15097. return vue.openBlock(), vue.createElementBlock("view", {
  15098. class: "doctor",
  15099. onClick: ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + item.doctorId)
  15100. }, [
  15101. vue.createElementVNode("view", { class: "item" }, [
  15102. vue.createElementVNode("image", {
  15103. mode: "aspectFill",
  15104. class: "doc-img",
  15105. src: item.avatar
  15106. }, null, 8, ["src"]),
  15107. vue.createElementVNode("view", { class: "right" }, [
  15108. vue.createElementVNode("view", { class: "doc-box" }, [
  15109. vue.createElementVNode(
  15110. "view",
  15111. { class: "doc-name" },
  15112. vue.toDisplayString(item.doctorName),
  15113. 1
  15114. /* TEXT */
  15115. ),
  15116. vue.createElementVNode(
  15117. "view",
  15118. { class: "doc-position" },
  15119. vue.toDisplayString(item.position),
  15120. 1
  15121. /* TEXT */
  15122. )
  15123. ]),
  15124. vue.createElementVNode(
  15125. "view",
  15126. { class: "hospital" },
  15127. vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName),
  15128. 1
  15129. /* TEXT */
  15130. ),
  15131. vue.createElementVNode("view", { class: "doc-spec" }, [
  15132. vue.createElementVNode("view", { class: "title" }, "擅长:"),
  15133. vue.createElementVNode(
  15134. "view",
  15135. { class: "spec ellipsis" },
  15136. vue.toDisplayString(item.speciality),
  15137. 1
  15138. /* TEXT */
  15139. )
  15140. ]),
  15141. vue.createElementVNode("view", { class: "doc-ping" }, [
  15142. vue.createElementVNode(
  15143. "view",
  15144. { class: "ping" },
  15145. "好评率:" + vue.toDisplayString(item.pingStar) + "%",
  15146. 1
  15147. /* TEXT */
  15148. ),
  15149. vue.createElementVNode(
  15150. "view",
  15151. { class: "count" },
  15152. "咨询量:" + vue.toDisplayString(item.orderNumber),
  15153. 1
  15154. /* TEXT */
  15155. )
  15156. ]),
  15157. vue.createElementVNode("view", { class: "doc-price" }, [
  15158. vue.createElementVNode("view", { class: "left" }, [
  15159. vue.createTextVNode("¥ "),
  15160. (vue.openBlock(true), vue.createElementBlock(
  15161. vue.Fragment,
  15162. null,
  15163. vue.renderList(item.prices, (price, index3) => {
  15164. return vue.openBlock(), vue.createElementBlock("text", null, [
  15165. vue.createTextVNode(
  15166. vue.toDisplayString(price.price.toFixed(2)) + " ",
  15167. 1
  15168. /* TEXT */
  15169. ),
  15170. index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
  15171. ]);
  15172. }),
  15173. 256
  15174. /* UNKEYED_FRAGMENT */
  15175. ))
  15176. ]),
  15177. vue.createElementVNode("view", { class: "btns" }, [
  15178. vue.createElementVNode("view", { class: "btn" }, " 咨询医生 ")
  15179. ])
  15180. ])
  15181. ])
  15182. ])
  15183. ], 8, ["onClick"]);
  15184. }),
  15185. 256
  15186. /* UNKEYED_FRAGMENT */
  15187. ))
  15188. ])) : vue.createCommentVNode("v-if", true)
  15189. ])
  15190. ])
  15191. ]);
  15192. }
  15193. const Pages_indexHospitalDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-cd01f093"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/hospitalDetails.vue"]]);
  15194. const _sfc_main$1W = {
  15195. data() {
  15196. return {
  15197. searchHistory: [],
  15198. searchKey: "",
  15199. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight
  15200. };
  15201. },
  15202. onLoad() {
  15203. this.searchHistory = this.$getHisSearch();
  15204. },
  15205. methods: {
  15206. clearHistory() {
  15207. this.$clearHisSearch();
  15208. this.searchHistory = this.$getHisSearch();
  15209. },
  15210. back() {
  15211. uni.navigateBack({
  15212. delta: 1
  15213. });
  15214. },
  15215. goSearchList(key) {
  15216. uni.navigateTo({
  15217. url: "/pages_doctor/doctorList?keyword=" + key
  15218. });
  15219. },
  15220. toSearchList() {
  15221. if (this.searchKey != "") {
  15222. this.$addHisSearch(this.searchKey);
  15223. }
  15224. uni.navigateTo({
  15225. url: "/pages_doctor/doctorList?keyword=" + this.searchKey
  15226. });
  15227. }
  15228. }
  15229. };
  15230. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  15231. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  15232. vue.createElementVNode("view", { class: "top-cont" }, [
  15233. vue.createElementVNode(
  15234. "view",
  15235. {
  15236. class: "status_bar",
  15237. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  15238. },
  15239. null,
  15240. 4
  15241. /* STYLE */
  15242. ),
  15243. vue.createElementVNode("view", { class: "inner" }, [
  15244. vue.createElementVNode("image", {
  15245. class: "back",
  15246. src: "/static/images/icon_back_b.png",
  15247. mode: "heightFix",
  15248. onClick: _cache[0] || (_cache[0] = ($event) => $options.back())
  15249. }),
  15250. vue.createElementVNode("view", { class: "screen-box" }, [
  15251. vue.createElementVNode("image", {
  15252. class: "search",
  15253. src: "/static/images/icon_search.png",
  15254. mode: ""
  15255. }),
  15256. vue.withDirectives(vue.createElementVNode(
  15257. "input",
  15258. {
  15259. type: "text",
  15260. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.searchKey = $event),
  15261. placeholder: "搜索医生/疾病/知识",
  15262. onConfirm: _cache[2] || (_cache[2] = ($event) => $options.toSearchList($data.searchKey)),
  15263. "placeholder-style": "font-size:26rpx;color:#DADADA;"
  15264. },
  15265. null,
  15266. 544
  15267. /* NEED_HYDRATION, NEED_PATCH */
  15268. ), [
  15269. [vue.vModelText, $data.searchKey]
  15270. ]),
  15271. vue.createElementVNode("text", {
  15272. class: "text",
  15273. onClick: _cache[3] || (_cache[3] = (...args) => $options.toSearchList && $options.toSearchList(...args))
  15274. }, "搜索")
  15275. ])
  15276. ])
  15277. ]),
  15278. vue.createElementVNode("view", { class: "cont-inner" }, [
  15279. vue.createCommentVNode(" 搜索历史 "),
  15280. vue.createElementVNode("view", { class: "search-info" }, [
  15281. vue.createElementVNode("view", { class: "title-box" }, [
  15282. vue.createElementVNode("view", { class: "title" }, "搜索历史"),
  15283. vue.createElementVNode("view", {
  15284. class: "btn",
  15285. onClick: _cache[4] || (_cache[4] = ($event) => $options.clearHistory())
  15286. }, "清除搜索历史")
  15287. ]),
  15288. vue.createElementVNode("view", { class: "search-list" }, [
  15289. (vue.openBlock(true), vue.createElementBlock(
  15290. vue.Fragment,
  15291. null,
  15292. vue.renderList($data.searchHistory, (item, index2) => {
  15293. return vue.openBlock(), vue.createElementBlock("view", {
  15294. onClick: ($event) => $options.goSearchList(item),
  15295. key: index2,
  15296. class: "item ellipsis"
  15297. }, [
  15298. vue.createElementVNode(
  15299. "text",
  15300. { class: "text" },
  15301. vue.toDisplayString(item),
  15302. 1
  15303. /* TEXT */
  15304. )
  15305. ], 8, ["onClick"]);
  15306. }),
  15307. 128
  15308. /* KEYED_FRAGMENT */
  15309. )),
  15310. vue.createCommentVNode(' <view class="item ellipsis">\r\n <text class="text">名字很长很长很长很长很长很长很长很长</text>\r\n </view> ')
  15311. ])
  15312. ])
  15313. ])
  15314. ]);
  15315. }
  15316. const Pages_indexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-e5a36dca"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/search.vue"]]);
  15317. const props$m = {
  15318. props: {
  15319. // 是否显示圆点
  15320. isDot: {
  15321. type: Boolean,
  15322. default: props$y.badge.isDot
  15323. },
  15324. // 显示的内容
  15325. value: {
  15326. type: [Number, String],
  15327. default: props$y.badge.value
  15328. },
  15329. // 显示的内容
  15330. modelValue: {
  15331. type: [Number, String],
  15332. default: props$y.badge.modelValue
  15333. },
  15334. // 是否显示
  15335. show: {
  15336. type: Boolean,
  15337. default: props$y.badge.show
  15338. },
  15339. // 最大值,超过最大值会显示 '{max}+'
  15340. max: {
  15341. type: [Number, String],
  15342. default: props$y.badge.max
  15343. },
  15344. // 主题类型,error|warning|success|primary
  15345. type: {
  15346. type: String,
  15347. default: props$y.badge.type
  15348. },
  15349. // 当数值为 0 时,是否展示 Badge
  15350. showZero: {
  15351. type: Boolean,
  15352. default: props$y.badge.showZero
  15353. },
  15354. // 背景颜色,优先级比type高,如设置,type参数会失效
  15355. bgColor: {
  15356. type: [String, null],
  15357. default: props$y.badge.bgColor
  15358. },
  15359. // 字体颜色
  15360. color: {
  15361. type: [String, null],
  15362. default: props$y.badge.color
  15363. },
  15364. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  15365. shape: {
  15366. type: String,
  15367. default: props$y.badge.shape
  15368. },
  15369. // 设置数字的显示方式,overflow|ellipsis|limit
  15370. // overflow会根据max字段判断,超出显示`${max}+`
  15371. // ellipsis会根据max判断,超出显示`${max}...`
  15372. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  15373. numberType: {
  15374. type: String,
  15375. default: props$y.badge.numberType
  15376. },
  15377. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  15378. offset: {
  15379. type: Array,
  15380. default: props$y.badge.offset
  15381. },
  15382. // 是否反转背景和字体颜色
  15383. inverted: {
  15384. type: Boolean,
  15385. default: props$y.badge.inverted
  15386. },
  15387. // 是否绝对定位
  15388. absolute: {
  15389. type: Boolean,
  15390. default: props$y.badge.absolute
  15391. }
  15392. }
  15393. };
  15394. const _sfc_main$1V = {
  15395. name: "u-badge",
  15396. mixins: [mpMixin, props$m, mixin],
  15397. computed: {
  15398. // 是否将badge中心与父组件右上角重合
  15399. boxStyle() {
  15400. let style = {};
  15401. return style;
  15402. },
  15403. // 整个组件的样式
  15404. badgeStyle() {
  15405. const style = {};
  15406. if (this.color) {
  15407. style.color = this.color;
  15408. }
  15409. if (this.bgColor && !this.inverted) {
  15410. style.backgroundColor = this.bgColor;
  15411. }
  15412. if (this.absolute) {
  15413. style.position = "absolute";
  15414. if (this.offset.length) {
  15415. const top = this.offset[0];
  15416. const right = this.offset[1] || top;
  15417. style.top = uni.$u.addUnit(top);
  15418. style.right = uni.$u.addUnit(right);
  15419. }
  15420. }
  15421. return style;
  15422. },
  15423. showValue() {
  15424. switch (this.numberType) {
  15425. case "overflow":
  15426. return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
  15427. case "ellipsis":
  15428. return Number(this.value) > Number(this.max) ? "..." : this.value;
  15429. case "limit":
  15430. 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;
  15431. default:
  15432. return Number(this.value);
  15433. }
  15434. }
  15435. }
  15436. };
  15437. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  15438. return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
  15439. "text",
  15440. {
  15441. key: 0,
  15442. 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"]),
  15443. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
  15444. },
  15445. vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
  15446. 7
  15447. /* TEXT, CLASS, STYLE */
  15448. )) : vue.createCommentVNode("v-if", true);
  15449. }
  15450. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-06cca9b7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]);
  15451. const props$l = {
  15452. props: {
  15453. // 滑块的移动过渡时间,单位ms
  15454. duration: {
  15455. type: Number,
  15456. default: props$y.tabs.duration
  15457. },
  15458. // tabs标签数组
  15459. list: {
  15460. type: Array,
  15461. default: props$y.tabs.list
  15462. },
  15463. // 滑块颜色
  15464. lineColor: {
  15465. type: String,
  15466. default: props$y.tabs.lineColor
  15467. },
  15468. // 菜单选择中时的样式
  15469. activeStyle: {
  15470. type: [String, Object],
  15471. default: props$y.tabs.activeStyle
  15472. },
  15473. // 菜单非选中时的样式
  15474. inactiveStyle: {
  15475. type: [String, Object],
  15476. default: props$y.tabs.inactiveStyle
  15477. },
  15478. // 滑块长度
  15479. lineWidth: {
  15480. type: [String, Number],
  15481. default: props$y.tabs.lineWidth
  15482. },
  15483. // 滑块高度
  15484. lineHeight: {
  15485. type: [String, Number],
  15486. default: props$y.tabs.lineHeight
  15487. },
  15488. // 滑块背景显示大小,当滑块背景设置为图片时使用
  15489. lineBgSize: {
  15490. type: String,
  15491. default: props$y.tabs.lineBgSize
  15492. },
  15493. // 菜单item的样式
  15494. itemStyle: {
  15495. type: [String, Object],
  15496. default: props$y.tabs.itemStyle
  15497. },
  15498. // 菜单是否可滚动
  15499. scrollable: {
  15500. type: Boolean,
  15501. default: props$y.tabs.scrollable
  15502. },
  15503. // 当前选中标签的索引
  15504. current: {
  15505. type: [Number, String],
  15506. default: props$y.tabs.current
  15507. },
  15508. // 默认读取的键名
  15509. keyName: {
  15510. type: String,
  15511. default: props$y.tabs.keyName
  15512. }
  15513. }
  15514. };
  15515. const _sfc_main$1U = {
  15516. name: "u-tabs",
  15517. mixins: [mpMixin, mixin, props$l],
  15518. data() {
  15519. return {
  15520. firstTime: true,
  15521. scrollLeft: 0,
  15522. scrollViewWidth: 0,
  15523. lineOffsetLeft: 0,
  15524. tabsRect: {
  15525. left: 0
  15526. },
  15527. innerCurrent: 0,
  15528. moving: false
  15529. };
  15530. },
  15531. watch: {
  15532. current: {
  15533. immediate: true,
  15534. handler(newValue, oldValue) {
  15535. if (newValue !== this.innerCurrent) {
  15536. this.innerCurrent = newValue;
  15537. this.$nextTick(() => {
  15538. this.resize();
  15539. });
  15540. }
  15541. }
  15542. },
  15543. // list变化时,重新渲染list各项信息
  15544. list() {
  15545. this.$nextTick(() => {
  15546. this.resize();
  15547. });
  15548. }
  15549. },
  15550. computed: {
  15551. textStyle() {
  15552. return (index2) => {
  15553. const style = {};
  15554. const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
  15555. this.inactiveStyle
  15556. );
  15557. if (this.list[index2].disabled) {
  15558. style.color = "#c8c9cc";
  15559. }
  15560. return uni.$u.deepMerge(customeStyle, style);
  15561. };
  15562. },
  15563. propsBadge() {
  15564. return uni.$u.props.badge;
  15565. }
  15566. },
  15567. async mounted() {
  15568. this.init();
  15569. },
  15570. emits: ["click", "change"],
  15571. methods: {
  15572. setLineLeft() {
  15573. const tabItem = this.list[this.innerCurrent];
  15574. if (!tabItem) {
  15575. return;
  15576. }
  15577. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  15578. const lineWidth = uni.$u.getPx(this.lineWidth);
  15579. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  15580. if (this.firstTime) {
  15581. setTimeout(() => {
  15582. this.firstTime = false;
  15583. }, 10);
  15584. }
  15585. },
  15586. // nvue下设置滑块的位置
  15587. animation(x, duration = 0) {
  15588. },
  15589. // 点击某一个标签
  15590. clickHandler(item, index2) {
  15591. this.$emit("click", {
  15592. ...item,
  15593. index: index2
  15594. });
  15595. if (item.disabled)
  15596. return;
  15597. this.innerCurrent = index2;
  15598. this.resize();
  15599. this.$emit("change", {
  15600. ...item,
  15601. index: index2
  15602. });
  15603. },
  15604. init() {
  15605. uni.$u.sleep().then(() => {
  15606. this.resize();
  15607. });
  15608. },
  15609. setScrollLeft() {
  15610. const tabRect = this.list[this.innerCurrent];
  15611. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  15612. return total + curr.rect.width;
  15613. }, 0);
  15614. const windowWidth2 = uni.$u.sys().windowWidth;
  15615. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth2 - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  15616. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  15617. this.scrollLeft = Math.max(0, scrollLeft);
  15618. },
  15619. // 获取所有标签的尺寸
  15620. resize() {
  15621. if (this.list.length === 0) {
  15622. return;
  15623. }
  15624. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
  15625. this.tabsRect = tabsRect;
  15626. this.scrollViewWidth = 0;
  15627. itemRect.map((item, index2) => {
  15628. this.scrollViewWidth += item.width;
  15629. this.list[index2].rect = item;
  15630. });
  15631. this.setLineLeft();
  15632. this.setScrollLeft();
  15633. });
  15634. },
  15635. // 获取导航菜单的尺寸
  15636. getTabsRect() {
  15637. return new Promise((resolve) => {
  15638. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  15639. });
  15640. },
  15641. // 获取所有标签的尺寸
  15642. getAllItemRect() {
  15643. return new Promise((resolve) => {
  15644. const promiseAllArr = this.list.map((item, index2) => this.queryRect(
  15645. `u-tabs__wrapper__nav__item-${index2}`,
  15646. true
  15647. ));
  15648. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  15649. });
  15650. },
  15651. // 获取各个标签的尺寸
  15652. queryRect(el, item) {
  15653. return new Promise((resolve) => {
  15654. this.$uGetRect(`.${el}`).then((size) => {
  15655. resolve(size);
  15656. });
  15657. });
  15658. }
  15659. }
  15660. };
  15661. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  15662. const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$8);
  15663. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  15664. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  15665. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  15666. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  15667. vue.createElementVNode("scroll-view", {
  15668. "scroll-x": _ctx.scrollable,
  15669. "scroll-left": $data.scrollLeft,
  15670. "scroll-with-animation": "",
  15671. class: "u-tabs__wrapper__scroll-view",
  15672. "show-scrollbar": false,
  15673. ref: "u-tabs__wrapper__scroll-view"
  15674. }, [
  15675. vue.createElementVNode(
  15676. "view",
  15677. {
  15678. class: "u-tabs__wrapper__nav",
  15679. ref: "u-tabs__wrapper__nav"
  15680. },
  15681. [
  15682. (vue.openBlock(true), vue.createElementBlock(
  15683. vue.Fragment,
  15684. null,
  15685. vue.renderList(_ctx.list, (item, index2) => {
  15686. return vue.openBlock(), vue.createElementBlock("view", {
  15687. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
  15688. key: index2,
  15689. onClick: ($event) => $options.clickHandler(item, index2),
  15690. ref_for: true,
  15691. ref: `u-tabs__wrapper__nav__item-${index2}`,
  15692. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
  15693. }, [
  15694. vue.createElementVNode(
  15695. "text",
  15696. {
  15697. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  15698. style: vue.normalizeStyle([$options.textStyle(index2)])
  15699. },
  15700. vue.toDisplayString(item[_ctx.keyName]),
  15701. 7
  15702. /* TEXT, CLASS, STYLE */
  15703. ),
  15704. vue.createVNode(_component_u_badge, {
  15705. show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
  15706. isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
  15707. value: item.badge && item.badge.value || $options.propsBadge.value,
  15708. max: item.badge && item.badge.max || $options.propsBadge.max,
  15709. type: item.badge && item.badge.type || $options.propsBadge.type,
  15710. showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
  15711. bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
  15712. color: item.badge && item.badge.color || $options.propsBadge.color,
  15713. shape: item.badge && item.badge.shape || $options.propsBadge.shape,
  15714. numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
  15715. inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
  15716. customStyle: "margin-left: 4px;"
  15717. }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
  15718. ], 14, ["onClick"]);
  15719. }),
  15720. 128
  15721. /* KEYED_FRAGMENT */
  15722. )),
  15723. vue.createElementVNode(
  15724. "view",
  15725. {
  15726. class: "u-tabs__wrapper__nav__line",
  15727. ref: "u-tabs__wrapper__nav__line",
  15728. style: vue.normalizeStyle([{
  15729. width: _ctx.$u.addUnit(_ctx.lineWidth),
  15730. transform: `translate(${$data.lineOffsetLeft}px)`,
  15731. transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
  15732. height: _ctx.$u.addUnit(_ctx.lineHeight),
  15733. background: _ctx.lineColor,
  15734. backgroundSize: _ctx.lineBgSize
  15735. }])
  15736. },
  15737. null,
  15738. 4
  15739. /* STYLE */
  15740. )
  15741. ],
  15742. 512
  15743. /* NEED_PATCH */
  15744. )
  15745. ], 8, ["scroll-x", "scroll-left"])
  15746. ]),
  15747. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  15748. ])
  15749. ]);
  15750. }
  15751. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-02b0c54f"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]);
  15752. let request$b = new Request$1().http;
  15753. function getFamousPrescribeList(data) {
  15754. return request$b("/app/index/getFamousPrescribeList", data, "GET");
  15755. }
  15756. function getFamousPrescribeById(data) {
  15757. return request$b("/app/index/getFamousPrescribeById", data, "GET");
  15758. }
  15759. function getQuestionsList(data) {
  15760. return request$b("/app/index/getQuestionsList", data, "GET");
  15761. }
  15762. function getQuestionsById(data) {
  15763. return request$b("/app/index/getQuestionsById", data, "GET");
  15764. }
  15765. function getMedicatedFoodList(data) {
  15766. return request$b("/app/index/getMedicatedFoodList", data, "GET");
  15767. }
  15768. function getMedicatedFoodById(data) {
  15769. return request$b("/app/index/getMedicatedFoodById", data, "GET");
  15770. }
  15771. function getVesselList(data) {
  15772. return request$b("/app/index/getVesselList", data, "GET");
  15773. }
  15774. function getVesselById(data) {
  15775. return request$b("/app/index/getVesselById", data, "GET");
  15776. }
  15777. function getChineseMedicineList(data) {
  15778. return request$b("/app/index/getChineseMedicineList", data, "GET");
  15779. }
  15780. function getChineseMedicineById(data) {
  15781. return request$b("/app/index/getChineseMedicineById", data, "GET");
  15782. }
  15783. const _sfc_main$1T = {
  15784. data() {
  15785. return {
  15786. tabIndex: 1,
  15787. indication: "",
  15788. belongBook: "",
  15789. title: "",
  15790. prescribeType: 0,
  15791. pageNum: 1,
  15792. pageSize: 20,
  15793. typeOptions: [],
  15794. bookOptions: [],
  15795. indicationOptions: [],
  15796. tabs: [
  15797. { name: "按类型", id: "1" },
  15798. { name: "按疾病", id: "2" },
  15799. { name: "按书籍", id: "3" }
  15800. ],
  15801. keyword: "",
  15802. dataList: []
  15803. };
  15804. },
  15805. onLoad() {
  15806. this.getDictByKey("sys_famous_prescribe_type");
  15807. this.getDictByKey("sys_famous_prescribe_indication");
  15808. this.getDictByKey("sys_famous_prescribe_book");
  15809. },
  15810. methods: {
  15811. scrolltolower(e) {
  15812. this.pageNum++;
  15813. this.getFamousPrescribeList();
  15814. formatAppLog("log", "at pages_index/famousPrescribeList.vue:91", e);
  15815. },
  15816. typeClick(item) {
  15817. this.indication = "";
  15818. this.belongBook = "";
  15819. this.prescribeType = parseInt(item.dictValue);
  15820. formatAppLog("log", "at pages_index/famousPrescribeList.vue:97", this.prescribeType);
  15821. this.title = item.dictLabel;
  15822. this.pageNum = 1;
  15823. this.getFamousPrescribeList();
  15824. },
  15825. bookClick(item) {
  15826. this.indication = "";
  15827. this.prescribeType = 0;
  15828. this.belongBook = item.dictLabel;
  15829. this.title = item.dictLabel;
  15830. this.pageNum = 1;
  15831. this.getFamousPrescribeList();
  15832. },
  15833. indicationClick(item) {
  15834. formatAppLog("log", "at pages_index/famousPrescribeList.vue:111", item);
  15835. this.belongBook = "";
  15836. this.prescribeType = 0;
  15837. this.indication = item.dictLabel;
  15838. this.title = item.dictLabel;
  15839. this.pageNum = 1;
  15840. this.getFamousPrescribeList();
  15841. },
  15842. getDictByKey(key) {
  15843. var data = { key };
  15844. getDictByKey(data).then(
  15845. (res) => {
  15846. if (res.code == 200) {
  15847. if (key == "sys_famous_prescribe_type") {
  15848. this.typeOptions = res.data;
  15849. if (this.typeOptions != null && this.typeOptions.length > 0) {
  15850. this.typeClick(this.typeOptions[0]);
  15851. }
  15852. }
  15853. if (key == "sys_famous_prescribe_indication") {
  15854. this.indicationOptions = res.data;
  15855. }
  15856. if (key == "sys_famous_prescribe_book") {
  15857. this.bookOptions = res.data;
  15858. }
  15859. }
  15860. },
  15861. (err) => {
  15862. }
  15863. );
  15864. },
  15865. tabChange(item) {
  15866. this.tabIndex = item.id;
  15867. this.getFamousPrescribeList();
  15868. },
  15869. doSearch() {
  15870. this.pageNum = 1;
  15871. this.getFamousPrescribeList();
  15872. },
  15873. getFamousPrescribeList() {
  15874. var that = this;
  15875. var data = {
  15876. indication: this.indication,
  15877. belongBook: this.belongBook,
  15878. prescribeType: this.prescribeType,
  15879. keyword: this.keyword,
  15880. pageNum: this.pageNum,
  15881. pageSize: this.pageSize
  15882. };
  15883. getFamousPrescribeList(data).then((res) => {
  15884. if (res.code == 200) {
  15885. if (this.pageNum == 1) {
  15886. that.dataList = res.data.list;
  15887. } else {
  15888. that.dataList = that.dataList.concat(res.data.list);
  15889. }
  15890. } else {
  15891. uni.showToast({
  15892. icon: "none",
  15893. title: "请求失败"
  15894. });
  15895. that.dataList = [];
  15896. }
  15897. });
  15898. },
  15899. // 查看详情
  15900. showDetail(item) {
  15901. uni.navigateTo({
  15902. url: "./famousPrescribeDetails?id=" + item.id
  15903. });
  15904. }
  15905. }
  15906. };
  15907. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  15908. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  15909. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  15910. vue.createElementVNode("view", { class: "top-box" }, [
  15911. vue.createCommentVNode(" 搜索框 "),
  15912. vue.createElementVNode("view", { class: "search-cont" }, [
  15913. vue.createElementVNode("view", { class: "inner" }, [
  15914. vue.createElementVNode("image", {
  15915. class: "icon-search",
  15916. src: "/static/images/icon_search.png",
  15917. mode: ""
  15918. }),
  15919. vue.withDirectives(vue.createElementVNode(
  15920. "input",
  15921. {
  15922. type: "text",
  15923. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  15924. placeholder: "输入关键字搜索",
  15925. "confirm-type": "search",
  15926. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  15927. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  15928. },
  15929. null,
  15930. 544
  15931. /* NEED_HYDRATION, NEED_PATCH */
  15932. ), [
  15933. [vue.vModelText, $data.keyword]
  15934. ])
  15935. ])
  15936. ]),
  15937. vue.createElementVNode("view", { class: "tabs" }, [
  15938. vue.createVNode(_component_u_tabs, {
  15939. scrollable: false,
  15940. list: $data.tabs,
  15941. lineColor: "#C39A58",
  15942. onChange: $options.tabChange
  15943. }, null, 8, ["list", "onChange"])
  15944. ])
  15945. ]),
  15946. vue.createElementVNode("view", { class: "cont-box" }, [
  15947. vue.createElementVNode("view", { class: "left" }, [
  15948. vue.createElementVNode("view", { class: "items" }, [
  15949. $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock(
  15950. vue.Fragment,
  15951. { key: 0 },
  15952. vue.renderList($data.typeOptions, (item) => {
  15953. return vue.openBlock(), vue.createElementBlock("view", {
  15954. onClick: ($event) => $options.typeClick(item),
  15955. class: vue.normalizeClass(item.dictValue == $data.prescribeType ? "item ellipsis active" : "item ellipsis")
  15956. }, [
  15957. item.dictValue == $data.prescribeType ? (vue.openBlock(), vue.createElementBlock("text", {
  15958. key: 0,
  15959. class: "line"
  15960. })) : vue.createCommentVNode("v-if", true),
  15961. vue.createTextVNode(
  15962. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  15963. 1
  15964. /* TEXT */
  15965. )
  15966. ], 10, ["onClick"]);
  15967. }),
  15968. 256
  15969. /* UNKEYED_FRAGMENT */
  15970. )) : vue.createCommentVNode("v-if", true),
  15971. $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock(
  15972. vue.Fragment,
  15973. { key: 1 },
  15974. vue.renderList($data.indicationOptions, (item) => {
  15975. return vue.openBlock(), vue.createElementBlock("view", {
  15976. onClick: ($event) => $options.indicationClick(item),
  15977. class: vue.normalizeClass(item.dictLabel == $data.indication ? "item ellipsis active" : "item ellipsis")
  15978. }, [
  15979. item.dictLabel == $data.indication ? (vue.openBlock(), vue.createElementBlock("text", {
  15980. key: 0,
  15981. class: "line"
  15982. })) : vue.createCommentVNode("v-if", true),
  15983. vue.createTextVNode(
  15984. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  15985. 1
  15986. /* TEXT */
  15987. )
  15988. ], 10, ["onClick"]);
  15989. }),
  15990. 256
  15991. /* UNKEYED_FRAGMENT */
  15992. )) : vue.createCommentVNode("v-if", true),
  15993. $data.tabIndex == 3 ? (vue.openBlock(true), vue.createElementBlock(
  15994. vue.Fragment,
  15995. { key: 2 },
  15996. vue.renderList($data.bookOptions, (item) => {
  15997. return vue.openBlock(), vue.createElementBlock("view", {
  15998. onClick: ($event) => $options.bookClick(item),
  15999. class: vue.normalizeClass(item.dictLabel == $data.belongBook ? "item ellipsis active" : "item ellipsis")
  16000. }, [
  16001. item.dictLabel == $data.belongBook ? (vue.openBlock(), vue.createElementBlock("text", {
  16002. key: 0,
  16003. class: "line"
  16004. })) : vue.createCommentVNode("v-if", true),
  16005. vue.createTextVNode(
  16006. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  16007. 1
  16008. /* TEXT */
  16009. )
  16010. ], 10, ["onClick"]);
  16011. }),
  16012. 256
  16013. /* UNKEYED_FRAGMENT */
  16014. )) : vue.createCommentVNode("v-if", true)
  16015. ])
  16016. ]),
  16017. vue.createElementVNode("view", { class: "right" }, [
  16018. vue.createElementVNode(
  16019. "view",
  16020. { class: "title" },
  16021. vue.toDisplayString($data.title),
  16022. 1
  16023. /* TEXT */
  16024. ),
  16025. vue.createElementVNode(
  16026. "scroll-view",
  16027. {
  16028. onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
  16029. "scroll-y": "true",
  16030. style: { "height": "calc(100vh - 180rpx)" }
  16031. },
  16032. [
  16033. vue.createElementVNode("view", { class: "items" }, [
  16034. (vue.openBlock(true), vue.createElementBlock(
  16035. vue.Fragment,
  16036. null,
  16037. vue.renderList($data.dataList, (item) => {
  16038. return vue.openBlock(), vue.createElementBlock("view", {
  16039. class: "r-item",
  16040. onClick: ($event) => $options.showDetail(item)
  16041. }, [
  16042. vue.createElementVNode(
  16043. "view",
  16044. { class: "r-left" },
  16045. vue.toDisplayString(item.prescribeName),
  16046. 1
  16047. /* TEXT */
  16048. ),
  16049. vue.createElementVNode("view", { class: "r-right" }, [
  16050. vue.createElementVNode("image", { src: "/static/images/fire.png" })
  16051. ])
  16052. ], 8, ["onClick"]);
  16053. }),
  16054. 256
  16055. /* UNKEYED_FRAGMENT */
  16056. ))
  16057. ])
  16058. ],
  16059. 32
  16060. /* NEED_HYDRATION */
  16061. )
  16062. ])
  16063. ])
  16064. ]);
  16065. }
  16066. const Pages_indexFamousPrescribeList = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/famousPrescribeList.vue"]]);
  16067. const _sfc_main$1S = {
  16068. data() {
  16069. return {
  16070. advs: [],
  16071. advImgs: [],
  16072. tabIndex: 1,
  16073. id: null,
  16074. item: {}
  16075. };
  16076. },
  16077. onLoad(option) {
  16078. this.id = option.id;
  16079. },
  16080. onShow() {
  16081. this.getAdvList();
  16082. this.getFamousPrescribeById();
  16083. },
  16084. onShareAppMessage(res) {
  16085. if (this.$isLogin()) {
  16086. return {
  16087. title: this.item.prescribeName,
  16088. path: "/pages_index/famousPrescribeDetails?id=" + this.id,
  16089. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  16090. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  16091. };
  16092. }
  16093. },
  16094. //分享到朋友圈
  16095. onShareTimeline(res) {
  16096. if (this.utils.isLogin()) {
  16097. return {
  16098. title: this.item.title,
  16099. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  16100. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  16101. };
  16102. }
  16103. },
  16104. methods: {
  16105. handleAdvClick(index2) {
  16106. var ad = this.advs[index2];
  16107. formatAppLog("log", "at pages_index/famousPrescribeDetails.vue:95", ad.advUrl);
  16108. if (ad.showType == 1) {
  16109. uni.setStorageSync("url", ad.advUrl);
  16110. uni.navigateTo({
  16111. url: "h5"
  16112. });
  16113. } else if (ad.showType == 2) {
  16114. uni.navigateTo({
  16115. url: ad.advUrl
  16116. });
  16117. } else if (ad.showType == 3) {
  16118. uni.setStorageSync("content", ad.content);
  16119. uni.navigateTo({
  16120. url: "content"
  16121. });
  16122. }
  16123. },
  16124. getAdvList() {
  16125. var that = this;
  16126. var data = {
  16127. advType: 9
  16128. };
  16129. getAdvList(data).then((res) => {
  16130. if (res.code == 200) {
  16131. that.advImgs = [];
  16132. that.advs = [];
  16133. res.data.forEach(function(element) {
  16134. if (element.imageUrl != null && element.imageUrl != "") {
  16135. that.advs.push(element);
  16136. that.advImgs.push(element.imageUrl);
  16137. }
  16138. });
  16139. } else {
  16140. uni.showToast({
  16141. icon: "none",
  16142. title: "请求失败"
  16143. });
  16144. }
  16145. });
  16146. },
  16147. tabClick(index2) {
  16148. this.tabIndex = index2;
  16149. },
  16150. getFamousPrescribeById() {
  16151. let data = { id: this.id };
  16152. getFamousPrescribeById(data).then(
  16153. (res) => {
  16154. if (res.code == 200) {
  16155. this.item = res.data;
  16156. } else {
  16157. uni.showToast({
  16158. icon: "none",
  16159. title: "请求失败"
  16160. });
  16161. }
  16162. },
  16163. (rej) => {
  16164. }
  16165. );
  16166. }
  16167. }
  16168. };
  16169. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  16170. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  16171. return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  16172. key: 0,
  16173. class: "content"
  16174. }, [
  16175. vue.createElementVNode("view", { class: "image" }, [
  16176. vue.createElementVNode("image", {
  16177. mode: "aspectFill",
  16178. src: $data.item.imgUrl
  16179. }, null, 8, ["src"])
  16180. ]),
  16181. vue.createElementVNode("view", { class: "detail-cont" }, [
  16182. vue.createElementVNode("view", { class: "title-box" }, [
  16183. vue.createElementVNode("view", { class: "line" }),
  16184. vue.createElementVNode(
  16185. "view",
  16186. { class: "title" },
  16187. vue.toDisplayString($data.item.prescribeName),
  16188. 1
  16189. /* TEXT */
  16190. ),
  16191. vue.createElementVNode(
  16192. "view",
  16193. { class: "title-py" },
  16194. vue.toDisplayString($data.item.pinyin),
  16195. 1
  16196. /* TEXT */
  16197. )
  16198. ]),
  16199. vue.createElementVNode(
  16200. "view",
  16201. { class: "desc" },
  16202. vue.toDisplayString($data.item.actionTitle),
  16203. 1
  16204. /* TEXT */
  16205. ),
  16206. vue.createElementVNode("view", { class: "line-h" }),
  16207. vue.createElementVNode("view", { class: "tabs" }, [
  16208. vue.createElementVNode(
  16209. "view",
  16210. {
  16211. onClick: _cache[0] || (_cache[0] = ($event) => $options.tabClick(1)),
  16212. class: vue.normalizeClass($data.tabIndex == 1 ? "tab1 active" : "tab1")
  16213. },
  16214. " 基本用法 ",
  16215. 2
  16216. /* CLASS */
  16217. ),
  16218. vue.createElementVNode(
  16219. "view",
  16220. {
  16221. onClick: _cache[1] || (_cache[1] = ($event) => $options.tabClick(2)),
  16222. class: vue.normalizeClass($data.tabIndex == 2 ? "tab2 active" : "tab2")
  16223. },
  16224. " 药物作用 ",
  16225. 2
  16226. /* CLASS */
  16227. ),
  16228. vue.createElementVNode(
  16229. "view",
  16230. {
  16231. onClick: _cache[2] || (_cache[2] = ($event) => $options.tabClick(3)),
  16232. class: vue.normalizeClass($data.tabIndex == 3 ? "tab3 active" : "tab3")
  16233. },
  16234. " 用药方法 ",
  16235. 2
  16236. /* CLASS */
  16237. ),
  16238. vue.createElementVNode(
  16239. "view",
  16240. {
  16241. onClick: _cache[3] || (_cache[3] = ($event) => $options.tabClick(4)),
  16242. class: vue.normalizeClass($data.tabIndex == 4 ? "tab4 active" : "tab4")
  16243. },
  16244. " 注意事项 ",
  16245. 2
  16246. /* CLASS */
  16247. )
  16248. ]),
  16249. $data.tabIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  16250. key: 0,
  16251. class: "content",
  16252. innerHTML: $data.item.descs
  16253. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
  16254. $data.tabIndex == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  16255. key: 1,
  16256. class: "content",
  16257. innerHTML: $data.item.action
  16258. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
  16259. $data.tabIndex == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  16260. key: 2,
  16261. class: "content",
  16262. innerHTML: $data.item.usageMethod
  16263. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
  16264. $data.tabIndex == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  16265. key: 3,
  16266. class: "content",
  16267. innerHTML: $data.item.msg
  16268. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
  16269. ]),
  16270. vue.createElementVNode("view", { class: "ad" }, [
  16271. vue.createVNode(_component_u_swiper, {
  16272. list: $data.advImgs,
  16273. indicator: "",
  16274. indicatorMode: "line",
  16275. circular: "",
  16276. onClick: $options.handleAdvClick
  16277. }, null, 8, ["list", "onClick"])
  16278. ])
  16279. ])) : vue.createCommentVNode("v-if", true);
  16280. }
  16281. const Pages_indexFamousPrescribeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/famousPrescribeDetails.vue"]]);
  16282. const _sfc_main$1R = {
  16283. data() {
  16284. return {
  16285. tabIndex: 1,
  16286. vessel: "",
  16287. region: "",
  16288. title: "",
  16289. pageNum: 1,
  16290. pageSize: 20,
  16291. vesselOptions: [],
  16292. regionOptions: [],
  16293. tabs: [
  16294. { name: "按经络查询", id: "1" },
  16295. { name: "按部位查询", id: "2" }
  16296. ],
  16297. keyword: "",
  16298. dataList: []
  16299. };
  16300. },
  16301. onLoad() {
  16302. this.getDictByKey("sys_vessel");
  16303. this.getDictByKey("sys_vessel_region");
  16304. this.getVesselList();
  16305. },
  16306. methods: {
  16307. scrolltolower(e) {
  16308. this.pageNum++;
  16309. this.getVesselList();
  16310. formatAppLog("log", "at pages_index/vesselList.vue:85", e);
  16311. },
  16312. regionClick(item) {
  16313. this.vessel = "";
  16314. this.region = item.dictLabel;
  16315. this.title = item.dictLabel;
  16316. this.pageNum = 1;
  16317. this.getVesselList();
  16318. },
  16319. vesselClick(item) {
  16320. this.region = "";
  16321. this.vessel = item.dictLabel;
  16322. this.title = item.dictLabel;
  16323. this.pageNum = 1;
  16324. this.getVesselList();
  16325. },
  16326. getDictByKey(key) {
  16327. var data = { key };
  16328. getDictByKey(data).then(
  16329. (res) => {
  16330. if (res.code == 200) {
  16331. if (key == "sys_vessel") {
  16332. this.vesselOptions = res.data;
  16333. }
  16334. if (key == "sys_vessel_region") {
  16335. this.regionOptions = res.data;
  16336. }
  16337. }
  16338. },
  16339. (err) => {
  16340. }
  16341. );
  16342. },
  16343. tabChange(item) {
  16344. this.tabIndex = item.id;
  16345. this.getVesselList();
  16346. },
  16347. doSearch() {
  16348. this.pageNum = 1;
  16349. this.getVesselList();
  16350. },
  16351. getVesselList() {
  16352. var that = this;
  16353. var data = {
  16354. vessel: this.vessel,
  16355. region: this.region,
  16356. keyword: this.keyword,
  16357. pageNum: this.pageNum,
  16358. pageSize: this.pageSize
  16359. };
  16360. getVesselList(data).then((res) => {
  16361. if (res.code == 200) {
  16362. if (this.pageNum == 1) {
  16363. that.dataList = res.data.list;
  16364. } else {
  16365. that.dataList = that.dataList.concat(res.data.list);
  16366. }
  16367. } else {
  16368. uni.showToast({
  16369. icon: "none",
  16370. title: "请求失败"
  16371. });
  16372. that.dataList = [];
  16373. }
  16374. });
  16375. },
  16376. // 查看详情
  16377. showDetail(item) {
  16378. uni.navigateTo({
  16379. url: "./vesselDetails?id=" + item.id
  16380. });
  16381. }
  16382. }
  16383. };
  16384. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  16385. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  16386. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  16387. vue.createElementVNode("view", { class: "top-box" }, [
  16388. vue.createCommentVNode(" 搜索框 "),
  16389. vue.createElementVNode("view", { class: "search-cont" }, [
  16390. vue.createElementVNode("view", { class: "inner" }, [
  16391. vue.createElementVNode("image", {
  16392. class: "icon-search",
  16393. src: "/static/images/icon_search.png",
  16394. mode: ""
  16395. }),
  16396. vue.withDirectives(vue.createElementVNode(
  16397. "input",
  16398. {
  16399. type: "text",
  16400. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  16401. placeholder: "输入关键字搜索",
  16402. "confirm-type": "search",
  16403. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  16404. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  16405. },
  16406. null,
  16407. 544
  16408. /* NEED_HYDRATION, NEED_PATCH */
  16409. ), [
  16410. [vue.vModelText, $data.keyword]
  16411. ])
  16412. ])
  16413. ]),
  16414. vue.createElementVNode("view", { class: "tabs" }, [
  16415. vue.createVNode(_component_u_tabs, {
  16416. scrollable: false,
  16417. list: $data.tabs,
  16418. lineColor: "#C39A58",
  16419. onChange: $options.tabChange
  16420. }, null, 8, ["list", "onChange"])
  16421. ])
  16422. ]),
  16423. vue.createElementVNode("view", { class: "cont-box" }, [
  16424. vue.createElementVNode("view", { class: "left" }, [
  16425. vue.createElementVNode("view", { class: "items" }, [
  16426. $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock(
  16427. vue.Fragment,
  16428. { key: 0 },
  16429. vue.renderList($data.vesselOptions, (item) => {
  16430. return vue.openBlock(), vue.createElementBlock("view", {
  16431. onClick: ($event) => $options.vesselClick(item),
  16432. class: vue.normalizeClass(item.dictValue == $data.vessel ? "item ellipsis active" : "item ellipsis")
  16433. }, [
  16434. item.dictValue == $data.vessel ? (vue.openBlock(), vue.createElementBlock("text", {
  16435. key: 0,
  16436. class: "line"
  16437. })) : vue.createCommentVNode("v-if", true),
  16438. vue.createTextVNode(
  16439. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  16440. 1
  16441. /* TEXT */
  16442. )
  16443. ], 10, ["onClick"]);
  16444. }),
  16445. 256
  16446. /* UNKEYED_FRAGMENT */
  16447. )) : vue.createCommentVNode("v-if", true),
  16448. $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock(
  16449. vue.Fragment,
  16450. { key: 1 },
  16451. vue.renderList($data.regionOptions, (item) => {
  16452. return vue.openBlock(), vue.createElementBlock("view", {
  16453. onClick: ($event) => $options.regionClick(item),
  16454. class: vue.normalizeClass(item.dictLabel == $data.region ? "item ellipsis active" : "item ellipsis")
  16455. }, [
  16456. item.dictLabel == $data.region ? (vue.openBlock(), vue.createElementBlock("text", {
  16457. key: 0,
  16458. class: "line"
  16459. })) : vue.createCommentVNode("v-if", true),
  16460. vue.createTextVNode(
  16461. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  16462. 1
  16463. /* TEXT */
  16464. )
  16465. ], 10, ["onClick"]);
  16466. }),
  16467. 256
  16468. /* UNKEYED_FRAGMENT */
  16469. )) : vue.createCommentVNode("v-if", true)
  16470. ])
  16471. ]),
  16472. vue.createElementVNode("view", { class: "right" }, [
  16473. vue.createElementVNode(
  16474. "view",
  16475. { class: "title" },
  16476. vue.toDisplayString($data.title),
  16477. 1
  16478. /* TEXT */
  16479. ),
  16480. vue.createElementVNode(
  16481. "scroll-view",
  16482. {
  16483. onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
  16484. "scroll-y": "true",
  16485. style: { "height": "calc(100vh - 180rpx)" }
  16486. },
  16487. [
  16488. vue.createElementVNode("view", { class: "items" }, [
  16489. (vue.openBlock(true), vue.createElementBlock(
  16490. vue.Fragment,
  16491. null,
  16492. vue.renderList($data.dataList, (item) => {
  16493. return vue.openBlock(), vue.createElementBlock("view", {
  16494. class: "r-item",
  16495. onClick: ($event) => $options.showDetail(item)
  16496. }, [
  16497. vue.createElementVNode(
  16498. "view",
  16499. { class: "r-left" },
  16500. vue.toDisplayString(item.vesselName),
  16501. 1
  16502. /* TEXT */
  16503. ),
  16504. vue.createElementVNode("view", { class: "r-right" }, [
  16505. vue.createElementVNode("image", { src: "/static/images/fire.png" })
  16506. ])
  16507. ], 8, ["onClick"]);
  16508. }),
  16509. 256
  16510. /* UNKEYED_FRAGMENT */
  16511. ))
  16512. ])
  16513. ],
  16514. 32
  16515. /* NEED_HYDRATION */
  16516. )
  16517. ])
  16518. ])
  16519. ]);
  16520. }
  16521. const Pages_indexVesselList = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/vesselList.vue"]]);
  16522. const _sfc_main$1Q = {
  16523. data() {
  16524. return {
  16525. advs: [],
  16526. advImgs: [],
  16527. tabIndex: 1,
  16528. item: {}
  16529. };
  16530. },
  16531. onLoad(option) {
  16532. this.id = option.id;
  16533. },
  16534. onShow() {
  16535. this.getAdvList();
  16536. this.getVesselById();
  16537. },
  16538. //发送给朋友
  16539. onShareAppMessage(res) {
  16540. if (this.$isLogin()) {
  16541. return {
  16542. title: this.item.vesselName,
  16543. path: "/pages_index/vesselDetails?id=" + this.id,
  16544. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  16545. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  16546. };
  16547. }
  16548. },
  16549. //分享到朋友圈
  16550. onShareTimeline(res) {
  16551. if (this.utils.isLogin()) {
  16552. return {
  16553. title: this.item.vesselName,
  16554. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  16555. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  16556. };
  16557. }
  16558. },
  16559. methods: {
  16560. handleAdvClick(index2) {
  16561. var ad = this.advs[index2];
  16562. formatAppLog("log", "at pages_index/vesselDetails.vue:75", ad.advUrl);
  16563. if (ad.showType == 1) {
  16564. uni.setStorageSync("url", ad.advUrl);
  16565. uni.navigateTo({
  16566. url: "h5"
  16567. });
  16568. } else if (ad.showType == 2) {
  16569. uni.navigateTo({
  16570. url: ad.advUrl
  16571. });
  16572. } else if (ad.showType == 3) {
  16573. uni.setStorageSync("content", ad.content);
  16574. uni.navigateTo({
  16575. url: "content"
  16576. });
  16577. }
  16578. },
  16579. getAdvList() {
  16580. var that = this;
  16581. var data = {
  16582. advType: 5
  16583. };
  16584. getAdvList(data).then((res) => {
  16585. if (res.code == 200) {
  16586. that.advImgs = [];
  16587. that.advs = [];
  16588. res.data.forEach(function(element) {
  16589. if (element.imageUrl != null && element.imageUrl != "") {
  16590. that.advs.push(element);
  16591. that.advImgs.push(element.imageUrl);
  16592. }
  16593. });
  16594. } else {
  16595. uni.showToast({
  16596. icon: "none",
  16597. title: "请求失败"
  16598. });
  16599. }
  16600. });
  16601. },
  16602. getVesselById() {
  16603. let data = { id: this.id };
  16604. getVesselById(data).then(
  16605. (res) => {
  16606. if (res.code == 200) {
  16607. this.item = res.data;
  16608. } else {
  16609. uni.showToast({
  16610. icon: "none",
  16611. title: "请求失败"
  16612. });
  16613. }
  16614. },
  16615. (rej) => {
  16616. }
  16617. );
  16618. }
  16619. }
  16620. };
  16621. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  16622. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  16623. return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  16624. key: 0,
  16625. class: "content"
  16626. }, [
  16627. vue.createElementVNode("view", { class: "image" }, [
  16628. vue.createElementVNode("image", {
  16629. mode: "aspectFill",
  16630. src: $data.item.imgUrl
  16631. }, null, 8, ["src"])
  16632. ]),
  16633. vue.createElementVNode("view", { class: "detail-cont" }, [
  16634. vue.createElementVNode("view", { class: "title-box" }, [
  16635. vue.createElementVNode("view", { class: "line" }),
  16636. vue.createElementVNode(
  16637. "view",
  16638. { class: "title" },
  16639. vue.toDisplayString($data.item.vesselName),
  16640. 1
  16641. /* TEXT */
  16642. ),
  16643. vue.createElementVNode(
  16644. "view",
  16645. { class: "title-py" },
  16646. vue.toDisplayString($data.item.pinyin),
  16647. 1
  16648. /* TEXT */
  16649. )
  16650. ]),
  16651. vue.createElementVNode(
  16652. "view",
  16653. { class: "desc" },
  16654. vue.toDisplayString($data.item.actionTitle),
  16655. 1
  16656. /* TEXT */
  16657. ),
  16658. vue.createElementVNode("view", { class: "line-h" }),
  16659. vue.createElementVNode("view", {
  16660. class: "content",
  16661. innerHTML: $data.item.descs
  16662. }, null, 8, ["innerHTML"])
  16663. ]),
  16664. vue.createElementVNode("view", { class: "ad" }, [
  16665. vue.createVNode(_component_u_swiper, {
  16666. list: $data.advImgs,
  16667. indicator: "",
  16668. indicatorMode: "line",
  16669. circular: "",
  16670. onClick: $options.handleAdvClick
  16671. }, null, 8, ["list", "onClick"])
  16672. ])
  16673. ])) : vue.createCommentVNode("v-if", true);
  16674. }
  16675. const Pages_indexVesselDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/vesselDetails.vue"]]);
  16676. const _sfc_main$1P = {
  16677. data() {
  16678. return {
  16679. tabIndex: 1,
  16680. indication: "",
  16681. flavor: "",
  16682. vessel: "",
  16683. title: "",
  16684. pageNum: 1,
  16685. pageSize: 20,
  16686. flavorOptions: [],
  16687. indicationOptions: [],
  16688. tabs: [
  16689. { name: "按五味", id: "1" },
  16690. { name: "按疾病", id: "2" }
  16691. ],
  16692. keyword: "",
  16693. dataList: []
  16694. };
  16695. },
  16696. onLoad() {
  16697. this.getDictByKey("sys_chinese_medicine_flavor");
  16698. this.getDictByKey("sys_indication");
  16699. this.getChineseMedicineList();
  16700. },
  16701. methods: {
  16702. scrolltolower(e) {
  16703. this.pageNum++;
  16704. this.getChineseMedicineList();
  16705. formatAppLog("log", "at pages_index/chineseMedicineList.vue:83", e);
  16706. },
  16707. indicationClick(item) {
  16708. this.flavor = "";
  16709. this.indication = item.dictLabel;
  16710. this.title = item.dictLabel;
  16711. this.pageNum = 1;
  16712. this.getChineseMedicineList();
  16713. },
  16714. flavorClick(item) {
  16715. formatAppLog("log", "at pages_index/chineseMedicineList.vue:93", item);
  16716. this.indication = "";
  16717. this.flavor = item.dictLabel;
  16718. this.title = item.dictLabel;
  16719. this.pageNum = 1;
  16720. this.getChineseMedicineList();
  16721. },
  16722. getDictByKey(key) {
  16723. var data = { key };
  16724. getDictByKey(data).then(
  16725. (res) => {
  16726. if (res.code == 200) {
  16727. if (key == "sys_indication") {
  16728. this.indicationOptions = res.data;
  16729. }
  16730. if (key == "sys_chinese_medicine_flavor") {
  16731. this.flavorOptions = res.data;
  16732. }
  16733. }
  16734. },
  16735. (err) => {
  16736. }
  16737. );
  16738. },
  16739. tabChange(item) {
  16740. this.tabIndex = item.id;
  16741. this.getChineseMedicineList();
  16742. },
  16743. doSearch() {
  16744. this.pageNum = 1;
  16745. this.getChineseMedicineList();
  16746. },
  16747. getChineseMedicineList() {
  16748. var that = this;
  16749. var data = {
  16750. indication: this.indication,
  16751. flavor: this.flavor,
  16752. vessel: this.vessel,
  16753. keyword: this.keyword,
  16754. pageNum: this.pageNum,
  16755. pageSize: this.pageSize
  16756. };
  16757. getChineseMedicineList(data).then((res) => {
  16758. if (res.code == 200) {
  16759. if (this.pageNum == 1) {
  16760. that.dataList = res.data.list;
  16761. } else {
  16762. that.dataList = that.dataList.concat(res.data.list);
  16763. }
  16764. } else {
  16765. uni.showToast({
  16766. icon: "none",
  16767. title: "请求失败"
  16768. });
  16769. that.dataList = [];
  16770. }
  16771. });
  16772. },
  16773. // 查看详情
  16774. showDetail(item) {
  16775. uni.navigateTo({
  16776. url: "./chineseMedicineDetails?id=" + item.id
  16777. });
  16778. }
  16779. }
  16780. };
  16781. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  16782. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  16783. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  16784. vue.createElementVNode("view", { class: "top-box" }, [
  16785. vue.createCommentVNode(" 搜索框 "),
  16786. vue.createElementVNode("view", { class: "search-cont" }, [
  16787. vue.createElementVNode("view", { class: "inner" }, [
  16788. vue.createElementVNode("image", {
  16789. class: "icon-search",
  16790. src: "/static/images/icon_search.png",
  16791. mode: ""
  16792. }),
  16793. vue.withDirectives(vue.createElementVNode(
  16794. "input",
  16795. {
  16796. type: "text",
  16797. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  16798. placeholder: "输入关键字搜索",
  16799. "confirm-type": "search",
  16800. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  16801. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  16802. },
  16803. null,
  16804. 544
  16805. /* NEED_HYDRATION, NEED_PATCH */
  16806. ), [
  16807. [vue.vModelText, $data.keyword]
  16808. ])
  16809. ])
  16810. ]),
  16811. vue.createElementVNode("view", { class: "tabs" }, [
  16812. vue.createVNode(_component_u_tabs, {
  16813. scrollable: false,
  16814. list: $data.tabs,
  16815. lineColor: "#C39A58",
  16816. onChange: $options.tabChange
  16817. }, null, 8, ["list", "onChange"])
  16818. ])
  16819. ]),
  16820. vue.createElementVNode("view", { class: "cont-box" }, [
  16821. vue.createElementVNode("view", { class: "left" }, [
  16822. vue.createElementVNode("view", { class: "items" }, [
  16823. $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock(
  16824. vue.Fragment,
  16825. { key: 0 },
  16826. vue.renderList($data.flavorOptions, (item) => {
  16827. return vue.openBlock(), vue.createElementBlock("view", {
  16828. onClick: ($event) => $options.flavorClick(item),
  16829. class: vue.normalizeClass(item.dictValue == $data.flavor ? "item ellipsis active" : "item ellipsis")
  16830. }, [
  16831. item.dictValue == $data.flavor ? (vue.openBlock(), vue.createElementBlock("text", {
  16832. key: 0,
  16833. class: "line"
  16834. })) : vue.createCommentVNode("v-if", true),
  16835. vue.createTextVNode(
  16836. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  16837. 1
  16838. /* TEXT */
  16839. )
  16840. ], 10, ["onClick"]);
  16841. }),
  16842. 256
  16843. /* UNKEYED_FRAGMENT */
  16844. )) : vue.createCommentVNode("v-if", true),
  16845. $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock(
  16846. vue.Fragment,
  16847. { key: 1 },
  16848. vue.renderList($data.indicationOptions, (item) => {
  16849. return vue.openBlock(), vue.createElementBlock("view", {
  16850. onClick: ($event) => $options.indicationClick(item),
  16851. class: vue.normalizeClass(item.dictLabel == $data.indication ? "item ellipsis active" : "item ellipsis")
  16852. }, [
  16853. item.dictLabel == $data.indication ? (vue.openBlock(), vue.createElementBlock("text", {
  16854. key: 0,
  16855. class: "line"
  16856. })) : vue.createCommentVNode("v-if", true),
  16857. vue.createTextVNode(
  16858. " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
  16859. 1
  16860. /* TEXT */
  16861. )
  16862. ], 10, ["onClick"]);
  16863. }),
  16864. 256
  16865. /* UNKEYED_FRAGMENT */
  16866. )) : vue.createCommentVNode("v-if", true)
  16867. ])
  16868. ]),
  16869. vue.createElementVNode("view", { class: "right" }, [
  16870. vue.createElementVNode(
  16871. "view",
  16872. { class: "title" },
  16873. vue.toDisplayString($data.title),
  16874. 1
  16875. /* TEXT */
  16876. ),
  16877. vue.createElementVNode(
  16878. "scroll-view",
  16879. {
  16880. onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
  16881. "scroll-y": "true",
  16882. style: { "height": "calc(100vh - 180rpx)" }
  16883. },
  16884. [
  16885. vue.createElementVNode("view", { class: "items" }, [
  16886. (vue.openBlock(true), vue.createElementBlock(
  16887. vue.Fragment,
  16888. null,
  16889. vue.renderList($data.dataList, (item) => {
  16890. return vue.openBlock(), vue.createElementBlock("view", {
  16891. class: "r-item",
  16892. onClick: ($event) => $options.showDetail(item)
  16893. }, [
  16894. vue.createElementVNode(
  16895. "view",
  16896. { class: "r-left" },
  16897. vue.toDisplayString(item.medicineName),
  16898. 1
  16899. /* TEXT */
  16900. ),
  16901. vue.createElementVNode("view", { class: "r-right" }, [
  16902. vue.createElementVNode("image", { src: "/static/images/fire.png" })
  16903. ])
  16904. ], 8, ["onClick"]);
  16905. }),
  16906. 256
  16907. /* UNKEYED_FRAGMENT */
  16908. ))
  16909. ])
  16910. ],
  16911. 32
  16912. /* NEED_HYDRATION */
  16913. )
  16914. ])
  16915. ])
  16916. ]);
  16917. }
  16918. const Pages_indexChineseMedicineList = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/chineseMedicineList.vue"]]);
  16919. const _sfc_main$1O = {
  16920. data() {
  16921. return {
  16922. advs: [],
  16923. advImgs: [],
  16924. tabIndex: 1,
  16925. articleId: null,
  16926. item: {}
  16927. };
  16928. },
  16929. onLoad(option) {
  16930. this.id = option.id;
  16931. },
  16932. onShow() {
  16933. this.getChineseMedicineById();
  16934. this.getAdvList();
  16935. },
  16936. onShareAppMessage(res) {
  16937. if (this.$isLogin()) {
  16938. return {
  16939. title: this.item.medicineName,
  16940. path: "/pages_index/chineseMedicineDetails?id=" + this.id,
  16941. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  16942. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  16943. };
  16944. }
  16945. },
  16946. //分享到朋友圈
  16947. onShareTimeline(res) {
  16948. if (this.utils.isLogin()) {
  16949. return {
  16950. title: this.item.title,
  16951. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  16952. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  16953. };
  16954. }
  16955. },
  16956. methods: {
  16957. handleAdvClick(index2) {
  16958. var ad = this.advs[index2];
  16959. formatAppLog("log", "at pages_index/chineseMedicineDetails.vue:95", ad.advUrl);
  16960. if (ad.showType == 1) {
  16961. uni.setStorageSync("url", ad.advUrl);
  16962. uni.navigateTo({
  16963. url: "h5"
  16964. });
  16965. } else if (ad.showType == 2) {
  16966. uni.navigateTo({
  16967. url: ad.advUrl
  16968. });
  16969. } else if (ad.showType == 3) {
  16970. uni.setStorageSync("content", ad.content);
  16971. uni.navigateTo({
  16972. url: "content"
  16973. });
  16974. }
  16975. },
  16976. getAdvList() {
  16977. var that = this;
  16978. var data = {
  16979. advType: 8
  16980. };
  16981. getAdvList(data).then((res) => {
  16982. if (res.code == 200) {
  16983. that.advImgs = [];
  16984. that.advs = [];
  16985. res.data.forEach(function(element) {
  16986. if (element.imageUrl != null && element.imageUrl != "") {
  16987. that.advs.push(element);
  16988. that.advImgs.push(element.imageUrl);
  16989. }
  16990. });
  16991. } else {
  16992. uni.showToast({
  16993. icon: "none",
  16994. title: "请求失败"
  16995. });
  16996. }
  16997. });
  16998. },
  16999. tabClick(index2) {
  17000. this.tabIndex = index2;
  17001. },
  17002. getChineseMedicineById() {
  17003. let data = { id: this.id };
  17004. getChineseMedicineById(data).then(
  17005. (res) => {
  17006. if (res.code == 200) {
  17007. this.item = res.data;
  17008. } else {
  17009. uni.showToast({
  17010. icon: "none",
  17011. title: "请求失败"
  17012. });
  17013. }
  17014. },
  17015. (rej) => {
  17016. }
  17017. );
  17018. }
  17019. }
  17020. };
  17021. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  17022. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  17023. return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  17024. key: 0,
  17025. class: "content"
  17026. }, [
  17027. vue.createElementVNode("view", { class: "image" }, [
  17028. vue.createElementVNode("image", {
  17029. mode: "aspectFill",
  17030. src: $data.item.imgUrl
  17031. }, null, 8, ["src"])
  17032. ]),
  17033. vue.createElementVNode("view", { class: "detail-cont" }, [
  17034. vue.createElementVNode("view", { class: "title-box" }, [
  17035. vue.createElementVNode("view", { class: "line" }),
  17036. vue.createElementVNode(
  17037. "view",
  17038. { class: "title" },
  17039. vue.toDisplayString($data.item.medicineName),
  17040. 1
  17041. /* TEXT */
  17042. ),
  17043. vue.createElementVNode(
  17044. "view",
  17045. { class: "title-py" },
  17046. vue.toDisplayString($data.item.pinyin),
  17047. 1
  17048. /* TEXT */
  17049. )
  17050. ]),
  17051. vue.createElementVNode(
  17052. "view",
  17053. { class: "desc" },
  17054. vue.toDisplayString($data.item.actionTitle),
  17055. 1
  17056. /* TEXT */
  17057. ),
  17058. vue.createElementVNode("view", { class: "line-h" }),
  17059. vue.createElementVNode("view", { class: "tabs" }, [
  17060. vue.createElementVNode(
  17061. "view",
  17062. {
  17063. onClick: _cache[0] || (_cache[0] = ($event) => $options.tabClick(1)),
  17064. class: vue.normalizeClass($data.tabIndex == 1 ? "tab1 active" : "tab1")
  17065. },
  17066. " 基本用法 ",
  17067. 2
  17068. /* CLASS */
  17069. ),
  17070. vue.createElementVNode(
  17071. "view",
  17072. {
  17073. onClick: _cache[1] || (_cache[1] = ($event) => $options.tabClick(2)),
  17074. class: vue.normalizeClass($data.tabIndex == 2 ? "tab2 active" : "tab2")
  17075. },
  17076. " 药物作用 ",
  17077. 2
  17078. /* CLASS */
  17079. ),
  17080. vue.createElementVNode(
  17081. "view",
  17082. {
  17083. onClick: _cache[2] || (_cache[2] = ($event) => $options.tabClick(3)),
  17084. class: vue.normalizeClass($data.tabIndex == 3 ? "tab3 active" : "tab3")
  17085. },
  17086. " 用药方法 ",
  17087. 2
  17088. /* CLASS */
  17089. ),
  17090. vue.createElementVNode(
  17091. "view",
  17092. {
  17093. onClick: _cache[3] || (_cache[3] = ($event) => $options.tabClick(4)),
  17094. class: vue.normalizeClass($data.tabIndex == 4 ? "tab4 active" : "tab4")
  17095. },
  17096. " 注意事项 ",
  17097. 2
  17098. /* CLASS */
  17099. )
  17100. ]),
  17101. $data.tabIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  17102. key: 0,
  17103. class: "content",
  17104. innerHTML: $data.item.descs
  17105. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
  17106. $data.tabIndex == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  17107. key: 1,
  17108. class: "content",
  17109. innerHTML: $data.item.action
  17110. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
  17111. $data.tabIndex == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  17112. key: 2,
  17113. class: "content",
  17114. innerHTML: $data.item.usageMethod
  17115. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
  17116. $data.tabIndex == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  17117. key: 3,
  17118. class: "content",
  17119. innerHTML: $data.item.msg
  17120. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
  17121. ]),
  17122. vue.createElementVNode("view", { class: "ad" }, [
  17123. vue.createVNode(_component_u_swiper, {
  17124. list: $data.advImgs,
  17125. indicator: "",
  17126. indicatorMode: "line",
  17127. circular: "",
  17128. onClick: $options.handleAdvClick
  17129. }, null, 8, ["list", "onClick"])
  17130. ])
  17131. ])) : vue.createCommentVNode("v-if", true);
  17132. }
  17133. const Pages_indexChineseMedicineDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/chineseMedicineDetails.vue"]]);
  17134. const _sfc_main$1N = {
  17135. mixins: [MescrollMixin],
  17136. data() {
  17137. return {
  17138. foodOptions: [],
  17139. actionOptions: [],
  17140. indicationOptions: [],
  17141. action: "",
  17142. food: "",
  17143. indications: "",
  17144. keyword: "",
  17145. mescroll: null,
  17146. downOption: {
  17147. //下拉刷新
  17148. use: true,
  17149. auto: false
  17150. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  17151. },
  17152. upOption: {
  17153. onScroll: false,
  17154. use: true,
  17155. // 是否启用上拉加载; 默认true
  17156. page: {
  17157. pae: 0,
  17158. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  17159. size: 10
  17160. // 每页数据的数量,默认10
  17161. },
  17162. noMoreSize: 10,
  17163. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  17164. textNoMore: "已经到底了",
  17165. empty: {
  17166. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  17167. tip: "暂无数据"
  17168. }
  17169. },
  17170. dataList: []
  17171. };
  17172. },
  17173. onShow() {
  17174. this.getDictByKey("sys_medicated_food");
  17175. this.getDictByKey("sys_medicated_food_action");
  17176. this.getDictByKey("sys_indication");
  17177. },
  17178. methods: {
  17179. getDictByKey(key) {
  17180. var data = { key };
  17181. getDictByKey(data).then(
  17182. (res) => {
  17183. if (res.code == 200) {
  17184. if (key == "sys_medicated_food") {
  17185. this.foodOptions = res.data;
  17186. }
  17187. if (key == "sys_medicated_food_action") {
  17188. this.actionOptions = res.data;
  17189. }
  17190. if (key == "sys_indication") {
  17191. this.indicationOptions = res.data;
  17192. }
  17193. }
  17194. },
  17195. (err) => {
  17196. }
  17197. );
  17198. },
  17199. doSearch() {
  17200. this.mescroll.resetUpScroll();
  17201. },
  17202. mescrollInit(mescroll) {
  17203. this.mescroll = mescroll;
  17204. },
  17205. /*下拉刷新的回调 */
  17206. downCallback(mescroll) {
  17207. mescroll.resetUpScroll();
  17208. },
  17209. upCallback(page2) {
  17210. var that = this;
  17211. var data = {
  17212. food: this.food,
  17213. action: this.action,
  17214. indications: this.indications,
  17215. keyword: this.keyword,
  17216. pageNum: page2.num,
  17217. pageSize: page2.size
  17218. };
  17219. getMedicatedFoodList(data).then((res) => {
  17220. if (res.code == 200) {
  17221. if (page2.num == 1) {
  17222. that.dataList = res.data.list;
  17223. } else {
  17224. that.dataList = that.dataList.concat(res.data.list);
  17225. }
  17226. that.mescroll.endBySize(res.data.list.length, res.data.total);
  17227. } else {
  17228. uni.showToast({
  17229. icon: "none",
  17230. title: "请求失败"
  17231. });
  17232. that.dataList = null;
  17233. that.mescroll.endErr();
  17234. }
  17235. });
  17236. },
  17237. choseAction(item) {
  17238. this.action = item.dictLabel;
  17239. this.mescroll.resetUpScroll();
  17240. },
  17241. choseFood(item) {
  17242. this.food = item.dictLabel;
  17243. this.mescroll.resetUpScroll();
  17244. },
  17245. choseIndications(item) {
  17246. this.indications = item.dictLabel;
  17247. this.mescroll.resetUpScroll();
  17248. },
  17249. // 查看详情
  17250. showDetail(item) {
  17251. uni.navigateTo({
  17252. url: "./medicatedFoodDetails?id=" + item.id
  17253. });
  17254. }
  17255. }
  17256. };
  17257. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  17258. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  17259. return vue.openBlock(), vue.createElementBlock("view", null, [
  17260. vue.createElementVNode("view", { class: "top-content" }, [
  17261. vue.createCommentVNode(" 搜索框 "),
  17262. vue.createElementVNode("view", { class: "search-cont" }, [
  17263. vue.createElementVNode("view", { class: "inner" }, [
  17264. vue.createElementVNode("image", {
  17265. class: "icon-search",
  17266. src: "/static/images/icon_search.png",
  17267. mode: ""
  17268. }),
  17269. vue.withDirectives(vue.createElementVNode(
  17270. "input",
  17271. {
  17272. type: "text",
  17273. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  17274. placeholder: "输入关键字搜索",
  17275. "confirm-type": "search",
  17276. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  17277. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  17278. },
  17279. null,
  17280. 544
  17281. /* NEED_HYDRATION, NEED_PATCH */
  17282. ), [
  17283. [vue.vModelText, $data.keyword]
  17284. ])
  17285. ])
  17286. ]),
  17287. vue.createElementVNode("view", { class: "cate-list" }, [
  17288. vue.createCommentVNode(" 关键字列表 "),
  17289. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  17290. vue.createElementVNode("view", { class: "inner" }, [
  17291. (vue.openBlock(true), vue.createElementBlock(
  17292. vue.Fragment,
  17293. null,
  17294. vue.renderList($data.foodOptions, (item, index2) => {
  17295. return vue.openBlock(), vue.createElementBlock("view", {
  17296. key: index2,
  17297. class: vue.normalizeClass($data.food == item.dictLabel ? "item active" : "item"),
  17298. onClick: ($event) => $options.choseFood(item)
  17299. }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
  17300. }),
  17301. 128
  17302. /* KEYED_FRAGMENT */
  17303. ))
  17304. ])
  17305. ]),
  17306. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  17307. vue.createElementVNode("view", { class: "inner" }, [
  17308. (vue.openBlock(true), vue.createElementBlock(
  17309. vue.Fragment,
  17310. null,
  17311. vue.renderList($data.actionOptions, (item, index2) => {
  17312. return vue.openBlock(), vue.createElementBlock("view", {
  17313. key: index2,
  17314. class: vue.normalizeClass($data.action == item.dictLabel ? "item active" : "item"),
  17315. onClick: ($event) => $options.choseAction(item)
  17316. }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
  17317. }),
  17318. 128
  17319. /* KEYED_FRAGMENT */
  17320. ))
  17321. ])
  17322. ]),
  17323. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  17324. vue.createElementVNode("view", { class: "inner" }, [
  17325. (vue.openBlock(true), vue.createElementBlock(
  17326. vue.Fragment,
  17327. null,
  17328. vue.renderList($data.indicationOptions, (item, index2) => {
  17329. return vue.openBlock(), vue.createElementBlock("view", {
  17330. key: index2,
  17331. class: vue.normalizeClass($data.indications == item.dictLabel ? "item active" : "item"),
  17332. onClick: ($event) => $options.choseIndications(item)
  17333. }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
  17334. }),
  17335. 128
  17336. /* KEYED_FRAGMENT */
  17337. ))
  17338. ])
  17339. ])
  17340. ])
  17341. ]),
  17342. vue.createVNode(_component_mescroll_body, {
  17343. top: "376rpx",
  17344. ref: "mescrollRef",
  17345. onInit: $options.mescrollInit,
  17346. onDown: $options.downCallback,
  17347. onUp: $options.upCallback,
  17348. down: $data.downOption,
  17349. up: $data.upOption
  17350. }, {
  17351. default: vue.withCtx(() => [
  17352. vue.createElementVNode("view", { class: "article-list" }, [
  17353. (vue.openBlock(true), vue.createElementBlock(
  17354. vue.Fragment,
  17355. null,
  17356. vue.renderList($data.dataList, (item, index2) => {
  17357. return vue.openBlock(), vue.createElementBlock("view", {
  17358. class: "item",
  17359. key: index2,
  17360. onClick: ($event) => $options.showDetail(item)
  17361. }, [
  17362. vue.createElementVNode("view", { class: "top" }, [
  17363. vue.createElementVNode("image", {
  17364. src: item.imgUrl,
  17365. mode: "aspectFill"
  17366. }, null, 8, ["src"])
  17367. ]),
  17368. vue.createElementVNode(
  17369. "view",
  17370. { class: "title ellipsis" },
  17371. vue.toDisplayString(item.foodName),
  17372. 1
  17373. /* TEXT */
  17374. ),
  17375. vue.createElementVNode(
  17376. "view",
  17377. { class: "desc ellipsis" },
  17378. vue.toDisplayString(item.actionTitle),
  17379. 1
  17380. /* TEXT */
  17381. )
  17382. ], 8, ["onClick"]);
  17383. }),
  17384. 128
  17385. /* KEYED_FRAGMENT */
  17386. ))
  17387. ])
  17388. ]),
  17389. _: 1
  17390. /* STABLE */
  17391. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  17392. ]);
  17393. }
  17394. const Pages_indexMedicatedFoodList = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/medicatedFoodList.vue"]]);
  17395. const _sfc_main$1M = {
  17396. data() {
  17397. return {
  17398. advs: [],
  17399. advImgs: [],
  17400. item: {}
  17401. };
  17402. },
  17403. onLoad(option) {
  17404. this.id = option.id;
  17405. },
  17406. onShow() {
  17407. this.getAdvList();
  17408. this.getMedicatedFoodById();
  17409. },
  17410. onShareAppMessage(res) {
  17411. if (this.utils.isLogin()) {
  17412. return {
  17413. title: this.item.foodName,
  17414. path: "/pages_index/medicatedFoodDetails?id=" + this.id,
  17415. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  17416. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  17417. };
  17418. }
  17419. },
  17420. //分享到朋友圈
  17421. onShareTimeline(res) {
  17422. if (this.utils.isLogin()) {
  17423. return {
  17424. title: this.item.title,
  17425. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  17426. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  17427. };
  17428. }
  17429. },
  17430. methods: {
  17431. handleAdvClick(index2) {
  17432. var ad = this.advs[index2];
  17433. formatAppLog("log", "at pages_index/medicatedFoodDetails.vue:73", ad.advUrl);
  17434. if (ad.showType == 1) {
  17435. uni.setStorageSync("url", ad.advUrl);
  17436. uni.navigateTo({
  17437. url: "h5"
  17438. });
  17439. } else if (ad.showType == 2) {
  17440. uni.navigateTo({
  17441. url: ad.advUrl
  17442. });
  17443. } else if (ad.showType == 3) {
  17444. uni.setStorageSync("content", ad.content);
  17445. uni.navigateTo({
  17446. url: "content"
  17447. });
  17448. }
  17449. },
  17450. getAdvList() {
  17451. var that = this;
  17452. var data = {
  17453. advType: 4
  17454. };
  17455. getAdvList(data).then((res) => {
  17456. if (res.code == 200) {
  17457. that.advImgs = [];
  17458. that.advs = [];
  17459. res.data.forEach(function(element) {
  17460. if (element.imageUrl != null && element.imageUrl != "") {
  17461. that.advs.push(element);
  17462. that.advImgs.push(element.imageUrl);
  17463. }
  17464. });
  17465. } else {
  17466. uni.showToast({
  17467. icon: "none",
  17468. title: "请求失败"
  17469. });
  17470. }
  17471. });
  17472. },
  17473. getMedicatedFoodById() {
  17474. let data = { id: this.id };
  17475. getMedicatedFoodById(data).then(
  17476. (res) => {
  17477. if (res.code == 200) {
  17478. this.item = res.data;
  17479. } else {
  17480. uni.showToast({
  17481. icon: "none",
  17482. title: "请求失败"
  17483. });
  17484. }
  17485. },
  17486. (rej) => {
  17487. }
  17488. );
  17489. }
  17490. }
  17491. };
  17492. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  17493. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  17494. return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  17495. key: 0,
  17496. class: "content"
  17497. }, [
  17498. vue.createElementVNode("view", { class: "image" }, [
  17499. vue.createElementVNode("image", {
  17500. mode: "aspectFill",
  17501. src: $data.item.imgUrl
  17502. }, null, 8, ["src"])
  17503. ]),
  17504. vue.createElementVNode("view", { class: "detail-cont" }, [
  17505. vue.createElementVNode("view", { class: "title-box" }, [
  17506. vue.createElementVNode("view", { class: "line" }),
  17507. vue.createElementVNode(
  17508. "view",
  17509. { class: "title" },
  17510. vue.toDisplayString($data.item.foodName),
  17511. 1
  17512. /* TEXT */
  17513. ),
  17514. vue.createElementVNode(
  17515. "view",
  17516. { class: "title-py" },
  17517. vue.toDisplayString($data.item.pinyin),
  17518. 1
  17519. /* TEXT */
  17520. )
  17521. ]),
  17522. vue.createElementVNode(
  17523. "view",
  17524. { class: "desc" },
  17525. vue.toDisplayString($data.item.actionTitle),
  17526. 1
  17527. /* TEXT */
  17528. ),
  17529. vue.createElementVNode("view", { class: "line-h" }),
  17530. vue.createElementVNode("view", {
  17531. class: "content",
  17532. innerHTML: $data.item.descs
  17533. }, null, 8, ["innerHTML"])
  17534. ]),
  17535. vue.createElementVNode("view", { class: "ad" }, [
  17536. vue.createVNode(_component_u_swiper, {
  17537. list: $data.advImgs,
  17538. indicator: "",
  17539. indicatorMode: "line",
  17540. circular: "",
  17541. onClick: $options.handleAdvClick
  17542. }, null, 8, ["list", "onClick"])
  17543. ])
  17544. ])) : vue.createCommentVNode("v-if", true);
  17545. }
  17546. const Pages_indexMedicatedFoodDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/medicatedFoodDetails.vue"]]);
  17547. const _sfc_main$1L = {
  17548. mixins: [MescrollMixin],
  17549. data() {
  17550. return {
  17551. typeOptions: [],
  17552. questionsType: 0,
  17553. keyword: "",
  17554. mescroll: null,
  17555. downOption: {
  17556. //下拉刷新
  17557. use: true,
  17558. auto: false
  17559. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  17560. },
  17561. upOption: {
  17562. onScroll: false,
  17563. use: true,
  17564. // 是否启用上拉加载; 默认true
  17565. page: {
  17566. pae: 0,
  17567. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  17568. size: 10
  17569. // 每页数据的数量,默认10
  17570. },
  17571. noMoreSize: 10,
  17572. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  17573. textNoMore: "已经到底了",
  17574. empty: {
  17575. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  17576. tip: "暂无数据"
  17577. }
  17578. },
  17579. dataList: []
  17580. };
  17581. },
  17582. onShow() {
  17583. this.getDictByKey("sys_questions_type");
  17584. },
  17585. methods: {
  17586. getDictByKey(key) {
  17587. var data = { key };
  17588. getDictByKey(data).then(
  17589. (res) => {
  17590. if (res.code == 200) {
  17591. if (key == "sys_questions_type") {
  17592. this.typeOptions = res.data;
  17593. }
  17594. }
  17595. },
  17596. (err) => {
  17597. }
  17598. );
  17599. },
  17600. doSearch() {
  17601. this.mescroll.resetUpScroll();
  17602. },
  17603. mescrollInit(mescroll) {
  17604. this.mescroll = mescroll;
  17605. },
  17606. /*下拉刷新的回调 */
  17607. downCallback(mescroll) {
  17608. mescroll.resetUpScroll();
  17609. },
  17610. upCallback(page2) {
  17611. var that = this;
  17612. var data = {
  17613. keyword: this.keyword,
  17614. questionsType: this.questionsType,
  17615. pageNum: page2.num,
  17616. pageSize: page2.size
  17617. };
  17618. getQuestionsList(data).then((res) => {
  17619. if (res.code == 200) {
  17620. if (page2.num == 1) {
  17621. that.dataList = res.data.list;
  17622. } else {
  17623. that.dataList = that.dataList.concat(res.data.list);
  17624. }
  17625. that.mescroll.endBySize(res.data.list.length, res.data.total);
  17626. } else {
  17627. uni.showToast({
  17628. icon: "none",
  17629. title: "请求失败"
  17630. });
  17631. that.dataList = null;
  17632. that.mescroll.endErr();
  17633. }
  17634. });
  17635. },
  17636. // 关键词选择
  17637. choseType(item) {
  17638. this.questionsType = item.dictValue;
  17639. this.mescroll.resetUpScroll();
  17640. },
  17641. // 查看详情
  17642. showDetail(item) {
  17643. uni.navigateTo({
  17644. url: "./questionsDetails?id=" + item.id
  17645. });
  17646. }
  17647. }
  17648. };
  17649. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  17650. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  17651. return vue.openBlock(), vue.createElementBlock("view", null, [
  17652. vue.createElementVNode("view", { class: "top-content" }, [
  17653. vue.createCommentVNode(" 搜索框 "),
  17654. vue.createElementVNode("view", { class: "search-cont" }, [
  17655. vue.createElementVNode("view", { class: "inner" }, [
  17656. vue.createElementVNode("image", {
  17657. class: "icon-search",
  17658. src: "/static/images/icon_search.png",
  17659. mode: ""
  17660. }),
  17661. vue.withDirectives(vue.createElementVNode(
  17662. "input",
  17663. {
  17664. type: "text",
  17665. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  17666. placeholder: "输入服务包搜索",
  17667. "confirm-type": "search",
  17668. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  17669. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  17670. },
  17671. null,
  17672. 544
  17673. /* NEED_HYDRATION, NEED_PATCH */
  17674. ), [
  17675. [vue.vModelText, $data.keyword]
  17676. ])
  17677. ])
  17678. ]),
  17679. vue.createElementVNode("view", { class: "cate-list" }, [
  17680. vue.createCommentVNode(" 关键字列表 "),
  17681. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  17682. vue.createElementVNode("view", { class: "inner" }, [
  17683. (vue.openBlock(true), vue.createElementBlock(
  17684. vue.Fragment,
  17685. null,
  17686. vue.renderList($data.typeOptions, (item, index2) => {
  17687. return vue.openBlock(), vue.createElementBlock("view", {
  17688. key: index2,
  17689. class: vue.normalizeClass($data.questionsType == item.dictValue ? "item active" : "item"),
  17690. onClick: ($event) => $options.choseType(item)
  17691. }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
  17692. }),
  17693. 128
  17694. /* KEYED_FRAGMENT */
  17695. ))
  17696. ])
  17697. ])
  17698. ])
  17699. ]),
  17700. vue.createVNode(_component_mescroll_body, {
  17701. top: "192rpx",
  17702. ref: "mescrollRef",
  17703. onInit: $options.mescrollInit,
  17704. onDown: $options.downCallback,
  17705. onUp: $options.upCallback,
  17706. down: $data.downOption,
  17707. up: $data.upOption
  17708. }, {
  17709. default: vue.withCtx(() => [
  17710. vue.createElementVNode("view", { class: "article-list" }, [
  17711. (vue.openBlock(true), vue.createElementBlock(
  17712. vue.Fragment,
  17713. null,
  17714. vue.renderList($data.dataList, (item, index2) => {
  17715. return vue.openBlock(), vue.createElementBlock("view", {
  17716. class: "item",
  17717. key: index2,
  17718. onClick: ($event) => $options.showDetail(item)
  17719. }, [
  17720. vue.createElementVNode("view", { class: "left" }, [
  17721. vue.createElementVNode(
  17722. "view",
  17723. { class: "title ellipsis2" },
  17724. vue.toDisplayString(item.title),
  17725. 1
  17726. /* TEXT */
  17727. ),
  17728. vue.createElementVNode("view", { class: "info-box" }, [
  17729. vue.createElementVNode("view", { class: "readers" }, [
  17730. vue.createElementVNode("view", { class: "readings" }, [
  17731. vue.createElementVNode("image", {
  17732. class: "eye",
  17733. src: "/static/images/eye.png"
  17734. }),
  17735. vue.createElementVNode(
  17736. "text",
  17737. { class: "num" },
  17738. vue.toDisplayString(item.views),
  17739. 1
  17740. /* TEXT */
  17741. )
  17742. ])
  17743. ]),
  17744. vue.createElementVNode(
  17745. "view",
  17746. { class: "time" },
  17747. vue.toDisplayString(item.createTime),
  17748. 1
  17749. /* TEXT */
  17750. )
  17751. ])
  17752. ])
  17753. ], 8, ["onClick"]);
  17754. }),
  17755. 128
  17756. /* KEYED_FRAGMENT */
  17757. ))
  17758. ])
  17759. ]),
  17760. _: 1
  17761. /* STABLE */
  17762. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  17763. ]);
  17764. }
  17765. const Pages_indexQuestionsList = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/questionsList.vue"]]);
  17766. const _sfc_main$1K = {
  17767. data() {
  17768. return {
  17769. advs: [],
  17770. advImgs: [],
  17771. id: null,
  17772. item: {}
  17773. };
  17774. },
  17775. onLoad(option) {
  17776. this.id = option.id;
  17777. },
  17778. onShow() {
  17779. this.getAdvList();
  17780. this.getQuestionsById();
  17781. },
  17782. onShareAppMessage(res) {
  17783. if (this.$isLogin()) {
  17784. return {
  17785. title: this.item.vesselName,
  17786. path: "/pages_index/questionsDetails?id=" + this.id,
  17787. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  17788. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  17789. };
  17790. }
  17791. },
  17792. //分享到朋友圈
  17793. onShareTimeline(res) {
  17794. if (this.utils.isLogin()) {
  17795. return {
  17796. title: this.item.title,
  17797. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  17798. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  17799. };
  17800. }
  17801. },
  17802. methods: {
  17803. handleAdvClick(index2) {
  17804. var ad = this.advs[index2];
  17805. formatAppLog("log", "at pages_index/questionsDetails.vue:70", ad.advUrl);
  17806. if (ad.showType == 1) {
  17807. uni.setStorageSync("url", ad.advUrl);
  17808. uni.navigateTo({
  17809. url: "h5"
  17810. });
  17811. } else if (ad.showType == 2) {
  17812. uni.navigateTo({
  17813. url: ad.advUrl
  17814. });
  17815. } else if (ad.showType == 3) {
  17816. uni.setStorageSync("content", ad.content);
  17817. uni.navigateTo({
  17818. url: "content"
  17819. });
  17820. }
  17821. },
  17822. getAdvList() {
  17823. var that = this;
  17824. var data = {
  17825. advType: 6
  17826. };
  17827. getAdvList(data).then((res) => {
  17828. if (res.code == 200) {
  17829. that.advImgs = [];
  17830. that.advs = [];
  17831. res.data.forEach(function(element) {
  17832. if (element.imageUrl != null && element.imageUrl != "") {
  17833. that.advs.push(element);
  17834. that.advImgs.push(element.imageUrl);
  17835. }
  17836. });
  17837. } else {
  17838. uni.showToast({
  17839. icon: "none",
  17840. title: "请求失败"
  17841. });
  17842. }
  17843. });
  17844. },
  17845. getQuestionsById() {
  17846. let data = { id: this.id };
  17847. getQuestionsById(data).then(
  17848. (res) => {
  17849. if (res.code == 200) {
  17850. this.item = res.data;
  17851. } else {
  17852. uni.showToast({
  17853. icon: "none",
  17854. title: "请求失败"
  17855. });
  17856. }
  17857. },
  17858. (rej) => {
  17859. }
  17860. );
  17861. }
  17862. }
  17863. };
  17864. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  17865. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  17866. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  17867. vue.createElementVNode("view", { class: "detail-cont" }, [
  17868. vue.createElementVNode(
  17869. "view",
  17870. { class: "title" },
  17871. vue.toDisplayString($data.item.title),
  17872. 1
  17873. /* TEXT */
  17874. ),
  17875. vue.createElementVNode("view", { class: "info" }, [
  17876. vue.createElementVNode(
  17877. "view",
  17878. { class: "reads" },
  17879. "阅读数:" + vue.toDisplayString($data.item.views),
  17880. 1
  17881. /* TEXT */
  17882. ),
  17883. vue.createElementVNode(
  17884. "view",
  17885. { class: "time" },
  17886. vue.toDisplayString($data.item.createTime),
  17887. 1
  17888. /* TEXT */
  17889. )
  17890. ]),
  17891. vue.createCommentVNode(" 正文 "),
  17892. vue.createElementVNode("view", { class: "full-text" }, [
  17893. vue.createElementVNode("view", {
  17894. innerHTML: $data.item.answers
  17895. }, null, 8, ["innerHTML"])
  17896. ])
  17897. ]),
  17898. vue.createElementVNode("view", { class: "ad" }, [
  17899. vue.createVNode(_component_u_swiper, {
  17900. list: $data.advImgs,
  17901. indicator: "",
  17902. indicatorMode: "line",
  17903. circular: "",
  17904. onClick: $options.handleAdvClick
  17905. }, null, 8, ["list", "onClick"])
  17906. ])
  17907. ]);
  17908. }
  17909. const Pages_indexQuestionsDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/questionsDetails.vue"]]);
  17910. const _sfc_main$1J = {
  17911. components: { Menu },
  17912. mixins: [MescrollMixin],
  17913. // 使用mixin
  17914. data() {
  17915. return {
  17916. top: null,
  17917. cates: [],
  17918. diseaseType: 0,
  17919. keyword: "",
  17920. mescroll: null,
  17921. downOption: {
  17922. //下拉刷新
  17923. use: true,
  17924. auto: false
  17925. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  17926. },
  17927. upOption: {
  17928. onScroll: false,
  17929. use: true,
  17930. // 是否启用上拉加载; 默认true
  17931. page: {
  17932. pae: 0,
  17933. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  17934. size: 10
  17935. // 每页数据的数量,默认10
  17936. },
  17937. noMoreSize: 10,
  17938. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  17939. textNoMore: "已经到底了",
  17940. empty: {
  17941. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  17942. tip: "暂无数据"
  17943. }
  17944. },
  17945. dataList: []
  17946. };
  17947. },
  17948. onLoad() {
  17949. },
  17950. onShow() {
  17951. this.getPackagCateList(1);
  17952. },
  17953. methods: {
  17954. menuClick(item) {
  17955. this.diseaseType = item.cateId;
  17956. this.mescroll.resetUpScroll();
  17957. },
  17958. getPackagCateList(type2) {
  17959. var data = { type: type2 };
  17960. var that = this;
  17961. getPackagCateList(data).then(
  17962. (res) => {
  17963. if (res.code == 200) {
  17964. this.cates = res.data;
  17965. var query = uni.createSelectorQuery().in(that);
  17966. setTimeout(function() {
  17967. query.select(".top-content").boundingClientRect((data2) => {
  17968. if (data2) {
  17969. formatAppLog("log", "at pages_index/packageList.vue:99", "View height:", data2.height + "px");
  17970. that.top = data2.height + "px";
  17971. }
  17972. }).exec();
  17973. }, 500);
  17974. }
  17975. },
  17976. (err) => {
  17977. }
  17978. );
  17979. },
  17980. // 关键词选择
  17981. choseType(item) {
  17982. this.diseaseType = item.cateCode;
  17983. this.mescroll.resetUpScroll();
  17984. },
  17985. doSearch() {
  17986. this.mescroll.resetUpScroll();
  17987. },
  17988. navTo(url2) {
  17989. uni.navigateTo({
  17990. url: url2
  17991. });
  17992. },
  17993. mescrollInit(mescroll) {
  17994. this.mescroll = mescroll;
  17995. },
  17996. /*下拉刷新的回调 */
  17997. downCallback() {
  17998. this.mescroll.resetUpScroll();
  17999. },
  18000. /*上拉加载的回调*/
  18001. upCallback(page2) {
  18002. var that = this;
  18003. var data = {
  18004. isShow: 1,
  18005. diseaseType: this.diseaseType,
  18006. keyword: this.keyword,
  18007. pageNum: page2.num,
  18008. pageSize: page2.size
  18009. };
  18010. getPackageList(data).then((res) => {
  18011. if (res.code == 200) {
  18012. if (page2.num == 1) {
  18013. that.dataList = res.data.list;
  18014. } else {
  18015. that.dataList = that.dataList.concat(res.data.list);
  18016. }
  18017. that.mescroll.endBySize(res.data.list.length, res.data.total);
  18018. } else {
  18019. uni.showToast({
  18020. icon: "none",
  18021. title: "请求失败"
  18022. });
  18023. that.dataList = null;
  18024. that.mescroll.endErr();
  18025. }
  18026. });
  18027. }
  18028. }
  18029. };
  18030. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  18031. const _component_Menu = vue.resolveComponent("Menu");
  18032. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  18033. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  18034. vue.createElementVNode("view", { class: "top-content" }, [
  18035. vue.createCommentVNode(" 搜索框 "),
  18036. vue.createElementVNode("view", { class: "search-cont" }, [
  18037. vue.createElementVNode("view", { class: "inner" }, [
  18038. vue.createElementVNode("image", {
  18039. class: "icon-search",
  18040. src: "/static/images/icon_search.png",
  18041. mode: ""
  18042. }),
  18043. vue.withDirectives(vue.createElementVNode(
  18044. "input",
  18045. {
  18046. type: "text",
  18047. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  18048. placeholder: "输入关键字搜索",
  18049. "confirm-type": "search",
  18050. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  18051. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  18052. },
  18053. null,
  18054. 544
  18055. /* NEED_HYDRATION, NEED_PATCH */
  18056. ), [
  18057. [vue.vModelText, $data.keyword]
  18058. ])
  18059. ])
  18060. ]),
  18061. vue.createElementVNode("view", { class: "cate-list" }, [
  18062. $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
  18063. key: 0,
  18064. list: $data.cates,
  18065. onMenuClick: $options.menuClick,
  18066. style: { "width": "100%" }
  18067. }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true),
  18068. vue.createCommentVNode(` <view class="inner">
  18069. <view v-for="(item,index) in cates" :key="index" :class="diseaseType == item.cateCode?'item active':'item'" @click="choseType(item)">
  18070. <image class="icon" :src="item.imgUrl"></image>\r
  18071. <view class="title" >{{item.cateName}} </view>
  18072. </view>
  18073. </view> `)
  18074. ])
  18075. ]),
  18076. $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
  18077. key: 0,
  18078. top: $data.top,
  18079. bottom: "0",
  18080. ref: "mescrollRef",
  18081. onInit: $options.mescrollInit,
  18082. down: $data.downOption,
  18083. up: $data.upOption,
  18084. onDown: $options.downCallback,
  18085. onUp: $options.upCallback
  18086. }, {
  18087. default: vue.withCtx(() => [
  18088. vue.createElementVNode("view", { class: "package-box" }, [
  18089. (vue.openBlock(true), vue.createElementBlock(
  18090. vue.Fragment,
  18091. null,
  18092. vue.renderList($data.dataList, (item, index2) => {
  18093. return vue.openBlock(), vue.createElementBlock("view", {
  18094. class: "item",
  18095. onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item.packageId)
  18096. }, [
  18097. vue.createElementVNode("view", { class: "top" }, [
  18098. vue.createElementVNode("image", {
  18099. src: item.imgUrl
  18100. }, null, 8, ["src"])
  18101. ]),
  18102. vue.createElementVNode("view", { class: "bottom" }, [
  18103. vue.createElementVNode(
  18104. "view",
  18105. { class: "title ellipsis2" },
  18106. vue.toDisplayString(item.packageName),
  18107. 1
  18108. /* TEXT */
  18109. ),
  18110. vue.createElementVNode("view", { class: "price-box" }, [
  18111. vue.createElementVNode(
  18112. "view",
  18113. { class: "price" },
  18114. "¥" + vue.toDisplayString(item.price.toFixed(2)) + "元/日",
  18115. 1
  18116. /* TEXT */
  18117. ),
  18118. vue.createElementVNode(
  18119. "view",
  18120. { class: "count" },
  18121. vue.toDisplayString(item.sales) + "人已购",
  18122. 1
  18123. /* TEXT */
  18124. )
  18125. ])
  18126. ])
  18127. ], 8, ["onClick"]);
  18128. }),
  18129. 256
  18130. /* UNKEYED_FRAGMENT */
  18131. ))
  18132. ])
  18133. ]),
  18134. _: 1
  18135. /* STABLE */
  18136. }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])) : vue.createCommentVNode("v-if", true)
  18137. ]);
  18138. }
  18139. const Pages_indexPackageList = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-09c8d24b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageList.vue"]]);
  18140. let request$a = new Request$1().http;
  18141. function create$1(data) {
  18142. return request$a("/app/packageOrder/create", data, "POST", "application/json;charset=UTF-8");
  18143. }
  18144. function compute$2(data) {
  18145. return request$a("/app/packageOrder/compute", data, "POST", "application/json;charset=UTF-8");
  18146. }
  18147. function pay$2(data) {
  18148. return request$a("/app/packageOrder/pay", data, "POST", "application/json;charset=UTF-8");
  18149. }
  18150. function payment$2(data) {
  18151. return request$a("/app/packageOrder/payment", data, "POST", "application/json;charset=UTF-8");
  18152. }
  18153. function getPackageOrderById(data) {
  18154. return request$a("/app/packageOrder/getPackageOrderById", data, "GET");
  18155. }
  18156. function getMyPackageOrderList(data) {
  18157. return request$a("/app/packageOrder/getMyPackageOrderList", data, "GET");
  18158. }
  18159. function getCompanyUserPackageOrderList(data) {
  18160. return request$a("/app/packageOrder/getCompanyUserPackageOrderList", data, "GET");
  18161. }
  18162. function getSharePackageOrderById(data) {
  18163. return request$a("/app/packageOrder/getSharePackageOrderById", data, "GET");
  18164. }
  18165. function getCompanyUserPackageOrderById(data) {
  18166. return request$a("/app/packageOrder/getCompanyUserPackageOrderById", data, "GET");
  18167. }
  18168. function cancelOrder$1(data) {
  18169. return request$a("/app/packageOrder/cancel", data, "POST", "application/json;charset=UTF-8");
  18170. }
  18171. let request$9 = new Request$1().http;
  18172. function login(data) {
  18173. return request$9("/app/companyUser/login", data, "POST", "application/json;charset=UTF-8");
  18174. }
  18175. function getUserInfo(data) {
  18176. return request$9("/app/companyUser/getUserInfo", data, "GET", "application/json;charset=UTF-8");
  18177. }
  18178. function bindCompanyUser(data) {
  18179. return request$9("/app/companyUser/bindCompanyUser", data, "POST", "application/json;charset=UTF-8");
  18180. }
  18181. const _sfc_main$1I = {
  18182. data() {
  18183. return {
  18184. // isDrug:0,
  18185. storeName: "",
  18186. displayText: "查看更多",
  18187. displayMore: 0,
  18188. imgs: [],
  18189. activeImg: 1,
  18190. doctorShow: false,
  18191. doctors: [],
  18192. products: [],
  18193. packageId: null,
  18194. item: {},
  18195. describe: null,
  18196. doctorId: null,
  18197. doctorPageNum: 1,
  18198. doctorLastPage: false,
  18199. doctorTotal: 0,
  18200. companyUserId: null,
  18201. companyId: null
  18202. };
  18203. },
  18204. onLoad(option) {
  18205. this.packageId = option.packageId;
  18206. if (!this.$isEmpty(option.companyId)) {
  18207. this.companyId = option.companyId;
  18208. }
  18209. if (!this.$isEmpty(option.companyUserId)) {
  18210. this.companyUserId = option.companyUserId;
  18211. }
  18212. },
  18213. onShow() {
  18214. this.$isLogin().then(
  18215. (res) => {
  18216. if (res) {
  18217. let data = { companyUserId: this.companyUserId };
  18218. bindCompanyUser(data).then(
  18219. (res2) => {
  18220. if (res2.code == 200)
  18221. ;
  18222. },
  18223. (rej) => {
  18224. }
  18225. );
  18226. }
  18227. }
  18228. );
  18229. this.getPackageById();
  18230. this.getPackageDoctorList();
  18231. },
  18232. onShareAppMessage(res) {
  18233. return {
  18234. title: this.item.packageName,
  18235. path: "/pages_index/packageDetails?packageId=" + this.packageId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId,
  18236. imageUrl: this.item.imgUrl
  18237. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  18238. };
  18239. },
  18240. methods: {
  18241. showMore() {
  18242. this.displayMore = this.displayMore == 1 ? 0 : 1;
  18243. this.displayText = this.displayMore == 1 ? "收起" : "查看更多";
  18244. formatAppLog("log", "at pages_index/packageDetails.vue:249", this.displayText);
  18245. },
  18246. swiperChange(event) {
  18247. this.activeImg = event.detail.current + 1;
  18248. },
  18249. handleDoctorClick(item) {
  18250. this.doctorShow = false;
  18251. this.doctorId = item.doctorId;
  18252. this.doSubmit();
  18253. },
  18254. lower(event) {
  18255. if (this.doctorTotal > this.doctors.length) {
  18256. this.doctorPageNum++;
  18257. this.getPackageDoctorList();
  18258. }
  18259. },
  18260. doSubmit() {
  18261. var that = this;
  18262. this.$isLogin().then(
  18263. (res) => {
  18264. if (res) {
  18265. that.submit();
  18266. } else {
  18267. uni.navigateTo({
  18268. url: "/pages/auth/login"
  18269. });
  18270. }
  18271. }
  18272. );
  18273. },
  18274. submit() {
  18275. if (this.doctors.length > 0 && this.doctorId == null) {
  18276. this.doctorShow = true;
  18277. } else {
  18278. uni.navigateTo({
  18279. url: "/pages_index/packageForm?packageId=" + this.packageId + "&doctorId=" + this.doctorId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  18280. });
  18281. }
  18282. },
  18283. createOrder() {
  18284. uni.showLoading({
  18285. title: "处理中..."
  18286. });
  18287. var data = {
  18288. companyId: this.companyId,
  18289. companyUserId: this.companyUserId,
  18290. packageId: this.packageId,
  18291. doctorId: this.doctorId
  18292. };
  18293. create$1(data).then((res) => {
  18294. uni.hideLoading();
  18295. if (res.code == 200) {
  18296. uni.navigateTo({
  18297. url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId
  18298. });
  18299. } else {
  18300. uni.showToast({
  18301. icon: "none",
  18302. title: res.msg
  18303. });
  18304. }
  18305. });
  18306. },
  18307. doctorOpen() {
  18308. this.doctorShow = true;
  18309. },
  18310. doctorClose() {
  18311. this.doctorShow = false;
  18312. },
  18313. showImg() {
  18314. uni.previewImage({
  18315. urls: this.imgs,
  18316. current: this.imgs[0]
  18317. });
  18318. },
  18319. getPackageDoctorList() {
  18320. if (this.doctorLastPage) {
  18321. return;
  18322. }
  18323. var data = {
  18324. packageId: this.packageId,
  18325. pageNum: this.doctorPageNum,
  18326. pageSize: 10
  18327. };
  18328. var that = this;
  18329. getPackageDoctorList(data).then(
  18330. (res) => {
  18331. if (res.code == 200) {
  18332. if (this.doctorPageNum == 0) {
  18333. that.doctors = res.data.list;
  18334. } else {
  18335. that.doctors = that.doctors.concat(res.data.list);
  18336. }
  18337. this.doctorLastPage = res.data.isLastPage;
  18338. this.doctorTotal = res.data.total;
  18339. formatAppLog("log", "at pages_index/packageDetails.vue:360", that.doctors);
  18340. } else {
  18341. uni.showToast({
  18342. icon: "none",
  18343. title: "请求失败"
  18344. });
  18345. }
  18346. },
  18347. (rej) => {
  18348. }
  18349. );
  18350. },
  18351. getPackageById() {
  18352. let data = { packageId: this.packageId };
  18353. getPackageById(data).then(
  18354. (res) => {
  18355. if (res.code == 200) {
  18356. this.item = res.data;
  18357. this.storeName = res.storeName;
  18358. if (res.data.images != null) {
  18359. this.imgs = res.data.images.split(",");
  18360. } else {
  18361. this.activeImg = 0;
  18362. }
  18363. this.describe = JSON.parse(this.item.describeJson);
  18364. if (this.item.productJson != null) {
  18365. this.products = JSON.parse(this.item.productJson);
  18366. }
  18367. formatAppLog("log", "at pages_index/packageDetails.vue:397", this.imgs);
  18368. } else {
  18369. uni.showToast({
  18370. icon: "none",
  18371. title: "请求失败"
  18372. });
  18373. }
  18374. },
  18375. (rej) => {
  18376. }
  18377. );
  18378. }
  18379. }
  18380. };
  18381. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  18382. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  18383. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  18384. vue.createCommentVNode(' <view class="img-box" @click="showImg()">\r\n <image :src="item.imgUrl"></image>\r\n </view> '),
  18385. vue.createElementVNode("view", { class: "cont-box" }, [
  18386. vue.createElementVNode("view", {
  18387. class: "goods-banner",
  18388. onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg())
  18389. }, [
  18390. vue.createElementVNode(
  18391. "swiper",
  18392. {
  18393. class: "swiper",
  18394. "indicator-dots": false,
  18395. circular: true,
  18396. autoplay: true,
  18397. interval: 3e3,
  18398. duration: 1e3,
  18399. "indicator-color": "rgba(255, 255, 255, 0.6)",
  18400. "indicator-active-color": "#ffffff",
  18401. onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  18402. },
  18403. [
  18404. (vue.openBlock(true), vue.createElementBlock(
  18405. vue.Fragment,
  18406. null,
  18407. vue.renderList($data.imgs, (item, index2) => {
  18408. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  18409. class: "swiper-item",
  18410. key: index2
  18411. }, [
  18412. vue.createElementVNode("image", {
  18413. src: item,
  18414. mode: "aspectFit"
  18415. }, null, 8, ["src"])
  18416. ]);
  18417. }),
  18418. 128
  18419. /* KEYED_FRAGMENT */
  18420. ))
  18421. ],
  18422. 32
  18423. /* NEED_HYDRATION */
  18424. ),
  18425. vue.createCommentVNode(" 数量 "),
  18426. vue.createElementVNode(
  18427. "view",
  18428. { class: "num-box" },
  18429. vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length),
  18430. 1
  18431. /* TEXT */
  18432. )
  18433. ]),
  18434. vue.createElementVNode("view", { class: "package-box" }, [
  18435. vue.createElementVNode(
  18436. "view",
  18437. { class: "title" },
  18438. vue.toDisplayString($data.item.packageName),
  18439. 1
  18440. /* TEXT */
  18441. ),
  18442. vue.createElementVNode("view", { class: "desc" }, [
  18443. $data.item.cycle > 0 ? (vue.openBlock(), vue.createElementBlock(
  18444. "view",
  18445. {
  18446. key: 0,
  18447. class: "cycle"
  18448. },
  18449. "用药周期" + vue.toDisplayString($data.item.cycle) + "天",
  18450. 1
  18451. /* TEXT */
  18452. )) : vue.createCommentVNode("v-if", true),
  18453. $data.item.duration > 0 ? (vue.openBlock(), vue.createElementBlock(
  18454. "view",
  18455. {
  18456. key: 1,
  18457. class: "duration"
  18458. },
  18459. "签约时长" + vue.toDisplayString($data.item.duration) + "天",
  18460. 1
  18461. /* TEXT */
  18462. )) : vue.createCommentVNode("v-if", true)
  18463. ]),
  18464. vue.createElementVNode("view", { class: "num-box" }, [
  18465. vue.createElementVNode("view", { class: "price-box" }, [
  18466. $data.item != null ? (vue.openBlock(), vue.createElementBlock(
  18467. "view",
  18468. {
  18469. key: 0,
  18470. class: "price"
  18471. },
  18472. "¥" + vue.toDisplayString($data.item.price.toFixed(2)) + "元/日",
  18473. 1
  18474. /* TEXT */
  18475. )) : vue.createCommentVNode("v-if", true),
  18476. $data.item != null && $data.item.packageSubType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  18477. key: 1,
  18478. class: "price"
  18479. }, "咨询包")) : vue.createCommentVNode("v-if", true),
  18480. $data.item != null && $data.item.packageSubType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  18481. key: 2,
  18482. class: "price"
  18483. }, "治疗包")) : vue.createCommentVNode("v-if", true),
  18484. $data.item != null && $data.item.packageSubType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  18485. key: 3,
  18486. class: "price"
  18487. }, "产品包")) : vue.createCommentVNode("v-if", true)
  18488. ]),
  18489. vue.createElementVNode(
  18490. "view",
  18491. { class: "count" },
  18492. vue.toDisplayString($data.item.sales) + "人已购",
  18493. 1
  18494. /* TEXT */
  18495. )
  18496. ])
  18497. ]),
  18498. $data.products.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  18499. key: 0,
  18500. class: "drug-box"
  18501. }, [
  18502. vue.createElementVNode("view", { class: "title-box" }, [
  18503. vue.createElementVNode("view", { class: "line" }),
  18504. vue.createElementVNode("view", { class: "title" }, "产品列表")
  18505. ]),
  18506. vue.createElementVNode("view", { class: "drug-list" }, [
  18507. (vue.openBlock(true), vue.createElementBlock(
  18508. vue.Fragment,
  18509. null,
  18510. vue.renderList($data.products, (product, index2) => {
  18511. return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
  18512. ($data.displayMore == 0 ? index2 < 2 : true) ? (vue.openBlock(), vue.createElementBlock("view", {
  18513. key: 0,
  18514. class: "drug"
  18515. }, [
  18516. vue.createElementVNode("view", { class: "img-box" }, [
  18517. vue.createElementVNode("image", {
  18518. src: product.image,
  18519. mode: "aspectFill"
  18520. }, null, 8, ["src"])
  18521. ]),
  18522. vue.createElementVNode("view", { class: "drug-info" }, [
  18523. vue.createElementVNode("view", null, [
  18524. vue.createElementVNode(
  18525. "view",
  18526. { class: "name-box ellipsis2" },
  18527. vue.toDisplayString(product.productName),
  18528. 1
  18529. /* TEXT */
  18530. ),
  18531. vue.createElementVNode(
  18532. "view",
  18533. { class: "spec" },
  18534. vue.toDisplayString(product.sku),
  18535. 1
  18536. /* TEXT */
  18537. )
  18538. ]),
  18539. vue.createElementVNode("view", { class: "num-box" }, [
  18540. vue.createElementVNode(
  18541. "view",
  18542. { class: "use" },
  18543. vue.toDisplayString(product.usageMethod),
  18544. 1
  18545. /* TEXT */
  18546. ),
  18547. vue.createElementVNode("view", { class: "price" }, [
  18548. vue.createCommentVNode(' <text class="unit">¥</text>\r\n <text class="num">{{product.price.toFixed(2)}}</text> ')
  18549. ]),
  18550. vue.createCommentVNode(' <view class="amount">x{{product.count}}</view> ')
  18551. ])
  18552. ])
  18553. ])) : vue.createCommentVNode("v-if", true)
  18554. ]);
  18555. }),
  18556. 256
  18557. /* UNKEYED_FRAGMENT */
  18558. ))
  18559. ]),
  18560. $data.products.length > 2 ? (vue.openBlock(), vue.createElementBlock(
  18561. "view",
  18562. {
  18563. key: 0,
  18564. class: "display-more",
  18565. onClick: _cache[2] || (_cache[2] = ($event) => $options.showMore())
  18566. },
  18567. vue.toDisplayString($data.displayText),
  18568. 1
  18569. /* TEXT */
  18570. )) : vue.createCommentVNode("v-if", true),
  18571. vue.createElementVNode("view", { class: "tip" }, [
  18572. vue.createElementVNode("image", {
  18573. class: "img",
  18574. src: "/static/images/dui.png"
  18575. }),
  18576. vue.createElementVNode(
  18577. "view",
  18578. { class: "text" },
  18579. "本疗法所包含药品由" + vue.toDisplayString($data.storeName) + "配送",
  18580. 1
  18581. /* TEXT */
  18582. )
  18583. ])
  18584. ])) : vue.createCommentVNode("v-if", true),
  18585. $data.describe.use != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18586. key: 1,
  18587. class: "desc-box"
  18588. }, [
  18589. vue.createElementVNode("view", { class: "title-box" }, [
  18590. vue.createElementVNode("view", { class: "line" }),
  18591. vue.createElementVNode("view", { class: "title" }, "功能")
  18592. ]),
  18593. $data.describe != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18594. key: 0,
  18595. class: "desc",
  18596. innerHTML: $data.describe.use
  18597. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
  18598. ])) : vue.createCommentVNode("v-if", true),
  18599. $data.item.indication != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18600. key: 2,
  18601. class: "desc-box"
  18602. }, [
  18603. vue.createElementVNode("view", { class: "title-box" }, [
  18604. vue.createElementVNode("view", { class: "line" }),
  18605. vue.createElementVNode("view", { class: "title" }, "主治")
  18606. ]),
  18607. $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18608. key: 0,
  18609. class: "desc",
  18610. innerHTML: $data.item.indication
  18611. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
  18612. ])) : vue.createCommentVNode("v-if", true),
  18613. $data.describe.usageMethod != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18614. key: 3,
  18615. class: "desc-box"
  18616. }, [
  18617. vue.createElementVNode("view", { class: "title-box" }, [
  18618. vue.createElementVNode("view", { class: "line" }),
  18619. vue.createElementVNode("view", { class: "title" }, "服用/使用方式")
  18620. ]),
  18621. vue.createElementVNode("view", {
  18622. class: "desc",
  18623. innerHTML: $data.describe.usageMethod
  18624. }, null, 8, ["innerHTML"])
  18625. ])) : vue.createCommentVNode("v-if", true),
  18626. $data.describe.forPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18627. key: 4,
  18628. class: "desc-box"
  18629. }, [
  18630. vue.createElementVNode("view", { class: "title-box" }, [
  18631. vue.createElementVNode("view", { class: "line" }),
  18632. vue.createElementVNode("view", { class: "title" }, "适宜人群")
  18633. ]),
  18634. vue.createElementVNode("view", {
  18635. class: "desc",
  18636. innerHTML: $data.describe.forPeople
  18637. }, null, 8, ["innerHTML"])
  18638. ])) : vue.createCommentVNode("v-if", true),
  18639. $data.describe.tabooPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18640. key: 5,
  18641. class: "desc-box"
  18642. }, [
  18643. vue.createElementVNode("view", { class: "title-box" }, [
  18644. vue.createElementVNode("view", { class: "line" }),
  18645. vue.createElementVNode("view", { class: "title" }, "禁忌人群")
  18646. ]),
  18647. vue.createElementVNode("view", {
  18648. class: "desc",
  18649. innerHTML: $data.describe.tabooPeople
  18650. }, null, 8, ["innerHTML"])
  18651. ])) : vue.createCommentVNode("v-if", true),
  18652. $data.item.explain != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18653. key: 6,
  18654. class: "desc-box"
  18655. }, [
  18656. vue.createElementVNode("view", { class: "title-box" }, [
  18657. vue.createElementVNode("view", { class: "line" }),
  18658. vue.createElementVNode("view", { class: "title" }, "方解/搭配优势")
  18659. ]),
  18660. vue.createElementVNode("view", {
  18661. class: "desc",
  18662. innerHTML: $data.item.explain
  18663. }, null, 8, ["innerHTML"])
  18664. ])) : vue.createCommentVNode("v-if", true),
  18665. vue.createElementVNode("view", { class: "desc-box" }, [
  18666. vue.createElementVNode("view", { class: "title-box" }, [
  18667. vue.createElementVNode("view", { class: "line" }),
  18668. vue.createElementVNode("view", { class: "title" }, "套餐描述")
  18669. ]),
  18670. vue.createElementVNode("view", {
  18671. class: "html",
  18672. innerHTML: $data.item.desc
  18673. }, null, 8, ["innerHTML"])
  18674. ])
  18675. ]),
  18676. vue.createElementVNode("view", { class: "btn-foot" }, [
  18677. vue.createElementVNode("view", { class: "p-price-box" }, [
  18678. vue.createElementVNode("view", { class: "p-name" }, "¥"),
  18679. $data.item != null ? (vue.openBlock(), vue.createElementBlock(
  18680. "view",
  18681. {
  18682. key: 0,
  18683. class: "p-price"
  18684. },
  18685. vue.toDisplayString($data.item.totalPrice.toFixed(2)),
  18686. 1
  18687. /* TEXT */
  18688. )) : vue.createCommentVNode("v-if", true)
  18689. ]),
  18690. vue.createElementVNode("view", { class: "btn-box" }, [
  18691. vue.createElementVNode("view", {
  18692. class: "btn buy",
  18693. onClick: _cache[3] || (_cache[3] = ($event) => $options.doSubmit())
  18694. }, "提交需求")
  18695. ])
  18696. ]),
  18697. vue.createVNode(_component_u_popup, {
  18698. bgColor: "#f6f6f6",
  18699. round: 10,
  18700. mode: "bottom",
  18701. show: $data.doctorShow,
  18702. onOpen: _cache[5] || (_cache[5] = ($event) => $options.doctorOpen()),
  18703. onClose: _cache[6] || (_cache[6] = ($event) => $options.doctorClose())
  18704. }, {
  18705. default: vue.withCtx(() => [
  18706. vue.createElementVNode("view", { class: "doctors" }, [
  18707. vue.createElementVNode(
  18708. "scroll-view",
  18709. {
  18710. class: "scroll-list",
  18711. "scroll-y": "true",
  18712. onScrolltolower: _cache[4] || (_cache[4] = (...args) => $options.lower && $options.lower(...args))
  18713. },
  18714. [
  18715. (vue.openBlock(true), vue.createElementBlock(
  18716. vue.Fragment,
  18717. null,
  18718. vue.renderList($data.doctors, (item, index2) => {
  18719. return vue.openBlock(), vue.createElementBlock("view", {
  18720. class: "doctor",
  18721. onClick: ($event) => _ctx.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId)
  18722. }, [
  18723. vue.createElementVNode("view", { class: "item" }, [
  18724. vue.createElementVNode("view", { class: "left" }, [
  18725. vue.createElementVNode("image", {
  18726. mode: "aspectFill",
  18727. class: "doc-img",
  18728. src: item.avatar
  18729. }, null, 8, ["src"]),
  18730. vue.createElementVNode("view", { class: "right" }, [
  18731. vue.createElementVNode("view", { class: "doc-box" }, [
  18732. vue.createElementVNode(
  18733. "view",
  18734. { class: "doc-name" },
  18735. vue.toDisplayString(item.doctorName),
  18736. 1
  18737. /* TEXT */
  18738. ),
  18739. vue.createElementVNode(
  18740. "view",
  18741. { class: "doc-position" },
  18742. vue.toDisplayString(item.position),
  18743. 1
  18744. /* TEXT */
  18745. )
  18746. ]),
  18747. vue.createElementVNode(
  18748. "view",
  18749. { class: "hospital" },
  18750. vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName),
  18751. 1
  18752. /* TEXT */
  18753. )
  18754. ])
  18755. ]),
  18756. vue.createElementVNode("view", {
  18757. class: "btn",
  18758. onClick: ($event) => $options.handleDoctorClick(item)
  18759. }, "选择", 8, ["onClick"])
  18760. ])
  18761. ], 8, ["onClick"]);
  18762. }),
  18763. 256
  18764. /* UNKEYED_FRAGMENT */
  18765. ))
  18766. ],
  18767. 32
  18768. /* NEED_HYDRATION */
  18769. )
  18770. ])
  18771. ]),
  18772. _: 1
  18773. /* STABLE */
  18774. }, 8, ["show"])
  18775. ]);
  18776. }
  18777. const Pages_indexPackageDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageDetails.vue"]]);
  18778. const _sfc_main$1H = {
  18779. data() {
  18780. return {
  18781. content: null,
  18782. show: false,
  18783. scrollTop: 0,
  18784. //滚动条位置
  18785. patient: null,
  18786. items: [
  18787. {
  18788. title: "您是否已在线下就诊,且对所购买的药品无过敏或不良反应?",
  18789. options: [
  18790. { name: "是,我线下就诊过", value: 1, color: "green" },
  18791. { name: "无,从未就诊", value: 0, color: "red" }
  18792. ]
  18793. },
  18794. {
  18795. title: "您是否已详细阅读药物说明,确认自己符合药物适用人群,并了解用药方法、用药禁忌等信息?",
  18796. options: [
  18797. { name: "是,我已充分了解", value: 1, color: "green" },
  18798. { name: "否,未阅读", value: 0, color: "red" }
  18799. ]
  18800. }
  18801. ],
  18802. msgs: [],
  18803. index: 0,
  18804. item: null,
  18805. notice: [
  18806. { title: "好的。我将根据您提交的复诊信息开具处方,请详细阅读药品说明书,遵医嘱用药。" },
  18807. { title: "您存在用药禁忌证,目前不推荐购买此套餐包。建议您尽早就医,在医生指导下采取针对性的治疗措施!在改善相关禁忌证后,也可以再次咨询,重新评估是否可以使用该套餐包。" }
  18808. ],
  18809. packageId: null,
  18810. doctorId: null,
  18811. isComplete: 0,
  18812. companyUserId: null,
  18813. companyId: null
  18814. };
  18815. },
  18816. onLoad(option) {
  18817. this.packageId = option.packageId;
  18818. this.doctorId = option.doctorId;
  18819. if (!this.$isEmpty(option.companyId)) {
  18820. this.companyId = option.companyId;
  18821. }
  18822. if (!this.$isEmpty(option.companyUserId)) {
  18823. this.companyUserId = option.companyUserId;
  18824. }
  18825. var that = this;
  18826. uni.$on("refreshOrderPatient", (res) => {
  18827. that.patient = res;
  18828. });
  18829. this.item = this.items[0];
  18830. this.addMsg(1, this.item.title);
  18831. },
  18832. onShow() {
  18833. },
  18834. methods: {
  18835. close() {
  18836. this.show = false;
  18837. },
  18838. confirm() {
  18839. if (this.isComplete == 1) {
  18840. this.submit();
  18841. } else {
  18842. uni.navigateBack();
  18843. }
  18844. },
  18845. addMsg(type2, content) {
  18846. var msg = { type: type2, content };
  18847. this.msgs.push(msg);
  18848. var that = this;
  18849. uni.createSelectorQuery().select(".msgs").boundingClientRect((res) => {
  18850. const scrollH = res.height;
  18851. that.scrollTop = scrollH;
  18852. formatAppLog("log", "at pages_index/packageForm.vue:150", that.scrollTop);
  18853. }).exec();
  18854. },
  18855. optionClick(item, option) {
  18856. if (this.patient == null) {
  18857. uni.showToast({
  18858. icon: "none",
  18859. title: "请选择就诊人"
  18860. });
  18861. return;
  18862. }
  18863. if (option.value == 0) {
  18864. this.content = this.notice[1].title;
  18865. this.show = true;
  18866. this.isComplete = 0;
  18867. return;
  18868. }
  18869. item.option = option.name;
  18870. formatAppLog("log", "at pages_index/packageForm.vue:172", item.option);
  18871. this.addMsg(2, option.name);
  18872. this.index++;
  18873. if (this.index <= this.items.length - 1) {
  18874. this.item = this.items[this.index];
  18875. this.addMsg(1, this.item.title);
  18876. } else {
  18877. this.content = this.notice[0].title;
  18878. this.show = true;
  18879. this.isComplete = 1;
  18880. return;
  18881. }
  18882. },
  18883. addPatient() {
  18884. uni.navigateTo({
  18885. url: "/pages_user/patient"
  18886. });
  18887. },
  18888. submit() {
  18889. uni.showLoading({
  18890. title: "处理中..."
  18891. });
  18892. var data = {
  18893. companyId: this.companyId,
  18894. companyUserId: this.companyUserId,
  18895. patientId: this.patient.patientId,
  18896. patientJson: JSON.stringify(this.patient),
  18897. packageId: this.packageId,
  18898. doctorId: this.doctorId,
  18899. formJson: JSON.stringify(this.items)
  18900. };
  18901. create$1(data).then((res) => {
  18902. uni.hideLoading();
  18903. if (res.code == 200) {
  18904. var temps = ["jARl4BpoBkRu-2MxPMkQVhIfGMG0V9qW-X3V_7NtEOU"];
  18905. uni.requestSubscribeMessage({
  18906. tmplIds: temps,
  18907. success(e) {
  18908. setTimeout(function() {
  18909. uni.navigateTo({
  18910. url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId
  18911. });
  18912. }, 200);
  18913. },
  18914. fail(e) {
  18915. setTimeout(function() {
  18916. uni.navigateTo({
  18917. url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId
  18918. });
  18919. }, 200);
  18920. }
  18921. });
  18922. } else {
  18923. uni.showToast({
  18924. icon: "none",
  18925. title: res.msg
  18926. });
  18927. }
  18928. });
  18929. }
  18930. }
  18931. };
  18932. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  18933. const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_0$9);
  18934. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  18935. vue.createElementVNode("view", { class: "patient-cont" }, [
  18936. vue.createElementVNode("view", { class: "chose-patient" }, [
  18937. $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
  18938. key: 0,
  18939. class: "patient-box",
  18940. onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
  18941. }, [
  18942. vue.createElementVNode("view", { class: "patient-item" }, [
  18943. vue.createElementVNode("view", { class: "patient-tip" }, "*"),
  18944. vue.createElementVNode("view", { class: "patient-title" }, "选择就诊人")
  18945. ]),
  18946. vue.createElementVNode("view", { class: "right" }, [
  18947. vue.createElementVNode("image", {
  18948. src: "/static/images/arrow_gray.png",
  18949. mode: ""
  18950. })
  18951. ])
  18952. ])) : vue.createCommentVNode("v-if", true),
  18953. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  18954. key: 1,
  18955. class: "patient",
  18956. onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
  18957. }, [
  18958. vue.createElementVNode("view", { class: "left" }, [
  18959. vue.createElementVNode(
  18960. "view",
  18961. { class: "name" },
  18962. vue.toDisplayString($data.patient.patientName),
  18963. 1
  18964. /* TEXT */
  18965. ),
  18966. vue.createElementVNode("view", { class: "info" }, [
  18967. $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  18968. key: 0,
  18969. class: "text"
  18970. }, "男")) : vue.createCommentVNode("v-if", true),
  18971. $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  18972. key: 1,
  18973. class: "text"
  18974. }, "女")) : vue.createCommentVNode("v-if", true),
  18975. vue.createElementVNode(
  18976. "text",
  18977. { class: "text" },
  18978. vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
  18979. 1
  18980. /* TEXT */
  18981. ),
  18982. vue.createElementVNode(
  18983. "text",
  18984. { class: "text" },
  18985. vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
  18986. 1
  18987. /* TEXT */
  18988. )
  18989. ])
  18990. ]),
  18991. vue.createElementVNode("view", { class: "right" }, [
  18992. vue.createElementVNode("image", {
  18993. src: "/static/images/arrow_gray.png",
  18994. mode: ""
  18995. })
  18996. ])
  18997. ])) : vue.createCommentVNode("v-if", true)
  18998. ])
  18999. ]),
  19000. vue.createElementVNode("view", { class: "msg-cont" }, [
  19001. vue.createElementVNode("scroll-view", {
  19002. class: "msg-scroll",
  19003. "scroll-top": $data.scrollTop,
  19004. "scroll-y": "true",
  19005. "scroll-with-animation": true
  19006. }, [
  19007. vue.createElementVNode("view", { class: "msgs" }, [
  19008. (vue.openBlock(true), vue.createElementBlock(
  19009. vue.Fragment,
  19010. null,
  19011. vue.renderList($data.msgs, (item, index2) => {
  19012. return vue.openBlock(), vue.createElementBlock("view", { class: "msg-item" }, [
  19013. item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  19014. key: 0,
  19015. class: "left"
  19016. }, [
  19017. vue.createElementVNode("image", {
  19018. class: "img",
  19019. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/be32b8d2ae9f497297d10327656bb43c.png"
  19020. }),
  19021. vue.createElementVNode(
  19022. "view",
  19023. { class: "msg-content" },
  19024. vue.toDisplayString(item.content),
  19025. 1
  19026. /* TEXT */
  19027. )
  19028. ])) : vue.createCommentVNode("v-if", true),
  19029. item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  19030. key: 1,
  19031. class: "right"
  19032. }, [
  19033. vue.createElementVNode(
  19034. "view",
  19035. { class: "msg-content" },
  19036. vue.toDisplayString(item.content),
  19037. 1
  19038. /* TEXT */
  19039. ),
  19040. vue.createElementVNode("image", {
  19041. class: "img",
  19042. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg"
  19043. })
  19044. ])) : vue.createCommentVNode("v-if", true)
  19045. ]);
  19046. }),
  19047. 256
  19048. /* UNKEYED_FRAGMENT */
  19049. ))
  19050. ])
  19051. ], 8, ["scroll-top"])
  19052. ]),
  19053. $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  19054. key: 0,
  19055. class: "option-cont"
  19056. }, [
  19057. vue.createElementVNode(
  19058. "view",
  19059. { class: "option-title" },
  19060. vue.toDisplayString($data.item.title),
  19061. 1
  19062. /* TEXT */
  19063. ),
  19064. vue.createElementVNode("view", { class: "options" }, [
  19065. (vue.openBlock(true), vue.createElementBlock(
  19066. vue.Fragment,
  19067. null,
  19068. vue.renderList($data.item.options, (option, opIndex) => {
  19069. return vue.openBlock(), vue.createElementBlock("view", {
  19070. class: vue.normalizeClass(option.color == "red" ? "option-item red" : "option-item green"),
  19071. onClick: ($event) => $options.optionClick($data.item, option)
  19072. }, vue.toDisplayString(option.name), 11, ["onClick"]);
  19073. }),
  19074. 256
  19075. /* UNKEYED_FRAGMENT */
  19076. ))
  19077. ])
  19078. ])) : vue.createCommentVNode("v-if", true),
  19079. vue.createVNode(_component_u_modal, {
  19080. onCancel: _cache[2] || (_cache[2] = ($event) => $options.close()),
  19081. onConfirm: _cache[3] || (_cache[3] = ($event) => $options.confirm()),
  19082. show: $data.show,
  19083. title: "温馨提示",
  19084. content: $data.content
  19085. }, null, 8, ["show", "content"])
  19086. ]);
  19087. }
  19088. const Pages_indexPackageForm = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageForm.vue"]]);
  19089. const _sfc_main$1G = {
  19090. components: { Menu },
  19091. mixins: [MescrollMixin],
  19092. data() {
  19093. return {
  19094. top: null,
  19095. cates: [],
  19096. cateId: 0,
  19097. keyword: "",
  19098. mescroll: null,
  19099. downOption: {
  19100. //下拉刷新
  19101. use: true,
  19102. auto: false
  19103. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  19104. },
  19105. upOption: {
  19106. onScroll: false,
  19107. use: true,
  19108. // 是否启用上拉加载; 默认true
  19109. page: {
  19110. pae: 0,
  19111. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  19112. size: 10
  19113. // 每页数据的数量,默认10
  19114. },
  19115. noMoreSize: 10,
  19116. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  19117. textNoMore: "已经到底了",
  19118. empty: {
  19119. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  19120. tip: "暂无数据"
  19121. }
  19122. },
  19123. dataList: []
  19124. };
  19125. },
  19126. onLoad() {
  19127. },
  19128. onShow() {
  19129. this.getDoctorArticleCateList();
  19130. },
  19131. methods: {
  19132. menuClick(item) {
  19133. this.cateId = item.cateId;
  19134. this.mescroll.resetUpScroll();
  19135. },
  19136. getDoctorArticleCateList() {
  19137. var that = this;
  19138. let data = {};
  19139. getDoctorArticleCateList(data).then(
  19140. (res) => {
  19141. if (res.code == 200) {
  19142. this.cates = res.data;
  19143. var query = uni.createSelectorQuery().in(that);
  19144. setTimeout(function() {
  19145. query.select(".top-content").boundingClientRect((data2) => {
  19146. if (data2) {
  19147. formatAppLog("log", "at pages_doctor/doctorArticleList.vue:114", "View height:", data2.height + "px");
  19148. that.top = data2.height + "px";
  19149. }
  19150. }).exec();
  19151. }, 500);
  19152. } else {
  19153. uni.showToast({
  19154. icon: "none",
  19155. title: "请求失败"
  19156. });
  19157. }
  19158. },
  19159. (rej) => {
  19160. }
  19161. );
  19162. },
  19163. doSearch() {
  19164. this.mescroll.resetUpScroll();
  19165. },
  19166. getArticleCateList() {
  19167. let data = {};
  19168. getArticleCateList(data).then(
  19169. (res) => {
  19170. if (res.code == 200) {
  19171. this.cates = res.data;
  19172. } else {
  19173. uni.showToast({
  19174. icon: "none",
  19175. title: "请求失败"
  19176. });
  19177. }
  19178. },
  19179. (rej) => {
  19180. }
  19181. );
  19182. },
  19183. mescrollInit(mescroll) {
  19184. this.mescroll = mescroll;
  19185. },
  19186. /*下拉刷新的回调 */
  19187. downCallback(mescroll) {
  19188. mescroll.resetUpScroll();
  19189. },
  19190. upCallback(page2) {
  19191. var that = this;
  19192. var data = {
  19193. keyword: this.keyword,
  19194. cateId: this.cateId,
  19195. pageNum: page2.num,
  19196. pageSize: page2.size
  19197. };
  19198. getDoctorArticleList(data).then((res) => {
  19199. if (res.code == 200) {
  19200. if (page2.num == 1) {
  19201. that.dataList = res.data.list;
  19202. } else {
  19203. that.dataList = that.dataList.concat(res.data.list);
  19204. }
  19205. that.mescroll.endBySize(res.data.list.length, res.data.total);
  19206. } else {
  19207. uni.showToast({
  19208. icon: "none",
  19209. title: "请求失败"
  19210. });
  19211. that.dataList = null;
  19212. that.mescroll.endErr();
  19213. }
  19214. });
  19215. },
  19216. // 关键词选择
  19217. choseCate(item) {
  19218. this.cateId = item.cateId;
  19219. this.mescroll.resetUpScroll();
  19220. },
  19221. // 查看详情
  19222. showDetail(item) {
  19223. uni.navigateTo({
  19224. url: "./doctorArticleDetails?articleId=" + item.articleId
  19225. });
  19226. }
  19227. }
  19228. };
  19229. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  19230. const _component_Menu = vue.resolveComponent("Menu");
  19231. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  19232. return vue.openBlock(), vue.createElementBlock("view", null, [
  19233. vue.createElementVNode("view", { class: "top-content" }, [
  19234. vue.createCommentVNode(" 搜索框 "),
  19235. vue.createElementVNode("view", { class: "search-cont" }, [
  19236. vue.createElementVNode("view", { class: "inner" }, [
  19237. vue.createElementVNode("image", {
  19238. class: "icon-search",
  19239. src: "/static/images/icon_search.png",
  19240. mode: ""
  19241. }),
  19242. vue.withDirectives(vue.createElementVNode(
  19243. "input",
  19244. {
  19245. type: "text",
  19246. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  19247. placeholder: "输入关键字搜索",
  19248. "confirm-type": "search",
  19249. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  19250. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  19251. },
  19252. null,
  19253. 544
  19254. /* NEED_HYDRATION, NEED_PATCH */
  19255. ), [
  19256. [vue.vModelText, $data.keyword]
  19257. ])
  19258. ])
  19259. ]),
  19260. vue.createElementVNode("view", { class: "cate-list" }, [
  19261. $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
  19262. key: 0,
  19263. list: $data.cates,
  19264. onMenuClick: $options.menuClick,
  19265. style: { "width": "100%" }
  19266. }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true),
  19267. vue.createCommentVNode(" 关键字列表 "),
  19268. vue.createCommentVNode(' <scroll-view scroll-x="true" > '),
  19269. vue.createCommentVNode(` <view class="inner">\r
  19270. <view v-for="(item,index) in cates" :key="index" :class="cateId == item.cateId?'item active':'item'" @click="choseCate(item)">\r
  19271. <image class="icon" :src="item.imgUrl"></image>\r
  19272. <view class="title" >{{item.cateName}} </view>\r
  19273. </view>\r
  19274. </view> `),
  19275. vue.createCommentVNode(" </scroll-view> ")
  19276. ])
  19277. ]),
  19278. $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
  19279. key: 0,
  19280. top: $data.top,
  19281. ref: "mescrollRef",
  19282. onInit: $options.mescrollInit,
  19283. onDown: $options.downCallback,
  19284. onUp: $options.upCallback,
  19285. down: $data.downOption,
  19286. up: $data.upOption
  19287. }, {
  19288. default: vue.withCtx(() => [
  19289. vue.createElementVNode("view", { class: "article-list" }, [
  19290. (vue.openBlock(true), vue.createElementBlock(
  19291. vue.Fragment,
  19292. null,
  19293. vue.renderList($data.dataList, (item, index2) => {
  19294. return vue.openBlock(), vue.createElementBlock("view", {
  19295. class: "item",
  19296. key: index2,
  19297. onClick: ($event) => $options.showDetail(item)
  19298. }, [
  19299. vue.createElementVNode("view", { class: "left" }, [
  19300. vue.createElementVNode(
  19301. "view",
  19302. { class: "title ellipsis2" },
  19303. vue.toDisplayString(item.title),
  19304. 1
  19305. /* TEXT */
  19306. ),
  19307. vue.createElementVNode("view", { class: "info-box" }, [
  19308. vue.createElementVNode("view", { class: "readers" }, [
  19309. vue.createElementVNode("view", { class: "head-box" }, [
  19310. vue.createElementVNode("view", { class: "head" }, [
  19311. vue.createElementVNode("image", {
  19312. class: "eye",
  19313. mode: "aspectFill",
  19314. src: item.avatar
  19315. }, null, 8, ["src"])
  19316. ])
  19317. ]),
  19318. vue.createElementVNode("view", { class: "readings" }, [
  19319. vue.createElementVNode("image", {
  19320. class: "eye",
  19321. src: "/static/images/eye.png"
  19322. }),
  19323. vue.createElementVNode(
  19324. "text",
  19325. { class: "num" },
  19326. vue.toDisplayString(item.views),
  19327. 1
  19328. /* TEXT */
  19329. )
  19330. ])
  19331. ]),
  19332. vue.createElementVNode(
  19333. "view",
  19334. { class: "time-box" },
  19335. vue.toDisplayString(item.createTime),
  19336. 1
  19337. /* TEXT */
  19338. )
  19339. ])
  19340. ]),
  19341. vue.createElementVNode("view", { class: "right" }, [
  19342. vue.createElementVNode("image", {
  19343. src: item.imageUrl,
  19344. mode: "aspectFill"
  19345. }, null, 8, ["src"])
  19346. ])
  19347. ], 8, ["onClick"]);
  19348. }),
  19349. 128
  19350. /* KEYED_FRAGMENT */
  19351. ))
  19352. ])
  19353. ]),
  19354. _: 1
  19355. /* STABLE */
  19356. }, 8, ["top", "onInit", "onDown", "onUp", "down", "up"])) : vue.createCommentVNode("v-if", true)
  19357. ]);
  19358. }
  19359. const Pages_doctorDoctorArticleList = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorArticleList.vue"]]);
  19360. const _sfc_main$1F = {
  19361. data() {
  19362. return {
  19363. advs: [],
  19364. advImgs: [],
  19365. src: "",
  19366. articleId: null,
  19367. item: {}
  19368. };
  19369. },
  19370. onLoad(option) {
  19371. this.articleId = option.articleId;
  19372. },
  19373. onShow() {
  19374. this.getAdvList();
  19375. this.getDoctorArticleById();
  19376. },
  19377. //发送给朋友
  19378. onShareAppMessage(res) {
  19379. return {
  19380. title: this.item.title,
  19381. path: "/pages_doctor/doctorArticleDetails?articleId=" + this.articleId
  19382. };
  19383. },
  19384. //分享到朋友圈
  19385. onShareTimeline(res) {
  19386. return {
  19387. title: this.item.title,
  19388. query: "articleId=" + this.articleId
  19389. //页面参数
  19390. };
  19391. },
  19392. methods: {
  19393. handleAdvClick(index2) {
  19394. var ad = this.advs[index2];
  19395. formatAppLog("log", "at pages_doctor/doctorArticleDetails.vue:79", ad.advUrl);
  19396. if (ad.showType == 1) {
  19397. uni.setStorageSync("url", ad.advUrl);
  19398. uni.navigateTo({
  19399. url: "h5"
  19400. });
  19401. } else if (ad.showType == 2) {
  19402. uni.navigateTo({
  19403. url: ad.advUrl
  19404. });
  19405. } else if (ad.showType == 3) {
  19406. uni.setStorageSync("content", ad.content);
  19407. uni.navigateTo({
  19408. url: "content"
  19409. });
  19410. }
  19411. },
  19412. getAdvList() {
  19413. var that = this;
  19414. var data = {
  19415. advType: 10
  19416. };
  19417. getAdvList(data).then((res) => {
  19418. if (res.code == 200) {
  19419. that.advImgs = [];
  19420. that.advs = [];
  19421. res.data.forEach(function(element) {
  19422. if (element.imageUrl != null && element.imageUrl != "") {
  19423. that.advs.push(element);
  19424. that.advImgs.push(element.imageUrl);
  19425. }
  19426. });
  19427. } else {
  19428. uni.showToast({
  19429. icon: "none",
  19430. title: "请求失败"
  19431. });
  19432. }
  19433. });
  19434. },
  19435. videoErrorCallback: function(e) {
  19436. uni.showModal({
  19437. content: e.target.errMsg,
  19438. showCancel: false
  19439. });
  19440. },
  19441. navTo(url2) {
  19442. uni.navigateTo({
  19443. url: url2
  19444. });
  19445. },
  19446. getDoctorArticleById() {
  19447. let data = { articleId: this.articleId };
  19448. getDoctorArticleById(data).then(
  19449. (res) => {
  19450. if (res.code == 200) {
  19451. this.item = res.data;
  19452. } else {
  19453. uni.showToast({
  19454. icon: "none",
  19455. title: "请求失败"
  19456. });
  19457. }
  19458. },
  19459. (rej) => {
  19460. }
  19461. );
  19462. }
  19463. }
  19464. };
  19465. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  19466. const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
  19467. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  19468. vue.createElementVNode("view", { class: "detail-cont" }, [
  19469. vue.createElementVNode(
  19470. "view",
  19471. { class: "title" },
  19472. vue.toDisplayString($data.item.title),
  19473. 1
  19474. /* TEXT */
  19475. ),
  19476. vue.createElementVNode("view", { class: "info" }, [
  19477. vue.createElementVNode(
  19478. "view",
  19479. { class: "reads" },
  19480. "阅读数:" + vue.toDisplayString($data.item.views),
  19481. 1
  19482. /* TEXT */
  19483. ),
  19484. vue.createElementVNode(
  19485. "view",
  19486. { class: "time" },
  19487. vue.toDisplayString($data.item.createTime),
  19488. 1
  19489. /* TEXT */
  19490. )
  19491. ]),
  19492. $data.item.videoUrl != null ? (vue.openBlock(), vue.createElementBlock("view", {
  19493. key: 0,
  19494. class: "video"
  19495. }, [
  19496. vue.createElementVNode("video", {
  19497. class: "myVideo",
  19498. id: "myVideo",
  19499. src: $data.item.videoUrl,
  19500. onError: _cache[0] || (_cache[0] = (...args) => $options.videoErrorCallback && $options.videoErrorCallback(...args)),
  19501. controls: ""
  19502. }, null, 40, ["src"])
  19503. ])) : vue.createCommentVNode("v-if", true),
  19504. vue.createCommentVNode(" 正文 "),
  19505. vue.createElementVNode("view", { class: "full-text" }, [
  19506. vue.createElementVNode("view", {
  19507. innerHTML: $data.item.content
  19508. }, null, 8, ["innerHTML"])
  19509. ])
  19510. ]),
  19511. vue.createCommentVNode(" 咨询按钮 "),
  19512. vue.createElementVNode("view", { class: "inquiry" }, [
  19513. vue.createElementVNode("view", {
  19514. class: "content",
  19515. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + $data.item.doctorId))
  19516. }, [
  19517. vue.createElementVNode("image", {
  19518. mode: "aspectFill",
  19519. src: $data.item.avatar
  19520. }, null, 8, ["src"]),
  19521. vue.createElementVNode(
  19522. "text",
  19523. { class: "text" },
  19524. vue.toDisplayString($data.item.doctorName),
  19525. 1
  19526. /* TEXT */
  19527. )
  19528. ])
  19529. ]),
  19530. vue.createElementVNode("view", { class: "ad" }, [
  19531. vue.createVNode(_component_u_swiper, {
  19532. list: $data.advImgs,
  19533. indicator: "",
  19534. indicatorMode: "line",
  19535. circular: "",
  19536. onClick: $options.handleAdvClick
  19537. }, null, 8, ["list", "onClick"])
  19538. ])
  19539. ]);
  19540. }
  19541. const Pages_doctorDoctorArticleDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorArticleDetails.vue"]]);
  19542. const _sfc_main$1E = {
  19543. mixins: [MescrollMixin],
  19544. // 使用mixin
  19545. data() {
  19546. return {
  19547. keyword: "",
  19548. hosLevelOptions: [],
  19549. tabIndex: 0,
  19550. tabs: [
  19551. { name: "全部", deptId: 0 }
  19552. ],
  19553. deptId: 0,
  19554. mescroll: null,
  19555. downOption: {
  19556. //下拉刷新
  19557. use: true,
  19558. auto: false
  19559. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  19560. },
  19561. upOption: {
  19562. onScroll: false,
  19563. use: true,
  19564. // 是否启用上拉加载; 默认true
  19565. page: {
  19566. pae: 0,
  19567. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  19568. size: 10
  19569. // 每页数据的数量,默认10
  19570. },
  19571. noMoreSize: 10,
  19572. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  19573. textNoMore: "已经到底了",
  19574. empty: {
  19575. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  19576. tip: "暂无数据"
  19577. }
  19578. },
  19579. dataList: []
  19580. };
  19581. },
  19582. onLoad(options) {
  19583. if (options.deptId != null) {
  19584. this.deptId = options.deptId;
  19585. }
  19586. if (options.keyword != null) {
  19587. this.keyword = options.keyword;
  19588. }
  19589. formatAppLog("log", "at pages_doctor/doctorList.vue:124", this.deptId);
  19590. this.getDictByKey("sys_hospital_level");
  19591. this.getDepartmentList();
  19592. },
  19593. onShow() {
  19594. },
  19595. methods: {
  19596. doSearch() {
  19597. this.mescroll.resetUpScroll();
  19598. },
  19599. getDictByKey(key) {
  19600. var data = { key };
  19601. getDictByKey(data).then(
  19602. (res) => {
  19603. if (res.code == 200) {
  19604. if (key == "sys_hospital_level") {
  19605. this.hosLevelOptions = res.data;
  19606. }
  19607. }
  19608. },
  19609. (err) => {
  19610. }
  19611. );
  19612. },
  19613. getDepartmentList(page2) {
  19614. var that = this;
  19615. var data = {};
  19616. getDepartmentList(data).then((res) => {
  19617. if (res.code == 200) {
  19618. res.data.forEach(function(value2, index2, array3) {
  19619. var data2 = { name: value2.deptName, deptId: value2.deptId };
  19620. that.tabs.push(data2);
  19621. if (value2.deptId == that.deptId) {
  19622. that.tabIndex = index2 + 1;
  19623. formatAppLog("log", "at pages_doctor/doctorList.vue:160", that.tabIndex);
  19624. }
  19625. });
  19626. } else {
  19627. uni.showToast({
  19628. icon: "none",
  19629. title: "请求失败"
  19630. });
  19631. }
  19632. });
  19633. },
  19634. deptChange(item) {
  19635. this.deptId = item.deptId;
  19636. this.mescroll.resetUpScroll();
  19637. },
  19638. navTo(url2) {
  19639. uni.navigateTo({
  19640. url: url2
  19641. });
  19642. },
  19643. mescrollInit(mescroll) {
  19644. this.mescroll = mescroll;
  19645. },
  19646. /*下拉刷新的回调 */
  19647. downCallback() {
  19648. this.mescroll.resetUpScroll();
  19649. },
  19650. /*上拉加载的回调*/
  19651. upCallback(page2) {
  19652. var that = this;
  19653. var data = {
  19654. keyword: this.keyword,
  19655. deptId: this.deptId,
  19656. pageNum: page2.num,
  19657. pageSize: page2.size
  19658. };
  19659. getDoctorList(data).then((res) => {
  19660. if (res.code == 200) {
  19661. if (page2.num == 1) {
  19662. res.data.list.forEach(function(value2, index2, array3) {
  19663. value2.prices = JSON.parse(value2.priceJson);
  19664. });
  19665. that.dataList = res.data.list;
  19666. } else {
  19667. that.dataList = that.dataList.concat(res.data.list);
  19668. }
  19669. that.mescroll.endBySize(res.data.list.length, res.data.total);
  19670. } else {
  19671. uni.showToast({
  19672. icon: "none",
  19673. title: "请求失败"
  19674. });
  19675. that.dataList = null;
  19676. that.mescroll.endErr();
  19677. }
  19678. });
  19679. }
  19680. }
  19681. };
  19682. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  19683. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  19684. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  19685. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  19686. vue.createElementVNode("view", { class: "search-cont" }, [
  19687. vue.createElementVNode("view", { class: "inner" }, [
  19688. vue.createElementVNode("image", {
  19689. class: "icon-search",
  19690. src: "/static/images/icon_search.png",
  19691. mode: ""
  19692. }),
  19693. vue.withDirectives(vue.createElementVNode(
  19694. "input",
  19695. {
  19696. type: "text",
  19697. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  19698. placeholder: "输入医生姓名搜索",
  19699. "confirm-type": "search",
  19700. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  19701. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  19702. },
  19703. null,
  19704. 544
  19705. /* NEED_HYDRATION, NEED_PATCH */
  19706. ), [
  19707. [vue.vModelText, $data.keyword]
  19708. ])
  19709. ])
  19710. ]),
  19711. vue.createElementVNode("view", { class: "top-fixed" }, [
  19712. vue.createVNode(_component_u_tabs, {
  19713. current: $data.tabIndex,
  19714. scrollable: true,
  19715. list: $data.tabs,
  19716. lineColor: "#C39A58",
  19717. onChange: $options.deptChange
  19718. }, null, 8, ["current", "list", "onChange"])
  19719. ]),
  19720. vue.createVNode(_component_mescroll_body, {
  19721. top: "176rpx",
  19722. bottom: "0",
  19723. ref: "mescrollRef",
  19724. onInit: $options.mescrollInit,
  19725. down: $data.downOption,
  19726. up: $data.upOption,
  19727. onDown: $options.downCallback,
  19728. onUp: $options.upCallback
  19729. }, {
  19730. default: vue.withCtx(() => [
  19731. $data.dataList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  19732. key: 0,
  19733. class: "doctors"
  19734. }, [
  19735. vue.createElementVNode("view", { class: "doctor-box" }, [
  19736. (vue.openBlock(true), vue.createElementBlock(
  19737. vue.Fragment,
  19738. null,
  19739. vue.renderList($data.dataList, (item, index2) => {
  19740. return vue.openBlock(), vue.createElementBlock("view", {
  19741. class: "doctor",
  19742. onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId)
  19743. }, [
  19744. vue.createElementVNode("view", { class: "item" }, [
  19745. vue.createElementVNode("view", { class: "left" }, [
  19746. vue.createElementVNode("view", { class: "head-box" }, [
  19747. vue.createElementVNode("image", {
  19748. mode: "aspectFill",
  19749. class: "doc-img",
  19750. src: item.avatar
  19751. }, null, 8, ["src"]),
  19752. item.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  19753. key: 0,
  19754. class: "isline"
  19755. }, [
  19756. vue.createElementVNode("view", { class: "img" }, [
  19757. vue.createElementVNode("image", { src: "/static/images/isline.png" }),
  19758. vue.createElementVNode("view", { class: "name" }, "在线")
  19759. ])
  19760. ])) : vue.createCommentVNode("v-if", true)
  19761. ])
  19762. ]),
  19763. vue.createElementVNode("view", { class: "right" }, [
  19764. vue.createElementVNode("view", { class: "doc-box" }, [
  19765. vue.createElementVNode(
  19766. "view",
  19767. { class: "doc-name" },
  19768. vue.toDisplayString(item.doctorName),
  19769. 1
  19770. /* TEXT */
  19771. ),
  19772. vue.createElementVNode(
  19773. "view",
  19774. { class: "doc-position" },
  19775. vue.toDisplayString(item.position),
  19776. 1
  19777. /* TEXT */
  19778. ),
  19779. vue.createElementVNode(
  19780. "view",
  19781. { class: "doc-dept" },
  19782. vue.toDisplayString(item.deptName),
  19783. 1
  19784. /* TEXT */
  19785. )
  19786. ]),
  19787. vue.createElementVNode("view", { class: "hospital-box" }, [
  19788. item.hospitalLevel != null ? (vue.openBlock(), vue.createElementBlock("view", {
  19789. key: 0,
  19790. class: "tag"
  19791. }, [
  19792. vue.createElementVNode(
  19793. "text",
  19794. null,
  19795. vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item.hospitalLevel)),
  19796. 1
  19797. /* TEXT */
  19798. )
  19799. ])) : vue.createCommentVNode("v-if", true),
  19800. vue.createElementVNode(
  19801. "view",
  19802. { class: "name" },
  19803. vue.toDisplayString(item.hospitalName),
  19804. 1
  19805. /* TEXT */
  19806. )
  19807. ]),
  19808. vue.createElementVNode("view", { class: "doc-spec" }, [
  19809. vue.createElementVNode(
  19810. "view",
  19811. { class: "spec ellipsis2" },
  19812. vue.toDisplayString(item.speciality),
  19813. 1
  19814. /* TEXT */
  19815. )
  19816. ]),
  19817. vue.createElementVNode("view", { class: "doc-count" }, [
  19818. vue.createElementVNode("view", { class: "name" }, "好评:"),
  19819. vue.createElementVNode(
  19820. "view",
  19821. { class: "count" },
  19822. vue.toDisplayString(item.pingStar) + "分",
  19823. 1
  19824. /* TEXT */
  19825. ),
  19826. vue.createElementVNode("view", { class: "name" }, "接诊量:"),
  19827. vue.createElementVNode(
  19828. "view",
  19829. { class: "count" },
  19830. vue.toDisplayString(item.orderNumber),
  19831. 1
  19832. /* TEXT */
  19833. ),
  19834. vue.createElementVNode("view", { class: "name" }, "平均响应:"),
  19835. vue.createElementVNode(
  19836. "view",
  19837. { class: "count" },
  19838. vue.toDisplayString(item.speed) + "分钟",
  19839. 1
  19840. /* TEXT */
  19841. )
  19842. ]),
  19843. vue.createElementVNode("view", { class: "doc-price" }, [
  19844. vue.createElementVNode("view", { class: "btn" }, [
  19845. vue.createTextVNode(" 咨询医生¥ "),
  19846. (vue.openBlock(true), vue.createElementBlock(
  19847. vue.Fragment,
  19848. null,
  19849. vue.renderList(item.prices, (price, index3) => {
  19850. return vue.openBlock(), vue.createElementBlock("text", null, [
  19851. vue.createTextVNode(
  19852. vue.toDisplayString(price.price.toFixed(2)) + " ",
  19853. 1
  19854. /* TEXT */
  19855. ),
  19856. index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
  19857. ]);
  19858. }),
  19859. 256
  19860. /* UNKEYED_FRAGMENT */
  19861. ))
  19862. ])
  19863. ])
  19864. ])
  19865. ])
  19866. ], 8, ["onClick"]);
  19867. }),
  19868. 256
  19869. /* UNKEYED_FRAGMENT */
  19870. ))
  19871. ])
  19872. ])) : vue.createCommentVNode("v-if", true)
  19873. ]),
  19874. _: 1
  19875. /* STABLE */
  19876. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  19877. ]);
  19878. }
  19879. const Pages_doctorDoctorList = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-5e54308c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorList.vue"]]);
  19880. const props$k = {
  19881. props: {
  19882. // 用于v-model双向绑定选中的星星数量
  19883. modelValue: {
  19884. type: [String, Number],
  19885. default: props$y.rate.value
  19886. },
  19887. // 要显示的星星数量
  19888. count: {
  19889. type: [String, Number],
  19890. default: props$y.rate.count
  19891. },
  19892. // 是否不可选中
  19893. disabled: {
  19894. type: Boolean,
  19895. default: props$y.rate.disabled
  19896. },
  19897. // 是否只读
  19898. readonly: {
  19899. type: Boolean,
  19900. default: props$y.rate.readonly
  19901. },
  19902. // 星星的大小,单位px
  19903. size: {
  19904. type: [String, Number],
  19905. default: props$y.rate.size
  19906. },
  19907. // 未选中时的颜色
  19908. inactiveColor: {
  19909. type: String,
  19910. default: props$y.rate.inactiveColor
  19911. },
  19912. // 选中的颜色
  19913. activeColor: {
  19914. type: String,
  19915. default: props$y.rate.activeColor
  19916. },
  19917. // 星星之间的间距,单位px
  19918. gutter: {
  19919. type: [String, Number],
  19920. default: props$y.rate.gutter
  19921. },
  19922. // 最少能选择的星星个数
  19923. minCount: {
  19924. type: [String, Number],
  19925. default: props$y.rate.minCount
  19926. },
  19927. // 是否允许半星
  19928. allowHalf: {
  19929. type: Boolean,
  19930. default: props$y.rate.allowHalf
  19931. },
  19932. // 选中时的图标(星星)
  19933. activeIcon: {
  19934. type: String,
  19935. default: props$y.rate.activeIcon
  19936. },
  19937. // 未选中时的图标(星星)
  19938. inactiveIcon: {
  19939. type: String,
  19940. default: props$y.rate.inactiveIcon
  19941. },
  19942. // 是否可以通过滑动手势选择评分
  19943. touchable: {
  19944. type: Boolean,
  19945. default: props$y.rate.touchable
  19946. }
  19947. }
  19948. };
  19949. const _sfc_main$1D = {
  19950. name: "u-rate",
  19951. mixins: [mpMixin, mixin, props$k],
  19952. data() {
  19953. return {
  19954. // 生成一个唯一id,否则一个页面多个评分组件,会造成冲突
  19955. elId: uni.$u.guid(),
  19956. elClass: uni.$u.guid(),
  19957. rateBoxLeft: 0,
  19958. // 评分盒子左边到屏幕左边的距离,用于滑动选择时计算距离
  19959. activeIndex: this.modelValue,
  19960. rateWidth: 0,
  19961. // 每个星星的宽度
  19962. // 标识是否正在滑动,由于iOS事件上touch比click先触发,导致快速滑动结束后,接着触发click,导致事件混乱而出错
  19963. moving: false
  19964. };
  19965. },
  19966. watch: {
  19967. modelValue(val) {
  19968. this.activeIndex = val;
  19969. },
  19970. activeIndex: "emitEvent"
  19971. },
  19972. emits: ["update:modelValue", "change"],
  19973. methods: {
  19974. init() {
  19975. uni.$u.sleep().then(() => {
  19976. this.getRateItemRect();
  19977. this.getRateIconWrapRect();
  19978. });
  19979. },
  19980. // 获取评分组件盒子的布局信息
  19981. async getRateItemRect() {
  19982. await uni.$u.sleep();
  19983. this.$uGetRect("#" + this.elId).then((res) => {
  19984. this.rateBoxLeft = res.left;
  19985. });
  19986. },
  19987. // 获取单个星星的尺寸
  19988. getRateIconWrapRect() {
  19989. this.$uGetRect("." + this.elClass).then((res) => {
  19990. this.rateWidth = res.width;
  19991. });
  19992. },
  19993. // 手指滑动
  19994. touchMove(e) {
  19995. if (!this.touchable) {
  19996. return;
  19997. }
  19998. this.preventEvent(e);
  19999. const x = e.changedTouches[0].pageX;
  20000. this.getActiveIndex(x);
  20001. },
  20002. // 停止滑动
  20003. touchEnd(e) {
  20004. if (!this.touchable) {
  20005. return;
  20006. }
  20007. this.preventEvent(e);
  20008. const x = e.changedTouches[0].pageX;
  20009. this.getActiveIndex(x);
  20010. },
  20011. // 通过点击,直接选中
  20012. clickHandler(e, index2) {
  20013. if (uni.$u.os() === "ios" && this.moving) {
  20014. return;
  20015. }
  20016. this.preventEvent(e);
  20017. let x = 0;
  20018. x = e.changedTouches[0].pageX;
  20019. this.getActiveIndex(x, true);
  20020. },
  20021. // 发出事件
  20022. emitEvent() {
  20023. this.$emit("change", this.activeIndex);
  20024. this.$emit("update:modelValue", this.activeIndex);
  20025. },
  20026. // 获取当前激活的评分图标
  20027. getActiveIndex(x, isClick = false) {
  20028. if (this.disabled || this.readonly) {
  20029. return;
  20030. }
  20031. const allRateWidth = this.rateWidth * this.count + this.rateBoxLeft;
  20032. x = uni.$u.range(this.rateBoxLeft, allRateWidth, x) - this.rateBoxLeft;
  20033. const distance = x;
  20034. let index2;
  20035. if (this.allowHalf) {
  20036. index2 = Math.floor(distance / this.rateWidth);
  20037. const decimal = distance % this.rateWidth;
  20038. if (decimal <= this.rateWidth / 2 && decimal > 0) {
  20039. index2 += 0.5;
  20040. } else if (decimal > this.rateWidth / 2) {
  20041. index2++;
  20042. }
  20043. } else {
  20044. index2 = Math.floor(distance / this.rateWidth);
  20045. const decimal = distance % this.rateWidth;
  20046. if (isClick) {
  20047. if (decimal > 0)
  20048. index2++;
  20049. } else {
  20050. if (decimal > this.rateWidth / 2)
  20051. index2++;
  20052. }
  20053. }
  20054. this.activeIndex = Math.min(index2, this.count);
  20055. if (this.activeIndex < this.minCount) {
  20056. this.activeIndex = this.minCount;
  20057. }
  20058. setTimeout(() => {
  20059. this.moving = true;
  20060. }, 10);
  20061. setTimeout(() => {
  20062. this.moving = false;
  20063. }, 10);
  20064. }
  20065. },
  20066. mounted() {
  20067. this.init();
  20068. }
  20069. };
  20070. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  20071. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  20072. return vue.openBlock(), vue.createElementBlock("view", {
  20073. class: "u-rate",
  20074. id: $data.elId,
  20075. ref: "u-rate",
  20076. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  20077. }, [
  20078. vue.createElementVNode(
  20079. "view",
  20080. {
  20081. class: "u-rate__content",
  20082. onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["stop"])),
  20083. onTouchend: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["stop"]))
  20084. },
  20085. [
  20086. (vue.openBlock(true), vue.createElementBlock(
  20087. vue.Fragment,
  20088. null,
  20089. vue.renderList(Number(_ctx.count), (item, index2) => {
  20090. return vue.openBlock(), vue.createElementBlock(
  20091. "view",
  20092. {
  20093. class: vue.normalizeClass(["u-rate__content__item", [$data.elClass]]),
  20094. key: index2
  20095. },
  20096. [
  20097. vue.createElementVNode("view", {
  20098. class: "u-rate__content__item__icon-wrap",
  20099. ref_for: true,
  20100. ref: "u-rate__content__item__icon-wrap",
  20101. onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"])
  20102. }, [
  20103. vue.createVNode(_component_u_icon, {
  20104. name: Math.floor($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon,
  20105. color: _ctx.disabled ? "#c8c9cc" : Math.floor($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor,
  20106. "custom-style": {
  20107. padding: `0 ${_ctx.$u.addUnit(_ctx.gutter / 2)}`
  20108. },
  20109. size: _ctx.size
  20110. }, null, 8, ["name", "color", "custom-style", "size"])
  20111. ], 8, ["onClick"]),
  20112. _ctx.allowHalf ? (vue.openBlock(), vue.createElementBlock("view", {
  20113. key: 0,
  20114. onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]),
  20115. class: "u-rate__content__item__icon-wrap u-rate__content__item__icon-wrap--half",
  20116. style: vue.normalizeStyle([{
  20117. width: _ctx.$u.addUnit($data.rateWidth / 2)
  20118. }]),
  20119. ref_for: true,
  20120. ref: "u-rate__content__item__icon-wrap"
  20121. }, [
  20122. vue.createVNode(_component_u_icon, {
  20123. name: Math.ceil($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon,
  20124. color: _ctx.disabled ? "#c8c9cc" : Math.ceil($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor,
  20125. "custom-style": {
  20126. padding: `0 ${_ctx.$u.addUnit(_ctx.gutter / 2)}`
  20127. },
  20128. size: _ctx.size
  20129. }, null, 8, ["name", "color", "custom-style", "size"])
  20130. ], 12, ["onClick"])) : vue.createCommentVNode("v-if", true)
  20131. ],
  20132. 2
  20133. /* CLASS */
  20134. );
  20135. }),
  20136. 128
  20137. /* KEYED_FRAGMENT */
  20138. ))
  20139. ],
  20140. 32
  20141. /* NEED_HYDRATION */
  20142. )
  20143. ], 12, ["id"]);
  20144. }
  20145. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-69a384ee"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-rate/u-rate.vue"]]);
  20146. const _sfc_main$1C = {
  20147. data() {
  20148. return {
  20149. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  20150. isFollow: false,
  20151. doctorId: null,
  20152. doctor: null,
  20153. department: null,
  20154. hospital: null,
  20155. pings: []
  20156. };
  20157. },
  20158. onLoad(options) {
  20159. if (options.doctorId != null) {
  20160. this.doctorId = options.doctorId;
  20161. } else if (options.hasOwnProperty("q") && options.q) {
  20162. const url2 = decodeURIComponent(options.q);
  20163. const obj = this.$urlToObj(url2);
  20164. uni.setStorageSync("doctorId", obj.doctorId);
  20165. this.doctorId = obj.doctorId;
  20166. }
  20167. },
  20168. onShow() {
  20169. this.getDoctorDetails();
  20170. this.getDoctorPingList();
  20171. var that = this;
  20172. this.$isLogin().then(
  20173. (res) => {
  20174. if (res) {
  20175. that.checkFollow();
  20176. }
  20177. },
  20178. (rej) => {
  20179. }
  20180. );
  20181. },
  20182. //发送给朋友
  20183. onShareAppMessage(res) {
  20184. return {
  20185. title: this.doctor.doctorName,
  20186. path: "/pages_doctor/doctorDetails?doctorId=" + this.doctorId,
  20187. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  20188. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  20189. };
  20190. },
  20191. //分享到朋友圈
  20192. onShareTimeline(res) {
  20193. return {
  20194. title: this.doctor.doctorName,
  20195. query: "doctorId=" + this.doctorId,
  20196. //页面参数
  20197. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  20198. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  20199. };
  20200. },
  20201. methods: {
  20202. goback() {
  20203. uni.navigateBack();
  20204. },
  20205. gohome() {
  20206. uni.switchTab({
  20207. url: "/pages/index/index"
  20208. });
  20209. },
  20210. doInquiry(price) {
  20211. if (this.doctor.workStatus == 0) {
  20212. uni.showToast({
  20213. icon: "none",
  20214. title: "医生休息中"
  20215. });
  20216. return;
  20217. }
  20218. var that = this;
  20219. this.$isLogin().then(
  20220. (res) => {
  20221. if (res) {
  20222. uni.navigateTo({
  20223. url: "/pages_order/inquiryForm1?inquiryType=1&orderType=" + price.type + "&doctorId=" + that.doctorId
  20224. });
  20225. } else {
  20226. uni.navigateTo({
  20227. url: "/pages/auth/login"
  20228. });
  20229. }
  20230. },
  20231. (rej) => {
  20232. }
  20233. );
  20234. },
  20235. followChange() {
  20236. this.$isLogin().then(
  20237. (res) => {
  20238. if (res) {
  20239. this.doFollow();
  20240. } else {
  20241. uni.navigateTo({
  20242. url: "/pages/auth/login"
  20243. });
  20244. }
  20245. },
  20246. (rej) => {
  20247. }
  20248. );
  20249. },
  20250. checkFollow() {
  20251. var data = { doctorId: this.doctorId };
  20252. checkFollow(data).then(
  20253. (res) => {
  20254. if (res.code == 200) {
  20255. if (res.isFollow == 1) {
  20256. this.isFollow = true;
  20257. } else {
  20258. this.isFollow = false;
  20259. }
  20260. } else {
  20261. this.isFollow = false;
  20262. }
  20263. },
  20264. (rej) => {
  20265. }
  20266. );
  20267. },
  20268. doFollow() {
  20269. var data = { doctorId: this.doctorId };
  20270. doFollow$1(data).then(
  20271. (res) => {
  20272. this.isFollow = !this.isFollow;
  20273. if (res.code = 200) {
  20274. uni.showToast({
  20275. title: res.msg
  20276. });
  20277. }
  20278. },
  20279. (rej) => {
  20280. }
  20281. );
  20282. },
  20283. getDoctorDetails() {
  20284. var data = {
  20285. doctorId: this.doctorId
  20286. };
  20287. getDoctorDetails(data).then((res) => {
  20288. if (res.code == 200) {
  20289. this.doctor = res.data.doctor;
  20290. this.doctor.prices = JSON.parse(this.doctor.priceJson);
  20291. this.department = res.data.department;
  20292. this.hospital = res.data.hospital;
  20293. } else {
  20294. uni.showToast({
  20295. icon: "none",
  20296. title: "请求失败"
  20297. });
  20298. }
  20299. });
  20300. },
  20301. getDoctorPingList() {
  20302. var data = {
  20303. doctorId: this.doctorId,
  20304. pageNum: 1,
  20305. pageSize: 10
  20306. };
  20307. getDoctorPingList(data).then((res) => {
  20308. if (res.code == 200) {
  20309. this.pings = res.data.list;
  20310. } else {
  20311. uni.showToast({
  20312. icon: "none",
  20313. title: "请求失败"
  20314. });
  20315. }
  20316. });
  20317. },
  20318. navTo(url2) {
  20319. uni.navigateTo({
  20320. url: url2
  20321. });
  20322. }
  20323. }
  20324. };
  20325. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  20326. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  20327. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  20328. vue.createElementVNode("view", { class: "bg" }, [
  20329. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/dd7da40764af4db0ac326db271c7f1d3.png" })
  20330. ]),
  20331. vue.createElementVNode("view", { class: "top-box" }, [
  20332. vue.createElementVNode(
  20333. "view",
  20334. {
  20335. class: "status_bar",
  20336. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  20337. },
  20338. null,
  20339. 4
  20340. /* STYLE */
  20341. ),
  20342. vue.createElementVNode("view", { class: "btn-box" }, [
  20343. vue.createElementVNode("view", {
  20344. class: "btns",
  20345. onClick: _cache[1] || (_cache[1] = ($event) => $options.goback())
  20346. }, [
  20347. vue.createElementVNode("view", { class: "btn" }, [
  20348. vue.createElementVNode("image", { src: "/static/images/back_white.png" })
  20349. ]),
  20350. vue.createElementVNode("view", { class: "line" }),
  20351. vue.createElementVNode("view", {
  20352. class: "btn",
  20353. onClick: _cache[0] || (_cache[0] = ($event) => $options.gohome())
  20354. }, [
  20355. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5981c2cd5f23484181f5b328c820d0de.png" })
  20356. ])
  20357. ])
  20358. ])
  20359. ]),
  20360. vue.createElementVNode("view", { class: "cont" }, [
  20361. vue.createElementVNode(
  20362. "view",
  20363. {
  20364. class: "status_bar",
  20365. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  20366. },
  20367. null,
  20368. 4
  20369. /* STYLE */
  20370. ),
  20371. vue.createElementVNode("view", {
  20372. class: "docs",
  20373. style: { "margin-top": "88rpx" }
  20374. }, [
  20375. vue.createElementVNode("view", {
  20376. class: "tip",
  20377. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_doctor/doctorImgs?doctorId=" + $data.doctor.doctorId))
  20378. }, [
  20379. vue.createElementVNode("view", { class: "left" }, [
  20380. vue.createElementVNode("view", { class: "title" }, [
  20381. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a58ee2a3fb674c2e8339243cb4ca1378.png" }),
  20382. vue.createElementVNode("view", null, "实名认证")
  20383. ]),
  20384. vue.createElementVNode("view", { class: "cert" }, [
  20385. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/62aeeb0579974b67863a6ab56e9562f9.png" }),
  20386. vue.createElementVNode(
  20387. "view",
  20388. null,
  20389. "资格证编号:" + vue.toDisplayString($data.doctor.certificateCode != null ? $data.doctor.certificateCode.substr(0, 4) + "****" + $data.doctor.certificateCode.substr($data.doctor.certificateCode.length - 4, $data.doctor.certificateCode.length) : ""),
  20390. 1
  20391. /* TEXT */
  20392. )
  20393. ])
  20394. ]),
  20395. vue.createElementVNode("view", { class: "right" }, [
  20396. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d519ad0467e4daea843aac745ae6b40.png" })
  20397. ])
  20398. ]),
  20399. vue.createElementVNode("view", { class: "doc-cont" }, [
  20400. vue.createElementVNode("view", { class: "doc-box" }, [
  20401. vue.createElementVNode("view", { class: "left" }, [
  20402. vue.createElementVNode("image", {
  20403. src: $data.doctor.avatar,
  20404. mode: "aspectFill"
  20405. }, null, 8, ["src"])
  20406. ]),
  20407. vue.createElementVNode("view", { class: "right" }, [
  20408. vue.createElementVNode("view", { class: "doc-name-box" }, [
  20409. vue.createElementVNode(
  20410. "view",
  20411. { class: "doc-name" },
  20412. vue.toDisplayString($data.doctor.doctorName),
  20413. 1
  20414. /* TEXT */
  20415. ),
  20416. vue.createElementVNode("view", { class: "doc-btns" }, [
  20417. vue.createElementVNode("view", {
  20418. class: "btn",
  20419. onClick: _cache[3] || (_cache[3] = ($event) => $options.followChange())
  20420. }, [
  20421. $data.isFollow ? (vue.openBlock(), vue.createElementBlock("image", {
  20422. key: 0,
  20423. src: "/static/images/icon_strar.png"
  20424. })) : vue.createCommentVNode("v-if", true),
  20425. !$data.isFollow ? (vue.openBlock(), vue.createElementBlock("image", {
  20426. key: 1,
  20427. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d509e50536804703a4b7dc066b16beee.png"
  20428. })) : vue.createCommentVNode("v-if", true),
  20429. vue.createTextVNode(" 关注 ")
  20430. ]),
  20431. vue.createElementVNode("view", { class: "btn" }, [
  20432. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f79c3b9cbefa40be8c2beb74f616eefc.png" }),
  20433. vue.createTextVNode(" 分享 "),
  20434. vue.createElementVNode("button", {
  20435. class: "contact-btn",
  20436. "data-name": "shareBtn",
  20437. "open-type": "share"
  20438. }, "分享")
  20439. ])
  20440. ])
  20441. ]),
  20442. vue.createElementVNode("view", { class: "doc-dept-box" }, [
  20443. vue.createTextVNode(
  20444. vue.toDisplayString($data.doctor.position) + " ",
  20445. 1
  20446. /* TEXT */
  20447. ),
  20448. vue.createElementVNode("view", { class: "line" }),
  20449. vue.createTextVNode(
  20450. " " + vue.toDisplayString($data.department.deptName),
  20451. 1
  20452. /* TEXT */
  20453. )
  20454. ]),
  20455. vue.createElementVNode(
  20456. "view",
  20457. { class: "doc-his-box" },
  20458. vue.toDisplayString($data.hospital.hospitalName),
  20459. 1
  20460. /* TEXT */
  20461. )
  20462. ])
  20463. ]),
  20464. vue.createElementVNode("view", { class: "doc-desc-box" }, [
  20465. vue.createElementVNode("view", {
  20466. class: "doc-desc-cont",
  20467. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_doctor/doctorInfo?doctorId=" + $data.doctor.doctorId))
  20468. }, [
  20469. vue.createElementVNode(
  20470. "view",
  20471. { class: "desc-cont ellipsis2" },
  20472. "          " + vue.toDisplayString($data.doctor.speciality),
  20473. 1
  20474. /* TEXT */
  20475. ),
  20476. vue.createElementVNode("view", { class: "title" }, "擅长:"),
  20477. vue.createElementVNode("view", { class: "btn" }, "详情")
  20478. ]),
  20479. vue.createElementVNode("view", {
  20480. class: "doc-desc-cont",
  20481. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_doctor/doctorInfo?doctorId=" + $data.doctor.doctorId))
  20482. }, [
  20483. vue.createElementVNode(
  20484. "view",
  20485. { class: "desc-cont ellipsis2" },
  20486. "          " + vue.toDisplayString($data.doctor.introduction),
  20487. 1
  20488. /* TEXT */
  20489. ),
  20490. vue.createElementVNode("view", { class: "title" }, "介绍:"),
  20491. vue.createElementVNode("view", { class: "btn" }, "详情")
  20492. ])
  20493. ])
  20494. ])
  20495. ]),
  20496. vue.createElementVNode("view", { class: "price-box" }, [
  20497. vue.createElementVNode("view", { class: "count-box" }, [
  20498. vue.createElementVNode("view", { class: "count-item" }, [
  20499. vue.createElementVNode(
  20500. "view",
  20501. { class: "count yellow" },
  20502. vue.toDisplayString($data.doctor.pingStar) + "分",
  20503. 1
  20504. /* TEXT */
  20505. ),
  20506. vue.createElementVNode("view", { class: "name" }, "好评")
  20507. ]),
  20508. vue.createElementVNode("view", { class: "count-item" }, [
  20509. vue.createElementVNode(
  20510. "view",
  20511. { class: "count" },
  20512. vue.toDisplayString($data.doctor.orderNumber),
  20513. 1
  20514. /* TEXT */
  20515. ),
  20516. vue.createElementVNode("view", { class: "name" }, "接诊量")
  20517. ]),
  20518. vue.createElementVNode("view", { class: "count-item" }, [
  20519. vue.createElementVNode(
  20520. "view",
  20521. { class: "count" },
  20522. vue.toDisplayString($data.doctor.speed) + "分钟",
  20523. 1
  20524. /* TEXT */
  20525. ),
  20526. vue.createElementVNode("view", { class: "name" }, "平均响应")
  20527. ]),
  20528. vue.createElementVNode("view", { class: "count-item" }, [
  20529. vue.createElementVNode("view", { class: "count" }, "0"),
  20530. vue.createElementVNode("view", { class: "name" }, "粉丝数")
  20531. ])
  20532. ]),
  20533. $data.doctor != null && $data.doctor.prices != null && $data.doctor.prices.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  20534. key: 0,
  20535. class: "price-list"
  20536. }, [
  20537. (vue.openBlock(true), vue.createElementBlock(
  20538. vue.Fragment,
  20539. null,
  20540. vue.renderList($data.doctor.prices, (price, index2) => {
  20541. return vue.openBlock(), vue.createElementBlock("view", {
  20542. class: "price-item",
  20543. onClick: ($event) => $options.doInquiry(price)
  20544. }, [
  20545. vue.createElementVNode("view", { class: "p-left" }, [
  20546. price.type == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  20547. key: 0,
  20548. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/645f3f298a264882b48e529342fc4074.png"
  20549. })) : vue.createCommentVNode("v-if", true),
  20550. price.type == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  20551. key: 1,
  20552. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45e904a9e74f4d1da771936a4b83f015.png"
  20553. })) : vue.createCommentVNode("v-if", true),
  20554. vue.createElementVNode("view", { class: "price-name" }, [
  20555. vue.createElementVNode("view", { class: "price" }, [
  20556. price.type == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  20557. key: 0,
  20558. class: "title"
  20559. }, "图文问诊")) : vue.createCommentVNode("v-if", true),
  20560. price.type == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  20561. key: 1,
  20562. class: "title"
  20563. }, "视频问诊")) : vue.createCommentVNode("v-if", true),
  20564. vue.createElementVNode(
  20565. "text",
  20566. { class: "money" },
  20567. vue.toDisplayString(price.price.toFixed(2)) + "/次",
  20568. 1
  20569. /* TEXT */
  20570. )
  20571. ]),
  20572. price.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  20573. key: 0,
  20574. class: "price-desc"
  20575. }, " 与医生图文交流 ")) : vue.createCommentVNode("v-if", true),
  20576. price.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  20577. key: 1,
  20578. class: "price-desc"
  20579. }, " 与医生视频交流 ")) : vue.createCommentVNode("v-if", true)
  20580. ])
  20581. ]),
  20582. vue.createElementVNode("view", { class: "p-right" }, [
  20583. vue.createElementVNode(
  20584. "view",
  20585. {
  20586. class: vue.normalizeClass($data.doctor.workStatus == 1 ? "btn" : "btn gray")
  20587. },
  20588. " 去咨询 ",
  20589. 2
  20590. /* CLASS */
  20591. )
  20592. ])
  20593. ], 8, ["onClick"]);
  20594. }),
  20595. 256
  20596. /* UNKEYED_FRAGMENT */
  20597. ))
  20598. ])) : vue.createCommentVNode("v-if", true)
  20599. ]),
  20600. vue.createCommentVNode(` <view class="his-box">\r
  20601. <view class="title-box">\r
  20602. <view class="title">执业医院</view>\r
  20603. </view>\r
  20604. <view class="his" @click="navTo('/pages/index/hospitalDetails?hospitalId='+hospital.hospitalId)">\r
  20605. <view class="left">\r
  20606. <view class="his-name">\r
  20607. {{hospital.hospitalName}}\r
  20608. </view>\r
  20609. <view class="his-desc" v-if="hospital.hospitalType!=null">\r
  20610. {{hospital.hospitalType}}\r
  20611. </view>\r
  20612. </view>\r
  20613. <view class="right">\r
  20614. <image src="/static/images/icon_arrow_r.png"></image>\r
  20615. </view>\r
  20616. </view>\r
  20617. </view> `),
  20618. vue.createCommentVNode(' <view class="desc-box">\r\n <view class="title-box">\r\n <view class="title">医生介绍</view>\r\n </view>\r\n <view class="desc" >\r\n {{doctor.introduction}}\r\n </view>\r\n </view> '),
  20619. vue.createElementVNode("view", { class: "ping-box" }, [
  20620. vue.createElementVNode("view", { class: "title-box" }, [
  20621. vue.createElementVNode("view", { class: "left" }, [
  20622. vue.createElementVNode(
  20623. "view",
  20624. { class: "title" },
  20625. "患者评价(" + vue.toDisplayString($data.pings.length) + ")",
  20626. 1
  20627. /* TEXT */
  20628. )
  20629. ]),
  20630. vue.createElementVNode("view", {
  20631. class: "more",
  20632. onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("./doctorPingList?doctorId=" + $data.doctorId))
  20633. }, [
  20634. vue.createElementVNode("view", null, "更多"),
  20635. vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
  20636. ])
  20637. ]),
  20638. $data.pings.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  20639. key: 0,
  20640. class: "ping-list"
  20641. }, [
  20642. (vue.openBlock(true), vue.createElementBlock(
  20643. vue.Fragment,
  20644. null,
  20645. vue.renderList($data.pings, (item) => {
  20646. return vue.openBlock(), vue.createElementBlock("view", { class: "ping-item" }, [
  20647. vue.createElementVNode("view", { class: "left" }, [
  20648. vue.createElementVNode("image", {
  20649. src: item.avatar == null ? "/static/images/detault_head.jpg" : item.avatar
  20650. }, null, 8, ["src"])
  20651. ]),
  20652. vue.createElementVNode("view", { class: "right" }, [
  20653. vue.createElementVNode("view", { class: "user-name-box" }, [
  20654. vue.createElementVNode(
  20655. "view",
  20656. { class: "user-name" },
  20657. vue.toDisplayString(item.nickName),
  20658. 1
  20659. /* TEXT */
  20660. ),
  20661. vue.createElementVNode("view", { class: "ping-star" }, [
  20662. vue.createVNode(_component_u_rate, {
  20663. activeColor: "#ffc603",
  20664. count: "5",
  20665. readonly: "",
  20666. modelValue: item.pingStar,
  20667. "onUpdate:modelValue": ($event) => item.pingStar = $event
  20668. }, null, 8, ["modelValue", "onUpdate:modelValue"])
  20669. ])
  20670. ]),
  20671. vue.createElementVNode(
  20672. "view",
  20673. { class: "ping-cont" },
  20674. vue.toDisplayString(item.pingContent),
  20675. 1
  20676. /* TEXT */
  20677. ),
  20678. vue.createElementVNode(
  20679. "view",
  20680. { class: "ping-time" },
  20681. vue.toDisplayString(item.pingTime),
  20682. 1
  20683. /* TEXT */
  20684. )
  20685. ])
  20686. ]);
  20687. }),
  20688. 256
  20689. /* UNKEYED_FRAGMENT */
  20690. ))
  20691. ])) : vue.createCommentVNode("v-if", true)
  20692. ])
  20693. ])
  20694. ]);
  20695. }
  20696. const Pages_doctorDoctorDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-e79e20d9"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorDetails.vue"]]);
  20697. const _sfc_main$1B = {
  20698. mixins: [MescrollMixin],
  20699. // 使用mixin
  20700. data() {
  20701. return {
  20702. total: 0,
  20703. doctorId: null,
  20704. mescroll: null,
  20705. downOption: {
  20706. //下拉刷新
  20707. use: true,
  20708. auto: false
  20709. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  20710. },
  20711. upOption: {
  20712. onScroll: false,
  20713. use: true,
  20714. // 是否启用上拉加载; 默认true
  20715. page: {
  20716. pae: 0,
  20717. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  20718. size: 10
  20719. // 每页数据的数量,默认10
  20720. },
  20721. noMoreSize: 10,
  20722. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  20723. textNoMore: "已经到底了",
  20724. empty: {
  20725. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  20726. tip: "暂无数据"
  20727. }
  20728. },
  20729. dataList: []
  20730. };
  20731. },
  20732. onLoad(options) {
  20733. this.doctorId = options.doctorId;
  20734. },
  20735. methods: {
  20736. mescrollInit(mescroll) {
  20737. this.mescroll = mescroll;
  20738. },
  20739. /*下拉刷新的回调 */
  20740. downCallback() {
  20741. this.mescroll.resetUpScroll();
  20742. },
  20743. /*上拉加载的回调*/
  20744. upCallback(page2) {
  20745. var that = this;
  20746. var data = {
  20747. doctorId: this.doctorId,
  20748. pageNum: page2.num,
  20749. pageSize: page2.size
  20750. };
  20751. getDoctorPingList(data).then((res) => {
  20752. if (res.code == 200) {
  20753. this.total = res.data.total;
  20754. if (page2.num == 1) {
  20755. that.dataList = res.data.list;
  20756. } else {
  20757. that.dataList = that.dataList.concat(res.data.list);
  20758. }
  20759. that.mescroll.endBySize(res.data.list.length, res.data.total);
  20760. } else {
  20761. uni.showToast({
  20762. icon: "none",
  20763. title: "请求失败"
  20764. });
  20765. that.dataList = null;
  20766. that.mescroll.endErr();
  20767. }
  20768. });
  20769. }
  20770. }
  20771. };
  20772. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  20773. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  20774. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  20775. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  20776. vue.createElementVNode("view", { class: "cont" }, [
  20777. vue.createElementVNode("view", { class: "ping-box" }, [
  20778. vue.createElementVNode("view", { class: "title-box" }, [
  20779. vue.createElementVNode("view", { class: "left" }, [
  20780. vue.createElementVNode(
  20781. "view",
  20782. { class: "title" },
  20783. "患者评价(" + vue.toDisplayString($data.total) + ")",
  20784. 1
  20785. /* TEXT */
  20786. )
  20787. ])
  20788. ]),
  20789. vue.createVNode(_component_mescroll_body, {
  20790. top: "88rpx",
  20791. bottom: "0",
  20792. ref: "mescrollRef",
  20793. onInit: $options.mescrollInit,
  20794. down: $data.downOption,
  20795. up: $data.upOption,
  20796. onDown: $options.downCallback,
  20797. onUp: $options.upCallback
  20798. }, {
  20799. default: vue.withCtx(() => [
  20800. vue.createElementVNode("view", { class: "ping-list" }, [
  20801. (vue.openBlock(true), vue.createElementBlock(
  20802. vue.Fragment,
  20803. null,
  20804. vue.renderList($data.dataList, (item) => {
  20805. return vue.openBlock(), vue.createElementBlock("view", { class: "ping-item" }, [
  20806. vue.createElementVNode("view", { class: "left" }, [
  20807. vue.createElementVNode("image", {
  20808. src: item.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/dfdd555016854b0d9fb623937238729f.jpg" : item.avatar
  20809. }, null, 8, ["src"])
  20810. ]),
  20811. vue.createElementVNode("view", { class: "right" }, [
  20812. vue.createElementVNode("view", { class: "user-name-box" }, [
  20813. vue.createElementVNode(
  20814. "view",
  20815. { class: "user-name" },
  20816. vue.toDisplayString(item.nickName),
  20817. 1
  20818. /* TEXT */
  20819. ),
  20820. vue.createElementVNode("view", { class: "ping-star" }, [
  20821. vue.createVNode(_component_u_rate, {
  20822. activeColor: "#ffc603",
  20823. count: "5",
  20824. readonly: "",
  20825. modelValue: item.pingStar,
  20826. "onUpdate:modelValue": ($event) => item.pingStar = $event
  20827. }, null, 8, ["modelValue", "onUpdate:modelValue"])
  20828. ])
  20829. ]),
  20830. vue.createElementVNode(
  20831. "view",
  20832. { class: "ping-cont" },
  20833. vue.toDisplayString(item.pingContent),
  20834. 1
  20835. /* TEXT */
  20836. ),
  20837. vue.createElementVNode(
  20838. "view",
  20839. { class: "ping-time" },
  20840. vue.toDisplayString(item.pingTime),
  20841. 1
  20842. /* TEXT */
  20843. )
  20844. ])
  20845. ]);
  20846. }),
  20847. 256
  20848. /* UNKEYED_FRAGMENT */
  20849. ))
  20850. ])
  20851. ]),
  20852. _: 1
  20853. /* STABLE */
  20854. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  20855. ])
  20856. ])
  20857. ]);
  20858. }
  20859. const Pages_doctorDoctorPingList = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-9dbb509a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorPingList.vue"]]);
  20860. const _sfc_main$1A = {
  20861. data() {
  20862. return {
  20863. isFollow: false,
  20864. doctorId: null,
  20865. doctor: null,
  20866. department: null,
  20867. hospital: null,
  20868. pings: []
  20869. };
  20870. },
  20871. onLoad(options) {
  20872. this.doctorId = options.doctorId;
  20873. },
  20874. onShow() {
  20875. this.getDoctorDetails();
  20876. },
  20877. methods: {
  20878. showImg() {
  20879. var data = [];
  20880. data.push(this.doctor.avatar);
  20881. uni.previewImage({
  20882. current: 0,
  20883. urls: data
  20884. });
  20885. },
  20886. getDoctorDetails() {
  20887. var data = {
  20888. doctorId: this.doctorId
  20889. };
  20890. getDoctorDetails(data).then((res) => {
  20891. if (res.code == 200) {
  20892. this.doctor = res.data.doctor;
  20893. this.department = res.data.department;
  20894. this.hospital = res.data.hospital;
  20895. } else {
  20896. uni.showToast({
  20897. icon: "none",
  20898. title: "请求失败"
  20899. });
  20900. }
  20901. });
  20902. }
  20903. }
  20904. };
  20905. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  20906. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  20907. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  20908. vue.createElementVNode("view", { class: "bg" }),
  20909. vue.createElementVNode("view", { class: "cont" }, [
  20910. vue.createElementVNode("view", { class: "doc-box" }, [
  20911. vue.createElementVNode("view", { class: "left" }, [
  20912. vue.createElementVNode("image", {
  20913. onClick: _cache[0] || (_cache[0] = ($event) => $options.showImg()),
  20914. src: $data.doctor.avatar,
  20915. mode: "aspectFill"
  20916. }, null, 8, ["src"])
  20917. ]),
  20918. vue.createElementVNode("view", { class: "right" }, [
  20919. vue.createElementVNode("view", { class: "doc-name-box" }, [
  20920. vue.createElementVNode(
  20921. "view",
  20922. { class: "doc-name" },
  20923. vue.toDisplayString($data.doctor.doctorName),
  20924. 1
  20925. /* TEXT */
  20926. ),
  20927. vue.createElementVNode("view", { class: "doc-ping" }, [
  20928. vue.createVNode(_component_u_rate, {
  20929. activeColor: "#ffc603",
  20930. count: "5",
  20931. readonly: "",
  20932. modelValue: $data.doctor.pingStar,
  20933. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.doctor.pingStar = $event)
  20934. }, null, 8, ["modelValue"])
  20935. ])
  20936. ]),
  20937. vue.createElementVNode(
  20938. "view",
  20939. { class: "doc-dept-box" },
  20940. vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
  20941. 1
  20942. /* TEXT */
  20943. ),
  20944. vue.createElementVNode(
  20945. "view",
  20946. { class: "doc-his-box" },
  20947. vue.toDisplayString($data.hospital.hospitalName),
  20948. 1
  20949. /* TEXT */
  20950. )
  20951. ])
  20952. ]),
  20953. vue.createElementVNode("view", { class: "desc-box" }, [
  20954. vue.createElementVNode("view", { class: "title-box" }, [
  20955. vue.createElementVNode("view", { class: "line" }),
  20956. vue.createElementVNode("view", { class: "title" }, "擅长方向")
  20957. ]),
  20958. vue.createElementVNode(
  20959. "view",
  20960. { class: "desc" },
  20961. vue.toDisplayString($data.doctor.speciality),
  20962. 1
  20963. /* TEXT */
  20964. )
  20965. ]),
  20966. vue.createElementVNode("view", { class: "desc-box" }, [
  20967. vue.createElementVNode("view", { class: "title-box" }, [
  20968. vue.createElementVNode("view", { class: "line" }),
  20969. vue.createElementVNode("view", { class: "title" }, "医生介绍")
  20970. ]),
  20971. vue.createElementVNode(
  20972. "view",
  20973. { class: "desc" },
  20974. vue.toDisplayString($data.doctor.introduction),
  20975. 1
  20976. /* TEXT */
  20977. )
  20978. ])
  20979. ])
  20980. ]);
  20981. }
  20982. const Pages_doctorDoctorInfo = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-012aad91"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorInfo.vue"]]);
  20983. const _sfc_main$1z = {
  20984. data() {
  20985. return {
  20986. imgs: []
  20987. };
  20988. },
  20989. onLoad(options) {
  20990. this.doctorId = options.doctorId;
  20991. },
  20992. onShow() {
  20993. this.getDoctorDetails();
  20994. },
  20995. methods: {
  20996. showImg(index2) {
  20997. uni.previewImage({
  20998. current: index2,
  20999. urls: this.imgs
  21000. });
  21001. },
  21002. getDoctorDetails() {
  21003. var data = {
  21004. doctorId: this.doctorId
  21005. };
  21006. this.imgs = [];
  21007. getDoctorDetails(data).then((res) => {
  21008. if (res.code == 200) {
  21009. this.doctor = res.data.doctor;
  21010. if (this.doctor.certificateImages != null) {
  21011. this.imgs.concat(this.doctor.certificateImages);
  21012. }
  21013. if (this.doctor.practiseImages != null) {
  21014. this.imgs.concat(this.doctor.practiseImages);
  21015. }
  21016. formatAppLog("log", "at pages_doctor/doctorImgs.vue:49", this.imgs);
  21017. } else {
  21018. uni.showToast({
  21019. icon: "none",
  21020. title: "请求失败"
  21021. });
  21022. }
  21023. });
  21024. }
  21025. }
  21026. };
  21027. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  21028. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  21029. vue.createElementVNode("view", { class: "imgs" }, [
  21030. (vue.openBlock(true), vue.createElementBlock(
  21031. vue.Fragment,
  21032. null,
  21033. vue.renderList($data.imgs, (img, index2) => {
  21034. return vue.openBlock(), vue.createElementBlock("view", { class: "img" }, [
  21035. vue.createElementVNode("image", {
  21036. onClick: ($event) => $options.showImg(index2),
  21037. src: img
  21038. }, null, 8, ["onClick", "src"])
  21039. ]);
  21040. }),
  21041. 256
  21042. /* UNKEYED_FRAGMENT */
  21043. ))
  21044. ])
  21045. ]);
  21046. }
  21047. const Pages_doctorDoctorImgs = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-3b09300f"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorImgs.vue"]]);
  21048. let request$8 = new Request$1().http;
  21049. function confirm(data) {
  21050. return request$8("/app/inquiryOrder/confirm", data, "POST", "application/json;charset=UTF-8");
  21051. }
  21052. function create(data) {
  21053. return request$8("/app/inquiryOrder/create", data, "POST", "application/json;charset=UTF-8");
  21054. }
  21055. function pay$1(data) {
  21056. return request$8("/app/inquiryOrder/pay", data, "POST", "application/json;charset=UTF-8");
  21057. }
  21058. function compute$1(data) {
  21059. return request$8("/app/inquiryOrder/compute", data, "POST", "application/json;charset=UTF-8");
  21060. }
  21061. function payment$1(data) {
  21062. return request$8("/app/inquiryOrder/payment", data, "POST", "application/json;charset=UTF-8");
  21063. }
  21064. function cancel(data) {
  21065. return request$8("/app/inquiryOrder/cancel", data, "POST", "application/json;charset=UTF-8");
  21066. }
  21067. function getMyInquiryOrderList(data) {
  21068. return request$8("/app/inquiryOrder/getMyInquiryOrderList", data, "GET");
  21069. }
  21070. function getMyInquiryOrderById(data) {
  21071. return request$8("/app/inquiryOrder/getMyInquiryOrderById", data, "GET");
  21072. }
  21073. function getMyInquiryOrderPingList(data) {
  21074. return request$8("/app/inquiryOrder/getMyInquiryOrderPingList", data, "GET");
  21075. }
  21076. function getInquiryOrderById(data) {
  21077. return request$8("/app/inquiryOrder/getInquiryOrderById", data, "GET");
  21078. }
  21079. function getCompanyUserInquiryOrderById(data) {
  21080. return request$8("/app/inquiryOrder/getCompanyUserInquiryOrderById", data, "GET");
  21081. }
  21082. function pingOrder(data) {
  21083. return request$8("/app/inquiryOrder/pingOrder", data, "POST", "application/json;charset=UTF-8");
  21084. }
  21085. function getInquiryTemp(data) {
  21086. return request$8("/app/inquiryOrder/getInquiryTemp", data, "GET");
  21087. }
  21088. function getInquiryOrderReport(data) {
  21089. return request$8("/app/inquiryOrder/getInquiryOrderReport", data, "GET");
  21090. }
  21091. function getCompanyUserInquiryOrderList(data) {
  21092. return request$8("/app/inquiryOrder/getCompanyUserInquiryOrderList", data, "GET");
  21093. }
  21094. const _sfc_main$1y = {
  21095. mixins: [MescrollMixin],
  21096. // 使用mixin
  21097. data() {
  21098. return {
  21099. orderStatusOptions: [],
  21100. orderTypeOptions: [],
  21101. inquiryTypeOptions: [],
  21102. tabs: [
  21103. {
  21104. id: 2,
  21105. name: "快速问诊"
  21106. },
  21107. {
  21108. id: 1,
  21109. name: "专家问诊"
  21110. },
  21111. {
  21112. id: 3,
  21113. name: "开药问诊"
  21114. }
  21115. ],
  21116. inquiryType: 2,
  21117. mescroll: null,
  21118. downOption: {
  21119. //下拉刷新
  21120. use: true,
  21121. auto: false
  21122. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  21123. },
  21124. upOption: {
  21125. onScroll: false,
  21126. use: true,
  21127. // 是否启用上拉加载; 默认true
  21128. page: {
  21129. pae: 0,
  21130. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  21131. size: 10
  21132. // 每页数据的数量,默认10
  21133. },
  21134. noMoreSize: 10,
  21135. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  21136. textNoMore: "已经到底了",
  21137. empty: {
  21138. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  21139. tip: "暂无数据"
  21140. }
  21141. },
  21142. dataList: []
  21143. };
  21144. },
  21145. onLoad() {
  21146. this.getDictByKey("sys_inquiry_order_type");
  21147. this.getDictByKey("sys_inquiry_type");
  21148. this.getDictByKey("sys_inquiry_status");
  21149. var that = this;
  21150. uni.$on("refreshInquiryOrder", () => {
  21151. that.mescroll.resetUpScroll();
  21152. });
  21153. },
  21154. onShow() {
  21155. },
  21156. methods: {
  21157. cancel(item) {
  21158. uni.showModal({
  21159. title: "提示",
  21160. content: "确认取消订单吗?",
  21161. showCancel: true,
  21162. cancelText: "取消",
  21163. confirmText: "确定",
  21164. success: (res) => {
  21165. if (res.confirm) {
  21166. var data = { orderId: item.orderId };
  21167. cancel(data).then(
  21168. (res2) => {
  21169. if (res2.code == 200) {
  21170. this.mescroll.resetUpScroll();
  21171. uni.showToast({
  21172. icon: "success",
  21173. title: "操作成功"
  21174. });
  21175. } else {
  21176. uni.showToast({
  21177. icon: "none",
  21178. title: res2.msg
  21179. });
  21180. }
  21181. },
  21182. (rej) => {
  21183. }
  21184. );
  21185. }
  21186. }
  21187. });
  21188. },
  21189. ping(item) {
  21190. uni.navigateTo({
  21191. url: "/pages_order/pingOrder?orderId=" + item.orderId
  21192. });
  21193. },
  21194. pay(item) {
  21195. uni.navigateTo({
  21196. url: "/pages_order/inquiryPay?orderId=" + item.orderId
  21197. });
  21198. },
  21199. toIM(item) {
  21200. var id = "C2CD-" + item.doctorId;
  21201. store.commit("timStore/setType", "startInquiry");
  21202. store.commit("timStore/setOrderType", item.orderType);
  21203. store.commit("timStore/setImType", 1);
  21204. store.commit("timStore/setFollowId", 0);
  21205. store.commit("timStore/setOrderId", item.orderId);
  21206. store.commit("timStore/setConversationID", id);
  21207. uni.$TUIKit.TUIConversationServer.setMessageRead(id);
  21208. uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
  21209. var _a;
  21210. const { conversation } = res.data;
  21211. store.commit("timStore/setConversation", conversation);
  21212. let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
  21213. conversation.userProfile;
  21214. url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}&orderId=` + item.orderId;
  21215. uni.redirectTo({ url: url2 });
  21216. }).catch((err) => {
  21217. formatAppLog("warn", "at pages_order/inquiryOrderList.vue:215", "获取 group profile 异常 = ", err);
  21218. });
  21219. },
  21220. getDictByKey(key) {
  21221. var data = { key };
  21222. getDictByKey(data).then(
  21223. (res) => {
  21224. if (res.code == 200) {
  21225. if (key == "sys_inquiry_order_type") {
  21226. this.orderTypeOptions = res.data;
  21227. }
  21228. if (key == "sys_inquiry_type") {
  21229. this.inquiryTypeOptions = res.data;
  21230. }
  21231. if (key == "sys_inquiry_status") {
  21232. this.orderStatusOptions = res.data;
  21233. }
  21234. }
  21235. },
  21236. (err) => {
  21237. }
  21238. );
  21239. },
  21240. inquiryTypeChange(item) {
  21241. this.inquiryType = item.id;
  21242. formatAppLog("log", "at pages_order/inquiryOrderList.vue:241", item);
  21243. this.mescroll.resetUpScroll();
  21244. },
  21245. navTo(url2) {
  21246. uni.navigateTo({
  21247. url: url2
  21248. });
  21249. },
  21250. mescrollInit(mescroll) {
  21251. this.mescroll = mescroll;
  21252. },
  21253. /*下拉刷新的回调 */
  21254. downCallback() {
  21255. this.mescroll.resetUpScroll();
  21256. },
  21257. /*上拉加载的回调*/
  21258. upCallback(page2) {
  21259. var that = this;
  21260. var data = {
  21261. inquiryType: this.inquiryType,
  21262. pageNum: page2.num,
  21263. pageSize: page2.size
  21264. };
  21265. getMyInquiryOrderList(data).then((res) => {
  21266. if (res.code == 200) {
  21267. if (page2.num == 1) {
  21268. that.dataList = res.data.list;
  21269. } else {
  21270. that.dataList = that.dataList.concat(res.data.list);
  21271. }
  21272. that.mescroll.endBySize(res.data.list.length, res.data.total);
  21273. } else {
  21274. uni.showToast({
  21275. icon: "none",
  21276. title: "请求失败"
  21277. });
  21278. that.dataList = null;
  21279. that.mescroll.endErr();
  21280. }
  21281. });
  21282. }
  21283. }
  21284. };
  21285. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  21286. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  21287. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  21288. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  21289. vue.createElementVNode("view", { class: "top-fixed" }, [
  21290. vue.createVNode(_component_u_tabs, {
  21291. scrollable: false,
  21292. list: $data.tabs,
  21293. lineColor: "#C39A58",
  21294. onChange: $options.inquiryTypeChange
  21295. }, null, 8, ["list", "onChange"])
  21296. ]),
  21297. vue.createVNode(_component_mescroll_body, {
  21298. top: "88rpx",
  21299. bottom: "0",
  21300. ref: "mescrollRef",
  21301. onInit: $options.mescrollInit,
  21302. down: $data.downOption,
  21303. up: $data.upOption,
  21304. onDown: $options.downCallback,
  21305. onUp: $options.upCallback
  21306. }, {
  21307. default: vue.withCtx(() => [
  21308. vue.createElementVNode("view", { class: "order-list" }, [
  21309. (vue.openBlock(true), vue.createElementBlock(
  21310. vue.Fragment,
  21311. null,
  21312. vue.renderList($data.dataList, (item) => {
  21313. return vue.openBlock(), vue.createElementBlock("view", {
  21314. class: "order-item",
  21315. onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
  21316. }, [
  21317. vue.createElementVNode("view", { class: "order-top" }, [
  21318. item.doctorId != null ? (vue.openBlock(), vue.createElementBlock("view", {
  21319. key: 0,
  21320. class: "left"
  21321. }, [
  21322. vue.createElementVNode("image", {
  21323. class: "head",
  21324. mode: "aspectFill",
  21325. src: item.avatar
  21326. }, null, 8, ["src"]),
  21327. vue.createElementVNode(
  21328. "view",
  21329. { class: "name" },
  21330. vue.toDisplayString(item.doctorName),
  21331. 1
  21332. /* TEXT */
  21333. ),
  21334. vue.createElementVNode(
  21335. "view",
  21336. { class: "dept" },
  21337. vue.toDisplayString(item.deptName),
  21338. 1
  21339. /* TEXT */
  21340. )
  21341. ])) : vue.createCommentVNode("v-if", true),
  21342. item.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  21343. key: 1,
  21344. class: "left"
  21345. }, [
  21346. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  21347. key: 0,
  21348. class: "title"
  21349. }, " 支付后为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
  21350. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  21351. key: 1,
  21352. class: "title"
  21353. }, " 正在为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
  21354. item.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  21355. key: 2,
  21356. class: "title"
  21357. }, " 订单已取消 ")) : vue.createCommentVNode("v-if", true),
  21358. item.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
  21359. key: 3,
  21360. class: "title"
  21361. }, " 订单已退款 ")) : vue.createCommentVNode("v-if", true),
  21362. item.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
  21363. key: 4,
  21364. class: "title"
  21365. }, " 医生已拒单 ")) : vue.createCommentVNode("v-if", true)
  21366. ])) : vue.createCommentVNode("v-if", true),
  21367. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  21368. "view",
  21369. {
  21370. key: 2,
  21371. class: "status red"
  21372. },
  21373. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  21374. 1
  21375. /* TEXT */
  21376. )) : vue.createCommentVNode("v-if", true),
  21377. item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  21378. "view",
  21379. {
  21380. key: 3,
  21381. class: "status red"
  21382. },
  21383. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  21384. 1
  21385. /* TEXT */
  21386. )) : vue.createCommentVNode("v-if", true),
  21387. item.status == 3 ? (vue.openBlock(), vue.createElementBlock(
  21388. "view",
  21389. {
  21390. key: 4,
  21391. class: "status green"
  21392. },
  21393. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  21394. 1
  21395. /* TEXT */
  21396. )) : vue.createCommentVNode("v-if", true),
  21397. item.status == 4 ? (vue.openBlock(), vue.createElementBlock(
  21398. "view",
  21399. {
  21400. key: 5,
  21401. class: "status green"
  21402. },
  21403. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  21404. 1
  21405. /* TEXT */
  21406. )) : vue.createCommentVNode("v-if", true),
  21407. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  21408. "view",
  21409. {
  21410. key: 6,
  21411. class: "status gray"
  21412. },
  21413. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  21414. 1
  21415. /* TEXT */
  21416. )) : vue.createCommentVNode("v-if", true)
  21417. ]),
  21418. vue.createElementVNode("view", { class: "order-cont" }, [
  21419. vue.createElementVNode("view", { class: "order-type" }, [
  21420. vue.createTextVNode(" 订单类型: "),
  21421. vue.createElementVNode(
  21422. "text",
  21423. null,
  21424. vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, item.inquiryType)),
  21425. 1
  21426. /* TEXT */
  21427. ),
  21428. vue.createElementVNode(
  21429. "text",
  21430. null,
  21431. "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, item.orderType)),
  21432. 1
  21433. /* TEXT */
  21434. )
  21435. ]),
  21436. vue.createElementVNode(
  21437. "view",
  21438. { class: "order-desc" },
  21439. "病情描述:" + vue.toDisplayString(item.title),
  21440. 1
  21441. /* TEXT */
  21442. ),
  21443. vue.createElementVNode("view", { class: "order-time-box" }, [
  21444. vue.createElementVNode(
  21445. "view",
  21446. { class: "order-time" },
  21447. vue.toDisplayString(item.createTime),
  21448. 1
  21449. /* TEXT */
  21450. ),
  21451. vue.createElementVNode("view", { class: "right" }, [
  21452. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  21453. key: 0,
  21454. class: "btn",
  21455. onClick: vue.withModifiers(($event) => $options.pay(item), ["stop"])
  21456. }, "去支付", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  21457. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  21458. key: 1,
  21459. class: "btn",
  21460. onClick: vue.withModifiers(($event) => $options.cancel(item), ["stop"])
  21461. }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  21462. item.status == 4 && item.isPing == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  21463. key: 2,
  21464. class: "btn",
  21465. onClick: vue.withModifiers(($event) => $options.ping(item), ["stop"])
  21466. }, "去评价", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  21467. item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  21468. key: 3,
  21469. class: "btn",
  21470. onClick: vue.withModifiers(($event) => $options.toIM(item), ["stop"])
  21471. }, "去咨询", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  21472. ])
  21473. ])
  21474. ])
  21475. ], 8, ["onClick"]);
  21476. }),
  21477. 256
  21478. /* UNKEYED_FRAGMENT */
  21479. ))
  21480. ])
  21481. ]),
  21482. _: 1
  21483. /* STABLE */
  21484. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  21485. ]);
  21486. }
  21487. const Pages_orderInquiryOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-e21794e7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderList.vue"]]);
  21488. const props$j = {
  21489. props: {
  21490. // 文字颜色
  21491. color: {
  21492. type: String,
  21493. default: props$y.link.color
  21494. },
  21495. // 字体大小,单位px
  21496. fontSize: {
  21497. type: [String, Number],
  21498. default: props$y.link.fontSize
  21499. },
  21500. // 是否显示下划线
  21501. underLine: {
  21502. type: Boolean,
  21503. default: props$y.link.underLine
  21504. },
  21505. // 要跳转的链接
  21506. href: {
  21507. type: String,
  21508. default: props$y.link.href
  21509. },
  21510. // 小程序中复制到粘贴板的提示语
  21511. mpTips: {
  21512. type: String,
  21513. default: props$y.link.mpTips
  21514. },
  21515. // 下划线颜色
  21516. lineColor: {
  21517. type: String,
  21518. default: props$y.link.lineColor
  21519. },
  21520. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  21521. text: {
  21522. type: String,
  21523. default: props$y.link.text
  21524. }
  21525. }
  21526. };
  21527. const _sfc_main$1x = {
  21528. name: "u-link",
  21529. mixins: [mpMixin, mixin, props$j],
  21530. computed: {
  21531. linkStyle() {
  21532. const style = {
  21533. color: this.color,
  21534. fontSize: uni.$u.addUnit(this.fontSize),
  21535. // line-height设置为比字体大小多2px
  21536. lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
  21537. textDecoration: this.underLine ? "underline" : "none"
  21538. };
  21539. return style;
  21540. }
  21541. },
  21542. methods: {
  21543. openLink() {
  21544. plus.runtime.openURL(this.href);
  21545. this.$emit("click");
  21546. }
  21547. }
  21548. };
  21549. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  21550. return vue.openBlock(), vue.createElementBlock(
  21551. "text",
  21552. {
  21553. class: "u-link",
  21554. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
  21555. style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
  21556. },
  21557. vue.toDisplayString(_ctx.text),
  21558. 5
  21559. /* TEXT, STYLE */
  21560. );
  21561. }
  21562. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-12f6646d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-link/u-link.vue"]]);
  21563. const value = {
  21564. computed: {
  21565. // 经处理后需要显示的值
  21566. value() {
  21567. const {
  21568. text,
  21569. mode,
  21570. format: format2,
  21571. href
  21572. } = this;
  21573. if (mode === "price") {
  21574. if (!/^\d+(\.\d+)?$/.test(text)) {
  21575. uni.$u.error("金额模式下,text参数需要为金额格式");
  21576. }
  21577. if (uni.$u.test.func(format2)) {
  21578. return format2(text);
  21579. }
  21580. return uni.$u.priceFormat(text, 2);
  21581. }
  21582. if (mode === "date") {
  21583. !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  21584. if (uni.$u.test.func(format2)) {
  21585. return format2(text);
  21586. }
  21587. if (format2) {
  21588. return uni.$u.timeFormat(text, format2);
  21589. }
  21590. return uni.$u.timeFormat(text, "yyyy-mm-dd");
  21591. }
  21592. if (mode === "phone") {
  21593. if (uni.$u.test.func(format2)) {
  21594. return format2(text);
  21595. }
  21596. if (format2 === "encrypt") {
  21597. return `${text.substr(0, 3)}****${text.substr(7)}`;
  21598. }
  21599. return text;
  21600. }
  21601. if (mode === "name") {
  21602. !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
  21603. if (uni.$u.test.func(format2)) {
  21604. return format2(text);
  21605. }
  21606. if (format2 === "encrypt") {
  21607. return this.formatName(text);
  21608. }
  21609. return text;
  21610. }
  21611. if (mode === "link") {
  21612. !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
  21613. return text;
  21614. }
  21615. return text;
  21616. }
  21617. },
  21618. methods: {
  21619. // 默认的姓名脱敏规则
  21620. formatName(name) {
  21621. let value2 = "";
  21622. if (name.length === 2) {
  21623. value2 = name.substr(0, 1) + "*";
  21624. } else if (name.length > 2) {
  21625. let char = "";
  21626. for (let i = 0, len = name.length - 2; i < len; i++) {
  21627. char += "*";
  21628. }
  21629. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  21630. } else {
  21631. value2 = name;
  21632. }
  21633. return value2;
  21634. }
  21635. }
  21636. };
  21637. const button = {
  21638. props: {
  21639. lang: String,
  21640. sessionFrom: String,
  21641. sendMessageTitle: String,
  21642. sendMessagePath: String,
  21643. sendMessageImg: String,
  21644. showMessageCard: Boolean,
  21645. appParameter: String,
  21646. formType: String,
  21647. openType: String
  21648. }
  21649. };
  21650. const openType = {
  21651. props: {
  21652. openType: String
  21653. },
  21654. methods: {
  21655. onGetUserInfo(event) {
  21656. this.$emit("getuserinfo", event.detail);
  21657. },
  21658. onContact(event) {
  21659. this.$emit("contact", event.detail);
  21660. },
  21661. onGetPhoneNumber(event) {
  21662. this.$emit("getphonenumber", event.detail);
  21663. },
  21664. onError(event) {
  21665. this.$emit("error", event.detail);
  21666. },
  21667. onLaunchApp(event) {
  21668. this.$emit("launchapp", event.detail);
  21669. },
  21670. onOpenSetting(event) {
  21671. this.$emit("opensetting", event.detail);
  21672. }
  21673. }
  21674. };
  21675. const props$i = {
  21676. props: {
  21677. // 主题颜色
  21678. type: {
  21679. type: String,
  21680. default: props$y.text.type
  21681. },
  21682. // 是否显示
  21683. show: {
  21684. type: Boolean,
  21685. default: props$y.text.show
  21686. },
  21687. // 显示的值
  21688. text: {
  21689. type: [String, Number],
  21690. default: props$y.text.text
  21691. },
  21692. // 前置图标
  21693. prefixIcon: {
  21694. type: String,
  21695. default: props$y.text.prefixIcon
  21696. },
  21697. // 后置图标
  21698. suffixIcon: {
  21699. type: String,
  21700. default: props$y.text.suffixIcon
  21701. },
  21702. // 文本处理的匹配模式
  21703. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  21704. mode: {
  21705. type: String,
  21706. default: props$y.text.mode
  21707. },
  21708. // mode=link下,配置的链接
  21709. href: {
  21710. type: String,
  21711. default: props$y.text.href
  21712. },
  21713. // 格式化规则
  21714. format: {
  21715. type: [String, Function],
  21716. default: props$y.text.format
  21717. },
  21718. // mode=phone时,点击文本是否拨打电话
  21719. call: {
  21720. type: Boolean,
  21721. default: props$y.text.call
  21722. },
  21723. // 小程序的打开方式
  21724. openType: {
  21725. type: String,
  21726. default: props$y.text.openType
  21727. },
  21728. // 是否粗体,默认normal
  21729. bold: {
  21730. type: Boolean,
  21731. default: props$y.text.bold
  21732. },
  21733. // 是否块状
  21734. block: {
  21735. type: Boolean,
  21736. default: props$y.text.block
  21737. },
  21738. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  21739. lines: {
  21740. type: [String, Number],
  21741. default: props$y.text.lines
  21742. },
  21743. // 文本颜色
  21744. color: {
  21745. type: String,
  21746. default: props$y.text.color
  21747. },
  21748. // 字体大小
  21749. size: {
  21750. type: [String, Number],
  21751. default: props$y.text.size
  21752. },
  21753. // 图标的样式
  21754. iconStyle: {
  21755. type: [Object, String],
  21756. default: props$y.text.iconStyle
  21757. },
  21758. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  21759. decoration: {
  21760. tepe: String,
  21761. default: props$y.text.decoration
  21762. },
  21763. // 外边距,对象、字符串,数值形式均可
  21764. margin: {
  21765. type: [Object, String, Number],
  21766. default: props$y.text.margin
  21767. },
  21768. // 文本行高
  21769. lineHeight: {
  21770. type: [String, Number],
  21771. default: props$y.text.lineHeight
  21772. },
  21773. // 文本对齐方式,可选值left|center|right
  21774. align: {
  21775. type: String,
  21776. default: props$y.text.align
  21777. },
  21778. // 文字换行,可选值break-word|normal|anywhere
  21779. wordWrap: {
  21780. type: String,
  21781. default: props$y.text.wordWrap
  21782. }
  21783. }
  21784. };
  21785. const _sfc_main$1w = {
  21786. name: "u--text",
  21787. mixins: [mpMixin, mixin, value, props$i],
  21788. emits: ["click"],
  21789. computed: {
  21790. valueStyle() {
  21791. const style = {
  21792. textDecoration: this.decoration,
  21793. fontWeight: this.bold ? "bold" : "normal",
  21794. wordWrap: this.wordWrap,
  21795. fontSize: uni.$u.addUnit(this.size)
  21796. };
  21797. !this.type && (style.color = this.color);
  21798. this.isNvue && this.lines && (style.lines = this.lines);
  21799. this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
  21800. !this.isNvue && this.block && (style.display = "block");
  21801. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  21802. },
  21803. isNvue() {
  21804. let nvue = false;
  21805. return nvue;
  21806. },
  21807. isMp() {
  21808. let mp = false;
  21809. return mp;
  21810. }
  21811. },
  21812. data() {
  21813. return {};
  21814. },
  21815. methods: {
  21816. clickHandler() {
  21817. if (this.call && this.mode === "phone") {
  21818. uni.makePhoneCall({
  21819. phoneNumber: this.text
  21820. });
  21821. }
  21822. this.$emit("click");
  21823. }
  21824. }
  21825. };
  21826. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  21827. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  21828. const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$3);
  21829. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  21830. "view",
  21831. {
  21832. key: 0,
  21833. class: vue.normalizeClass(["u-text", []]),
  21834. style: vue.normalizeStyle({
  21835. margin: _ctx.margin,
  21836. justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
  21837. }),
  21838. onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  21839. },
  21840. [
  21841. _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
  21842. "text",
  21843. {
  21844. key: 0,
  21845. class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
  21846. style: vue.normalizeStyle([$options.valueStyle])
  21847. },
  21848. "¥",
  21849. 6
  21850. /* CLASS, STYLE */
  21851. )) : vue.createCommentVNode("v-if", true),
  21852. _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  21853. key: 1,
  21854. class: "u-text__prefix-icon"
  21855. }, [
  21856. vue.createVNode(_component_u_icon, {
  21857. name: _ctx.prefixIcon,
  21858. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  21859. }, null, 8, ["name", "customStyle"])
  21860. ])) : vue.createCommentVNode("v-if", true),
  21861. _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
  21862. key: 2,
  21863. text: _ctx.value,
  21864. href: _ctx.href,
  21865. underLine: ""
  21866. }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
  21867. key: 3,
  21868. class: "u-reset-button u-text__value",
  21869. style: vue.normalizeStyle([$options.valueStyle]),
  21870. "data-index": _ctx.index,
  21871. openType: _ctx.openType,
  21872. onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
  21873. onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
  21874. onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
  21875. onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
  21876. onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
  21877. onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
  21878. lang: _ctx.lang,
  21879. "session-from": _ctx.sessionFrom,
  21880. "send-message-title": _ctx.sendMessageTitle,
  21881. "send-message-path": _ctx.sendMessagePath,
  21882. "send-message-img": _ctx.sendMessageImg,
  21883. "show-message-card": _ctx.showMessageCard,
  21884. "app-parameter": _ctx.appParameter
  21885. }, 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(
  21886. "text",
  21887. {
  21888. key: 4,
  21889. class: vue.normalizeClass(["u-text__value", [
  21890. _ctx.type && `u-text__value--${_ctx.type}`,
  21891. _ctx.lines && `u-line-${_ctx.lines}`
  21892. ]]),
  21893. style: vue.normalizeStyle([$options.valueStyle])
  21894. },
  21895. vue.toDisplayString(_ctx.value),
  21896. 7
  21897. /* TEXT, CLASS, STYLE */
  21898. )),
  21899. _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  21900. key: 5,
  21901. class: "u-text__suffix-icon"
  21902. }, [
  21903. vue.createVNode(_component_u_icon, {
  21904. name: _ctx.suffixIcon,
  21905. customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
  21906. }, null, 8, ["name", "customStyle"])
  21907. ])) : vue.createCommentVNode("v-if", true)
  21908. ],
  21909. 4
  21910. /* STYLE */
  21911. )) : vue.createCommentVNode("v-if", true);
  21912. }
  21913. const uvText = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-0a574502"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-text/u-text.vue"]]);
  21914. const _sfc_main$1v = {
  21915. name: "u--text",
  21916. mixins: [mpMixin, mixin, props$i],
  21917. components: {
  21918. uvText
  21919. }
  21920. };
  21921. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  21922. const _component_uvText = vue.resolveComponent("uvText");
  21923. return vue.openBlock(), vue.createBlock(_component_uvText, {
  21924. type: _ctx.type,
  21925. show: _ctx.show,
  21926. text: _ctx.text,
  21927. prefixIcon: _ctx.prefixIcon,
  21928. suffixIcon: _ctx.suffixIcon,
  21929. mode: _ctx.mode,
  21930. href: _ctx.href,
  21931. format: _ctx.format,
  21932. call: _ctx.call,
  21933. openType: _ctx.openType,
  21934. bold: _ctx.bold,
  21935. block: _ctx.block,
  21936. lines: _ctx.lines,
  21937. color: _ctx.color,
  21938. decoration: _ctx.decoration,
  21939. size: _ctx.size,
  21940. iconStyle: _ctx.iconStyle,
  21941. margin: _ctx.margin,
  21942. lineHeight: _ctx.lineHeight,
  21943. align: _ctx.align,
  21944. wordWrap: _ctx.wordWrap,
  21945. customStyle: _ctx.customStyle
  21946. }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
  21947. }
  21948. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u--text/u--text.vue"]]);
  21949. const props$h = {
  21950. props: {
  21951. // 图片地址,Array<String>|Array<Object>形式
  21952. urls: {
  21953. type: Array,
  21954. default: props$y.album.urls
  21955. },
  21956. // 指定从数组的对象元素中读取哪个属性作为图片地址
  21957. keyName: {
  21958. type: String,
  21959. default: props$y.album.keyName
  21960. },
  21961. // 单图时,图片长边的长度
  21962. singleSize: {
  21963. type: [String, Number],
  21964. default: props$y.album.singleSize
  21965. },
  21966. // 多图时,图片边长
  21967. multipleSize: {
  21968. type: [String, Number],
  21969. default: props$y.album.multipleSize
  21970. },
  21971. // 多图时,图片水平和垂直之间的间隔
  21972. space: {
  21973. type: [String, Number],
  21974. default: props$y.album.space
  21975. },
  21976. // 单图时,图片缩放裁剪的模式
  21977. singleMode: {
  21978. type: String,
  21979. default: props$y.album.singleMode
  21980. },
  21981. // 多图时,图片缩放裁剪的模式
  21982. multipleMode: {
  21983. type: String,
  21984. default: props$y.album.multipleMode
  21985. },
  21986. // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
  21987. maxCount: {
  21988. type: [String, Number],
  21989. default: props$y.album.maxCount
  21990. },
  21991. // 是否可以预览图片
  21992. previewFullImage: {
  21993. type: Boolean,
  21994. default: props$y.album.previewFullImage
  21995. },
  21996. // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
  21997. rowCount: {
  21998. type: [String, Number],
  21999. default: props$y.album.rowCount
  22000. },
  22001. // 超出maxCount时是否显示查看更多的提示
  22002. showMore: {
  22003. type: Boolean,
  22004. default: props$y.album.showMore
  22005. }
  22006. }
  22007. };
  22008. const _sfc_main$1u = {
  22009. name: "u-album",
  22010. mixins: [mpMixin, mixin, props$h],
  22011. data() {
  22012. return {
  22013. // 单图的宽度
  22014. singleWidth: 0,
  22015. // 单图的高度
  22016. singleHeight: 0,
  22017. // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比
  22018. singlePercent: 0.6
  22019. };
  22020. },
  22021. watch: {
  22022. urls: {
  22023. immediate: true,
  22024. handler(newVal) {
  22025. if (newVal.length === 1) {
  22026. this.getImageRect();
  22027. }
  22028. }
  22029. }
  22030. },
  22031. computed: {
  22032. imageStyle() {
  22033. return (index1, index2) => {
  22034. const { space, rowCount, multipleSize, urls } = this, { addUnit: addUnit2, addStyle: addStyle2 } = uni.$u, rowLen = this.showUrls.length;
  22035. this.urls.length;
  22036. const style = {
  22037. marginRight: addUnit2(space),
  22038. marginBottom: addUnit2(space)
  22039. };
  22040. if (index1 === rowLen)
  22041. style.marginBottom = 0;
  22042. if (index2 === rowCount || index1 === rowLen && index2 === this.showUrls[index1 - 1].length)
  22043. style.marginRight = 0;
  22044. return style;
  22045. };
  22046. },
  22047. // 将数组划分为二维数组
  22048. showUrls() {
  22049. const arr = [];
  22050. this.urls.map((item, index2) => {
  22051. if (index2 + 1 <= this.maxCount) {
  22052. const itemIndex = Math.floor(index2 / this.rowCount);
  22053. if (!arr[itemIndex]) {
  22054. arr[itemIndex] = [];
  22055. }
  22056. arr[itemIndex].push(item);
  22057. }
  22058. });
  22059. return arr;
  22060. },
  22061. imageWidth() {
  22062. return uni.$u.addUnit(
  22063. this.urls.length === 1 ? this.singleWidth : this.multipleSize
  22064. );
  22065. },
  22066. imageHeight() {
  22067. return uni.$u.addUnit(
  22068. this.urls.length === 1 ? this.singleHeight : this.multipleSize
  22069. );
  22070. },
  22071. // 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度
  22072. // 因为用户在某些特殊的情况下,需要让文字与相册的宽度相等,所以这里事件的形式对外发送
  22073. albumWidth() {
  22074. let width = 0;
  22075. if (this.urls.length === 1) {
  22076. width = this.singleWidth;
  22077. } else {
  22078. width = this.showUrls[0].length * this.multipleSize + this.space * (this.showUrls[0].length - 1);
  22079. }
  22080. this.$emit("albumWidth", width);
  22081. return width;
  22082. }
  22083. },
  22084. methods: {
  22085. // 预览图片
  22086. onPreviewTap(url2) {
  22087. const urls = this.urls.map((item) => {
  22088. return this.getSrc(item);
  22089. });
  22090. uni.previewImage({
  22091. current: url2,
  22092. urls
  22093. });
  22094. },
  22095. // 获取图片的路径
  22096. getSrc(item) {
  22097. return uni.$u.test.object(item) ? this.keyName && item[this.keyName] || item.src : item;
  22098. },
  22099. // 单图时,获取图片的尺寸
  22100. // 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸
  22101. // 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent)
  22102. getImageRect() {
  22103. const src = this.getSrc(this.urls[0]);
  22104. uni.getImageInfo({
  22105. src,
  22106. success: (res) => {
  22107. const isHorizotal = res.width >= res.height;
  22108. this.singleWidth = isHorizotal ? this.singleSize : res.width / res.height * this.singleSize;
  22109. this.singleHeight = !isHorizotal ? this.singleSize : res.height / res.width * this.singleWidth;
  22110. },
  22111. fail: () => {
  22112. this.getComponentWidth();
  22113. }
  22114. });
  22115. },
  22116. // 获取组件的宽度
  22117. async getComponentWidth() {
  22118. await uni.$u.sleep(30);
  22119. this.$uGetRect(".u-album__row").then((size) => {
  22120. this.singleWidth = size.width * this.singlePercent;
  22121. });
  22122. }
  22123. }
  22124. };
  22125. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  22126. const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_0$5);
  22127. return vue.openBlock(), vue.createElementBlock("view", { class: "u-album" }, [
  22128. (vue.openBlock(true), vue.createElementBlock(
  22129. vue.Fragment,
  22130. null,
  22131. vue.renderList($options.showUrls, (arr, index2) => {
  22132. return vue.openBlock(), vue.createElementBlock("view", {
  22133. class: "u-album__row",
  22134. ref_for: true,
  22135. ref: "u-album__row",
  22136. forComputedUse: $options.albumWidth,
  22137. key: index2
  22138. }, [
  22139. (vue.openBlock(true), vue.createElementBlock(
  22140. vue.Fragment,
  22141. null,
  22142. vue.renderList(arr, (item, index1) => {
  22143. return vue.openBlock(), vue.createElementBlock("view", {
  22144. class: "u-album__row__wrapper",
  22145. key: index1,
  22146. style: vue.normalizeStyle([$options.imageStyle(index2 + 1, index1 + 1)]),
  22147. onClick: ($event) => _ctx.previewFullImage ? $options.onPreviewTap($options.getSrc(item)) : ""
  22148. }, [
  22149. vue.createElementVNode("image", {
  22150. src: $options.getSrc(item),
  22151. mode: _ctx.urls.length === 1 ? $options.imageHeight > 0 ? _ctx.singleMode : "widthFix" : _ctx.multipleMode,
  22152. style: vue.normalizeStyle([
  22153. {
  22154. width: $options.imageWidth,
  22155. height: $options.imageHeight
  22156. }
  22157. ])
  22158. }, null, 12, ["src", "mode"]),
  22159. _ctx.showMore && _ctx.urls.length > _ctx.rowCount * $options.showUrls.length && index2 === $options.showUrls.length - 1 && index1 === $options.showUrls[$options.showUrls.length - 1].length - 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  22160. key: 0,
  22161. class: "u-album__row__wrapper__text"
  22162. }, [
  22163. vue.createVNode(_component_u__text, {
  22164. text: `+${_ctx.urls.length - _ctx.maxCount}`,
  22165. color: "#fff",
  22166. size: _ctx.multipleSize * 0.3,
  22167. align: "center",
  22168. customStyle: "justify-content: center"
  22169. }, null, 8, ["text", "size"])
  22170. ])) : vue.createCommentVNode("v-if", true)
  22171. ], 12, ["onClick"]);
  22172. }),
  22173. 128
  22174. /* KEYED_FRAGMENT */
  22175. ))
  22176. ], 8, ["forComputedUse"]);
  22177. }),
  22178. 128
  22179. /* KEYED_FRAGMENT */
  22180. ))
  22181. ]);
  22182. }
  22183. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-96d28356"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-album/u-album.vue"]]);
  22184. const _sfc_main$1t = {
  22185. data() {
  22186. return {
  22187. report: null,
  22188. patient: null,
  22189. hospital: null,
  22190. department: null,
  22191. doctor: null,
  22192. order: null,
  22193. orderId: null,
  22194. orderStatusOptions: [],
  22195. orderTypeOptions: [],
  22196. inquiryTypeOptions: [],
  22197. reportImages: [],
  22198. tongueImages: [],
  22199. faceImages: []
  22200. // forms:[],
  22201. };
  22202. },
  22203. onLoad(options) {
  22204. this.orderId = options.orderId;
  22205. this.getDictByKey("sys_inquiry_order_type");
  22206. this.getDictByKey("sys_inquiry_type");
  22207. this.getDictByKey("sys_inquiry_status");
  22208. },
  22209. onShow() {
  22210. this.getMyInquiryOrderById();
  22211. },
  22212. methods: {
  22213. cancel() {
  22214. var that = this;
  22215. uni.showModal({
  22216. title: "提示",
  22217. content: "确认取消订单吗?",
  22218. showCancel: true,
  22219. cancelText: "取消",
  22220. confirmText: "确定",
  22221. success: (res) => {
  22222. if (res.confirm) {
  22223. var data = { orderId: this.orderId };
  22224. cancel(data).then(
  22225. (res2) => {
  22226. if (res2.code == 200) {
  22227. that.getMyInquiryOrderById();
  22228. uni.showToast({
  22229. icon: "success",
  22230. title: "操作成功"
  22231. });
  22232. } else {
  22233. uni.showToast({
  22234. icon: "none",
  22235. title: res2.msg
  22236. });
  22237. }
  22238. },
  22239. (rej) => {
  22240. }
  22241. );
  22242. }
  22243. }
  22244. });
  22245. },
  22246. ping() {
  22247. uni.navigateTo({
  22248. url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId
  22249. });
  22250. },
  22251. pay() {
  22252. uni.navigateTo({
  22253. url: "/pages_order/inquiryPay?orderId=" + this.orderId
  22254. });
  22255. },
  22256. toIM() {
  22257. var that = this;
  22258. var id = "C2CD-" + this.doctor.doctorId;
  22259. store.commit("timStore/setType", "startInquiry");
  22260. store.commit("timStore/setOrderType", this.order.orderType);
  22261. store.commit("timStore/setOrderId", this.order.orderId);
  22262. store.commit("timStore/setFollowId", 0);
  22263. store.commit("timStore/setImType", 1);
  22264. store.commit("timStore/setConversationID", id);
  22265. uni.$TUIKit.TUIConversationServer.setMessageRead(id);
  22266. uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
  22267. var _a;
  22268. uni.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => {
  22269. formatAppLog("log", "at pages_order/inquiryOrderDetails.vue:394", "更新order");
  22270. }).catch((err) => {
  22271. });
  22272. formatAppLog("log", "at pages_order/inquiryOrderDetails.vue:399", res);
  22273. const { conversation } = res.data;
  22274. store.commit("timStore/setConversation", conversation);
  22275. let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
  22276. conversation.userProfile;
  22277. url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
  22278. uni.redirectTo({ url: url2 });
  22279. }).catch((err) => {
  22280. formatAppLog("warn", "at pages_order/inquiryOrderDetails.vue:412", "获取 group profile 异常 = ", err);
  22281. });
  22282. },
  22283. navTo(url2) {
  22284. uni.navigateTo({
  22285. url: url2
  22286. });
  22287. },
  22288. copyOrderSn() {
  22289. uni.setClipboardData({
  22290. data: this.order.orderSn,
  22291. success: function() {
  22292. uni.showToast({
  22293. title: "复制成功",
  22294. icon: "none"
  22295. });
  22296. }
  22297. });
  22298. },
  22299. getMyInquiryOrderById() {
  22300. var that = this;
  22301. var data = { orderId: this.orderId };
  22302. getMyInquiryOrderById(data).then(
  22303. (res) => {
  22304. if (res.code == 200) {
  22305. this.order = res.data.order;
  22306. this.report = res.data.report;
  22307. this.patient = JSON.parse(res.data.order.patientJson);
  22308. if (that.patient.reportImages != null) {
  22309. that.reportImages = that.patient.reportImages.split(",");
  22310. }
  22311. if (that.patient.tongueImages != null) {
  22312. that.tongueImages = that.patient.tongueImages.split(",");
  22313. }
  22314. if (that.patient.faceImages != null) {
  22315. that.faceImages = that.patient.faceImages.split(",");
  22316. }
  22317. this.doctor = res.data.doctor;
  22318. this.department = res.data.department;
  22319. this.hospital = res.data.hospital;
  22320. }
  22321. },
  22322. (err) => {
  22323. }
  22324. );
  22325. },
  22326. getDictByKey(key) {
  22327. var data = { key };
  22328. getDictByKey(data).then(
  22329. (res) => {
  22330. if (res.code == 200) {
  22331. if (key == "sys_inquiry_order_type") {
  22332. this.orderTypeOptions = res.data;
  22333. }
  22334. if (key == "sys_inquiry_type") {
  22335. this.inquiryTypeOptions = res.data;
  22336. }
  22337. if (key == "sys_inquiry_status") {
  22338. this.orderStatusOptions = res.data;
  22339. }
  22340. }
  22341. },
  22342. (err) => {
  22343. }
  22344. );
  22345. },
  22346. navTo(url2) {
  22347. uni.navigateTo({
  22348. url: url2
  22349. });
  22350. }
  22351. }
  22352. };
  22353. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  22354. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  22355. const _component_u_album = resolveEasycom(vue.resolveDynamicComponent("u-album"), __easycom_1$2);
  22356. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  22357. vue.createElementVNode("view", { class: "cont" }, [
  22358. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  22359. key: 0,
  22360. class: "other-info"
  22361. }, [
  22362. vue.createElementVNode("view", { class: "title" }, "付款详情"),
  22363. vue.createElementVNode("view", { class: "item" }, [
  22364. vue.createElementVNode("view", { class: "left" }, [
  22365. vue.createElementVNode("text", { class: "label" }, "订单类型:"),
  22366. vue.createElementVNode(
  22367. "text",
  22368. { class: "text" },
  22369. vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
  22370. 1
  22371. /* TEXT */
  22372. ),
  22373. vue.createElementVNode(
  22374. "text",
  22375. { class: "text" },
  22376. "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
  22377. 1
  22378. /* TEXT */
  22379. )
  22380. ]),
  22381. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  22382. "view",
  22383. {
  22384. key: 0,
  22385. class: "status red"
  22386. },
  22387. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  22388. 1
  22389. /* TEXT */
  22390. )) : vue.createCommentVNode("v-if", true),
  22391. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  22392. "view",
  22393. {
  22394. key: 1,
  22395. class: "status red"
  22396. },
  22397. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  22398. 1
  22399. /* TEXT */
  22400. )) : vue.createCommentVNode("v-if", true),
  22401. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock(
  22402. "view",
  22403. {
  22404. key: 2,
  22405. class: "status green"
  22406. },
  22407. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  22408. 1
  22409. /* TEXT */
  22410. )) : vue.createCommentVNode("v-if", true),
  22411. $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock(
  22412. "view",
  22413. {
  22414. key: 3,
  22415. class: "status green"
  22416. },
  22417. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  22418. 1
  22419. /* TEXT */
  22420. )) : vue.createCommentVNode("v-if", true),
  22421. $data.order.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  22422. "view",
  22423. {
  22424. key: 4,
  22425. class: "status gray"
  22426. },
  22427. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  22428. 1
  22429. /* TEXT */
  22430. )) : vue.createCommentVNode("v-if", true)
  22431. ])
  22432. ])) : vue.createCommentVNode("v-if", true),
  22433. $data.doctor != null ? (vue.openBlock(), vue.createElementBlock("view", {
  22434. key: 1,
  22435. class: "doc-box"
  22436. }, [
  22437. vue.createElementVNode("view", { class: "title" }, "医生详情"),
  22438. vue.createElementVNode("view", { class: "doc-name-box" }, [
  22439. vue.createElementVNode(
  22440. "view",
  22441. { class: "doc-name" },
  22442. vue.toDisplayString($data.doctor.doctorName),
  22443. 1
  22444. /* TEXT */
  22445. ),
  22446. vue.createElementVNode("view", { class: "doc-star" }, [
  22447. vue.createVNode(_component_u_rate, {
  22448. activeColor: "#ffc603",
  22449. count: "5",
  22450. readonly: "",
  22451. modelValue: $data.doctor.pingStar,
  22452. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.doctor.pingStar = $event)
  22453. }, null, 8, ["modelValue"])
  22454. ])
  22455. ]),
  22456. vue.createElementVNode(
  22457. "view",
  22458. { class: "doc-dept-box" },
  22459. vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
  22460. 1
  22461. /* TEXT */
  22462. ),
  22463. vue.createElementVNode(
  22464. "view",
  22465. { class: "doc-his-box" },
  22466. vue.toDisplayString($data.hospital.hospitalName),
  22467. 1
  22468. /* TEXT */
  22469. ),
  22470. vue.createElementVNode("view", { class: "doc-spec-box" }, [
  22471. vue.createElementVNode("view", { class: "left" }, [
  22472. vue.createElementVNode("view", { class: "title" }, "擅长:"),
  22473. vue.createElementVNode(
  22474. "view",
  22475. { class: "spec" },
  22476. vue.toDisplayString($data.doctor.speciality),
  22477. 1
  22478. /* TEXT */
  22479. )
  22480. ]),
  22481. vue.createElementVNode("view", { class: "right" }, [
  22482. vue.createElementVNode("view", {
  22483. class: "btn",
  22484. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId))
  22485. }, "详情")
  22486. ])
  22487. ])
  22488. ])) : vue.createCommentVNode("v-if", true),
  22489. $data.patient != null && $data.order.inquiryType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  22490. key: 2,
  22491. class: "other-info"
  22492. }, [
  22493. vue.createElementVNode("view", { class: "title" }, "咨询内容"),
  22494. vue.createElementVNode("view", { class: "item" }, [
  22495. vue.createElementVNode("view", { class: "left" }, [
  22496. vue.createElementVNode("text", { class: "label" }, "患者信息:"),
  22497. vue.createElementVNode(
  22498. "text",
  22499. { class: "text" },
  22500. vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
  22501. 1
  22502. /* TEXT */
  22503. )
  22504. ])
  22505. ]),
  22506. vue.createElementVNode("view", { class: "item" }, [
  22507. vue.createElementVNode("view", { class: "left" }, [
  22508. vue.createElementVNode("text", { class: "label" }, "病情描述:"),
  22509. vue.createElementVNode(
  22510. "text",
  22511. { class: "text" },
  22512. vue.toDisplayString($data.patient.title),
  22513. 1
  22514. /* TEXT */
  22515. )
  22516. ])
  22517. ]),
  22518. vue.createElementVNode("view", { class: "item" }, [
  22519. vue.createElementVNode("view", { class: "left" }, [
  22520. vue.createElementVNode("text", { class: "label" }, "患病时间:"),
  22521. vue.createElementVNode(
  22522. "text",
  22523. { class: "text" },
  22524. vue.toDisplayString($data.patient.duration),
  22525. 1
  22526. /* TEXT */
  22527. )
  22528. ])
  22529. ]),
  22530. vue.createElementVNode("view", { class: "item" }, [
  22531. vue.createElementVNode("view", { class: "left" }, [
  22532. vue.createElementVNode("text", { class: "label" }, "就诊情况:"),
  22533. vue.createElementVNode(
  22534. "text",
  22535. { class: "text" },
  22536. vue.toDisplayString($data.patient.isVisit),
  22537. 1
  22538. /* TEXT */
  22539. )
  22540. ])
  22541. ])
  22542. ])) : vue.createCommentVNode("v-if", true),
  22543. $data.patient != null && $data.order.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  22544. key: 3,
  22545. class: "other-info"
  22546. }, [
  22547. vue.createElementVNode("view", { class: "title" }, "咨询内容"),
  22548. vue.createElementVNode("view", { class: "item" }, [
  22549. vue.createElementVNode("view", { class: "left" }, [
  22550. vue.createElementVNode("text", { class: "label" }, "患者信息:"),
  22551. vue.createElementVNode(
  22552. "text",
  22553. { class: "text" },
  22554. vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
  22555. 1
  22556. /* TEXT */
  22557. )
  22558. ])
  22559. ]),
  22560. vue.createElementVNode("view", { class: "item" }, [
  22561. vue.createElementVNode("view", { class: "left" }, [
  22562. vue.createElementVNode("text", { class: "label" }, "身高(CM):"),
  22563. vue.createElementVNode(
  22564. "text",
  22565. { class: "text" },
  22566. vue.toDisplayString($data.patient.height),
  22567. 1
  22568. /* TEXT */
  22569. )
  22570. ])
  22571. ]),
  22572. vue.createElementVNode("view", { class: "item" }, [
  22573. vue.createElementVNode("view", { class: "left" }, [
  22574. vue.createElementVNode("text", { class: "label" }, "体重(KG):"),
  22575. vue.createElementVNode(
  22576. "text",
  22577. { class: "text" },
  22578. vue.toDisplayString($data.patient.weight),
  22579. 1
  22580. /* TEXT */
  22581. )
  22582. ])
  22583. ]),
  22584. vue.createElementVNode("view", { class: "item" }, [
  22585. vue.createElementVNode("view", { class: "left" }, [
  22586. vue.createElementVNode("text", { class: "label" }, "联系电话:"),
  22587. vue.createElementVNode(
  22588. "text",
  22589. { class: "text" },
  22590. vue.toDisplayString($data.patient.mobile),
  22591. 1
  22592. /* TEXT */
  22593. )
  22594. ])
  22595. ]),
  22596. vue.createCommentVNode(' <view class="item">\r\n <view class="left">\r\n <text class="label">学习进度:</text>\r\n <text class="text">{{patient.study}}</text>\r\n </view>\r\n </view> '),
  22597. vue.createElementVNode("view", { class: "item" }, [
  22598. vue.createElementVNode("view", { class: "left" }, [
  22599. vue.createElementVNode("text", { class: "label" }, "用药情况:"),
  22600. vue.createElementVNode(
  22601. "text",
  22602. { class: "text" },
  22603. vue.toDisplayString($data.patient.medication),
  22604. 1
  22605. /* TEXT */
  22606. )
  22607. ])
  22608. ]),
  22609. vue.createElementVNode("view", { class: "item" }, [
  22610. vue.createElementVNode("view", { class: "left" }, [
  22611. vue.createElementVNode("text", { class: "label" }, "期望会诊方式:"),
  22612. vue.createElementVNode(
  22613. "text",
  22614. { class: "text" },
  22615. vue.toDisplayString($data.patient.usage),
  22616. 1
  22617. /* TEXT */
  22618. )
  22619. ])
  22620. ]),
  22621. vue.createElementVNode("view", { class: "item" }, [
  22622. vue.createElementVNode("view", { class: "left" }, [
  22623. vue.createElementVNode("text", { class: "label" }, "病情描述:"),
  22624. vue.createElementVNode(
  22625. "text",
  22626. { class: "text" },
  22627. vue.toDisplayString($data.patient.title),
  22628. 1
  22629. /* TEXT */
  22630. )
  22631. ])
  22632. ]),
  22633. vue.createElementVNode("view", { class: "item" }, [
  22634. vue.createElementVNode("view", { class: "left" }, [
  22635. vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
  22636. vue.createElementVNode(
  22637. "text",
  22638. { class: "text" },
  22639. vue.toDisplayString($data.patient.drugs),
  22640. 1
  22641. /* TEXT */
  22642. )
  22643. ])
  22644. ]),
  22645. vue.createElementVNode("view", { class: "item" }, [
  22646. vue.createElementVNode("view", { class: "left" }, [
  22647. vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
  22648. vue.createElementVNode(
  22649. "text",
  22650. { class: "text" },
  22651. vue.toDisplayString($data.patient.duration),
  22652. 1
  22653. /* TEXT */
  22654. )
  22655. ])
  22656. ]),
  22657. vue.createElementVNode("view", { class: "item" }, [
  22658. vue.createElementVNode("view", { class: "left" }, [
  22659. vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
  22660. vue.createElementVNode(
  22661. "text",
  22662. { class: "text" },
  22663. vue.toDisplayString($data.patient.isVisit),
  22664. 1
  22665. /* TEXT */
  22666. )
  22667. ])
  22668. ]),
  22669. vue.createElementVNode("view", { class: "item" }, [
  22670. vue.createElementVNode("view", { class: "left" }, [
  22671. vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
  22672. ])
  22673. ]),
  22674. vue.createElementVNode("view", null, [
  22675. vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
  22676. ]),
  22677. vue.createElementVNode("view", { class: "item" }, [
  22678. vue.createElementVNode("view", { class: "left" }, [
  22679. vue.createElementVNode("text", { class: "label" }, "面部照片:")
  22680. ])
  22681. ]),
  22682. vue.createElementVNode("view", null, [
  22683. vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
  22684. ]),
  22685. vue.createElementVNode("view", { class: "item" }, [
  22686. vue.createElementVNode("view", { class: "left" }, [
  22687. vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
  22688. ])
  22689. ]),
  22690. vue.createElementVNode("view", null, [
  22691. vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
  22692. ])
  22693. ])) : vue.createCommentVNode("v-if", true),
  22694. $data.patient != null && $data.order.inquiryType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  22695. key: 4,
  22696. class: "other-info"
  22697. }, [
  22698. vue.createElementVNode("view", { class: "title" }, "咨询内容"),
  22699. vue.createElementVNode("view", { class: "item" }, [
  22700. vue.createElementVNode("view", { class: "left" }, [
  22701. vue.createElementVNode("text", { class: "label" }, "患者信息:"),
  22702. vue.createElementVNode(
  22703. "text",
  22704. { class: "text" },
  22705. vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
  22706. 1
  22707. /* TEXT */
  22708. )
  22709. ])
  22710. ]),
  22711. vue.createElementVNode("view", { class: "item" }, [
  22712. vue.createElementVNode("view", { class: "left" }, [
  22713. vue.createElementVNode("text", { class: "label" }, "病情描述:"),
  22714. vue.createElementVNode(
  22715. "text",
  22716. { class: "text" },
  22717. vue.toDisplayString($data.patient.title),
  22718. 1
  22719. /* TEXT */
  22720. )
  22721. ])
  22722. ]),
  22723. vue.createElementVNode("view", { class: "item" }, [
  22724. vue.createElementVNode("view", { class: "left" }, [
  22725. vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
  22726. vue.createElementVNode(
  22727. "text",
  22728. { class: "text" },
  22729. vue.toDisplayString($data.patient.drugs),
  22730. 1
  22731. /* TEXT */
  22732. )
  22733. ])
  22734. ]),
  22735. vue.createElementVNode("view", { class: "item" }, [
  22736. vue.createElementVNode("view", { class: "left" }, [
  22737. vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
  22738. vue.createElementVNode(
  22739. "text",
  22740. { class: "text" },
  22741. vue.toDisplayString($data.patient.duration),
  22742. 1
  22743. /* TEXT */
  22744. )
  22745. ])
  22746. ]),
  22747. vue.createElementVNode("view", { class: "item" }, [
  22748. vue.createElementVNode("view", { class: "left" }, [
  22749. vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
  22750. vue.createElementVNode(
  22751. "text",
  22752. { class: "text" },
  22753. vue.toDisplayString($data.patient.isVisit),
  22754. 1
  22755. /* TEXT */
  22756. )
  22757. ])
  22758. ]),
  22759. vue.createElementVNode("view", { class: "item" }, [
  22760. vue.createElementVNode("view", { class: "left" }, [
  22761. vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
  22762. ])
  22763. ]),
  22764. vue.createElementVNode("view", null, [
  22765. vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
  22766. ]),
  22767. vue.createElementVNode("view", { class: "item" }, [
  22768. vue.createElementVNode("view", { class: "left" }, [
  22769. vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
  22770. ])
  22771. ]),
  22772. vue.createElementVNode("view", null, [
  22773. vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
  22774. ]),
  22775. vue.createElementVNode("view", { class: "item" }, [
  22776. vue.createElementVNode("view", { class: "left" }, [
  22777. vue.createElementVNode("text", { class: "label" }, "面部照片:")
  22778. ])
  22779. ]),
  22780. vue.createElementVNode("view", null, [
  22781. vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
  22782. ])
  22783. ])) : vue.createCommentVNode("v-if", true),
  22784. vue.createCommentVNode(' <view class="other-info" v-if="report!=null&&order.status>=3" >\r\n <view class="title">体检信息</view>\r\n <view class="item" v-for="(item) in forms">\r\n <view class="left">\r\n <text class="label">{{item.title}}:</text>\r\n <text class="text">\r\n <u-tag size="mini" plain type="success" style="margin-right: 5rpx;margin-bottom: 5rpx;" v-for="(tag) in item.option" :text="tag"></u-tag>\r\n </text>\r\n </view>\r\n </view>\r\n </view> '),
  22785. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  22786. key: 5,
  22787. class: "other-info"
  22788. }, [
  22789. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  22790. vue.createElementVNode("view", { class: "item" }, [
  22791. vue.createElementVNode("view", { class: "left" }, [
  22792. vue.createElementVNode("text", { class: "label" }, "订单号码:"),
  22793. vue.createElementVNode(
  22794. "text",
  22795. { class: "text" },
  22796. vue.toDisplayString($data.order.orderSn),
  22797. 1
  22798. /* TEXT */
  22799. )
  22800. ]),
  22801. vue.createElementVNode("view", {
  22802. class: "item-btn",
  22803. onClick: _cache[2] || (_cache[2] = (...args) => $options.copyOrderSn && $options.copyOrderSn(...args))
  22804. }, "复制")
  22805. ]),
  22806. vue.createElementVNode("view", { class: "item" }, [
  22807. vue.createElementVNode("view", { class: "left" }, [
  22808. vue.createElementVNode("text", { class: "label" }, "下单时间:"),
  22809. vue.createElementVNode(
  22810. "text",
  22811. { class: "text" },
  22812. vue.toDisplayString($data.order.createTime),
  22813. 1
  22814. /* TEXT */
  22815. )
  22816. ])
  22817. ]),
  22818. vue.createElementVNode("view", { class: "item" }, [
  22819. vue.createElementVNode("view", { class: "left" }, [
  22820. vue.createElementVNode("text", { class: "label" }, "订单金额:"),
  22821. vue.createElementVNode(
  22822. "text",
  22823. { class: "text" },
  22824. vue.toDisplayString($data.order.money.toFixed(2)),
  22825. 1
  22826. /* TEXT */
  22827. )
  22828. ])
  22829. ]),
  22830. vue.createElementVNode("view", { class: "item" }, [
  22831. vue.createElementVNode("view", { class: "left" }, [
  22832. vue.createElementVNode("text", { class: "label" }, "优惠金额:"),
  22833. vue.createElementVNode(
  22834. "text",
  22835. { class: "text" },
  22836. vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  22837. 1
  22838. /* TEXT */
  22839. )
  22840. ])
  22841. ]),
  22842. vue.createElementVNode("view", { class: "item" }, [
  22843. vue.createElementVNode("view", { class: "left" }, [
  22844. vue.createElementVNode("text", { class: "label" }, "支付金额:"),
  22845. vue.createElementVNode(
  22846. "text",
  22847. { class: "text" },
  22848. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  22849. 1
  22850. /* TEXT */
  22851. )
  22852. ])
  22853. ])
  22854. ])) : vue.createCommentVNode("v-if", true)
  22855. ]),
  22856. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  22857. key: 0,
  22858. class: "btn-box"
  22859. }, [
  22860. $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  22861. key: 0,
  22862. class: "btn",
  22863. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId))
  22864. }, "查看报告")) : vue.createCommentVNode("v-if", true),
  22865. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  22866. key: 1,
  22867. class: "btn",
  22868. onClick: _cache[4] || (_cache[4] = ($event) => $options.toIM())
  22869. }, "去问诊")) : vue.createCommentVNode("v-if", true),
  22870. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  22871. key: 2,
  22872. class: "btn",
  22873. onClick: _cache[5] || (_cache[5] = ($event) => $options.pay())
  22874. }, "去支付")) : vue.createCommentVNode("v-if", true),
  22875. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  22876. key: 3,
  22877. class: "btn",
  22878. onClick: _cache[6] || (_cache[6] = ($event) => $options.cancel())
  22879. }, "取消订单")) : vue.createCommentVNode("v-if", true),
  22880. $data.order.status == 4 && $data.order.isPing == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  22881. key: 4,
  22882. class: "btn",
  22883. onClick: _cache[7] || (_cache[7] = ($event) => $options.ping())
  22884. }, "去评价")) : vue.createCommentVNode("v-if", true)
  22885. ])) : vue.createCommentVNode("v-if", true)
  22886. ]);
  22887. }
  22888. const Pages_orderInquiryOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-905cad6d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderDetails.vue"]]);
  22889. const _sfc_main$1s = {
  22890. mixins: [MescrollMixin],
  22891. // 使用mixin
  22892. data() {
  22893. return {
  22894. mescroll: null,
  22895. downOption: {
  22896. //下拉刷新
  22897. use: true,
  22898. auto: false
  22899. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  22900. },
  22901. upOption: {
  22902. onScroll: false,
  22903. use: true,
  22904. // 是否启用上拉加载; 默认true
  22905. page: {
  22906. pae: 0,
  22907. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  22908. size: 10
  22909. // 每页数据的数量,默认10
  22910. },
  22911. noMoreSize: 10,
  22912. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  22913. textNoMore: "已经到底了",
  22914. empty: {
  22915. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  22916. tip: "暂无数据"
  22917. }
  22918. },
  22919. dataList: []
  22920. };
  22921. },
  22922. onShow() {
  22923. },
  22924. methods: {
  22925. navTo(url2) {
  22926. uni.navigateTo({
  22927. url: url2
  22928. });
  22929. },
  22930. mescrollInit(mescroll) {
  22931. this.mescroll = mescroll;
  22932. },
  22933. /*下拉刷新的回调 */
  22934. downCallback() {
  22935. this.mescroll.resetUpScroll();
  22936. },
  22937. /*上拉加载的回调*/
  22938. upCallback(page2) {
  22939. var that = this;
  22940. var data = {
  22941. pageNum: page2.num,
  22942. pageSize: page2.size
  22943. };
  22944. getMyInquiryOrderPingList(data).then((res) => {
  22945. if (res.code == 200) {
  22946. if (page2.num == 1) {
  22947. that.dataList = res.data.list;
  22948. } else {
  22949. that.dataList = that.dataList.concat(res.data.list);
  22950. }
  22951. that.mescroll.endBySize(res.data.list.length, res.data.total);
  22952. } else {
  22953. uni.showToast({
  22954. icon: "none",
  22955. title: "请求失败"
  22956. });
  22957. that.dataList = null;
  22958. that.mescroll.endErr();
  22959. }
  22960. });
  22961. }
  22962. }
  22963. };
  22964. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  22965. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  22966. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  22967. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  22968. vue.createVNode(_component_mescroll_body, {
  22969. top: "0rpx",
  22970. bottom: "0",
  22971. ref: "mescrollRef",
  22972. onInit: $options.mescrollInit,
  22973. down: $data.downOption,
  22974. up: $data.upOption,
  22975. onDown: $options.downCallback,
  22976. onUp: $options.upCallback
  22977. }, {
  22978. default: vue.withCtx(() => [
  22979. vue.createElementVNode("view", { class: "doctor-box" }, [
  22980. (vue.openBlock(true), vue.createElementBlock(
  22981. vue.Fragment,
  22982. null,
  22983. vue.renderList($data.dataList, (item) => {
  22984. return vue.openBlock(), vue.createElementBlock("view", {
  22985. class: "doctor",
  22986. onClick: ($event) => $options.navTo("../doctor/doctorDetails?doctorId=" + item.doctorId)
  22987. }, [
  22988. vue.createElementVNode("view", { class: "item" }, [
  22989. vue.createElementVNode("image", {
  22990. mode: "aspectFill",
  22991. class: "doc-img",
  22992. src: item.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : item.avatar
  22993. }, null, 8, ["src"]),
  22994. vue.createElementVNode("view", { class: "right" }, [
  22995. vue.createElementVNode("view", { class: "doc-box" }, [
  22996. vue.createElementVNode(
  22997. "view",
  22998. { class: "doc-name" },
  22999. vue.toDisplayString(item.doctorName),
  23000. 1
  23001. /* TEXT */
  23002. ),
  23003. vue.createElementVNode("view", { class: "ping-star" }, [
  23004. vue.createVNode(_component_u_rate, {
  23005. activeColor: "#ffc603",
  23006. count: "5",
  23007. readonly: "",
  23008. modelValue: item.pingStar,
  23009. "onUpdate:modelValue": ($event) => item.pingStar = $event
  23010. }, null, 8, ["modelValue", "onUpdate:modelValue"])
  23011. ])
  23012. ]),
  23013. vue.createElementVNode(
  23014. "view",
  23015. { class: "doc-ping-content" },
  23016. vue.toDisplayString(item.pingContent),
  23017. 1
  23018. /* TEXT */
  23019. ),
  23020. vue.createElementVNode(
  23021. "view",
  23022. { class: "doc-ping-time" },
  23023. vue.toDisplayString(item.pingTime),
  23024. 1
  23025. /* TEXT */
  23026. )
  23027. ])
  23028. ])
  23029. ], 8, ["onClick"]);
  23030. }),
  23031. 256
  23032. /* UNKEYED_FRAGMENT */
  23033. ))
  23034. ])
  23035. ]),
  23036. _: 1
  23037. /* STABLE */
  23038. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  23039. ]);
  23040. }
  23041. const Pages_orderInquiryOrderPingList = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-e069bc60"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderPingList.vue"]]);
  23042. const _sfc_main$1r = {
  23043. data() {
  23044. return {
  23045. isShare: null,
  23046. companyId: null,
  23047. companyUserId: null,
  23048. inquiryType: null,
  23049. prices: []
  23050. };
  23051. },
  23052. onLoad(options) {
  23053. if (!this.$isEmpty(options.isShare)) {
  23054. this.isShare = options.isShare;
  23055. } else {
  23056. uni.hideShareMenu();
  23057. }
  23058. this.inquiryType = options.inquiryType;
  23059. this.companyId = options.companyId;
  23060. this.companyUserId = options.companyUserId;
  23061. },
  23062. onShow() {
  23063. this.getConfigByKey();
  23064. },
  23065. onShareAppMessage(res) {
  23066. uni.showShareMenu({
  23067. withShareTicket: true
  23068. });
  23069. wx.updateShareMenu({
  23070. isPrivateMessage: true,
  23071. withShareTicket: false,
  23072. success(res2) {
  23073. formatAppLog("log", "at pages_order/inquirySelect.vue:66", "updateShareMenu: ", res2);
  23074. },
  23075. fail() {
  23076. }
  23077. });
  23078. return {
  23079. title: "御君方互联网医院--健康会诊",
  23080. path: "/pages_order/inquirySelect?inquiryType=3&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  23081. };
  23082. },
  23083. methods: {
  23084. getConfigByKey() {
  23085. let data = { key: "his.inquiryConfig" };
  23086. getConfigByKey(data).then(
  23087. (res) => {
  23088. if (res.code == 200) {
  23089. var data2 = JSON.parse(res.data);
  23090. this.prices = data2.prices;
  23091. formatAppLog("log", "at pages_order/inquirySelect.vue:85", this.prices);
  23092. } else {
  23093. uni.showToast({
  23094. icon: "none",
  23095. title: "请求失败"
  23096. });
  23097. }
  23098. },
  23099. (rej) => {
  23100. }
  23101. );
  23102. },
  23103. doInquiryForm(price) {
  23104. this.$isLogin().then(
  23105. (res) => {
  23106. formatAppLog("log", "at pages_order/inquirySelect.vue:99", res);
  23107. if (res) {
  23108. if (this.inquiryType == 1) {
  23109. uni.navigateTo({
  23110. url: "/pages_order/inquiryForm1?inquiryType=" + this.inquiryType + "&orderType=" + price.type
  23111. });
  23112. } else if (this.inquiryType == 3) {
  23113. uni.navigateTo({
  23114. url: "/pages_order/inquiryForm3?inquiryType=" + this.inquiryType + "&orderType=" + price.type + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  23115. });
  23116. }
  23117. } else {
  23118. uni.navigateTo({
  23119. url: "/pages/auth/login"
  23120. });
  23121. }
  23122. }
  23123. );
  23124. }
  23125. }
  23126. };
  23127. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  23128. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  23129. vue.createElementVNode("view", { class: "bg" }, [
  23130. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f06ec63771984f3b9f9aa65eb0c17eeb.png" })
  23131. ]),
  23132. vue.createElementVNode("view", { class: "title" }, "20秒快速匹配专家医生"),
  23133. vue.createElementVNode("view", { class: "cont" }, [
  23134. (vue.openBlock(true), vue.createElementBlock(
  23135. vue.Fragment,
  23136. null,
  23137. vue.renderList($data.prices, (price, index2) => {
  23138. return vue.openBlock(), vue.createElementBlock("view", {
  23139. class: "inquiry-item",
  23140. onClick: ($event) => $options.doInquiryForm(price)
  23141. }, [
  23142. price.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  23143. key: 0,
  23144. class: "left"
  23145. }, [
  23146. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/939cf3ad7d1a4186a7195e84a1db84bf.png" }),
  23147. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23148. vue.createElementVNode(
  23149. "view",
  23150. { class: "name" },
  23151. "图文问诊 " + vue.toDisplayString(price.price) + "/次",
  23152. 1
  23153. /* TEXT */
  23154. ),
  23155. vue.createElementVNode("view", { class: "desc" }, "和医生1对1在线图文问诊")
  23156. ])
  23157. ])) : vue.createCommentVNode("v-if", true),
  23158. price.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  23159. key: 1,
  23160. class: "left"
  23161. }, [
  23162. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/cf80011807af45c9af1bea6c4cf4bb3a.png" }),
  23163. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23164. vue.createElementVNode(
  23165. "view",
  23166. { class: "name" },
  23167. "视频问诊 " + vue.toDisplayString(price.price) + "/次",
  23168. 1
  23169. /* TEXT */
  23170. ),
  23171. vue.createElementVNode("view", { class: "desc" }, "和医生1对1在线视频问诊")
  23172. ])
  23173. ])) : vue.createCommentVNode("v-if", true),
  23174. vue.createElementVNode("view", { class: "right" }, [
  23175. vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
  23176. ])
  23177. ], 8, ["onClick"]);
  23178. }),
  23179. 256
  23180. /* UNKEYED_FRAGMENT */
  23181. ))
  23182. ])
  23183. ]);
  23184. }
  23185. const Pages_orderInquirySelect = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-0e970724"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquirySelect.vue"]]);
  23186. const _sfc_main$1q = {
  23187. data() {
  23188. return {
  23189. companyId: null,
  23190. companyUserId: null,
  23191. isShare: null
  23192. };
  23193. },
  23194. onLoad(options) {
  23195. this.isShare = options.isShare;
  23196. this.companyId = options.companyId;
  23197. this.companyUserId = options.companyUserId;
  23198. },
  23199. onShow() {
  23200. },
  23201. methods: {
  23202. doInquiryForm(type2) {
  23203. this.$isLogin().then(
  23204. (res) => {
  23205. formatAppLog("log", "at pages_order/inquirySelectType.vue:123", res);
  23206. if (res) {
  23207. if (type2 == 1 || type2 == 2 || type2 == 6 || type2 == 5 || type2 == 7 || type2 == 8 || type2 == 9 || type2 == 10) {
  23208. uni.navigateTo({
  23209. url: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + type2 + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&isShare=" + this.isShare
  23210. });
  23211. } else if (type2 == 3) {
  23212. uni.navigateTo({
  23213. url: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + type2 + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&isShare=" + this.isShare
  23214. });
  23215. }
  23216. } else {
  23217. uni.navigateTo({
  23218. url: "/pages/auth/login"
  23219. });
  23220. }
  23221. }
  23222. );
  23223. }
  23224. }
  23225. };
  23226. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  23227. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  23228. vue.createElementVNode("view", { class: "cont-bg" }, [
  23229. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/42d328f9604947eea86b6331ff7013e6.jpg" })
  23230. ]),
  23231. vue.createElementVNode("view", { class: "bg" }, [
  23232. vue.createElementVNode("view"),
  23233. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/65d12607ca874b0d8536c7201a0dfa97.png" })
  23234. ]),
  23235. vue.createElementVNode("view", { class: "cont" }, [
  23236. vue.createElementVNode("view", {
  23237. class: "inquiry-item",
  23238. onClick: _cache[0] || (_cache[0] = ($event) => $options.doInquiryForm(1))
  23239. }, [
  23240. vue.createElementVNode("view", { class: "left" }, [
  23241. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23242. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23243. vue.createElementVNode("view", { class: "name" }, "翟佳滨教授专家团队 会诊咨询"),
  23244. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23245. ])
  23246. ])
  23247. ]),
  23248. vue.createElementVNode("view", {
  23249. class: "inquiry-item",
  23250. onClick: _cache[1] || (_cache[1] = ($event) => $options.doInquiryForm(2))
  23251. }, [
  23252. vue.createElementVNode("view", { class: "left" }, [
  23253. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23254. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23255. vue.createElementVNode("view", { class: "name" }, "红彦主任专家团队 会诊咨询"),
  23256. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23257. ])
  23258. ])
  23259. ]),
  23260. vue.createElementVNode("view", {
  23261. class: "inquiry-item",
  23262. onClick: _cache[2] || (_cache[2] = ($event) => $options.doInquiryForm(6))
  23263. }, [
  23264. vue.createElementVNode("view", { class: "left" }, [
  23265. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23266. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23267. vue.createElementVNode("view", { class: "name" }, "史士昊老师专家团队 会诊咨询"),
  23268. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23269. ])
  23270. ])
  23271. ]),
  23272. vue.createElementVNode("view", {
  23273. class: "inquiry-item",
  23274. onClick: _cache[3] || (_cache[3] = ($event) => $options.doInquiryForm(5))
  23275. }, [
  23276. vue.createElementVNode("view", { class: "left" }, [
  23277. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23278. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23279. vue.createElementVNode("view", { class: "name" }, "张然丁教授专家团队 会诊咨询"),
  23280. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23281. ])
  23282. ])
  23283. ]),
  23284. vue.createElementVNode("view", {
  23285. class: "inquiry-item",
  23286. onClick: _cache[4] || (_cache[4] = ($event) => $options.doInquiryForm(7))
  23287. }, [
  23288. vue.createElementVNode("view", { class: "left" }, [
  23289. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23290. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23291. vue.createElementVNode("view", { class: "name" }, "丁玉球教授专家团队 会诊咨询"),
  23292. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23293. ])
  23294. ])
  23295. ]),
  23296. vue.createElementVNode("view", {
  23297. class: "inquiry-item",
  23298. onClick: _cache[5] || (_cache[5] = ($event) => $options.doInquiryForm(8))
  23299. }, [
  23300. vue.createElementVNode("view", { class: "left" }, [
  23301. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23302. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23303. vue.createElementVNode("view", { class: "name" }, "杜丁主任专家团队 会诊咨询"),
  23304. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23305. ])
  23306. ])
  23307. ]),
  23308. vue.createElementVNode("view", {
  23309. class: "inquiry-item",
  23310. onClick: _cache[6] || (_cache[6] = ($event) => $options.doInquiryForm(9))
  23311. }, [
  23312. vue.createElementVNode("view", { class: "left" }, [
  23313. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23314. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23315. vue.createElementVNode("view", { class: "name" }, "王洋主任专家团队 会诊咨询"),
  23316. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
  23317. ])
  23318. ])
  23319. ]),
  23320. vue.createElementVNode("view", {
  23321. class: "inquiry-item",
  23322. onClick: _cache[7] || (_cache[7] = ($event) => $options.doInquiryForm(10))
  23323. }, [
  23324. vue.createElementVNode("view", { class: "left" }, [
  23325. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23326. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23327. vue.createElementVNode("view", { class: "name" }, "御君方互联网医院 VIP问诊"),
  23328. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队问诊咨询")
  23329. ])
  23330. ])
  23331. ]),
  23332. vue.createElementVNode("view", {
  23333. class: "inquiry-item",
  23334. onClick: _cache[8] || (_cache[8] = ($event) => $options.doInquiryForm(3))
  23335. }, [
  23336. vue.createElementVNode("view", { class: "left" }, [
  23337. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
  23338. vue.createElementVNode("view", { class: "inquiry-cont" }, [
  23339. vue.createElementVNode("view", { class: "name" }, "御君方互联网医院 问诊咨询"),
  23340. vue.createElementVNode("view", { class: "desc" }, "医疗专家团队问诊咨询")
  23341. ])
  23342. ])
  23343. ])
  23344. ])
  23345. ]);
  23346. }
  23347. const Pages_orderInquirySelectType = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-d465af63"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquirySelectType.vue"]]);
  23348. const props$g = {
  23349. props: {
  23350. // 是否开启顶部安全区适配
  23351. safeAreaInsetTop: {
  23352. type: Boolean,
  23353. default: props$y.navbar.safeAreaInsetTop
  23354. },
  23355. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  23356. placeholder: {
  23357. type: Boolean,
  23358. default: props$y.navbar.placeholder
  23359. },
  23360. // 是否固定在顶部
  23361. fixed: {
  23362. type: Boolean,
  23363. default: props$y.navbar.fixed
  23364. },
  23365. // 是否显示下边框
  23366. border: {
  23367. type: Boolean,
  23368. default: props$y.navbar.border
  23369. },
  23370. // 左边的图标
  23371. leftIcon: {
  23372. type: String,
  23373. default: props$y.navbar.leftIcon
  23374. },
  23375. // 左边的提示文字
  23376. leftText: {
  23377. type: String,
  23378. default: props$y.navbar.leftText
  23379. },
  23380. // 左右的提示文字
  23381. rightText: {
  23382. type: String,
  23383. default: props$y.navbar.rightText
  23384. },
  23385. // 右边的图标
  23386. rightIcon: {
  23387. type: String,
  23388. default: props$y.navbar.rightIcon
  23389. },
  23390. // 标题
  23391. title: {
  23392. type: [String, Number],
  23393. default: props$y.navbar.title
  23394. },
  23395. // 背景颜色
  23396. bgColor: {
  23397. type: String,
  23398. default: props$y.navbar.bgColor
  23399. },
  23400. // 标题的宽度
  23401. titleWidth: {
  23402. type: [String, Number],
  23403. default: props$y.navbar.titleWidth
  23404. },
  23405. // 导航栏高度
  23406. height: {
  23407. type: [String, Number],
  23408. default: props$y.navbar.height
  23409. },
  23410. // 左侧返回图标的大小
  23411. leftIconSize: {
  23412. type: [String, Number],
  23413. default: props$y.navbar.leftIconSize
  23414. },
  23415. // 左侧返回图标的颜色
  23416. leftIconColor: {
  23417. type: String,
  23418. default: props$y.navbar.leftIconColor
  23419. },
  23420. // 点击左侧区域(返回图标),是否自动返回上一页
  23421. autoBack: {
  23422. type: Boolean,
  23423. default: props$y.navbar.autoBack
  23424. },
  23425. // 标题的样式,对象或字符串
  23426. titleStyle: {
  23427. type: [String, Object],
  23428. default: props$y.navbar.titleStyle
  23429. }
  23430. }
  23431. };
  23432. const _sfc_main$1p = {
  23433. name: "u-navbar",
  23434. mixins: [mpMixin, mixin, props$g],
  23435. data() {
  23436. return {};
  23437. },
  23438. methods: {
  23439. // 点击左侧区域
  23440. leftClick() {
  23441. this.$emit("leftClick");
  23442. if (this.autoBack) {
  23443. uni.navigateBack();
  23444. }
  23445. },
  23446. // 点击右侧区域
  23447. rightClick() {
  23448. this.$emit("rightClick");
  23449. }
  23450. }
  23451. };
  23452. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  23453. const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b);
  23454. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  23455. return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
  23456. _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
  23457. "view",
  23458. {
  23459. key: 0,
  23460. class: "u-navbar__placeholder",
  23461. style: vue.normalizeStyle({
  23462. height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  23463. })
  23464. },
  23465. null,
  23466. 4
  23467. /* STYLE */
  23468. )) : vue.createCommentVNode("v-if", true),
  23469. vue.createElementVNode(
  23470. "view",
  23471. {
  23472. class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
  23473. },
  23474. [
  23475. _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
  23476. key: 0,
  23477. bgColor: _ctx.bgColor
  23478. }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
  23479. vue.createElementVNode(
  23480. "view",
  23481. {
  23482. class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
  23483. style: vue.normalizeStyle({
  23484. height: _ctx.$u.addUnit(_ctx.height),
  23485. backgroundColor: _ctx.bgColor
  23486. })
  23487. },
  23488. [
  23489. vue.createElementVNode("view", {
  23490. class: "u-navbar__content__left",
  23491. "hover-class": "u-navbar__content__left--hover",
  23492. "hover-start-time": "150",
  23493. onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
  23494. }, [
  23495. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  23496. _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  23497. key: 0,
  23498. name: _ctx.leftIcon,
  23499. size: _ctx.leftIconSize,
  23500. color: _ctx.leftIconColor
  23501. }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
  23502. _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
  23503. "text",
  23504. {
  23505. key: 1,
  23506. style: vue.normalizeStyle({
  23507. color: _ctx.leftIconColor
  23508. }),
  23509. class: "u-navbar__content__left__text"
  23510. },
  23511. vue.toDisplayString(_ctx.leftText),
  23512. 5
  23513. /* TEXT, STYLE */
  23514. )) : vue.createCommentVNode("v-if", true)
  23515. ], true)
  23516. ]),
  23517. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  23518. vue.createElementVNode(
  23519. "text",
  23520. {
  23521. class: "u-line-1 u-navbar__content__title",
  23522. style: vue.normalizeStyle([{
  23523. width: _ctx.$u.addUnit(_ctx.titleWidth)
  23524. }, _ctx.$u.addStyle(_ctx.titleStyle)])
  23525. },
  23526. vue.toDisplayString(_ctx.title),
  23527. 5
  23528. /* TEXT, STYLE */
  23529. )
  23530. ], true),
  23531. _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
  23532. key: 0,
  23533. class: "u-navbar__content__right",
  23534. onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
  23535. }, [
  23536. vue.renderSlot(_ctx.$slots, "right", {}, () => [
  23537. _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  23538. key: 0,
  23539. name: _ctx.rightIcon,
  23540. size: "20"
  23541. }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
  23542. _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
  23543. "text",
  23544. {
  23545. key: 1,
  23546. class: "u-navbar__content__right__text"
  23547. },
  23548. vue.toDisplayString(_ctx.rightText),
  23549. 1
  23550. /* TEXT */
  23551. )) : vue.createCommentVNode("v-if", true)
  23552. ], true)
  23553. ])) : vue.createCommentVNode("v-if", true)
  23554. ],
  23555. 6
  23556. /* CLASS, STYLE */
  23557. )
  23558. ],
  23559. 2
  23560. /* CLASS */
  23561. )
  23562. ]);
  23563. }
  23564. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-f631659b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  23565. const props$f = {
  23566. props: {
  23567. // 显示文字
  23568. title: {
  23569. type: String,
  23570. default: props$y.alert.title
  23571. },
  23572. // 主题,success/warning/info/error
  23573. type: {
  23574. type: String,
  23575. default: props$y.alert.type
  23576. },
  23577. // 辅助性文字
  23578. description: {
  23579. type: String,
  23580. default: props$y.alert.description
  23581. },
  23582. // 是否可关闭
  23583. closable: {
  23584. type: Boolean,
  23585. default: props$y.alert.closable
  23586. },
  23587. // 是否显示图标
  23588. showIcon: {
  23589. type: Boolean,
  23590. default: props$y.alert.showIcon
  23591. },
  23592. // 浅或深色调,light-浅色,dark-深色
  23593. effect: {
  23594. type: String,
  23595. default: props$y.alert.effect
  23596. },
  23597. // 文字是否居中
  23598. center: {
  23599. type: Boolean,
  23600. default: props$y.alert.center
  23601. },
  23602. // 字体大小
  23603. fontSize: {
  23604. type: [String, Number],
  23605. default: props$y.alert.fontSize
  23606. }
  23607. }
  23608. };
  23609. const _sfc_main$1o = {
  23610. name: "u-alert",
  23611. mixins: [mpMixin, mixin, props$f],
  23612. data() {
  23613. return {
  23614. show: true
  23615. };
  23616. },
  23617. computed: {
  23618. iconColor() {
  23619. return this.effect === "light" ? this.type : "#fff";
  23620. },
  23621. // 不同主题对应不同的图标
  23622. iconName() {
  23623. switch (this.type) {
  23624. case "success":
  23625. return "checkmark-circle-fill";
  23626. case "error":
  23627. return "close-circle-fill";
  23628. case "warning":
  23629. return "error-circle-fill";
  23630. case "info":
  23631. return "info-circle-fill";
  23632. case "primary":
  23633. return "more-circle-fill";
  23634. default:
  23635. return "error-circle-fill";
  23636. }
  23637. }
  23638. },
  23639. methods: {
  23640. // 点击内容
  23641. clickHandler() {
  23642. this.$emit("click");
  23643. },
  23644. // 点击关闭按钮
  23645. closeHandler() {
  23646. this.show = false;
  23647. }
  23648. }
  23649. };
  23650. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  23651. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  23652. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
  23653. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  23654. mode: "fade",
  23655. show: $data.show
  23656. }, {
  23657. default: vue.withCtx(() => [
  23658. vue.createElementVNode(
  23659. "view",
  23660. {
  23661. class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
  23662. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  23663. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  23664. },
  23665. [
  23666. _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  23667. key: 0,
  23668. class: "u-alert__icon"
  23669. }, [
  23670. vue.createVNode(_component_u_icon, {
  23671. name: $options.iconName,
  23672. size: "18",
  23673. color: $options.iconColor
  23674. }, null, 8, ["name", "color"])
  23675. ])) : vue.createCommentVNode("v-if", true),
  23676. vue.createElementVNode(
  23677. "view",
  23678. {
  23679. class: "u-alert__content",
  23680. style: vue.normalizeStyle([{
  23681. paddingRight: _ctx.closable ? "20px" : 0
  23682. }])
  23683. },
  23684. [
  23685. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  23686. "text",
  23687. {
  23688. key: 0,
  23689. class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  23690. style: vue.normalizeStyle([{
  23691. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  23692. textAlign: _ctx.center ? "center" : "left"
  23693. }])
  23694. },
  23695. vue.toDisplayString(_ctx.title),
  23696. 7
  23697. /* TEXT, CLASS, STYLE */
  23698. )) : vue.createCommentVNode("v-if", true),
  23699. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  23700. "text",
  23701. {
  23702. key: 1,
  23703. class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
  23704. style: vue.normalizeStyle([{
  23705. fontSize: _ctx.$u.addUnit(_ctx.fontSize),
  23706. textAlign: _ctx.center ? "center" : "left"
  23707. }])
  23708. },
  23709. vue.toDisplayString(_ctx.description),
  23710. 7
  23711. /* TEXT, CLASS, STYLE */
  23712. )) : vue.createCommentVNode("v-if", true)
  23713. ],
  23714. 4
  23715. /* STYLE */
  23716. ),
  23717. _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
  23718. key: 1,
  23719. class: "u-alert__close",
  23720. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
  23721. }, [
  23722. vue.createVNode(_component_u_icon, {
  23723. name: "close",
  23724. color: $options.iconColor,
  23725. size: "15"
  23726. }, null, 8, ["color"])
  23727. ])) : vue.createCommentVNode("v-if", true)
  23728. ],
  23729. 6
  23730. /* CLASS, STYLE */
  23731. )
  23732. ]),
  23733. _: 1
  23734. /* STABLE */
  23735. }, 8, ["show"]);
  23736. }
  23737. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-158e540a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]);
  23738. const props$e = {
  23739. props: {
  23740. // 输入框的内容
  23741. value: {
  23742. type: [String, Number],
  23743. default: props$y.textarea.value
  23744. },
  23745. // 输入框的内容
  23746. modelValue: {
  23747. type: [String, Number],
  23748. default: props$y.textarea.value
  23749. },
  23750. // 输入框为空时占位符
  23751. placeholder: {
  23752. type: [String, Number],
  23753. default: props$y.textarea.placeholder
  23754. },
  23755. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  23756. placeholderClass: {
  23757. type: String,
  23758. default: props$y.input.placeholderClass
  23759. },
  23760. // 指定placeholder的样式
  23761. placeholderStyle: {
  23762. type: [String, Object],
  23763. default: props$y.input.placeholderStyle
  23764. },
  23765. // 输入框高度
  23766. height: {
  23767. type: [String, Number],
  23768. default: props$y.textarea.height
  23769. },
  23770. // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
  23771. confirmType: {
  23772. type: String,
  23773. default: props$y.textarea.confirmType
  23774. },
  23775. // 是否禁用
  23776. disabled: {
  23777. type: Boolean,
  23778. default: props$y.textarea.disabled
  23779. },
  23780. // 是否显示统计字数
  23781. count: {
  23782. type: Boolean,
  23783. default: props$y.textarea.count
  23784. },
  23785. // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
  23786. focus: {
  23787. type: Boolean,
  23788. default: props$y.textarea.focus
  23789. },
  23790. // 是否自动增加高度
  23791. autoHeight: {
  23792. type: Boolean,
  23793. default: props$y.textarea.autoHeight
  23794. },
  23795. // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
  23796. fixed: {
  23797. type: Boolean,
  23798. default: props$y.textarea.fixed
  23799. },
  23800. // 指定光标与键盘的距离
  23801. cursorSpacing: {
  23802. type: Number,
  23803. default: props$y.textarea.cursorSpacing
  23804. },
  23805. // 指定focus时的光标位置
  23806. cursor: {
  23807. type: [String, Number],
  23808. default: props$y.textarea.cursor
  23809. },
  23810. // 是否显示键盘上方带有”完成“按钮那一栏,
  23811. showConfirmBar: {
  23812. type: Boolean,
  23813. default: props$y.textarea.showConfirmBar
  23814. },
  23815. // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
  23816. selectionStart: {
  23817. type: Number,
  23818. default: props$y.textarea.selectionStart
  23819. },
  23820. // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
  23821. selectionEnd: {
  23822. type: Number,
  23823. default: props$y.textarea.selectionEnd
  23824. },
  23825. // 键盘弹起时,是否自动上推页面
  23826. adjustPosition: {
  23827. type: Boolean,
  23828. default: props$y.textarea.adjustPosition
  23829. },
  23830. // 是否去掉 iOS 下的默认内边距,只微信小程序有效
  23831. disableDefaultPadding: {
  23832. type: Boolean,
  23833. default: props$y.textarea.disableDefaultPadding
  23834. },
  23835. // focus时,点击页面的时候不收起键盘,只微信小程序有效
  23836. holdKeyboard: {
  23837. type: Boolean,
  23838. default: props$y.textarea.holdKeyboard
  23839. },
  23840. // 最大输入长度,设置为 -1 的时候不限制最大长度
  23841. maxlength: {
  23842. type: [String, Number],
  23843. default: props$y.textarea.maxlength
  23844. },
  23845. // 边框类型,surround-四周边框,bottom-底部边框
  23846. border: {
  23847. type: String,
  23848. default: props$y.textarea.border
  23849. },
  23850. // 用于处理或者过滤输入框内容的方法
  23851. formatter: {
  23852. type: [Function, null],
  23853. default: props$y.textarea.formatter
  23854. },
  23855. // 是否忽略组件内对文本合成系统事件的处理
  23856. ignoreCompositionEvent: {
  23857. type: Boolean,
  23858. default: true
  23859. }
  23860. }
  23861. };
  23862. const _sfc_main$1n = {
  23863. name: "u-textarea",
  23864. mixins: [mpMixin, mixin, props$e],
  23865. data() {
  23866. return {
  23867. // 输入框的值
  23868. innerValue: "",
  23869. // 是否处于获得焦点状态
  23870. focused: false,
  23871. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  23872. firstChange: true,
  23873. // value绑定值的变化是由内部还是外部引起的
  23874. changeFromInner: false,
  23875. // 过滤处理方法
  23876. innerFormatter: (value2) => value2
  23877. };
  23878. },
  23879. created() {
  23880. },
  23881. watch: {
  23882. modelValue: {
  23883. immediate: true,
  23884. handler(newVal, oldVal) {
  23885. this.innerValue = newVal;
  23886. this.firstChange = false;
  23887. this.changeFromInner = false;
  23888. }
  23889. }
  23890. },
  23891. computed: {
  23892. // 组件的类名
  23893. textareaClass() {
  23894. let classes = [], { border, disabled } = this;
  23895. border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
  23896. border === "bottom" && (classes = classes.concat([
  23897. "u-border-bottom",
  23898. "u-textarea--no-radius"
  23899. ]));
  23900. disabled && classes.push("u-textarea--disabled");
  23901. return classes.join(" ");
  23902. },
  23903. // 组件的样式
  23904. textareaStyle() {
  23905. const style = {};
  23906. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  23907. }
  23908. },
  23909. emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
  23910. methods: {
  23911. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  23912. setFormatter(e) {
  23913. this.innerFormatter = e;
  23914. },
  23915. onFocus(e) {
  23916. this.$emit("focus", e);
  23917. },
  23918. onBlur(e) {
  23919. this.$emit("blur", e);
  23920. uni.$u.formValidate(this, "blur");
  23921. },
  23922. onLinechange(e) {
  23923. this.$emit("linechange", e);
  23924. },
  23925. onInput(e) {
  23926. let { value: value2 = "" } = e.detail || {};
  23927. const formatter = this.formatter || this.innerFormatter;
  23928. const formatValue = formatter(value2);
  23929. this.innerValue = value2;
  23930. this.$nextTick(() => {
  23931. this.innerValue = formatValue;
  23932. this.valueChange();
  23933. });
  23934. },
  23935. // 内容发生变化,进行处理
  23936. valueChange() {
  23937. const value2 = this.innerValue;
  23938. this.$nextTick(() => {
  23939. this.$emit("update:modelValue", value2);
  23940. this.changeFromInner = true;
  23941. this.$emit("change", value2);
  23942. uni.$u.formValidate(this, "change");
  23943. });
  23944. },
  23945. onConfirm(e) {
  23946. this.$emit("confirm", e);
  23947. },
  23948. onKeyboardheightchange(e) {
  23949. this.$emit("keyboardheightchange", e);
  23950. }
  23951. }
  23952. };
  23953. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  23954. return vue.openBlock(), vue.createElementBlock(
  23955. "view",
  23956. {
  23957. class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
  23958. style: vue.normalizeStyle([$options.textareaStyle])
  23959. },
  23960. [
  23961. vue.createElementVNode("textarea", {
  23962. class: "u-textarea__field",
  23963. value: $data.innerValue,
  23964. style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
  23965. placeholder: _ctx.placeholder,
  23966. "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
  23967. "placeholder-class": _ctx.placeholderClass,
  23968. disabled: _ctx.disabled,
  23969. focus: _ctx.focus,
  23970. autoHeight: _ctx.autoHeight,
  23971. fixed: _ctx.fixed,
  23972. cursorSpacing: _ctx.cursorSpacing,
  23973. cursor: _ctx.cursor,
  23974. showConfirmBar: _ctx.showConfirmBar,
  23975. selectionStart: _ctx.selectionStart,
  23976. selectionEnd: _ctx.selectionEnd,
  23977. adjustPosition: _ctx.adjustPosition,
  23978. disableDefaultPadding: _ctx.disableDefaultPadding,
  23979. holdKeyboard: _ctx.holdKeyboard,
  23980. maxlength: _ctx.maxlength,
  23981. "confirm-type": _ctx.confirmType,
  23982. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  23983. onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
  23984. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  23985. onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
  23986. onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
  23987. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  23988. onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
  23989. }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
  23990. _ctx.count ? (vue.openBlock(), vue.createElementBlock(
  23991. "text",
  23992. {
  23993. key: 0,
  23994. class: "u-textarea__count",
  23995. style: vue.normalizeStyle({
  23996. "background-color": _ctx.disabled ? "transparent" : "#fff"
  23997. })
  23998. },
  23999. vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
  24000. 5
  24001. /* TEXT, STYLE */
  24002. )) : vue.createCommentVNode("v-if", true)
  24003. ],
  24004. 6
  24005. /* CLASS, STYLE */
  24006. );
  24007. }
  24008. const uvTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-b6c174a6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]);
  24009. const _sfc_main$1m = {
  24010. name: "u--textarea",
  24011. mixins: [mpMixin, props$e, mixin],
  24012. components: {
  24013. uvTextarea
  24014. }
  24015. };
  24016. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  24017. const _component_uvTextarea = vue.resolveComponent("uvTextarea");
  24018. return vue.openBlock(), vue.createBlock(_component_uvTextarea, {
  24019. value: _ctx.value,
  24020. modelValue: _ctx.modelValue,
  24021. placeholder: _ctx.placeholder,
  24022. height: _ctx.height,
  24023. confirmType: _ctx.confirmType,
  24024. disabled: _ctx.disabled,
  24025. count: _ctx.count,
  24026. focus: _ctx.focus,
  24027. autoHeight: _ctx.autoHeight,
  24028. fixed: _ctx.fixed,
  24029. cursorSpacing: _ctx.cursorSpacing,
  24030. cursor: _ctx.cursor,
  24031. showConfirmBar: _ctx.showConfirmBar,
  24032. selectionStart: _ctx.selectionStart,
  24033. selectionEnd: _ctx.selectionEnd,
  24034. adjustPosition: _ctx.adjustPosition,
  24035. disableDefaultPadding: _ctx.disableDefaultPadding,
  24036. holdKeyboard: _ctx.holdKeyboard,
  24037. maxlength: _ctx.maxlength,
  24038. border: _ctx.border,
  24039. customStyle: _ctx.customStyle,
  24040. formatter: _ctx.formatter,
  24041. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  24042. onInput: _cache[0] || (_cache[0] = (e) => _ctx.$emit("input", e)),
  24043. "onUpdate:modelValue": _cache[1] || (_cache[1] = (e) => _ctx.$emit("update:modelValue", e))
  24044. }, null, 8, ["value", "modelValue", "placeholder", "height", "confirmType", "disabled", "count", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "border", "customStyle", "formatter", "ignoreCompositionEvent"]);
  24045. }
  24046. const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u--textarea/u--textarea.vue"]]);
  24047. const props$d = {
  24048. props: {
  24049. // radio的名称
  24050. name: {
  24051. type: [String, Number, Boolean],
  24052. default: props$y.radio.name
  24053. },
  24054. // 形状,square为方形,circle为圆型
  24055. shape: {
  24056. type: String,
  24057. default: props$y.radio.shape
  24058. },
  24059. // 是否禁用
  24060. disabled: {
  24061. type: [String, Boolean],
  24062. default: props$y.radio.disabled
  24063. },
  24064. // 是否禁止点击提示语选中单选框
  24065. labelDisabled: {
  24066. type: [String, Boolean],
  24067. default: props$y.radio.labelDisabled
  24068. },
  24069. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  24070. activeColor: {
  24071. type: String,
  24072. default: props$y.radio.activeColor
  24073. },
  24074. // 未选中的颜色
  24075. inactiveColor: {
  24076. type: String,
  24077. default: props$y.radio.inactiveColor
  24078. },
  24079. // 图标的大小,单位px
  24080. iconSize: {
  24081. type: [String, Number],
  24082. default: props$y.radio.iconSize
  24083. },
  24084. // label的字体大小,px单位
  24085. labelSize: {
  24086. type: [String, Number],
  24087. default: props$y.radio.labelSize
  24088. },
  24089. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  24090. label: {
  24091. type: [String, Number],
  24092. default: props$y.radio.label
  24093. },
  24094. // 整体的大小
  24095. size: {
  24096. type: [String, Number],
  24097. default: props$y.radio.size
  24098. },
  24099. // 图标颜色
  24100. color: {
  24101. type: String,
  24102. default: props$y.radio.color
  24103. },
  24104. // label的颜色
  24105. labelColor: {
  24106. type: String,
  24107. default: props$y.radio.labelColor
  24108. },
  24109. // 图标颜色
  24110. iconColor: {
  24111. type: String,
  24112. default: props$y.radio.iconColor
  24113. }
  24114. }
  24115. };
  24116. const _sfc_main$1l = {
  24117. name: "u-radio",
  24118. mixins: [mpMixin, mixin, props$d],
  24119. data() {
  24120. return {
  24121. checked: false,
  24122. // 当你看到这段代码的时候,
  24123. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  24124. // 故只能使用如此方法
  24125. parentData: {
  24126. iconSize: 12,
  24127. labelDisabled: null,
  24128. disabled: null,
  24129. shape: null,
  24130. activeColor: null,
  24131. inactiveColor: null,
  24132. size: 18,
  24133. value: null,
  24134. modelValue: null,
  24135. iconColor: null,
  24136. placement: "row",
  24137. borderBottom: false,
  24138. iconPlacement: "left"
  24139. }
  24140. };
  24141. },
  24142. computed: {
  24143. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  24144. elDisabled() {
  24145. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  24146. },
  24147. // 是否禁用label点击
  24148. elLabelDisabled() {
  24149. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  24150. },
  24151. // 组件尺寸,对应size的值,默认值为21px
  24152. elSize() {
  24153. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  24154. },
  24155. // 组件的勾选图标的尺寸,默认12px
  24156. elIconSize() {
  24157. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  24158. },
  24159. // 组件选中激活时的颜色
  24160. elActiveColor() {
  24161. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  24162. },
  24163. // 组件选未中激活时的颜色
  24164. elInactiveColor() {
  24165. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  24166. },
  24167. // label的颜色
  24168. elLabelColor() {
  24169. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  24170. },
  24171. // 组件的形状
  24172. elShape() {
  24173. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  24174. },
  24175. // label大小
  24176. elLabelSize() {
  24177. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  24178. },
  24179. elIconColor() {
  24180. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  24181. if (this.elDisabled) {
  24182. return this.checked ? this.elInactiveColor : "transparent";
  24183. } else {
  24184. return this.checked ? iconColor : "transparent";
  24185. }
  24186. },
  24187. iconClasses() {
  24188. let classes = [];
  24189. classes.push("u-radio__icon-wrap--" + this.elShape);
  24190. if (this.elDisabled) {
  24191. classes.push("u-radio__icon-wrap--disabled");
  24192. }
  24193. if (this.checked && this.elDisabled) {
  24194. classes.push("u-radio__icon-wrap--disabled--checked");
  24195. }
  24196. return classes;
  24197. },
  24198. iconWrapStyle() {
  24199. const style = {};
  24200. style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  24201. style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  24202. style.width = uni.$u.addUnit(this.elSize);
  24203. style.height = uni.$u.addUnit(this.elSize);
  24204. if (this.parentData.iconPlacement === "right") {
  24205. style.marginRight = 0;
  24206. }
  24207. return style;
  24208. },
  24209. radioStyle() {
  24210. const style = {};
  24211. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  24212. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
  24213. }
  24214. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  24215. style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
  24216. }
  24217. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  24218. }
  24219. },
  24220. mounted() {
  24221. this.init();
  24222. },
  24223. methods: {
  24224. init() {
  24225. this.updateParentData();
  24226. if (!this.parent) {
  24227. uni.$u.error("u-radio必须搭配u-radio-group组件使用");
  24228. }
  24229. this.checked = this.name === this.parentData.modelValue;
  24230. },
  24231. updateParentData() {
  24232. this.getParentData("u-radio-group");
  24233. },
  24234. // 点击图标
  24235. iconClickHandler(e) {
  24236. this.preventEvent(e);
  24237. if (!this.elDisabled) {
  24238. this.setRadioCheckedStatus();
  24239. }
  24240. },
  24241. // 横向两端排列时,点击组件即可触发选中事件
  24242. wrapperClickHandler(e) {
  24243. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  24244. },
  24245. // 点击label
  24246. labelClickHandler(e) {
  24247. this.preventEvent(e);
  24248. if (!this.elLabelDisabled && !this.elDisabled) {
  24249. this.setRadioCheckedStatus();
  24250. }
  24251. },
  24252. emitEvent() {
  24253. if (!this.checked) {
  24254. this.$emit("change", this.name);
  24255. this.$nextTick(() => {
  24256. uni.$u.formValidate(this, "change");
  24257. });
  24258. }
  24259. },
  24260. // 改变组件选中状态
  24261. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
  24262. // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  24263. setRadioCheckedStatus() {
  24264. this.emitEvent();
  24265. this.checked = true;
  24266. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  24267. }
  24268. }
  24269. };
  24270. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  24271. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  24272. return vue.openBlock(), vue.createElementBlock(
  24273. "view",
  24274. {
  24275. class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  24276. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
  24277. style: vue.normalizeStyle([$options.radioStyle])
  24278. },
  24279. [
  24280. vue.createElementVNode(
  24281. "view",
  24282. {
  24283. class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
  24284. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  24285. style: vue.normalizeStyle([$options.iconWrapStyle])
  24286. },
  24287. [
  24288. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  24289. vue.createVNode(_component_u_icon, {
  24290. class: "u-radio__icon-wrap__icon",
  24291. name: "checkbox-mark",
  24292. size: $options.elIconSize,
  24293. color: $options.elIconColor
  24294. }, null, 8, ["size", "color"])
  24295. ], true)
  24296. ],
  24297. 6
  24298. /* CLASS, STYLE */
  24299. ),
  24300. vue.createElementVNode(
  24301. "text",
  24302. {
  24303. class: "u-radio__text",
  24304. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  24305. style: vue.normalizeStyle({
  24306. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  24307. fontSize: $options.elLabelSize,
  24308. lineHeight: $options.elLabelSize
  24309. })
  24310. },
  24311. vue.toDisplayString(_ctx.label),
  24312. 5
  24313. /* TEXT, STYLE */
  24314. )
  24315. ],
  24316. 6
  24317. /* CLASS, STYLE */
  24318. );
  24319. }
  24320. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-83036558"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]);
  24321. const props$c = {
  24322. props: {
  24323. // 绑定的值
  24324. modelValue: {
  24325. type: [String, Number, Boolean],
  24326. default: props$y.radioGroup.value
  24327. },
  24328. // 是否禁用全部radio
  24329. disabled: {
  24330. type: Boolean,
  24331. default: props$y.radioGroup.disabled
  24332. },
  24333. // 形状,circle-圆形,square-方形
  24334. shape: {
  24335. type: String,
  24336. default: props$y.radioGroup.shape
  24337. },
  24338. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  24339. activeColor: {
  24340. type: String,
  24341. default: props$y.radioGroup.activeColor
  24342. },
  24343. // 未选中的颜色
  24344. inactiveColor: {
  24345. type: String,
  24346. default: props$y.radioGroup.inactiveColor
  24347. },
  24348. // 标识符
  24349. name: {
  24350. type: String,
  24351. default: props$y.radioGroup.name
  24352. },
  24353. // 整个组件的尺寸,默认px
  24354. size: {
  24355. type: [String, Number],
  24356. default: props$y.radioGroup.size
  24357. },
  24358. // 布局方式,row-横向,column-纵向
  24359. placement: {
  24360. type: String,
  24361. default: props$y.radioGroup.placement
  24362. },
  24363. // label的文本
  24364. label: {
  24365. type: [String],
  24366. default: props$y.radioGroup.label
  24367. },
  24368. // label的颜色 (默认 '#303133' )
  24369. labelColor: {
  24370. type: [String],
  24371. default: props$y.radioGroup.labelColor
  24372. },
  24373. // label的字体大小,px单位
  24374. labelSize: {
  24375. type: [String, Number],
  24376. default: props$y.radioGroup.labelSize
  24377. },
  24378. // 是否禁止点击文本操作checkbox(默认 false )
  24379. labelDisabled: {
  24380. type: Boolean,
  24381. default: props$y.radioGroup.labelDisabled
  24382. },
  24383. // 图标颜色
  24384. iconColor: {
  24385. type: String,
  24386. default: props$y.radioGroup.iconColor
  24387. },
  24388. // 图标的大小,单位px
  24389. iconSize: {
  24390. type: [String, Number],
  24391. default: props$y.radioGroup.iconSize
  24392. },
  24393. // 竖向配列时,是否显示下划线
  24394. borderBottom: {
  24395. type: Boolean,
  24396. default: props$y.radioGroup.borderBottom
  24397. },
  24398. // 图标与文字的对齐方式
  24399. iconPlacement: {
  24400. type: String,
  24401. default: props$y.radio.iconPlacement
  24402. }
  24403. }
  24404. };
  24405. const _sfc_main$1k = {
  24406. name: "u-radio-group",
  24407. mixins: [mpMixin, mixin, props$c],
  24408. computed: {
  24409. // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  24410. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
  24411. // 拉取父组件新的变化后的参数
  24412. parentData() {
  24413. return [
  24414. this.modelValue,
  24415. this.disabled,
  24416. this.inactiveColor,
  24417. this.activeColor,
  24418. this.size,
  24419. this.labelDisabled,
  24420. this.shape,
  24421. this.iconSize,
  24422. this.borderBottom,
  24423. this.placement
  24424. ];
  24425. },
  24426. bemClass() {
  24427. return this.bem("radio-group", ["placement"]);
  24428. }
  24429. },
  24430. watch: {
  24431. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  24432. parentData() {
  24433. if (this.children.length) {
  24434. this.children.map((child) => {
  24435. typeof child.init === "function" && child.init();
  24436. });
  24437. }
  24438. }
  24439. },
  24440. data() {
  24441. return {};
  24442. },
  24443. created() {
  24444. this.children = [];
  24445. },
  24446. emits: ["update:modelValue", "change"],
  24447. methods: {
  24448. // 将其他的radio设置为未选中的状态
  24449. unCheckedOther(childInstance) {
  24450. this.children.map((child) => {
  24451. if (childInstance !== child) {
  24452. child.checked = false;
  24453. }
  24454. });
  24455. const {
  24456. name
  24457. } = childInstance;
  24458. this.$emit("update:modelValue", name);
  24459. this.$emit("change", name);
  24460. }
  24461. }
  24462. };
  24463. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  24464. return vue.openBlock(), vue.createElementBlock(
  24465. "view",
  24466. {
  24467. class: vue.normalizeClass(["u-radio-group", $options.bemClass])
  24468. },
  24469. [
  24470. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24471. ],
  24472. 2
  24473. /* CLASS */
  24474. );
  24475. }
  24476. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-cbc8bf70"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]);
  24477. function pickExclude(obj, keys) {
  24478. if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
  24479. return {};
  24480. }
  24481. return Object.keys(obj).reduce((prev, key) => {
  24482. if (!keys.includes(key)) {
  24483. prev[key] = obj[key];
  24484. }
  24485. return prev;
  24486. }, {});
  24487. }
  24488. function formatImage(res) {
  24489. return res.tempFiles.map((item) => ({
  24490. ...pickExclude(item, ["path"]),
  24491. type: "image",
  24492. url: item.path,
  24493. thumb: item.path,
  24494. size: item.size
  24495. }));
  24496. }
  24497. function formatVideo(res) {
  24498. return [
  24499. {
  24500. ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
  24501. type: "video",
  24502. url: res.tempFilePath,
  24503. thumb: res.thumbTempFilePath,
  24504. size: res.size
  24505. }
  24506. ];
  24507. }
  24508. function chooseFile({
  24509. accept,
  24510. multiple,
  24511. capture,
  24512. compressed,
  24513. maxDuration,
  24514. sizeType,
  24515. camera,
  24516. maxCount
  24517. }) {
  24518. return new Promise((resolve, reject2) => {
  24519. switch (accept) {
  24520. case "image":
  24521. uni.chooseImage({
  24522. count: multiple ? Math.min(maxCount, 9) : 1,
  24523. sourceType: capture,
  24524. sizeType,
  24525. success: (res) => resolve(formatImage(res)),
  24526. fail: reject2
  24527. });
  24528. break;
  24529. case "video":
  24530. uni.chooseVideo({
  24531. sourceType: capture,
  24532. compressed,
  24533. maxDuration,
  24534. camera,
  24535. success: (res) => resolve(formatVideo(res)),
  24536. fail: reject2
  24537. });
  24538. break;
  24539. }
  24540. });
  24541. }
  24542. const mixinUp = {
  24543. watch: {
  24544. // 监听accept的变化,判断是否符合个平台要求
  24545. // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
  24546. accept: {
  24547. immediate: true,
  24548. handler(val) {
  24549. if (val === "all" || val === "media") {
  24550. uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
  24551. }
  24552. if (val === "file") {
  24553. uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
  24554. }
  24555. }
  24556. }
  24557. }
  24558. };
  24559. const props$b = {
  24560. props: {
  24561. // 接受的文件类型, 可选值为all media image file video
  24562. accept: {
  24563. type: String,
  24564. default: props$y.upload.accept
  24565. },
  24566. // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
  24567. capture: {
  24568. type: [String, Array],
  24569. default: props$y.upload.capture
  24570. },
  24571. // 当accept为video时生效,是否压缩视频,默认为true
  24572. compressed: {
  24573. type: Boolean,
  24574. default: props$y.upload.compressed
  24575. },
  24576. // 当accept为video时生效,可选值为back或front
  24577. camera: {
  24578. type: String,
  24579. default: props$y.upload.camera
  24580. },
  24581. // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
  24582. maxDuration: {
  24583. type: Number,
  24584. default: props$y.upload.maxDuration
  24585. },
  24586. // 上传区域的图标,只能内置图标
  24587. uploadIcon: {
  24588. type: String,
  24589. default: props$y.upload.uploadIcon
  24590. },
  24591. // 上传区域的图标的颜色,默认
  24592. uploadIconColor: {
  24593. type: String,
  24594. default: props$y.upload.uploadIconColor
  24595. },
  24596. // 是否开启文件读取前事件
  24597. useBeforeRead: {
  24598. type: Boolean,
  24599. default: props$y.upload.useBeforeRead
  24600. },
  24601. // 读取后的处理函数
  24602. afterRead: {
  24603. type: Function,
  24604. default: null
  24605. },
  24606. // 读取前的处理函数
  24607. beforeRead: {
  24608. type: Function,
  24609. default: null
  24610. },
  24611. // 是否显示组件自带的图片预览功能
  24612. previewFullImage: {
  24613. type: Boolean,
  24614. default: props$y.upload.previewFullImage
  24615. },
  24616. // 最大上传数量
  24617. maxCount: {
  24618. type: [String, Number],
  24619. default: props$y.upload.maxCount
  24620. },
  24621. // 是否启用
  24622. disabled: {
  24623. type: Boolean,
  24624. default: props$y.upload.disabled
  24625. },
  24626. // 预览上传的图片时的裁剪模式,和image组件mode属性一致
  24627. imageMode: {
  24628. type: String,
  24629. default: props$y.upload.imageMode
  24630. },
  24631. // 标识符,可以在回调函数的第二项参数中获取
  24632. name: {
  24633. type: String,
  24634. default: props$y.upload.name
  24635. },
  24636. // 所选的图片的尺寸, 可选值为original compressed
  24637. sizeType: {
  24638. type: Array,
  24639. default: props$y.upload.sizeType
  24640. },
  24641. // 是否开启图片多选,部分安卓机型不支持
  24642. multiple: {
  24643. type: Boolean,
  24644. default: props$y.upload.multiple
  24645. },
  24646. // 是否展示删除按钮
  24647. deletable: {
  24648. type: Boolean,
  24649. default: props$y.upload.deletable
  24650. },
  24651. // 文件大小限制,单位为byte
  24652. maxSize: {
  24653. type: [String, Number],
  24654. default: props$y.upload.maxSize
  24655. },
  24656. // 显示已上传的文件列表
  24657. fileList: {
  24658. type: Array,
  24659. default: props$y.upload.fileList
  24660. },
  24661. // 上传区域的提示文字
  24662. uploadText: {
  24663. type: String,
  24664. default: props$y.upload.uploadText
  24665. },
  24666. // 内部预览图片区域和选择图片按钮的区域宽度
  24667. width: {
  24668. type: [String, Number],
  24669. default: props$y.upload.width
  24670. },
  24671. // 内部预览图片区域和选择图片按钮的区域高度
  24672. height: {
  24673. type: [String, Number],
  24674. default: props$y.upload.height
  24675. },
  24676. // 是否在上传完成后展示预览图
  24677. previewImage: {
  24678. type: Boolean,
  24679. default: props$y.upload.previewImage
  24680. }
  24681. }
  24682. };
  24683. const _sfc_main$1j = {
  24684. name: "u-upload",
  24685. mixins: [mpMixin, mixin, mixinUp, props$b],
  24686. data() {
  24687. return {
  24688. lists: [],
  24689. isInCount: true
  24690. };
  24691. },
  24692. watch: {
  24693. // 监听文件列表的变化,重新整理内部数据
  24694. fileList: {
  24695. immediate: true,
  24696. handler() {
  24697. this.formatFileList();
  24698. },
  24699. immediate: true,
  24700. deep: true
  24701. }
  24702. },
  24703. emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
  24704. methods: {
  24705. formatFileList() {
  24706. const {
  24707. fileList = [],
  24708. maxCount
  24709. } = this;
  24710. const lists = fileList.map(
  24711. (item) => Object.assign(Object.assign({}, item), {
  24712. // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
  24713. isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
  24714. isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
  24715. deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
  24716. })
  24717. );
  24718. this.lists = lists;
  24719. this.isInCount = lists.length < maxCount;
  24720. },
  24721. chooseFile() {
  24722. const {
  24723. maxCount,
  24724. multiple,
  24725. lists,
  24726. disabled
  24727. } = this;
  24728. if (disabled)
  24729. return;
  24730. let capture;
  24731. try {
  24732. capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
  24733. } catch (e) {
  24734. capture = [];
  24735. }
  24736. chooseFile(
  24737. Object.assign({
  24738. accept: this.accept,
  24739. multiple: this.multiple,
  24740. capture,
  24741. compressed: this.compressed,
  24742. maxDuration: this.maxDuration,
  24743. sizeType: this.sizeType,
  24744. camera: this.camera
  24745. }, {
  24746. maxCount: maxCount - lists.length
  24747. })
  24748. ).then((res) => {
  24749. this.onBeforeRead(multiple ? res : res[0]);
  24750. }).catch((error2) => {
  24751. this.$emit("error", error2);
  24752. });
  24753. },
  24754. // 文件读取之前
  24755. onBeforeRead(file) {
  24756. const {
  24757. beforeRead,
  24758. useBeforeRead
  24759. } = this;
  24760. let res = true;
  24761. if (uni.$u.test.func(beforeRead)) {
  24762. res = beforeRead(file, this.getDetail());
  24763. }
  24764. if (useBeforeRead) {
  24765. res = new Promise((resolve, reject2) => {
  24766. this.$emit(
  24767. "beforeRead",
  24768. Object.assign(Object.assign({
  24769. file
  24770. }, this.getDetail()), {
  24771. callback: (ok) => {
  24772. ok ? resolve() : reject2();
  24773. }
  24774. })
  24775. );
  24776. });
  24777. }
  24778. if (!res) {
  24779. return;
  24780. }
  24781. if (uni.$u.test.promise(res)) {
  24782. res.then((data) => this.onAfterRead(data || file));
  24783. } else {
  24784. this.onAfterRead(file);
  24785. }
  24786. },
  24787. getDetail(index2) {
  24788. return {
  24789. name: this.name,
  24790. index: index2 == null ? this.fileList.length : index2
  24791. };
  24792. },
  24793. onAfterRead(file) {
  24794. const {
  24795. maxSize,
  24796. afterRead
  24797. } = this;
  24798. const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
  24799. if (oversize) {
  24800. this.$emit("oversize", Object.assign({
  24801. file
  24802. }, this.getDetail()));
  24803. return;
  24804. }
  24805. if (typeof afterRead === "function") {
  24806. afterRead(file, this.getDetail());
  24807. }
  24808. this.$emit("afterRead", Object.assign({
  24809. file
  24810. }, this.getDetail()));
  24811. },
  24812. deleteItem(index2) {
  24813. this.$emit(
  24814. "delete",
  24815. Object.assign(Object.assign({}, this.getDetail(index2)), {
  24816. file: this.fileList[index2]
  24817. })
  24818. );
  24819. },
  24820. // 预览图片
  24821. onPreviewImage(item) {
  24822. if (!item.isImage || !this.previewFullImage)
  24823. return;
  24824. uni.previewImage({
  24825. // 先filter找出为图片的item,再返回filter结果中的图片url
  24826. urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
  24827. current: item.url || item.thumb,
  24828. fail() {
  24829. uni.$u.toast("预览图片失败");
  24830. }
  24831. });
  24832. },
  24833. onPreviewVideo(event) {
  24834. if (!this.data.previewFullImage)
  24835. return;
  24836. const {
  24837. index: index2
  24838. } = event.currentTarget.dataset;
  24839. const {
  24840. lists
  24841. } = this.data;
  24842. wx.previewMedia({
  24843. sources: lists.filter((item) => isVideoFile(item)).map(
  24844. (item) => Object.assign(Object.assign({}, item), {
  24845. type: "video"
  24846. })
  24847. ),
  24848. current: index2,
  24849. fail() {
  24850. uni.$u.toast("预览视频失败");
  24851. }
  24852. });
  24853. },
  24854. onClickPreview(event) {
  24855. const {
  24856. index: index2
  24857. } = event.currentTarget.dataset;
  24858. const item = this.data.lists[index2];
  24859. this.$emit(
  24860. "clickPreview",
  24861. Object.assign(Object.assign({}, item), this.getDetail(index2))
  24862. );
  24863. }
  24864. }
  24865. };
  24866. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  24867. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  24868. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
  24869. return vue.openBlock(), vue.createElementBlock(
  24870. "view",
  24871. {
  24872. class: "u-upload",
  24873. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
  24874. },
  24875. [
  24876. vue.createElementVNode("view", { class: "u-upload__wrap" }, [
  24877. _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
  24878. vue.Fragment,
  24879. { key: 0 },
  24880. vue.renderList($data.lists, (item, index2) => {
  24881. return vue.openBlock(), vue.createElementBlock("view", {
  24882. class: "u-upload__wrap__preview",
  24883. key: index2
  24884. }, [
  24885. item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  24886. key: 0,
  24887. src: item.thumb || item.url,
  24888. mode: _ctx.imageMode,
  24889. class: "u-upload__wrap__preview__image",
  24890. onClick: ($event) => $options.onPreviewImage(item),
  24891. style: vue.normalizeStyle([{
  24892. width: _ctx.$u.addUnit(_ctx.width),
  24893. height: _ctx.$u.addUnit(_ctx.height)
  24894. }])
  24895. }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
  24896. key: 1,
  24897. class: "u-upload__wrap__preview__other"
  24898. }, [
  24899. vue.createVNode(_component_u_icon, {
  24900. color: "#80CBF9",
  24901. size: "26",
  24902. name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
  24903. }, null, 8, ["name"]),
  24904. vue.createElementVNode(
  24905. "text",
  24906. { class: "u-upload__wrap__preview__other__text" },
  24907. vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
  24908. 1
  24909. /* TEXT */
  24910. )
  24911. ])),
  24912. item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
  24913. key: 2,
  24914. class: "u-upload__status"
  24915. }, [
  24916. vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
  24917. item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
  24918. key: 0,
  24919. name: "close-circle",
  24920. color: "#ffffff",
  24921. size: "25"
  24922. })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  24923. key: 1,
  24924. size: "22",
  24925. mode: "circle",
  24926. color: "#ffffff"
  24927. }))
  24928. ]),
  24929. item.message ? (vue.openBlock(), vue.createElementBlock(
  24930. "text",
  24931. {
  24932. key: 0,
  24933. class: "u-upload__status__message"
  24934. },
  24935. vue.toDisplayString(item.message),
  24936. 1
  24937. /* TEXT */
  24938. )) : vue.createCommentVNode("v-if", true)
  24939. ])) : vue.createCommentVNode("v-if", true),
  24940. item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
  24941. key: 3,
  24942. class: "u-upload__deletable",
  24943. onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
  24944. }, [
  24945. vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
  24946. vue.createVNode(_component_u_icon, {
  24947. name: "close",
  24948. color: "#ffffff",
  24949. size: "10"
  24950. })
  24951. ])
  24952. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  24953. item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  24954. key: 4,
  24955. class: "u-upload__success"
  24956. }, [
  24957. vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
  24958. vue.createVNode(_component_u_icon, {
  24959. name: "checkmark",
  24960. color: "#ffffff",
  24961. size: "12"
  24962. })
  24963. ])
  24964. ])) : vue.createCommentVNode("v-if", true)
  24965. ]);
  24966. }),
  24967. 128
  24968. /* KEYED_FRAGMENT */
  24969. )) : vue.createCommentVNode("v-if", true),
  24970. $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
  24971. vue.Fragment,
  24972. { key: 1 },
  24973. [
  24974. _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
  24975. key: 0,
  24976. onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
  24977. }, [
  24978. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  24979. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  24980. key: 1,
  24981. class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
  24982. "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
  24983. "hover-stay-time": "150",
  24984. onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
  24985. style: vue.normalizeStyle([{
  24986. width: _ctx.$u.addUnit(_ctx.width),
  24987. height: _ctx.$u.addUnit(_ctx.height)
  24988. }])
  24989. }, [
  24990. vue.createVNode(_component_u_icon, {
  24991. name: _ctx.uploadIcon,
  24992. size: "26",
  24993. color: _ctx.uploadIconColor
  24994. }, null, 8, ["name", "color"]),
  24995. _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
  24996. "text",
  24997. {
  24998. key: 0,
  24999. class: "u-upload__button__text"
  25000. },
  25001. vue.toDisplayString(_ctx.uploadText),
  25002. 1
  25003. /* TEXT */
  25004. )) : vue.createCommentVNode("v-if", true)
  25005. ], 14, ["hover-class"]))
  25006. ],
  25007. 64
  25008. /* STABLE_FRAGMENT */
  25009. )) : vue.createCommentVNode("v-if", true)
  25010. ])
  25011. ],
  25012. 4
  25013. /* STYLE */
  25014. );
  25015. }
  25016. const __easycom_6 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-c8491d64"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]);
  25017. const _sfc_main$1i = {
  25018. data() {
  25019. return {
  25020. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  25021. orderKey: null,
  25022. patient: null,
  25023. durations: [
  25024. {
  25025. name: "一周内",
  25026. disabled: false
  25027. },
  25028. {
  25029. name: "一个月内",
  25030. disabled: false
  25031. },
  25032. {
  25033. name: "半年内",
  25034. disabled: false
  25035. },
  25036. {
  25037. name: "半年以上",
  25038. disabled: false
  25039. }
  25040. ],
  25041. isVisits: [
  25042. {
  25043. name: "未就诊",
  25044. disabled: false
  25045. },
  25046. {
  25047. name: "就诊过",
  25048. disabled: false
  25049. }
  25050. ],
  25051. title: "",
  25052. isVisit: "就诊过",
  25053. duration: "一周内",
  25054. inquiryType: null,
  25055. orderType: null,
  25056. doctorId: null,
  25057. fileList1: []
  25058. };
  25059. },
  25060. onLoad(options) {
  25061. this.inquiryType = options.inquiryType;
  25062. this.orderType = options.orderType;
  25063. this.doctorId = options.doctorId;
  25064. formatAppLog("log", "at pages_order/inquiryForm1.vue:147", this.inquiryType);
  25065. formatAppLog("log", "at pages_order/inquiryForm1.vue:148", this.orderType);
  25066. formatAppLog("log", "at pages_order/inquiryForm1.vue:149", this.doctorId);
  25067. this.confirm();
  25068. },
  25069. onShow() {
  25070. var that = this;
  25071. uni.$on("refreshOrderPatient", (res) => {
  25072. that.patient = res;
  25073. });
  25074. },
  25075. methods: {
  25076. leftClick() {
  25077. formatAppLog("log", "at pages_order/inquiryForm1.vue:160", "leftClick");
  25078. uni.showModal({
  25079. title: "提示",
  25080. content: "确认关闭吗",
  25081. success: function(res) {
  25082. if (res.confirm) {
  25083. uni.navigateBack();
  25084. } else if (res.cancel)
  25085. ;
  25086. }
  25087. });
  25088. },
  25089. submitOrder() {
  25090. if (this.patient == null) {
  25091. uni.showToast({
  25092. icon: "none",
  25093. title: "请选择就诊人"
  25094. });
  25095. return;
  25096. }
  25097. if (this.orderKey == null) {
  25098. this.confirm();
  25099. }
  25100. var images = [];
  25101. this.fileList1.forEach(function(element) {
  25102. images.push(element.url);
  25103. });
  25104. var data = {
  25105. orderKey: this.orderKey,
  25106. patientId: this.patient.patientId,
  25107. title: this.title,
  25108. isVisit: this.isVisit,
  25109. duration: this.duration,
  25110. inquiryType: this.inquiryType,
  25111. orderType: this.orderType,
  25112. doctorId: this.doctorId,
  25113. reportImages: images.toString()
  25114. };
  25115. uni.showLoading({
  25116. title: "正在处理中..."
  25117. });
  25118. create(data).then(
  25119. (res) => {
  25120. uni.hideLoading();
  25121. if (res.code == 200) {
  25122. var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
  25123. uni.requestSubscribeMessage({
  25124. tmplIds: temps,
  25125. success(e) {
  25126. setTimeout(function() {
  25127. uni.redirectTo({
  25128. url: "./inquiryPay?orderId=" + res.order.orderId
  25129. });
  25130. }, 200);
  25131. },
  25132. fail(e) {
  25133. setTimeout(function() {
  25134. uni.redirectTo({
  25135. url: "./inquiryPay?orderId=" + res.order.orderId
  25136. });
  25137. }, 200);
  25138. }
  25139. });
  25140. return;
  25141. } else {
  25142. uni.showToast({
  25143. icon: "none",
  25144. title: res.msg
  25145. });
  25146. }
  25147. },
  25148. (rej) => {
  25149. }
  25150. );
  25151. },
  25152. confirm() {
  25153. let data = {};
  25154. confirm(data).then(
  25155. (res) => {
  25156. if (res.code == 200) {
  25157. this.orderKey = res.orderKey;
  25158. }
  25159. },
  25160. (rej) => {
  25161. }
  25162. );
  25163. },
  25164. addPatient() {
  25165. uni.navigateTo({
  25166. url: "/pages_user/patient"
  25167. });
  25168. },
  25169. deletePic(event) {
  25170. this[`fileList${event.name}`].splice(event.index, 1);
  25171. },
  25172. async afterRead(event) {
  25173. let lists = [].concat(event.file);
  25174. let fileListLen = this[`fileList${event.name}`].length;
  25175. lists.map((item) => {
  25176. this[`fileList${event.name}`].push({
  25177. ...item,
  25178. status: "uploading",
  25179. message: "上传中"
  25180. });
  25181. });
  25182. for (let i = 0; i < lists.length; i++) {
  25183. const result = await this.uploadFilePromise(lists[i].url);
  25184. let item = this[`fileList${event.name}`][fileListLen];
  25185. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  25186. status: "success",
  25187. message: "",
  25188. url: result
  25189. }));
  25190. fileListLen++;
  25191. }
  25192. },
  25193. uploadFilePromise(url2) {
  25194. return new Promise((resolve, reject2) => {
  25195. uni.uploadFile({
  25196. url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
  25197. // 仅为示例,非真实的接口地址
  25198. filePath: url2,
  25199. name: "file",
  25200. formData: {
  25201. user: "test"
  25202. },
  25203. success: (res) => {
  25204. setTimeout(() => {
  25205. formatAppLog("log", "at pages_order/inquiryForm1.vue:288", JSON.parse(res.data).url);
  25206. resolve(JSON.parse(res.data).url);
  25207. }, 1e3);
  25208. }
  25209. });
  25210. });
  25211. }
  25212. }
  25213. };
  25214. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  25215. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
  25216. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  25217. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  25218. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
  25219. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
  25220. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
  25221. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  25222. vue.createElementVNode("view", null, [
  25223. vue.createVNode(_component_u_navbar, {
  25224. title: "症状描述",
  25225. onLeftClick: $options.leftClick
  25226. }, null, 8, ["onLeftClick"])
  25227. ]),
  25228. vue.createElementVNode("view", { class: "main" }, [
  25229. vue.createElementVNode(
  25230. "view",
  25231. {
  25232. class: "status_bar",
  25233. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  25234. },
  25235. null,
  25236. 4
  25237. /* STYLE */
  25238. ),
  25239. vue.createVNode(_component_u_alert, {
  25240. fontSize: "16",
  25241. type: "primary",
  25242. description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
  25243. }),
  25244. vue.createElementVNode("view", { class: "chose-patient" }, [
  25245. $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
  25246. key: 0,
  25247. class: "title-box",
  25248. onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
  25249. }, [
  25250. vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
  25251. vue.createElementVNode("view", { class: "right" }, [
  25252. vue.createElementVNode("text", { class: "value" }, "请点击添加"),
  25253. vue.createElementVNode("image", {
  25254. src: "/static/images/arrow_gray.png",
  25255. mode: ""
  25256. })
  25257. ])
  25258. ])) : vue.createCommentVNode("v-if", true),
  25259. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  25260. key: 1,
  25261. class: "patient",
  25262. onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
  25263. }, [
  25264. vue.createElementVNode("view", { class: "left" }, [
  25265. vue.createElementVNode(
  25266. "view",
  25267. { class: "name" },
  25268. vue.toDisplayString($data.patient.patientName),
  25269. 1
  25270. /* TEXT */
  25271. ),
  25272. vue.createElementVNode("view", { class: "info" }, [
  25273. $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  25274. key: 0,
  25275. class: "text"
  25276. }, "男")) : vue.createCommentVNode("v-if", true),
  25277. $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  25278. key: 1,
  25279. class: "text"
  25280. }, "女")) : vue.createCommentVNode("v-if", true),
  25281. vue.createElementVNode(
  25282. "text",
  25283. { class: "text" },
  25284. vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
  25285. 1
  25286. /* TEXT */
  25287. ),
  25288. vue.createElementVNode(
  25289. "text",
  25290. { class: "text" },
  25291. vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
  25292. 1
  25293. /* TEXT */
  25294. )
  25295. ])
  25296. ]),
  25297. vue.createElementVNode("view", { class: "right" }, [
  25298. vue.createElementVNode("image", {
  25299. src: "/static/images/arrow_gray.png",
  25300. mode: ""
  25301. })
  25302. ])
  25303. ])) : vue.createCommentVNode("v-if", true)
  25304. ]),
  25305. vue.createElementVNode("view", { class: "cont" }, [
  25306. vue.createElementVNode("view", { class: "title-box" }, [
  25307. vue.createElementVNode("view", { class: "red-dot" }, "*"),
  25308. vue.createElementVNode("view", { class: "title" }, "请描述您的病情")
  25309. ]),
  25310. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  25311. vue.createVNode(_component_u__textarea, {
  25312. maxlength: "500",
  25313. modelValue: $data.title,
  25314. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.title = $event),
  25315. placeholder: "请输入内容",
  25316. count: ""
  25317. }, null, 8, ["modelValue"])
  25318. ]),
  25319. vue.createElementVNode("view", { class: "title-box" }, [
  25320. vue.createElementVNode("view", { class: "red-dot" }, "*"),
  25321. vue.createElementVNode("view", { class: "title" }, "本次患病多久了?")
  25322. ]),
  25323. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  25324. vue.createVNode(_component_u_radio_group, {
  25325. modelValue: $data.duration,
  25326. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.duration = $event),
  25327. iconPlacement: "left"
  25328. }, {
  25329. default: vue.withCtx(() => [
  25330. (vue.openBlock(true), vue.createElementBlock(
  25331. vue.Fragment,
  25332. null,
  25333. vue.renderList($data.durations, (item, index2) => {
  25334. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  25335. customStyle: { marginRight: "5px" },
  25336. key: index2,
  25337. label: item.name,
  25338. name: item.name,
  25339. activeColor: "#C39A58"
  25340. }, null, 8, ["label", "name"]);
  25341. }),
  25342. 128
  25343. /* KEYED_FRAGMENT */
  25344. ))
  25345. ]),
  25346. _: 1
  25347. /* STABLE */
  25348. }, 8, ["modelValue"])
  25349. ]),
  25350. vue.createElementVNode("view", { class: "title-box" }, [
  25351. vue.createElementVNode("view", { class: "red-dot" }, "*"),
  25352. vue.createElementVNode("view", { class: "title" }, "此次病情是否去医院就诊过?")
  25353. ]),
  25354. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  25355. vue.createVNode(_component_u_radio_group, {
  25356. modelValue: $data.isVisit,
  25357. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.isVisit = $event),
  25358. iconPlacement: "left"
  25359. }, {
  25360. default: vue.withCtx(() => [
  25361. (vue.openBlock(true), vue.createElementBlock(
  25362. vue.Fragment,
  25363. null,
  25364. vue.renderList($data.isVisits, (item, index2) => {
  25365. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  25366. customStyle: { marginRight: "5px" },
  25367. key: index2,
  25368. label: item.name,
  25369. name: item.name,
  25370. activeColor: "#C39A58"
  25371. }, null, 8, ["label", "name"]);
  25372. }),
  25373. 128
  25374. /* KEYED_FRAGMENT */
  25375. ))
  25376. ]),
  25377. _: 1
  25378. /* STABLE */
  25379. }, 8, ["modelValue"])
  25380. ]),
  25381. vue.createElementVNode("view", { class: "title-box" }, [
  25382. vue.createElementVNode("view", { class: "title" }, "上传检测报告或患处照片?")
  25383. ]),
  25384. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  25385. vue.createVNode(_component_u_upload, {
  25386. fileList: $data.fileList1,
  25387. onAfterRead: $options.afterRead,
  25388. onDelete: $options.deletePic,
  25389. name: "1",
  25390. maxCount: 5
  25391. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  25392. ])
  25393. ])
  25394. ]),
  25395. vue.createElementVNode("view", { class: "btn-box" }, [
  25396. vue.createElementVNode("view", {
  25397. class: "btn",
  25398. onClick: _cache[5] || (_cache[5] = ($event) => $options.submitOrder())
  25399. }, "提交订单")
  25400. ])
  25401. ]);
  25402. }
  25403. const Pages_orderInquiryForm1 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-83d3b7af"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm1.vue"]]);
  25404. const props$a = {
  25405. props: {
  25406. // 绑定的值
  25407. modelValue: {
  25408. type: [String, Number],
  25409. default: props$y.input.value
  25410. },
  25411. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  25412. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  25413. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  25414. // text-文本输入键盘
  25415. type: {
  25416. type: String,
  25417. default: props$y.input.type
  25418. },
  25419. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  25420. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  25421. fixed: {
  25422. type: Boolean,
  25423. default: props$y.input.fixed
  25424. },
  25425. // 是否禁用输入框
  25426. disabled: {
  25427. type: Boolean,
  25428. default: props$y.input.disabled
  25429. },
  25430. // 禁用状态时的背景色
  25431. disabledColor: {
  25432. type: String,
  25433. default: props$y.input.disabledColor
  25434. },
  25435. // 是否显示清除控件
  25436. clearable: {
  25437. type: Boolean,
  25438. default: props$y.input.clearable
  25439. },
  25440. // 是否密码类型
  25441. password: {
  25442. type: Boolean,
  25443. default: props$y.input.password
  25444. },
  25445. // 最大输入长度,设置为 -1 的时候不限制最大长度
  25446. maxlength: {
  25447. type: [String, Number],
  25448. default: props$y.input.maxlength
  25449. },
  25450. // 输入框为空时的占位符
  25451. placeholder: {
  25452. type: String,
  25453. default: props$y.input.placeholder
  25454. },
  25455. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  25456. placeholderClass: {
  25457. type: String,
  25458. default: props$y.input.placeholderClass
  25459. },
  25460. // 指定placeholder的样式
  25461. placeholderStyle: {
  25462. type: [String, Object],
  25463. default: props$y.input.placeholderStyle
  25464. },
  25465. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  25466. showWordLimit: {
  25467. type: Boolean,
  25468. default: props$y.input.showWordLimit
  25469. },
  25470. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  25471. // https://uniapp.dcloud.io/component/input
  25472. // https://uniapp.dcloud.io/component/textarea
  25473. confirmType: {
  25474. type: String,
  25475. default: props$y.input.confirmType
  25476. },
  25477. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  25478. confirmHold: {
  25479. type: Boolean,
  25480. default: props$y.input.confirmHold
  25481. },
  25482. // focus时,点击页面的时候不收起键盘,微信小程序有效
  25483. holdKeyboard: {
  25484. type: Boolean,
  25485. default: props$y.input.holdKeyboard
  25486. },
  25487. // 自动获取焦点
  25488. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  25489. focus: {
  25490. type: Boolean,
  25491. default: props$y.input.focus
  25492. },
  25493. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  25494. autoBlur: {
  25495. type: Boolean,
  25496. default: props$y.input.autoBlur
  25497. },
  25498. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  25499. disableDefaultPadding: {
  25500. type: Boolean,
  25501. default: props$y.input.disableDefaultPadding
  25502. },
  25503. // 指定focus时光标的位置
  25504. cursor: {
  25505. type: [String, Number],
  25506. default: props$y.input.cursor
  25507. },
  25508. // 输入框聚焦时底部与键盘的距离
  25509. cursorSpacing: {
  25510. type: [String, Number],
  25511. default: props$y.input.cursorSpacing
  25512. },
  25513. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  25514. selectionStart: {
  25515. type: [String, Number],
  25516. default: props$y.input.selectionStart
  25517. },
  25518. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  25519. selectionEnd: {
  25520. type: [String, Number],
  25521. default: props$y.input.selectionEnd
  25522. },
  25523. // 键盘弹起时,是否自动上推页面
  25524. adjustPosition: {
  25525. type: Boolean,
  25526. default: props$y.input.adjustPosition
  25527. },
  25528. // 输入框内容对齐方式,可选值为:left|center|right
  25529. inputAlign: {
  25530. type: String,
  25531. default: props$y.input.inputAlign
  25532. },
  25533. // 输入框字体的大小
  25534. fontSize: {
  25535. type: [String, Number],
  25536. default: props$y.input.fontSize
  25537. },
  25538. // 输入框字体颜色
  25539. color: {
  25540. type: String,
  25541. default: props$y.input.color
  25542. },
  25543. // 输入框前置图标
  25544. prefixIcon: {
  25545. type: String,
  25546. default: props$y.input.prefixIcon
  25547. },
  25548. // 前置图标样式,对象或字符串
  25549. prefixIconStyle: {
  25550. type: [String, Object],
  25551. default: props$y.input.prefixIconStyle
  25552. },
  25553. // 输入框后置图标
  25554. suffixIcon: {
  25555. type: String,
  25556. default: props$y.input.suffixIcon
  25557. },
  25558. // 后置图标样式,对象或字符串
  25559. suffixIconStyle: {
  25560. type: [String, Object],
  25561. default: props$y.input.suffixIconStyle
  25562. },
  25563. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  25564. border: {
  25565. type: String,
  25566. default: props$y.input.border
  25567. },
  25568. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  25569. readonly: {
  25570. type: Boolean,
  25571. default: props$y.input.readonly
  25572. },
  25573. // 输入框形状,circle-圆形,square-方形
  25574. shape: {
  25575. type: String,
  25576. default: props$y.input.shape
  25577. },
  25578. // 用于处理或者过滤输入框内容的方法
  25579. formatter: {
  25580. type: [Function, null],
  25581. default: props$y.input.formatter
  25582. },
  25583. // 是否忽略组件内对文本合成系统事件的处理
  25584. ignoreCompositionEvent: {
  25585. type: Boolean,
  25586. default: true
  25587. }
  25588. }
  25589. };
  25590. const _sfc_main$1h = {
  25591. name: "u-input",
  25592. mixins: [mpMixin, mixin, props$a],
  25593. data() {
  25594. return {
  25595. // 输入框的值
  25596. innerValue: "",
  25597. // 是否处于获得焦点状态
  25598. focused: false,
  25599. // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
  25600. firstChange: true,
  25601. // value绑定值的变化是由内部还是外部引起的
  25602. changeFromInner: false,
  25603. // 过滤处理方法
  25604. innerFormatter: (value2) => value2
  25605. };
  25606. },
  25607. watch: {
  25608. modelValue: {
  25609. immediate: true,
  25610. handler(newVal, oldVal) {
  25611. this.innerValue = newVal;
  25612. this.firstChange = false;
  25613. this.changeFromInner = false;
  25614. }
  25615. }
  25616. },
  25617. computed: {
  25618. // 是否显示清除控件
  25619. isShowClear() {
  25620. const { clearable, readonly, focused, innerValue } = this;
  25621. return !!clearable && !readonly && !!focused && innerValue !== "";
  25622. },
  25623. // 组件的类名
  25624. inputClass() {
  25625. let classes = [], { border, disabled, shape } = this;
  25626. border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
  25627. classes.push(`u-input--${shape}`);
  25628. border === "bottom" && (classes = classes.concat([
  25629. "u-border-bottom",
  25630. "u-input--no-radius"
  25631. ]));
  25632. return classes.join(" ");
  25633. },
  25634. // 组件的样式
  25635. wrapperStyle() {
  25636. const style = {};
  25637. if (this.disabled) {
  25638. style.backgroundColor = this.disabledColor;
  25639. }
  25640. if (this.border === "none") {
  25641. style.padding = "0";
  25642. } else {
  25643. style.paddingTop = "6px";
  25644. style.paddingBottom = "6px";
  25645. style.paddingLeft = "9px";
  25646. style.paddingRight = "9px";
  25647. }
  25648. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  25649. },
  25650. // 输入框的样式
  25651. inputStyle() {
  25652. const style = {
  25653. color: this.color,
  25654. fontSize: uni.$u.addUnit(this.fontSize),
  25655. textAlign: this.inputAlign
  25656. };
  25657. return style;
  25658. }
  25659. },
  25660. emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
  25661. methods: {
  25662. // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
  25663. setFormatter(e) {
  25664. this.innerFormatter = e;
  25665. },
  25666. // 当键盘输入时,触发input事件
  25667. onInput(e) {
  25668. let { value: value2 = "" } = e.detail || {};
  25669. const formatter = this.formatter || this.innerFormatter;
  25670. const formatValue = formatter(value2);
  25671. this.innerValue = value2;
  25672. this.$nextTick(() => {
  25673. this.innerValue = formatValue;
  25674. this.valueChange();
  25675. });
  25676. },
  25677. // 输入框失去焦点时触发
  25678. onBlur(event) {
  25679. this.$emit("blur", event.detail.value);
  25680. uni.$u.sleep(50).then(() => {
  25681. this.focused = false;
  25682. });
  25683. uni.$u.formValidate(this, "blur");
  25684. },
  25685. // 输入框聚焦时触发
  25686. onFocus(event) {
  25687. this.focused = true;
  25688. this.$emit("focus");
  25689. },
  25690. // 点击完成按钮时触发
  25691. onConfirm(event) {
  25692. this.$emit("confirm", this.innerValue);
  25693. },
  25694. // 键盘高度发生变化的时候触发此事件
  25695. // 兼容性:微信小程序2.7.0+、App 3.1.0+
  25696. onkeyboardheightchange() {
  25697. this.$emit("keyboardheightchange");
  25698. },
  25699. // 内容发生变化,进行处理
  25700. valueChange() {
  25701. const value2 = this.innerValue;
  25702. this.$nextTick(() => {
  25703. this.$emit("update:modelValue", value2);
  25704. this.changeFromInner = true;
  25705. this.$emit("change", value2);
  25706. uni.$u.formValidate(this, "change");
  25707. });
  25708. },
  25709. // 点击清除控件
  25710. onClear() {
  25711. this.innerValue = "";
  25712. this.$nextTick(() => {
  25713. this.valueChange();
  25714. this.$emit("clear");
  25715. });
  25716. },
  25717. /**
  25718. * 在安卓nvue上,事件无法冒泡
  25719. * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
  25720. * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
  25721. */
  25722. clickHandler() {
  25723. }
  25724. }
  25725. };
  25726. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  25727. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  25728. return vue.openBlock(), vue.createElementBlock(
  25729. "view",
  25730. {
  25731. class: vue.normalizeClass(["u-input", $options.inputClass]),
  25732. style: vue.normalizeStyle([$options.wrapperStyle])
  25733. },
  25734. [
  25735. vue.createElementVNode("view", { class: "u-input__content" }, [
  25736. _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
  25737. key: 0,
  25738. class: "u-input__content__prefix-icon"
  25739. }, [
  25740. vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
  25741. vue.createVNode(_component_u_icon, {
  25742. name: _ctx.prefixIcon,
  25743. size: "18",
  25744. customStyle: _ctx.prefixIconStyle
  25745. }, null, 8, ["name", "customStyle"])
  25746. ], true)
  25747. ])) : vue.createCommentVNode("v-if", true),
  25748. vue.createElementVNode("view", {
  25749. class: "u-input__content__field-wrapper",
  25750. onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  25751. }, [
  25752. vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "),
  25753. vue.createElementVNode("input", {
  25754. class: "u-input__content__field-wrapper__field",
  25755. style: vue.normalizeStyle([$options.inputStyle]),
  25756. type: _ctx.type,
  25757. focus: _ctx.focus,
  25758. cursor: _ctx.cursor,
  25759. value: $data.innerValue,
  25760. "auto-blur": _ctx.autoBlur,
  25761. disabled: _ctx.disabled || _ctx.readonly,
  25762. maxlength: _ctx.maxlength,
  25763. placeholder: _ctx.placeholder,
  25764. "placeholder-style": _ctx.placeholderStyle,
  25765. "placeholder-class": _ctx.placeholderClass,
  25766. "confirm-type": _ctx.confirmType,
  25767. "confirm-hold": _ctx.confirmHold,
  25768. "hold-keyboard": _ctx.holdKeyboard,
  25769. "cursor-spacing": _ctx.cursorSpacing,
  25770. "adjust-position": _ctx.adjustPosition,
  25771. "selection-end": _ctx.selectionEnd,
  25772. "selection-start": _ctx.selectionStart,
  25773. password: _ctx.password || _ctx.type === "password" || void 0,
  25774. ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
  25775. onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
  25776. onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
  25777. onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
  25778. onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  25779. onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
  25780. }, 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"])
  25781. ]),
  25782. $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
  25783. key: 1,
  25784. class: "u-input__content__clear",
  25785. onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
  25786. }, [
  25787. vue.createVNode(_component_u_icon, {
  25788. name: "close",
  25789. size: "11",
  25790. color: "#ffffff",
  25791. customStyle: "line-height: 12px"
  25792. })
  25793. ])) : vue.createCommentVNode("v-if", true),
  25794. _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
  25795. key: 2,
  25796. class: "u-input__content__subfix-icon"
  25797. }, [
  25798. vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
  25799. vue.createVNode(_component_u_icon, {
  25800. name: _ctx.suffixIcon,
  25801. size: "18",
  25802. customStyle: _ctx.suffixIconStyle
  25803. }, null, 8, ["name", "customStyle"])
  25804. ], true)
  25805. ])) : vue.createCommentVNode("v-if", true)
  25806. ])
  25807. ],
  25808. 6
  25809. /* CLASS, STYLE */
  25810. );
  25811. }
  25812. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-df79975b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-input/u-input.vue"]]);
  25813. const props$9 = {
  25814. props: {
  25815. // input的label提示语
  25816. label: {
  25817. type: String,
  25818. default: props$y.formItem.label
  25819. },
  25820. // 绑定的值
  25821. prop: {
  25822. type: String,
  25823. default: props$y.formItem.prop
  25824. },
  25825. // 是否显示表单域的下划线边框
  25826. borderBottom: {
  25827. type: [String, Boolean],
  25828. default: props$y.formItem.borderBottom
  25829. },
  25830. // label的宽度,单位px
  25831. labelWidth: {
  25832. type: [String, Number],
  25833. default: props$y.formItem.labelWidth
  25834. },
  25835. // 右侧图标
  25836. rightIcon: {
  25837. type: String,
  25838. default: props$y.formItem.rightIcon
  25839. },
  25840. // 左侧图标
  25841. leftIcon: {
  25842. type: String,
  25843. default: props$y.formItem.leftIcon
  25844. },
  25845. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  25846. required: {
  25847. type: Boolean,
  25848. default: props$y.formItem.required
  25849. },
  25850. leftIconStyle: {
  25851. type: [String, Object],
  25852. default: props$y.formItem.leftIconStyle
  25853. }
  25854. }
  25855. };
  25856. const _sfc_main$1g = {
  25857. name: "u-form-item",
  25858. mixins: [mpMixin, mixin, props$9],
  25859. data() {
  25860. return {
  25861. // 错误提示语
  25862. message: "",
  25863. parentData: {
  25864. // 提示文本的位置
  25865. labelPosition: "left",
  25866. // 提示文本对齐方式
  25867. labelAlign: "left",
  25868. // 提示文本的样式
  25869. labelStyle: {},
  25870. // 提示文本的宽度
  25871. labelWidth: 45,
  25872. // 错误提示方式
  25873. errorType: "message"
  25874. }
  25875. };
  25876. },
  25877. // 组件创建完成时,将当前实例保存到u-form中
  25878. computed: {
  25879. propsLine() {
  25880. return uni.$u.props.line;
  25881. }
  25882. },
  25883. mounted() {
  25884. this.init();
  25885. },
  25886. methods: {
  25887. init() {
  25888. this.updateParentData();
  25889. if (!this.parent) {
  25890. uni.$u.error("u-form-item需要结合u-form组件使用");
  25891. }
  25892. },
  25893. // 获取父组件的参数
  25894. updateParentData() {
  25895. this.getParentData("u-form");
  25896. },
  25897. // 移除u-form-item的校验结果
  25898. clearValidate() {
  25899. this.message = null;
  25900. },
  25901. // 清空当前的组件的校验结果,并重置为初始值
  25902. resetField() {
  25903. const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
  25904. uni.$u.setProperty(this.parent.model, this.prop, value2);
  25905. this.message = null;
  25906. },
  25907. // 点击组件
  25908. clickHandler() {
  25909. this.$emit("click");
  25910. }
  25911. }
  25912. };
  25913. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  25914. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  25915. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5);
  25916. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
  25917. vue.createElementVNode(
  25918. "view",
  25919. {
  25920. class: "u-form-item__body",
  25921. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
  25922. style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
  25923. flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
  25924. }])
  25925. },
  25926. [
  25927. vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
  25928. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  25929. vue.createCommentVNode(" {{required}} "),
  25930. _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
  25931. "view",
  25932. {
  25933. key: 0,
  25934. class: "u-form-item__body__left",
  25935. style: vue.normalizeStyle({
  25936. width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
  25937. marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
  25938. })
  25939. },
  25940. [
  25941. vue.createCommentVNode(" 为了块对齐 "),
  25942. vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
  25943. vue.createCommentVNode(" nvue不支持伪元素before "),
  25944. _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
  25945. key: 0,
  25946. class: "u-form-item__body__left__content__required"
  25947. }, "*")) : vue.createCommentVNode("v-if", true),
  25948. _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  25949. key: 1,
  25950. class: "u-form-item__body__left__content__icon"
  25951. }, [
  25952. vue.createVNode(_component_u_icon, {
  25953. name: _ctx.leftIcon,
  25954. "custom-style": _ctx.leftIconStyle
  25955. }, null, 8, ["name", "custom-style"])
  25956. ])) : vue.createCommentVNode("v-if", true),
  25957. vue.createElementVNode(
  25958. "text",
  25959. {
  25960. class: "u-form-item__body__left__content__label",
  25961. style: vue.normalizeStyle([$data.parentData.labelStyle, {
  25962. justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
  25963. }])
  25964. },
  25965. vue.toDisplayString(_ctx.label),
  25966. 5
  25967. /* TEXT, STYLE */
  25968. )
  25969. ])
  25970. ],
  25971. 4
  25972. /* STYLE */
  25973. )) : vue.createCommentVNode("v-if", true)
  25974. ], true),
  25975. vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
  25976. vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
  25977. vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
  25978. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  25979. ]),
  25980. _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
  25981. key: 0,
  25982. class: "item__body__right__content__icon"
  25983. }, [
  25984. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  25985. ])) : vue.createCommentVNode("v-if", true)
  25986. ])
  25987. ])
  25988. ],
  25989. 4
  25990. /* STYLE */
  25991. ),
  25992. vue.renderSlot(_ctx.$slots, "error", {}, () => [
  25993. !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
  25994. "text",
  25995. {
  25996. key: 0,
  25997. class: "u-form-item__body__right__message",
  25998. style: vue.normalizeStyle({
  25999. marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
  26000. })
  26001. },
  26002. vue.toDisplayString($data.message),
  26003. 5
  26004. /* TEXT, STYLE */
  26005. )) : vue.createCommentVNode("v-if", true)
  26006. ], true),
  26007. _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
  26008. key: 0,
  26009. color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
  26010. customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
  26011. }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
  26012. ]);
  26013. }
  26014. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-42bac3de"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]);
  26015. const props$8 = {
  26016. props: {
  26017. // 背景颜色(默认transparent)
  26018. bgColor: {
  26019. type: String,
  26020. default: props$y.gap.bgColor
  26021. },
  26022. // 分割槽高度,单位px(默认30)
  26023. height: {
  26024. type: [String, Number],
  26025. default: props$y.gap.height
  26026. },
  26027. // 与上一个组件的距离
  26028. marginTop: {
  26029. type: [String, Number],
  26030. default: props$y.gap.marginTop
  26031. },
  26032. // 与下一个组件的距离
  26033. marginBottom: {
  26034. type: [String, Number],
  26035. default: props$y.gap.marginBottom
  26036. }
  26037. }
  26038. };
  26039. const _sfc_main$1f = {
  26040. name: "u-gap",
  26041. mixins: [mpMixin, mixin, props$8],
  26042. computed: {
  26043. gapStyle() {
  26044. const style = {
  26045. backgroundColor: this.bgColor,
  26046. height: uni.$u.addUnit(this.height),
  26047. marginTop: uni.$u.addUnit(this.marginTop),
  26048. marginBottom: uni.$u.addUnit(this.marginBottom)
  26049. };
  26050. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  26051. }
  26052. }
  26053. };
  26054. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  26055. return vue.openBlock(), vue.createElementBlock(
  26056. "view",
  26057. {
  26058. class: "u-gap",
  26059. style: vue.normalizeStyle([$options.gapStyle])
  26060. },
  26061. null,
  26062. 4
  26063. /* STYLE */
  26064. );
  26065. }
  26066. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-6fe44ee6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]);
  26067. const props$7 = {
  26068. props: {
  26069. // 操作菜单是否展示 (默认false)
  26070. show: {
  26071. type: Boolean,
  26072. default: props$y.actionSheet.show
  26073. },
  26074. // 标题
  26075. title: {
  26076. type: String,
  26077. default: props$y.actionSheet.title
  26078. },
  26079. // 选项上方的描述信息
  26080. description: {
  26081. type: String,
  26082. default: props$y.actionSheet.description
  26083. },
  26084. // 数据
  26085. actions: {
  26086. type: Array,
  26087. default: props$y.actionSheet.actions
  26088. },
  26089. // 取消按钮的文字,不为空时显示按钮
  26090. cancelText: {
  26091. type: String,
  26092. default: props$y.actionSheet.cancelText
  26093. },
  26094. // 点击某个菜单项时是否关闭弹窗
  26095. closeOnClickAction: {
  26096. type: Boolean,
  26097. default: props$y.actionSheet.closeOnClickAction
  26098. },
  26099. // 处理底部安全区(默认true)
  26100. safeAreaInsetBottom: {
  26101. type: Boolean,
  26102. default: props$y.actionSheet.safeAreaInsetBottom
  26103. },
  26104. // 小程序的打开方式
  26105. openType: {
  26106. type: String,
  26107. default: props$y.actionSheet.openType
  26108. },
  26109. // 点击遮罩是否允许关闭 (默认true)
  26110. closeOnClickOverlay: {
  26111. type: Boolean,
  26112. default: props$y.actionSheet.closeOnClickOverlay
  26113. },
  26114. // 圆角值
  26115. round: {
  26116. type: [Boolean, String, Number],
  26117. default: props$y.actionSheet.round
  26118. }
  26119. }
  26120. };
  26121. const _sfc_main$1e = {
  26122. name: "u-action-sheet",
  26123. // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
  26124. mixins: [openType, button, mixin, props$7],
  26125. data() {
  26126. return {};
  26127. },
  26128. computed: {
  26129. // 操作项目的样式
  26130. itemStyle() {
  26131. return (index2) => {
  26132. let style = {};
  26133. if (this.actions[index2].color)
  26134. style.color = this.actions[index2].color;
  26135. if (this.actions[index2].fontSize)
  26136. style.fontSize = uni.$u.addUnit(this.actions[index2].fontSize);
  26137. if (this.actions[index2].disabled)
  26138. style.color = "#c0c4cc";
  26139. return style;
  26140. };
  26141. }
  26142. },
  26143. methods: {
  26144. closeHandler() {
  26145. if (this.closeOnClickOverlay) {
  26146. this.$emit("close");
  26147. }
  26148. },
  26149. // 点击取消按钮
  26150. cancel() {
  26151. this.$emit("close");
  26152. },
  26153. selectHandler(index2) {
  26154. const item = this.actions[index2];
  26155. if (item && !item.disabled && !item.loading) {
  26156. this.$emit("select", item);
  26157. if (this.closeOnClickAction) {
  26158. this.$emit("close");
  26159. }
  26160. }
  26161. }
  26162. }
  26163. };
  26164. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  26165. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  26166. const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5);
  26167. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
  26168. const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_3$1);
  26169. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  26170. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  26171. show: _ctx.show,
  26172. mode: "bottom",
  26173. onClose: $options.closeHandler,
  26174. safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
  26175. round: _ctx.round
  26176. }, {
  26177. default: vue.withCtx(() => [
  26178. vue.createElementVNode("view", { class: "u-action-sheet" }, [
  26179. _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
  26180. key: 0,
  26181. class: "u-action-sheet__header"
  26182. }, [
  26183. vue.createElementVNode(
  26184. "text",
  26185. { class: "u-action-sheet__header__title u-line-1" },
  26186. vue.toDisplayString(_ctx.title),
  26187. 1
  26188. /* TEXT */
  26189. ),
  26190. vue.createElementVNode("view", {
  26191. class: "u-action-sheet__header__icon-wrap",
  26192. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"]))
  26193. }, [
  26194. vue.createVNode(_component_u_icon, {
  26195. name: "close",
  26196. size: "17",
  26197. color: "#c8c9cc",
  26198. bold: ""
  26199. })
  26200. ])
  26201. ])) : vue.createCommentVNode("v-if", true),
  26202. _ctx.description ? (vue.openBlock(), vue.createElementBlock(
  26203. "text",
  26204. {
  26205. key: 1,
  26206. class: "u-action-sheet__description",
  26207. style: vue.normalizeStyle([{
  26208. marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
  26209. }])
  26210. },
  26211. vue.toDisplayString(_ctx.description),
  26212. 5
  26213. /* TEXT, STYLE */
  26214. )) : vue.createCommentVNode("v-if", true),
  26215. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  26216. _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
  26217. vue.createElementVNode("view", { class: "u-action-sheet__item-wrap" }, [
  26218. (vue.openBlock(true), vue.createElementBlock(
  26219. vue.Fragment,
  26220. null,
  26221. vue.renderList(_ctx.actions, (item, index2) => {
  26222. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  26223. vue.createElementVNode("view", {
  26224. class: "u-action-sheet__item-wrap__item",
  26225. onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]),
  26226. "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
  26227. "hover-stay-time": 150
  26228. }, [
  26229. !item.loading ? (vue.openBlock(), vue.createElementBlock(
  26230. vue.Fragment,
  26231. { key: 0 },
  26232. [
  26233. vue.createElementVNode(
  26234. "text",
  26235. {
  26236. class: "u-action-sheet__item-wrap__item__name",
  26237. style: vue.normalizeStyle([$options.itemStyle(index2)])
  26238. },
  26239. vue.toDisplayString(item.name),
  26240. 5
  26241. /* TEXT, STYLE */
  26242. ),
  26243. item.subname ? (vue.openBlock(), vue.createElementBlock(
  26244. "text",
  26245. {
  26246. key: 0,
  26247. class: "u-action-sheet__item-wrap__item__subname"
  26248. },
  26249. vue.toDisplayString(item.subname),
  26250. 1
  26251. /* TEXT */
  26252. )) : vue.createCommentVNode("v-if", true)
  26253. ],
  26254. 64
  26255. /* STABLE_FRAGMENT */
  26256. )) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
  26257. key: 1,
  26258. "custom-class": "van-action-sheet__loading",
  26259. size: "18",
  26260. mode: "circle"
  26261. }))
  26262. ], 8, ["onClick", "hover-class"]),
  26263. index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
  26264. ]);
  26265. }),
  26266. 128
  26267. /* KEYED_FRAGMENT */
  26268. ))
  26269. ])
  26270. ], true),
  26271. _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
  26272. key: 2,
  26273. bgColor: "#eaeaec",
  26274. height: "6"
  26275. })) : vue.createCommentVNode("v-if", true),
  26276. vue.createElementVNode("view", { "hover-class": "u-action-sheet--hover" }, [
  26277. _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock(
  26278. "text",
  26279. {
  26280. key: 0,
  26281. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  26282. }, ["stop", "prevent"])),
  26283. "hover-stay-time": 150,
  26284. class: "u-action-sheet__cancel-text",
  26285. onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args))
  26286. },
  26287. vue.toDisplayString(_ctx.cancelText),
  26288. 33
  26289. /* TEXT, NEED_HYDRATION */
  26290. )) : vue.createCommentVNode("v-if", true)
  26291. ])
  26292. ])
  26293. ]),
  26294. _: 3
  26295. /* FORWARDED */
  26296. }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]);
  26297. }
  26298. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-69669810"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]);
  26299. const props$6 = {
  26300. props: {
  26301. // 当前form的需要验证字段的集合
  26302. model: {
  26303. type: Object,
  26304. default: props$y.form.model
  26305. },
  26306. // 验证规则
  26307. rules: {
  26308. type: [Object, Function, Array],
  26309. default: props$y.form.rules
  26310. },
  26311. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  26312. // border-bottom-下边框呈现红色,none-无提示
  26313. errorType: {
  26314. type: String,
  26315. default: props$y.form.errorType
  26316. },
  26317. // 是否显示表单域的下划线边框
  26318. borderBottom: {
  26319. type: Boolean,
  26320. default: props$y.form.borderBottom
  26321. },
  26322. // label的位置,left-左边,top-上边
  26323. labelPosition: {
  26324. type: String,
  26325. default: props$y.form.labelPosition
  26326. },
  26327. // label的宽度,单位px
  26328. labelWidth: {
  26329. type: [String, Number],
  26330. default: props$y.form.labelWidth
  26331. },
  26332. // lable字体的对齐方式
  26333. labelAlign: {
  26334. type: String,
  26335. default: props$y.form.labelAlign
  26336. },
  26337. // lable的样式,对象形式
  26338. labelStyle: {
  26339. type: Object,
  26340. default: props$y.form.labelStyle
  26341. }
  26342. }
  26343. };
  26344. var define_process_env_default = {};
  26345. const formatRegExp = /%[sdj%]/g;
  26346. let warning = function warning2() {
  26347. };
  26348. if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
  26349. warning = function warning3(type2, errors) {
  26350. if (typeof console !== "undefined" && console.warn) {
  26351. if (errors.every((e) => typeof e === "string")) {
  26352. formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
  26353. }
  26354. }
  26355. };
  26356. }
  26357. function convertFieldsError(errors) {
  26358. if (!errors || !errors.length)
  26359. return null;
  26360. const fields = {};
  26361. errors.forEach((error2) => {
  26362. const { field } = error2;
  26363. fields[field] = fields[field] || [];
  26364. fields[field].push(error2);
  26365. });
  26366. return fields;
  26367. }
  26368. function format() {
  26369. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  26370. args[_key] = arguments[_key];
  26371. }
  26372. let i = 1;
  26373. const f = args[0];
  26374. const len = args.length;
  26375. if (typeof f === "function") {
  26376. return f.apply(null, args.slice(1));
  26377. }
  26378. if (typeof f === "string") {
  26379. let str = String(f).replace(formatRegExp, (x) => {
  26380. if (x === "%%") {
  26381. return "%";
  26382. }
  26383. if (i >= len) {
  26384. return x;
  26385. }
  26386. switch (x) {
  26387. case "%s":
  26388. return String(args[i++]);
  26389. case "%d":
  26390. return Number(args[i++]);
  26391. case "%j":
  26392. try {
  26393. return JSON.stringify(args[i++]);
  26394. } catch (_) {
  26395. return "[Circular]";
  26396. }
  26397. break;
  26398. default:
  26399. return x;
  26400. }
  26401. });
  26402. for (let arg = args[i]; i < len; arg = args[++i]) {
  26403. str += ` ${arg}`;
  26404. }
  26405. return str;
  26406. }
  26407. return f;
  26408. }
  26409. function isNativeStringType(type2) {
  26410. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  26411. }
  26412. function isEmptyValue(value2, type2) {
  26413. if (value2 === void 0 || value2 === null) {
  26414. return true;
  26415. }
  26416. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  26417. return true;
  26418. }
  26419. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  26420. return true;
  26421. }
  26422. return false;
  26423. }
  26424. function asyncParallelArray(arr, func2, callback) {
  26425. const results = [];
  26426. let total = 0;
  26427. const arrLength = arr.length;
  26428. function count(errors) {
  26429. results.push.apply(results, errors);
  26430. total++;
  26431. if (total === arrLength) {
  26432. callback(results);
  26433. }
  26434. }
  26435. arr.forEach((a) => {
  26436. func2(a, count);
  26437. });
  26438. }
  26439. function asyncSerialArray(arr, func2, callback) {
  26440. let index2 = 0;
  26441. const arrLength = arr.length;
  26442. function next(errors) {
  26443. if (errors && errors.length) {
  26444. callback(errors);
  26445. return;
  26446. }
  26447. const original = index2;
  26448. index2 += 1;
  26449. if (original < arrLength) {
  26450. func2(arr[original], next);
  26451. } else {
  26452. callback([]);
  26453. }
  26454. }
  26455. next([]);
  26456. }
  26457. function flattenObjArr(objArr) {
  26458. const ret = [];
  26459. Object.keys(objArr).forEach((k) => {
  26460. ret.push.apply(ret, objArr[k]);
  26461. });
  26462. return ret;
  26463. }
  26464. function asyncMap(objArr, option, func2, callback) {
  26465. if (option.first) {
  26466. const _pending = new Promise((resolve, reject2) => {
  26467. const next = function next2(errors) {
  26468. callback(errors);
  26469. return errors.length ? reject2({
  26470. errors,
  26471. fields: convertFieldsError(errors)
  26472. }) : resolve();
  26473. };
  26474. const flattenArr = flattenObjArr(objArr);
  26475. asyncSerialArray(flattenArr, func2, next);
  26476. });
  26477. _pending.catch((e) => e);
  26478. return _pending;
  26479. }
  26480. let firstFields = option.firstFields || [];
  26481. if (firstFields === true) {
  26482. firstFields = Object.keys(objArr);
  26483. }
  26484. const objArrKeys = Object.keys(objArr);
  26485. const objArrLength = objArrKeys.length;
  26486. let total = 0;
  26487. const results = [];
  26488. const pending = new Promise((resolve, reject2) => {
  26489. const next = function next2(errors) {
  26490. results.push.apply(results, errors);
  26491. total++;
  26492. if (total === objArrLength) {
  26493. callback(results);
  26494. return results.length ? reject2({
  26495. errors: results,
  26496. fields: convertFieldsError(results)
  26497. }) : resolve();
  26498. }
  26499. };
  26500. if (!objArrKeys.length) {
  26501. callback(results);
  26502. resolve();
  26503. }
  26504. objArrKeys.forEach((key) => {
  26505. const arr = objArr[key];
  26506. if (firstFields.indexOf(key) !== -1) {
  26507. asyncSerialArray(arr, func2, next);
  26508. } else {
  26509. asyncParallelArray(arr, func2, next);
  26510. }
  26511. });
  26512. });
  26513. pending.catch((e) => e);
  26514. return pending;
  26515. }
  26516. function complementError(rule) {
  26517. return function(oe) {
  26518. if (oe && oe.message) {
  26519. oe.field = oe.field || rule.fullField;
  26520. return oe;
  26521. }
  26522. return {
  26523. message: typeof oe === "function" ? oe() : oe,
  26524. field: oe.field || rule.fullField
  26525. };
  26526. };
  26527. }
  26528. function deepMerge$2(target, source) {
  26529. if (source) {
  26530. for (const s in source) {
  26531. if (source.hasOwnProperty(s)) {
  26532. const value2 = source[s];
  26533. if (typeof value2 === "object" && typeof target[s] === "object") {
  26534. target[s] = { ...target[s], ...value2 };
  26535. } else {
  26536. target[s] = value2;
  26537. }
  26538. }
  26539. }
  26540. }
  26541. return target;
  26542. }
  26543. function required(rule, value2, source, errors, options, type2) {
  26544. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  26545. errors.push(format(options.messages.required, rule.fullField));
  26546. }
  26547. }
  26548. function whitespace(rule, value2, source, errors, options) {
  26549. if (/^\s+$/.test(value2) || value2 === "") {
  26550. errors.push(format(options.messages.whitespace, rule.fullField));
  26551. }
  26552. }
  26553. const pattern = {
  26554. // http://emailregex.com/
  26555. 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,}))$/,
  26556. url: new RegExp(
  26557. "^(?!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]*)?$",
  26558. "i"
  26559. ),
  26560. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  26561. };
  26562. var types = {
  26563. integer: function integer(value2) {
  26564. return /^(-)?\d+$/.test(value2);
  26565. },
  26566. float: function float(value2) {
  26567. return /^(-)?\d+(\.\d+)?$/.test(value2);
  26568. },
  26569. array: function array3(value2) {
  26570. return Array.isArray(value2);
  26571. },
  26572. regexp: function regexp(value2) {
  26573. if (value2 instanceof RegExp) {
  26574. return true;
  26575. }
  26576. try {
  26577. return !!new RegExp(value2);
  26578. } catch (e) {
  26579. return false;
  26580. }
  26581. },
  26582. date: function date3(value2) {
  26583. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  26584. },
  26585. number: function number3(value2) {
  26586. if (isNaN(value2)) {
  26587. return false;
  26588. }
  26589. return typeof +value2 === "number";
  26590. },
  26591. object: function object3(value2) {
  26592. return typeof value2 === "object" && !types.array(value2);
  26593. },
  26594. method: function method(value2) {
  26595. return typeof value2 === "function";
  26596. },
  26597. email: function email2(value2) {
  26598. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  26599. },
  26600. url: function url2(value2) {
  26601. return typeof value2 === "string" && !!value2.match(pattern.url);
  26602. },
  26603. hex: function hex(value2) {
  26604. return typeof value2 === "string" && !!value2.match(pattern.hex);
  26605. }
  26606. };
  26607. function type(rule, value2, source, errors, options) {
  26608. if (rule.required && value2 === void 0) {
  26609. required(rule, value2, source, errors, options);
  26610. return;
  26611. }
  26612. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  26613. const ruleType = rule.type;
  26614. if (custom.indexOf(ruleType) > -1) {
  26615. if (!types[ruleType](value2)) {
  26616. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  26617. }
  26618. } else if (ruleType && typeof value2 !== rule.type) {
  26619. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  26620. }
  26621. }
  26622. function range$2(rule, value2, source, errors, options) {
  26623. const len = typeof rule.len === "number";
  26624. const min = typeof rule.min === "number";
  26625. const max = typeof rule.max === "number";
  26626. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  26627. let val = value2;
  26628. let key = null;
  26629. const num = typeof value2 === "number";
  26630. const str = typeof value2 === "string";
  26631. const arr = Array.isArray(value2);
  26632. if (num) {
  26633. key = "number";
  26634. } else if (str) {
  26635. key = "string";
  26636. } else if (arr) {
  26637. key = "array";
  26638. }
  26639. if (!key) {
  26640. return false;
  26641. }
  26642. if (arr) {
  26643. val = value2.length;
  26644. }
  26645. if (str) {
  26646. val = value2.replace(spRegexp, "_").length;
  26647. }
  26648. if (len) {
  26649. if (val !== rule.len) {
  26650. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  26651. }
  26652. } else if (min && !max && val < rule.min) {
  26653. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  26654. } else if (max && !min && val > rule.max) {
  26655. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  26656. } else if (min && max && (val < rule.min || val > rule.max)) {
  26657. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  26658. }
  26659. }
  26660. const ENUM = "enum";
  26661. function enumerable(rule, value2, source, errors, options) {
  26662. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  26663. if (rule[ENUM].indexOf(value2) === -1) {
  26664. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  26665. }
  26666. }
  26667. function pattern$1(rule, value2, source, errors, options) {
  26668. if (rule.pattern) {
  26669. if (rule.pattern instanceof RegExp) {
  26670. rule.pattern.lastIndex = 0;
  26671. if (!rule.pattern.test(value2)) {
  26672. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  26673. }
  26674. } else if (typeof rule.pattern === "string") {
  26675. const _pattern = new RegExp(rule.pattern);
  26676. if (!_pattern.test(value2)) {
  26677. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  26678. }
  26679. }
  26680. }
  26681. }
  26682. const rules = {
  26683. required,
  26684. whitespace,
  26685. type,
  26686. range: range$2,
  26687. enum: enumerable,
  26688. pattern: pattern$1
  26689. };
  26690. function string$1(rule, value2, callback, source, options) {
  26691. const errors = [];
  26692. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26693. if (validate2) {
  26694. if (isEmptyValue(value2, "string") && !rule.required) {
  26695. return callback();
  26696. }
  26697. rules.required(rule, value2, source, errors, options, "string");
  26698. if (!isEmptyValue(value2, "string")) {
  26699. rules.type(rule, value2, source, errors, options);
  26700. rules.range(rule, value2, source, errors, options);
  26701. rules.pattern(rule, value2, source, errors, options);
  26702. if (rule.whitespace === true) {
  26703. rules.whitespace(rule, value2, source, errors, options);
  26704. }
  26705. }
  26706. }
  26707. callback(errors);
  26708. }
  26709. function method2(rule, value2, callback, source, options) {
  26710. const errors = [];
  26711. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26712. if (validate2) {
  26713. if (isEmptyValue(value2) && !rule.required) {
  26714. return callback();
  26715. }
  26716. rules.required(rule, value2, source, errors, options);
  26717. if (value2 !== void 0) {
  26718. rules.type(rule, value2, source, errors, options);
  26719. }
  26720. }
  26721. callback(errors);
  26722. }
  26723. function number2(rule, value2, callback, source, options) {
  26724. const errors = [];
  26725. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26726. if (validate2) {
  26727. if (value2 === "") {
  26728. value2 = void 0;
  26729. }
  26730. if (isEmptyValue(value2) && !rule.required) {
  26731. return callback();
  26732. }
  26733. rules.required(rule, value2, source, errors, options);
  26734. if (value2 !== void 0) {
  26735. rules.type(rule, value2, source, errors, options);
  26736. rules.range(rule, value2, source, errors, options);
  26737. }
  26738. }
  26739. callback(errors);
  26740. }
  26741. function _boolean(rule, value2, callback, source, options) {
  26742. const errors = [];
  26743. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26744. if (validate2) {
  26745. if (isEmptyValue(value2) && !rule.required) {
  26746. return callback();
  26747. }
  26748. rules.required(rule, value2, source, errors, options);
  26749. if (value2 !== void 0) {
  26750. rules.type(rule, value2, source, errors, options);
  26751. }
  26752. }
  26753. callback(errors);
  26754. }
  26755. function regexp2(rule, value2, callback, source, options) {
  26756. const errors = [];
  26757. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26758. if (validate2) {
  26759. if (isEmptyValue(value2) && !rule.required) {
  26760. return callback();
  26761. }
  26762. rules.required(rule, value2, source, errors, options);
  26763. if (!isEmptyValue(value2)) {
  26764. rules.type(rule, value2, source, errors, options);
  26765. }
  26766. }
  26767. callback(errors);
  26768. }
  26769. function integer2(rule, value2, callback, source, options) {
  26770. const errors = [];
  26771. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26772. if (validate2) {
  26773. if (isEmptyValue(value2) && !rule.required) {
  26774. return callback();
  26775. }
  26776. rules.required(rule, value2, source, errors, options);
  26777. if (value2 !== void 0) {
  26778. rules.type(rule, value2, source, errors, options);
  26779. rules.range(rule, value2, source, errors, options);
  26780. }
  26781. }
  26782. callback(errors);
  26783. }
  26784. function floatFn(rule, value2, callback, source, options) {
  26785. const errors = [];
  26786. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26787. if (validate2) {
  26788. if (isEmptyValue(value2) && !rule.required) {
  26789. return callback();
  26790. }
  26791. rules.required(rule, value2, source, errors, options);
  26792. if (value2 !== void 0) {
  26793. rules.type(rule, value2, source, errors, options);
  26794. rules.range(rule, value2, source, errors, options);
  26795. }
  26796. }
  26797. callback(errors);
  26798. }
  26799. function array2(rule, value2, callback, source, options) {
  26800. const errors = [];
  26801. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26802. if (validate2) {
  26803. if (isEmptyValue(value2, "array") && !rule.required) {
  26804. return callback();
  26805. }
  26806. rules.required(rule, value2, source, errors, options, "array");
  26807. if (!isEmptyValue(value2, "array")) {
  26808. rules.type(rule, value2, source, errors, options);
  26809. rules.range(rule, value2, source, errors, options);
  26810. }
  26811. }
  26812. callback(errors);
  26813. }
  26814. function object2(rule, value2, callback, source, options) {
  26815. const errors = [];
  26816. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26817. if (validate2) {
  26818. if (isEmptyValue(value2) && !rule.required) {
  26819. return callback();
  26820. }
  26821. rules.required(rule, value2, source, errors, options);
  26822. if (value2 !== void 0) {
  26823. rules.type(rule, value2, source, errors, options);
  26824. }
  26825. }
  26826. callback(errors);
  26827. }
  26828. const ENUM$1 = "enum";
  26829. function enumerable$1(rule, value2, callback, source, options) {
  26830. const errors = [];
  26831. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26832. if (validate2) {
  26833. if (isEmptyValue(value2) && !rule.required) {
  26834. return callback();
  26835. }
  26836. rules.required(rule, value2, source, errors, options);
  26837. if (value2 !== void 0) {
  26838. rules[ENUM$1](rule, value2, source, errors, options);
  26839. }
  26840. }
  26841. callback(errors);
  26842. }
  26843. function pattern$2(rule, value2, callback, source, options) {
  26844. const errors = [];
  26845. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26846. if (validate2) {
  26847. if (isEmptyValue(value2, "string") && !rule.required) {
  26848. return callback();
  26849. }
  26850. rules.required(rule, value2, source, errors, options);
  26851. if (!isEmptyValue(value2, "string")) {
  26852. rules.pattern(rule, value2, source, errors, options);
  26853. }
  26854. }
  26855. callback(errors);
  26856. }
  26857. function date2(rule, value2, callback, source, options) {
  26858. const errors = [];
  26859. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26860. if (validate2) {
  26861. if (isEmptyValue(value2) && !rule.required) {
  26862. return callback();
  26863. }
  26864. rules.required(rule, value2, source, errors, options);
  26865. if (!isEmptyValue(value2)) {
  26866. let dateObject;
  26867. if (typeof value2 === "number") {
  26868. dateObject = new Date(value2);
  26869. } else {
  26870. dateObject = value2;
  26871. }
  26872. rules.type(rule, dateObject, source, errors, options);
  26873. if (dateObject) {
  26874. rules.range(rule, dateObject.getTime(), source, errors, options);
  26875. }
  26876. }
  26877. }
  26878. callback(errors);
  26879. }
  26880. function required$1(rule, value2, callback, source, options) {
  26881. const errors = [];
  26882. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  26883. rules.required(rule, value2, source, errors, options, type2);
  26884. callback(errors);
  26885. }
  26886. function type$1(rule, value2, callback, source, options) {
  26887. const ruleType = rule.type;
  26888. const errors = [];
  26889. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26890. if (validate2) {
  26891. if (isEmptyValue(value2, ruleType) && !rule.required) {
  26892. return callback();
  26893. }
  26894. rules.required(rule, value2, source, errors, options, ruleType);
  26895. if (!isEmptyValue(value2, ruleType)) {
  26896. rules.type(rule, value2, source, errors, options);
  26897. }
  26898. }
  26899. callback(errors);
  26900. }
  26901. function any(rule, value2, callback, source, options) {
  26902. const errors = [];
  26903. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  26904. if (validate2) {
  26905. if (isEmptyValue(value2) && !rule.required) {
  26906. return callback();
  26907. }
  26908. rules.required(rule, value2, source, errors, options);
  26909. }
  26910. callback(errors);
  26911. }
  26912. const validators = {
  26913. string: string$1,
  26914. method: method2,
  26915. number: number2,
  26916. boolean: _boolean,
  26917. regexp: regexp2,
  26918. integer: integer2,
  26919. float: floatFn,
  26920. array: array2,
  26921. object: object2,
  26922. enum: enumerable$1,
  26923. pattern: pattern$2,
  26924. date: date2,
  26925. url: type$1,
  26926. hex: type$1,
  26927. email: type$1,
  26928. required: required$1,
  26929. any
  26930. };
  26931. function newMessages() {
  26932. return {
  26933. default: "Validation error on field %s",
  26934. required: "%s is required",
  26935. enum: "%s must be one of %s",
  26936. whitespace: "%s cannot be empty",
  26937. date: {
  26938. format: "%s date %s is invalid for format %s",
  26939. parse: "%s date could not be parsed, %s is invalid ",
  26940. invalid: "%s date %s is invalid"
  26941. },
  26942. types: {
  26943. string: "%s is not a %s",
  26944. method: "%s is not a %s (function)",
  26945. array: "%s is not an %s",
  26946. object: "%s is not an %s",
  26947. number: "%s is not a %s",
  26948. date: "%s is not a %s",
  26949. boolean: "%s is not a %s",
  26950. integer: "%s is not an %s",
  26951. float: "%s is not a %s",
  26952. regexp: "%s is not a valid %s",
  26953. email: "%s is not a valid %s",
  26954. url: "%s is not a valid %s",
  26955. hex: "%s is not a valid %s"
  26956. },
  26957. string: {
  26958. len: "%s must be exactly %s characters",
  26959. min: "%s must be at least %s characters",
  26960. max: "%s cannot be longer than %s characters",
  26961. range: "%s must be between %s and %s characters"
  26962. },
  26963. number: {
  26964. len: "%s must equal %s",
  26965. min: "%s cannot be less than %s",
  26966. max: "%s cannot be greater than %s",
  26967. range: "%s must be between %s and %s"
  26968. },
  26969. array: {
  26970. len: "%s must be exactly %s in length",
  26971. min: "%s cannot be less than %s in length",
  26972. max: "%s cannot be greater than %s in length",
  26973. range: "%s must be between %s and %s in length"
  26974. },
  26975. pattern: {
  26976. mismatch: "%s value %s does not match pattern %s"
  26977. },
  26978. clone: function clone2() {
  26979. const cloned = JSON.parse(JSON.stringify(this));
  26980. cloned.clone = this.clone;
  26981. return cloned;
  26982. }
  26983. };
  26984. }
  26985. const messages = newMessages();
  26986. function Schema(descriptor) {
  26987. this.rules = null;
  26988. this._messages = messages;
  26989. this.define(descriptor);
  26990. }
  26991. Schema.prototype = {
  26992. messages: function messages2(_messages) {
  26993. if (_messages) {
  26994. this._messages = deepMerge$2(newMessages(), _messages);
  26995. }
  26996. return this._messages;
  26997. },
  26998. define: function define(rules2) {
  26999. if (!rules2) {
  27000. throw new Error("Cannot configure a schema with no rules");
  27001. }
  27002. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  27003. throw new Error("Rules must be an object");
  27004. }
  27005. this.rules = {};
  27006. let z;
  27007. let item;
  27008. for (z in rules2) {
  27009. if (rules2.hasOwnProperty(z)) {
  27010. item = rules2[z];
  27011. this.rules[z] = Array.isArray(item) ? item : [item];
  27012. }
  27013. }
  27014. },
  27015. validate: function validate(source_, o, oc) {
  27016. const _this = this;
  27017. if (o === void 0) {
  27018. o = {};
  27019. }
  27020. if (oc === void 0) {
  27021. oc = function oc2() {
  27022. };
  27023. }
  27024. let source = source_;
  27025. let options = o;
  27026. let callback = oc;
  27027. if (typeof options === "function") {
  27028. callback = options;
  27029. options = {};
  27030. }
  27031. if (!this.rules || Object.keys(this.rules).length === 0) {
  27032. if (callback) {
  27033. callback();
  27034. }
  27035. return Promise.resolve();
  27036. }
  27037. function complete(results) {
  27038. let i;
  27039. let errors = [];
  27040. let fields = {};
  27041. function add(e) {
  27042. if (Array.isArray(e)) {
  27043. let _errors;
  27044. errors = (_errors = errors).concat.apply(_errors, e);
  27045. } else {
  27046. errors.push(e);
  27047. }
  27048. }
  27049. for (i = 0; i < results.length; i++) {
  27050. add(results[i]);
  27051. }
  27052. if (!errors.length) {
  27053. errors = null;
  27054. fields = null;
  27055. } else {
  27056. fields = convertFieldsError(errors);
  27057. }
  27058. callback(errors, fields);
  27059. }
  27060. if (options.messages) {
  27061. let messages$1 = this.messages();
  27062. if (messages$1 === messages) {
  27063. messages$1 = newMessages();
  27064. }
  27065. deepMerge$2(messages$1, options.messages);
  27066. options.messages = messages$1;
  27067. } else {
  27068. options.messages = this.messages();
  27069. }
  27070. let arr;
  27071. let value2;
  27072. const series = {};
  27073. const keys = options.keys || Object.keys(this.rules);
  27074. keys.forEach((z) => {
  27075. arr = _this.rules[z];
  27076. value2 = source[z];
  27077. arr.forEach((r) => {
  27078. let rule = r;
  27079. if (typeof rule.transform === "function") {
  27080. if (source === source_) {
  27081. source = { ...source };
  27082. }
  27083. value2 = source[z] = rule.transform(value2);
  27084. }
  27085. if (typeof rule === "function") {
  27086. rule = {
  27087. validator: rule
  27088. };
  27089. } else {
  27090. rule = { ...rule };
  27091. }
  27092. rule.validator = _this.getValidationMethod(rule);
  27093. rule.field = z;
  27094. rule.fullField = rule.fullField || z;
  27095. rule.type = _this.getType(rule);
  27096. if (!rule.validator) {
  27097. return;
  27098. }
  27099. series[z] = series[z] || [];
  27100. series[z].push({
  27101. rule,
  27102. value: value2,
  27103. source,
  27104. field: z
  27105. });
  27106. });
  27107. });
  27108. const errorFields = {};
  27109. return asyncMap(series, options, (data, doIt) => {
  27110. const { rule } = data;
  27111. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  27112. deep = deep && (rule.required || !rule.required && data.value);
  27113. rule.field = data.field;
  27114. function addFullfield(key, schema) {
  27115. return { ...schema, fullField: `${rule.fullField}.${key}` };
  27116. }
  27117. function cb(e) {
  27118. if (e === void 0) {
  27119. e = [];
  27120. }
  27121. let errors = e;
  27122. if (!Array.isArray(errors)) {
  27123. errors = [errors];
  27124. }
  27125. if (!options.suppressWarning && errors.length) {
  27126. Schema.warning("async-validator:", errors);
  27127. }
  27128. if (errors.length && rule.message) {
  27129. errors = [].concat(rule.message);
  27130. }
  27131. errors = errors.map(complementError(rule));
  27132. if (options.first && errors.length) {
  27133. errorFields[rule.field] = 1;
  27134. return doIt(errors);
  27135. }
  27136. if (!deep) {
  27137. doIt(errors);
  27138. } else {
  27139. if (rule.required && !data.value) {
  27140. if (rule.message) {
  27141. errors = [].concat(rule.message).map(complementError(rule));
  27142. } else if (options.error) {
  27143. errors = [options.error(rule, format(options.messages.required, rule.field))];
  27144. } else {
  27145. errors = [];
  27146. }
  27147. return doIt(errors);
  27148. }
  27149. let fieldsSchema = {};
  27150. if (rule.defaultField) {
  27151. for (const k in data.value) {
  27152. if (data.value.hasOwnProperty(k)) {
  27153. fieldsSchema[k] = rule.defaultField;
  27154. }
  27155. }
  27156. }
  27157. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  27158. for (const f in fieldsSchema) {
  27159. if (fieldsSchema.hasOwnProperty(f)) {
  27160. const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  27161. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  27162. }
  27163. }
  27164. const schema = new Schema(fieldsSchema);
  27165. schema.messages(options.messages);
  27166. if (data.rule.options) {
  27167. data.rule.options.messages = options.messages;
  27168. data.rule.options.error = options.error;
  27169. }
  27170. schema.validate(data.value, data.rule.options || options, (errs) => {
  27171. const finalErrors = [];
  27172. if (errors && errors.length) {
  27173. finalErrors.push.apply(finalErrors, errors);
  27174. }
  27175. if (errs && errs.length) {
  27176. finalErrors.push.apply(finalErrors, errs);
  27177. }
  27178. doIt(finalErrors.length ? finalErrors : null);
  27179. });
  27180. }
  27181. }
  27182. let res;
  27183. if (rule.asyncValidator) {
  27184. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  27185. } else if (rule.validator) {
  27186. res = rule.validator(rule, data.value, cb, data.source, options);
  27187. if (res === true) {
  27188. cb();
  27189. } else if (res === false) {
  27190. cb(rule.message || `${rule.field} fails`);
  27191. } else if (res instanceof Array) {
  27192. cb(res);
  27193. } else if (res instanceof Error) {
  27194. cb(res.message);
  27195. }
  27196. }
  27197. if (res && res.then) {
  27198. res.then(() => cb(), (e) => cb(e));
  27199. }
  27200. }, (results) => {
  27201. complete(results);
  27202. });
  27203. },
  27204. getType: function getType(rule) {
  27205. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  27206. rule.type = "pattern";
  27207. }
  27208. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  27209. throw new Error(format("Unknown rule type %s", rule.type));
  27210. }
  27211. return rule.type || "string";
  27212. },
  27213. getValidationMethod: function getValidationMethod(rule) {
  27214. if (typeof rule.validator === "function") {
  27215. return rule.validator;
  27216. }
  27217. const keys = Object.keys(rule);
  27218. const messageIndex = keys.indexOf("message");
  27219. if (messageIndex !== -1) {
  27220. keys.splice(messageIndex, 1);
  27221. }
  27222. if (keys.length === 1 && keys[0] === "required") {
  27223. return validators.required;
  27224. }
  27225. return validators[this.getType(rule)] || false;
  27226. }
  27227. };
  27228. Schema.register = function register(type2, validator) {
  27229. if (typeof validator !== "function") {
  27230. throw new Error("Cannot register a validator by type, validator is not a function");
  27231. }
  27232. validators[type2] = validator;
  27233. };
  27234. Schema.warning = warning;
  27235. Schema.messages = messages;
  27236. Schema.warning = function() {
  27237. };
  27238. const _sfc_main$1d = {
  27239. name: "u-form",
  27240. mixins: [mpMixin, mixin, props$6],
  27241. provide() {
  27242. return {
  27243. uForm: this
  27244. };
  27245. },
  27246. data() {
  27247. return {
  27248. formRules: {},
  27249. // 规则校验器
  27250. validator: {},
  27251. // 原始的model快照,用于resetFields方法重置表单时使用
  27252. originalModel: null
  27253. };
  27254. },
  27255. watch: {
  27256. // 监听规则的变化
  27257. rules: {
  27258. immediate: true,
  27259. handler(n) {
  27260. this.setRules(n);
  27261. }
  27262. },
  27263. // 监听属性的变化,通知子组件u-form-item重新获取信息
  27264. propsChange(n) {
  27265. var _a;
  27266. if ((_a = this.children) == null ? void 0 : _a.length) {
  27267. this.children.map((child) => {
  27268. typeof child.updateParentData == "function" && child.updateParentData();
  27269. });
  27270. }
  27271. },
  27272. // 监听model的初始值作为重置表单的快照
  27273. model: {
  27274. immediate: true,
  27275. handler(n) {
  27276. if (!this.originalModel) {
  27277. this.originalModel = uni.$u.deepClone(n);
  27278. }
  27279. }
  27280. }
  27281. },
  27282. computed: {
  27283. propsChange() {
  27284. return [
  27285. this.errorType,
  27286. this.borderBottom,
  27287. this.labelPosition,
  27288. this.labelWidth,
  27289. this.labelAlign,
  27290. this.labelStyle
  27291. ];
  27292. }
  27293. },
  27294. created() {
  27295. this.children = [];
  27296. },
  27297. methods: {
  27298. // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
  27299. setRules(rules2) {
  27300. if (Object.keys(rules2).length === 0)
  27301. return;
  27302. if (Object.keys(this.model).length === 0) {
  27303. uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
  27304. return;
  27305. }
  27306. this.formRules = rules2;
  27307. this.validator = new Schema(rules2);
  27308. },
  27309. // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
  27310. resetFields() {
  27311. this.resetModel();
  27312. },
  27313. // 重置model为初始值的快照
  27314. resetModel(obj) {
  27315. this.children.map((child) => {
  27316. const prop = child == null ? void 0 : child.prop;
  27317. const value2 = uni.$u.getProperty(this.originalModel, prop);
  27318. uni.$u.setProperty(this.model, prop, value2);
  27319. });
  27320. },
  27321. // 清空校验结果
  27322. clearValidate(props2) {
  27323. props2 = [].concat(props2);
  27324. this.children.map((child) => {
  27325. if (props2[0] === void 0 || props2.includes(child.prop)) {
  27326. child.message = null;
  27327. }
  27328. });
  27329. },
  27330. // 对部分表单字段进行校验
  27331. async validateField(value2, callback, event = null) {
  27332. this.$nextTick(() => {
  27333. const errorsRes = [];
  27334. value2 = [].concat(value2);
  27335. this.children.map((child) => {
  27336. const childErrors = [];
  27337. if (value2.includes(child.prop)) {
  27338. const propertyVal = uni.$u.getProperty(
  27339. this.model,
  27340. child.prop
  27341. );
  27342. const propertyChain = child.prop.split(".");
  27343. const propertyName = propertyChain[propertyChain.length - 1];
  27344. const rule = this.formRules[child.prop];
  27345. if (!rule)
  27346. return;
  27347. const rules2 = [].concat(rule);
  27348. for (let i = 0; i < rules2.length; i++) {
  27349. const ruleItem = rules2[i];
  27350. const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
  27351. if (event && !trigger.includes(event))
  27352. continue;
  27353. const validator = new Schema({
  27354. [propertyName]: ruleItem
  27355. });
  27356. validator.validate(
  27357. {
  27358. [propertyName]: propertyVal
  27359. },
  27360. (errors, fields) => {
  27361. var _a;
  27362. if (uni.$u.test.array(errors)) {
  27363. errorsRes.push(...errors);
  27364. childErrors.push(...errors);
  27365. }
  27366. child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
  27367. }
  27368. );
  27369. }
  27370. }
  27371. });
  27372. typeof callback === "function" && callback(errorsRes);
  27373. });
  27374. },
  27375. // 校验全部数据
  27376. validate(callback) {
  27377. if (Object.keys(this.formRules).length === 0) {
  27378. uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
  27379. return;
  27380. }
  27381. return new Promise((resolve, reject2) => {
  27382. this.$nextTick(() => {
  27383. const formItemProps = this.children.map(
  27384. (item) => item.prop
  27385. );
  27386. this.validateField(formItemProps, (errors) => {
  27387. if (errors.length) {
  27388. this.errorType === "toast" && uni.$u.toast(errors[0].message);
  27389. reject2(errors);
  27390. } else {
  27391. resolve(true);
  27392. }
  27393. });
  27394. });
  27395. });
  27396. }
  27397. }
  27398. };
  27399. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  27400. return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
  27401. vue.renderSlot(_ctx.$slots, "default")
  27402. ]);
  27403. }
  27404. const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-form/u-form.vue"]]);
  27405. const _sfc_main$1c = {
  27406. data() {
  27407. return {
  27408. companyId: null,
  27409. companyUserId: null,
  27410. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  27411. temps: [],
  27412. usageShow: false,
  27413. usages: [
  27414. {
  27415. name: "图文问诊"
  27416. },
  27417. {
  27418. name: "语音问诊"
  27419. }
  27420. ],
  27421. orderKey: null,
  27422. patient: null,
  27423. inquiryType: null,
  27424. inquirySubType: null,
  27425. orderType: null,
  27426. fileList1: [],
  27427. fileList2: [],
  27428. fileList3: [],
  27429. form: {
  27430. title: ""
  27431. },
  27432. rules: {
  27433. height: [
  27434. {
  27435. required: true,
  27436. message: "请输入身高",
  27437. // 可以单个或者同时写两个触发验证方式
  27438. trigger: ["change", "blur"]
  27439. }
  27440. ],
  27441. weight: [
  27442. {
  27443. required: true,
  27444. message: "请输入体重",
  27445. // 可以单个或者同时写两个触发验证方式
  27446. trigger: ["change", "blur"]
  27447. }
  27448. ],
  27449. mobile: [
  27450. {
  27451. required: true,
  27452. message: "请输入联系电话",
  27453. // 可以单个或者同时写两个触发验证方式
  27454. trigger: ["change", "blur"]
  27455. }
  27456. ]
  27457. }
  27458. };
  27459. },
  27460. onLoad(options) {
  27461. if (!this.$isEmpty(options.isShare)) {
  27462. this.isShare = options.isShare;
  27463. } else {
  27464. uni.hideShareMenu();
  27465. }
  27466. if (!this.$isEmpty(options.companyId)) {
  27467. this.companyId = options.companyId;
  27468. }
  27469. if (!this.$isEmpty(options.companyUserId)) {
  27470. this.companyUserId = options.companyUserId;
  27471. }
  27472. formatAppLog("log", "at pages_order/inquiryForm2_1.vue:349", this.companyId);
  27473. formatAppLog("log", "at pages_order/inquiryForm2_1.vue:350", this.companyUserId);
  27474. this.inquiryType = options.inquiryType;
  27475. this.inquirySubType = options.inquirySubType;
  27476. this.orderType = options.orderType;
  27477. },
  27478. onReady() {
  27479. this.$refs.uForm.setRules(this.rules);
  27480. },
  27481. onShow() {
  27482. if (this.$isLogin()) {
  27483. if (!this.$isEmpty(this.companyUserId)) {
  27484. let data = { companyUserId: this.companyUserId };
  27485. bindCompanyUser(data).then(
  27486. (res) => {
  27487. if (res.code == 200)
  27488. ;
  27489. },
  27490. (rej) => {
  27491. }
  27492. );
  27493. }
  27494. }
  27495. var that = this;
  27496. uni.$on("refreshOrderPatient", (res) => {
  27497. that.patient = res;
  27498. });
  27499. this.confirm();
  27500. },
  27501. onShareAppMessage(res) {
  27502. uni.showShareMenu({
  27503. withShareTicket: true
  27504. });
  27505. wx.updateShareMenu({
  27506. isPrivateMessage: true,
  27507. withShareTicket: true,
  27508. success(res2) {
  27509. formatAppLog("log", "at pages_order/inquiryForm2_1.vue:388", "updateShareMenu: ", res2);
  27510. },
  27511. fail() {
  27512. }
  27513. });
  27514. return {
  27515. title: "御君方互联网医院--健康会诊",
  27516. path: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + this.inquirySubType + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  27517. };
  27518. },
  27519. methods: {
  27520. showImg(type2) {
  27521. if (type2 == 1) {
  27522. var imgs = [
  27523. "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0640bd4b80ba4491842b9d20d7238616.png"
  27524. ];
  27525. uni.previewImage({
  27526. current: 0,
  27527. urls: imgs
  27528. });
  27529. } else if (type2 == 2) {
  27530. var imgs = [
  27531. "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/2c9f24e5c3fc458f8bcb30a4fb0619be.png"
  27532. ];
  27533. uni.previewImage({
  27534. current: 0,
  27535. urls: imgs
  27536. });
  27537. }
  27538. },
  27539. leftClick() {
  27540. formatAppLog("log", "at pages_order/inquiryForm2_1.vue:422", "leftClick");
  27541. uni.showModal({
  27542. title: "提示",
  27543. content: "确认关闭吗",
  27544. success: function(res) {
  27545. if (res.confirm) {
  27546. uni.navigateBack();
  27547. } else if (res.cancel)
  27548. ;
  27549. }
  27550. });
  27551. },
  27552. confirm() {
  27553. let data = {};
  27554. confirm(data).then(
  27555. (res) => {
  27556. if (res.code == 200) {
  27557. this.orderKey = res.orderKey;
  27558. }
  27559. },
  27560. (rej) => {
  27561. }
  27562. );
  27563. },
  27564. usageSelect(e) {
  27565. this.form.usage = e.name;
  27566. this.$refs.uForm.validateField("usage");
  27567. },
  27568. submitOrder() {
  27569. if (this.patient == null) {
  27570. uni.showToast({
  27571. icon: "none",
  27572. title: "请选择就诊人"
  27573. });
  27574. return;
  27575. }
  27576. if (this.orderKey == null) {
  27577. this.confirm();
  27578. }
  27579. var reportImages = [];
  27580. this.fileList3.forEach(function(element) {
  27581. reportImages.push(element.url);
  27582. });
  27583. var tongueImages = [];
  27584. this.fileList1.forEach(function(element) {
  27585. tongueImages.push(element.url);
  27586. });
  27587. var faceImages = [];
  27588. this.fileList2.forEach(function(element) {
  27589. faceImages.push(element.url);
  27590. });
  27591. var that = this;
  27592. this.$refs.uForm.validate().then((res) => {
  27593. var data = {
  27594. companyId: that.companyId,
  27595. companyUserId: that.companyUserId,
  27596. orderKey: that.orderKey,
  27597. patientId: that.patient.patientId,
  27598. title: that.form.title,
  27599. inquiryType: that.inquiryType,
  27600. inquirySubType: that.inquirySubType,
  27601. orderType: that.orderType,
  27602. doctorId: that.doctorId,
  27603. height: that.form.height,
  27604. weight: that.form.weight,
  27605. mobile: that.form.mobile,
  27606. // study:that.form.study,
  27607. medication: that.form.medication,
  27608. usage: that.form.usage,
  27609. reportImages: reportImages.toString(),
  27610. tongueImages: tongueImages.toString(),
  27611. faceImages: faceImages.toString()
  27612. // formJson:JSON.stringify(forms)
  27613. };
  27614. uni.showLoading({
  27615. title: "正在处理中..."
  27616. });
  27617. create(data).then(
  27618. (res2) => {
  27619. uni.hideLoading();
  27620. if (res2.code == 200) {
  27621. var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
  27622. uni.requestSubscribeMessage({
  27623. tmplIds: temps,
  27624. success(e) {
  27625. setTimeout(function() {
  27626. uni.redirectTo({
  27627. url: "./inquiryPay?orderId=" + res2.order.orderId
  27628. });
  27629. }, 200);
  27630. },
  27631. fail(e) {
  27632. setTimeout(function() {
  27633. uni.redirectTo({
  27634. url: "./inquiryPay?orderId=" + res2.order.orderId
  27635. });
  27636. }, 200);
  27637. }
  27638. });
  27639. return;
  27640. } else {
  27641. uni.showToast({
  27642. icon: "none",
  27643. title: res2.msg
  27644. });
  27645. }
  27646. },
  27647. (rej) => {
  27648. }
  27649. );
  27650. }).catch((errors) => {
  27651. });
  27652. },
  27653. // getInquiryTemp(){
  27654. // let data = {};
  27655. // getInquiryTemp(data).then(
  27656. // res => {
  27657. // if(res.code==200){
  27658. // this.temps=res.data;
  27659. // this.temps.forEach(function(element) {
  27660. // element.options=JSON.parse(element.itemJson)
  27661. // });
  27662. // // this.temps1=temps.filter((item) => {
  27663. // // return item.tempType==1;
  27664. // // });
  27665. // // this.temps2=temps.filter((item) => {
  27666. // // return item.tempType==2;
  27667. // // });
  27668. // // this.temps3=temps.filter((item) => {
  27669. // // return item.tempType==3;
  27670. // // });
  27671. // // this.temps4=temps.filter((item) => {
  27672. // // return item.tempType==4;
  27673. // // });
  27674. // __f__('log','at pages_order/inquiryForm2_1.vue:566',this.temps1)
  27675. // }
  27676. // },
  27677. // rej => {}
  27678. // );
  27679. // },
  27680. addPatient() {
  27681. uni.navigateTo({
  27682. url: "/pages_user/patient"
  27683. });
  27684. },
  27685. deletePic(event) {
  27686. this[`fileList${event.name}`].splice(event.index, 1);
  27687. },
  27688. async afterRead(event) {
  27689. let lists = [].concat(event.file);
  27690. let fileListLen = this[`fileList${event.name}`].length;
  27691. lists.map((item) => {
  27692. this[`fileList${event.name}`].push({
  27693. ...item,
  27694. status: "uploading",
  27695. message: "上传中"
  27696. });
  27697. });
  27698. for (let i = 0; i < lists.length; i++) {
  27699. const result = await this.uploadFilePromise(lists[i].url);
  27700. let item = this[`fileList${event.name}`][fileListLen];
  27701. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  27702. status: "success",
  27703. message: "",
  27704. url: result
  27705. }));
  27706. fileListLen++;
  27707. }
  27708. },
  27709. uploadFilePromise(url2) {
  27710. return new Promise((resolve, reject2) => {
  27711. uni.uploadFile({
  27712. url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
  27713. // 仅为示例,非真实的接口地址
  27714. filePath: url2,
  27715. name: "file",
  27716. formData: {
  27717. user: "test"
  27718. },
  27719. success: (res) => {
  27720. setTimeout(() => {
  27721. formatAppLog("log", "at pages_order/inquiryForm2_1.vue:613", JSON.parse(res.data).url);
  27722. resolve(JSON.parse(res.data).url);
  27723. }, 1e3);
  27724. }
  27725. });
  27726. });
  27727. }
  27728. }
  27729. };
  27730. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  27731. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
  27732. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  27733. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$2);
  27734. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1);
  27735. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  27736. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  27737. const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_2$1);
  27738. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
  27739. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7);
  27740. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  27741. vue.createElementVNode("view", null, [
  27742. vue.createVNode(_component_u_navbar, {
  27743. title: "症状描述",
  27744. onLeftClick: $options.leftClick
  27745. }, null, 8, ["onLeftClick"])
  27746. ]),
  27747. vue.createElementVNode("view", { class: "main" }, [
  27748. vue.createElementVNode(
  27749. "view",
  27750. {
  27751. class: "status_bar",
  27752. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  27753. },
  27754. null,
  27755. 4
  27756. /* STYLE */
  27757. ),
  27758. vue.createVNode(_component_u_alert, {
  27759. fontSize: "16",
  27760. type: "primary",
  27761. description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
  27762. }),
  27763. vue.createElementVNode("view", { class: "chose-patient" }, [
  27764. $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
  27765. key: 0,
  27766. class: "title-box",
  27767. onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
  27768. }, [
  27769. vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
  27770. vue.createElementVNode("view", { class: "right" }, [
  27771. vue.createElementVNode("text", { class: "value" }, "请点击添加"),
  27772. vue.createElementVNode("image", {
  27773. src: "/static/images/arrow_gray.png",
  27774. mode: ""
  27775. })
  27776. ])
  27777. ])) : vue.createCommentVNode("v-if", true),
  27778. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  27779. key: 1,
  27780. class: "patient",
  27781. onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
  27782. }, [
  27783. vue.createElementVNode("view", { class: "left" }, [
  27784. vue.createElementVNode(
  27785. "view",
  27786. { class: "name" },
  27787. vue.toDisplayString($data.patient.patientName),
  27788. 1
  27789. /* TEXT */
  27790. ),
  27791. vue.createElementVNode("view", { class: "info" }, [
  27792. $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  27793. key: 0,
  27794. class: "text"
  27795. }, "男")) : vue.createCommentVNode("v-if", true),
  27796. $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  27797. key: 1,
  27798. class: "text"
  27799. }, "女")) : vue.createCommentVNode("v-if", true),
  27800. vue.createElementVNode(
  27801. "text",
  27802. { class: "text" },
  27803. vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
  27804. 1
  27805. /* TEXT */
  27806. ),
  27807. vue.createElementVNode(
  27808. "text",
  27809. { class: "text" },
  27810. vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
  27811. 1
  27812. /* TEXT */
  27813. )
  27814. ])
  27815. ]),
  27816. vue.createElementVNode("view", { class: "right" }, [
  27817. vue.createElementVNode("image", {
  27818. src: "/static/images/arrow_gray.png",
  27819. mode: ""
  27820. })
  27821. ])
  27822. ])) : vue.createCommentVNode("v-if", true)
  27823. ]),
  27824. vue.createElementVNode("view", { class: "cont" }, [
  27825. vue.createVNode(_component_u_form, {
  27826. rules: $data.rules,
  27827. model: $data.form,
  27828. ref: "uForm",
  27829. labelPosition: "left"
  27830. }, {
  27831. default: vue.withCtx(() => [
  27832. vue.createElementVNode("view", { class: "title-box" }, [
  27833. vue.createElementVNode("view", { class: "line" }),
  27834. vue.createElementVNode("view", { class: "title" }, "您的基本情况填写")
  27835. ]),
  27836. vue.createElementVNode("view", { class: "form" }, [
  27837. vue.createVNode(_component_u_form_item, {
  27838. required: true,
  27839. labelWidth: "200rpx",
  27840. borderBottom: "",
  27841. label: "身高(厘米)",
  27842. prop: "height"
  27843. }, {
  27844. default: vue.withCtx(() => [
  27845. vue.createVNode(_component_u_input, {
  27846. type: "number",
  27847. border: "none",
  27848. placeholder: "请输入身高",
  27849. modelValue: $data.form.height,
  27850. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.height = $event)
  27851. }, null, 8, ["modelValue"])
  27852. ]),
  27853. _: 1
  27854. /* STABLE */
  27855. }),
  27856. vue.createVNode(_component_u_form_item, {
  27857. required: true,
  27858. labelWidth: "200rpx",
  27859. borderBottom: "",
  27860. label: "体重(公斤)",
  27861. prop: "weight"
  27862. }, {
  27863. default: vue.withCtx(() => [
  27864. vue.createVNode(_component_u_input, {
  27865. type: "number",
  27866. border: "none",
  27867. placeholder: "请输入体重",
  27868. modelValue: $data.form.weight,
  27869. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.weight = $event)
  27870. }, null, 8, ["modelValue"])
  27871. ]),
  27872. _: 1
  27873. /* STABLE */
  27874. }),
  27875. vue.createVNode(_component_u_form_item, {
  27876. required: true,
  27877. labelWidth: "200rpx",
  27878. maxlength: "11",
  27879. borderBottom: "",
  27880. label: "联系电话",
  27881. prop: "mobile"
  27882. }, {
  27883. default: vue.withCtx(() => [
  27884. vue.createVNode(_component_u_input, {
  27885. type: "number",
  27886. border: "none",
  27887. placeholder: "请输入电话",
  27888. modelValue: $data.form.mobile,
  27889. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.form.mobile = $event)
  27890. }, null, 8, ["modelValue"])
  27891. ]),
  27892. _: 1
  27893. /* STABLE */
  27894. }),
  27895. vue.createCommentVNode(' <u-form-item :required="true" labelWidth="200rpx" borderBottom label="学习进度" prop="study">\r\n <u-input border="none" placeholder="请输入第几期第几课" v-model="form.study" />\r\n </u-form-item> '),
  27896. vue.createVNode(_component_u_form_item, {
  27897. required: true,
  27898. labelWidth: "200rpx",
  27899. borderBottom: "",
  27900. label: "用药情况",
  27901. prop: "medication"
  27902. }, {
  27903. default: vue.withCtx(() => [
  27904. vue.createVNode(_component_u__textarea, {
  27905. modelValue: $data.form.medication,
  27906. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.medication = $event),
  27907. placeholder: "请输入用药情况",
  27908. count: ""
  27909. }, null, 8, ["modelValue"])
  27910. ]),
  27911. _: 1
  27912. /* STABLE */
  27913. }),
  27914. vue.createVNode(_component_u_form_item, {
  27915. required: true,
  27916. onClick: _cache[7] || (_cache[7] = ($event) => {
  27917. $data.usageShow = true;
  27918. }),
  27919. labelWidth: "200rpx",
  27920. label: "期望会诊方式",
  27921. prop: "usage"
  27922. }, {
  27923. right: vue.withCtx(() => [
  27924. vue.createVNode(_component_u_icon, { name: "arrow-right" })
  27925. ]),
  27926. default: vue.withCtx(() => [
  27927. vue.createVNode(_component_u_input, {
  27928. modelValue: $data.form.usage,
  27929. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.form.usage = $event),
  27930. disabled: "",
  27931. disabledColor: "#ffffff",
  27932. placeholder: "请选择",
  27933. border: "none"
  27934. }, null, 8, ["modelValue"])
  27935. ]),
  27936. _: 1
  27937. /* STABLE */
  27938. }),
  27939. vue.createVNode(_component_u_action_sheet, {
  27940. show: $data.usageShow,
  27941. actions: $data.usages,
  27942. title: "请选择",
  27943. onClose: _cache[8] || (_cache[8] = ($event) => $data.usageShow = false),
  27944. onSelect: $options.usageSelect
  27945. }, null, 8, ["show", "actions", "onSelect"])
  27946. ]),
  27947. vue.createCommentVNode(' <view class="title-box">\r\n <view class="line"></view>\r\n <view class="title">您的头面部健康状况自我检查</view>\r\n </view>\r\n <view class="form">\r\n <view class="option-box">\r\n <view class="option-item" v-for="(item,index) in temps" >\r\n <view v-if="item.tempType==1" class="title">{{index+1}} {{item.title}}</view>\r\n <view class="options">\r\n <u-checkbox-group\r\n v-if="item.tempType==1"\r\n v-model="item.checks"\r\n placement="column"\r\n >\r\n <u-checkbox\r\n size="28"\r\n shape="circle"\r\n activeColor="#C39A58"\r\n v-for="(option, subIndex) in item.options"\r\n :key="option.name"\r\n :label="option.name"\r\n :name="option.name"\r\n >\r\n </u-checkbox>\r\n </u-checkbox-group>\r\n </view>\r\n \r\n </view>\r\n </view>\r\n </view>\r\n <view class="title-box">\r\n <view class="line"></view>\r\n <view class="title">您的四肢肩颈健康状况自我检查</view>\r\n </view>\r\n <view class="form">\r\n <view class="option-box">\r\n <view class="option-item" v-for="(item,index) in temps" >\r\n <view v-if="item.tempType==2" class="title">{{index+1}} {{item.title}}</view>\r\n <view class="options">\r\n <u-checkbox-group\r\n v-if="item.tempType==2"\r\n v-model="item.checks"\r\n placement="column"\r\n >\r\n <u-checkbox\r\n size="28"\r\n shape="circle"\r\n activeColor="#C39A58"\r\n v-for="(option, subIndex) in item.options"\r\n :key="option.name"\r\n :label="option.name"\r\n :name="option.name"\r\n >\r\n </u-checkbox>\r\n </u-checkbox-group>\r\n </view>\r\n \r\n </view>\r\n </view>\r\n \r\n \r\n </view>\r\n <view class="title-box">\r\n <view class="line"></view>\r\n <view class="title">您的胸腹部健康状况自我检查</view>\r\n </view>\r\n <view class="form">\r\n <view class="option-box">\r\n <view class="option-item" v-for="(item,index) in temps" >\r\n <view v-if="item.tempType==3" class="title">{{index+1}} {{item.title}}</view>\r\n <view class="options">\r\n <u-checkbox-group\r\n v-if="item.tempType==3"\r\n v-model="item.checks"\r\n placement="column"\r\n >\r\n <u-checkbox\r\n size="28"\r\n shape="circle"\r\n activeColor="#C39A58"\r\n v-for="(option, subIndex) in item.options"\r\n :key="option.name"\r\n :label="option.name"\r\n :name="option.name"\r\n >\r\n </u-checkbox>\r\n </u-checkbox-group>\r\n </view>\r\n \r\n </view>\r\n </view>\r\n </view>\r\n <view class="title-box">\r\n <view class="line"></view>\r\n <view class="title">其他身体状况自我检查</view>\r\n </view>\r\n <view class="form">\r\n <view class="option-box">\r\n <view class="option-item" v-for="(item,index) in temps" >\r\n <view v-if="item.tempType==4" class="title">{{index+1}} {{item.title}}</view>\r\n <view class="options">\r\n <u-checkbox-group\r\n v-if="item.tempType==4"\r\n v-model="item.checks"\r\n placement="column"\r\n >\r\n <u-checkbox\r\n size="28"\r\n shape="circle"\r\n activeColor="#C39A58"\r\n v-for="(option, subIndex) in item.options"\r\n :key="option.name"\r\n :label="option.name"\r\n :name="option.name"\r\n >\r\n </u-checkbox>\r\n </u-checkbox-group>\r\n </view>\r\n \r\n </view>\r\n </view>\r\n \r\n </view> '),
  27948. vue.createElementVNode("view", { class: "title-box" }, [
  27949. vue.createElementVNode("view", { class: "line" }),
  27950. vue.createElementVNode("view", { class: "title" }, "补充信息")
  27951. ]),
  27952. vue.createElementVNode("view", { class: "form" }, [
  27953. vue.createVNode(_component_u_form_item, {
  27954. labelWidth: "140rpx",
  27955. borderBottom: "",
  27956. label: "舌苔照片",
  27957. prop: "avatar"
  27958. }, {
  27959. default: vue.withCtx(() => [
  27960. vue.createElementVNode("view", { class: "form-item" }, [
  27961. vue.createElementVNode("image", {
  27962. onClick: _cache[9] || (_cache[9] = ($event) => $options.showImg(1)),
  27963. class: "icon",
  27964. src: "/static/images/question.png"
  27965. }),
  27966. vue.createVNode(_component_u_upload, {
  27967. fileList: $data.fileList1,
  27968. onAfterRead: $options.afterRead,
  27969. onDelete: $options.deletePic,
  27970. name: "1",
  27971. multiple: "",
  27972. maxCount: 4
  27973. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  27974. ])
  27975. ]),
  27976. _: 1
  27977. /* STABLE */
  27978. }),
  27979. vue.createVNode(_component_u_form_item, {
  27980. labelWidth: "140rpx",
  27981. borderBottom: "",
  27982. label: "面部照片",
  27983. prop: "avatar"
  27984. }, {
  27985. default: vue.withCtx(() => [
  27986. vue.createElementVNode("view", { class: "form-item" }, [
  27987. vue.createElementVNode("image", {
  27988. onClick: _cache[10] || (_cache[10] = ($event) => $options.showImg(2)),
  27989. class: "icon",
  27990. src: "/static/images/question.png"
  27991. }),
  27992. vue.createVNode(_component_u_upload, {
  27993. fileList: $data.fileList2,
  27994. onAfterRead: $options.afterRead,
  27995. onDelete: $options.deletePic,
  27996. name: "2",
  27997. multiple: "",
  27998. maxCount: 4
  27999. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  28000. ])
  28001. ]),
  28002. _: 1
  28003. /* STABLE */
  28004. }),
  28005. vue.createVNode(_component_u_form_item, {
  28006. labelWidth: "140rpx",
  28007. borderBottom: "",
  28008. label: "相关报告",
  28009. prop: "avatar"
  28010. }, {
  28011. default: vue.withCtx(() => [
  28012. vue.createElementVNode("view", { class: "form-item" }, [
  28013. vue.createElementVNode("view", { class: "icon" }),
  28014. vue.createVNode(_component_u_upload, {
  28015. fileList: $data.fileList3,
  28016. onAfterRead: $options.afterRead,
  28017. onDelete: $options.deletePic,
  28018. name: "3",
  28019. multiple: "",
  28020. maxCount: 4
  28021. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  28022. ])
  28023. ]),
  28024. _: 1
  28025. /* STABLE */
  28026. }),
  28027. vue.createVNode(_component_u_form_item, {
  28028. required: true,
  28029. labelWidth: "200rpx",
  28030. label: "您最想咨询医生的问题是什么?",
  28031. prop: "title"
  28032. }, {
  28033. default: vue.withCtx(() => [
  28034. vue.createVNode(_component_u__textarea, {
  28035. modelValue: $data.form.title,
  28036. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.title = $event),
  28037. placeholder: "请输入内容",
  28038. count: ""
  28039. }, null, 8, ["modelValue"])
  28040. ]),
  28041. _: 1
  28042. /* STABLE */
  28043. })
  28044. ])
  28045. ]),
  28046. _: 1
  28047. /* STABLE */
  28048. }, 8, ["rules", "model"])
  28049. ])
  28050. ]),
  28051. vue.createElementVNode("view", { class: "btn-box" }, [
  28052. vue.createElementVNode("view", {
  28053. class: "btn",
  28054. onClick: _cache[12] || (_cache[12] = ($event) => $options.submitOrder())
  28055. }, "预约会诊")
  28056. ])
  28057. ]);
  28058. }
  28059. const Pages_orderInquiryForm2_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-a4f9ba6d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm2_1.vue"]]);
  28060. const props$5 = {
  28061. props: {
  28062. // checkbox的名称
  28063. name: {
  28064. type: [String, Number, Boolean],
  28065. default: props$y.checkbox.name
  28066. },
  28067. // 形状,square为方形,circle为圆型
  28068. shape: {
  28069. type: String,
  28070. default: props$y.checkbox.shape
  28071. },
  28072. // 整体的大小
  28073. size: {
  28074. type: [String, Number],
  28075. default: props$y.checkbox.size
  28076. },
  28077. // 是否默认选中
  28078. checked: {
  28079. type: Boolean,
  28080. default: props$y.checkbox.checked
  28081. },
  28082. // 是否禁用
  28083. disabled: {
  28084. type: [String, Boolean],
  28085. default: props$y.checkbox.disabled
  28086. },
  28087. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  28088. activeColor: {
  28089. type: String,
  28090. default: props$y.checkbox.activeColor
  28091. },
  28092. // 未选中的颜色
  28093. inactiveColor: {
  28094. type: String,
  28095. default: props$y.checkbox.inactiveColor
  28096. },
  28097. // 图标的大小,单位px
  28098. iconSize: {
  28099. type: [String, Number],
  28100. default: props$y.checkbox.iconSize
  28101. },
  28102. // 图标颜色
  28103. iconColor: {
  28104. type: String,
  28105. default: props$y.checkbox.iconColor
  28106. },
  28107. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  28108. label: {
  28109. type: [String, Number],
  28110. default: props$y.checkbox.label
  28111. },
  28112. // label的字体大小,px单位
  28113. labelSize: {
  28114. type: [String, Number],
  28115. default: props$y.checkbox.labelSize
  28116. },
  28117. // label的颜色
  28118. labelColor: {
  28119. type: String,
  28120. default: props$y.checkbox.labelColor
  28121. },
  28122. // 是否禁止点击提示语选中复选框
  28123. labelDisabled: {
  28124. type: [String, Boolean],
  28125. default: props$y.checkbox.labelDisabled
  28126. }
  28127. }
  28128. };
  28129. const _sfc_main$1b = {
  28130. name: "u-checkbox",
  28131. mixins: [mpMixin, mixin, props$5],
  28132. data() {
  28133. return {
  28134. isChecked: false,
  28135. // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
  28136. // 故只能使用如此方法
  28137. parentData: {
  28138. iconSize: 12,
  28139. labelDisabled: null,
  28140. disabled: null,
  28141. shape: "square",
  28142. activeColor: null,
  28143. inactiveColor: null,
  28144. size: 18,
  28145. modelValue: null,
  28146. iconColor: null,
  28147. placement: "row",
  28148. borderBottom: false,
  28149. iconPlacement: "left"
  28150. }
  28151. };
  28152. },
  28153. computed: {
  28154. // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
  28155. elDisabled() {
  28156. return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
  28157. },
  28158. // 是否禁用label点击
  28159. elLabelDisabled() {
  28160. return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
  28161. },
  28162. // 组件尺寸,对应size的值,默认值为21px
  28163. elSize() {
  28164. return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
  28165. },
  28166. // 组件的勾选图标的尺寸,默认12px
  28167. elIconSize() {
  28168. return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
  28169. },
  28170. // 组件选中激活时的颜色
  28171. elActiveColor() {
  28172. return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
  28173. },
  28174. // 组件选未中激活时的颜色
  28175. elInactiveColor() {
  28176. return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
  28177. },
  28178. // label的颜色
  28179. elLabelColor() {
  28180. return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
  28181. },
  28182. // 组件的形状
  28183. elShape() {
  28184. return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
  28185. },
  28186. // label大小
  28187. elLabelSize() {
  28188. return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
  28189. },
  28190. elIconColor() {
  28191. const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
  28192. if (this.elDisabled) {
  28193. return this.isChecked ? this.elInactiveColor : "transparent";
  28194. } else {
  28195. return this.isChecked ? iconColor : "transparent";
  28196. }
  28197. },
  28198. iconClasses() {
  28199. let classes = [];
  28200. classes.push("u-checkbox__icon-wrap--" + this.elShape);
  28201. if (this.elDisabled) {
  28202. classes.push("u-checkbox__icon-wrap--disabled");
  28203. }
  28204. if (this.isChecked && this.elDisabled) {
  28205. classes.push("u-checkbox__icon-wrap--disabled--checked");
  28206. }
  28207. return classes;
  28208. },
  28209. iconWrapStyle() {
  28210. const style = {};
  28211. style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff";
  28212. style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
  28213. style.width = uni.$u.addUnit(this.elSize);
  28214. style.height = uni.$u.addUnit(this.elSize);
  28215. if (this.parentData.iconPlacement === "right") {
  28216. style.marginRight = 0;
  28217. }
  28218. return style;
  28219. },
  28220. checkboxStyle() {
  28221. const style = {};
  28222. if (this.parentData.borderBottom && this.parentData.placement === "row") {
  28223. uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效");
  28224. }
  28225. if (this.parentData.borderBottom && this.parentData.placement === "column") {
  28226. style.paddingBottom = "8px";
  28227. }
  28228. return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
  28229. }
  28230. },
  28231. mounted() {
  28232. this.init();
  28233. },
  28234. methods: {
  28235. init() {
  28236. this.updateParentData();
  28237. if (!this.parent) {
  28238. uni.$u.error("u-checkbox必须搭配u-checkbox-group组件使用");
  28239. }
  28240. const value2 = this.parentData.modelValue;
  28241. if (this.checked) {
  28242. this.isChecked = true;
  28243. } else if (uni.$u.test.array(value2)) {
  28244. this.isChecked = value2.some((item) => {
  28245. return item === this.name;
  28246. });
  28247. }
  28248. },
  28249. updateParentData() {
  28250. this.getParentData("u-checkbox-group");
  28251. },
  28252. // 横向两端排列时,点击组件即可触发选中事件
  28253. wrapperClickHandler(e) {
  28254. this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
  28255. },
  28256. // 点击图标
  28257. iconClickHandler(e) {
  28258. this.preventEvent(e);
  28259. if (!this.elDisabled) {
  28260. this.setRadioCheckedStatus();
  28261. }
  28262. },
  28263. // 点击label
  28264. labelClickHandler(e) {
  28265. this.preventEvent(e);
  28266. if (!this.elLabelDisabled && !this.elDisabled) {
  28267. this.setRadioCheckedStatus();
  28268. }
  28269. },
  28270. emitEvent() {
  28271. this.$emit("change", this.isChecked);
  28272. this.$nextTick(() => {
  28273. uni.$u.formValidate(this, "change");
  28274. });
  28275. },
  28276. // 改变组件选中状态
  28277. // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例
  28278. // 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
  28279. setRadioCheckedStatus() {
  28280. this.isChecked = !this.isChecked;
  28281. this.emitEvent();
  28282. typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
  28283. }
  28284. },
  28285. watch: {
  28286. checked() {
  28287. this.isChecked = this.checked;
  28288. }
  28289. }
  28290. };
  28291. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  28292. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  28293. return vue.openBlock(), vue.createElementBlock(
  28294. "view",
  28295. {
  28296. class: vue.normalizeClass(["u-checkbox", [`u-checkbox-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
  28297. style: vue.normalizeStyle([$options.checkboxStyle]),
  28298. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"]))
  28299. },
  28300. [
  28301. vue.createElementVNode(
  28302. "view",
  28303. {
  28304. class: vue.normalizeClass(["u-checkbox__icon-wrap", $options.iconClasses]),
  28305. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
  28306. style: vue.normalizeStyle([$options.iconWrapStyle])
  28307. },
  28308. [
  28309. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  28310. vue.createVNode(_component_u_icon, {
  28311. class: "u-checkbox__icon-wrap__icon",
  28312. name: "checkbox-mark",
  28313. size: $options.elIconSize,
  28314. color: $options.elIconColor
  28315. }, null, 8, ["size", "color"])
  28316. ], true)
  28317. ],
  28318. 6
  28319. /* CLASS, STYLE */
  28320. ),
  28321. vue.createElementVNode(
  28322. "text",
  28323. {
  28324. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
  28325. style: vue.normalizeStyle({
  28326. color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
  28327. fontSize: $options.elLabelSize,
  28328. lineHeight: $options.elLabelSize
  28329. })
  28330. },
  28331. vue.toDisplayString(_ctx.label),
  28332. 5
  28333. /* TEXT, STYLE */
  28334. )
  28335. ],
  28336. 6
  28337. /* CLASS, STYLE */
  28338. );
  28339. }
  28340. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-41713600"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue"]]);
  28341. const props$4 = {
  28342. props: {
  28343. // 标识符
  28344. name: {
  28345. type: String,
  28346. default: props$y.checkboxGroup.name
  28347. },
  28348. // 绑定的值
  28349. modelValue: {
  28350. type: Array,
  28351. default: props$y.checkboxGroup.value
  28352. },
  28353. // 形状,circle-圆形,square-方形
  28354. shape: {
  28355. type: String,
  28356. default: props$y.checkboxGroup.shape
  28357. },
  28358. // 是否禁用全部checkbox
  28359. disabled: {
  28360. type: Boolean,
  28361. default: props$y.checkboxGroup.disabled
  28362. },
  28363. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  28364. activeColor: {
  28365. type: String,
  28366. default: props$y.checkboxGroup.activeColor
  28367. },
  28368. // 未选中的颜色
  28369. inactiveColor: {
  28370. type: String,
  28371. default: props$y.checkboxGroup.inactiveColor
  28372. },
  28373. // 整个组件的尺寸,默认px
  28374. size: {
  28375. type: [String, Number],
  28376. default: props$y.checkboxGroup.size
  28377. },
  28378. // 布局方式,row-横向,column-纵向
  28379. placement: {
  28380. type: String,
  28381. default: props$y.checkboxGroup.placement
  28382. },
  28383. // label的字体大小,px单位
  28384. labelSize: {
  28385. type: [String, Number],
  28386. default: props$y.checkboxGroup.labelSize
  28387. },
  28388. // label的字体颜色
  28389. labelColor: {
  28390. type: [String],
  28391. default: props$y.checkboxGroup.labelColor
  28392. },
  28393. // 是否禁止点击文本操作
  28394. labelDisabled: {
  28395. type: Boolean,
  28396. default: props$y.checkboxGroup.labelDisabled
  28397. },
  28398. // 图标颜色
  28399. iconColor: {
  28400. type: String,
  28401. default: props$y.checkboxGroup.iconColor
  28402. },
  28403. // 图标的大小,单位px
  28404. iconSize: {
  28405. type: [String, Number],
  28406. default: props$y.checkboxGroup.iconSize
  28407. },
  28408. // 勾选图标的对齐方式,left-左边,right-右边
  28409. iconPlacement: {
  28410. type: String,
  28411. default: props$y.checkboxGroup.iconPlacement
  28412. },
  28413. // 竖向配列时,是否显示下划线
  28414. borderBottom: {
  28415. type: Boolean,
  28416. default: props$y.checkboxGroup.borderBottom
  28417. }
  28418. }
  28419. };
  28420. const _sfc_main$1a = {
  28421. name: "u-checkbox-group",
  28422. mixins: [mpMixin, mixin, props$4],
  28423. computed: {
  28424. // 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
  28425. // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group)
  28426. // 拉取父组件新的变化后的参数
  28427. parentData() {
  28428. return [
  28429. this.modelValue,
  28430. this.disabled,
  28431. this.inactiveColor,
  28432. this.activeColor,
  28433. this.size,
  28434. this.labelDisabled,
  28435. this.shape,
  28436. this.iconSize,
  28437. this.borderBottom,
  28438. this.placement
  28439. ];
  28440. },
  28441. bemClass() {
  28442. return this.bem("checkbox-group", ["placement"]);
  28443. }
  28444. },
  28445. watch: {
  28446. // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
  28447. parentData: {
  28448. handler() {
  28449. if (this.children.length) {
  28450. this.children.map((child) => {
  28451. typeof child.init === "function" && child.init();
  28452. });
  28453. }
  28454. },
  28455. deep: true
  28456. }
  28457. },
  28458. data() {
  28459. return {};
  28460. },
  28461. created() {
  28462. this.children = [];
  28463. },
  28464. emits: ["update:modelValue", "change"],
  28465. methods: {
  28466. // 将其他的checkbox设置为未选中的状态
  28467. unCheckedOther(childInstance) {
  28468. const values = [];
  28469. this.children.map((child) => {
  28470. if (child.isChecked) {
  28471. values.push(child.name);
  28472. }
  28473. });
  28474. this.$emit("change", values);
  28475. this.$emit("update:modelValue", values);
  28476. }
  28477. }
  28478. };
  28479. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  28480. return vue.openBlock(), vue.createElementBlock(
  28481. "view",
  28482. {
  28483. class: vue.normalizeClass(["u-checkbox-group", $options.bemClass])
  28484. },
  28485. [
  28486. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28487. ],
  28488. 2
  28489. /* CLASS */
  28490. );
  28491. }
  28492. const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-ff0492f0"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue"]]);
  28493. const _sfc_main$19 = {
  28494. data() {
  28495. return {
  28496. companyId: null,
  28497. companyUserId: null,
  28498. temps: [],
  28499. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  28500. orderKey: null,
  28501. patient: null,
  28502. durations: [
  28503. {
  28504. name: "一周内",
  28505. disabled: false
  28506. },
  28507. {
  28508. name: "一个月内",
  28509. disabled: false
  28510. },
  28511. {
  28512. name: "半年内",
  28513. disabled: false
  28514. },
  28515. {
  28516. name: "半年以上",
  28517. disabled: false
  28518. }
  28519. ],
  28520. isVisits: [
  28521. {
  28522. name: "未就诊",
  28523. disabled: false
  28524. },
  28525. {
  28526. name: "就诊过",
  28527. disabled: false
  28528. }
  28529. ],
  28530. form: {
  28531. title: "",
  28532. drug: "",
  28533. isVisit: "就诊过",
  28534. duration: "一周内"
  28535. },
  28536. rules: {
  28537. title: [
  28538. {
  28539. required: true,
  28540. message: "请输入您的病情",
  28541. // 可以单个或者同时写两个触发验证方式
  28542. trigger: ["change", "blur"]
  28543. }
  28544. ],
  28545. drugs: [
  28546. {
  28547. required: true,
  28548. message: "请输入正在服用药品",
  28549. // 可以单个或者同时写两个触发验证方式
  28550. trigger: ["change", "blur"]
  28551. }
  28552. ],
  28553. durations: [
  28554. {
  28555. required: true,
  28556. message: "请选择本次患病多久",
  28557. // 可以单个或者同时写两个触发验证方式
  28558. trigger: ["change", "blur"]
  28559. }
  28560. ],
  28561. isVisit: [
  28562. {
  28563. required: true,
  28564. message: "请选择是否去医院就诊过",
  28565. // 可以单个或者同时写两个触发验证方式
  28566. trigger: ["change", "blur"]
  28567. }
  28568. ]
  28569. },
  28570. inquiryType: null,
  28571. inquirySubType: null,
  28572. orderType: null,
  28573. doctorId: null,
  28574. fileList1: [],
  28575. fileList2: [],
  28576. fileList3: [],
  28577. isShare: null
  28578. };
  28579. },
  28580. onLoad(options) {
  28581. if (!this.$isEmpty(options.isShare)) {
  28582. this.isShare = options.isShare;
  28583. } else {
  28584. uni.hideShareMenu();
  28585. }
  28586. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:350", options);
  28587. if (!this.$isEmpty(options.companyId)) {
  28588. this.companyId = options.companyId;
  28589. }
  28590. if (!this.$isEmpty(options.companyUserId)) {
  28591. this.companyUserId = options.companyUserId;
  28592. }
  28593. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:357", this.companyId);
  28594. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:358", this.companyUserId);
  28595. this.inquiryType = options.inquiryType;
  28596. this.inquirySubType = options.inquirySubType;
  28597. this.orderType = options.orderType;
  28598. this.doctorId = options.doctorId;
  28599. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:363", this.inquiryType);
  28600. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:364", this.orderType);
  28601. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:365", this.doctorId);
  28602. this.getInquiryTemp();
  28603. },
  28604. onShow() {
  28605. if (this.$isLogin()) {
  28606. if (!this.$isEmpty(this.companyUserId)) {
  28607. let data = { companyUserId: this.companyUserId };
  28608. bindCompanyUser(data).then(
  28609. (res) => {
  28610. if (res.code == 200)
  28611. ;
  28612. },
  28613. (rej) => {
  28614. }
  28615. );
  28616. }
  28617. }
  28618. var that = this;
  28619. uni.$on("refreshOrderPatient", (res) => {
  28620. that.patient = res;
  28621. });
  28622. this.confirm();
  28623. },
  28624. onReady() {
  28625. this.$refs.uForm.setRules(this.rules);
  28626. },
  28627. onShareAppMessage(res) {
  28628. uni.showShareMenu({
  28629. withShareTicket: true
  28630. });
  28631. wx.updateShareMenu({
  28632. isPrivateMessage: true,
  28633. withShareTicket: false,
  28634. success(res2) {
  28635. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:402", "updateShareMenu: ", res2);
  28636. },
  28637. fail() {
  28638. }
  28639. });
  28640. return {
  28641. title: "御君方互联网医院--健康会诊",
  28642. path: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + this.inquirySubType + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  28643. };
  28644. },
  28645. methods: {
  28646. leftClick() {
  28647. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:415", "leftClick");
  28648. uni.showModal({
  28649. title: "提示",
  28650. content: "确认关闭吗",
  28651. success: function(res) {
  28652. if (res.confirm) {
  28653. uni.navigateBack();
  28654. } else if (res.cancel)
  28655. ;
  28656. }
  28657. });
  28658. },
  28659. showImg(type2) {
  28660. if (type2 == 1) {
  28661. var imgs = [
  28662. "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0640bd4b80ba4491842b9d20d7238616.png"
  28663. ];
  28664. uni.previewImage({
  28665. current: 0,
  28666. urls: imgs
  28667. });
  28668. } else if (type2 == 2) {
  28669. var imgs = [
  28670. "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/2c9f24e5c3fc458f8bcb30a4fb0619be.png"
  28671. ];
  28672. uni.previewImage({
  28673. current: 0,
  28674. urls: imgs
  28675. });
  28676. }
  28677. },
  28678. getInquiryTemp() {
  28679. let data = {};
  28680. getInquiryTemp(data).then(
  28681. (res) => {
  28682. if (res.code == 200) {
  28683. this.temps = res.data;
  28684. this.temps.forEach(function(element) {
  28685. element.options = JSON.parse(element.itemJson);
  28686. });
  28687. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:468", this.temps1);
  28688. }
  28689. },
  28690. (rej) => {
  28691. }
  28692. );
  28693. },
  28694. submitOrder() {
  28695. if (this.patient == null) {
  28696. uni.showToast({
  28697. icon: "none",
  28698. title: "请选择就诊人"
  28699. });
  28700. return;
  28701. }
  28702. if (this.orderKey == null) {
  28703. this.confirm();
  28704. }
  28705. var reportImages = [];
  28706. this.fileList1.forEach(function(element) {
  28707. reportImages.push(element.url);
  28708. });
  28709. var tongueImages = [];
  28710. this.fileList2.forEach(function(element) {
  28711. tongueImages.push(element.url);
  28712. });
  28713. var faceImages = [];
  28714. this.fileList3.forEach(function(element) {
  28715. faceImages.push(element.url);
  28716. });
  28717. var forms = [];
  28718. this.temps.forEach(function(element) {
  28719. var item = {
  28720. title: element.title,
  28721. option: element.checks
  28722. };
  28723. forms.push(item);
  28724. });
  28725. var that = this;
  28726. this.$refs.uForm.validate().then((res) => {
  28727. var data = {
  28728. companyId: that.companyId,
  28729. companyUserId: that.companyUserId,
  28730. orderKey: this.orderKey,
  28731. patientId: this.patient.patientId,
  28732. title: this.form.title,
  28733. drugs: this.form.drugs,
  28734. isVisit: this.form.isVisit,
  28735. duration: this.form.duration,
  28736. inquiryType: this.inquiryType,
  28737. inquirySubType: this.inquirySubType,
  28738. orderType: this.orderType,
  28739. doctorId: this.doctorId,
  28740. reportImages: reportImages.toString(),
  28741. tongueImages: tongueImages.toString(),
  28742. faceImages: faceImages.toString(),
  28743. formJson: JSON.stringify(forms)
  28744. };
  28745. uni.showLoading({
  28746. title: "正在处理中..."
  28747. });
  28748. create(data).then(
  28749. (res2) => {
  28750. uni.hideLoading();
  28751. if (res2.code == 200) {
  28752. var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
  28753. uni.requestSubscribeMessage({
  28754. tmplIds: temps,
  28755. success(e) {
  28756. setTimeout(function() {
  28757. uni.redirectTo({
  28758. url: "./inquiryPay?orderId=" + res2.order.orderId
  28759. });
  28760. }, 200);
  28761. },
  28762. fail(e) {
  28763. setTimeout(function() {
  28764. uni.redirectTo({
  28765. url: "./inquiryPay?orderId=" + res2.order.orderId
  28766. });
  28767. }, 200);
  28768. }
  28769. });
  28770. return;
  28771. } else {
  28772. uni.showToast({
  28773. icon: "none",
  28774. title: res2.msg
  28775. });
  28776. }
  28777. },
  28778. (rej) => {
  28779. }
  28780. );
  28781. }).catch((errors) => {
  28782. });
  28783. },
  28784. confirm() {
  28785. let data = {};
  28786. confirm(data).then(
  28787. (res) => {
  28788. if (res.code == 200) {
  28789. this.orderKey = res.orderKey;
  28790. }
  28791. },
  28792. (rej) => {
  28793. }
  28794. );
  28795. },
  28796. addPatient() {
  28797. uni.navigateTo({
  28798. url: "/pages_user/patient"
  28799. });
  28800. },
  28801. deletePic(event) {
  28802. this[`fileList${event.name}`].splice(event.index, 1);
  28803. },
  28804. async afterRead(event) {
  28805. let lists = [].concat(event.file);
  28806. let fileListLen = this[`fileList${event.name}`].length;
  28807. lists.map((item) => {
  28808. this[`fileList${event.name}`].push({
  28809. ...item,
  28810. status: "uploading",
  28811. message: "上传中"
  28812. });
  28813. });
  28814. for (let i = 0; i < lists.length; i++) {
  28815. const result = await this.uploadFilePromise(lists[i].url);
  28816. let item = this[`fileList${event.name}`][fileListLen];
  28817. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  28818. status: "success",
  28819. message: "",
  28820. url: result
  28821. }));
  28822. fileListLen++;
  28823. }
  28824. },
  28825. uploadFilePromise(url2) {
  28826. return new Promise((resolve, reject2) => {
  28827. uni.uploadFile({
  28828. url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
  28829. // 仅为示例,非真实的接口地址
  28830. filePath: url2,
  28831. name: "file",
  28832. formData: {
  28833. user: "test"
  28834. },
  28835. success: (res) => {
  28836. setTimeout(() => {
  28837. formatAppLog("log", "at pages_order/inquiryForm2_2.vue:620", JSON.parse(res.data).url);
  28838. resolve(JSON.parse(res.data).url);
  28839. }, 1e3);
  28840. }
  28841. });
  28842. });
  28843. }
  28844. }
  28845. };
  28846. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  28847. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
  28848. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  28849. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  28850. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1);
  28851. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
  28852. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
  28853. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
  28854. const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
  28855. const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
  28856. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7);
  28857. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  28858. vue.createElementVNode("view", null, [
  28859. vue.createVNode(_component_u_navbar, {
  28860. title: "症状描述",
  28861. onLeftClick: $options.leftClick
  28862. }, null, 8, ["onLeftClick"])
  28863. ]),
  28864. vue.createElementVNode("view", { class: "main" }, [
  28865. vue.createElementVNode(
  28866. "view",
  28867. {
  28868. class: "status_bar",
  28869. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  28870. },
  28871. null,
  28872. 4
  28873. /* STYLE */
  28874. ),
  28875. vue.createVNode(_component_u_alert, {
  28876. fontSize: "16",
  28877. type: "primary",
  28878. description: "尊敬的用户,您好!\n为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
  28879. }),
  28880. vue.createElementVNode("view", { class: "chose-patient" }, [
  28881. $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
  28882. key: 0,
  28883. class: "title-box",
  28884. onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
  28885. }, [
  28886. vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
  28887. vue.createElementVNode("view", { class: "right" }, [
  28888. vue.createElementVNode("text", { class: "value" }, "请点击添加"),
  28889. vue.createElementVNode("image", {
  28890. src: "/static/images/arrow_gray.png",
  28891. mode: ""
  28892. })
  28893. ])
  28894. ])) : vue.createCommentVNode("v-if", true),
  28895. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  28896. key: 1,
  28897. class: "patient",
  28898. onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
  28899. }, [
  28900. vue.createElementVNode("view", { class: "left" }, [
  28901. vue.createElementVNode(
  28902. "view",
  28903. { class: "name" },
  28904. vue.toDisplayString($data.patient.patientName),
  28905. 1
  28906. /* TEXT */
  28907. ),
  28908. vue.createElementVNode("view", { class: "info" }, [
  28909. $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  28910. key: 0,
  28911. class: "text"
  28912. }, "男")) : vue.createCommentVNode("v-if", true),
  28913. $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  28914. key: 1,
  28915. class: "text"
  28916. }, "女")) : vue.createCommentVNode("v-if", true),
  28917. vue.createElementVNode(
  28918. "text",
  28919. { class: "text" },
  28920. vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
  28921. 1
  28922. /* TEXT */
  28923. ),
  28924. vue.createElementVNode(
  28925. "text",
  28926. { class: "text" },
  28927. vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
  28928. 1
  28929. /* TEXT */
  28930. )
  28931. ])
  28932. ]),
  28933. vue.createElementVNode("view", { class: "right" }, [
  28934. vue.createElementVNode("image", {
  28935. src: "/static/images/arrow_gray.png",
  28936. mode: ""
  28937. })
  28938. ])
  28939. ])) : vue.createCommentVNode("v-if", true)
  28940. ]),
  28941. vue.createElementVNode("view", { class: "cont" }, [
  28942. vue.createVNode(_component_u_form, {
  28943. rules: $data.rules,
  28944. model: $data.form,
  28945. ref: "uForm",
  28946. labelPosition: "left"
  28947. }, {
  28948. default: vue.withCtx(() => [
  28949. vue.createElementVNode("view", { class: "title-box" }, [
  28950. vue.createElementVNode("view", { class: "line" }),
  28951. vue.createElementVNode("view", { class: "title" }, "请描述您的病情")
  28952. ]),
  28953. vue.createElementVNode("view", { class: "form" }, [
  28954. vue.createVNode(_component_u_form_item, {
  28955. required: true,
  28956. labelWidth: "200rpx",
  28957. borderBottom: "",
  28958. label: "描述您的病情",
  28959. prop: "title"
  28960. }, {
  28961. default: vue.withCtx(() => [
  28962. vue.createVNode(_component_u__textarea, {
  28963. maxlength: "500",
  28964. modelValue: $data.form.title,
  28965. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.title = $event),
  28966. placeholder: "请输入内容",
  28967. count: ""
  28968. }, null, 8, ["modelValue"])
  28969. ]),
  28970. _: 1
  28971. /* STABLE */
  28972. }),
  28973. vue.createVNode(_component_u_form_item, {
  28974. required: true,
  28975. labelWidth: "200rpx",
  28976. borderBottom: "",
  28977. label: "正在服用药品",
  28978. prop: "drugs"
  28979. }, {
  28980. default: vue.withCtx(() => [
  28981. vue.createVNode(_component_u__textarea, {
  28982. maxlength: "500",
  28983. modelValue: $data.form.drugs,
  28984. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.drugs = $event),
  28985. placeholder: "请输入内容",
  28986. count: ""
  28987. }, null, 8, ["modelValue"])
  28988. ]),
  28989. _: 1
  28990. /* STABLE */
  28991. }),
  28992. vue.createVNode(_component_u_form_item, {
  28993. required: true,
  28994. labelWidth: "200rpx",
  28995. borderBottom: "",
  28996. label: "本次患病多久了",
  28997. prop: "duration"
  28998. }, {
  28999. default: vue.withCtx(() => [
  29000. vue.createVNode(_component_u_radio_group, {
  29001. modelValue: $data.form.duration,
  29002. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.form.duration = $event),
  29003. iconPlacement: "left"
  29004. }, {
  29005. default: vue.withCtx(() => [
  29006. (vue.openBlock(true), vue.createElementBlock(
  29007. vue.Fragment,
  29008. null,
  29009. vue.renderList($data.durations, (item, index2) => {
  29010. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  29011. customStyle: { marginRight: "5px" },
  29012. key: index2,
  29013. label: item.name,
  29014. name: item.name,
  29015. activeColor: "#C39A58"
  29016. }, null, 8, ["label", "name"]);
  29017. }),
  29018. 128
  29019. /* KEYED_FRAGMENT */
  29020. ))
  29021. ]),
  29022. _: 1
  29023. /* STABLE */
  29024. }, 8, ["modelValue"])
  29025. ]),
  29026. _: 1
  29027. /* STABLE */
  29028. }),
  29029. vue.createVNode(_component_u_form_item, {
  29030. required: true,
  29031. labelWidth: "200rpx",
  29032. borderBottom: "",
  29033. label: "此次病情是否去医院就诊过",
  29034. prop: "isVisit"
  29035. }, {
  29036. default: vue.withCtx(() => [
  29037. vue.createVNode(_component_u_radio_group, {
  29038. modelValue: $data.form.isVisit,
  29039. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.isVisit = $event),
  29040. iconPlacement: "left"
  29041. }, {
  29042. default: vue.withCtx(() => [
  29043. (vue.openBlock(true), vue.createElementBlock(
  29044. vue.Fragment,
  29045. null,
  29046. vue.renderList($data.isVisits, (item, index2) => {
  29047. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  29048. customStyle: { marginRight: "5px" },
  29049. key: index2,
  29050. label: item.name,
  29051. name: item.name,
  29052. activeColor: "#C39A58"
  29053. }, null, 8, ["label", "name"]);
  29054. }),
  29055. 128
  29056. /* KEYED_FRAGMENT */
  29057. ))
  29058. ]),
  29059. _: 1
  29060. /* STABLE */
  29061. }, 8, ["modelValue"])
  29062. ]),
  29063. _: 1
  29064. /* STABLE */
  29065. }),
  29066. vue.createVNode(_component_u_form_item, {
  29067. required: true,
  29068. labelWidth: "200rpx",
  29069. borderBottom: "",
  29070. label: "上传检测报告或患处照片"
  29071. }, {
  29072. default: vue.withCtx(() => [
  29073. vue.createElementVNode("view", { class: "form-item" }, [
  29074. vue.createElementVNode("view", { class: "icon" }),
  29075. vue.createVNode(_component_u_upload, {
  29076. fileList: $data.fileList1,
  29077. onAfterRead: $options.afterRead,
  29078. onDelete: $options.deletePic,
  29079. name: "1",
  29080. multiple: "",
  29081. maxCount: 4
  29082. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  29083. ])
  29084. ]),
  29085. _: 1
  29086. /* STABLE */
  29087. }),
  29088. vue.createVNode(_component_u_form_item, {
  29089. required: true,
  29090. labelWidth: "200rpx",
  29091. borderBottom: "",
  29092. label: "上传舌苔照片"
  29093. }, {
  29094. default: vue.withCtx(() => [
  29095. vue.createElementVNode("view", { class: "form-item" }, [
  29096. vue.createElementVNode("image", {
  29097. onClick: _cache[6] || (_cache[6] = ($event) => $options.showImg(1)),
  29098. class: "icon",
  29099. src: "/static/images/question.png"
  29100. }),
  29101. vue.createVNode(_component_u_upload, {
  29102. fileList: $data.fileList2,
  29103. onAfterRead: $options.afterRead,
  29104. onDelete: $options.deletePic,
  29105. name: "2",
  29106. multiple: "",
  29107. maxCount: 4
  29108. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  29109. ])
  29110. ]),
  29111. _: 1
  29112. /* STABLE */
  29113. }),
  29114. vue.createVNode(_component_u_form_item, {
  29115. required: true,
  29116. labelWidth: "200rpx",
  29117. label: "上传面部照片"
  29118. }, {
  29119. default: vue.withCtx(() => [
  29120. vue.createElementVNode("view", { class: "form-item" }, [
  29121. vue.createElementVNode("image", {
  29122. onClick: _cache[7] || (_cache[7] = ($event) => $options.showImg(2)),
  29123. class: "icon",
  29124. src: "/static/images/question.png"
  29125. }),
  29126. vue.createVNode(_component_u_upload, {
  29127. fileList: $data.fileList3,
  29128. onAfterRead: $options.afterRead,
  29129. onDelete: $options.deletePic,
  29130. name: "3",
  29131. multiple: "",
  29132. maxCount: 4
  29133. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  29134. ])
  29135. ]),
  29136. _: 1
  29137. /* STABLE */
  29138. })
  29139. ]),
  29140. vue.createElementVNode("view", { class: "title-box" }, [
  29141. vue.createElementVNode("view", { class: "line" }),
  29142. vue.createElementVNode("view", { class: "title" }, "您的头面部健康状况自我检查")
  29143. ]),
  29144. vue.createElementVNode("view", { class: "form" }, [
  29145. vue.createElementVNode("view", { class: "option-box" }, [
  29146. (vue.openBlock(true), vue.createElementBlock(
  29147. vue.Fragment,
  29148. null,
  29149. vue.renderList($data.temps, (item, index2) => {
  29150. return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
  29151. item.tempType == 1 ? (vue.openBlock(), vue.createElementBlock(
  29152. "view",
  29153. {
  29154. key: 0,
  29155. class: "title"
  29156. },
  29157. vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
  29158. 1
  29159. /* TEXT */
  29160. )) : vue.createCommentVNode("v-if", true),
  29161. vue.createElementVNode("view", { class: "options" }, [
  29162. item.tempType == 1 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
  29163. key: 0,
  29164. modelValue: item.checks,
  29165. "onUpdate:modelValue": ($event) => item.checks = $event,
  29166. placement: "column"
  29167. }, {
  29168. default: vue.withCtx(() => [
  29169. (vue.openBlock(true), vue.createElementBlock(
  29170. vue.Fragment,
  29171. null,
  29172. vue.renderList(item.options, (option, subIndex) => {
  29173. return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  29174. size: "28",
  29175. shape: "circle",
  29176. activeColor: "#C39A58",
  29177. key: option.name,
  29178. label: option.name,
  29179. name: option.name
  29180. }, null, 8, ["label", "name"]);
  29181. }),
  29182. 128
  29183. /* KEYED_FRAGMENT */
  29184. ))
  29185. ]),
  29186. _: 2
  29187. /* DYNAMIC */
  29188. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
  29189. ])
  29190. ]);
  29191. }),
  29192. 256
  29193. /* UNKEYED_FRAGMENT */
  29194. ))
  29195. ])
  29196. ]),
  29197. vue.createElementVNode("view", { class: "title-box" }, [
  29198. vue.createElementVNode("view", { class: "line" }),
  29199. vue.createElementVNode("view", { class: "title" }, "您的四肢肩颈健康状况自我检查")
  29200. ]),
  29201. vue.createElementVNode("view", { class: "form" }, [
  29202. vue.createElementVNode("view", { class: "option-box" }, [
  29203. (vue.openBlock(true), vue.createElementBlock(
  29204. vue.Fragment,
  29205. null,
  29206. vue.renderList($data.temps, (item, index2) => {
  29207. return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
  29208. item.tempType == 2 ? (vue.openBlock(), vue.createElementBlock(
  29209. "view",
  29210. {
  29211. key: 0,
  29212. class: "title"
  29213. },
  29214. vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
  29215. 1
  29216. /* TEXT */
  29217. )) : vue.createCommentVNode("v-if", true),
  29218. vue.createElementVNode("view", { class: "options" }, [
  29219. item.tempType == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
  29220. key: 0,
  29221. modelValue: item.checks,
  29222. "onUpdate:modelValue": ($event) => item.checks = $event,
  29223. placement: "column"
  29224. }, {
  29225. default: vue.withCtx(() => [
  29226. (vue.openBlock(true), vue.createElementBlock(
  29227. vue.Fragment,
  29228. null,
  29229. vue.renderList(item.options, (option, subIndex) => {
  29230. return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  29231. size: "28",
  29232. shape: "circle",
  29233. activeColor: "#C39A58",
  29234. key: option.name,
  29235. label: option.name,
  29236. name: option.name
  29237. }, null, 8, ["label", "name"]);
  29238. }),
  29239. 128
  29240. /* KEYED_FRAGMENT */
  29241. ))
  29242. ]),
  29243. _: 2
  29244. /* DYNAMIC */
  29245. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
  29246. ])
  29247. ]);
  29248. }),
  29249. 256
  29250. /* UNKEYED_FRAGMENT */
  29251. ))
  29252. ])
  29253. ]),
  29254. vue.createElementVNode("view", { class: "title-box" }, [
  29255. vue.createElementVNode("view", { class: "line" }),
  29256. vue.createElementVNode("view", { class: "title" }, "您的胸腹部健康状况自我检查")
  29257. ]),
  29258. vue.createElementVNode("view", { class: "form" }, [
  29259. vue.createElementVNode("view", { class: "option-box" }, [
  29260. (vue.openBlock(true), vue.createElementBlock(
  29261. vue.Fragment,
  29262. null,
  29263. vue.renderList($data.temps, (item, index2) => {
  29264. return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
  29265. item.tempType == 3 ? (vue.openBlock(), vue.createElementBlock(
  29266. "view",
  29267. {
  29268. key: 0,
  29269. class: "title"
  29270. },
  29271. vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
  29272. 1
  29273. /* TEXT */
  29274. )) : vue.createCommentVNode("v-if", true),
  29275. vue.createElementVNode("view", { class: "options" }, [
  29276. item.tempType == 3 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
  29277. key: 0,
  29278. modelValue: item.checks,
  29279. "onUpdate:modelValue": ($event) => item.checks = $event,
  29280. placement: "column"
  29281. }, {
  29282. default: vue.withCtx(() => [
  29283. (vue.openBlock(true), vue.createElementBlock(
  29284. vue.Fragment,
  29285. null,
  29286. vue.renderList(item.options, (option, subIndex) => {
  29287. return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  29288. size: "28",
  29289. shape: "circle",
  29290. activeColor: "#C39A58",
  29291. key: option.name,
  29292. label: option.name,
  29293. name: option.name
  29294. }, null, 8, ["label", "name"]);
  29295. }),
  29296. 128
  29297. /* KEYED_FRAGMENT */
  29298. ))
  29299. ]),
  29300. _: 2
  29301. /* DYNAMIC */
  29302. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
  29303. ])
  29304. ]);
  29305. }),
  29306. 256
  29307. /* UNKEYED_FRAGMENT */
  29308. ))
  29309. ])
  29310. ]),
  29311. vue.createElementVNode("view", { class: "title-box" }, [
  29312. vue.createElementVNode("view", { class: "line" }),
  29313. vue.createElementVNode("view", { class: "title" }, "其他身体状况自我检查")
  29314. ]),
  29315. vue.createElementVNode("view", { class: "form" }, [
  29316. vue.createElementVNode("view", { class: "option-box" }, [
  29317. (vue.openBlock(true), vue.createElementBlock(
  29318. vue.Fragment,
  29319. null,
  29320. vue.renderList($data.temps, (item, index2) => {
  29321. return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
  29322. item.tempType == 4 ? (vue.openBlock(), vue.createElementBlock(
  29323. "view",
  29324. {
  29325. key: 0,
  29326. class: "title"
  29327. },
  29328. vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
  29329. 1
  29330. /* TEXT */
  29331. )) : vue.createCommentVNode("v-if", true),
  29332. vue.createElementVNode("view", { class: "options" }, [
  29333. item.tempType == 4 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
  29334. key: 0,
  29335. modelValue: item.checks,
  29336. "onUpdate:modelValue": ($event) => item.checks = $event,
  29337. placement: "column"
  29338. }, {
  29339. default: vue.withCtx(() => [
  29340. (vue.openBlock(true), vue.createElementBlock(
  29341. vue.Fragment,
  29342. null,
  29343. vue.renderList(item.options, (option, subIndex) => {
  29344. return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  29345. size: "28",
  29346. shape: "circle",
  29347. activeColor: "#C39A58",
  29348. key: option.name,
  29349. label: option.name,
  29350. name: option.name
  29351. }, null, 8, ["label", "name"]);
  29352. }),
  29353. 128
  29354. /* KEYED_FRAGMENT */
  29355. ))
  29356. ]),
  29357. _: 2
  29358. /* DYNAMIC */
  29359. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
  29360. ])
  29361. ]);
  29362. }),
  29363. 256
  29364. /* UNKEYED_FRAGMENT */
  29365. ))
  29366. ])
  29367. ])
  29368. ]),
  29369. _: 1
  29370. /* STABLE */
  29371. }, 8, ["rules", "model"])
  29372. ])
  29373. ]),
  29374. vue.createElementVNode("view", { class: "btn-box" }, [
  29375. vue.createElementVNode("view", {
  29376. class: "btn",
  29377. onClick: _cache[8] || (_cache[8] = ($event) => $options.submitOrder())
  29378. }, "提交订单")
  29379. ])
  29380. ]);
  29381. }
  29382. const Pages_orderInquiryForm2_2 = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-1e2e2fb2"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm2_2.vue"]]);
  29383. const _sfc_main$18 = {
  29384. data() {
  29385. return {
  29386. companyId: null,
  29387. companyUserId: null,
  29388. orderKey: null,
  29389. patient: null,
  29390. durations: [
  29391. {
  29392. name: "一周内",
  29393. disabled: false
  29394. },
  29395. {
  29396. name: "一个月内",
  29397. disabled: false
  29398. },
  29399. {
  29400. name: "半年内",
  29401. disabled: false
  29402. },
  29403. {
  29404. name: "半年以上",
  29405. disabled: false
  29406. }
  29407. ],
  29408. isVisits: [
  29409. {
  29410. name: "未就诊",
  29411. disabled: false
  29412. },
  29413. {
  29414. name: "就诊过",
  29415. disabled: false
  29416. }
  29417. ],
  29418. title: "",
  29419. isVisit: "就诊过",
  29420. duration: "一周内",
  29421. inquiryType: null,
  29422. orderType: null,
  29423. doctorId: null,
  29424. fileList1: []
  29425. };
  29426. },
  29427. onLoad(options) {
  29428. if (!this.$isEmpty(options.companyId)) {
  29429. this.companyId = options.companyId;
  29430. }
  29431. if (!this.$isEmpty(options.companyUserId)) {
  29432. this.companyUserId = options.companyUserId;
  29433. }
  29434. this.inquiryType = options.inquiryType;
  29435. this.orderType = options.orderType;
  29436. this.doctorId = options.doctorId;
  29437. formatAppLog("log", "at pages_order/inquiryForm3.vue:151", this.inquiryType);
  29438. formatAppLog("log", "at pages_order/inquiryForm3.vue:152", this.orderType);
  29439. formatAppLog("log", "at pages_order/inquiryForm3.vue:153", this.doctorId);
  29440. this.confirm();
  29441. },
  29442. onShow() {
  29443. var that = this;
  29444. uni.$on("refreshOrderPatient", (res) => {
  29445. that.patient = res;
  29446. });
  29447. },
  29448. methods: {
  29449. submitOrder() {
  29450. if (this.patient == null) {
  29451. uni.showToast({
  29452. icon: "none",
  29453. title: "请选择就诊人"
  29454. });
  29455. return;
  29456. }
  29457. var images = [];
  29458. this.fileList1.forEach(function(element) {
  29459. images.push(element.url);
  29460. });
  29461. var data = {
  29462. companyId: this.companyId,
  29463. companyUserId: this.companyUserId,
  29464. orderKey: this.orderKey,
  29465. patientId: this.patient.patientId,
  29466. title: this.title,
  29467. isVisit: this.isVisit,
  29468. duration: this.duration,
  29469. inquiryType: this.inquiryType,
  29470. orderType: this.orderType,
  29471. doctorId: this.doctorId,
  29472. reportImages: images.toString()
  29473. };
  29474. uni.showLoading({
  29475. title: "正在处理中..."
  29476. });
  29477. create(data).then(
  29478. (res) => {
  29479. if (res.code == 200) {
  29480. var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
  29481. uni.requestSubscribeMessage({
  29482. tmplIds: temps,
  29483. success(e) {
  29484. setTimeout(function() {
  29485. uni.redirectTo({
  29486. url: "./inquiryPay?orderId=" + res.order.orderId
  29487. });
  29488. }, 200);
  29489. },
  29490. fail(e) {
  29491. setTimeout(function() {
  29492. uni.redirectTo({
  29493. url: "./inquiryPay?orderId=" + res.order.orderId
  29494. });
  29495. }, 200);
  29496. }
  29497. });
  29498. return;
  29499. } else {
  29500. uni.showToast({
  29501. icon: "none",
  29502. title: res.msg
  29503. });
  29504. }
  29505. },
  29506. (rej) => {
  29507. }
  29508. );
  29509. },
  29510. confirm() {
  29511. let data = {};
  29512. confirm(data).then(
  29513. (res) => {
  29514. if (res.code == 200) {
  29515. this.orderKey = res.orderKey;
  29516. }
  29517. },
  29518. (rej) => {
  29519. }
  29520. );
  29521. },
  29522. addPatient() {
  29523. uni.navigateTo({
  29524. url: "/pages_user/patient"
  29525. });
  29526. },
  29527. deletePic(event) {
  29528. this[`fileList${event.name}`].splice(event.index, 1);
  29529. },
  29530. async afterRead(event) {
  29531. let lists = [].concat(event.file);
  29532. let fileListLen = this[`fileList${event.name}`].length;
  29533. lists.map((item) => {
  29534. this[`fileList${event.name}`].push({
  29535. ...item,
  29536. status: "uploading",
  29537. message: "上传中"
  29538. });
  29539. });
  29540. for (let i = 0; i < lists.length; i++) {
  29541. const result = await this.uploadFilePromise(lists[i].url);
  29542. let item = this[`fileList${event.name}`][fileListLen];
  29543. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  29544. status: "success",
  29545. message: "",
  29546. url: result
  29547. }));
  29548. fileListLen++;
  29549. }
  29550. },
  29551. uploadFilePromise(url2) {
  29552. return new Promise((resolve, reject2) => {
  29553. uni.uploadFile({
  29554. url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
  29555. // 仅为示例,非真实的接口地址
  29556. filePath: url2,
  29557. name: "file",
  29558. formData: {
  29559. user: "test"
  29560. },
  29561. success: (res) => {
  29562. setTimeout(() => {
  29563. formatAppLog("log", "at pages_order/inquiryForm3.vue:279", JSON.parse(res.data).url);
  29564. resolve(JSON.parse(res.data).url);
  29565. }, 1e3);
  29566. }
  29567. });
  29568. });
  29569. }
  29570. }
  29571. };
  29572. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  29573. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  29574. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  29575. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
  29576. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
  29577. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
  29578. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  29579. vue.createElementVNode("view", { class: "main" }, [
  29580. vue.createVNode(_component_u_alert, {
  29581. fontSize: "16",
  29582. type: "primary",
  29583. description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
  29584. }),
  29585. vue.createElementVNode("view", { class: "chose-patient" }, [
  29586. $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
  29587. key: 0,
  29588. class: "title-box",
  29589. onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
  29590. }, [
  29591. vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
  29592. vue.createElementVNode("view", { class: "right" }, [
  29593. vue.createElementVNode("text", { class: "value" }, "请点击添加"),
  29594. vue.createElementVNode("image", {
  29595. src: "/static/images/arrow_gray.png",
  29596. mode: ""
  29597. })
  29598. ])
  29599. ])) : vue.createCommentVNode("v-if", true),
  29600. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  29601. key: 1,
  29602. class: "patient",
  29603. onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
  29604. }, [
  29605. vue.createElementVNode("view", { class: "left" }, [
  29606. vue.createElementVNode(
  29607. "view",
  29608. { class: "name" },
  29609. vue.toDisplayString($data.patient.patientName),
  29610. 1
  29611. /* TEXT */
  29612. ),
  29613. vue.createElementVNode("view", { class: "info" }, [
  29614. $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  29615. key: 0,
  29616. class: "text"
  29617. }, "男")) : vue.createCommentVNode("v-if", true),
  29618. $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  29619. key: 1,
  29620. class: "text"
  29621. }, "女")) : vue.createCommentVNode("v-if", true),
  29622. vue.createElementVNode(
  29623. "text",
  29624. { class: "text" },
  29625. vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
  29626. 1
  29627. /* TEXT */
  29628. ),
  29629. vue.createElementVNode(
  29630. "text",
  29631. { class: "text" },
  29632. vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
  29633. 1
  29634. /* TEXT */
  29635. )
  29636. ])
  29637. ]),
  29638. vue.createElementVNode("view", { class: "right" }, [
  29639. vue.createElementVNode("image", {
  29640. src: "/static/images/arrow_gray.png",
  29641. mode: ""
  29642. })
  29643. ])
  29644. ])) : vue.createCommentVNode("v-if", true)
  29645. ]),
  29646. vue.createElementVNode("view", { class: "cont" }, [
  29647. vue.createElementVNode("view", { class: "title-box" }, [
  29648. vue.createElementVNode("view", { class: "red-dot" }, "*"),
  29649. vue.createElementVNode("view", { class: "title" }, "请描述您的病情")
  29650. ]),
  29651. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  29652. vue.createVNode(_component_u__textarea, {
  29653. maxlength: "500",
  29654. modelValue: $data.title,
  29655. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.title = $event),
  29656. placeholder: "请输入内容",
  29657. count: ""
  29658. }, null, 8, ["modelValue"])
  29659. ]),
  29660. vue.createElementVNode("view", { class: "title-box" }, [
  29661. vue.createElementVNode("view", { class: "red-dot" }, "*"),
  29662. vue.createElementVNode("view", { class: "title" }, "本次患病多久了?")
  29663. ]),
  29664. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  29665. vue.createVNode(_component_u_radio_group, {
  29666. modelValue: $data.duration,
  29667. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.duration = $event),
  29668. iconPlacement: "left"
  29669. }, {
  29670. default: vue.withCtx(() => [
  29671. (vue.openBlock(true), vue.createElementBlock(
  29672. vue.Fragment,
  29673. null,
  29674. vue.renderList($data.durations, (item, index2) => {
  29675. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  29676. customStyle: { marginRight: "5px" },
  29677. key: index2,
  29678. label: item.name,
  29679. name: item.name,
  29680. activeColor: "#C39A58"
  29681. }, null, 8, ["label", "name"]);
  29682. }),
  29683. 128
  29684. /* KEYED_FRAGMENT */
  29685. ))
  29686. ]),
  29687. _: 1
  29688. /* STABLE */
  29689. }, 8, ["modelValue"])
  29690. ]),
  29691. vue.createElementVNode("view", { class: "title-box" }, [
  29692. vue.createElementVNode("view", { class: "red-dot" }, "*"),
  29693. vue.createElementVNode("view", { class: "title" }, "此次病情是否去医院就诊过?")
  29694. ]),
  29695. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  29696. vue.createVNode(_component_u_radio_group, {
  29697. modelValue: $data.isVisit,
  29698. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.isVisit = $event),
  29699. iconPlacement: "left"
  29700. }, {
  29701. default: vue.withCtx(() => [
  29702. (vue.openBlock(true), vue.createElementBlock(
  29703. vue.Fragment,
  29704. null,
  29705. vue.renderList($data.isVisits, (item, index2) => {
  29706. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  29707. customStyle: { marginRight: "5px" },
  29708. key: index2,
  29709. label: item.name,
  29710. name: item.name,
  29711. activeColor: "#C39A58"
  29712. }, null, 8, ["label", "name"]);
  29713. }),
  29714. 128
  29715. /* KEYED_FRAGMENT */
  29716. ))
  29717. ]),
  29718. _: 1
  29719. /* STABLE */
  29720. }, 8, ["modelValue"])
  29721. ]),
  29722. vue.createElementVNode("view", { class: "title-box" }, [
  29723. vue.createElementVNode("view", { class: "title" }, "上传检测报告或患处照片?")
  29724. ]),
  29725. vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
  29726. vue.createVNode(_component_u_upload, {
  29727. fileList: $data.fileList1,
  29728. onAfterRead: $options.afterRead,
  29729. onDelete: $options.deletePic,
  29730. name: "1",
  29731. maxCount: 5
  29732. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  29733. ])
  29734. ])
  29735. ]),
  29736. vue.createElementVNode("view", { class: "btn-box" }, [
  29737. vue.createElementVNode("view", {
  29738. class: "btn",
  29739. onClick: _cache[5] || (_cache[5] = ($event) => $options.submitOrder())
  29740. }, "提交订单")
  29741. ])
  29742. ]);
  29743. }
  29744. const Pages_orderInquiryForm3 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-3d545e9c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryForm3.vue"]]);
  29745. const _sfc_main$17 = {
  29746. data() {
  29747. return {
  29748. order: null,
  29749. orderId: null,
  29750. orderTypeOptions: [],
  29751. inquiryTypeOptions: [],
  29752. couponText: "请选择优惠券",
  29753. userCouponId: 0,
  29754. coupons: [],
  29755. couponShow: false,
  29756. payMoney: 0,
  29757. discountMoney: 0
  29758. };
  29759. },
  29760. onLoad(options) {
  29761. this.orderId = options.orderId;
  29762. },
  29763. onShow() {
  29764. this.getDictByKey("sys_inquiry_order_type");
  29765. this.getDictByKey("sys_inquiry_type");
  29766. this.getInquiryOrderById();
  29767. this.getMyEnableCouponList();
  29768. },
  29769. //发送给朋友
  29770. onShareAppMessage(res) {
  29771. var that = this;
  29772. if (this.$isLogin()) {
  29773. return {
  29774. title: "订单支付",
  29775. path: "/pages_order/inquiryPay?orderId=" + that.orderId,
  29776. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  29777. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  29778. };
  29779. }
  29780. },
  29781. methods: {
  29782. couponSelect(item) {
  29783. this.couponShow = false;
  29784. this.userCouponId = item.id;
  29785. formatAppLog("log", "at pages_order/inquiryPay.vue:148", item);
  29786. this.couponText = item.price + "元优惠券";
  29787. this.compute();
  29788. },
  29789. open() {
  29790. },
  29791. close() {
  29792. this.couponShow = false;
  29793. },
  29794. openCoupon() {
  29795. this.couponShow = true;
  29796. },
  29797. delCoupon() {
  29798. this.userCouponId = 0;
  29799. this.couponText = "请选择优惠券";
  29800. this.compute();
  29801. },
  29802. compute() {
  29803. var data = {
  29804. orderId: this.orderId,
  29805. userCouponId: this.userCouponId
  29806. };
  29807. formatAppLog("log", "at pages_order/inquiryPay.vue:170", data);
  29808. compute$1(data).then(
  29809. (res) => {
  29810. if (res.code == 200) {
  29811. this.payMoney = res.data.payMoney;
  29812. this.discountMoney = res.data.discountMoney;
  29813. } else {
  29814. this.userCouponId = 0;
  29815. this.couponText = "请选择优惠券";
  29816. uni.showToast({
  29817. icon: "none",
  29818. title: res.msg
  29819. });
  29820. }
  29821. },
  29822. (err) => {
  29823. }
  29824. );
  29825. },
  29826. getMyEnableCouponList() {
  29827. var data = { couponType: 3 };
  29828. getMyEnableCouponList(data).then(
  29829. (res) => {
  29830. if (res.code == 200) {
  29831. this.coupons = res.data;
  29832. }
  29833. },
  29834. (err) => {
  29835. }
  29836. );
  29837. },
  29838. getDictByKey(key) {
  29839. var data = { key };
  29840. getDictByKey(data).then(
  29841. (res) => {
  29842. if (res.code == 200) {
  29843. if (key == "sys_inquiry_order_type") {
  29844. this.orderTypeOptions = res.data;
  29845. }
  29846. if (key == "sys_inquiry_type") {
  29847. this.inquiryTypeOptions = res.data;
  29848. }
  29849. }
  29850. },
  29851. (err) => {
  29852. }
  29853. );
  29854. },
  29855. getInquiryOrderById() {
  29856. var data = { orderId: this.orderId };
  29857. var that = this;
  29858. uni.showLoading();
  29859. getInquiryOrderById(data).then(
  29860. (res) => {
  29861. if (res.code == 200) {
  29862. uni.hideLoading();
  29863. that.order = res.data;
  29864. this.compute();
  29865. } else {
  29866. uni.showToast({
  29867. icon: "none",
  29868. title: res.msg
  29869. });
  29870. }
  29871. },
  29872. (rej) => {
  29873. }
  29874. );
  29875. },
  29876. payOrder() {
  29877. var data = {
  29878. orderId: this.order.orderId,
  29879. userCouponId: this.userCouponId
  29880. };
  29881. uni.showLoading();
  29882. pay$1(data).then(
  29883. (res) => {
  29884. if (res.code == 200) {
  29885. uni.redirectTo({
  29886. url: "./inquiryPayment?orderId=" + this.orderId
  29887. });
  29888. } else {
  29889. uni.showToast({
  29890. icon: "none",
  29891. title: res.msg
  29892. });
  29893. }
  29894. },
  29895. (rej) => {
  29896. }
  29897. );
  29898. }
  29899. }
  29900. };
  29901. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  29902. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  29903. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  29904. vue.createElementVNode("view", { class: "cont" }, [
  29905. vue.createElementVNode("view", { class: "other-info" }, [
  29906. vue.createElementVNode("view", { class: "title" }, "付款详情"),
  29907. vue.createElementVNode("view", { class: "item" }, [
  29908. vue.createElementVNode("view", { class: "left" }, [
  29909. vue.createElementVNode("text", { class: "label" }, "订单号:")
  29910. ]),
  29911. vue.createElementVNode("view", { class: "right" }, [
  29912. $data.order != null ? (vue.openBlock(), vue.createElementBlock(
  29913. "text",
  29914. {
  29915. key: 0,
  29916. class: "text"
  29917. },
  29918. vue.toDisplayString($data.order.orderSn),
  29919. 1
  29920. /* TEXT */
  29921. )) : vue.createCommentVNode("v-if", true)
  29922. ])
  29923. ]),
  29924. vue.createElementVNode("view", { class: "item" }, [
  29925. vue.createElementVNode("view", { class: "left" }, [
  29926. vue.createElementVNode("text", { class: "label" }, "订单类型:")
  29927. ]),
  29928. vue.createElementVNode("view", { class: "right" }, [
  29929. vue.createElementVNode("text", { class: "text" }, [
  29930. vue.createElementVNode(
  29931. "text",
  29932. null,
  29933. vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
  29934. 1
  29935. /* TEXT */
  29936. ),
  29937. vue.createElementVNode(
  29938. "text",
  29939. null,
  29940. "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
  29941. 1
  29942. /* TEXT */
  29943. )
  29944. ])
  29945. ])
  29946. ]),
  29947. vue.createElementVNode("view", { class: "item" }, [
  29948. vue.createElementVNode("view", { class: "left" }, [
  29949. vue.createElementVNode("text", { class: "label" }, "订单金额:")
  29950. ]),
  29951. vue.createElementVNode("view", { class: "right" }, [
  29952. vue.createElementVNode(
  29953. "text",
  29954. { class: "text" },
  29955. vue.toDisplayString($data.order.money.toFixed(2)),
  29956. 1
  29957. /* TEXT */
  29958. )
  29959. ])
  29960. ]),
  29961. $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", {
  29962. key: 0,
  29963. class: "item",
  29964. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"]))
  29965. }, [
  29966. vue.createElementVNode("view", { class: "left" }, [
  29967. vue.createElementVNode("text", { class: "label" }, "优惠券:")
  29968. ]),
  29969. vue.createElementVNode("view", { class: "right" }, [
  29970. vue.createElementVNode(
  29971. "text",
  29972. { class: "text" },
  29973. vue.toDisplayString($data.couponText),
  29974. 1
  29975. /* TEXT */
  29976. ),
  29977. $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  29978. key: 0,
  29979. onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])),
  29980. class: "ic-close",
  29981. src: "/static/images/close.png"
  29982. })) : vue.createCommentVNode("v-if", true),
  29983. vue.createElementVNode("image", {
  29984. class: "ic-back",
  29985. src: "/static/images/arrow_gray.png"
  29986. })
  29987. ])
  29988. ])) : vue.createCommentVNode("v-if", true),
  29989. $data.order.userCouponId == null || $data.order.userCouponId == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  29990. key: 1,
  29991. class: "item"
  29992. }, [
  29993. vue.createElementVNode("view", { class: "left" }, [
  29994. vue.createElementVNode("text", { class: "label" }, "优惠金额:")
  29995. ]),
  29996. vue.createElementVNode("view", { class: "right" }, [
  29997. vue.createElementVNode(
  29998. "text",
  29999. { class: "text" },
  30000. vue.toDisplayString($data.discountMoney.toFixed(2)),
  30001. 1
  30002. /* TEXT */
  30003. )
  30004. ])
  30005. ])) : vue.createCommentVNode("v-if", true),
  30006. vue.createElementVNode("view", { class: "item" }, [
  30007. vue.createElementVNode("view", { class: "left" }, [
  30008. vue.createElementVNode("text", { class: "label" }, "支付金额:")
  30009. ]),
  30010. vue.createElementVNode("view", { class: "right" }, [
  30011. vue.createElementVNode(
  30012. "text",
  30013. { class: "text" },
  30014. vue.toDisplayString($data.payMoney.toFixed(2)),
  30015. 1
  30016. /* TEXT */
  30017. )
  30018. ])
  30019. ]),
  30020. vue.createVNode(_component_u_popup, {
  30021. closeable: true,
  30022. show: $data.couponShow,
  30023. round: 10,
  30024. mode: "bottom",
  30025. onClose: $options.close,
  30026. onOpen: $options.open
  30027. }, {
  30028. default: vue.withCtx(() => [
  30029. vue.createElementVNode("view", { class: "coupon" }, [
  30030. $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  30031. key: 0,
  30032. class: "coupon-box"
  30033. }, [
  30034. (vue.openBlock(true), vue.createElementBlock(
  30035. vue.Fragment,
  30036. null,
  30037. vue.renderList($data.coupons, (item) => {
  30038. return vue.openBlock(), vue.createElementBlock("view", {
  30039. onClick: ($event) => $options.couponSelect(item),
  30040. class: "coupon-item"
  30041. }, [
  30042. vue.createElementVNode("view", { class: "left" }, [
  30043. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  30044. key: 0,
  30045. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/004bcf24fc7641dea9f3247fa8d59ea2.png",
  30046. mode: "widthFix"
  30047. })) : vue.createCommentVNode("v-if", true),
  30048. item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  30049. key: 1,
  30050. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3ce37842579c48e2b8e50e547adbfeb6.png",
  30051. mode: "widthFix"
  30052. })) : vue.createCommentVNode("v-if", true),
  30053. vue.createElementVNode("view", { style: { "z-index": "999" } }, [
  30054. vue.createTextVNode(" ¥"),
  30055. vue.createElementVNode(
  30056. "span",
  30057. { class: "num" },
  30058. vue.toDisplayString(item.price.toFixed(2)),
  30059. 1
  30060. /* TEXT */
  30061. )
  30062. ]),
  30063. vue.createElementVNode(
  30064. "view",
  30065. { class: "pic-num" },
  30066. "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
  30067. 1
  30068. /* TEXT */
  30069. )
  30070. ]),
  30071. vue.createElementVNode("view", { class: "right" }, [
  30072. vue.createElementVNode(
  30073. "view",
  30074. { class: "title" },
  30075. vue.toDisplayString(item.title),
  30076. 1
  30077. /* TEXT */
  30078. ),
  30079. vue.createElementVNode("view", { class: "btns" }, [
  30080. item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  30081. "view",
  30082. { key: 0 },
  30083. vue.toDisplayString(item.limitTime) + " 到期",
  30084. 1
  30085. /* TEXT */
  30086. )) : vue.createCommentVNode("v-if", true),
  30087. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  30088. "view",
  30089. { key: 1 },
  30090. "使用时间 " + vue.toDisplayString(item.useTime),
  30091. 1
  30092. /* TEXT */
  30093. )) : vue.createCommentVNode("v-if", true),
  30094. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  30095. key: 2,
  30096. class: "bnt gray"
  30097. }, "已使用")) : vue.createCommentVNode("v-if", true),
  30098. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  30099. key: 3,
  30100. class: "bnt gray"
  30101. }, "已过期")) : vue.createCommentVNode("v-if", true),
  30102. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  30103. key: 4,
  30104. class: "btn"
  30105. }, "使用")) : vue.createCommentVNode("v-if", true)
  30106. ])
  30107. ])
  30108. ], 8, ["onClick"]);
  30109. }),
  30110. 256
  30111. /* UNKEYED_FRAGMENT */
  30112. ))
  30113. ])) : vue.createCommentVNode("v-if", true),
  30114. $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  30115. key: 1,
  30116. class: "empty"
  30117. }, [
  30118. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" })
  30119. ])) : vue.createCommentVNode("v-if", true)
  30120. ])
  30121. ]),
  30122. _: 1
  30123. /* STABLE */
  30124. }, 8, ["show", "onClose", "onOpen"])
  30125. ])
  30126. ]),
  30127. vue.createElementVNode("view", { class: "btn-box" }, [
  30128. vue.createElementVNode(
  30129. "view",
  30130. {
  30131. class: "btn",
  30132. onClick: _cache[2] || (_cache[2] = ($event) => $options.payOrder())
  30133. },
  30134. "支付" + vue.toDisplayString($data.payMoney.toFixed(2)) + "元",
  30135. 1
  30136. /* TEXT */
  30137. )
  30138. ])
  30139. ]);
  30140. }
  30141. const Pages_orderInquiryPay = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-a396ca70"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryPay.vue"]]);
  30142. const _sfc_main$16 = {
  30143. data() {
  30144. return {
  30145. payMethod: null,
  30146. orderId: null,
  30147. order: null
  30148. };
  30149. },
  30150. onLoad(option) {
  30151. this.orderId = option.orderId;
  30152. this.payMethod = option.payMethod;
  30153. },
  30154. onShow() {
  30155. this.getInquiryOrderById();
  30156. },
  30157. methods: {
  30158. copyTest(text) {
  30159. uni.setClipboardData({
  30160. data: text,
  30161. success: () => {
  30162. uni.showToast({
  30163. title: "内容已成功复制到剪切板",
  30164. icon: "none"
  30165. });
  30166. }
  30167. });
  30168. },
  30169. getInquiryOrderById() {
  30170. var data = { orderId: this.orderId };
  30171. formatAppLog("log", "at pages_order/inquiryPayment.vue:71", data);
  30172. getInquiryOrderById(data).then(
  30173. (res) => {
  30174. if (res.code == 200) {
  30175. this.order = res.data;
  30176. if (this.payMethod != null && this.payMethod == "app") {
  30177. this.payOrder();
  30178. }
  30179. }
  30180. },
  30181. (rej) => {
  30182. }
  30183. );
  30184. },
  30185. payOrder() {
  30186. var data = {
  30187. orderId: this.orderId
  30188. };
  30189. var that = this;
  30190. uni.showLoading();
  30191. payment$1(data).then(
  30192. (res) => {
  30193. if (res.code == 200) {
  30194. if (res.isPay == 1) {
  30195. uni.redirectTo({
  30196. url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
  30197. });
  30198. } else {
  30199. if (res.type == "tz") {
  30200. uni.setStorageSync("ztPayUrl", res.data.body.url);
  30201. uni.redirectTo({
  30202. url: "/pages_order/tzPay"
  30203. });
  30204. } else if (res.type == "yb") {
  30205. var payData = JSON.parse(res.data.pay_info);
  30206. formatAppLog("log", "at pages_order/inquiryPayment.vue:109", payData);
  30207. uni.requestPayment({
  30208. provider: "wxpay",
  30209. timeStamp: payData.timeStamp,
  30210. nonceStr: payData.nonceStr,
  30211. package: payData.package,
  30212. signType: payData.signType,
  30213. paySign: payData.paySign,
  30214. success: function(res2) {
  30215. formatAppLog("log", "at pages_order/inquiryPayment.vue:118", that.order.orderId);
  30216. uni.hideLoading();
  30217. uni.redirectTo({
  30218. url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
  30219. });
  30220. },
  30221. fail: function(err) {
  30222. uni.showToast({
  30223. icon: "none",
  30224. title: "fail:" + JSON.stringify(err)
  30225. });
  30226. uni.hideLoading();
  30227. }
  30228. });
  30229. } else if (res.type == "hf") {
  30230. var payData = JSON.parse(res.data.pay_info);
  30231. formatAppLog("log", "at pages_order/inquiryPayment.vue:138", payData);
  30232. uni.requestPayment({
  30233. provider: "wxpay",
  30234. timeStamp: payData.timeStamp,
  30235. nonceStr: payData.nonceStr,
  30236. package: payData.package,
  30237. signType: payData.signType,
  30238. paySign: payData.paySign,
  30239. success: function(res2) {
  30240. formatAppLog("log", "at pages_order/inquiryPayment.vue:147", that.order.orderId);
  30241. uni.hideLoading();
  30242. uni.redirectTo({
  30243. url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
  30244. });
  30245. },
  30246. fail: function(err) {
  30247. uni.showToast({
  30248. icon: "none",
  30249. title: "fail:" + JSON.stringify(err)
  30250. });
  30251. uni.hideLoading();
  30252. }
  30253. });
  30254. } else if (res.type == "wx") {
  30255. uni.requestPayment({
  30256. provider: "wxpay",
  30257. timeStamp: res.data.timeStamp,
  30258. nonceStr: res.data.nonceStr,
  30259. package: res.data.packageValue,
  30260. signType: res.data.signType,
  30261. paySign: res.data.paySign,
  30262. success: function(res2) {
  30263. formatAppLog("log", "at pages_order/inquiryPayment.vue:174", that.order.orderId);
  30264. uni.hideLoading();
  30265. uni.redirectTo({
  30266. url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
  30267. });
  30268. },
  30269. fail: function(err) {
  30270. uni.showToast({
  30271. icon: "none",
  30272. title: "fail:" + JSON.stringify(err)
  30273. });
  30274. uni.hideLoading();
  30275. }
  30276. });
  30277. }
  30278. }
  30279. } else {
  30280. uni.showToast({
  30281. icon: "none",
  30282. title: res.msg
  30283. });
  30284. }
  30285. },
  30286. (rej) => {
  30287. }
  30288. );
  30289. }
  30290. }
  30291. };
  30292. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  30293. return vue.openBlock(), vue.createElementBlock("view", null, [
  30294. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  30295. key: 0,
  30296. class: "inner-box"
  30297. }, [
  30298. vue.createCommentVNode(" 时间、价格 "),
  30299. vue.createElementVNode("view", { class: "time-price" }, [
  30300. vue.createElementVNode("text", { class: "time" }, "订单金额"),
  30301. vue.createElementVNode("view", { class: "price-box" }, [
  30302. vue.createElementVNode("text", { class: "unit" }, "¥"),
  30303. vue.createElementVNode(
  30304. "text",
  30305. { class: "num" },
  30306. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  30307. 1
  30308. /* TEXT */
  30309. )
  30310. ])
  30311. ]),
  30312. vue.createCommentVNode(" 订单详情查看 "),
  30313. vue.createElementVNode("view", { class: "order-info" }, [
  30314. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  30315. vue.createElementVNode("view", { class: "item" }, [
  30316. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  30317. vue.createElementVNode("view", { class: "sn-box" }, [
  30318. vue.createElementVNode(
  30319. "text",
  30320. { class: "text" },
  30321. vue.toDisplayString($data.order.orderSn),
  30322. 1
  30323. /* TEXT */
  30324. ),
  30325. vue.createElementVNode("view", {
  30326. class: "copy-btn",
  30327. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
  30328. }, "复制")
  30329. ])
  30330. ]),
  30331. vue.createElementVNode("view", { class: "item" }, [
  30332. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  30333. vue.createElementVNode(
  30334. "text",
  30335. { class: "text" },
  30336. vue.toDisplayString($data.order.createTime),
  30337. 1
  30338. /* TEXT */
  30339. )
  30340. ])
  30341. ])
  30342. ])) : vue.createCommentVNode("v-if", true),
  30343. vue.createCommentVNode(" 底部按钮 "),
  30344. vue.createElementVNode("view", { class: "btn-box" }, [
  30345. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  30346. key: 0,
  30347. class: "btn",
  30348. onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
  30349. }, "立即支付")) : vue.createCommentVNode("v-if", true)
  30350. ])
  30351. ]);
  30352. }
  30353. const Pages_orderInquiryPayment = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryPayment.vue"]]);
  30354. const _sfc_main$15 = {
  30355. data() {
  30356. return {
  30357. url: "",
  30358. content: ""
  30359. };
  30360. },
  30361. onLoad(options) {
  30362. var that = this;
  30363. var url2 = uni.getStorageSync("ztPayUrl");
  30364. that.url = url2;
  30365. const obj = this.$urlToObj(url2);
  30366. formatAppLog("log", "at pages_order/tzPay.vue:20", obj.extraData);
  30367. uni.setStorageSync("payExtraData", obj.extraData);
  30368. },
  30369. methods: {}
  30370. };
  30371. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  30372. return vue.openBlock(), vue.createElementBlock("view", null, [
  30373. vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"])
  30374. ]);
  30375. }
  30376. const Pages_orderTzPay = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-7333b40d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/tzPay.vue"]]);
  30377. const _sfc_main$14 = {
  30378. data() {
  30379. return {
  30380. payData: null,
  30381. payExtraData: null
  30382. };
  30383. },
  30384. onLoad(options) {
  30385. formatAppLog("log", "at pages_order/tzWeixinPay.vue:18", options);
  30386. this.payData = JSON.parse(decodeURIComponent(options.openid));
  30387. var json = uni.getStorageSync("payExtraData");
  30388. this.payExtraData = JSON.parse(json);
  30389. formatAppLog("log", "at pages_order/tzWeixinPay.vue:22", this.payExtraData);
  30390. formatAppLog("log", "at pages_order/tzWeixinPay.vue:23", this.payData);
  30391. this.payOrder();
  30392. },
  30393. methods: {
  30394. payOrder() {
  30395. var that = this;
  30396. uni.showLoading({
  30397. title: "处理中..."
  30398. });
  30399. uni.requestPayment({
  30400. provider: "wxpay",
  30401. timeStamp: that.payData.timeStamp,
  30402. nonceStr: that.payData.nonceStr,
  30403. package: that.payData.package,
  30404. signType: that.payData.signType,
  30405. paySign: that.payData.paySign,
  30406. success: function(res) {
  30407. uni.hideLoading();
  30408. if (that.payExtraData.orderType == 1) {
  30409. uni.redirectTo({
  30410. url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.payExtraData.orderId
  30411. });
  30412. } else if (that.payExtraData.orderType == 2) {
  30413. uni.redirectTo({
  30414. url: "/pages_order/storeOrderPaySuccess?orderId=" + that.payExtraData.orderId
  30415. });
  30416. } else if (that.payExtraData.orderType == 3) {
  30417. uni.redirectTo({
  30418. url: "/pages_order/packageOrderPaySuccess?orderId=" + that.payExtraData.orderId
  30419. });
  30420. }
  30421. },
  30422. fail: function(err) {
  30423. uni.showToast({
  30424. icon: "none",
  30425. title: "fail:" + JSON.stringify(err)
  30426. });
  30427. uni.hideLoading();
  30428. }
  30429. });
  30430. }
  30431. }
  30432. };
  30433. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  30434. return vue.openBlock(), vue.createElementBlock("view", null, [
  30435. vue.createElementVNode("view", { class: "btn-box" }, [
  30436. vue.createElementVNode("view", {
  30437. class: "btn",
  30438. onClick: _cache[0] || (_cache[0] = ($event) => $options.payOrder())
  30439. }, "支付")
  30440. ])
  30441. ]);
  30442. }
  30443. const Pages_orderTzWeixinPay = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-9895883c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/tzWeixinPay.vue"]]);
  30444. const _sfc_main$13 = {
  30445. data() {
  30446. return {
  30447. order: null
  30448. };
  30449. },
  30450. onLoad(option) {
  30451. uni.setNavigationBarTitle({
  30452. title: "支付结果"
  30453. });
  30454. this.orderId = option.orderId;
  30455. this.getInquiryOrderById();
  30456. },
  30457. methods: {
  30458. getInquiryOrderById() {
  30459. var data = { orderId: this.orderId };
  30460. var that = this;
  30461. uni.showLoading();
  30462. getInquiryOrderById(data).then(
  30463. (res) => {
  30464. uni.hideLoading();
  30465. if (res.code == 200) {
  30466. that.order = res.data;
  30467. } else {
  30468. uni.showToast({
  30469. icon: "none",
  30470. title: res.msg
  30471. });
  30472. }
  30473. },
  30474. (rej) => {
  30475. }
  30476. );
  30477. },
  30478. copyTest(text) {
  30479. uni.setClipboardData({
  30480. data: text,
  30481. success: () => {
  30482. uni.showToast({
  30483. title: "内容已成功复制到剪切板",
  30484. icon: "none"
  30485. });
  30486. }
  30487. });
  30488. },
  30489. showOrderDetails(orderId) {
  30490. uni.redirectTo({
  30491. url: "./inquiryOrderDetails?orderId=" + orderId
  30492. });
  30493. }
  30494. }
  30495. };
  30496. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  30497. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  30498. vue.createElementVNode("view", { class: "inner" }, [
  30499. vue.createElementVNode("view", { class: "top" }, [
  30500. vue.createElementVNode("text", { class: "title" }, "支付成功"),
  30501. vue.createElementVNode("image", {
  30502. class: "icon",
  30503. src: "/static/images/success.png"
  30504. }),
  30505. vue.createElementVNode("view", { class: "btn-box" }, [
  30506. vue.createElementVNode("view", {
  30507. class: "btn cancel",
  30508. onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
  30509. }, " 查看订单")
  30510. ])
  30511. ]),
  30512. vue.createCommentVNode(" 订单详情查看 "),
  30513. vue.createElementVNode("view", { class: "order-info" }, [
  30514. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  30515. vue.createElementVNode("view", { class: "item" }, [
  30516. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  30517. vue.createElementVNode("view", { class: "sn-box" }, [
  30518. vue.createElementVNode(
  30519. "text",
  30520. { class: "text" },
  30521. vue.toDisplayString($data.order.orderSn),
  30522. 1
  30523. /* TEXT */
  30524. ),
  30525. vue.createElementVNode("view", {
  30526. class: "copy-btn",
  30527. onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderSn))
  30528. }, "复制")
  30529. ])
  30530. ]),
  30531. vue.createElementVNode("view", { class: "item" }, [
  30532. vue.createElementVNode("text", { class: "label" }, "订单金额"),
  30533. vue.createElementVNode(
  30534. "text",
  30535. { class: "text" },
  30536. vue.toDisplayString($data.order.money.toFixed(2)),
  30537. 1
  30538. /* TEXT */
  30539. )
  30540. ]),
  30541. vue.createElementVNode("view", { class: "item" }, [
  30542. vue.createElementVNode("text", { class: "label" }, "优惠金额"),
  30543. vue.createElementVNode(
  30544. "text",
  30545. { class: "text" },
  30546. vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  30547. 1
  30548. /* TEXT */
  30549. )
  30550. ]),
  30551. vue.createElementVNode("view", { class: "item" }, [
  30552. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  30553. vue.createElementVNode(
  30554. "text",
  30555. { class: "text" },
  30556. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  30557. 1
  30558. /* TEXT */
  30559. )
  30560. ]),
  30561. vue.createElementVNode("view", { class: "item" }, [
  30562. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  30563. vue.createElementVNode(
  30564. "text",
  30565. { class: "text" },
  30566. vue.toDisplayString($data.order.createTime),
  30567. 1
  30568. /* TEXT */
  30569. )
  30570. ])
  30571. ])
  30572. ])
  30573. ]);
  30574. }
  30575. const Pages_orderInquiryOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderPaySuccess.vue"]]);
  30576. let request$7 = new Request$1().http;
  30577. function getMyStoreOrderList(data) {
  30578. return request$7("/app/storeOrder/getMyStoreOrderList", data, "GET");
  30579. }
  30580. function getCompanyUserStoreOrderList(data) {
  30581. return request$7("/app/storeOrder/getCompanyUserStoreOrderList", data, "GET");
  30582. }
  30583. function getMyStoreOrderById(data) {
  30584. return request$7("/app/storeOrder/getMyStoreOrderById", data, "GET");
  30585. }
  30586. function getStoreOrderById(data) {
  30587. return request$7("/app/storeOrder/getStoreOrderById", data, "GET");
  30588. }
  30589. function getCompanyUserStoreOrderById(data) {
  30590. return request$7("/app/storeOrder/getCompanyUserStoreOrderById", data, "GET");
  30591. }
  30592. function pay(data) {
  30593. return request$7("/app/storeOrder/pay", data, "POST", "application/json;charset=UTF-8");
  30594. }
  30595. function payment(data) {
  30596. return request$7("/app/storeOrder/payment", data, "POST", "application/json;charset=UTF-8");
  30597. }
  30598. function compute(data) {
  30599. return request$7("/app/storeOrder/compute", data, "POST", "application/json;charset=UTF-8");
  30600. }
  30601. function cancelOrder(data) {
  30602. return request$7("/app/storeOrder/cancelOrder", data, "POST", "application/json;charset=UTF-8");
  30603. }
  30604. function finishOrder(data) {
  30605. return request$7("/app/storeOrder/finishOrder", data, "POST", "application/json;charset=UTF-8");
  30606. }
  30607. function getExpress(data) {
  30608. return request$7("/app/storeOrder/getExpress", data, "POST", "application/json;charset=UTF-8");
  30609. }
  30610. const _sfc_main$12 = {
  30611. data() {
  30612. return {
  30613. order: null
  30614. };
  30615. },
  30616. onLoad(option) {
  30617. uni.setNavigationBarTitle({
  30618. title: "支付结果"
  30619. });
  30620. uni.$emit("refreshStoreOrder");
  30621. this.orderId = option.orderId;
  30622. this.getStoreOrderById();
  30623. },
  30624. methods: {
  30625. getStoreOrderById() {
  30626. var data = { orderId: this.orderId };
  30627. var that = this;
  30628. uni.showLoading();
  30629. getStoreOrderById(data).then(
  30630. (res) => {
  30631. uni.hideLoading();
  30632. if (res.code == 200) {
  30633. that.order = res.order;
  30634. } else {
  30635. uni.showToast({
  30636. icon: "none",
  30637. title: res.msg
  30638. });
  30639. }
  30640. },
  30641. (rej) => {
  30642. }
  30643. );
  30644. },
  30645. copyTest(text) {
  30646. uni.setClipboardData({
  30647. data: text,
  30648. success: () => {
  30649. uni.showToast({
  30650. title: "内容已成功复制到剪切板",
  30651. icon: "none"
  30652. });
  30653. }
  30654. });
  30655. },
  30656. showOrderDetails(orderId) {
  30657. formatAppLog("log", "at pages_order/storeOrderPaySuccess.vue:87", orderId);
  30658. uni.redirectTo({
  30659. url: "/pages_order/storeOrderDetail?orderId=" + orderId
  30660. });
  30661. }
  30662. }
  30663. };
  30664. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  30665. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  30666. vue.createElementVNode("view", { class: "inner" }, [
  30667. vue.createElementVNode("view", { class: "top" }, [
  30668. vue.createElementVNode("text", { class: "title" }, "支付成功"),
  30669. vue.createElementVNode("image", {
  30670. class: "icon",
  30671. src: "/static/images/success.png"
  30672. }),
  30673. vue.createElementVNode("view", { class: "btn-box" }, [
  30674. vue.createElementVNode("view", {
  30675. class: "btn cancel",
  30676. onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
  30677. }, " 查看订单")
  30678. ])
  30679. ]),
  30680. vue.createCommentVNode(" 订单详情查看 "),
  30681. vue.createElementVNode("view", { class: "order-info" }, [
  30682. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  30683. vue.createElementVNode("view", { class: "item" }, [
  30684. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  30685. vue.createElementVNode("view", { class: "sn-box" }, [
  30686. vue.createElementVNode(
  30687. "text",
  30688. { class: "text" },
  30689. vue.toDisplayString($data.order.orderCode),
  30690. 1
  30691. /* TEXT */
  30692. ),
  30693. vue.createElementVNode("view", {
  30694. class: "copy-btn",
  30695. onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderCode))
  30696. }, "复制")
  30697. ])
  30698. ]),
  30699. vue.createElementVNode("view", { class: "item" }, [
  30700. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  30701. vue.createElementVNode(
  30702. "text",
  30703. { class: "text" },
  30704. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  30705. 1
  30706. /* TEXT */
  30707. )
  30708. ]),
  30709. vue.createElementVNode("view", { class: "item" }, [
  30710. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  30711. vue.createElementVNode(
  30712. "text",
  30713. { class: "text" },
  30714. vue.toDisplayString($data.order.createTime),
  30715. 1
  30716. /* TEXT */
  30717. )
  30718. ])
  30719. ])
  30720. ])
  30721. ]);
  30722. }
  30723. const Pages_orderStoreOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPaySuccess.vue"]]);
  30724. const _sfc_main$11 = {
  30725. data() {
  30726. return {
  30727. hospital: null,
  30728. department: null,
  30729. doctor: null,
  30730. form: {
  30731. orderId: null,
  30732. starCount: 5,
  30733. pingStar: 0,
  30734. pingContent: ""
  30735. }
  30736. };
  30737. },
  30738. onLoad(options) {
  30739. this.form.orderId = options.orderId;
  30740. this.getMyInquiryOrderById();
  30741. },
  30742. methods: {
  30743. getMyInquiryOrderById() {
  30744. var data = { orderId: this.form.orderId };
  30745. getMyInquiryOrderById(data).then(
  30746. (res) => {
  30747. if (res.code == 200) {
  30748. this.order = res.data.order;
  30749. this.doctorId = this.order.doctorId;
  30750. this.getDoctorDetails();
  30751. }
  30752. },
  30753. (err) => {
  30754. }
  30755. );
  30756. },
  30757. getDoctorDetails() {
  30758. var data = { doctorId: this.doctorId };
  30759. getDoctorDetails(data).then(
  30760. (res) => {
  30761. if (res.code == 200) {
  30762. this.doctor = res.data.doctor;
  30763. this.department = res.data.department;
  30764. this.hospital = res.data.hospital;
  30765. }
  30766. },
  30767. (rej) => {
  30768. }
  30769. );
  30770. },
  30771. submit() {
  30772. uni.showLoading({
  30773. title: "处理中..."
  30774. });
  30775. pingOrder(this.form).then(
  30776. (res) => {
  30777. uni.hideLoading();
  30778. if (res.code == 200) {
  30779. uni.showToast({
  30780. icon: "success",
  30781. title: "评价成功"
  30782. });
  30783. uni.$emit("refreshInquiryOrder");
  30784. setTimeout(function() {
  30785. uni.navigateBack({
  30786. delta: 1
  30787. });
  30788. }, 2e3);
  30789. } else {
  30790. uni.showToast({
  30791. icon: "none",
  30792. title: res.msg
  30793. });
  30794. }
  30795. },
  30796. (rej) => {
  30797. }
  30798. );
  30799. }
  30800. }
  30801. };
  30802. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  30803. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  30804. return vue.openBlock(), vue.createElementBlock("view", null, [
  30805. vue.createElementVNode("view", { class: "content" }, [
  30806. vue.createElementVNode("view", { class: "ping" }, [
  30807. vue.createElementVNode("view", { class: "title" }, " 问诊医生 "),
  30808. vue.createElementVNode("view", { class: "doc-box" }, [
  30809. vue.createElementVNode("view", { class: "left" }, [
  30810. vue.createElementVNode("image", {
  30811. src: $data.doctor.avatar,
  30812. mode: "aspectFill"
  30813. }, null, 8, ["src"])
  30814. ]),
  30815. vue.createElementVNode("view", { class: "right" }, [
  30816. vue.createElementVNode("view", { class: "doc-name-box" }, [
  30817. vue.createElementVNode(
  30818. "view",
  30819. { class: "doc-name" },
  30820. vue.toDisplayString($data.doctor.doctorName),
  30821. 1
  30822. /* TEXT */
  30823. )
  30824. ]),
  30825. vue.createElementVNode(
  30826. "view",
  30827. { class: "doc-dept-box" },
  30828. vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
  30829. 1
  30830. /* TEXT */
  30831. ),
  30832. vue.createElementVNode(
  30833. "view",
  30834. { class: "doc-his-box" },
  30835. vue.toDisplayString($data.hospital.hospitalName),
  30836. 1
  30837. /* TEXT */
  30838. )
  30839. ])
  30840. ]),
  30841. vue.createElementVNode("view", { class: "ping-star" }, [
  30842. vue.createElementVNode("text", { class: "label" }, "问诊满意度"),
  30843. vue.createElementVNode("view", { class: "star" }, [
  30844. vue.createVNode(_component_u_rate, {
  30845. size: "24",
  30846. "active-color": "#fcab36",
  30847. modelValue: $data.form.pingStar,
  30848. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.pingStar = $event)
  30849. }, null, 8, ["modelValue"])
  30850. ])
  30851. ]),
  30852. vue.createElementVNode("view", { class: "ping-content" }, [
  30853. vue.createElementVNode("view", { class: "textarea-box" }, [
  30854. vue.withDirectives(vue.createElementVNode(
  30855. "textarea",
  30856. {
  30857. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.pingContent = $event),
  30858. placeholder: "写入您对医生的评价吧",
  30859. maxlength: "200"
  30860. },
  30861. null,
  30862. 512
  30863. /* NEED_PATCH */
  30864. ), [
  30865. [vue.vModelText, $data.form.pingContent]
  30866. ]),
  30867. vue.createElementVNode(
  30868. "view",
  30869. { class: "num-box" },
  30870. vue.toDisplayString($data.form.pingContent.length) + "/200",
  30871. 1
  30872. /* TEXT */
  30873. )
  30874. ])
  30875. ])
  30876. ])
  30877. ]),
  30878. vue.createElementVNode("view", { class: "btn-box" }, [
  30879. vue.createElementVNode("view", {
  30880. class: "btn",
  30881. onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
  30882. }, "提交评价")
  30883. ])
  30884. ]);
  30885. }
  30886. const Pages_orderPingOrder = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-62560382"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/pingOrder.vue"]]);
  30887. let request$6 = new Request$1().http;
  30888. function getPrescribeList(data) {
  30889. return request$6("/app/prescribe/getPrescribeList", data, "GET");
  30890. }
  30891. function getPrescribeById(data) {
  30892. return request$6("/app/prescribe/getPrescribeById", data, "GET");
  30893. }
  30894. const _sfc_main$10 = {
  30895. mixins: [MescrollMixin],
  30896. data() {
  30897. return {
  30898. status: 0,
  30899. tabs: [
  30900. {
  30901. id: 0,
  30902. name: "待开方"
  30903. },
  30904. {
  30905. id: 1,
  30906. name: "已开方"
  30907. },
  30908. {
  30909. id: 2,
  30910. name: "已拒绝"
  30911. }
  30912. ],
  30913. mescroll: null,
  30914. // 上拉加载的配置
  30915. upOption: {
  30916. onScroll: false,
  30917. use: true,
  30918. // 是否启用上拉加载; 默认true
  30919. page: {
  30920. pae: 0,
  30921. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  30922. size: 10
  30923. // 每页数据的数量,默认10
  30924. },
  30925. noMoreSize: 10,
  30926. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  30927. textNoMore: "已经到底了",
  30928. empty: {
  30929. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  30930. tip: "暂无数据"
  30931. }
  30932. },
  30933. // 列表数据
  30934. dataList: []
  30935. };
  30936. },
  30937. onLoad() {
  30938. },
  30939. methods: {
  30940. tabChange(item) {
  30941. this.status = item.id;
  30942. formatAppLog("log", "at pages_order/prescribeList.vue:91", item);
  30943. this.mescroll.resetUpScroll();
  30944. },
  30945. navTo(url2) {
  30946. uni.navigateTo({
  30947. url: url2
  30948. });
  30949. },
  30950. mescrollInit(mescroll) {
  30951. this.mescroll = mescroll;
  30952. },
  30953. /*下拉刷新的回调 */
  30954. downCallback(mescroll) {
  30955. mescroll.resetUpScroll();
  30956. },
  30957. upCallback(page2) {
  30958. var that = this;
  30959. var data = {
  30960. status: this.status,
  30961. pageNum: page2.num,
  30962. pageSize: page2.size
  30963. };
  30964. getPrescribeList(data).then((res) => {
  30965. if (res.code == 200) {
  30966. if (page2.num == 1) {
  30967. that.dataList = res.data.list;
  30968. } else {
  30969. that.dataList = that.dataList.concat(res.data.list);
  30970. }
  30971. that.mescroll.endBySize(res.data.list.length, res.data.total);
  30972. } else {
  30973. uni.showToast({
  30974. icon: "none",
  30975. title: "请求失败"
  30976. });
  30977. that.dataList = null;
  30978. that.mescroll.endErr();
  30979. }
  30980. });
  30981. },
  30982. showImg(item) {
  30983. var imgArr = [];
  30984. imgArr.push(item.rpUrl);
  30985. uni.previewImage({
  30986. urls: imgArr,
  30987. current: imgArr[0]
  30988. });
  30989. }
  30990. }
  30991. };
  30992. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  30993. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  30994. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  30995. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  30996. vue.createElementVNode("view", { class: "top-fixed" }, [
  30997. vue.createVNode(_component_u_tabs, {
  30998. scrollable: false,
  30999. list: $data.tabs,
  31000. lineColor: "#C39A58",
  31001. onChange: $options.tabChange
  31002. }, null, 8, ["list", "onChange"])
  31003. ]),
  31004. vue.createVNode(_component_mescroll_body, {
  31005. top: "88rpx",
  31006. bottom: "0",
  31007. ref: "mescrollRef",
  31008. onInit: $options.mescrollInit,
  31009. onDown: $options.downCallback,
  31010. onUp: $options.upCallback,
  31011. down: _ctx.downOption,
  31012. up: $data.upOption
  31013. }, {
  31014. default: vue.withCtx(() => [
  31015. vue.createElementVNode("view", { class: "prescribe-list" }, [
  31016. (vue.openBlock(true), vue.createElementBlock(
  31017. vue.Fragment,
  31018. null,
  31019. vue.renderList($data.dataList, (item, index2) => {
  31020. return vue.openBlock(), vue.createElementBlock("view", {
  31021. key: index2,
  31022. class: "item",
  31023. onClick: ($event) => $options.navTo("/pages_order/prescribeDetails?prescribeId=" + item.prescribeId)
  31024. }, [
  31025. vue.createElementVNode("view", { class: "ordersn-box" }, [
  31026. vue.createElementVNode(
  31027. "view",
  31028. { class: "num" },
  31029. "处方单号:" + vue.toDisplayString(item.prescribeCode),
  31030. 1
  31031. /* TEXT */
  31032. ),
  31033. vue.createElementVNode("view", { class: "status-box" }, [
  31034. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  31035. key: 0,
  31036. class: "text info"
  31037. }, "待开方")) : vue.createCommentVNode("v-if", true),
  31038. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  31039. key: 1,
  31040. class: "text success"
  31041. }, "已开方")) : vue.createCommentVNode("v-if", true),
  31042. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  31043. key: 2,
  31044. class: "text black"
  31045. }, "已拒绝")) : vue.createCommentVNode("v-if", true)
  31046. ])
  31047. ]),
  31048. vue.createElementVNode(
  31049. "view",
  31050. { class: "ask-text" },
  31051. "诊断结果:" + vue.toDisplayString(item.diagnose),
  31052. 1
  31053. /* TEXT */
  31054. ),
  31055. vue.createElementVNode("view", { class: "drug-list" }, [
  31056. (vue.openBlock(true), vue.createElementBlock(
  31057. vue.Fragment,
  31058. null,
  31059. vue.renderList(item.drugs, (subItme, index3) => {
  31060. return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
  31061. vue.createElementVNode("view", { class: "drug-info" }, [
  31062. vue.createElementVNode("view", { class: "name-box ellipsis" }, [
  31063. vue.createElementVNode(
  31064. "view",
  31065. { class: "tag" },
  31066. vue.toDisplayString(index3 + 1),
  31067. 1
  31068. /* TEXT */
  31069. ),
  31070. vue.createTextVNode(
  31071. vue.toDisplayString(subItme.drugName),
  31072. 1
  31073. /* TEXT */
  31074. )
  31075. ])
  31076. ])
  31077. ]);
  31078. }),
  31079. 256
  31080. /* UNKEYED_FRAGMENT */
  31081. ))
  31082. ]),
  31083. vue.createElementVNode(
  31084. "view",
  31085. { class: "ask-text" },
  31086. "审核结果:" + vue.toDisplayString(item.auditReason),
  31087. 1
  31088. /* TEXT */
  31089. ),
  31090. vue.createElementVNode(
  31091. "view",
  31092. { class: "patient-text" },
  31093. "患者:" + vue.toDisplayString(item.patientName) + " " + vue.toDisplayString(item.patientAge) + "岁 " + vue.toDisplayString(item.patientGender == 1 ? "男" : "女"),
  31094. 1
  31095. /* TEXT */
  31096. ),
  31097. item.createTime != null ? (vue.openBlock(), vue.createElementBlock(
  31098. "view",
  31099. {
  31100. key: 0,
  31101. class: "ask-time"
  31102. },
  31103. "提交时间:" + vue.toDisplayString(item.createTime),
  31104. 1
  31105. /* TEXT */
  31106. )) : vue.createCommentVNode("v-if", true),
  31107. item.auditTime != null ? (vue.openBlock(), vue.createElementBlock(
  31108. "view",
  31109. {
  31110. key: 1,
  31111. class: "ask-time"
  31112. },
  31113. "审核时间:" + vue.toDisplayString(item.auditTime),
  31114. 1
  31115. /* TEXT */
  31116. )) : vue.createCommentVNode("v-if", true)
  31117. ], 8, ["onClick"]);
  31118. }),
  31119. 128
  31120. /* KEYED_FRAGMENT */
  31121. ))
  31122. ])
  31123. ]),
  31124. _: 1
  31125. /* STABLE */
  31126. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  31127. ]);
  31128. }
  31129. const Pages_orderPrescribeList = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/prescribeList.vue"]]);
  31130. const _sfc_main$$ = {
  31131. data() {
  31132. return {
  31133. doctor: null,
  31134. drugs: [],
  31135. prescribe: null,
  31136. prescribeId: null,
  31137. usage: {}
  31138. };
  31139. },
  31140. onLoad(options) {
  31141. if (options.prescribeId != null) {
  31142. this.prescribeId = options.prescribeId;
  31143. } else if (options.hasOwnProperty("q") && options.q) {
  31144. const url2 = decodeURIComponent(options.q);
  31145. const obj = this.$urlToObj(url2);
  31146. this.prescribeId = obj.prescribeId;
  31147. }
  31148. },
  31149. onShow() {
  31150. this.getPrescribeById();
  31151. },
  31152. methods: {
  31153. navTo(url2) {
  31154. uni.navigateTo({
  31155. url: url2
  31156. });
  31157. },
  31158. copyOrderSn() {
  31159. uni.setClipboardData({
  31160. data: this.order.orderSn,
  31161. success: function() {
  31162. uni.showToast({
  31163. title: "复制成功",
  31164. icon: "none"
  31165. });
  31166. }
  31167. });
  31168. },
  31169. getPrescribeById() {
  31170. var data = { prescribeId: this.prescribeId };
  31171. getPrescribeById(data).then(
  31172. (res) => {
  31173. if (res.code == 200) {
  31174. this.prescribe = res.data.prescribe;
  31175. this.drugs = res.data.drugs;
  31176. this.doctor = res.data.doctor;
  31177. this.usage = JSON.parse(this.prescribe.usageJson);
  31178. }
  31179. },
  31180. (err) => {
  31181. }
  31182. );
  31183. },
  31184. navTo(url2) {
  31185. uni.navigateTo({
  31186. url: url2
  31187. });
  31188. }
  31189. }
  31190. };
  31191. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  31192. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  31193. $data.prescribe != null ? (vue.openBlock(), vue.createElementBlock("view", {
  31194. key: 0,
  31195. class: "cont"
  31196. }, [
  31197. vue.createElementVNode("view", { class: "other-info" }, [
  31198. vue.createElementVNode("view", { class: "title" }, "御君方互联网医院处方笺"),
  31199. vue.createElementVNode("view", { class: "item" }, [
  31200. vue.createElementVNode("view", { class: "left" }, [
  31201. vue.createElementVNode("text", { class: "label" }, "医生姓名:"),
  31202. vue.createElementVNode(
  31203. "text",
  31204. { class: "text" },
  31205. vue.toDisplayString($data.doctor.doctorName),
  31206. 1
  31207. /* TEXT */
  31208. )
  31209. ])
  31210. ]),
  31211. vue.createElementVNode("view", { class: "item" }, [
  31212. vue.createElementVNode("view", { class: "left" }, [
  31213. vue.createElementVNode("text", { class: "label" }, "患者姓名:"),
  31214. vue.createElementVNode(
  31215. "text",
  31216. { class: "text" },
  31217. vue.toDisplayString($data.prescribe.patientName),
  31218. 1
  31219. /* TEXT */
  31220. )
  31221. ])
  31222. ]),
  31223. vue.createElementVNode("view", { class: "item" }, [
  31224. vue.createElementVNode("view", { class: "left" }, [
  31225. vue.createElementVNode("text", { class: "label" }, "患者年龄:"),
  31226. vue.createElementVNode(
  31227. "text",
  31228. { class: "text" },
  31229. vue.toDisplayString($data.prescribe.patientAge) + "岁 ",
  31230. 1
  31231. /* TEXT */
  31232. )
  31233. ])
  31234. ]),
  31235. vue.createElementVNode("view", { class: "item" }, [
  31236. vue.createElementVNode("view", { class: "left" }, [
  31237. vue.createElementVNode("text", { class: "label" }, "患者性别:"),
  31238. vue.createElementVNode(
  31239. "text",
  31240. { class: "text" },
  31241. vue.toDisplayString($data.prescribe.patientGender == 1 ? "男" : "女"),
  31242. 1
  31243. /* TEXT */
  31244. )
  31245. ])
  31246. ])
  31247. ]),
  31248. vue.createElementVNode("view", { class: "other-info" }, [
  31249. vue.createElementVNode("view", { class: "item" }, [
  31250. vue.createElementVNode("view", { class: "left" }, [
  31251. vue.createElementVNode("text", { class: "label" }, "处方单号:"),
  31252. vue.createElementVNode(
  31253. "text",
  31254. { class: "text" },
  31255. vue.toDisplayString($data.prescribe.prescribeCode),
  31256. 1
  31257. /* TEXT */
  31258. )
  31259. ])
  31260. ]),
  31261. vue.createElementVNode("view", { class: "item" }, [
  31262. vue.createElementVNode("view", { class: "left" }, [
  31263. vue.createElementVNode("text", { class: "label" }, "开方时间:"),
  31264. vue.createElementVNode(
  31265. "text",
  31266. { class: "text" },
  31267. vue.toDisplayString($data.prescribe.createTime),
  31268. 1
  31269. /* TEXT */
  31270. )
  31271. ])
  31272. ]),
  31273. vue.createElementVNode("view", { class: "item" }, [
  31274. vue.createElementVNode("view", { class: "left" }, [
  31275. vue.createElementVNode("text", { class: "label" }, "医生诊断:"),
  31276. vue.createElementVNode(
  31277. "view",
  31278. { class: "text" },
  31279. vue.toDisplayString($data.prescribe.diagnose),
  31280. 1
  31281. /* TEXT */
  31282. )
  31283. ])
  31284. ]),
  31285. vue.createElementVNode("view", { class: "item" }, [
  31286. vue.createElementVNode("view", { class: "left" }, [
  31287. vue.createElementVNode("text", { class: "label" }, "审核意见:"),
  31288. $data.prescribe.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  31289. "text",
  31290. {
  31291. key: 0,
  31292. class: "text"
  31293. },
  31294. vue.toDisplayString($data.prescribe.auditReason),
  31295. 1
  31296. /* TEXT */
  31297. )) : vue.createCommentVNode("v-if", true)
  31298. ])
  31299. ])
  31300. ]),
  31301. vue.createElementVNode("view", { class: "drug-cont" }, [
  31302. vue.createElementVNode("view", { class: "title" }, "药品信息"),
  31303. (vue.openBlock(true), vue.createElementBlock(
  31304. vue.Fragment,
  31305. null,
  31306. vue.renderList($data.drugs, (item) => {
  31307. return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
  31308. vue.createElementVNode("view", { class: "drug" }, [
  31309. vue.createElementVNode("view", { class: "left" }, [
  31310. vue.createElementVNode("image", {
  31311. src: item.drugImgUrl == "" ? "/static/images/drug.svg" : item.drugImgUrl
  31312. }, null, 8, ["src"]),
  31313. vue.createElementVNode("view", { class: "name-cont" }, [
  31314. vue.createElementVNode("view", { class: "name-box" }, [
  31315. item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  31316. key: 0,
  31317. class: "tag"
  31318. }, "西药")) : vue.createCommentVNode("v-if", true),
  31319. item.drugType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  31320. key: 1,
  31321. class: "tag"
  31322. }, "中药")) : vue.createCommentVNode("v-if", true),
  31323. vue.createElementVNode(
  31324. "view",
  31325. { class: "name" },
  31326. vue.toDisplayString(item.drugName),
  31327. 1
  31328. /* TEXT */
  31329. )
  31330. ]),
  31331. vue.createElementVNode(
  31332. "view",
  31333. { class: "spec" },
  31334. vue.toDisplayString(item.drugSpec),
  31335. 1
  31336. /* TEXT */
  31337. ),
  31338. vue.createElementVNode("view", { class: "price" }, [
  31339. vue.createElementVNode("view", { class: "left" }, [
  31340. vue.createCommentVNode(" {{item.drugPrice}}元 ")
  31341. ]),
  31342. item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock(
  31343. "view",
  31344. {
  31345. key: 0,
  31346. class: "num"
  31347. },
  31348. "X" + vue.toDisplayString(item.drugNum),
  31349. 1
  31350. /* TEXT */
  31351. )) : vue.createCommentVNode("v-if", true)
  31352. ])
  31353. ])
  31354. ])
  31355. ]),
  31356. item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  31357. key: 0,
  31358. class: "drug-use"
  31359. }, [
  31360. vue.createElementVNode(
  31361. "view",
  31362. { class: "name" },
  31363. "用药频率:" + vue.toDisplayString(item.usageFrequencyUnit),
  31364. 1
  31365. /* TEXT */
  31366. ),
  31367. vue.createElementVNode(
  31368. "view",
  31369. { class: "name" },
  31370. "单次用量:" + vue.toDisplayString(item.usagePerUseCount),
  31371. 1
  31372. /* TEXT */
  31373. ),
  31374. vue.createElementVNode(
  31375. "view",
  31376. { class: "name" },
  31377. "用药方法:" + vue.toDisplayString(item.usageMethod),
  31378. 1
  31379. /* TEXT */
  31380. ),
  31381. vue.createElementVNode(
  31382. "view",
  31383. { class: "name" },
  31384. "备注:" + vue.toDisplayString(item.remark),
  31385. 1
  31386. /* TEXT */
  31387. )
  31388. ])) : vue.createCommentVNode("v-if", true)
  31389. ]);
  31390. }),
  31391. 256
  31392. /* UNKEYED_FRAGMENT */
  31393. ))
  31394. ]),
  31395. $data.prescribe.prescribeType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  31396. key: 0,
  31397. class: "other-info"
  31398. }, [
  31399. vue.createElementVNode("view", { class: "title left" }, "用药说明"),
  31400. vue.createElementVNode("view", { class: "item" }, [
  31401. vue.createElementVNode("view", { class: "left" }, [
  31402. vue.createElementVNode("text", { class: "label" }, "用药数量:"),
  31403. vue.createElementVNode(
  31404. "text",
  31405. { class: "text" },
  31406. vue.toDisplayString($data.usage.counts),
  31407. 1
  31408. /* TEXT */
  31409. )
  31410. ])
  31411. ]),
  31412. vue.createElementVNode("view", { class: "item" }, [
  31413. vue.createElementVNode("view", { class: "left" }, [
  31414. vue.createElementVNode("text", { class: "label" }, "用药频率:"),
  31415. vue.createElementVNode(
  31416. "text",
  31417. { class: "text" },
  31418. vue.toDisplayString($data.usage.usageFrequencyUnit),
  31419. 1
  31420. /* TEXT */
  31421. )
  31422. ])
  31423. ]),
  31424. vue.createElementVNode("view", { class: "item" }, [
  31425. vue.createElementVNode("view", { class: "left" }, [
  31426. vue.createElementVNode("text", { class: "label" }, "单次用量:"),
  31427. vue.createElementVNode(
  31428. "text",
  31429. { class: "text" },
  31430. vue.toDisplayString($data.usage.usagePerUseCount),
  31431. 1
  31432. /* TEXT */
  31433. )
  31434. ])
  31435. ]),
  31436. vue.createElementVNode("view", { class: "item" }, [
  31437. vue.createElementVNode("view", { class: "left" }, [
  31438. vue.createElementVNode("text", { class: "label" }, "用药方法:"),
  31439. vue.createElementVNode(
  31440. "text",
  31441. { class: "text" },
  31442. vue.toDisplayString($data.usage.usageMethod),
  31443. 1
  31444. /* TEXT */
  31445. )
  31446. ])
  31447. ]),
  31448. vue.createElementVNode("view", { class: "item" }, [
  31449. vue.createElementVNode("view", { class: "left" }, [
  31450. vue.createElementVNode("text", { class: "label" }, "备注:"),
  31451. vue.createElementVNode(
  31452. "text",
  31453. { class: "text" },
  31454. vue.toDisplayString($data.usage.remark),
  31455. 1
  31456. /* TEXT */
  31457. )
  31458. ])
  31459. ])
  31460. ])) : vue.createCommentVNode("v-if", true),
  31461. $data.prescribe.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  31462. key: 1,
  31463. class: "other-info"
  31464. }, [
  31465. vue.createCommentVNode(' <view class="sign">\r\n 出方医生签名\r\n <image :src="prescribe.doctorSignUrl"></image>\r\n </view> '),
  31466. vue.createElementVNode("view", { class: "sign" }, [
  31467. vue.createTextVNode(" 处方医生签名 "),
  31468. vue.createElementVNode("image", {
  31469. src: $data.prescribe.prescribeDoctorSignUrl
  31470. }, null, 8, ["src"])
  31471. ]),
  31472. vue.createElementVNode("view", { class: "sign" }, [
  31473. vue.createTextVNode(" 药师签名 "),
  31474. vue.createElementVNode("image", {
  31475. src: $data.prescribe.drugDoctorSignUrl
  31476. }, null, 8, ["src"])
  31477. ])
  31478. ])) : vue.createCommentVNode("v-if", true),
  31479. vue.createElementVNode("view", { class: "btn-box" }, [
  31480. $data.prescribe.storeOrderId != null && $data.prescribe.storeOrderId > 0 && $data.prescribe.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  31481. key: 0,
  31482. class: "btn pay",
  31483. onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_order/storeOrderDetail?orderId=" + $data.prescribe.storeOrderId))
  31484. }, "药品订单")) : vue.createCommentVNode("v-if", true)
  31485. ])
  31486. ])) : vue.createCommentVNode("v-if", true)
  31487. ]);
  31488. }
  31489. const Pages_orderPrescribeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-896a7eeb"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/prescribeDetails.vue"]]);
  31490. const _sfc_main$_ = {
  31491. mixins: [MescrollMixin],
  31492. data() {
  31493. return {
  31494. orderStatusOptions: [],
  31495. searchKey: "",
  31496. status: "0",
  31497. tabs: [
  31498. { name: "全部", id: "0" },
  31499. { name: "待付款", id: "1" },
  31500. { name: "待发货", id: "2" },
  31501. { name: "待收货", id: "3" },
  31502. { name: "已完成", id: "4" }
  31503. ],
  31504. mescroll: null,
  31505. // 上拉加载的配置
  31506. upOption: {
  31507. onScroll: false,
  31508. use: true,
  31509. // 是否启用上拉加载; 默认true
  31510. page: {
  31511. pae: 0,
  31512. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  31513. size: 10
  31514. // 每页数据的数量,默认10
  31515. },
  31516. noMoreSize: 10,
  31517. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  31518. textNoMore: "已经到底了",
  31519. empty: {
  31520. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  31521. tip: "暂无数据"
  31522. }
  31523. },
  31524. // 列表数据
  31525. dataList: []
  31526. };
  31527. },
  31528. onLoad(option) {
  31529. var that = this;
  31530. uni.$on("refreshStoreOrder", () => {
  31531. that.mescroll.resetUpScroll();
  31532. });
  31533. this.getDictByKey("sys_order_status");
  31534. },
  31535. methods: {
  31536. getDictByKey(key) {
  31537. var data = { key };
  31538. getDictByKey(data).then(
  31539. (res) => {
  31540. if (res.code == 200) {
  31541. if (key == "sys_order_status") {
  31542. this.orderStatusOptions = res.data;
  31543. }
  31544. }
  31545. },
  31546. (err) => {
  31547. }
  31548. );
  31549. },
  31550. goSearch(e) {
  31551. this.searchKey = e.detail.value;
  31552. this.mescroll.resetUpScroll();
  31553. },
  31554. refund(item) {
  31555. uni.navigateTo({
  31556. url: "/pages_order/storeOrderRefundApply?orderId=" + item.orderId
  31557. });
  31558. },
  31559. tabChange(item) {
  31560. this.status = item.id;
  31561. this.mescroll.resetUpScroll();
  31562. },
  31563. mescrollInit(mescroll) {
  31564. this.mescroll = mescroll;
  31565. },
  31566. /*下拉刷新的回调 */
  31567. downCallback(mescroll) {
  31568. mescroll.resetUpScroll();
  31569. },
  31570. upCallback(page2) {
  31571. var that = this;
  31572. var data = {
  31573. keyword: this.searchKey,
  31574. status: this.status,
  31575. pageNum: page2.num,
  31576. pageSize: page2.size
  31577. };
  31578. getMyStoreOrderList(data).then((res) => {
  31579. if (res.code == 200) {
  31580. res.data.list.forEach(function(value2, index2, array3) {
  31581. value2.items = JSON.parse(value2.itemJson);
  31582. });
  31583. if (page2.num == 1) {
  31584. that.dataList = res.data.list;
  31585. } else {
  31586. that.dataList = that.dataList.concat(res.data.list);
  31587. }
  31588. that.mescroll.endBySize(res.data.list.length, res.data.total);
  31589. } else {
  31590. uni.showToast({
  31591. icon: "none",
  31592. title: "请求失败"
  31593. });
  31594. that.dataList = null;
  31595. that.mescroll.endErr();
  31596. }
  31597. });
  31598. },
  31599. // 查看订单详情
  31600. showDetail(item) {
  31601. uni.navigateTo({
  31602. url: "./storeOrderDetail?orderId=" + item.orderId
  31603. });
  31604. },
  31605. finish(item) {
  31606. var that = this;
  31607. uni.showModal({
  31608. title: "提示",
  31609. content: "确定已收货吗",
  31610. success: function(res) {
  31611. if (res.confirm) {
  31612. var data = {
  31613. orderId: item.orderId
  31614. };
  31615. finishOrder(data).then((res2) => {
  31616. if (res2.code == 200) {
  31617. uni.showToast({
  31618. icon: "success",
  31619. title: "操作成功"
  31620. });
  31621. that.mescroll.resetUpScroll();
  31622. } else {
  31623. uni.showToast({
  31624. icon: "none",
  31625. title: res2.msg
  31626. });
  31627. }
  31628. });
  31629. } else if (res.cancel)
  31630. ;
  31631. }
  31632. });
  31633. },
  31634. cancel(item) {
  31635. var that = this;
  31636. uni.showModal({
  31637. title: "提示",
  31638. content: "确定取消订单吗",
  31639. success: function(res) {
  31640. if (res.confirm) {
  31641. var data = {
  31642. orderId: item.orderId
  31643. };
  31644. cancelOrder(data).then((res2) => {
  31645. if (res2.code == 200) {
  31646. uni.showToast({
  31647. icon: "success",
  31648. title: "操作成功"
  31649. });
  31650. that.mescroll.resetUpScroll();
  31651. } else {
  31652. uni.showToast({
  31653. icon: "none",
  31654. title: res2.msg
  31655. });
  31656. }
  31657. });
  31658. } else if (res.cancel)
  31659. ;
  31660. }
  31661. });
  31662. },
  31663. pay(item) {
  31664. uni.navigateTo({
  31665. url: "/pages_order/storeOrderPay?orderId=" + item.orderId
  31666. });
  31667. },
  31668. // 查看物流
  31669. showDelivery(item) {
  31670. uni.navigateTo({
  31671. url: "./storeOrderDelivery?orderId=" + item.orderId
  31672. });
  31673. }
  31674. }
  31675. };
  31676. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  31677. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  31678. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  31679. return vue.openBlock(), vue.createElementBlock("view", null, [
  31680. vue.createElementVNode("view", { class: "top-fixed" }, [
  31681. vue.createVNode(_component_u_tabs, {
  31682. scrollable: false,
  31683. list: $data.tabs,
  31684. lineColor: "#C39A58",
  31685. onChange: $options.tabChange
  31686. }, null, 8, ["list", "onChange"])
  31687. ]),
  31688. vue.createCommentVNode(" 订单列表 "),
  31689. vue.createVNode(_component_mescroll_body, {
  31690. top: "88rpx",
  31691. bottom: "0",
  31692. ref: "mescrollRef",
  31693. onInit: $options.mescrollInit,
  31694. onDown: $options.downCallback,
  31695. onUp: $options.upCallback,
  31696. down: _ctx.downOption,
  31697. up: $data.upOption
  31698. }, {
  31699. default: vue.withCtx(() => [
  31700. vue.createElementVNode("view", { class: "order-list" }, [
  31701. (vue.openBlock(true), vue.createElementBlock(
  31702. vue.Fragment,
  31703. null,
  31704. vue.renderList($data.dataList, (item, index2) => {
  31705. return vue.openBlock(), vue.createElementBlock("view", {
  31706. key: index2,
  31707. class: "item"
  31708. }, [
  31709. vue.createCommentVNode(" 订单号,状态 "),
  31710. vue.createElementVNode("view", {
  31711. class: "ordersn-box",
  31712. onClick: ($event) => $options.showDetail(item)
  31713. }, [
  31714. vue.createElementVNode(
  31715. "view",
  31716. { class: "num" },
  31717. "订单号:" + vue.toDisplayString(item.orderCode),
  31718. 1
  31719. /* TEXT */
  31720. ),
  31721. vue.createElementVNode("view", { class: "status-box" }, [
  31722. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  31723. "text",
  31724. {
  31725. key: 0,
  31726. class: "text info"
  31727. },
  31728. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  31729. 1
  31730. /* TEXT */
  31731. )) : vue.createCommentVNode("v-if", true),
  31732. item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
  31733. "text",
  31734. {
  31735. key: 1,
  31736. class: "text success"
  31737. },
  31738. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  31739. 1
  31740. /* TEXT */
  31741. )) : vue.createCommentVNode("v-if", true),
  31742. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  31743. "text",
  31744. {
  31745. key: 2,
  31746. class: "text info"
  31747. },
  31748. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  31749. 1
  31750. /* TEXT */
  31751. )) : vue.createCommentVNode("v-if", true)
  31752. ])
  31753. ], 8, ["onClick"]),
  31754. vue.createCommentVNode(" 药品列表 "),
  31755. vue.createElementVNode("view", { class: "drug-list" }, [
  31756. (vue.openBlock(true), vue.createElementBlock(
  31757. vue.Fragment,
  31758. null,
  31759. vue.renderList(item.items, (subItem, subIndex) => {
  31760. return vue.openBlock(), vue.createElementBlock("view", {
  31761. onClick: ($event) => $options.showDetail(item),
  31762. key: subIndex,
  31763. class: "drug-item"
  31764. }, [
  31765. vue.createElementVNode("view", { class: "img-box" }, [
  31766. vue.createElementVNode("image", {
  31767. src: JSON.parse(subItem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subItem.jsonInfo).image,
  31768. mode: "aspectFill"
  31769. }, null, 8, ["src"])
  31770. ]),
  31771. vue.createElementVNode("view", { class: "drug-info" }, [
  31772. vue.createElementVNode("view", null, [
  31773. vue.createElementVNode(
  31774. "view",
  31775. { class: "name-box ellipsis2" },
  31776. vue.toDisplayString(JSON.parse(subItem.jsonInfo).productName),
  31777. 1
  31778. /* TEXT */
  31779. ),
  31780. vue.createElementVNode(
  31781. "view",
  31782. { class: "spec ellipsis2" },
  31783. vue.toDisplayString(JSON.parse(subItem.jsonInfo).sku),
  31784. 1
  31785. /* TEXT */
  31786. )
  31787. ]),
  31788. vue.createElementVNode("view", { class: "num-box" }, [
  31789. vue.createElementVNode("view", { class: "price" }, [
  31790. vue.createCommentVNode(' <text class="unit">¥</text> '),
  31791. vue.createCommentVNode(' <text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text> ')
  31792. ]),
  31793. item.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
  31794. "view",
  31795. {
  31796. key: 0,
  31797. class: "amount"
  31798. },
  31799. "x" + vue.toDisplayString(JSON.parse(subItem.jsonInfo).num),
  31800. 1
  31801. /* TEXT */
  31802. )) : vue.createCommentVNode("v-if", true)
  31803. ])
  31804. ])
  31805. ], 8, ["onClick"]);
  31806. }),
  31807. 128
  31808. /* KEYED_FRAGMENT */
  31809. )),
  31810. vue.createCommentVNode(" 实付金额、按钮 "),
  31811. vue.createElementVNode("view", { class: "bottom-box" }, [
  31812. vue.createElementVNode("view", { class: "amount-paid" }, [
  31813. vue.createElementVNode("text", { class: "label" }, "订单金额:"),
  31814. vue.createElementVNode("view", { class: "price-box" }, [
  31815. vue.createElementVNode("view", { class: "unit" }, "¥"),
  31816. vue.createElementVNode(
  31817. "view",
  31818. { class: "num" },
  31819. vue.toDisplayString(item.payPrice.toFixed(2)),
  31820. 1
  31821. /* TEXT */
  31822. )
  31823. ])
  31824. ]),
  31825. vue.createElementVNode("view", { class: "btn-box" }, [
  31826. vue.createCommentVNode(` <view class="btn cancel">
  31827. 联系客服
  31828. <button class='contact-btn' open-type="contact">
  31829. </button>
  31830. </view> `),
  31831. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  31832. key: 0,
  31833. class: "btn cancel",
  31834. onClick: ($event) => $options.cancel(item)
  31835. }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  31836. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  31837. key: 1,
  31838. class: "btn pay",
  31839. onClick: ($event) => $options.pay(item)
  31840. }, "支付", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  31841. vue.createCommentVNode(' <view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view> '),
  31842. vue.createCommentVNode(' <view v-if="item.deliverySn!=null" class="btn pay" @click.stop="showDelivery(item)">查看物流</view> '),
  31843. item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  31844. key: 2,
  31845. class: "btn pay",
  31846. onClick: ($event) => $options.finish(item)
  31847. }, "确认收货", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  31848. ])
  31849. ])
  31850. ])
  31851. ]);
  31852. }),
  31853. 128
  31854. /* KEYED_FRAGMENT */
  31855. ))
  31856. ])
  31857. ]),
  31858. _: 1
  31859. /* STABLE */
  31860. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  31861. ]);
  31862. }
  31863. const Pages_orderStoreOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderList.vue"]]);
  31864. const _sfc_main$Z = {
  31865. data() {
  31866. return {
  31867. payLimitTime: null,
  31868. orderId: null,
  31869. order: {},
  31870. items: []
  31871. };
  31872. },
  31873. onLoad(option) {
  31874. this.orderId = option.orderId;
  31875. },
  31876. onShow() {
  31877. this.getMyStoreOrderById();
  31878. },
  31879. methods: {
  31880. showPrescribe() {
  31881. var data = { prescribeId: this.order.prescribeId };
  31882. getPrescribeById(data).then(
  31883. (res) => {
  31884. if (res.code == 200) {
  31885. if (res.data.prescribe.prescribeImgUrl != null) {
  31886. var data2 = [];
  31887. data2.push(res.data.prescribe.prescribeImgUrl);
  31888. uni.previewImage({
  31889. current: 0,
  31890. urls: data2
  31891. });
  31892. } else {
  31893. uni.showToast({
  31894. icon: "none",
  31895. title: "电子处方单不存在"
  31896. });
  31897. }
  31898. }
  31899. },
  31900. (err) => {
  31901. }
  31902. );
  31903. },
  31904. getMyStoreOrderById() {
  31905. var data = { orderId: this.orderId };
  31906. getMyStoreOrderById(data).then((res) => {
  31907. if (res.code == 200) {
  31908. this.order = res.order;
  31909. this.items = res.items;
  31910. this.payLimitTime = res.payLimitTime;
  31911. this.prescribe = res.prescribe;
  31912. } else {
  31913. uni.showToast({
  31914. icon: "none",
  31915. title: "请求失败"
  31916. });
  31917. }
  31918. });
  31919. },
  31920. showDelivery() {
  31921. uni.navigateTo({
  31922. url: "./storeOrderDelivery?orderId=" + this.orderId
  31923. });
  31924. },
  31925. cancel() {
  31926. var that = this;
  31927. uni.showModal({
  31928. title: "提示",
  31929. content: "确定取消订单吗",
  31930. success: function(res) {
  31931. if (res.confirm) {
  31932. var data = {
  31933. orderId: that.order.orderId
  31934. };
  31935. cancelOrder(data).then((res2) => {
  31936. if (res2.code == 200) {
  31937. that.getMyStoreOrderById();
  31938. uni.$emit("refreshStoreOrder");
  31939. } else {
  31940. uni.showToast({
  31941. icon: "none",
  31942. title: res2.msg
  31943. });
  31944. }
  31945. });
  31946. } else if (res.cancel)
  31947. ;
  31948. }
  31949. });
  31950. },
  31951. finish() {
  31952. var that = this;
  31953. uni.showModal({
  31954. title: "提示",
  31955. content: "确定已收货吗",
  31956. success: function(res) {
  31957. if (res.confirm) {
  31958. var data = {
  31959. orderId: that.orderId
  31960. };
  31961. finishOrder(data).then((res2) => {
  31962. if (res2.code == 200) {
  31963. that.getMyStoreOrderById();
  31964. uni.$emit("refreshStoreOrder");
  31965. } else {
  31966. uni.showToast({
  31967. icon: "none",
  31968. title: res2.msg
  31969. });
  31970. }
  31971. });
  31972. } else if (res.cancel)
  31973. ;
  31974. }
  31975. });
  31976. },
  31977. pay() {
  31978. uni.navigateTo({
  31979. url: "/pages_order/storeOrderPay?orderId=" + this.order.orderId
  31980. });
  31981. },
  31982. payRemain() {
  31983. uni.navigateTo({
  31984. url: "/pages_user/user/paymentOrderRemain?orderId=" + this.order.orderId
  31985. });
  31986. },
  31987. // 复制订单编号
  31988. copyOrderSn(text) {
  31989. uni.setClipboardData({
  31990. data: text,
  31991. success: () => {
  31992. uni.showToast({
  31993. title: "内容已成功复制到剪切板",
  31994. icon: "none"
  31995. });
  31996. }
  31997. });
  31998. },
  31999. // 退货
  32000. refund() {
  32001. uni.navigateTo({
  32002. url: "/pages_order/storeOrderRefundApply?orderId=" + this.orderId
  32003. });
  32004. }
  32005. }
  32006. };
  32007. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  32008. return vue.openBlock(), vue.createElementBlock("view", null, [
  32009. vue.createElementVNode("view", { class: "cont" }, [
  32010. vue.createElementVNode("view", { class: "bg" }),
  32011. vue.createElementVNode("view", { class: "inner" }, [
  32012. vue.createCommentVNode(" 订单状态 "),
  32013. vue.createElementVNode("view", { class: "order-status" }, [
  32014. vue.createCommentVNode(" 待付款 "),
  32015. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  32016. key: 0,
  32017. class: "inner"
  32018. }, [
  32019. vue.createElementVNode("view", { class: "img-box" }, [
  32020. vue.createElementVNode("image", {
  32021. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
  32022. mode: ""
  32023. })
  32024. ]),
  32025. vue.createElementVNode("view", { class: "status-box" }, [
  32026. vue.createElementVNode("text", { class: "status" }, "待付款"),
  32027. vue.createElementVNode(
  32028. "text",
  32029. { class: "desc" },
  32030. "请在" + vue.toDisplayString($data.payLimitTime) + "前完成支付",
  32031. 1
  32032. /* TEXT */
  32033. )
  32034. ])
  32035. ])) : vue.createCommentVNode("v-if", true),
  32036. vue.createCommentVNode(" 待发货 "),
  32037. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  32038. key: 1,
  32039. class: "inner"
  32040. }, [
  32041. vue.createElementVNode("view", { class: "img-box" }, [
  32042. vue.createElementVNode("image", {
  32043. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png",
  32044. mode: ""
  32045. })
  32046. ]),
  32047. vue.createElementVNode("view", { class: "status-box" }, [
  32048. vue.createElementVNode("text", { class: "status" }, "待发货"),
  32049. vue.createElementVNode("text", { class: "desc" }, "等待后台发货")
  32050. ])
  32051. ])) : vue.createCommentVNode("v-if", true),
  32052. vue.createCommentVNode(" 已发货、待收货 "),
  32053. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  32054. key: 2,
  32055. class: "inner"
  32056. }, [
  32057. vue.createElementVNode("view", { class: "img-box" }, [
  32058. vue.createElementVNode("image", {
  32059. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png",
  32060. mode: ""
  32061. })
  32062. ]),
  32063. vue.createElementVNode("view", { class: "status-box" }, [
  32064. vue.createElementVNode("text", { class: "status" }, "待收货"),
  32065. vue.createElementVNode("text", { class: "desc" }, "运输中")
  32066. ])
  32067. ])) : vue.createCommentVNode("v-if", true),
  32068. vue.createCommentVNode(" 已完成 "),
  32069. $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  32070. key: 3,
  32071. class: "inner"
  32072. }, [
  32073. vue.createElementVNode("view", { class: "img-box" }, [
  32074. vue.createElementVNode("image", {
  32075. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
  32076. mode: ""
  32077. })
  32078. ]),
  32079. vue.createElementVNode("view", { class: "status-box" }, [
  32080. vue.createElementVNode("text", { class: "status" }, "已完成"),
  32081. vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成")
  32082. ])
  32083. ])) : vue.createCommentVNode("v-if", true),
  32084. vue.createCommentVNode("交易取消 "),
  32085. $data.order.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
  32086. key: 4,
  32087. class: "inner"
  32088. }, [
  32089. vue.createElementVNode("view", { class: "img-box" }, [
  32090. vue.createElementVNode("image", {
  32091. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
  32092. mode: ""
  32093. })
  32094. ]),
  32095. vue.createElementVNode("view", { class: "status-box" }, [
  32096. vue.createElementVNode("text", { class: "status" }, "交易关闭"),
  32097. vue.createElementVNode("text", { class: "desc" }, "订单已取消")
  32098. ])
  32099. ])) : vue.createCommentVNode("v-if", true),
  32100. $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  32101. key: 5,
  32102. class: "inner"
  32103. }, [
  32104. vue.createElementVNode("view", { class: "img-box" }, [
  32105. vue.createElementVNode("image", {
  32106. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
  32107. mode: ""
  32108. })
  32109. ]),
  32110. vue.createElementVNode("view", { class: "status-box" }, [
  32111. vue.createElementVNode("text", { class: "status" }, "申请售后"),
  32112. vue.createElementVNode("text", { class: "desc" }, "请等待客服审核,您的退款将在2-5个工作日内原路退回")
  32113. ])
  32114. ])) : vue.createCommentVNode("v-if", true),
  32115. $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
  32116. key: 6,
  32117. class: "inner"
  32118. }, [
  32119. vue.createElementVNode("view", { class: "img-box" }, [
  32120. vue.createElementVNode("image", {
  32121. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
  32122. mode: ""
  32123. })
  32124. ]),
  32125. vue.createElementVNode("view", { class: "status-box" }, [
  32126. vue.createElementVNode("text", { class: "status" }, "退款成功"),
  32127. vue.createElementVNode("text", { class: "desc" }, "已成功退款")
  32128. ])
  32129. ])) : vue.createCommentVNode("v-if", true)
  32130. ]),
  32131. vue.createCommentVNode(" 下单人信息 "),
  32132. $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", {
  32133. key: 0,
  32134. class: "order-placer"
  32135. }, [
  32136. vue.createElementVNode("view", { class: "inner" }, [
  32137. vue.createElementVNode("image", {
  32138. class: "location",
  32139. src: "/static/images/location.png",
  32140. mode: ""
  32141. }),
  32142. vue.createElementVNode("view", { class: "info" }, [
  32143. vue.createElementVNode("view", { class: "name-phone" }, [
  32144. vue.createElementVNode(
  32145. "text",
  32146. { class: "text" },
  32147. vue.toDisplayString($data.order.userName),
  32148. 1
  32149. /* TEXT */
  32150. ),
  32151. $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock(
  32152. "text",
  32153. {
  32154. key: 0,
  32155. class: "text"
  32156. },
  32157. vue.toDisplayString($data.order.userPhone),
  32158. 1
  32159. /* TEXT */
  32160. )) : vue.createCommentVNode("v-if", true)
  32161. ]),
  32162. vue.createElementVNode(
  32163. "view",
  32164. { class: "address ellipsis2" },
  32165. vue.toDisplayString($data.order.userAddress),
  32166. 1
  32167. /* TEXT */
  32168. )
  32169. ])
  32170. ])
  32171. ])) : vue.createCommentVNode("v-if", true),
  32172. vue.createElementVNode("view", { class: "content" }, [
  32173. vue.createCommentVNode(" 药品列表 "),
  32174. vue.createElementVNode("view", { class: "goods-list" }, [
  32175. (vue.openBlock(true), vue.createElementBlock(
  32176. vue.Fragment,
  32177. null,
  32178. vue.renderList($data.items, (item, index2) => {
  32179. return vue.openBlock(), vue.createElementBlock("view", {
  32180. key: index2,
  32181. class: "item"
  32182. }, [
  32183. vue.createElementVNode("view", { class: "img-box" }, [
  32184. vue.createElementVNode("image", {
  32185. src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
  32186. mode: "aspectFill"
  32187. }, null, 8, ["src"])
  32188. ]),
  32189. vue.createElementVNode("view", { class: "info-box" }, [
  32190. vue.createElementVNode("view", null, [
  32191. vue.createElementVNode(
  32192. "view",
  32193. { class: "name-box ellipsis2" },
  32194. vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
  32195. 1
  32196. /* TEXT */
  32197. ),
  32198. vue.createElementVNode(
  32199. "view",
  32200. { class: "spec ellipsis2" },
  32201. vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
  32202. 1
  32203. /* TEXT */
  32204. )
  32205. ]),
  32206. vue.createElementVNode("view", { class: "price-num" }, [
  32207. vue.createElementVNode("view", { class: "price" }, [
  32208. vue.createCommentVNode(' <text class="unit">¥</text> '),
  32209. vue.createCommentVNode(' <text class="num" v-if="JSON.parse(item.jsonInfo).price!=null">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> ')
  32210. ]),
  32211. $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
  32212. "view",
  32213. {
  32214. key: 0,
  32215. class: "num"
  32216. },
  32217. "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
  32218. 1
  32219. /* TEXT */
  32220. )) : vue.createCommentVNode("v-if", true)
  32221. ])
  32222. ])
  32223. ]);
  32224. }),
  32225. 128
  32226. /* KEYED_FRAGMENT */
  32227. )),
  32228. vue.createCommentVNode(" 已优惠、小计 "),
  32229. vue.createElementVNode("view", { class: "sub-total" }, [
  32230. vue.createElementVNode(
  32231. "view",
  32232. { class: "discount" },
  32233. " 订单金额:¥" + vue.toDisplayString($data.order.payPrice),
  32234. 1
  32235. /* TEXT */
  32236. ),
  32237. vue.createCommentVNode(' <text class="label">实付金额:</text>\r\n <view class="price">\r\n <text class="unit">¥</text>\r\n <text class="num">{{order.payMoney}}</text>\r\n </view> ')
  32238. ])
  32239. ]),
  32240. vue.createCommentVNode(" 订单信息 "),
  32241. vue.createElementVNode("view", { class: "order-info" }, [
  32242. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  32243. vue.createElementVNode("view", { class: "item" }, [
  32244. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  32245. vue.createElementVNode("view", { class: "sn-box" }, [
  32246. vue.createElementVNode(
  32247. "text",
  32248. { class: "text" },
  32249. vue.toDisplayString($data.order.orderCode),
  32250. 1
  32251. /* TEXT */
  32252. ),
  32253. vue.createElementVNode("view", {
  32254. class: "copy-btn",
  32255. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode))
  32256. }, "复制")
  32257. ])
  32258. ]),
  32259. vue.createElementVNode("view", { class: "item" }, [
  32260. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  32261. vue.createElementVNode(
  32262. "text",
  32263. { class: "text" },
  32264. vue.toDisplayString($data.order.createTime),
  32265. 1
  32266. /* TEXT */
  32267. )
  32268. ]),
  32269. vue.createElementVNode("view", { class: "item" }, [
  32270. vue.createElementVNode("text", { class: "label" }, "支付方式"),
  32271. $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  32272. key: 0,
  32273. class: "text"
  32274. }, "微信支付")) : vue.createCommentVNode("v-if", true),
  32275. $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  32276. key: 1,
  32277. class: "text"
  32278. }, "物流代收")) : vue.createCommentVNode("v-if", true)
  32279. ]),
  32280. vue.createElementVNode("view", { class: "item" }, [
  32281. vue.createElementVNode("text", { class: "label" }, "订单金额"),
  32282. $data.order.totalPrice != null ? (vue.openBlock(), vue.createElementBlock(
  32283. "text",
  32284. {
  32285. key: 0,
  32286. class: "text"
  32287. },
  32288. "¥" + vue.toDisplayString($data.order.totalPrice.toFixed(2)),
  32289. 1
  32290. /* TEXT */
  32291. )) : vue.createCommentVNode("v-if", true)
  32292. ]),
  32293. vue.createElementVNode("view", { class: "item" }, [
  32294. vue.createElementVNode("text", { class: "label" }, "优惠金额"),
  32295. $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
  32296. "text",
  32297. {
  32298. key: 0,
  32299. class: "text"
  32300. },
  32301. "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  32302. 1
  32303. /* TEXT */
  32304. )) : vue.createCommentVNode("v-if", true)
  32305. ]),
  32306. vue.createElementVNode("view", { class: "item" }, [
  32307. vue.createElementVNode("text", { class: "label" }, "应付金额"),
  32308. $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
  32309. "text",
  32310. {
  32311. key: 0,
  32312. class: "text"
  32313. },
  32314. "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
  32315. 1
  32316. /* TEXT */
  32317. )) : vue.createCommentVNode("v-if", true)
  32318. ]),
  32319. vue.createElementVNode("view", { class: "item" }, [
  32320. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  32321. $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
  32322. "text",
  32323. {
  32324. key: 0,
  32325. class: "text"
  32326. },
  32327. "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
  32328. 1
  32329. /* TEXT */
  32330. )) : vue.createCommentVNode("v-if", true)
  32331. ]),
  32332. vue.createElementVNode("view", { class: "item" }, [
  32333. vue.createElementVNode("text", { class: "label" }, "支付时间"),
  32334. $data.order.payTime != null ? (vue.openBlock(), vue.createElementBlock(
  32335. "text",
  32336. {
  32337. key: 0,
  32338. class: "text"
  32339. },
  32340. vue.toDisplayString($data.order.payTime),
  32341. 1
  32342. /* TEXT */
  32343. )) : vue.createCommentVNode("v-if", true)
  32344. ]),
  32345. vue.createCommentVNode(' <view v-if="order.status >1" class="item">\r\n <text class="label">发货时间</text>\r\n <text class="text"></text>\r\n </view> ')
  32346. ])
  32347. ])
  32348. ])
  32349. ]),
  32350. vue.createCommentVNode(" 按钮 "),
  32351. vue.createElementVNode("view", { class: "btn-box" }, [
  32352. vue.createElementVNode("view", { class: "btn cancel" }, [
  32353. vue.createTextVNode(" 联系客服 "),
  32354. vue.createElementVNode("button", {
  32355. class: "contact-btn",
  32356. "open-type": "contact"
  32357. })
  32358. ]),
  32359. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  32360. key: 0,
  32361. class: "btn cancel",
  32362. onClick: _cache[1] || (_cache[1] = ($event) => $options.cancel())
  32363. }, "取消订单")) : vue.createCommentVNode("v-if", true),
  32364. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  32365. key: 1,
  32366. class: "btn pay",
  32367. onClick: _cache[2] || (_cache[2] = ($event) => $options.pay())
  32368. }, "支付")) : vue.createCommentVNode("v-if", true),
  32369. vue.createCommentVNode(' <view class="btn pay" v-if="order.status>1&&order.prescribeId!=null&&order.prescribeId>0" @click="showPrescribe()">查看处方单</view> '),
  32370. $data.order.status > 1 && $data.order.isAfterSales == 1 && $data.order.orderType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  32371. key: 2,
  32372. class: "btn cancel",
  32373. onClick: _cache[3] || (_cache[3] = ($event) => $options.refund())
  32374. }, "申请售后")) : vue.createCommentVNode("v-if", true),
  32375. $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", {
  32376. key: 3,
  32377. class: "btn pay",
  32378. onClick: _cache[4] || (_cache[4] = ($event) => $options.showDelivery())
  32379. }, "查看物流")) : vue.createCommentVNode("v-if", true),
  32380. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  32381. key: 4,
  32382. class: "btn pay",
  32383. onClick: _cache[5] || (_cache[5] = ($event) => $options.finish())
  32384. }, "确认收货")) : vue.createCommentVNode("v-if", true)
  32385. ])
  32386. ]);
  32387. }
  32388. const Pages_orderStoreOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderDetail.vue"]]);
  32389. const _sfc_main$Y = {
  32390. data() {
  32391. return {
  32392. addressId: null,
  32393. wxPay: true,
  32394. address: null,
  32395. orderId: null,
  32396. order: null,
  32397. items: null,
  32398. couponText: "请选择优惠券",
  32399. userCouponId: 0,
  32400. coupons: [],
  32401. couponShow: false,
  32402. payMoney: 0,
  32403. discountMoney: 0
  32404. };
  32405. },
  32406. onLoad(option) {
  32407. this.orderId = option.orderId;
  32408. var that = this;
  32409. uni.$on("updateAddress", (e) => {
  32410. that.addressId = e.addressId;
  32411. that.address = e;
  32412. that.address.address = e.province + e.city + e.district + e.detail;
  32413. });
  32414. },
  32415. onShow() {
  32416. this.getStoreOrderById();
  32417. this.getMyEnableCouponList();
  32418. },
  32419. onShareAppMessage(res) {
  32420. var that = this;
  32421. if (this.$isLogin()) {
  32422. return {
  32423. title: "订单支付",
  32424. path: "/pages_order/storeOrderPay?orderId=" + that.orderId,
  32425. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  32426. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  32427. };
  32428. }
  32429. },
  32430. methods: {
  32431. couponSelect(item) {
  32432. this.couponShow = false;
  32433. this.userCouponId = item.id;
  32434. formatAppLog("log", "at pages_order/storeOrderPay.vue:203", item);
  32435. this.couponText = item.price + "元优惠券";
  32436. this.compute();
  32437. },
  32438. open() {
  32439. },
  32440. close() {
  32441. this.couponShow = false;
  32442. },
  32443. openCoupon() {
  32444. this.couponShow = true;
  32445. },
  32446. delCoupon() {
  32447. this.userCouponId = 0;
  32448. this.couponText = "请选择优惠券";
  32449. this.compute();
  32450. },
  32451. compute() {
  32452. var data = {
  32453. orderId: this.orderId,
  32454. userCouponId: this.userCouponId
  32455. };
  32456. formatAppLog("log", "at pages_order/storeOrderPay.vue:225", data);
  32457. compute(data).then(
  32458. (res) => {
  32459. if (res.code == 200) {
  32460. this.payMoney = res.data.payMoney;
  32461. this.discountMoney = res.data.discountMoney;
  32462. } else {
  32463. this.userCouponId = 0;
  32464. this.couponText = "请选择优惠券";
  32465. uni.showToast({
  32466. icon: "none",
  32467. title: res.msg
  32468. });
  32469. }
  32470. },
  32471. (err) => {
  32472. }
  32473. );
  32474. },
  32475. getMyEnableCouponList() {
  32476. var data = { couponType: 2 };
  32477. getMyEnableCouponList(data).then(
  32478. (res) => {
  32479. if (res.code == 200) {
  32480. this.coupons = res.data;
  32481. }
  32482. },
  32483. (err) => {
  32484. }
  32485. );
  32486. },
  32487. getStoreOrderById() {
  32488. var data = { orderId: this.orderId };
  32489. formatAppLog("log", "at pages_order/storeOrderPay.vue:260", data);
  32490. getStoreOrderById(data).then(
  32491. (res) => {
  32492. if (res.code == 200) {
  32493. this.order = res.order;
  32494. this.items = res.items;
  32495. if (this.order.userName != null) {
  32496. this.address = {
  32497. realName: this.order.userName,
  32498. phone: this.order.userPhone,
  32499. address: this.order.userAddress
  32500. };
  32501. }
  32502. this.compute();
  32503. }
  32504. },
  32505. (rej) => {
  32506. }
  32507. );
  32508. },
  32509. openAddress() {
  32510. uni.navigateTo({
  32511. url: "/pages_user/address"
  32512. });
  32513. },
  32514. payOrder() {
  32515. var data = {
  32516. userCouponId: this.userCouponId,
  32517. addressId: this.addressId,
  32518. remark: this.order.remark,
  32519. orderId: this.order.orderId
  32520. };
  32521. var that = this;
  32522. uni.showLoading();
  32523. pay(data).then(
  32524. (res) => {
  32525. if (res.code == 200) {
  32526. uni.redirectTo({
  32527. url: "/pages_order/storeOrderPayment?orderId=" + that.order.orderId
  32528. });
  32529. } else {
  32530. uni.showToast({
  32531. icon: "none",
  32532. title: res.msg
  32533. });
  32534. }
  32535. },
  32536. (rej) => {
  32537. }
  32538. );
  32539. }
  32540. }
  32541. };
  32542. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  32543. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  32544. return vue.openBlock(), vue.createElementBlock("view", null, [
  32545. vue.createElementVNode("view", { class: "inner-box" }, [
  32546. vue.createCommentVNode(" 收货人 "),
  32547. $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", {
  32548. key: 0,
  32549. class: "address-box",
  32550. onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress())
  32551. }, [
  32552. vue.createElementVNode("view", { class: "left" }, [
  32553. vue.createElementVNode("view", { class: "name-box" }, [
  32554. vue.createElementVNode("text", { class: "text name" }, "添加收货地址")
  32555. ])
  32556. ]),
  32557. vue.createElementVNode("view", { class: "arrow-box" }, [
  32558. vue.createElementVNode("image", {
  32559. src: "/static/images/arrow_gray.png",
  32560. mode: ""
  32561. })
  32562. ])
  32563. ])) : vue.createCommentVNode("v-if", true),
  32564. $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", {
  32565. key: 1,
  32566. class: "address-box",
  32567. onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress())
  32568. }, [
  32569. vue.createElementVNode("view", { class: "left" }, [
  32570. vue.createElementVNode("view", { class: "name-box" }, [
  32571. vue.createElementVNode(
  32572. "text",
  32573. { class: "text name" },
  32574. vue.toDisplayString($data.address.realName),
  32575. 1
  32576. /* TEXT */
  32577. ),
  32578. $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock(
  32579. "text",
  32580. {
  32581. key: 0,
  32582. class: "text"
  32583. },
  32584. vue.toDisplayString($data.address.phone),
  32585. 1
  32586. /* TEXT */
  32587. )) : vue.createCommentVNode("v-if", true)
  32588. ]),
  32589. vue.createElementVNode(
  32590. "view",
  32591. { class: "address" },
  32592. vue.toDisplayString($data.address.address),
  32593. 1
  32594. /* TEXT */
  32595. )
  32596. ]),
  32597. vue.createElementVNode("view", { class: "arrow-box" }, [
  32598. vue.createElementVNode("image", {
  32599. src: "/static/images/arrow_gray.png",
  32600. mode: ""
  32601. })
  32602. ])
  32603. ])) : vue.createCommentVNode("v-if", true),
  32604. vue.createCommentVNode(" 药品列表 "),
  32605. vue.createElementVNode("view", { class: "goods-list" }, [
  32606. (vue.openBlock(true), vue.createElementBlock(
  32607. vue.Fragment,
  32608. null,
  32609. vue.renderList($data.items, (item, index2) => {
  32610. return vue.openBlock(), vue.createElementBlock("view", {
  32611. key: index2,
  32612. class: "item"
  32613. }, [
  32614. vue.createElementVNode("view", { class: "img-box" }, [
  32615. vue.createElementVNode("image", {
  32616. src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
  32617. mode: "aspectFill"
  32618. }, null, 8, ["src"])
  32619. ]),
  32620. vue.createElementVNode("view", { class: "info-box" }, [
  32621. vue.createElementVNode("view", null, [
  32622. vue.createElementVNode(
  32623. "view",
  32624. { class: "name-box ellipsis2" },
  32625. vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
  32626. 1
  32627. /* TEXT */
  32628. ),
  32629. vue.createElementVNode(
  32630. "view",
  32631. { class: "spec ellipsis2" },
  32632. vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
  32633. 1
  32634. /* TEXT */
  32635. )
  32636. ]),
  32637. vue.createElementVNode("view", { class: "price-num" }, [
  32638. vue.createElementVNode("view", { class: "price" }, [
  32639. vue.createCommentVNode(' <text class="unit">¥</text> '),
  32640. vue.createCommentVNode(' <text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> ')
  32641. ]),
  32642. $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
  32643. "view",
  32644. {
  32645. key: 0,
  32646. class: "num"
  32647. },
  32648. "x" + vue.toDisplayString(item.num),
  32649. 1
  32650. /* TEXT */
  32651. )) : vue.createCommentVNode("v-if", true)
  32652. ])
  32653. ])
  32654. ]);
  32655. }),
  32656. 128
  32657. /* KEYED_FRAGMENT */
  32658. )),
  32659. vue.createCommentVNode(" 小计 "),
  32660. vue.createElementVNode("view", { class: "sub-total" }, [
  32661. vue.createElementVNode("text", { class: "label" }, "合计:"),
  32662. vue.createElementVNode("view", { class: "price" }, [
  32663. vue.createElementVNode("text", { class: "unit" }, "¥"),
  32664. $data.order != null ? (vue.openBlock(), vue.createElementBlock(
  32665. "text",
  32666. {
  32667. key: 0,
  32668. class: "num"
  32669. },
  32670. vue.toDisplayString($data.order.totalPrice.toFixed(2)),
  32671. 1
  32672. /* TEXT */
  32673. )) : vue.createCommentVNode("v-if", true)
  32674. ])
  32675. ])
  32676. ]),
  32677. vue.createElementVNode("view", { class: "other-info" }, [
  32678. vue.createElementVNode("view", { class: "title" }, "支付明细"),
  32679. vue.createElementVNode("view", { class: "item" }, [
  32680. vue.createElementVNode("view", { class: "left" }, [
  32681. vue.createElementVNode("text", { class: "label" }, "订单金额:")
  32682. ]),
  32683. vue.createElementVNode("view", { class: "right" }, [
  32684. $data.order != null ? (vue.openBlock(), vue.createElementBlock(
  32685. "text",
  32686. {
  32687. key: 0,
  32688. class: "text"
  32689. },
  32690. vue.toDisplayString($data.order.payPrice.toFixed(2)),
  32691. 1
  32692. /* TEXT */
  32693. )) : vue.createCommentVNode("v-if", true)
  32694. ])
  32695. ]),
  32696. $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", {
  32697. key: 0,
  32698. class: "item",
  32699. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"]))
  32700. }, [
  32701. vue.createElementVNode("view", { class: "left" }, [
  32702. vue.createElementVNode("text", { class: "label" }, "优惠券:")
  32703. ]),
  32704. vue.createElementVNode("view", { class: "right" }, [
  32705. vue.createElementVNode(
  32706. "text",
  32707. { class: "text" },
  32708. vue.toDisplayString($data.couponText),
  32709. 1
  32710. /* TEXT */
  32711. ),
  32712. $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  32713. key: 0,
  32714. onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])),
  32715. class: "ic-close",
  32716. src: "/static/images/close.png"
  32717. })) : vue.createCommentVNode("v-if", true),
  32718. vue.createElementVNode("image", {
  32719. class: "ic-back",
  32720. src: "/static/images/arrow_gray.png"
  32721. })
  32722. ])
  32723. ])) : vue.createCommentVNode("v-if", true),
  32724. vue.createElementVNode("view", { class: "item" }, [
  32725. vue.createElementVNode("view", { class: "left" }, [
  32726. vue.createElementVNode("text", { class: "label" }, "优惠金额:")
  32727. ]),
  32728. vue.createElementVNode("view", { class: "right" }, [
  32729. vue.createElementVNode(
  32730. "text",
  32731. { class: "text" },
  32732. vue.toDisplayString($data.discountMoney.toFixed(2)),
  32733. 1
  32734. /* TEXT */
  32735. )
  32736. ])
  32737. ]),
  32738. vue.createElementVNode("view", { class: "item" }, [
  32739. vue.createElementVNode("view", { class: "left" }, [
  32740. vue.createElementVNode("text", { class: "label" }, "支付金额:")
  32741. ]),
  32742. vue.createElementVNode("view", { class: "right" }, [
  32743. vue.createElementVNode(
  32744. "text",
  32745. { class: "text" },
  32746. vue.toDisplayString($data.payMoney.toFixed(2)),
  32747. 1
  32748. /* TEXT */
  32749. )
  32750. ])
  32751. ])
  32752. ]),
  32753. vue.createElementVNode("view", { class: "pay-type" }, [
  32754. vue.createElementVNode("view", { class: "title" }, "支付方式"),
  32755. vue.createElementVNode("view", { class: "item" }, [
  32756. vue.createElementVNode("view", { class: "left" }, [
  32757. vue.createElementVNode("image", {
  32758. src: "/static/images/wecha_pay.png",
  32759. mode: ""
  32760. }),
  32761. vue.createElementVNode("text", { class: "text" }, "全款支付")
  32762. ]),
  32763. vue.createElementVNode("label", null, [
  32764. vue.createElementVNode("radio", {
  32765. value: "",
  32766. checked: $data.wxPay,
  32767. color: "#C39A58"
  32768. }, null, 8, ["checked"])
  32769. ])
  32770. ])
  32771. ]),
  32772. vue.createCommentVNode(" 备注 "),
  32773. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  32774. key: 2,
  32775. class: "remarks"
  32776. }, [
  32777. vue.withDirectives(vue.createElementVNode(
  32778. "input",
  32779. {
  32780. type: "text",
  32781. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.order.remark = $event),
  32782. placeholder: "备注留言(选填)",
  32783. "placeholder-class": "input"
  32784. },
  32785. null,
  32786. 512
  32787. /* NEED_PATCH */
  32788. ), [
  32789. [vue.vModelText, $data.order.remark]
  32790. ])
  32791. ])) : vue.createCommentVNode("v-if", true)
  32792. ]),
  32793. vue.createVNode(_component_u_popup, {
  32794. closeable: true,
  32795. show: $data.couponShow,
  32796. round: 10,
  32797. mode: "bottom",
  32798. onClose: $options.close,
  32799. onOpen: $options.open
  32800. }, {
  32801. default: vue.withCtx(() => [
  32802. vue.createElementVNode("view", { class: "coupon" }, [
  32803. $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  32804. key: 0,
  32805. class: "coupon-box"
  32806. }, [
  32807. (vue.openBlock(true), vue.createElementBlock(
  32808. vue.Fragment,
  32809. null,
  32810. vue.renderList($data.coupons, (item) => {
  32811. return vue.openBlock(), vue.createElementBlock("view", {
  32812. onClick: ($event) => $options.couponSelect(item),
  32813. class: "coupon-item"
  32814. }, [
  32815. vue.createElementVNode("view", { class: "left" }, [
  32816. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  32817. key: 0,
  32818. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png",
  32819. mode: "widthFix"
  32820. })) : vue.createCommentVNode("v-if", true),
  32821. item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  32822. key: 1,
  32823. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png",
  32824. mode: "widthFix"
  32825. })) : vue.createCommentVNode("v-if", true),
  32826. vue.createElementVNode("view", { style: { "z-index": "999" } }, [
  32827. vue.createTextVNode(" ¥"),
  32828. vue.createElementVNode(
  32829. "span",
  32830. { class: "num" },
  32831. vue.toDisplayString(item.price.toFixed(2)),
  32832. 1
  32833. /* TEXT */
  32834. )
  32835. ]),
  32836. vue.createElementVNode(
  32837. "view",
  32838. { class: "pic-num" },
  32839. "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
  32840. 1
  32841. /* TEXT */
  32842. )
  32843. ]),
  32844. vue.createElementVNode("view", { class: "right" }, [
  32845. vue.createElementVNode(
  32846. "view",
  32847. { class: "title" },
  32848. vue.toDisplayString(item.title),
  32849. 1
  32850. /* TEXT */
  32851. ),
  32852. vue.createElementVNode("view", { class: "btns" }, [
  32853. item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  32854. "view",
  32855. { key: 0 },
  32856. vue.toDisplayString(item.limitTime) + " 到期",
  32857. 1
  32858. /* TEXT */
  32859. )) : vue.createCommentVNode("v-if", true),
  32860. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  32861. "view",
  32862. { key: 1 },
  32863. "使用时间 " + vue.toDisplayString(item.useTime),
  32864. 1
  32865. /* TEXT */
  32866. )) : vue.createCommentVNode("v-if", true),
  32867. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  32868. key: 2,
  32869. class: "bnt gray"
  32870. }, "已使用")) : vue.createCommentVNode("v-if", true),
  32871. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  32872. key: 3,
  32873. class: "bnt gray"
  32874. }, "已过期")) : vue.createCommentVNode("v-if", true),
  32875. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  32876. key: 4,
  32877. class: "btn"
  32878. }, "使用")) : vue.createCommentVNode("v-if", true)
  32879. ])
  32880. ])
  32881. ], 8, ["onClick"]);
  32882. }),
  32883. 256
  32884. /* UNKEYED_FRAGMENT */
  32885. ))
  32886. ])) : vue.createCommentVNode("v-if", true),
  32887. $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  32888. key: 1,
  32889. class: "empty"
  32890. }, [
  32891. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" })
  32892. ])) : vue.createCommentVNode("v-if", true)
  32893. ])
  32894. ]),
  32895. _: 1
  32896. /* STABLE */
  32897. }, 8, ["show", "onClose", "onOpen"]),
  32898. vue.createCommentVNode(" 底部按钮 "),
  32899. vue.createElementVNode("view", { class: "btn-box" }, [
  32900. $data.order != null ? (vue.openBlock(), vue.createElementBlock(
  32901. "view",
  32902. {
  32903. key: 0,
  32904. class: "btn",
  32905. onClick: _cache[5] || (_cache[5] = ($event) => $options.payOrder())
  32906. },
  32907. "支付" + vue.toDisplayString($data.payMoney.toFixed(2)) + "元",
  32908. 1
  32909. /* TEXT */
  32910. )) : vue.createCommentVNode("v-if", true)
  32911. ])
  32912. ]);
  32913. }
  32914. const Pages_orderStoreOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPay.vue"]]);
  32915. const _sfc_main$X = {
  32916. data() {
  32917. return {
  32918. payMethod: null,
  32919. orderId: null,
  32920. order: null
  32921. };
  32922. },
  32923. onLoad(option) {
  32924. this.orderId = option.orderId;
  32925. this.payMethod = option.payMethod;
  32926. },
  32927. onShow() {
  32928. this.getStoreOrderById();
  32929. },
  32930. methods: {
  32931. copyTest(text) {
  32932. uni.setClipboardData({
  32933. data: text,
  32934. success: () => {
  32935. uni.showToast({
  32936. title: "内容已成功复制到剪切板",
  32937. icon: "none"
  32938. });
  32939. }
  32940. });
  32941. },
  32942. getStoreOrderById() {
  32943. var data = { orderId: this.orderId };
  32944. formatAppLog("log", "at pages_order/storeOrderPayment.vue:71", data);
  32945. getStoreOrderById(data).then(
  32946. (res) => {
  32947. if (res.code == 200) {
  32948. this.order = res.order;
  32949. if (this.payMethod != null && this.payMethod == "app") {
  32950. this.payOrder();
  32951. }
  32952. }
  32953. },
  32954. (rej) => {
  32955. }
  32956. );
  32957. },
  32958. payOrder() {
  32959. var data = {
  32960. orderId: this.orderId
  32961. };
  32962. var that = this;
  32963. uni.showLoading();
  32964. payment(data).then(
  32965. (res) => {
  32966. if (res.code == 200) {
  32967. if (res.isPay == 1) {
  32968. uni.redirectTo({
  32969. url: "/pages_order/storeOrderPaySuccess?orderId=" + that.order.orderId
  32970. });
  32971. } else {
  32972. if (res.type == "tz") {
  32973. uni.setStorageSync("ztPayUrl", res.data.body.url);
  32974. uni.redirectTo({
  32975. url: "/pages_order/tzPay"
  32976. });
  32977. }
  32978. if (res.type == "yb") {
  32979. var payData = JSON.parse(res.data.pay_info);
  32980. formatAppLog("log", "at pages_order/storeOrderPayment.vue:110", payData);
  32981. uni.requestPayment({
  32982. provider: "wxpay",
  32983. timeStamp: payData.timeStamp,
  32984. nonceStr: payData.nonceStr,
  32985. package: payData.package,
  32986. signType: payData.signType,
  32987. paySign: payData.paySign,
  32988. success: function(res2) {
  32989. formatAppLog("log", "at pages_order/storeOrderPayment.vue:119", that.order.orderId);
  32990. uni.hideLoading();
  32991. uni.redirectTo({
  32992. url: "./storeOrderPaySuccess?orderId=" + that.order.orderId
  32993. });
  32994. },
  32995. fail: function(err) {
  32996. uni.showToast({
  32997. icon: "none",
  32998. title: "fail:" + JSON.stringify(err)
  32999. });
  33000. uni.hideLoading();
  33001. }
  33002. });
  33003. } else if (res.type == "hf") {
  33004. var payData = JSON.parse(res.data.pay_info);
  33005. formatAppLog("log", "at pages_order/storeOrderPayment.vue:139", payData);
  33006. uni.requestPayment({
  33007. provider: "wxpay",
  33008. timeStamp: payData.timeStamp,
  33009. nonceStr: payData.nonceStr,
  33010. package: payData.package,
  33011. signType: payData.signType,
  33012. paySign: payData.paySign,
  33013. success: function(res2) {
  33014. formatAppLog("log", "at pages_order/storeOrderPayment.vue:148", that.order.orderId);
  33015. uni.hideLoading();
  33016. uni.redirectTo({
  33017. url: "./storeOrderPaySuccess?orderId=" + that.order.orderId
  33018. });
  33019. },
  33020. fail: function(err) {
  33021. uni.showToast({
  33022. icon: "none",
  33023. title: "fail:" + JSON.stringify(err)
  33024. });
  33025. uni.hideLoading();
  33026. }
  33027. });
  33028. } else if (res.type == "wx") {
  33029. uni.requestPayment({
  33030. provider: "wxpay",
  33031. timeStamp: res.data.timeStamp,
  33032. nonceStr: res.data.nonceStr,
  33033. package: res.data.packageValue,
  33034. signType: res.data.signType,
  33035. paySign: res.data.paySign,
  33036. success: function(res2) {
  33037. formatAppLog("log", "at pages_order/storeOrderPayment.vue:175", that.order.orderId);
  33038. uni.hideLoading();
  33039. uni.redirectTo({
  33040. url: "./storeOrderPaySuccess?orderId=" + that.order.orderId
  33041. });
  33042. },
  33043. fail: function(err) {
  33044. uni.showToast({
  33045. icon: "none",
  33046. title: "fail:" + JSON.stringify(err)
  33047. });
  33048. uni.hideLoading();
  33049. }
  33050. });
  33051. }
  33052. }
  33053. } else {
  33054. uni.showToast({
  33055. icon: "none",
  33056. title: res.msg
  33057. });
  33058. }
  33059. },
  33060. (rej) => {
  33061. }
  33062. );
  33063. }
  33064. }
  33065. };
  33066. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  33067. return vue.openBlock(), vue.createElementBlock("view", null, [
  33068. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  33069. key: 0,
  33070. class: "inner-box"
  33071. }, [
  33072. vue.createCommentVNode(" 时间、价格 "),
  33073. vue.createElementVNode("view", { class: "time-price" }, [
  33074. vue.createElementVNode("text", { class: "time" }, "订单金额"),
  33075. vue.createElementVNode("view", { class: "price-box" }, [
  33076. vue.createElementVNode("text", { class: "unit" }, "¥"),
  33077. vue.createElementVNode(
  33078. "text",
  33079. { class: "num" },
  33080. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  33081. 1
  33082. /* TEXT */
  33083. )
  33084. ])
  33085. ]),
  33086. vue.createCommentVNode(" 订单详情查看 "),
  33087. vue.createElementVNode("view", { class: "order-info" }, [
  33088. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  33089. vue.createElementVNode("view", { class: "item" }, [
  33090. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  33091. vue.createElementVNode("view", { class: "sn-box" }, [
  33092. vue.createElementVNode(
  33093. "text",
  33094. { class: "text" },
  33095. vue.toDisplayString($data.order.orderSn),
  33096. 1
  33097. /* TEXT */
  33098. ),
  33099. vue.createElementVNode("view", {
  33100. class: "copy-btn",
  33101. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
  33102. }, "复制")
  33103. ])
  33104. ]),
  33105. vue.createElementVNode("view", { class: "item" }, [
  33106. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  33107. vue.createElementVNode(
  33108. "text",
  33109. { class: "text" },
  33110. vue.toDisplayString($data.order.createTime),
  33111. 1
  33112. /* TEXT */
  33113. )
  33114. ])
  33115. ])
  33116. ])) : vue.createCommentVNode("v-if", true),
  33117. vue.createCommentVNode(" 底部按钮 "),
  33118. vue.createElementVNode("view", { class: "btn-box" }, [
  33119. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  33120. key: 0,
  33121. class: "btn",
  33122. onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
  33123. }, "立即支付")) : vue.createCommentVNode("v-if", true)
  33124. ])
  33125. ]);
  33126. }
  33127. const Pages_orderStoreOrderPayment = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPayment.vue"]]);
  33128. const _sfc_main$W = {
  33129. data() {
  33130. return {
  33131. orderId: null,
  33132. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  33133. report: null,
  33134. patient: null
  33135. };
  33136. },
  33137. onLoad(option) {
  33138. this.orderId = option.orderId;
  33139. this.getInquiryOrderReport();
  33140. },
  33141. onShow() {
  33142. },
  33143. methods: {
  33144. getInquiryOrderReport() {
  33145. let data = { orderId: this.orderId };
  33146. getInquiryOrderReport(data).then(
  33147. (res) => {
  33148. if (res.code == 200) {
  33149. if (data != null) {
  33150. formatAppLog("log", "at pages_order/inquiryOrderReport.vue:121", res.data);
  33151. this.report = res.data;
  33152. if (res.data.patientJson != null) {
  33153. this.patient = JSON.parse(res.data.patientJson);
  33154. }
  33155. if (res.data.conditioningPlanJson != null) {
  33156. this.report.conditioningPlan = JSON.parse(res.data.conditioningPlanJson);
  33157. }
  33158. formatAppLog("log", "at pages_order/inquiryOrderReport.vue:129", this.patient);
  33159. }
  33160. }
  33161. },
  33162. (rej) => {
  33163. }
  33164. );
  33165. },
  33166. goBack() {
  33167. uni.navigateBack();
  33168. }
  33169. }
  33170. };
  33171. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  33172. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  33173. vue.createElementVNode("view", { class: "cont" }, [
  33174. vue.createElementVNode("view", { class: "bg" }, [
  33175. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3305ca20c3f646c6b465918efb07f849.png" })
  33176. ]),
  33177. vue.createElementVNode("view", { class: "top-box" }, [
  33178. vue.createElementVNode(
  33179. "view",
  33180. {
  33181. class: "status_bar",
  33182. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  33183. },
  33184. null,
  33185. 4
  33186. /* STYLE */
  33187. ),
  33188. vue.createElementVNode("view", { class: "top-title" }, [
  33189. vue.createElementVNode("image", {
  33190. onClick: _cache[0] || (_cache[0] = ($event) => $options.goBack()),
  33191. src: "/static/images/icon_back_w.png"
  33192. }),
  33193. vue.createElementVNode("view", { class: "title" }, "诊断报告")
  33194. ])
  33195. ]),
  33196. $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
  33197. key: 0,
  33198. class: "cont-box"
  33199. }, [
  33200. vue.createElementVNode(
  33201. "view",
  33202. {
  33203. class: "status_bar",
  33204. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  33205. },
  33206. null,
  33207. 4
  33208. /* STYLE */
  33209. ),
  33210. vue.createElementVNode("view", { class: "user" }, [
  33211. vue.createElementVNode("image", {
  33212. src: $data.patient.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : JSON.parse($data.report.patientJson).avatar
  33213. }, null, 8, ["src"]),
  33214. vue.createElementVNode("view", { class: "user-box" }, [
  33215. vue.createElementVNode(
  33216. "view",
  33217. { class: "sex" },
  33218. "性别 " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女"),
  33219. 1
  33220. /* TEXT */
  33221. ),
  33222. vue.createElementVNode(
  33223. "view",
  33224. { class: "username" },
  33225. "年龄 " + vue.toDisplayString($data.patient.age) + "岁",
  33226. 1
  33227. /* TEXT */
  33228. )
  33229. ]),
  33230. vue.createElementVNode("view", { class: "user-box" }, [
  33231. vue.createElementVNode(
  33232. "view",
  33233. { class: "sex" },
  33234. "身高 " + vue.toDisplayString($data.patient.height) + "CM",
  33235. 1
  33236. /* TEXT */
  33237. ),
  33238. vue.createElementVNode(
  33239. "view",
  33240. { class: "username" },
  33241. "体重 " + vue.toDisplayString($data.patient.weight) + "KG",
  33242. 1
  33243. /* TEXT */
  33244. )
  33245. ])
  33246. ]),
  33247. vue.createElementVNode("view", { class: "items" }, [
  33248. vue.createElementVNode("view", { class: "result-box" }, [
  33249. vue.createElementVNode(
  33250. "view",
  33251. { class: "time" },
  33252. "报告时间 " + vue.toDisplayString($data.report.createTime),
  33253. 1
  33254. /* TEXT */
  33255. ),
  33256. vue.createElementVNode(
  33257. "view",
  33258. { class: "name" },
  33259. vue.toDisplayString($data.report.inquiryResult),
  33260. 1
  33261. /* TEXT */
  33262. )
  33263. ]),
  33264. vue.createElementVNode("view", { class: "item-box" }, [
  33265. vue.createElementVNode("view", { class: "item" }, [
  33266. vue.createElementVNode("view", { class: "title-box" }, [
  33267. vue.createElementVNode("view", { class: "title-line" }),
  33268. vue.createElementVNode("view", { class: "title" }, "主诉")
  33269. ]),
  33270. vue.createElementVNode(
  33271. "view",
  33272. { class: "descs" },
  33273. vue.toDisplayString($data.patient.title),
  33274. 1
  33275. /* TEXT */
  33276. )
  33277. ]),
  33278. vue.createElementVNode("view", { class: "line" })
  33279. ]),
  33280. vue.createElementVNode("view", { class: "item-box" }, [
  33281. vue.createElementVNode("view", { class: "item" }, [
  33282. vue.createElementVNode("view", { class: "title-box" }, [
  33283. vue.createElementVNode("view", { class: "title-line" }),
  33284. vue.createElementVNode("view", { class: "title" }, "用药情况")
  33285. ]),
  33286. vue.createElementVNode(
  33287. "view",
  33288. { class: "descs" },
  33289. vue.toDisplayString($data.patient.medication),
  33290. 1
  33291. /* TEXT */
  33292. )
  33293. ]),
  33294. vue.createElementVNode("view", { class: "line" })
  33295. ]),
  33296. vue.createElementVNode("view", { class: "item-box" }, [
  33297. vue.createElementVNode("view", { class: "item" }, [
  33298. vue.createElementVNode("view", { class: "title-box" }, [
  33299. vue.createElementVNode("view", { class: "title-line" }),
  33300. vue.createElementVNode("view", { class: "title" }, "诊断结果")
  33301. ]),
  33302. vue.createElementVNode(
  33303. "view",
  33304. { class: "descs" },
  33305. vue.toDisplayString($data.report.inquiryResult),
  33306. 1
  33307. /* TEXT */
  33308. )
  33309. ]),
  33310. vue.createElementVNode("view", { class: "line" })
  33311. ]),
  33312. (vue.openBlock(true), vue.createElementBlock(
  33313. vue.Fragment,
  33314. null,
  33315. vue.renderList($data.report.conditioningPlan, (item, index2) => {
  33316. return vue.openBlock(), vue.createElementBlock("view", { class: "item-box" }, [
  33317. vue.createElementVNode("view", { class: "item" }, [
  33318. vue.createElementVNode("view", { class: "title-box" }, [
  33319. vue.createElementVNode("view", { class: "title-line" }),
  33320. vue.createElementVNode(
  33321. "view",
  33322. { class: "title" },
  33323. vue.toDisplayString(item.name),
  33324. 1
  33325. /* TEXT */
  33326. )
  33327. ]),
  33328. vue.createElementVNode(
  33329. "view",
  33330. { class: "descs" },
  33331. vue.toDisplayString(item.value.replace(/\\n/g, "<br>")),
  33332. 1
  33333. /* TEXT */
  33334. )
  33335. ]),
  33336. vue.createElementVNode("view", { class: "line" })
  33337. ]);
  33338. }),
  33339. 256
  33340. /* UNKEYED_FRAGMENT */
  33341. )),
  33342. vue.createElementVNode("view", { class: "item-box" }, [
  33343. vue.createElementVNode("view", { class: "item" }, [
  33344. vue.createElementVNode("view", { class: "title-box" }, [
  33345. vue.createElementVNode("view", { class: "title-line" }),
  33346. vue.createElementVNode("view", { class: "title" }, "备注")
  33347. ]),
  33348. vue.createElementVNode(
  33349. "view",
  33350. { class: "descs" },
  33351. vue.toDisplayString($data.report.remark),
  33352. 1
  33353. /* TEXT */
  33354. )
  33355. ])
  33356. ])
  33357. ]),
  33358. vue.createElementVNode("view", { class: "sign" }, [
  33359. vue.createTextVNode(
  33360. vue.toDisplayString($data.report.deptId == 39 ? "药师" : "医生") + "签名 ",
  33361. 1
  33362. /* TEXT */
  33363. ),
  33364. vue.createElementVNode("image", {
  33365. src: $data.report.doctorSignUrl
  33366. }, null, 8, ["src"])
  33367. ]),
  33368. vue.createElementVNode("view", { class: "tips" }, " 注:本次会诊,仅为针对患者当前身体情况的咨询问诊建议,不作为长期参考依据。 ")
  33369. ])) : vue.createCommentVNode("v-if", true)
  33370. ])
  33371. ]);
  33372. }
  33373. const Pages_orderInquiryOrderReport = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderReport.vue"]]);
  33374. const _sfc_main$V = {
  33375. data() {
  33376. return {
  33377. orderId: null,
  33378. order: {},
  33379. package: null,
  33380. items: []
  33381. };
  33382. },
  33383. onLoad(option) {
  33384. this.orderId = option.orderId;
  33385. this.getPackageOrderById();
  33386. },
  33387. onShow() {
  33388. },
  33389. methods: {
  33390. cancelOrder() {
  33391. var that = this;
  33392. uni.showModal({
  33393. title: "提示",
  33394. content: "确认取消订单吗?",
  33395. showCancel: true,
  33396. cancelText: "取消",
  33397. confirmText: "确定",
  33398. success: (res) => {
  33399. if (res.confirm) {
  33400. var data = { orderId: that.orderId };
  33401. cancelOrder$1(data).then(
  33402. (res2) => {
  33403. if (res2.code == 200) {
  33404. uni.$emit("refreshPackageOrder");
  33405. that.getPackageOrderById();
  33406. uni.showToast({
  33407. icon: "success",
  33408. title: "操作成功"
  33409. });
  33410. } else {
  33411. uni.showToast({
  33412. icon: "none",
  33413. title: res2.msg
  33414. });
  33415. }
  33416. },
  33417. (rej) => {
  33418. }
  33419. );
  33420. }
  33421. }
  33422. });
  33423. },
  33424. getPackageOrderById() {
  33425. var data = { orderId: this.orderId };
  33426. getPackageOrderById(data).then((res) => {
  33427. if (res.code == 200) {
  33428. this.order = res.order;
  33429. this.package = JSON.parse(this.order.packageJson);
  33430. } else {
  33431. uni.showToast({
  33432. icon: "none",
  33433. title: "请求失败"
  33434. });
  33435. }
  33436. });
  33437. },
  33438. pay() {
  33439. uni.navigateTo({
  33440. url: "/pages_order/packageOrderPay?orderId=" + this.order.orderId
  33441. });
  33442. },
  33443. // 返回上一页
  33444. back() {
  33445. let pages2 = getCurrentPages();
  33446. formatAppLog("log", "at pages_order/packageOrderDetails.vue:214", pages2.length);
  33447. if (pages2.length > 1) {
  33448. uni.navigateBack();
  33449. } else {
  33450. uni.reLaunch({
  33451. url: "/pages/common/launch"
  33452. });
  33453. }
  33454. },
  33455. // 复制订单编号
  33456. copyOrderSn(text) {
  33457. uni.setClipboardData({
  33458. data: text,
  33459. success: () => {
  33460. uni.showToast({
  33461. title: "内容已成功复制到剪切板",
  33462. icon: "none"
  33463. });
  33464. }
  33465. });
  33466. }
  33467. }
  33468. };
  33469. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  33470. return vue.openBlock(), vue.createElementBlock("view", null, [
  33471. vue.createElementVNode("view", { class: "cont" }, [
  33472. vue.createElementVNode("view", { class: "bg" }),
  33473. vue.createElementVNode("view", { class: "inner" }, [
  33474. vue.createCommentVNode(" 订单状态 "),
  33475. vue.createElementVNode("view", { class: "order-status" }, [
  33476. vue.createCommentVNode(" 待付款 "),
  33477. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  33478. key: 0,
  33479. class: "inner"
  33480. }, [
  33481. vue.createElementVNode("view", { class: "img-box" }, [
  33482. vue.createElementVNode("image", {
  33483. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
  33484. mode: ""
  33485. })
  33486. ]),
  33487. vue.createElementVNode("view", { class: "status-box" }, [
  33488. vue.createElementVNode("text", { class: "status" }, "待付款"),
  33489. vue.createCommentVNode(' <text class="desc">请在{{payLimitTime}}前完成支付</text> ')
  33490. ])
  33491. ])) : vue.createCommentVNode("v-if", true),
  33492. vue.createCommentVNode(" 服务中 "),
  33493. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  33494. key: 1,
  33495. class: "inner"
  33496. }, [
  33497. vue.createElementVNode("view", { class: "img-box" }, [
  33498. vue.createElementVNode("image", {
  33499. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b71efb4b5ca54564b553569d578738b4.png",
  33500. mode: ""
  33501. })
  33502. ]),
  33503. vue.createElementVNode("view", { class: "status-box" }, [
  33504. vue.createElementVNode("text", { class: "status" }, "服务中"),
  33505. vue.createElementVNode("text", { class: "desc" }, "正在服务中")
  33506. ])
  33507. ])) : vue.createCommentVNode("v-if", true),
  33508. vue.createCommentVNode(" 已完成 "),
  33509. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  33510. key: 2,
  33511. class: "inner"
  33512. }, [
  33513. vue.createElementVNode("view", { class: "img-box" }, [
  33514. vue.createElementVNode("image", {
  33515. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
  33516. mode: ""
  33517. })
  33518. ]),
  33519. vue.createElementVNode("view", { class: "status-box" }, [
  33520. vue.createElementVNode("text", { class: "status" }, "已完成"),
  33521. vue.createElementVNode("text", { class: "desc" }, "服务已完成")
  33522. ])
  33523. ])) : vue.createCommentVNode("v-if", true),
  33524. vue.createCommentVNode("交易取消 "),
  33525. $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  33526. key: 3,
  33527. class: "inner"
  33528. }, [
  33529. vue.createElementVNode("view", { class: "img-box" }, [
  33530. vue.createElementVNode("image", {
  33531. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
  33532. mode: ""
  33533. })
  33534. ]),
  33535. vue.createElementVNode("view", { class: "status-box" }, [
  33536. vue.createElementVNode("text", { class: "status" }, "交易关闭"),
  33537. vue.createElementVNode("text", { class: "desc" }, "订单已取消")
  33538. ])
  33539. ])) : vue.createCommentVNode("v-if", true),
  33540. $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
  33541. key: 4,
  33542. class: "inner"
  33543. }, [
  33544. vue.createElementVNode("view", { class: "img-box" }, [
  33545. vue.createElementVNode("image", {
  33546. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
  33547. mode: ""
  33548. })
  33549. ]),
  33550. vue.createElementVNode("view", { class: "status-box" }, [
  33551. vue.createElementVNode("text", { class: "status" }, "退款成功"),
  33552. vue.createElementVNode("text", { class: "desc" }, "已成功退款")
  33553. ])
  33554. ])) : vue.createCommentVNode("v-if", true)
  33555. ]),
  33556. vue.createElementVNode("view", { class: "content" }, [
  33557. vue.createElementVNode("view", { class: "package-box" }, [
  33558. vue.createElementVNode("view", { class: "left" }, [
  33559. vue.createElementVNode("image", {
  33560. src: $data.package.imgUrl
  33561. }, null, 8, ["src"])
  33562. ]),
  33563. vue.createElementVNode("view", { class: "right" }, [
  33564. vue.createElementVNode(
  33565. "view",
  33566. { class: "title" },
  33567. vue.toDisplayString($data.package.packageName),
  33568. 1
  33569. /* TEXT */
  33570. ),
  33571. vue.createElementVNode("view", { class: "desc" }, [
  33572. vue.createElementVNode(
  33573. "view",
  33574. { class: "cycle" },
  33575. "用药周期" + vue.toDisplayString($data.package.cycle) + "天",
  33576. 1
  33577. /* TEXT */
  33578. ),
  33579. vue.createElementVNode(
  33580. "view",
  33581. { class: "duration" },
  33582. "签约时长" + vue.toDisplayString($data.package.duration) + "天",
  33583. 1
  33584. /* TEXT */
  33585. )
  33586. ]),
  33587. vue.createCommentVNode(' <view class="price-box">\r\n <view class="price">¥30元/日</view>\r\n <view class="count">6.2w人已购</view>\r\n </view> ')
  33588. ])
  33589. ]),
  33590. vue.createCommentVNode(" 订单信息 "),
  33591. vue.createElementVNode("view", { class: "order-info" }, [
  33592. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  33593. vue.createElementVNode("view", { class: "item" }, [
  33594. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  33595. vue.createElementVNode("view", { class: "sn-box" }, [
  33596. vue.createElementVNode(
  33597. "text",
  33598. { class: "text" },
  33599. vue.toDisplayString($data.order.orderSn),
  33600. 1
  33601. /* TEXT */
  33602. ),
  33603. vue.createElementVNode("view", {
  33604. class: "copy-btn",
  33605. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderSn))
  33606. }, "复制")
  33607. ])
  33608. ]),
  33609. vue.createElementVNode("view", { class: "item" }, [
  33610. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  33611. vue.createElementVNode(
  33612. "text",
  33613. { class: "text" },
  33614. vue.toDisplayString($data.order.createTime),
  33615. 1
  33616. /* TEXT */
  33617. )
  33618. ]),
  33619. vue.createElementVNode("view", { class: "item" }, [
  33620. vue.createElementVNode("text", { class: "label" }, "支付方式"),
  33621. $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  33622. key: 0,
  33623. class: "text"
  33624. }, "全款支付")) : vue.createCommentVNode("v-if", true),
  33625. $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  33626. key: 1,
  33627. class: "text"
  33628. }, "物流代收")) : vue.createCommentVNode("v-if", true),
  33629. $data.order.payType == 3 ? (vue.openBlock(), vue.createElementBlock("text", {
  33630. key: 2,
  33631. class: "text"
  33632. }, "货到付款")) : vue.createCommentVNode("v-if", true)
  33633. ]),
  33634. vue.createElementVNode("view", { class: "item" }, [
  33635. vue.createElementVNode("text", { class: "label" }, "订单金额"),
  33636. $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
  33637. "text",
  33638. {
  33639. key: 0,
  33640. class: "text"
  33641. },
  33642. "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
  33643. 1
  33644. /* TEXT */
  33645. )) : vue.createCommentVNode("v-if", true)
  33646. ]),
  33647. vue.createElementVNode("view", { class: "item" }, [
  33648. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  33649. $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
  33650. "text",
  33651. {
  33652. key: 0,
  33653. class: "text"
  33654. },
  33655. "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
  33656. 1
  33657. /* TEXT */
  33658. )) : vue.createCommentVNode("v-if", true)
  33659. ]),
  33660. vue.createElementVNode("view", { class: "item" }, [
  33661. vue.createElementVNode("text", { class: "label" }, "抵扣金额"),
  33662. $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
  33663. "text",
  33664. {
  33665. key: 0,
  33666. class: "text"
  33667. },
  33668. "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  33669. 1
  33670. /* TEXT */
  33671. )) : vue.createCommentVNode("v-if", true)
  33672. ]),
  33673. vue.createElementVNode("view", { class: "item" }, [
  33674. vue.createElementVNode("text", { class: "label" }, "代收金额"),
  33675. $data.order.payRemain != null ? (vue.openBlock(), vue.createElementBlock(
  33676. "text",
  33677. {
  33678. key: 0,
  33679. class: "text"
  33680. },
  33681. "¥" + vue.toDisplayString($data.order.payRemain.toFixed(2)),
  33682. 1
  33683. /* TEXT */
  33684. )) : vue.createCommentVNode("v-if", true)
  33685. ]),
  33686. vue.createElementVNode("view", { class: "item" }, [
  33687. vue.createElementVNode("text", { class: "label" }, "运费金额"),
  33688. $data.order.payDelivery != null ? (vue.openBlock(), vue.createElementBlock(
  33689. "text",
  33690. {
  33691. key: 0,
  33692. class: "text"
  33693. },
  33694. "¥" + vue.toDisplayString($data.order.payDelivery.toFixed(2)),
  33695. 1
  33696. /* TEXT */
  33697. )) : vue.createCommentVNode("v-if", true)
  33698. ]),
  33699. vue.createElementVNode("view", { class: "item" }, [
  33700. vue.createElementVNode("text", { class: "label" }, "支付时间"),
  33701. vue.createElementVNode(
  33702. "text",
  33703. { class: "text" },
  33704. vue.toDisplayString($data.order.payTime),
  33705. 1
  33706. /* TEXT */
  33707. )
  33708. ])
  33709. ])
  33710. ])
  33711. ])
  33712. ]),
  33713. vue.createCommentVNode(" 按钮 "),
  33714. vue.createElementVNode("view", { class: "btn-box" }, [
  33715. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  33716. key: 0,
  33717. class: "btn cancel",
  33718. onClick: _cache[1] || (_cache[1] = ($event) => $options.cancelOrder())
  33719. }, "取消订单")) : vue.createCommentVNode("v-if", true),
  33720. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  33721. key: 1,
  33722. class: "btn pay",
  33723. onClick: _cache[2] || (_cache[2] = ($event) => $options.pay())
  33724. }, "支付")) : vue.createCommentVNode("v-if", true)
  33725. ])
  33726. ]);
  33727. }
  33728. const Pages_orderPackageOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderDetails.vue"]]);
  33729. const _sfc_main$U = {
  33730. mixins: [MescrollMixin],
  33731. data() {
  33732. return {
  33733. orderStatusOptions: [],
  33734. searchKey: "",
  33735. status: "0",
  33736. tabs: [
  33737. { name: "全部", id: "0" },
  33738. { name: "待支付", id: "1" },
  33739. { name: "服务中", id: "2" },
  33740. { name: "已完成", id: "3" },
  33741. { name: "已取消", id: "-1" },
  33742. { name: "已退款", id: "-2" }
  33743. ],
  33744. mescroll: null,
  33745. downOption: {
  33746. //下拉刷新
  33747. use: true,
  33748. auto: false
  33749. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  33750. },
  33751. upOption: {
  33752. onScroll: false,
  33753. use: true,
  33754. // 是否启用上拉加载; 默认true
  33755. page: {
  33756. pae: 0,
  33757. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  33758. size: 10
  33759. // 每页数据的数量,默认10
  33760. },
  33761. noMoreSize: 10,
  33762. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  33763. textNoMore: "已经到底了",
  33764. empty: {
  33765. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  33766. tip: "暂无数据"
  33767. }
  33768. },
  33769. dataList: []
  33770. };
  33771. },
  33772. onLoad(options) {
  33773. var that = this;
  33774. uni.$on("refreshPackageOrder", () => {
  33775. that.mescroll.resetUpScroll();
  33776. });
  33777. this.getDictByKey("sys_package_order_status");
  33778. },
  33779. onShow() {
  33780. },
  33781. methods: {
  33782. pay(item) {
  33783. uni.navigateTo({
  33784. url: "/pages_order/packageOrderPay?orderId=" + item.orderId
  33785. });
  33786. },
  33787. getDictByKey(key) {
  33788. var data = { key };
  33789. getDictByKey(data).then(
  33790. (res) => {
  33791. if (res.code == 200) {
  33792. if (key == "sys_package_order_status") {
  33793. this.orderStatusOptions = res.data;
  33794. }
  33795. }
  33796. },
  33797. (err) => {
  33798. }
  33799. );
  33800. },
  33801. cancelOrder(item) {
  33802. uni.showModal({
  33803. title: "提示",
  33804. content: "确认取消订单吗?",
  33805. showCancel: true,
  33806. cancelText: "取消",
  33807. confirmText: "确定",
  33808. success: (res) => {
  33809. if (res.confirm) {
  33810. var data = { orderId: item.orderId };
  33811. cancelOrder$1(data).then(
  33812. (res2) => {
  33813. if (res2.code == 200) {
  33814. uni.$emit("refreshPackageOrder");
  33815. uni.showToast({
  33816. icon: "success",
  33817. title: "操作成功"
  33818. });
  33819. } else {
  33820. uni.showToast({
  33821. icon: "none",
  33822. title: res2.msg
  33823. });
  33824. }
  33825. },
  33826. (rej) => {
  33827. }
  33828. );
  33829. }
  33830. }
  33831. });
  33832. },
  33833. showDetails(item) {
  33834. uni.navigateTo({
  33835. url: "/pages_order/packageOrderDetails?orderId=" + item.orderId
  33836. });
  33837. },
  33838. tabChange(item) {
  33839. this.status = item.id;
  33840. formatAppLog("log", "at pages_order/packageOrderList.vue:179", item);
  33841. this.mescroll.resetUpScroll();
  33842. },
  33843. mescrollInit(mescroll) {
  33844. this.mescroll = mescroll;
  33845. },
  33846. /*下拉刷新的回调 */
  33847. downCallback(mescroll) {
  33848. mescroll.resetUpScroll();
  33849. },
  33850. upCallback(page2) {
  33851. var that = this;
  33852. var data = {
  33853. status: this.status,
  33854. pageNum: page2.num,
  33855. pageSize: page2.size
  33856. };
  33857. getMyPackageOrderList(data).then((res) => {
  33858. if (res.code == 200) {
  33859. if (page2.num == 1) {
  33860. that.dataList = res.data.list;
  33861. } else {
  33862. that.dataList = that.dataList.concat(res.data.list);
  33863. }
  33864. that.mescroll.endBySize(res.data.list.length, res.data.total);
  33865. } else {
  33866. uni.showToast({
  33867. icon: "none",
  33868. title: "请求失败"
  33869. });
  33870. that.dataList = null;
  33871. that.mescroll.endErr();
  33872. }
  33873. });
  33874. }
  33875. }
  33876. };
  33877. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  33878. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  33879. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  33880. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  33881. vue.createElementVNode("view", { class: "top-fixed" }, [
  33882. vue.createVNode(_component_u_tabs, {
  33883. scrollable: true,
  33884. list: $data.tabs,
  33885. lineColor: "#C39A58",
  33886. onChange: $options.tabChange
  33887. }, null, 8, ["list", "onChange"])
  33888. ]),
  33889. vue.createVNode(_component_mescroll_body, {
  33890. top: "88rpx",
  33891. bottom: "0",
  33892. ref: "mescrollRef",
  33893. onInit: $options.mescrollInit,
  33894. onDown: $options.downCallback,
  33895. onUp: $options.upCallback,
  33896. down: $data.downOption,
  33897. up: $data.upOption
  33898. }, {
  33899. default: vue.withCtx(() => [
  33900. vue.createElementVNode("view", { class: "order-box" }, [
  33901. (vue.openBlock(true), vue.createElementBlock(
  33902. vue.Fragment,
  33903. null,
  33904. vue.renderList($data.dataList, (item) => {
  33905. return vue.openBlock(), vue.createElementBlock("view", {
  33906. class: "order-item",
  33907. onClick: ($event) => $options.showDetails(item)
  33908. }, [
  33909. vue.createElementVNode("view", { class: "top-box" }, [
  33910. vue.createElementVNode(
  33911. "view",
  33912. { class: "num" },
  33913. "订单号:" + vue.toDisplayString(item.orderSn),
  33914. 1
  33915. /* TEXT */
  33916. ),
  33917. vue.createElementVNode("view", { class: "status-box" }, [
  33918. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  33919. "text",
  33920. {
  33921. key: 0,
  33922. class: "text info"
  33923. },
  33924. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  33925. 1
  33926. /* TEXT */
  33927. )) : vue.createCommentVNode("v-if", true),
  33928. item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
  33929. "text",
  33930. {
  33931. key: 1,
  33932. class: "text success"
  33933. },
  33934. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  33935. 1
  33936. /* TEXT */
  33937. )) : vue.createCommentVNode("v-if", true),
  33938. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  33939. "text",
  33940. {
  33941. key: 2,
  33942. class: "text info"
  33943. },
  33944. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  33945. 1
  33946. /* TEXT */
  33947. )) : vue.createCommentVNode("v-if", true)
  33948. ])
  33949. ]),
  33950. vue.createElementVNode("view", { class: "package-box" }, [
  33951. vue.createElementVNode("view", { class: "left" }, [
  33952. vue.createElementVNode("image", {
  33953. src: item.imgUrl
  33954. }, null, 8, ["src"])
  33955. ]),
  33956. vue.createElementVNode("view", { class: "right" }, [
  33957. vue.createElementVNode(
  33958. "view",
  33959. { class: "title" },
  33960. vue.toDisplayString(item.packageName),
  33961. 1
  33962. /* TEXT */
  33963. ),
  33964. vue.createElementVNode("view", { class: "desc" }, [
  33965. vue.createElementVNode(
  33966. "view",
  33967. { class: "cycle" },
  33968. "用药周期" + vue.toDisplayString(item.cycle) + "天",
  33969. 1
  33970. /* TEXT */
  33971. ),
  33972. vue.createElementVNode(
  33973. "view",
  33974. { class: "duration" },
  33975. "签约时长" + vue.toDisplayString(item.duration) + "天",
  33976. 1
  33977. /* TEXT */
  33978. )
  33979. ]),
  33980. vue.createCommentVNode(' <view class="price-box">\n <view class="price">¥30元/日</view>\n <view class="count">6.2w人已购</view>\n </view> ')
  33981. ])
  33982. ]),
  33983. vue.createElementVNode("view", { class: "bottom-box" }, [
  33984. vue.createElementVNode("view", { class: "amount-paid" }, [
  33985. vue.createElementVNode("text", { class: "label" }, "订单金额:"),
  33986. vue.createElementVNode("view", { class: "price-box" }, [
  33987. vue.createElementVNode("view", { class: "unit" }, "¥"),
  33988. vue.createElementVNode(
  33989. "view",
  33990. { class: "num" },
  33991. vue.toDisplayString(item.payPrice.toFixed(2)),
  33992. 1
  33993. /* TEXT */
  33994. )
  33995. ])
  33996. ]),
  33997. vue.createElementVNode("view", { class: "btn-box" }, [
  33998. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  33999. key: 0,
  34000. class: "btn cancel",
  34001. onClick: vue.withModifiers(($event) => $options.cancelOrder(item), ["stop"])
  34002. }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  34003. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  34004. key: 1,
  34005. class: "btn pay",
  34006. onClick: vue.withModifiers(($event) => $options.pay(item), ["stop"])
  34007. }, "支付订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  34008. ])
  34009. ])
  34010. ], 8, ["onClick"]);
  34011. }),
  34012. 256
  34013. /* UNKEYED_FRAGMENT */
  34014. ))
  34015. ])
  34016. ]),
  34017. _: 1
  34018. /* STABLE */
  34019. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  34020. ]);
  34021. }
  34022. const Pages_orderPackageOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-99b5ebb4"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderList.vue"]]);
  34023. let request$5 = new Request$1().http;
  34024. function getAddressByDefault() {
  34025. return request$5("/app/userAddress/getAddressByDefault", null, "GET");
  34026. }
  34027. function getAddressList() {
  34028. return request$5("/app/userAddress/getAddressList", null, "GET");
  34029. }
  34030. function getAddressById(data) {
  34031. return request$5("/app/userAddress/getAddressById", data, "GET");
  34032. }
  34033. function delAddress(data) {
  34034. return request$5("/app/userAddress/delAddress", data, "POST", "application/json;charset=UTF-8");
  34035. }
  34036. function addAddress(data) {
  34037. return request$5("/app/userAddress/addAddress", data, "POST", "application/json;charset=UTF-8");
  34038. }
  34039. function editAddress(data) {
  34040. return request$5("/app/userAddress/editAddress", data, "POST", "application/json;charset=UTF-8");
  34041. }
  34042. function parseAddress(data) {
  34043. return request$5("/app/userAddress/parseAddress", data, "POST", "application/json;charset=UTF-8");
  34044. }
  34045. const _sfc_main$T = {
  34046. data() {
  34047. return {
  34048. giftPrice: 0,
  34049. payTypes: [],
  34050. addressId: null,
  34051. wxPay: true,
  34052. address: null,
  34053. orderId: null,
  34054. order: null,
  34055. items: null,
  34056. payType: "1",
  34057. couponText: "请选择优惠券",
  34058. userCouponId: 0,
  34059. coupons: [],
  34060. couponShow: false,
  34061. payMoney: 0,
  34062. discountMoney: 0,
  34063. payRemain: 0,
  34064. payDelivery: 0,
  34065. payPrice: 0,
  34066. gifts: []
  34067. };
  34068. },
  34069. onLoad(option) {
  34070. this.orderId = option.orderId;
  34071. var that = this;
  34072. uni.$on("updateAddress", (e) => {
  34073. that.addressId = e.addressId;
  34074. that.address = e;
  34075. that.address.address = e.province + e.city + e.district + e.detail;
  34076. });
  34077. this.getAddressByDefault();
  34078. },
  34079. onShow() {
  34080. this.getPackageOrderById();
  34081. this.getPackageById();
  34082. this.getConfigByKey();
  34083. },
  34084. methods: {
  34085. getAddressByDefault() {
  34086. getAddressByDefault().then(
  34087. (res) => {
  34088. if (res.code == 200) {
  34089. if (res.data != null) {
  34090. this.addressId = res.data.addressId;
  34091. this.address = res.data;
  34092. this.address.address = res.data.province + res.data.city + res.data.district + res.data.detail;
  34093. }
  34094. } else {
  34095. uni.showToast({
  34096. icon: "none",
  34097. title: res.msg
  34098. });
  34099. }
  34100. },
  34101. (rej) => {
  34102. }
  34103. );
  34104. },
  34105. getConfigByKey() {
  34106. var data = { key: "his.package" };
  34107. getConfigByKey(data).then(
  34108. (res) => {
  34109. if (res.code == 200) {
  34110. this.giftPrice = JSON.parse(res.data).giftPrice;
  34111. formatAppLog("log", "at pages_order/packageOrderPay.vue:268", this.giftPrice);
  34112. }
  34113. },
  34114. (rej) => {
  34115. }
  34116. );
  34117. },
  34118. checkPayType(payType) {
  34119. var flag2 = false;
  34120. this.payTypes.forEach(function(value2, index2, array3) {
  34121. if (value2.toString() == payType.toString()) {
  34122. flag2 = true;
  34123. }
  34124. });
  34125. return flag2;
  34126. },
  34127. payTypeChange(e) {
  34128. formatAppLog("log", "at pages_order/packageOrderPay.vue:284", e.detail.value);
  34129. this.payType = e.detail.value;
  34130. this.compute();
  34131. },
  34132. couponSelect(item) {
  34133. this.couponShow = false;
  34134. this.userCouponId = item.id;
  34135. formatAppLog("log", "at pages_order/packageOrderPay.vue:292", item);
  34136. this.couponText = item.price + "元优惠券";
  34137. this.compute();
  34138. },
  34139. open() {
  34140. },
  34141. close() {
  34142. this.couponShow = false;
  34143. },
  34144. openCoupon() {
  34145. this.couponShow = true;
  34146. },
  34147. delCoupon() {
  34148. this.userCouponId = 0;
  34149. this.couponText = "请选择优惠券";
  34150. this.compute();
  34151. },
  34152. compute() {
  34153. var data = {
  34154. payType: this.payType,
  34155. orderId: this.orderId,
  34156. userCouponId: this.userCouponId
  34157. };
  34158. formatAppLog("log", "at pages_order/packageOrderPay.vue:315", data);
  34159. compute$2(data).then(
  34160. (res) => {
  34161. if (res.code == 200) {
  34162. this.payPrice = res.moneys.payPrice.toFixed(2);
  34163. this.payMoney = res.moneys.payMoney.toFixed(2);
  34164. this.discountMoney = res.moneys.discountMoney.toFixed(2);
  34165. this.payDelivery = res.moneys.payDelivery.toFixed(2);
  34166. this.payRemain = res.moneys.payRemain.toFixed(2);
  34167. this.gifts = res.moneys.gifts;
  34168. } else {
  34169. this.payType = 1;
  34170. this.compute();
  34171. this.userCouponId = 0;
  34172. this.couponText = "请选择优惠券";
  34173. uni.showToast({
  34174. icon: "none",
  34175. title: res.msg
  34176. });
  34177. }
  34178. },
  34179. (err) => {
  34180. }
  34181. );
  34182. },
  34183. getMyEnableCouponList() {
  34184. var data = {};
  34185. if (this.package.isShow == 0) {
  34186. data.couponType = 5;
  34187. data.cateId = this.package.privateType;
  34188. } else if (this.package.isShow == 1) {
  34189. data.couponType = 6;
  34190. data.cateId = this.package.diseaseType;
  34191. }
  34192. getMyEnableCouponList(data).then(
  34193. (res) => {
  34194. if (res.code == 200) {
  34195. this.coupons = res.data;
  34196. }
  34197. },
  34198. (err) => {
  34199. }
  34200. );
  34201. },
  34202. getPackageOrderById() {
  34203. var data = { orderId: this.orderId };
  34204. formatAppLog("log", "at pages_order/packageOrderPay.vue:364", data);
  34205. getPackageOrderById(data).then(
  34206. (res) => {
  34207. if (res.code == 200) {
  34208. this.order = res.order;
  34209. this.compute();
  34210. this.getPackageById(this.order.packageId);
  34211. }
  34212. },
  34213. (rej) => {
  34214. }
  34215. );
  34216. },
  34217. getPackageById(packageId) {
  34218. var data = { packageId };
  34219. getPackageById(data).then(
  34220. (res) => {
  34221. if (res.code == 200) {
  34222. this.package = res.data;
  34223. this.payTypes = res.data.payType.split(",");
  34224. formatAppLog("log", "at pages_order/packageOrderPay.vue:386", this.payTypes);
  34225. this.getMyEnableCouponList();
  34226. }
  34227. },
  34228. (rej) => {
  34229. }
  34230. );
  34231. },
  34232. openAddress() {
  34233. uni.navigateTo({
  34234. url: "/pages_user/address"
  34235. });
  34236. },
  34237. payOrder() {
  34238. var data = {
  34239. payType: this.payType,
  34240. userCouponId: this.userCouponId,
  34241. addressId: this.addressId,
  34242. remark: this.order.remark,
  34243. orderId: this.order.orderId
  34244. };
  34245. uni.showLoading();
  34246. pay$2(data).then(
  34247. (res) => {
  34248. if (res.code == 200) {
  34249. uni.redirectTo({
  34250. url: "./packagePayment?orderId=" + this.orderId
  34251. });
  34252. } else {
  34253. uni.showToast({
  34254. icon: "none",
  34255. title: res.msg
  34256. });
  34257. }
  34258. },
  34259. (rej) => {
  34260. }
  34261. );
  34262. }
  34263. }
  34264. };
  34265. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  34266. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  34267. return vue.openBlock(), vue.createElementBlock("view", null, [
  34268. vue.createElementVNode("view", { class: "inner-box" }, [
  34269. vue.createCommentVNode(" 收货人 "),
  34270. $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", {
  34271. key: 0,
  34272. class: "address-box",
  34273. onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress())
  34274. }, [
  34275. vue.createElementVNode("view", { class: "left" }, [
  34276. vue.createElementVNode("view", { class: "name-box" }, [
  34277. vue.createElementVNode("text", { class: "text name" }, "添加收货地址")
  34278. ])
  34279. ]),
  34280. vue.createElementVNode("view", { class: "arrow-box" }, [
  34281. vue.createElementVNode("image", {
  34282. src: "/static/images/arrow_gray.png",
  34283. mode: ""
  34284. })
  34285. ])
  34286. ])) : vue.createCommentVNode("v-if", true),
  34287. $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", {
  34288. key: 1,
  34289. class: "address-box",
  34290. onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress())
  34291. }, [
  34292. vue.createElementVNode("view", { class: "left" }, [
  34293. vue.createElementVNode("view", { class: "name-box" }, [
  34294. vue.createElementVNode(
  34295. "text",
  34296. { class: "text name" },
  34297. vue.toDisplayString($data.address.realName),
  34298. 1
  34299. /* TEXT */
  34300. ),
  34301. $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock(
  34302. "text",
  34303. {
  34304. key: 0,
  34305. class: "text"
  34306. },
  34307. vue.toDisplayString($data.address.phone),
  34308. 1
  34309. /* TEXT */
  34310. )) : vue.createCommentVNode("v-if", true)
  34311. ]),
  34312. vue.createElementVNode(
  34313. "view",
  34314. { class: "address" },
  34315. vue.toDisplayString($data.address.address),
  34316. 1
  34317. /* TEXT */
  34318. )
  34319. ]),
  34320. vue.createElementVNode("view", { class: "arrow-box" }, [
  34321. vue.createElementVNode("image", {
  34322. src: "/static/images/arrow_gray.png",
  34323. mode: ""
  34324. })
  34325. ])
  34326. ])) : vue.createCommentVNode("v-if", true),
  34327. vue.createElementVNode("view", { class: "other-info" }, [
  34328. vue.createElementVNode("view", { class: "title" }, "支付明细"),
  34329. vue.createElementVNode("view", { class: "item" }, [
  34330. vue.createElementVNode("view", { class: "left" }, [
  34331. vue.createElementVNode("text", { class: "label" }, "应付金额:")
  34332. ]),
  34333. vue.createElementVNode("view", { class: "right" }, [
  34334. vue.createElementVNode(
  34335. "text",
  34336. { class: "text" },
  34337. vue.toDisplayString($data.payPrice),
  34338. 1
  34339. /* TEXT */
  34340. )
  34341. ])
  34342. ]),
  34343. $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", {
  34344. key: 0,
  34345. class: "item",
  34346. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"]))
  34347. }, [
  34348. vue.createElementVNode("view", { class: "left" }, [
  34349. vue.createElementVNode("text", { class: "label" }, "优惠券:")
  34350. ]),
  34351. vue.createElementVNode("view", { class: "right" }, [
  34352. vue.createElementVNode(
  34353. "text",
  34354. { class: "text" },
  34355. vue.toDisplayString($data.couponText),
  34356. 1
  34357. /* TEXT */
  34358. ),
  34359. $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  34360. key: 0,
  34361. onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])),
  34362. class: "ic-close",
  34363. src: "/static/images/close.png"
  34364. })) : vue.createCommentVNode("v-if", true),
  34365. vue.createElementVNode("image", {
  34366. class: "ic-back",
  34367. src: "/static/images/arrow_gray.png"
  34368. })
  34369. ])
  34370. ])) : vue.createCommentVNode("v-if", true),
  34371. vue.createElementVNode("view", { class: "item" }, [
  34372. vue.createElementVNode("view", { class: "left" }, [
  34373. vue.createElementVNode("text", { class: "label" }, "优惠金额:")
  34374. ]),
  34375. vue.createElementVNode("view", { class: "right" }, [
  34376. vue.createElementVNode(
  34377. "text",
  34378. { class: "text" },
  34379. vue.toDisplayString($data.discountMoney),
  34380. 1
  34381. /* TEXT */
  34382. )
  34383. ])
  34384. ]),
  34385. vue.createElementVNode("view", { class: "item" }, [
  34386. vue.createElementVNode("view", { class: "left" }, [
  34387. vue.createElementVNode("text", { class: "label" }, "支付金额:")
  34388. ]),
  34389. vue.createElementVNode("view", { class: "right" }, [
  34390. vue.createElementVNode(
  34391. "text",
  34392. { class: "text" },
  34393. vue.toDisplayString($data.payMoney),
  34394. 1
  34395. /* TEXT */
  34396. )
  34397. ])
  34398. ]),
  34399. vue.createElementVNode("view", { class: "item" }, [
  34400. vue.createElementVNode("view", { class: "left" }, [
  34401. vue.createElementVNode("text", { class: "label" }, "物流代收:")
  34402. ]),
  34403. vue.createElementVNode("view", { class: "right" }, [
  34404. vue.createElementVNode(
  34405. "text",
  34406. { class: "text" },
  34407. vue.toDisplayString($data.payRemain),
  34408. 1
  34409. /* TEXT */
  34410. )
  34411. ])
  34412. ]),
  34413. vue.createElementVNode("view", { class: "item" }, [
  34414. vue.createElementVNode("view", { class: "left" }, [
  34415. vue.createElementVNode("text", { class: "label" }, "邮费:")
  34416. ]),
  34417. vue.createElementVNode("view", { class: "right" }, [
  34418. vue.createElementVNode(
  34419. "text",
  34420. { class: "text" },
  34421. vue.toDisplayString($data.payDelivery),
  34422. 1
  34423. /* TEXT */
  34424. )
  34425. ])
  34426. ])
  34427. ]),
  34428. vue.createElementVNode("view", { class: "pay-type" }, [
  34429. vue.createElementVNode("view", { class: "title" }, "支付方式"),
  34430. vue.createElementVNode(
  34431. "radio-group",
  34432. {
  34433. onChange: _cache[4] || (_cache[4] = (...args) => $options.payTypeChange && $options.payTypeChange(...args))
  34434. },
  34435. [
  34436. $options.checkPayType("1") ? (vue.openBlock(), vue.createElementBlock("view", {
  34437. key: 0,
  34438. class: "item"
  34439. }, [
  34440. vue.createElementVNode("view", { class: "left" }, [
  34441. vue.createElementVNode("image", {
  34442. src: "/static/images/wecha_pay.png",
  34443. mode: ""
  34444. }),
  34445. vue.createElementVNode("text", { class: "text" }, "全款支付")
  34446. ]),
  34447. vue.createElementVNode("label", null, [
  34448. vue.createElementVNode("radio", {
  34449. value: 1,
  34450. checked: $data.payType == "1"
  34451. }, null, 8, ["checked"])
  34452. ])
  34453. ])) : vue.createCommentVNode("v-if", true),
  34454. $options.checkPayType("2") ? (vue.openBlock(), vue.createElementBlock("view", {
  34455. key: 1,
  34456. class: "item"
  34457. }, [
  34458. vue.createElementVNode("view", { class: "left" }, [
  34459. vue.createElementVNode("image", {
  34460. src: "/static/images/pay_de.png",
  34461. mode: ""
  34462. }),
  34463. vue.createElementVNode("text", { class: "text" }, "物流代收")
  34464. ]),
  34465. vue.createElementVNode("label", null, [
  34466. vue.createElementVNode("radio", {
  34467. value: 2,
  34468. checked: $data.payType == "2"
  34469. }, null, 8, ["checked"])
  34470. ])
  34471. ])) : vue.createCommentVNode("v-if", true),
  34472. $options.checkPayType("3") ? (vue.openBlock(), vue.createElementBlock("view", {
  34473. key: 2,
  34474. class: "item"
  34475. }, [
  34476. vue.createElementVNode("view", { class: "left" }, [
  34477. vue.createElementVNode("image", {
  34478. src: "/static/images/pay_1.png",
  34479. mode: ""
  34480. }),
  34481. vue.createElementVNode("text", { class: "text" }, "货到付款")
  34482. ]),
  34483. vue.createElementVNode("label", null, [
  34484. vue.createElementVNode("radio", {
  34485. value: 3,
  34486. checked: $data.payType == "3"
  34487. }, null, 8, ["checked"])
  34488. ])
  34489. ])) : vue.createCommentVNode("v-if", true)
  34490. ],
  34491. 32
  34492. /* NEED_HYDRATION */
  34493. )
  34494. ]),
  34495. $data.payType == "1" && $data.order != null && $data.order.companyId != null && $data.order.companyId > 0 && $data.giftPrice <= $data.payPrice ? (vue.openBlock(), vue.createElementBlock("view", {
  34496. key: 2,
  34497. class: "other-info"
  34498. }, [
  34499. vue.createElementVNode("view", { class: "title" }, "赠品"),
  34500. vue.createElementVNode("view", { class: "drug-list" }, [
  34501. (vue.openBlock(true), vue.createElementBlock(
  34502. vue.Fragment,
  34503. null,
  34504. vue.renderList($data.gifts, (product) => {
  34505. return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
  34506. vue.createElementVNode("view", { class: "img-box" }, [
  34507. vue.createElementVNode("image", {
  34508. src: product.image,
  34509. mode: "aspectFill"
  34510. }, null, 8, ["src"])
  34511. ]),
  34512. vue.createElementVNode("view", { class: "drug-info" }, [
  34513. vue.createElementVNode("view", null, [
  34514. vue.createElementVNode(
  34515. "view",
  34516. { class: "name-box ellipsis2" },
  34517. vue.toDisplayString(product.productName),
  34518. 1
  34519. /* TEXT */
  34520. ),
  34521. vue.createElementVNode(
  34522. "view",
  34523. { class: "spec" },
  34524. vue.toDisplayString(product.sku),
  34525. 1
  34526. /* TEXT */
  34527. )
  34528. ]),
  34529. vue.createElementVNode("view", { class: "num-box" }, [
  34530. vue.createElementVNode(
  34531. "view",
  34532. { class: "use" },
  34533. vue.toDisplayString(product.usageMethod),
  34534. 1
  34535. /* TEXT */
  34536. ),
  34537. vue.createElementVNode("view", { class: "price" }, [
  34538. vue.createElementVNode("text", { class: "unit" }, "¥"),
  34539. vue.createElementVNode(
  34540. "text",
  34541. { class: "num" },
  34542. vue.toDisplayString(product.price.toFixed(2)),
  34543. 1
  34544. /* TEXT */
  34545. )
  34546. ]),
  34547. vue.createElementVNode(
  34548. "view",
  34549. { class: "amount" },
  34550. "x" + vue.toDisplayString(product.count),
  34551. 1
  34552. /* TEXT */
  34553. )
  34554. ])
  34555. ])
  34556. ]);
  34557. }),
  34558. 256
  34559. /* UNKEYED_FRAGMENT */
  34560. ))
  34561. ])
  34562. ])) : vue.createCommentVNode("v-if", true),
  34563. vue.createCommentVNode(" 备注 "),
  34564. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  34565. key: 3,
  34566. class: "remarks"
  34567. }, [
  34568. vue.withDirectives(vue.createElementVNode(
  34569. "input",
  34570. {
  34571. type: "text",
  34572. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.order.remark = $event),
  34573. placeholder: "备注留言(选填)",
  34574. "placeholder-class": "input"
  34575. },
  34576. null,
  34577. 512
  34578. /* NEED_PATCH */
  34579. ), [
  34580. [vue.vModelText, $data.order.remark]
  34581. ])
  34582. ])) : vue.createCommentVNode("v-if", true)
  34583. ]),
  34584. vue.createVNode(_component_u_popup, {
  34585. closeable: true,
  34586. show: $data.couponShow,
  34587. round: 10,
  34588. mode: "bottom",
  34589. onClose: $options.close,
  34590. onOpen: $options.open
  34591. }, {
  34592. default: vue.withCtx(() => [
  34593. vue.createElementVNode("view", { class: "coupon" }, [
  34594. $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  34595. key: 0,
  34596. class: "coupon-box"
  34597. }, [
  34598. (vue.openBlock(true), vue.createElementBlock(
  34599. vue.Fragment,
  34600. null,
  34601. vue.renderList($data.coupons, (item) => {
  34602. return vue.openBlock(), vue.createElementBlock("view", {
  34603. onClick: ($event) => $options.couponSelect(item),
  34604. class: "coupon-item"
  34605. }, [
  34606. vue.createElementVNode("view", { class: "left" }, [
  34607. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  34608. key: 0,
  34609. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png",
  34610. mode: "widthFix"
  34611. })) : vue.createCommentVNode("v-if", true),
  34612. item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  34613. key: 1,
  34614. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png",
  34615. mode: "widthFix"
  34616. })) : vue.createCommentVNode("v-if", true),
  34617. vue.createElementVNode("view", { style: { "z-index": "999" } }, [
  34618. vue.createTextVNode(" ¥"),
  34619. vue.createElementVNode(
  34620. "span",
  34621. { class: "num" },
  34622. vue.toDisplayString(item.price.toFixed(2)),
  34623. 1
  34624. /* TEXT */
  34625. )
  34626. ]),
  34627. vue.createElementVNode(
  34628. "view",
  34629. { class: "pic-num" },
  34630. "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
  34631. 1
  34632. /* TEXT */
  34633. )
  34634. ]),
  34635. vue.createElementVNode("view", { class: "right" }, [
  34636. vue.createElementVNode(
  34637. "view",
  34638. { class: "title" },
  34639. vue.toDisplayString(item.title),
  34640. 1
  34641. /* TEXT */
  34642. ),
  34643. vue.createElementVNode("view", { class: "btns" }, [
  34644. item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  34645. "view",
  34646. { key: 0 },
  34647. vue.toDisplayString(item.limitTime) + " 到期",
  34648. 1
  34649. /* TEXT */
  34650. )) : vue.createCommentVNode("v-if", true),
  34651. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  34652. "view",
  34653. { key: 1 },
  34654. "使用时间 " + vue.toDisplayString(item.useTime),
  34655. 1
  34656. /* TEXT */
  34657. )) : vue.createCommentVNode("v-if", true),
  34658. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  34659. key: 2,
  34660. class: "bnt gray"
  34661. }, "已使用")) : vue.createCommentVNode("v-if", true),
  34662. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  34663. key: 3,
  34664. class: "bnt gray"
  34665. }, "已过期")) : vue.createCommentVNode("v-if", true),
  34666. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  34667. key: 4,
  34668. class: "btn"
  34669. }, "使用")) : vue.createCommentVNode("v-if", true)
  34670. ])
  34671. ])
  34672. ], 8, ["onClick"]);
  34673. }),
  34674. 256
  34675. /* UNKEYED_FRAGMENT */
  34676. ))
  34677. ])) : vue.createCommentVNode("v-if", true),
  34678. $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  34679. key: 1,
  34680. class: "empty"
  34681. }, [
  34682. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" })
  34683. ])) : vue.createCommentVNode("v-if", true)
  34684. ])
  34685. ]),
  34686. _: 1
  34687. /* STABLE */
  34688. }, 8, ["show", "onClose", "onOpen"]),
  34689. vue.createCommentVNode(" 底部按钮 "),
  34690. vue.createElementVNode("view", { class: "btn-box" }, [
  34691. $data.order != null ? (vue.openBlock(), vue.createElementBlock(
  34692. "view",
  34693. {
  34694. key: 0,
  34695. class: "btn",
  34696. onClick: _cache[6] || (_cache[6] = ($event) => $options.payOrder())
  34697. },
  34698. "支付" + vue.toDisplayString($data.payMoney) + "元",
  34699. 1
  34700. /* TEXT */
  34701. )) : vue.createCommentVNode("v-if", true)
  34702. ])
  34703. ]);
  34704. }
  34705. const Pages_orderPackageOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderPay.vue"]]);
  34706. const _sfc_main$S = {
  34707. data() {
  34708. return {
  34709. order: null
  34710. };
  34711. },
  34712. onLoad(option) {
  34713. uni.setNavigationBarTitle({
  34714. title: "支付结果"
  34715. });
  34716. uni.$emit("refreshPackageOrder");
  34717. this.orderId = option.orderId;
  34718. this.getPackageOrderById();
  34719. },
  34720. methods: {
  34721. getPackageOrderById() {
  34722. var data = { orderId: this.orderId };
  34723. var that = this;
  34724. uni.showLoading();
  34725. getPackageOrderById(data).then(
  34726. (res) => {
  34727. uni.hideLoading();
  34728. if (res.code == 200) {
  34729. that.order = res.order;
  34730. } else {
  34731. uni.showToast({
  34732. icon: "none",
  34733. title: res.msg
  34734. });
  34735. }
  34736. },
  34737. (rej) => {
  34738. }
  34739. );
  34740. },
  34741. copyTest(text) {
  34742. uni.setClipboardData({
  34743. data: text,
  34744. success: () => {
  34745. uni.showToast({
  34746. title: "内容已成功复制到剪切板",
  34747. icon: "none"
  34748. });
  34749. }
  34750. });
  34751. },
  34752. showOrderDetails(orderId) {
  34753. formatAppLog("log", "at pages_order/packageOrderPaySuccess.vue:87", orderId);
  34754. uni.redirectTo({
  34755. url: "/pages_order/packageOrderDetails?orderId=" + orderId
  34756. });
  34757. }
  34758. }
  34759. };
  34760. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  34761. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  34762. vue.createElementVNode("view", { class: "inner" }, [
  34763. vue.createElementVNode("view", { class: "top" }, [
  34764. vue.createElementVNode("text", { class: "title" }, "支付成功"),
  34765. vue.createElementVNode("image", {
  34766. class: "icon",
  34767. src: "/static/images/success.png"
  34768. }),
  34769. vue.createElementVNode("view", { class: "btn-box" }, [
  34770. vue.createElementVNode("view", {
  34771. class: "btn cancel",
  34772. onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
  34773. }, " 查看订单")
  34774. ])
  34775. ]),
  34776. vue.createCommentVNode(" 订单详情查看 "),
  34777. vue.createElementVNode("view", { class: "order-info" }, [
  34778. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  34779. vue.createElementVNode("view", { class: "item" }, [
  34780. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  34781. vue.createElementVNode("view", { class: "sn-box" }, [
  34782. vue.createElementVNode(
  34783. "text",
  34784. { class: "text" },
  34785. vue.toDisplayString($data.order.orderSn),
  34786. 1
  34787. /* TEXT */
  34788. ),
  34789. vue.createElementVNode("view", {
  34790. class: "copy-btn",
  34791. onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderSn))
  34792. }, "复制")
  34793. ])
  34794. ]),
  34795. vue.createElementVNode("view", { class: "item" }, [
  34796. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  34797. vue.createElementVNode(
  34798. "text",
  34799. { class: "text" },
  34800. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  34801. 1
  34802. /* TEXT */
  34803. )
  34804. ]),
  34805. vue.createElementVNode("view", { class: "item" }, [
  34806. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  34807. vue.createElementVNode(
  34808. "text",
  34809. { class: "text" },
  34810. vue.toDisplayString($data.order.createTime),
  34811. 1
  34812. /* TEXT */
  34813. )
  34814. ])
  34815. ])
  34816. ])
  34817. ]);
  34818. }
  34819. const Pages_orderPackageOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderPaySuccess.vue"]]);
  34820. const _sfc_main$R = {
  34821. data() {
  34822. return {
  34823. orderId: null,
  34824. deliverySn: null,
  34825. express: {},
  34826. expressList: []
  34827. };
  34828. },
  34829. onLoad(option) {
  34830. this.orderId = option.orderId;
  34831. this.getExpress();
  34832. },
  34833. methods: {
  34834. getExpress() {
  34835. var data = { orderId: this.orderId };
  34836. getExpress(data).then((res) => {
  34837. if (res.code == 200) {
  34838. this.express = res.express;
  34839. this.expressList = res.data;
  34840. this.deliverySn = res.deliverySn;
  34841. } else {
  34842. uni.showToast({
  34843. icon: "none",
  34844. title: "请求失败"
  34845. });
  34846. }
  34847. });
  34848. },
  34849. // 返回上一页
  34850. back() {
  34851. uni.navigateBack();
  34852. },
  34853. // 复制运单号
  34854. copyOrderSn(text) {
  34855. uni.setClipboardData({
  34856. data: text,
  34857. success: () => {
  34858. uni.showToast({
  34859. title: "内容已成功复制到剪切板",
  34860. icon: "none"
  34861. });
  34862. }
  34863. });
  34864. },
  34865. // 拨打电话
  34866. callPhone(phone) {
  34867. uni.makePhoneCall({
  34868. phoneNumber: phone
  34869. });
  34870. }
  34871. }
  34872. };
  34873. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  34874. return vue.openBlock(), vue.createElementBlock("view", null, [
  34875. vue.createElementVNode("view", { class: "top-cont" }, [
  34876. vue.createCommentVNode(" 背景图片 "),
  34877. vue.createElementVNode("view", { class: "bg" }),
  34878. vue.createElementVNode("view", { class: "top-inner" }, [
  34879. vue.createCommentVNode(" 运单号 "),
  34880. vue.createElementVNode("view", { class: "waybill-number" }, [
  34881. vue.createElementVNode("view", { class: "inner" }, [
  34882. vue.createElementVNode("view", { class: "num-box" }, [
  34883. vue.createElementVNode("text", { class: "text" }, "运单号"),
  34884. vue.createElementVNode(
  34885. "text",
  34886. { class: "text" },
  34887. vue.toDisplayString($data.deliverySn),
  34888. 1
  34889. /* TEXT */
  34890. ),
  34891. vue.createElementVNode("view", {
  34892. class: "copy",
  34893. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.deliverySn))
  34894. }, "复制")
  34895. ]),
  34896. vue.createElementVNode("view", { class: "kf-box" }, [
  34897. vue.createElementVNode(
  34898. "text",
  34899. { class: "text" },
  34900. vue.toDisplayString($data.express.name),
  34901. 1
  34902. /* TEXT */
  34903. ),
  34904. vue.createCommentVNode(' <text class="text">客服电话:95311</text> ')
  34905. ])
  34906. ])
  34907. ]),
  34908. $data.expressList != null ? (vue.openBlock(), vue.createElementBlock("view", {
  34909. key: 0,
  34910. class: "content"
  34911. }, [
  34912. vue.createCommentVNode(" 物流信息 "),
  34913. $data.expressList.Traces != null ? (vue.openBlock(), vue.createElementBlock("view", {
  34914. key: 0,
  34915. class: "refund-steps"
  34916. }, [
  34917. (vue.openBlock(true), vue.createElementBlock(
  34918. vue.Fragment,
  34919. null,
  34920. vue.renderList($data.expressList.Traces, (item, index2) => {
  34921. return vue.openBlock(), vue.createElementBlock("view", {
  34922. key: index2,
  34923. class: "steps"
  34924. }, [
  34925. vue.createElementVNode("view", { class: "title" }, [
  34926. vue.createCommentVNode(' <text v-if="index == 0" class="text black-text">已签收</text> '),
  34927. vue.createCommentVNode(' <text class="text gray-bold">运输中</text> '),
  34928. vue.createCommentVNode(" 左侧灰色圆点 "),
  34929. vue.createElementVNode("view", { class: "dot" }),
  34930. vue.createCommentVNode(" 对号 "),
  34931. vue.createElementVNode("image", {
  34932. class: "img",
  34933. src: "/static/images/complete.png",
  34934. mode: ""
  34935. }),
  34936. vue.createCommentVNode(" 运输中图标 "),
  34937. vue.createElementVNode("image", {
  34938. class: "img",
  34939. src: "/static/images/car40.png",
  34940. mode: ""
  34941. })
  34942. ]),
  34943. vue.createElementVNode(
  34944. "view",
  34945. { class: "desc-text" },
  34946. vue.toDisplayString(item.AcceptStation),
  34947. 1
  34948. /* TEXT */
  34949. ),
  34950. vue.createElementVNode(
  34951. "view",
  34952. { class: "time" },
  34953. vue.toDisplayString(item.AcceptTime),
  34954. 1
  34955. /* TEXT */
  34956. )
  34957. ]);
  34958. }),
  34959. 128
  34960. /* KEYED_FRAGMENT */
  34961. ))
  34962. ])) : vue.createCommentVNode("v-if", true)
  34963. ])) : vue.createCommentVNode("v-if", true)
  34964. ])
  34965. ])
  34966. ]);
  34967. }
  34968. const Pages_orderStoreOrderDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderDelivery.vue"]]);
  34969. let request$4 = new Request$1().http;
  34970. function getStoreOrderItems(data) {
  34971. return request$4("/app/storeAfterSales/getStoreOrderItems", data, "GET");
  34972. }
  34973. function applyAfterSales(data) {
  34974. return request$4("/app/storeAfterSales/applyAfterSales", data, "POST", "application/json;charset=UTF-8");
  34975. }
  34976. function getStoreAfterSalesList(data) {
  34977. return request$4("/app/storeAfterSales/getStoreAfterSalesList", data, "GET");
  34978. }
  34979. function getStoreAfterSalesById(data) {
  34980. return request$4("/app/storeAfterSales/getStoreAfterSalesById", data, "GET");
  34981. }
  34982. function revoke(data) {
  34983. return request$4("/app/storeAfterSales/revoke", data, "POST", "application/json;charset=UTF-8");
  34984. }
  34985. function addDelivery(data) {
  34986. return request$4("/app/storeAfterSales/addDelivery", data, "POST", "application/json;charset=UTF-8");
  34987. }
  34988. const _sfc_main$Q = {
  34989. data() {
  34990. return {
  34991. order: null,
  34992. items: []
  34993. };
  34994. },
  34995. onLoad(option) {
  34996. this.orderId = option.orderId;
  34997. this.getStoreOrderItems();
  34998. },
  34999. methods: {
  35000. checkChange(item) {
  35001. item.checked = !item.checked;
  35002. },
  35003. submit(type2) {
  35004. uni.redirectTo({
  35005. url: "./storeOrderRefundSubmit?orderId=" + this.orderId + "&type=" + type2
  35006. });
  35007. },
  35008. getStoreOrderItems() {
  35009. var data = { orderId: this.orderId };
  35010. getStoreOrderItems(data).then((res) => {
  35011. if (res.code == 200) {
  35012. this.order = res.order;
  35013. this.items = res.items;
  35014. } else {
  35015. uni.showToast({
  35016. icon: "none",
  35017. title: "请求失败"
  35018. });
  35019. }
  35020. });
  35021. }
  35022. }
  35023. };
  35024. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  35025. return $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  35026. key: 0,
  35027. class: "content"
  35028. }, [
  35029. vue.createElementVNode("view", { class: "inner" }, [
  35030. vue.createElementVNode("view", { class: "goods-list" }, [
  35031. $data.order != null ? (vue.openBlock(true), vue.createElementBlock(
  35032. vue.Fragment,
  35033. { key: 0 },
  35034. vue.renderList($data.items, (item, index2) => {
  35035. return vue.openBlock(), vue.createElementBlock("view", {
  35036. class: "item",
  35037. key: index2
  35038. }, [
  35039. vue.createCommentVNode(' <label style="margin-right: 30upx;">\r\n <checkbox :value="item.checked" :checked="item.checked" @click="checkChange(item)" />\r\n </label> '),
  35040. vue.createElementVNode("image", {
  35041. class: "goods-img",
  35042. src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
  35043. mode: "aspectFit"
  35044. }, null, 8, ["src"]),
  35045. vue.createElementVNode("view", { class: "info" }, [
  35046. vue.createElementVNode("view", { class: "top" }, [
  35047. vue.createElementVNode(
  35048. "view",
  35049. { class: "title ellipsis2" },
  35050. vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
  35051. 1
  35052. /* TEXT */
  35053. ),
  35054. vue.createElementVNode(
  35055. "view",
  35056. { class: "spec" },
  35057. vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
  35058. 1
  35059. /* TEXT */
  35060. )
  35061. ]),
  35062. vue.createElementVNode("view", { class: "price-num" }, [
  35063. vue.createElementVNode("view", { class: "price-box" }, [
  35064. vue.createElementVNode("text", { class: "unit" }, "¥"),
  35065. vue.createElementVNode(
  35066. "text",
  35067. { class: "price" },
  35068. vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)),
  35069. 1
  35070. /* TEXT */
  35071. )
  35072. ]),
  35073. vue.createElementVNode(
  35074. "view",
  35075. { class: "num" },
  35076. "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
  35077. 1
  35078. /* TEXT */
  35079. )
  35080. ])
  35081. ])
  35082. ]);
  35083. }),
  35084. 128
  35085. /* KEYED_FRAGMENT */
  35086. )) : vue.createCommentVNode("v-if", true)
  35087. ])
  35088. ]),
  35089. vue.createCommentVNode(" 底部按钮 "),
  35090. vue.createElementVNode("view", { class: "btn-box" }, [
  35091. vue.createElementVNode("view", { class: "text" }, "提交申请后,客服会与您电话沟通,请保持手机通畅"),
  35092. vue.createElementVNode("view", { class: "btns" }, [
  35093. vue.createElementVNode("view", { class: "left" }),
  35094. vue.createElementVNode("view", { class: "right" }, [
  35095. $data.order.status == 2 || $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  35096. key: 0,
  35097. class: "btn cancel",
  35098. onClick: _cache[0] || (_cache[0] = ($event) => $options.submit(0))
  35099. }, "仅退款")) : vue.createCommentVNode("v-if", true),
  35100. $data.order.status == 3 || $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  35101. key: 1,
  35102. class: "btn cancel",
  35103. onClick: _cache[1] || (_cache[1] = ($event) => $options.submit(1))
  35104. }, "退款退货")) : vue.createCommentVNode("v-if", true)
  35105. ])
  35106. ])
  35107. ])
  35108. ])) : vue.createCommentVNode("v-if", true);
  35109. }
  35110. const Pages_orderStoreOrderRefundApply = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundApply.vue"]]);
  35111. const _sfc_main$P = {
  35112. data() {
  35113. return {
  35114. orderId: null,
  35115. order: null,
  35116. orderCode: null,
  35117. items: [],
  35118. type: null,
  35119. reasonsOptions: [],
  35120. reasons: "请选择",
  35121. explains: "",
  35122. refundAmount: 0
  35123. };
  35124. },
  35125. onLoad(option) {
  35126. this.type = option.type;
  35127. this.orderId = option.orderId;
  35128. this.getStoreOrderItems();
  35129. this.getDictByKey("sys_sales_reasons");
  35130. },
  35131. methods: {
  35132. getDictByKey(key) {
  35133. var data = { key };
  35134. getDictByKey(data).then(
  35135. (res) => {
  35136. if (res.code == 200) {
  35137. if (key == "sys_sales_reasons") {
  35138. this.reasonsOptions = res.data;
  35139. }
  35140. }
  35141. },
  35142. (err) => {
  35143. }
  35144. );
  35145. },
  35146. getStoreOrderItems() {
  35147. var data = { orderId: this.orderId };
  35148. getStoreOrderItems(data).then((res) => {
  35149. if (res.code == 200) {
  35150. this.order = res.order;
  35151. this.items = res.items;
  35152. this.refundAmount = this.order.payMoney.toFixed(2);
  35153. } else {
  35154. uni.showToast({
  35155. icon: "none",
  35156. title: "请求失败"
  35157. });
  35158. }
  35159. });
  35160. },
  35161. handleReasons(e) {
  35162. formatAppLog("log", "at pages_order/storeOrderRefundSubmit.vue:134", e.detail.value);
  35163. this.reasons = this.reasonsOptions[e.detail.value].dictLabel;
  35164. },
  35165. submit() {
  35166. if (this.reasons == "请选择") {
  35167. uni.showToast({
  35168. icon: "none",
  35169. title: "请选择原因"
  35170. });
  35171. return;
  35172. }
  35173. if (this.refundAmount < 0) {
  35174. uni.showToast({
  35175. icon: "none",
  35176. title: "请输入退款金额"
  35177. });
  35178. return;
  35179. }
  35180. var productIds = this.items.map((item2) => item2.productId);
  35181. var products = [];
  35182. for (var i = 0; i < productIds.length; i++) {
  35183. var item = { productId: productIds[i] };
  35184. products.push(item);
  35185. }
  35186. var data = {
  35187. refundAmount: this.refundAmount,
  35188. orderId: this.orderId,
  35189. refundType: this.type,
  35190. reasons: this.reasons,
  35191. explains: this.explains,
  35192. productList: products
  35193. };
  35194. applyAfterSales(data).then((res) => {
  35195. if (res.code == 200) {
  35196. uni.showToast({
  35197. icon: "success",
  35198. title: "提交成功"
  35199. });
  35200. setTimeout(function() {
  35201. uni.$emit("refreshOrder");
  35202. uni.navigateBack({
  35203. delta: 1
  35204. });
  35205. }, 500);
  35206. } else {
  35207. uni.showToast({
  35208. icon: "none",
  35209. title: res.msg
  35210. });
  35211. }
  35212. });
  35213. }
  35214. }
  35215. };
  35216. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  35217. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  35218. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  35219. vue.createElementVNode("view", { class: "inner" }, [
  35220. vue.createCommentVNode(" 药品列表 "),
  35221. vue.createElementVNode("view", { class: "drug-list" }, [
  35222. vue.createElementVNode("view", { class: "item" }, [
  35223. vue.createCommentVNode(" 药品信息 "),
  35224. $data.order != null ? (vue.openBlock(true), vue.createElementBlock(
  35225. vue.Fragment,
  35226. { key: 0 },
  35227. vue.renderList($data.items, (item, index2) => {
  35228. return vue.openBlock(), vue.createElementBlock("view", {
  35229. class: "drug-info",
  35230. key: index2
  35231. }, [
  35232. vue.createElementVNode("view", { class: "img-box" }, [
  35233. vue.createElementVNode("image", {
  35234. src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
  35235. mode: "aspectFit"
  35236. }, null, 8, ["src"])
  35237. ]),
  35238. vue.createElementVNode("view", { class: "info" }, [
  35239. vue.createElementVNode("view", { class: "top" }, [
  35240. vue.createElementVNode(
  35241. "view",
  35242. { class: "title ellipsis2" },
  35243. vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
  35244. 1
  35245. /* TEXT */
  35246. ),
  35247. vue.createElementVNode(
  35248. "view",
  35249. { class: "spec" },
  35250. vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
  35251. 1
  35252. /* TEXT */
  35253. )
  35254. ]),
  35255. vue.createElementVNode("view", { class: "price-num" }, [
  35256. vue.createElementVNode("view", { class: "price-box" }, [
  35257. vue.createElementVNode("text", { class: "unit" }, "¥"),
  35258. vue.createElementVNode(
  35259. "text",
  35260. { class: "price" },
  35261. vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)),
  35262. 1
  35263. /* TEXT */
  35264. )
  35265. ]),
  35266. vue.createElementVNode(
  35267. "view",
  35268. { class: "num" },
  35269. "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
  35270. 1
  35271. /* TEXT */
  35272. )
  35273. ])
  35274. ])
  35275. ]);
  35276. }),
  35277. 128
  35278. /* KEYED_FRAGMENT */
  35279. )) : vue.createCommentVNode("v-if", true)
  35280. ])
  35281. ]),
  35282. vue.createCommentVNode(" 申请原因 "),
  35283. vue.createElementVNode("view", { class: "reason-apply" }, [
  35284. vue.createElementVNode("view", { class: "title-box" }, [
  35285. vue.createElementVNode("text", { class: "label" }, "退款金额"),
  35286. vue.withDirectives(vue.createElementVNode(
  35287. "input",
  35288. {
  35289. class: "money",
  35290. type: "text",
  35291. disabled: "",
  35292. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.refundAmount = $event),
  35293. placeholder: "退款金额",
  35294. "placeholder-class": "form-input"
  35295. },
  35296. null,
  35297. 512
  35298. /* NEED_PATCH */
  35299. ), [
  35300. [vue.vModelText, $data.refundAmount]
  35301. ])
  35302. ]),
  35303. vue.createElementVNode("view", { class: "title-box" }, [
  35304. vue.createElementVNode("text", { class: "label" }, "申请原因"),
  35305. vue.createElementVNode("picker", {
  35306. onChange: _cache[1] || (_cache[1] = (...args) => $options.handleReasons && $options.handleReasons(...args)),
  35307. value: $data.reasons,
  35308. "range-key": "dictLabel",
  35309. range: $data.reasonsOptions
  35310. }, [
  35311. vue.createElementVNode("view", { class: "chose-box" }, [
  35312. vue.createElementVNode(
  35313. "text",
  35314. { class: "text" },
  35315. vue.toDisplayString($data.reasons),
  35316. 1
  35317. /* TEXT */
  35318. ),
  35319. vue.createElementVNode("image", {
  35320. src: "/static/images/arrow_gray.png",
  35321. mode: ""
  35322. })
  35323. ])
  35324. ], 40, ["value", "range"])
  35325. ]),
  35326. vue.createElementVNode("view", { class: "textarea-box" }, [
  35327. vue.createVNode(_component_u__textarea, {
  35328. height: 100,
  35329. modelValue: $data.explains,
  35330. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.explains = $event),
  35331. placeholder: "请描述申请售后服务的具体原因",
  35332. count: 100
  35333. }, null, 8, ["modelValue"])
  35334. ])
  35335. ]),
  35336. vue.createCommentVNode(" 退回方式 "),
  35337. vue.createCommentVNode(' <view class="return-method">\r\n <view class="title-box">\r\n <text class="text">退货方式</text>\r\n <text class="text">用户发货</text>\r\n </view>\r\n <view class="return-tips">\r\n <text class="text">请您在审核通过后7天内,将商品发货到指定点</text>\r\n </view>\r\n <view class="info-item">\r\n <text class="label">联系人</text>\r\n <text class="text">张三 1572325612</text>\r\n </view>\r\n <view class="info-item">\r\n <text class="label">发货地址</text>\r\n <text class="text">重庆市江北区建玛特商场5楼</text>\r\n </view>\r\n </view> '),
  35338. vue.createCommentVNode(" 底部按钮 "),
  35339. vue.createElementVNode("view", { class: "btn-box" }, [
  35340. vue.createElementVNode("view", {
  35341. class: "sub-btn",
  35342. onClick: _cache[3] || (_cache[3] = ($event) => $options.submit())
  35343. }, "申请售后")
  35344. ])
  35345. ])
  35346. ]);
  35347. }
  35348. const Pages_orderStoreOrderRefundSubmit = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundSubmit.vue"]]);
  35349. const _sfc_main$O = {
  35350. mixins: [MescrollMixin],
  35351. data() {
  35352. return {
  35353. statusOptions: [],
  35354. tabs: [
  35355. { name: "全部", id: "0" },
  35356. { name: "售后中", id: "1" },
  35357. { name: "已完成", id: "2" }
  35358. ],
  35359. status: 0,
  35360. mescroll: null,
  35361. // 上拉加载的配置
  35362. upOption: {
  35363. onScroll: true,
  35364. use: true,
  35365. // 是否启用上拉加载; 默认true
  35366. page: {
  35367. num: 0,
  35368. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  35369. size: 10
  35370. // 每页数据的数量,默认10
  35371. },
  35372. noMoreSize: 10,
  35373. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  35374. empty: {
  35375. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  35376. tip: "暂无数据"
  35377. }
  35378. },
  35379. // 列表数据
  35380. dataList: []
  35381. };
  35382. },
  35383. onLoad(option) {
  35384. var that = this;
  35385. uni.$on("refreshAfterSales", () => {
  35386. that.mescroll.resetUpScroll();
  35387. });
  35388. this.getDictByKey("sys_after_sales_status");
  35389. },
  35390. methods: {
  35391. getDictByKey(key) {
  35392. var data = { key };
  35393. getDictByKey(data).then(
  35394. (res) => {
  35395. if (res.code == 200) {
  35396. if (key == "sys_after_sales_status") {
  35397. this.statusOptions = res.data;
  35398. }
  35399. }
  35400. },
  35401. (err) => {
  35402. }
  35403. );
  35404. },
  35405. tabChange(item) {
  35406. this.status = item.id;
  35407. this.mescroll.resetUpScroll();
  35408. },
  35409. mescrollInit(mescroll) {
  35410. this.mescroll = mescroll;
  35411. },
  35412. /*下拉刷新的回调 */
  35413. downCallback(mescroll) {
  35414. mescroll.resetUpScroll();
  35415. },
  35416. upCallback(page2) {
  35417. var that = this;
  35418. var data = {
  35419. status: this.status,
  35420. pageNum: page2.num,
  35421. pageSize: page2.size
  35422. };
  35423. getStoreAfterSalesList(data).then((res) => {
  35424. if (res.code == 200) {
  35425. if (page2.num == 1) {
  35426. that.dataList = res.data.list;
  35427. } else {
  35428. that.dataList = that.dataList.concat(res.data.list);
  35429. }
  35430. that.mescroll.endBySize(res.data.list.length, res.data.total);
  35431. } else {
  35432. uni.showToast({
  35433. icon: "none",
  35434. title: "请求失败"
  35435. });
  35436. that.dataList = null;
  35437. that.mescroll.endErr();
  35438. }
  35439. });
  35440. },
  35441. // 查看订单详情
  35442. showDetail(item) {
  35443. uni.navigateTo({
  35444. url: "./storeOrderRefundDetails?id=" + item.id
  35445. });
  35446. }
  35447. }
  35448. };
  35449. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  35450. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  35451. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  35452. return vue.openBlock(), vue.createElementBlock("view", null, [
  35453. vue.createElementVNode("view", { class: "top-fixed" }, [
  35454. vue.createVNode(_component_u_tabs, {
  35455. scrollable: false,
  35456. list: $data.tabs,
  35457. lineColor: "#C39A58",
  35458. onChange: $options.tabChange
  35459. }, null, 8, ["list", "onChange"])
  35460. ]),
  35461. vue.createCommentVNode(" 订单列表 "),
  35462. vue.createVNode(_component_mescroll_body, {
  35463. top: "88rpx",
  35464. bottom: "0",
  35465. ref: "mescrollRef",
  35466. onInit: $options.mescrollInit,
  35467. onDown: $options.downCallback,
  35468. onUp: $options.upCallback,
  35469. down: _ctx.downOption,
  35470. up: $data.upOption
  35471. }, {
  35472. default: vue.withCtx(() => [
  35473. vue.createElementVNode("view", { class: "order-list" }, [
  35474. (vue.openBlock(true), vue.createElementBlock(
  35475. vue.Fragment,
  35476. null,
  35477. vue.renderList($data.dataList, (item, index2) => {
  35478. return vue.openBlock(), vue.createElementBlock("view", {
  35479. key: index2,
  35480. class: "item"
  35481. }, [
  35482. vue.createCommentVNode(" 订单号,状态 "),
  35483. vue.createElementVNode("view", { class: "ordersn-box" }, [
  35484. vue.createElementVNode(
  35485. "view",
  35486. { class: "num" },
  35487. "订单号:" + vue.toDisplayString(item.orderCode),
  35488. 1
  35489. /* TEXT */
  35490. ),
  35491. vue.createElementVNode("view", { class: "status-box" }, [
  35492. vue.createElementVNode(
  35493. "text",
  35494. { class: "text info" },
  35495. vue.toDisplayString(_ctx.$getDictLabelName($data.statusOptions, item.salesStatus)),
  35496. 1
  35497. /* TEXT */
  35498. )
  35499. ])
  35500. ]),
  35501. vue.createCommentVNode(" 药品列表 "),
  35502. vue.createElementVNode("view", { class: "drug-list" }, [
  35503. item != null ? (vue.openBlock(true), vue.createElementBlock(
  35504. vue.Fragment,
  35505. { key: 0 },
  35506. vue.renderList(item.items, (subitem, j) => {
  35507. return vue.openBlock(), vue.createElementBlock("view", {
  35508. key: j,
  35509. class: "drug-item"
  35510. }, [
  35511. vue.createElementVNode("view", { class: "img-box" }, [
  35512. vue.createElementVNode("image", {
  35513. src: JSON.parse(subitem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subitem.jsonInfo).image,
  35514. mode: "aspectFill"
  35515. }, null, 8, ["src"])
  35516. ]),
  35517. vue.createElementVNode("view", { class: "drug-info" }, [
  35518. vue.createElementVNode("view", null, [
  35519. vue.createElementVNode("view", { class: "name-box ellipsis2" }, [
  35520. vue.createCommentVNode(' <view class="tag">处方药</view> '),
  35521. vue.createTextVNode(
  35522. " " + vue.toDisplayString(JSON.parse(subitem.jsonInfo).productName),
  35523. 1
  35524. /* TEXT */
  35525. )
  35526. ]),
  35527. vue.createElementVNode(
  35528. "view",
  35529. { class: "spec" },
  35530. "规格:" + vue.toDisplayString(JSON.parse(subitem.jsonInfo).sku),
  35531. 1
  35532. /* TEXT */
  35533. )
  35534. ]),
  35535. vue.createElementVNode("view", { class: "num-box" }, [
  35536. vue.createElementVNode("view", { class: "price" }, [
  35537. vue.createElementVNode("text", { class: "unit" }, "¥"),
  35538. vue.createElementVNode(
  35539. "text",
  35540. { class: "num" },
  35541. vue.toDisplayString(JSON.parse(subitem.jsonInfo).price.toFixed(2)),
  35542. 1
  35543. /* TEXT */
  35544. )
  35545. ]),
  35546. vue.createElementVNode(
  35547. "view",
  35548. { class: "amount" },
  35549. "x" + vue.toDisplayString(JSON.parse(subitem.jsonInfo).num),
  35550. 1
  35551. /* TEXT */
  35552. )
  35553. ])
  35554. ])
  35555. ]);
  35556. }),
  35557. 128
  35558. /* KEYED_FRAGMENT */
  35559. )) : vue.createCommentVNode("v-if", true),
  35560. vue.createCommentVNode(" 实付金额、按钮 "),
  35561. vue.createElementVNode("view", { class: "bottom-box" }, [
  35562. vue.createElementVNode("view", { class: "amount-paid" }, [
  35563. vue.createElementVNode("text", { class: "label" }, "退款金额:"),
  35564. vue.createElementVNode("view", { class: "price-box" }, [
  35565. vue.createElementVNode("view", { class: "unit" }, "¥"),
  35566. vue.createElementVNode(
  35567. "view",
  35568. { class: "num" },
  35569. vue.toDisplayString(item.refundAmount.toFixed(2)),
  35570. 1
  35571. /* TEXT */
  35572. )
  35573. ])
  35574. ]),
  35575. vue.createElementVNode("view", { class: "btn-box" }, [
  35576. vue.createElementVNode("view", {
  35577. class: "btn pay",
  35578. onClick: ($event) => $options.showDetail(item)
  35579. }, "查看详情", 8, ["onClick"])
  35580. ])
  35581. ])
  35582. ])
  35583. ]);
  35584. }),
  35585. 128
  35586. /* KEYED_FRAGMENT */
  35587. ))
  35588. ])
  35589. ]),
  35590. _: 1
  35591. /* STABLE */
  35592. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  35593. ]);
  35594. }
  35595. const Pages_orderStoreOrderRefundList = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundList.vue"]]);
  35596. const _sfc_main$N = {
  35597. data() {
  35598. return {
  35599. statusOptions: [],
  35600. sales: {},
  35601. items: [],
  35602. order: null,
  35603. salesId: null,
  35604. // 状态栏的高度
  35605. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight
  35606. };
  35607. },
  35608. onLoad(option) {
  35609. this.id = option.id;
  35610. },
  35611. onShow() {
  35612. this.getStoreAfterSalesById();
  35613. this.getDictByKey("sys_after_sales_status");
  35614. },
  35615. methods: {
  35616. getDictByKey(key) {
  35617. var data = { key };
  35618. getDictByKey(data).then(
  35619. (res) => {
  35620. if (res.code == 200) {
  35621. if (key == "sys_after_sales_status") {
  35622. this.statusOptions = res.data;
  35623. }
  35624. }
  35625. },
  35626. (err) => {
  35627. }
  35628. );
  35629. },
  35630. addDeliverySn() {
  35631. uni.navigateTo({
  35632. url: "./storeOrderRefundAddDelivery?id=" + this.id
  35633. });
  35634. },
  35635. revoke() {
  35636. var data = { id: this.id };
  35637. revoke(data).then((res) => {
  35638. if (res.code == 200) {
  35639. uni.showToast({
  35640. icon: "success",
  35641. title: "操作成功"
  35642. });
  35643. setTimeout(function() {
  35644. uni.$emit("refreshAfterSales");
  35645. uni.navigateBack({
  35646. delta: 1
  35647. });
  35648. }, 500);
  35649. } else {
  35650. uni.showToast({
  35651. icon: "none",
  35652. title: res.msg
  35653. });
  35654. }
  35655. });
  35656. },
  35657. getStoreAfterSalesById() {
  35658. var data = {
  35659. id: this.id
  35660. };
  35661. getStoreAfterSalesById(data).then((res) => {
  35662. if (res.code == 200) {
  35663. this.sales = res.sales;
  35664. this.items = res.items;
  35665. this.order = res.order;
  35666. } else {
  35667. uni.showToast({
  35668. icon: "none",
  35669. title: res.msg
  35670. });
  35671. }
  35672. });
  35673. },
  35674. showLogs(status) {
  35675. uni.navigateTo({
  35676. url: "./refundOrderLogs?orderStatus=" + status
  35677. });
  35678. }
  35679. }
  35680. };
  35681. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  35682. return vue.openBlock(), vue.createElementBlock("view", null, [
  35683. vue.createElementVNode("view", { class: "top-cont" }, [
  35684. vue.createElementVNode("view", { class: "bg" }),
  35685. vue.createElementVNode("view", { class: "top-inner" }, [
  35686. vue.createCommentVNode(" 订单状态 "),
  35687. vue.createElementVNode("view", { class: "order-status" }, [
  35688. vue.createCommentVNode(" 处理中 "),
  35689. $data.sales.salesStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  35690. key: 0,
  35691. class: "inner"
  35692. }, [
  35693. vue.createElementVNode("view", { class: "img-box" }, [
  35694. vue.createElementVNode("image", {
  35695. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a4bf17c7fb7342118f5ba52911fbcd84.png",
  35696. mode: ""
  35697. })
  35698. ]),
  35699. vue.createElementVNode("view", { class: "status-box" }, [
  35700. vue.createElementVNode("text", { class: "status" }, "售后中"),
  35701. vue.createElementVNode("text", { class: "desc" }, "请等待客服处理...")
  35702. ])
  35703. ])) : vue.createCommentVNode("v-if", true),
  35704. $data.sales.salesStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  35705. key: 1,
  35706. class: "inner"
  35707. }, [
  35708. vue.createElementVNode("view", { class: "img-box" }, [
  35709. vue.createElementVNode("image", {
  35710. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png",
  35711. mode: ""
  35712. })
  35713. ]),
  35714. vue.createElementVNode("view", { class: "status-box" }, [
  35715. vue.createElementVNode("text", { class: "status" }, "售后取消"),
  35716. vue.createElementVNode("text", { class: "desc" }, "用户已取消售后")
  35717. ])
  35718. ])) : vue.createCommentVNode("v-if", true),
  35719. $data.sales.salesStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  35720. key: 2,
  35721. class: "inner"
  35722. }, [
  35723. vue.createElementVNode("view", { class: "img-box" }, [
  35724. vue.createElementVNode("image", {
  35725. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png",
  35726. mode: ""
  35727. })
  35728. ]),
  35729. vue.createElementVNode("view", { class: "status-box" }, [
  35730. vue.createElementVNode("text", { class: "status" }, "售后取消"),
  35731. vue.createElementVNode("text", { class: "desc" }, "商家已拒绝...")
  35732. ])
  35733. ])) : vue.createCommentVNode("v-if", true),
  35734. vue.createCommentVNode(" 退款成功 "),
  35735. $data.sales.salesStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  35736. key: 3,
  35737. class: "inner"
  35738. }, [
  35739. vue.createElementVNode("view", { class: "img-box" }, [
  35740. vue.createElementVNode("image", {
  35741. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/09e5cf7de97d4ee6aa9f0c778599d760.png",
  35742. mode: ""
  35743. })
  35744. ]),
  35745. vue.createElementVNode("view", { class: "status-box" }, [
  35746. vue.createElementVNode("text", { class: "status" }, "退款成功"),
  35747. vue.createElementVNode("text", { class: "desc" }, "已退款,退款金额将按原支付退回")
  35748. ])
  35749. ])) : vue.createCommentVNode("v-if", true)
  35750. ]),
  35751. vue.createCommentVNode(" 退款信息 "),
  35752. vue.createElementVNode("view", { class: "refund-info" }, [
  35753. vue.createElementVNode("view", { class: "inner" }, [
  35754. vue.createElementVNode("view", { class: "title-box" }, [
  35755. vue.createElementVNode("view", { class: "left" }, [
  35756. vue.createElementVNode("text", { class: "title" }, "退款金额"),
  35757. vue.createElementVNode("view", { class: "price-box" }, [
  35758. vue.createElementVNode("text", { class: "unit" }, "¥"),
  35759. $data.sales.refundAmount != null ? (vue.openBlock(), vue.createElementBlock(
  35760. "text",
  35761. {
  35762. key: 0,
  35763. class: "num"
  35764. },
  35765. vue.toDisplayString($data.sales.refundAmount.toFixed(2)),
  35766. 1
  35767. /* TEXT */
  35768. )) : vue.createCommentVNode("v-if", true)
  35769. ])
  35770. ]),
  35771. vue.createElementVNode("view", { class: "right" }, [
  35772. vue.createElementVNode("text", { class: "text" }, [
  35773. vue.createElementVNode(
  35774. "text",
  35775. { class: "text success" },
  35776. vue.toDisplayString(_ctx.$getDictLabelName($data.statusOptions, $data.sales.salesStatus)),
  35777. 1
  35778. /* TEXT */
  35779. )
  35780. ])
  35781. ])
  35782. ]),
  35783. $data.sales.status >= 1 && $data.sales.refundType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  35784. key: 0,
  35785. class: "refund-item"
  35786. }, [
  35787. vue.createElementVNode(
  35788. "view",
  35789. { class: "text" },
  35790. "收件人:" + vue.toDisplayString($data.sales.consignee),
  35791. 1
  35792. /* TEXT */
  35793. ),
  35794. vue.createElementVNode(
  35795. "view",
  35796. { class: "text" },
  35797. "电话:" + vue.toDisplayString($data.sales.address),
  35798. 1
  35799. /* TEXT */
  35800. ),
  35801. vue.createElementVNode(
  35802. "view",
  35803. { class: "text" },
  35804. "收件地址:" + vue.toDisplayString($data.sales.phoneNumber),
  35805. 1
  35806. /* TEXT */
  35807. )
  35808. ])) : vue.createCommentVNode("v-if", true),
  35809. $data.sales.salesStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  35810. key: 1,
  35811. class: "btn-box"
  35812. }, [
  35813. $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  35814. key: 0,
  35815. class: "btn cancel",
  35816. onClick: _cache[0] || (_cache[0] = ($event) => $options.addDeliverySn())
  35817. }, "填写物流")) : vue.createCommentVNode("v-if", true),
  35818. $data.sales.status == 0 || $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  35819. key: 1,
  35820. class: "btn cancel",
  35821. onClick: _cache[1] || (_cache[1] = ($event) => $options.revoke())
  35822. }, "撤销申请")) : vue.createCommentVNode("v-if", true),
  35823. vue.createCommentVNode(' <view class="btn cancel" @click="showLogs()" >查看进度</view> ')
  35824. ])) : vue.createCommentVNode("v-if", true),
  35825. $data.sales.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  35826. key: 2,
  35827. class: "refund-item"
  35828. }, [
  35829. vue.createElementVNode("view", { class: "text" }, "已提交等待平台审核 ")
  35830. ])) : vue.createCommentVNode("v-if", true),
  35831. $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  35832. key: 3,
  35833. class: "refund-item"
  35834. }, [
  35835. vue.createElementVNode("view", { class: "text" }, "平台已审核,等待用户发货 ")
  35836. ])) : vue.createCommentVNode("v-if", true),
  35837. $data.sales.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  35838. key: 4,
  35839. class: "refund-item"
  35840. }, [
  35841. vue.createElementVNode("view", { class: "text" }, "用户已发货,等待仓库审核 ")
  35842. ])) : vue.createCommentVNode("v-if", true),
  35843. $data.sales.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  35844. key: 5,
  35845. class: "refund-item"
  35846. }, [
  35847. vue.createElementVNode("view", { class: "text" }, "财务审核 ")
  35848. ])) : vue.createCommentVNode("v-if", true),
  35849. $data.sales.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  35850. key: 6,
  35851. class: "refund-item"
  35852. }, [
  35853. vue.createElementVNode("view", { class: "text" }, "已完成 ")
  35854. ])) : vue.createCommentVNode("v-if", true)
  35855. ])
  35856. ]),
  35857. vue.createElementVNode("view", { class: "content" }, [
  35858. vue.createCommentVNode(" 退货信息 "),
  35859. vue.createElementVNode("view", { class: "return-info" }, [
  35860. vue.createCommentVNode(' <view class="title-box">\r\n <text class="label">退货信息</text>\r\n <text class="ret-num">共{{items.length}}件</text>\r\n </view> '),
  35861. vue.createCommentVNode(" 退货列表 "),
  35862. vue.createElementVNode("view", { class: "goods-list" }, [
  35863. $data.sales != null ? (vue.openBlock(true), vue.createElementBlock(
  35864. vue.Fragment,
  35865. { key: 0 },
  35866. vue.renderList($data.items, (item, index2) => {
  35867. return vue.openBlock(), vue.createElementBlock("view", {
  35868. key: index2,
  35869. class: "item"
  35870. }, [
  35871. vue.createElementVNode("view", { class: "img-box" }, [
  35872. vue.createElementVNode("image", {
  35873. src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
  35874. mode: "aspectFill"
  35875. }, null, 8, ["src"])
  35876. ]),
  35877. vue.createElementVNode("view", { class: "info-box" }, [
  35878. vue.createElementVNode("view", null, [
  35879. vue.createElementVNode(
  35880. "view",
  35881. { class: "title ellipsis2" },
  35882. vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
  35883. 1
  35884. /* TEXT */
  35885. ),
  35886. vue.createElementVNode(
  35887. "view",
  35888. { class: "spec" },
  35889. "规格:" + vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
  35890. 1
  35891. /* TEXT */
  35892. )
  35893. ]),
  35894. vue.createElementVNode("view", { class: "price-num" }, [
  35895. vue.createElementVNode("view", { class: "price" }, [
  35896. vue.createElementVNode("text", { class: "unit" }, "¥"),
  35897. vue.createElementVNode(
  35898. "text",
  35899. { class: "num" },
  35900. vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)),
  35901. 1
  35902. /* TEXT */
  35903. )
  35904. ]),
  35905. vue.createElementVNode(
  35906. "view",
  35907. { class: "num" },
  35908. "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
  35909. 1
  35910. /* TEXT */
  35911. )
  35912. ])
  35913. ])
  35914. ]);
  35915. }),
  35916. 128
  35917. /* KEYED_FRAGMENT */
  35918. )) : vue.createCommentVNode("v-if", true),
  35919. vue.createCommentVNode(" 详细信息 "),
  35920. vue.createElementVNode("view", { class: "refund-det-info" }, [
  35921. vue.createElementVNode("view", { class: "det-item" }, [
  35922. vue.createElementVNode("text", { class: "label" }, "退货原因"),
  35923. vue.createElementVNode(
  35924. "text",
  35925. { class: "text" },
  35926. vue.toDisplayString($data.sales.reasons),
  35927. 1
  35928. /* TEXT */
  35929. )
  35930. ]),
  35931. vue.createElementVNode("view", { class: "det-item" }, [
  35932. vue.createElementVNode("text", { class: "label" }, "退货说明"),
  35933. vue.createElementVNode(
  35934. "text",
  35935. { class: "text" },
  35936. vue.toDisplayString($data.sales.explains),
  35937. 1
  35938. /* TEXT */
  35939. )
  35940. ]),
  35941. vue.createElementVNode("view", { class: "det-item" }, [
  35942. vue.createElementVNode("text", { class: "label" }, "退款金额"),
  35943. $data.sales.refundAmount != null ? (vue.openBlock(), vue.createElementBlock(
  35944. "text",
  35945. {
  35946. key: 0,
  35947. class: "text"
  35948. },
  35949. "¥" + vue.toDisplayString($data.sales.refundAmount.toFixed(2)),
  35950. 1
  35951. /* TEXT */
  35952. )) : vue.createCommentVNode("v-if", true)
  35953. ]),
  35954. vue.createElementVNode("view", { class: "det-item" }, [
  35955. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  35956. vue.createElementVNode(
  35957. "text",
  35958. { class: "text" },
  35959. vue.toDisplayString($data.order.orderCode),
  35960. 1
  35961. /* TEXT */
  35962. )
  35963. ]),
  35964. vue.createElementVNode("view", { class: "det-item" }, [
  35965. vue.createElementVNode("text", { class: "label" }, "申请时间"),
  35966. vue.createElementVNode(
  35967. "text",
  35968. { class: "text" },
  35969. vue.toDisplayString($data.sales.createTime),
  35970. 1
  35971. /* TEXT */
  35972. )
  35973. ])
  35974. ])
  35975. ])
  35976. ])
  35977. ])
  35978. ])
  35979. ])
  35980. ]);
  35981. }
  35982. const Pages_orderStoreOrderRefundDetails = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundDetails.vue"]]);
  35983. const _sfc_main$M = {
  35984. data() {
  35985. return {
  35986. form: {
  35987. salesId: null,
  35988. deliverySn: null,
  35989. deliveryName: null
  35990. }
  35991. };
  35992. },
  35993. onLoad(option) {
  35994. this.form.id = option.id;
  35995. },
  35996. methods: {
  35997. submit() {
  35998. if (this.form.deliveryName == null) {
  35999. uni.showToast({
  36000. icon: "none",
  36001. title: "请输入快递公司"
  36002. });
  36003. return;
  36004. }
  36005. if (this.form.deliverySn == null) {
  36006. uni.showToast({
  36007. icon: "none",
  36008. title: "请输入快递单号"
  36009. });
  36010. return;
  36011. }
  36012. addDelivery(this.form).then(
  36013. (res) => {
  36014. if (res.code == 200) {
  36015. uni.showToast({
  36016. icon: "success",
  36017. title: "提交成功"
  36018. });
  36019. uni.navigateBack({
  36020. delta: 1
  36021. });
  36022. } else {
  36023. uni.showToast({
  36024. icon: "none",
  36025. title: res.msg
  36026. });
  36027. }
  36028. },
  36029. (rej) => {
  36030. }
  36031. );
  36032. }
  36033. }
  36034. };
  36035. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  36036. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  36037. vue.createElementVNode("view", { class: "inner" }, [
  36038. vue.createElementVNode("view", { class: "form-box" }, [
  36039. vue.createElementVNode("view", { class: "form-item" }, [
  36040. vue.createElementVNode("text", { class: "label" }, "快递公司"),
  36041. vue.withDirectives(vue.createElementVNode(
  36042. "input",
  36043. {
  36044. type: "text",
  36045. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.deliveryName = $event),
  36046. placeholder: "请输入物流公司",
  36047. "placeholder-class": "form-input"
  36048. },
  36049. null,
  36050. 512
  36051. /* NEED_PATCH */
  36052. ), [
  36053. [vue.vModelText, $data.form.deliveryName]
  36054. ])
  36055. ]),
  36056. vue.createElementVNode("view", { class: "form-item" }, [
  36057. vue.createElementVNode("text", { class: "label" }, "快递单号"),
  36058. vue.withDirectives(vue.createElementVNode(
  36059. "input",
  36060. {
  36061. type: "text",
  36062. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.deliverySn = $event),
  36063. placeholder: "请输入物流单号",
  36064. "placeholder-class": "form-input"
  36065. },
  36066. null,
  36067. 512
  36068. /* NEED_PATCH */
  36069. ), [
  36070. [vue.vModelText, $data.form.deliverySn]
  36071. ])
  36072. ])
  36073. ])
  36074. ]),
  36075. vue.createElementVNode("view", { class: "btn-box" }, [
  36076. vue.createElementVNode("view", {
  36077. class: "sub-btn",
  36078. onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
  36079. }, "提交")
  36080. ])
  36081. ]);
  36082. }
  36083. const Pages_orderStoreOrderRefundAddDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundAddDelivery.vue"]]);
  36084. const _sfc_main$L = {
  36085. data() {
  36086. return {
  36087. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  36088. orderId: null,
  36089. order: null
  36090. };
  36091. },
  36092. onLoad(option) {
  36093. this.orderId = option.orderId;
  36094. },
  36095. onShow() {
  36096. this.getPackageOrderById();
  36097. },
  36098. methods: {
  36099. leftClick() {
  36100. uni.showToast({
  36101. title: "请帮好友支付",
  36102. icon: "none"
  36103. });
  36104. },
  36105. copyTest(text) {
  36106. uni.setClipboardData({
  36107. data: text,
  36108. success: () => {
  36109. uni.showToast({
  36110. title: "内容已成功复制到剪切板",
  36111. icon: "none"
  36112. });
  36113. }
  36114. });
  36115. },
  36116. getPackageOrderById() {
  36117. var data = { orderId: this.orderId };
  36118. var that = this;
  36119. uni.showLoading();
  36120. getSharePackageOrderById(data).then(
  36121. (res) => {
  36122. if (res.code == 200) {
  36123. uni.hideLoading();
  36124. that.order = res.order;
  36125. } else {
  36126. uni.showToast({
  36127. icon: "none",
  36128. title: res.msg
  36129. });
  36130. }
  36131. },
  36132. (rej) => {
  36133. }
  36134. );
  36135. },
  36136. payOrder() {
  36137. var data = {
  36138. orderId: this.orderId
  36139. };
  36140. var that = this;
  36141. uni.showLoading();
  36142. payment$2(data).then(
  36143. (res) => {
  36144. if (res.code == 200) {
  36145. if (res.isPay == 0) {
  36146. if (res.type == "tz") {
  36147. uni.setStorageSync("ztPayUrl", res.data.body.url);
  36148. uni.navigateTo({
  36149. url: "/pages_order/tzPay"
  36150. });
  36151. }
  36152. if (res.type == "yb") {
  36153. var payData = JSON.parse(res.data.pay_info);
  36154. formatAppLog("log", "at pages_order/packageOtherPayment.vue:116", payData);
  36155. uni.requestPayment({
  36156. provider: "wxpay",
  36157. timeStamp: payData.timeStamp,
  36158. nonceStr: payData.nonceStr,
  36159. package: payData.package,
  36160. signType: payData.signType,
  36161. paySign: payData.paySign,
  36162. success: function(res2) {
  36163. formatAppLog("log", "at pages_order/packageOtherPayment.vue:125", that.order.orderId);
  36164. uni.hideLoading();
  36165. uni.redirectTo({
  36166. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36167. });
  36168. },
  36169. fail: function(err) {
  36170. uni.showToast({
  36171. icon: "none",
  36172. title: "fail:" + JSON.stringify(err)
  36173. });
  36174. uni.hideLoading();
  36175. }
  36176. });
  36177. } else if (res.type == "wx") {
  36178. uni.requestPayment({
  36179. provider: "wxpay",
  36180. timeStamp: res.data.timeStamp,
  36181. nonceStr: res.data.nonceStr,
  36182. package: res.data.packageValue,
  36183. signType: res.data.signType,
  36184. paySign: res.data.paySign,
  36185. success: function(res2) {
  36186. formatAppLog("log", "at pages_order/packageOtherPayment.vue:152", that.order.orderId);
  36187. uni.hideLoading();
  36188. uni.redirectTo({
  36189. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36190. });
  36191. },
  36192. fail: function(err) {
  36193. uni.showToast({
  36194. icon: "none",
  36195. title: "fail:" + JSON.stringify(err)
  36196. });
  36197. uni.hideLoading();
  36198. }
  36199. });
  36200. }
  36201. } else {
  36202. uni.hideLoading();
  36203. uni.redirectTo({
  36204. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36205. });
  36206. }
  36207. } else {
  36208. uni.showToast({
  36209. icon: "none",
  36210. title: res.msg
  36211. });
  36212. }
  36213. },
  36214. (rej) => {
  36215. }
  36216. );
  36217. }
  36218. }
  36219. };
  36220. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  36221. const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
  36222. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  36223. vue.createElementVNode("view", null, [
  36224. vue.createVNode(_component_u_navbar, {
  36225. title: "亲友代付",
  36226. onLeftClick: $options.leftClick
  36227. }, null, 8, ["onLeftClick"])
  36228. ]),
  36229. vue.createElementVNode("view", { class: "inner" }, [
  36230. vue.createElementVNode(
  36231. "view",
  36232. {
  36233. class: "status_bar",
  36234. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  36235. },
  36236. null,
  36237. 4
  36238. /* STYLE */
  36239. ),
  36240. vue.createCommentVNode(" 时间、价格 "),
  36241. vue.createElementVNode("view", { class: "time-price" }, [
  36242. vue.createElementVNode("text", { class: "time" }, "请帮好友支付"),
  36243. vue.createElementVNode("view", { class: "price-box" }, [
  36244. vue.createElementVNode("text", { class: "unit" }, "¥"),
  36245. $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
  36246. "text",
  36247. {
  36248. key: 0,
  36249. class: "num"
  36250. },
  36251. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  36252. 1
  36253. /* TEXT */
  36254. )) : vue.createCommentVNode("v-if", true)
  36255. ])
  36256. ]),
  36257. vue.createCommentVNode(" 订单详情查看 "),
  36258. vue.createElementVNode("view", { class: "order-info" }, [
  36259. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  36260. vue.createElementVNode("view", { class: "item" }, [
  36261. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  36262. vue.createElementVNode("view", { class: "sn-box" }, [
  36263. vue.createElementVNode(
  36264. "text",
  36265. { class: "text" },
  36266. vue.toDisplayString($data.order.orderSn),
  36267. 1
  36268. /* TEXT */
  36269. ),
  36270. vue.createElementVNode("view", {
  36271. class: "copy-btn",
  36272. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
  36273. }, "复制")
  36274. ])
  36275. ]),
  36276. vue.createElementVNode("view", { class: "item" }, [
  36277. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  36278. vue.createElementVNode(
  36279. "text",
  36280. { class: "text" },
  36281. vue.toDisplayString($data.order.createTime),
  36282. 1
  36283. /* TEXT */
  36284. )
  36285. ])
  36286. ])
  36287. ]),
  36288. vue.createElementVNode("view", { class: "btn-box" }, [
  36289. vue.createElementVNode("view", {
  36290. class: "btn",
  36291. onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
  36292. }, "帮TA支付")
  36293. ])
  36294. ]);
  36295. }
  36296. const Pages_orderPackageOtherPayment = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOtherPayment.vue"]]);
  36297. const _sfc_main$K = {
  36298. data() {
  36299. return {
  36300. payMethod: null,
  36301. orderId: null,
  36302. order: null
  36303. };
  36304. },
  36305. onLoad(option) {
  36306. this.orderId = option.orderId;
  36307. this.payMethod = option.payMethod;
  36308. },
  36309. onShow() {
  36310. this.getPackageOrderById();
  36311. },
  36312. onShareAppMessage(res) {
  36313. var that = this;
  36314. if (this.$isLogin()) {
  36315. return {
  36316. title: "亲友代付",
  36317. path: "/pages_order/packageOtherPayment?orderId=" + that.orderId,
  36318. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  36319. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  36320. };
  36321. }
  36322. },
  36323. methods: {
  36324. copyTest(text) {
  36325. uni.setClipboardData({
  36326. data: text,
  36327. success: () => {
  36328. uni.showToast({
  36329. title: "内容已成功复制到剪切板",
  36330. icon: "none"
  36331. });
  36332. }
  36333. });
  36334. },
  36335. getPackageOrderById() {
  36336. var data = { orderId: this.orderId };
  36337. formatAppLog("log", "at pages_order/packagePayment.vue:85", data);
  36338. getPackageOrderById(data).then(
  36339. (res) => {
  36340. if (res.code == 200) {
  36341. this.order = res.order;
  36342. if (this.payMethod != null && this.payMethod == "app") {
  36343. this.payOrder();
  36344. }
  36345. }
  36346. },
  36347. (rej) => {
  36348. }
  36349. );
  36350. },
  36351. payOrder() {
  36352. var data = {
  36353. orderId: this.orderId
  36354. };
  36355. var that = this;
  36356. uni.showLoading();
  36357. payment$2(data).then(
  36358. (res) => {
  36359. if (res.code == 200) {
  36360. if (res.isPay == 0) {
  36361. if (res.type == "tz") {
  36362. uni.setStorageSync("ztPayUrl", res.data.body.url);
  36363. uni.navigateTo({
  36364. url: "/pages_order/tzPay"
  36365. });
  36366. }
  36367. if (res.type == "yb") {
  36368. var payData = JSON.parse(res.data.pay_info);
  36369. formatAppLog("log", "at pages_order/packagePayment.vue:118", payData);
  36370. uni.requestPayment({
  36371. provider: "wxpay",
  36372. timeStamp: payData.timeStamp,
  36373. nonceStr: payData.nonceStr,
  36374. package: payData.package,
  36375. signType: payData.signType,
  36376. paySign: payData.paySign,
  36377. success: function(res2) {
  36378. formatAppLog("log", "at pages_order/packagePayment.vue:127", that.order.orderId);
  36379. uni.hideLoading();
  36380. uni.redirectTo({
  36381. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36382. });
  36383. },
  36384. fail: function(err) {
  36385. uni.showToast({
  36386. icon: "none",
  36387. title: "fail:" + JSON.stringify(err)
  36388. });
  36389. uni.hideLoading();
  36390. }
  36391. });
  36392. } else if (res.type == "hf") {
  36393. var payData = JSON.parse(res.data.pay_info);
  36394. formatAppLog("log", "at pages_order/packagePayment.vue:147", payData);
  36395. uni.requestPayment({
  36396. provider: "wxpay",
  36397. timeStamp: payData.timeStamp,
  36398. nonceStr: payData.nonceStr,
  36399. package: payData.package,
  36400. signType: payData.signType,
  36401. paySign: payData.paySign,
  36402. success: function(res2) {
  36403. formatAppLog("log", "at pages_order/packagePayment.vue:156", that.order.orderId);
  36404. uni.hideLoading();
  36405. uni.redirectTo({
  36406. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36407. });
  36408. },
  36409. fail: function(err) {
  36410. uni.showToast({
  36411. icon: "none",
  36412. title: "fail:" + JSON.stringify(err)
  36413. });
  36414. uni.hideLoading();
  36415. }
  36416. });
  36417. } else if (res.type == "wx") {
  36418. uni.requestPayment({
  36419. provider: "wxpay",
  36420. timeStamp: res.data.timeStamp,
  36421. nonceStr: res.data.nonceStr,
  36422. package: res.data.packageValue,
  36423. signType: res.data.signType,
  36424. paySign: res.data.paySign,
  36425. success: function(res2) {
  36426. formatAppLog("log", "at pages_order/packagePayment.vue:183", that.order.orderId);
  36427. uni.hideLoading();
  36428. uni.redirectTo({
  36429. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36430. });
  36431. },
  36432. fail: function(err) {
  36433. uni.showToast({
  36434. icon: "none",
  36435. title: "fail:" + JSON.stringify(err)
  36436. });
  36437. uni.hideLoading();
  36438. }
  36439. });
  36440. }
  36441. } else {
  36442. uni.hideLoading();
  36443. uni.redirectTo({
  36444. url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
  36445. });
  36446. }
  36447. } else {
  36448. uni.showToast({
  36449. icon: "none",
  36450. title: res.msg
  36451. });
  36452. }
  36453. },
  36454. (rej) => {
  36455. }
  36456. );
  36457. }
  36458. }
  36459. };
  36460. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  36461. return vue.openBlock(), vue.createElementBlock("view", null, [
  36462. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  36463. key: 0,
  36464. class: "inner-box"
  36465. }, [
  36466. vue.createCommentVNode(" 时间、价格 "),
  36467. vue.createElementVNode("view", { class: "time-price" }, [
  36468. vue.createElementVNode("text", { class: "time" }, "订单金额"),
  36469. vue.createElementVNode("view", { class: "price-box" }, [
  36470. vue.createElementVNode("text", { class: "unit" }, "¥"),
  36471. vue.createElementVNode(
  36472. "text",
  36473. { class: "num" },
  36474. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  36475. 1
  36476. /* TEXT */
  36477. )
  36478. ])
  36479. ]),
  36480. vue.createCommentVNode(" 订单详情查看 "),
  36481. vue.createElementVNode("view", { class: "order-info" }, [
  36482. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  36483. vue.createElementVNode("view", { class: "item" }, [
  36484. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  36485. vue.createElementVNode("view", { class: "sn-box" }, [
  36486. vue.createElementVNode(
  36487. "text",
  36488. { class: "text" },
  36489. vue.toDisplayString($data.order.orderSn),
  36490. 1
  36491. /* TEXT */
  36492. ),
  36493. vue.createElementVNode("view", {
  36494. class: "copy-btn",
  36495. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
  36496. }, "复制")
  36497. ])
  36498. ]),
  36499. vue.createElementVNode("view", { class: "item" }, [
  36500. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  36501. vue.createElementVNode(
  36502. "text",
  36503. { class: "text" },
  36504. vue.toDisplayString($data.order.createTime),
  36505. 1
  36506. /* TEXT */
  36507. )
  36508. ])
  36509. ])
  36510. ])) : vue.createCommentVNode("v-if", true),
  36511. vue.createCommentVNode(" 底部按钮 "),
  36512. vue.createElementVNode("view", { class: "btn-box" }, [
  36513. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  36514. key: 0,
  36515. class: "btn",
  36516. onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
  36517. }, "立即支付")) : vue.createCommentVNode("v-if", true),
  36518. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  36519. key: 1,
  36520. class: "btn1"
  36521. }, [
  36522. vue.createTextVNode(" 亲友代付 "),
  36523. vue.createElementVNode("button", {
  36524. class: "share-btn",
  36525. "data-name": "shareBtn",
  36526. "open-type": "share"
  36527. })
  36528. ])) : vue.createCommentVNode("v-if", true)
  36529. ])
  36530. ]);
  36531. }
  36532. const Pages_orderPackagePayment = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packagePayment.vue"]]);
  36533. const props$3 = {
  36534. props: {
  36535. // 是否展示工具条
  36536. show: {
  36537. type: Boolean,
  36538. default: props$y.toolbar.show
  36539. },
  36540. // 取消按钮的文字
  36541. cancelText: {
  36542. type: String,
  36543. default: props$y.toolbar.cancelText
  36544. },
  36545. // 确认按钮的文字
  36546. confirmText: {
  36547. type: String,
  36548. default: props$y.toolbar.confirmText
  36549. },
  36550. // 取消按钮的颜色
  36551. cancelColor: {
  36552. type: String,
  36553. default: props$y.toolbar.cancelColor
  36554. },
  36555. // 确认按钮的颜色
  36556. confirmColor: {
  36557. type: String,
  36558. default: props$y.toolbar.confirmColor
  36559. },
  36560. // 标题文字
  36561. title: {
  36562. type: String,
  36563. default: props$y.toolbar.title
  36564. }
  36565. }
  36566. };
  36567. const _sfc_main$J = {
  36568. name: "u-toolbar",
  36569. mixins: [mpMixin, mixin, props$3],
  36570. methods: {
  36571. // 点击取消按钮
  36572. cancel() {
  36573. this.$emit("cancel");
  36574. },
  36575. // 点击确定按钮
  36576. confirm() {
  36577. this.$emit("confirm");
  36578. }
  36579. }
  36580. };
  36581. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  36582. return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
  36583. "view",
  36584. {
  36585. key: 0,
  36586. class: "u-toolbar",
  36587. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
  36588. },
  36589. [
  36590. vue.createElementVNode("view", {
  36591. class: "u-toolbar__cancel__wrapper",
  36592. "hover-class": "u-hover-class"
  36593. }, [
  36594. vue.createElementVNode(
  36595. "text",
  36596. {
  36597. class: "u-toolbar__wrapper__cancel",
  36598. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  36599. style: vue.normalizeStyle({
  36600. color: _ctx.cancelColor
  36601. })
  36602. },
  36603. vue.toDisplayString(_ctx.cancelText),
  36604. 5
  36605. /* TEXT, STYLE */
  36606. )
  36607. ]),
  36608. _ctx.title ? (vue.openBlock(), vue.createElementBlock(
  36609. "text",
  36610. {
  36611. key: 0,
  36612. class: "u-toolbar__title u-line-1"
  36613. },
  36614. vue.toDisplayString(_ctx.title),
  36615. 1
  36616. /* TEXT */
  36617. )) : vue.createCommentVNode("v-if", true),
  36618. vue.createElementVNode("view", {
  36619. class: "u-toolbar__confirm__wrapper",
  36620. "hover-class": "u-hover-class"
  36621. }, [
  36622. vue.createElementVNode(
  36623. "text",
  36624. {
  36625. class: "u-toolbar__wrapper__confirm",
  36626. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  36627. style: vue.normalizeStyle({
  36628. color: _ctx.confirmColor
  36629. })
  36630. },
  36631. vue.toDisplayString(_ctx.confirmText),
  36632. 5
  36633. /* TEXT, STYLE */
  36634. )
  36635. ])
  36636. ],
  36637. 32
  36638. /* NEED_HYDRATION */
  36639. )) : vue.createCommentVNode("v-if", true);
  36640. }
  36641. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-eadae74e"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]);
  36642. const props$2 = {
  36643. props: {
  36644. // 是否展示picker弹窗
  36645. show: {
  36646. type: Boolean,
  36647. default: props$y.picker.show
  36648. },
  36649. // 是否展示顶部的操作栏
  36650. showToolbar: {
  36651. type: Boolean,
  36652. default: props$y.picker.showToolbar
  36653. },
  36654. // 顶部标题
  36655. title: {
  36656. type: String,
  36657. default: props$y.picker.title
  36658. },
  36659. // 对象数组,设置每一列的数据
  36660. columns: {
  36661. type: Array,
  36662. default: props$y.picker.columns
  36663. },
  36664. // 是否显示加载中状态
  36665. loading: {
  36666. type: Boolean,
  36667. default: props$y.picker.loading
  36668. },
  36669. // 各列中,单个选项的高度
  36670. itemHeight: {
  36671. type: [String, Number],
  36672. default: props$y.picker.itemHeight
  36673. },
  36674. // 取消按钮的文字
  36675. cancelText: {
  36676. type: String,
  36677. default: props$y.picker.cancelText
  36678. },
  36679. // 确认按钮的文字
  36680. confirmText: {
  36681. type: String,
  36682. default: props$y.picker.confirmText
  36683. },
  36684. // 取消按钮的颜色
  36685. cancelColor: {
  36686. type: String,
  36687. default: props$y.picker.cancelColor
  36688. },
  36689. // 确认按钮的颜色
  36690. confirmColor: {
  36691. type: String,
  36692. default: props$y.picker.confirmColor
  36693. },
  36694. // 每列中可见选项的数量
  36695. visibleItemCount: {
  36696. type: [String, Number],
  36697. default: props$y.picker.visibleItemCount
  36698. },
  36699. // 选项对象中,需要展示的属性键名
  36700. keyName: {
  36701. type: String,
  36702. default: props$y.picker.keyName
  36703. },
  36704. // 是否允许点击遮罩关闭选择器
  36705. closeOnClickOverlay: {
  36706. type: Boolean,
  36707. default: props$y.picker.closeOnClickOverlay
  36708. },
  36709. // 各列的默认索引
  36710. defaultIndex: {
  36711. type: Array,
  36712. default: props$y.picker.defaultIndex
  36713. },
  36714. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  36715. immediateChange: {
  36716. type: Boolean,
  36717. default: props$y.picker.immediateChange
  36718. }
  36719. }
  36720. };
  36721. const _sfc_main$I = {
  36722. name: "u-picker",
  36723. mixins: [mpMixin, mixin, props$2],
  36724. data() {
  36725. return {
  36726. // 上一次选择的列索引
  36727. lastIndex: [],
  36728. // 索引值 ,对应picker-view的value
  36729. innerIndex: [],
  36730. // 各列的值
  36731. innerColumns: [],
  36732. // 上一次的变化列索引
  36733. columnIndex: 0
  36734. };
  36735. },
  36736. watch: {
  36737. // 监听默认索引的变化,重新设置对应的值
  36738. defaultIndex: {
  36739. immediate: true,
  36740. handler(n) {
  36741. this.setIndexs(n, true);
  36742. }
  36743. },
  36744. // 监听columns参数的变化
  36745. columns: {
  36746. immediate: true,
  36747. deep: true,
  36748. handler(n) {
  36749. this.setColumns(n);
  36750. }
  36751. }
  36752. },
  36753. emits: ["close", "cancel", "confirm", "change"],
  36754. methods: {
  36755. // 获取item需要显示的文字,判别为对象还是文本
  36756. getItemText(item) {
  36757. if (uni.$u.test.object(item)) {
  36758. return item[this.keyName];
  36759. } else {
  36760. return item;
  36761. }
  36762. },
  36763. // 关闭选择器
  36764. closeHandler() {
  36765. if (this.closeOnClickOverlay) {
  36766. this.$emit("close");
  36767. }
  36768. },
  36769. // 点击工具栏的取消按钮
  36770. cancel() {
  36771. this.$emit("cancel");
  36772. },
  36773. // 点击工具栏的确定按钮
  36774. confirm() {
  36775. this.$emit("confirm", {
  36776. indexs: this.innerIndex,
  36777. value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
  36778. values: this.innerColumns
  36779. });
  36780. },
  36781. // 选择器某一列的数据发生变化时触发
  36782. changeHandler(e) {
  36783. const {
  36784. value: value2
  36785. } = e.detail;
  36786. let index2 = 0, columnIndex = 0;
  36787. for (let i = 0; i < value2.length; i++) {
  36788. let item = value2[i];
  36789. if (item !== (this.lastIndex[i] || 0)) {
  36790. columnIndex = i;
  36791. index2 = item;
  36792. break;
  36793. }
  36794. }
  36795. this.columnIndex = columnIndex;
  36796. const values = this.innerColumns;
  36797. this.setLastIndex(value2);
  36798. this.setIndexs(value2);
  36799. this.$emit("change", {
  36800. // 微信小程序不能传递this,会因为循环引用而报错
  36801. picker: this,
  36802. value: this.innerColumns.map((item, index3) => item[value2[index3]]),
  36803. index: index2,
  36804. indexs: value2,
  36805. // values为当前变化列的数组内容
  36806. values,
  36807. columnIndex
  36808. });
  36809. },
  36810. // 设置index索引,此方法可被外部调用设置
  36811. setIndexs(index2, setLastIndex) {
  36812. this.innerIndex = uni.$u.deepClone(index2);
  36813. if (setLastIndex) {
  36814. this.setLastIndex(index2);
  36815. }
  36816. },
  36817. // 记录上一次的各列索引位置
  36818. setLastIndex(index2) {
  36819. this.lastIndex = uni.$u.deepClone(index2);
  36820. },
  36821. // 设置对应列选项的所有值
  36822. setColumnValues(columnIndex, values) {
  36823. this.innerColumns.splice(columnIndex, 1, values);
  36824. let tmpIndex = uni.$u.deepClone(this.innerIndex);
  36825. for (let i = 0; i < this.innerColumns.length; i++) {
  36826. if (i > this.columnIndex) {
  36827. tmpIndex[i] = 0;
  36828. }
  36829. }
  36830. this.setIndexs(tmpIndex);
  36831. },
  36832. // 获取对应列的所有选项
  36833. getColumnValues(columnIndex) {
  36834. (async () => {
  36835. await uni.$u.sleep();
  36836. })();
  36837. return this.innerColumns[columnIndex];
  36838. },
  36839. // 设置整体各列的columns的值
  36840. setColumns(columns) {
  36841. formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
  36842. this.innerColumns = uni.$u.deepClone(columns);
  36843. if (this.innerIndex.length === 0) {
  36844. this.innerIndex = new Array(columns.length).fill(0);
  36845. }
  36846. },
  36847. // 获取各列选中值对应的索引
  36848. getIndexs() {
  36849. return this.innerIndex;
  36850. },
  36851. // 获取各列选中的值
  36852. getValues() {
  36853. (async () => {
  36854. await uni.$u.sleep();
  36855. })();
  36856. return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
  36857. }
  36858. }
  36859. };
  36860. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  36861. const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$1);
  36862. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
  36863. const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
  36864. return vue.openBlock(), vue.createBlock(_component_u_popup, {
  36865. show: _ctx.show,
  36866. onClose: $options.closeHandler
  36867. }, {
  36868. default: vue.withCtx(() => [
  36869. vue.createElementVNode("view", { class: "u-picker" }, [
  36870. _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
  36871. key: 0,
  36872. cancelColor: _ctx.cancelColor,
  36873. confirmColor: _ctx.confirmColor,
  36874. cancelText: _ctx.cancelText,
  36875. confirmText: _ctx.confirmText,
  36876. title: _ctx.title,
  36877. onCancel: $options.cancel,
  36878. onConfirm: $options.confirm
  36879. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
  36880. vue.createElementVNode("picker-view", {
  36881. class: "u-picker__view",
  36882. indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
  36883. value: $data.innerIndex,
  36884. immediateChange: _ctx.immediateChange,
  36885. style: vue.normalizeStyle({
  36886. height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
  36887. }),
  36888. onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
  36889. }, [
  36890. (vue.openBlock(true), vue.createElementBlock(
  36891. vue.Fragment,
  36892. null,
  36893. vue.renderList($data.innerColumns, (item, index2) => {
  36894. return vue.openBlock(), vue.createElementBlock("picker-view-column", {
  36895. key: index2,
  36896. class: "u-picker__view__column"
  36897. }, [
  36898. _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
  36899. vue.Fragment,
  36900. { key: 0 },
  36901. vue.renderList(item, (item1, index1) => {
  36902. return vue.openBlock(), vue.createElementBlock(
  36903. "text",
  36904. {
  36905. class: "u-picker__view__column__item u-line-1",
  36906. key: index1,
  36907. style: vue.normalizeStyle({
  36908. height: _ctx.$u.addUnit(_ctx.itemHeight),
  36909. lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
  36910. fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
  36911. })
  36912. },
  36913. vue.toDisplayString($options.getItemText(item1)),
  36914. 5
  36915. /* TEXT, STYLE */
  36916. );
  36917. }),
  36918. 128
  36919. /* KEYED_FRAGMENT */
  36920. )) : vue.createCommentVNode("v-if", true)
  36921. ]);
  36922. }),
  36923. 128
  36924. /* KEYED_FRAGMENT */
  36925. ))
  36926. ], 44, ["indicatorStyle", "value", "immediateChange"]),
  36927. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  36928. key: 1,
  36929. class: "u-picker--loading"
  36930. }, [
  36931. vue.createVNode(_component_u_loading_icon, { mode: "circle" })
  36932. ])) : vue.createCommentVNode("v-if", true)
  36933. ])
  36934. ]),
  36935. _: 1
  36936. /* STABLE */
  36937. }, 8, ["show", "onClose"]);
  36938. }
  36939. const __easycom_10 = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-91b05052"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]);
  36940. const _sfc_main$H = {
  36941. data() {
  36942. return {
  36943. cityIndex1: 0,
  36944. cityIndex2: 0,
  36945. allCitys: [],
  36946. citys: [[], [], []],
  36947. cityShow: false,
  36948. depts: [[]],
  36949. deptShow: false,
  36950. hospitals: [[]],
  36951. hospitalShow: false,
  36952. positions: [[]],
  36953. positionShow: false,
  36954. fileList1: [],
  36955. fileList2: [],
  36956. fileList3: [],
  36957. fileList4: [],
  36958. checked: 0,
  36959. form: {
  36960. sex: "1"
  36961. },
  36962. rules: {
  36963. doctorName: [
  36964. {
  36965. required: true,
  36966. message: "请输入医生姓名"
  36967. }
  36968. ],
  36969. idCard: [
  36970. {
  36971. required: true,
  36972. message: "请输入身份证号",
  36973. // 可以单个或者同时写两个触发验证方式
  36974. trigger: ["change", "blur"]
  36975. }
  36976. ],
  36977. deptId: [
  36978. {
  36979. required: true,
  36980. message: "请选择部门"
  36981. }
  36982. ],
  36983. hospitalId: [
  36984. {
  36985. required: true,
  36986. message: "请选择医院"
  36987. }
  36988. ],
  36989. position: [
  36990. {
  36991. required: true,
  36992. message: "请选择职务"
  36993. }
  36994. ],
  36995. cityIds: [
  36996. {
  36997. required: true,
  36998. message: "请选择所在城市"
  36999. }
  37000. ],
  37001. account: [
  37002. {
  37003. required: true,
  37004. message: "请输入帐号"
  37005. }
  37006. ],
  37007. password: [
  37008. {
  37009. required: true,
  37010. message: "请输入密码"
  37011. }
  37012. ],
  37013. mobile: [
  37014. {
  37015. required: true,
  37016. message: "请输入手机号",
  37017. // 可以单个或者同时写两个触发验证方式
  37018. trigger: ["change", "blur"]
  37019. }
  37020. ]
  37021. }
  37022. };
  37023. },
  37024. onLoad(options) {
  37025. this.form.doctorType = options.type;
  37026. this.getCitys();
  37027. this.getHospitalList();
  37028. this.getDepartmentList();
  37029. this.getDictByKey("sys_doc_position");
  37030. },
  37031. onShow() {
  37032. },
  37033. onReady() {
  37034. this.$refs.uForm.setRules(this.rules);
  37035. },
  37036. methods: {
  37037. hospitalSelect(e) {
  37038. this.form.hospitalId = this.hospitals[0][e.indexs[0]].hospitalId;
  37039. this.form.hospitalName = this.hospitals[0][e.indexs[0]].hospitalName;
  37040. this.hospitalShow = false;
  37041. },
  37042. deptSelect(e) {
  37043. formatAppLog("log", "at pages_user/registerDoctor.vue:307", e);
  37044. this.form.deptId = this.depts[0][e.indexs[0]].deptId;
  37045. this.form.deptName = this.depts[0][e.indexs[0]].deptName;
  37046. this.deptShow = false;
  37047. },
  37048. positionSelect(e) {
  37049. formatAppLog("log", "at pages_user/registerDoctor.vue:313", e);
  37050. this.form.position = this.positions[0][e.indexs[0]].dictLabel;
  37051. this.positionShow = false;
  37052. },
  37053. getDictByKey(key) {
  37054. var data = { key };
  37055. getDictByKey(data).then(
  37056. (res) => {
  37057. if (res.code == 200) {
  37058. this.positions[0] = res.data;
  37059. }
  37060. },
  37061. (err) => {
  37062. }
  37063. );
  37064. },
  37065. openContent(type2) {
  37066. uni.navigateTo({
  37067. url: "agreement?type=" + type2
  37068. });
  37069. },
  37070. cityChangeHandler(e) {
  37071. const {
  37072. columnIndex,
  37073. index: index2,
  37074. // 微信小程序无法将picker实例传出来,只能通过ref操作
  37075. picker = this.$refs.cityPicker
  37076. } = e;
  37077. if (columnIndex == 0) {
  37078. this.cityIndex1 = index2;
  37079. formatAppLog("log", "at pages_user/registerDoctor.vue:344", this.cityIndex1);
  37080. var citys1 = this.allCitys[this.cityIndex1].c;
  37081. formatAppLog("log", "at pages_user/registerDoctor.vue:347", citys1);
  37082. picker.setColumnValues(1, citys1);
  37083. this.cityIndex2 = 0;
  37084. var citys2 = this.allCitys[this.cityIndex1].c[this.cityIndex2].c;
  37085. picker.setColumnValues(2, citys2);
  37086. }
  37087. if (columnIndex == 1) {
  37088. this.cityIndex2 = index2;
  37089. var citys = this.allCitys[this.cityIndex1].c[this.cityIndex2].c;
  37090. formatAppLog("log", "at pages_user/registerDoctor.vue:357", citys);
  37091. picker.setColumnValues(2, citys);
  37092. }
  37093. },
  37094. citySelect(e) {
  37095. formatAppLog("log", "at pages_user/registerDoctor.vue:363", e);
  37096. this.form.cityName = e.value[0].n + ">" + e.value[1].n + ">" + e.value[2].n;
  37097. this.form.cityIds = e.value[0].v + "," + e.value[1].v + "," + e.value[2].v;
  37098. this.cityShow = false;
  37099. },
  37100. getCitys() {
  37101. var that = this;
  37102. var data = {};
  37103. getCitys(data).then(
  37104. (res) => {
  37105. if (res.code == 200) {
  37106. that.allCitys = res.data;
  37107. that.citys = [[], [], []];
  37108. that.citys[0] = that.allCitys;
  37109. that.citys[1] = that.allCitys[0].c;
  37110. that.citys[2] = that.allCitys[0].c[0].c;
  37111. formatAppLog("log", "at pages_user/registerDoctor.vue:380", that.citys);
  37112. }
  37113. },
  37114. (err) => {
  37115. }
  37116. );
  37117. },
  37118. getHospitalList() {
  37119. var that = this;
  37120. var data = {};
  37121. getHospitalList$1(data).then(
  37122. (res) => {
  37123. if (res.code == 200) {
  37124. that.hospitals[0] = res.data;
  37125. formatAppLog("log", "at pages_user/registerDoctor.vue:395", 111);
  37126. formatAppLog("log", "at pages_user/registerDoctor.vue:396", that.hospitals);
  37127. }
  37128. },
  37129. (err) => {
  37130. }
  37131. );
  37132. },
  37133. getDepartmentList() {
  37134. var that = this;
  37135. var data = {};
  37136. getDepartmentList$1(data).then(
  37137. (res) => {
  37138. if (res.code == 200) {
  37139. that.depts[0] = res.data;
  37140. }
  37141. },
  37142. (err) => {
  37143. }
  37144. );
  37145. },
  37146. deletePic(event) {
  37147. this[`fileList${event.name}`].splice(event.index, 1);
  37148. },
  37149. async afterRead(event) {
  37150. let lists = [].concat(event.file);
  37151. let fileListLen = this[`fileList${event.name}`].length;
  37152. lists.map((item) => {
  37153. this[`fileList${event.name}`].push({
  37154. ...item,
  37155. status: "uploading",
  37156. message: "上传中"
  37157. });
  37158. });
  37159. for (let i = 0; i < lists.length; i++) {
  37160. const result = await this.uploadFilePromise(lists[i].url);
  37161. let item = this[`fileList${event.name}`][fileListLen];
  37162. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  37163. status: "success",
  37164. message: "",
  37165. url: result
  37166. }));
  37167. fileListLen++;
  37168. }
  37169. },
  37170. uploadFilePromise(url2) {
  37171. return new Promise((resolve, reject2) => {
  37172. uni.uploadFile({
  37173. url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
  37174. filePath: url2,
  37175. name: "file",
  37176. formData: {
  37177. user: "test"
  37178. },
  37179. success: (res) => {
  37180. setTimeout(() => {
  37181. formatAppLog("log", "at pages_user/registerDoctor.vue:455", JSON.parse(res.data).url);
  37182. resolve(JSON.parse(res.data).url);
  37183. }, 1e3);
  37184. }
  37185. });
  37186. });
  37187. },
  37188. register() {
  37189. registerDoctor(this.form).then(
  37190. (res) => {
  37191. formatAppLog("log", "at pages_user/registerDoctor.vue:465", res);
  37192. if (res.code == 200) {
  37193. uni.showToast({
  37194. icon: "none",
  37195. title: res.msg
  37196. });
  37197. setTimeout(function() {
  37198. uni.navigateBack({
  37199. delta: 1
  37200. });
  37201. }, 2e3);
  37202. } else {
  37203. uni.showToast({
  37204. icon: "none",
  37205. title: res.msg
  37206. });
  37207. }
  37208. },
  37209. (rej) => {
  37210. formatAppLog("log", "at pages_user/registerDoctor.vue:484", rej);
  37211. }
  37212. );
  37213. },
  37214. submit() {
  37215. var that = this;
  37216. if (this.fileList1.length > 0) {
  37217. this.form.avatar = this.fileList1[0].url;
  37218. }
  37219. if (this.fileList2.length > 0) {
  37220. var images = [];
  37221. that.fileList2.forEach(function(item) {
  37222. images.push(item.url);
  37223. });
  37224. if (images.length != 2) {
  37225. uni.showToast({
  37226. icon: "none",
  37227. title: "请上传身份证号"
  37228. });
  37229. return;
  37230. }
  37231. this.form.idCardFrontUrl = images[0];
  37232. this.form.idCardBackUrl = images[1];
  37233. }
  37234. if (this.fileList3.length > 0) {
  37235. var images = [];
  37236. that.fileList3.forEach(function(item) {
  37237. images.push(item.url);
  37238. });
  37239. this.form.certificateImages = images.toString();
  37240. }
  37241. if (this.fileList4.length > 0) {
  37242. var images = [];
  37243. that.fileList4.forEach(function(item) {
  37244. images.push(item.url);
  37245. });
  37246. this.form.practiseImages = images.toString();
  37247. }
  37248. if (this.checked != 1) {
  37249. uni.showToast({
  37250. icon: "none",
  37251. title: "请同意协议"
  37252. });
  37253. return;
  37254. }
  37255. formatAppLog("log", "at pages_user/registerDoctor.vue:530", this.form);
  37256. this.$refs.uForm.validate().then((res) => {
  37257. that.register();
  37258. }).catch((errors) => {
  37259. formatAppLog("log", "at pages_user/registerDoctor.vue:534", errors);
  37260. });
  37261. }
  37262. }
  37263. };
  37264. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  37265. const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$2);
  37266. const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1);
  37267. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
  37268. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
  37269. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  37270. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  37271. const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
  37272. const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7);
  37273. const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
  37274. const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
  37275. const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_10);
  37276. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  37277. vue.createElementVNode("view", { class: "content" }, [
  37278. vue.createElementVNode("view", { class: "inner" }, [
  37279. vue.createElementVNode("view", { class: "bg" }, [
  37280. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/74645f3b57bc45b08b35e2449fdf90c7.jpg" }),
  37281. $data.form.doctorType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  37282. key: 0,
  37283. class: "title"
  37284. }, "医生注册")) : vue.createCommentVNode("v-if", true),
  37285. $data.form.doctorType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  37286. key: 1,
  37287. class: "desc"
  37288. }, "请填写医生资料")) : vue.createCommentVNode("v-if", true),
  37289. $data.form.doctorType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  37290. key: 2,
  37291. class: "title"
  37292. }, "药师注册")) : vue.createCommentVNode("v-if", true),
  37293. $data.form.doctorType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  37294. key: 3,
  37295. class: "desc"
  37296. }, "请填写药师资料")) : vue.createCommentVNode("v-if", true)
  37297. ]),
  37298. vue.createElementVNode("view", { class: "my-form" }, [
  37299. vue.createVNode(_component_u_form, {
  37300. rules: $data.rules,
  37301. model: $data.form,
  37302. ref: "uForm",
  37303. labelPosition: "left"
  37304. }, {
  37305. default: vue.withCtx(() => [
  37306. vue.createVNode(_component_u_form_item, {
  37307. labelWidth: "180rpx",
  37308. borderBottom: "",
  37309. label: "真实姓名",
  37310. prop: "doctorName"
  37311. }, {
  37312. default: vue.withCtx(() => [
  37313. vue.createVNode(_component_u_input, {
  37314. border: "none",
  37315. placeholder: "请输入真实姓名",
  37316. modelValue: $data.form.doctorName,
  37317. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.doctorName = $event)
  37318. }, null, 8, ["modelValue"])
  37319. ]),
  37320. _: 1
  37321. /* STABLE */
  37322. }),
  37323. vue.createVNode(_component_u_form_item, {
  37324. labelWidth: "180rpx",
  37325. borderBottom: "",
  37326. label: "身份证号",
  37327. prop: "idCard"
  37328. }, {
  37329. default: vue.withCtx(() => [
  37330. vue.createVNode(_component_u_input, {
  37331. border: "none",
  37332. placeholder: "请输入身份证号",
  37333. modelValue: $data.form.idCard,
  37334. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.idCard = $event)
  37335. }, null, 8, ["modelValue"])
  37336. ]),
  37337. _: 1
  37338. /* STABLE */
  37339. }),
  37340. vue.createVNode(_component_u_form_item, {
  37341. labelWidth: "180rpx",
  37342. borderBottom: "",
  37343. label: "性别",
  37344. prop: "sex"
  37345. }, {
  37346. default: vue.withCtx(() => [
  37347. vue.createVNode(_component_u_radio_group, {
  37348. placement: "row",
  37349. modelValue: $data.form.sex,
  37350. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.sex = $event)
  37351. }, {
  37352. default: vue.withCtx(() => [
  37353. vue.createVNode(_component_u_radio, {
  37354. activeColor: "#C39A58",
  37355. customStyle: { marginRight: "8px" },
  37356. key: "1",
  37357. label: "男",
  37358. name: "1"
  37359. }),
  37360. vue.createVNode(_component_u_radio, {
  37361. activeColor: "#C39A58",
  37362. key: "2",
  37363. label: "女",
  37364. name: "2"
  37365. })
  37366. ]),
  37367. _: 1
  37368. /* STABLE */
  37369. }, 8, ["modelValue"])
  37370. ]),
  37371. _: 1
  37372. /* STABLE */
  37373. }),
  37374. vue.createVNode(_component_u_form_item, {
  37375. labelWidth: "180rpx",
  37376. prop: "cityId",
  37377. onClick: _cache[4] || (_cache[4] = ($event) => $data.cityShow = true),
  37378. borderBottom: "",
  37379. label: "所在城市"
  37380. }, {
  37381. right: vue.withCtx(() => [
  37382. vue.createVNode(_component_u_icon, { name: "arrow-right" })
  37383. ]),
  37384. default: vue.withCtx(() => [
  37385. vue.createVNode(_component_u_input, {
  37386. modelValue: $data.form.cityName,
  37387. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.cityName = $event),
  37388. disabled: "",
  37389. disabledColor: "#ffffff",
  37390. placeholder: "请选择所在城市",
  37391. border: "none"
  37392. }, null, 8, ["modelValue"])
  37393. ]),
  37394. _: 1
  37395. /* STABLE */
  37396. }),
  37397. vue.createVNode(_component_u_form_item, {
  37398. labelWidth: "180rpx",
  37399. prop: "hospitalId",
  37400. onClick: _cache[6] || (_cache[6] = ($event) => $data.hospitalShow = true),
  37401. borderBottom: "",
  37402. label: "就职医院"
  37403. }, {
  37404. right: vue.withCtx(() => [
  37405. vue.createVNode(_component_u_icon, { name: "arrow-right" })
  37406. ]),
  37407. default: vue.withCtx(() => [
  37408. vue.createVNode(_component_u_input, {
  37409. modelValue: $data.form.hospitalName,
  37410. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.hospitalName = $event),
  37411. disabled: "",
  37412. disabledColor: "#ffffff",
  37413. placeholder: "请选择医院",
  37414. border: "none"
  37415. }, null, 8, ["modelValue"])
  37416. ]),
  37417. _: 1
  37418. /* STABLE */
  37419. }),
  37420. vue.createVNode(_component_u_form_item, {
  37421. labelWidth: "180rpx",
  37422. prop: "deptId",
  37423. onClick: _cache[8] || (_cache[8] = ($event) => $data.deptShow = true),
  37424. borderBottom: "",
  37425. label: "所属科室"
  37426. }, {
  37427. right: vue.withCtx(() => [
  37428. vue.createVNode(_component_u_icon, { name: "arrow-right" })
  37429. ]),
  37430. default: vue.withCtx(() => [
  37431. vue.createVNode(_component_u_input, {
  37432. modelValue: $data.form.deptName,
  37433. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.form.deptName = $event),
  37434. disabled: "",
  37435. disabledColor: "#ffffff",
  37436. placeholder: "请选择科室",
  37437. border: "none"
  37438. }, null, 8, ["modelValue"])
  37439. ]),
  37440. _: 1
  37441. /* STABLE */
  37442. }),
  37443. vue.createVNode(_component_u_form_item, {
  37444. labelWidth: "180rpx",
  37445. prop: "position",
  37446. onClick: _cache[10] || (_cache[10] = ($event) => $data.positionShow = true),
  37447. borderBottom: "",
  37448. label: "职称"
  37449. }, {
  37450. right: vue.withCtx(() => [
  37451. vue.createVNode(_component_u_icon, { name: "arrow-right" })
  37452. ]),
  37453. default: vue.withCtx(() => [
  37454. vue.createVNode(_component_u_input, {
  37455. modelValue: $data.form.position,
  37456. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.form.position = $event),
  37457. disabled: "",
  37458. disabledColor: "#ffffff",
  37459. placeholder: "请选择职称",
  37460. border: "none"
  37461. }, null, 8, ["modelValue"])
  37462. ]),
  37463. _: 1
  37464. /* STABLE */
  37465. }),
  37466. vue.createVNode(_component_u_form_item, {
  37467. labelWidth: "180rpx",
  37468. borderBottom: "",
  37469. label: "擅长领域",
  37470. prop: "speciality"
  37471. }, {
  37472. default: vue.withCtx(() => [
  37473. vue.createVNode(_component_u__textarea, {
  37474. modelValue: $data.form.speciality,
  37475. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.speciality = $event),
  37476. placeholder: "请输入擅长领域",
  37477. count: ""
  37478. }, null, 8, ["modelValue"])
  37479. ]),
  37480. _: 1
  37481. /* STABLE */
  37482. }),
  37483. vue.createVNode(_component_u_form_item, {
  37484. labelWidth: "180rpx",
  37485. borderBottom: "",
  37486. label: "个人简介",
  37487. prop: "introduction"
  37488. }, {
  37489. default: vue.withCtx(() => [
  37490. vue.createVNode(_component_u__textarea, {
  37491. modelValue: $data.form.introduction,
  37492. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.form.introduction = $event),
  37493. placeholder: "请输入个人简介",
  37494. count: ""
  37495. }, null, 8, ["modelValue"])
  37496. ]),
  37497. _: 1
  37498. /* STABLE */
  37499. }),
  37500. vue.createVNode(_component_u_form_item, {
  37501. labelWidth: "180rpx",
  37502. borderBottom: "",
  37503. label: "医生照片",
  37504. prop: "avatar"
  37505. }, {
  37506. default: vue.withCtx(() => [
  37507. vue.createVNode(_component_u_upload, {
  37508. fileList: $data.fileList1,
  37509. onAfterRead: $options.afterRead,
  37510. onDelete: $options.deletePic,
  37511. name: "1",
  37512. multiple: "",
  37513. maxCount: 1
  37514. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  37515. ]),
  37516. _: 1
  37517. /* STABLE */
  37518. }),
  37519. vue.createVNode(_component_u_form_item, {
  37520. labelWidth: "180rpx",
  37521. borderBottom: "",
  37522. label: "身份证照片(正反面)",
  37523. prop: "idCardFrontUrl"
  37524. }, {
  37525. default: vue.withCtx(() => [
  37526. vue.createVNode(_component_u_upload, {
  37527. fileList: $data.fileList2,
  37528. onAfterRead: $options.afterRead,
  37529. onDelete: $options.deletePic,
  37530. name: "2",
  37531. multiple: "",
  37532. maxCount: 2
  37533. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  37534. ]),
  37535. _: 1
  37536. /* STABLE */
  37537. }),
  37538. vue.createVNode(_component_u_form_item, {
  37539. labelWidth: "180rpx",
  37540. borderBottom: "",
  37541. label: "资质证编号",
  37542. prop: "certificateCode"
  37543. }, {
  37544. default: vue.withCtx(() => [
  37545. vue.createVNode(_component_u_input, {
  37546. border: "none",
  37547. placeholder: "请输入资质证编号",
  37548. modelValue: $data.form.certificateCode,
  37549. "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.form.certificateCode = $event)
  37550. }, null, 8, ["modelValue"])
  37551. ]),
  37552. _: 1
  37553. /* STABLE */
  37554. }),
  37555. vue.createVNode(_component_u_form_item, {
  37556. labelWidth: "180rpx",
  37557. borderBottom: "",
  37558. label: "资质证书",
  37559. prop: "certificateImages"
  37560. }, {
  37561. default: vue.withCtx(() => [
  37562. vue.createVNode(_component_u_upload, {
  37563. fileList: $data.fileList3,
  37564. onAfterRead: $options.afterRead,
  37565. onDelete: $options.deletePic,
  37566. name: "3",
  37567. maxCount: 3
  37568. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  37569. ]),
  37570. _: 1
  37571. /* STABLE */
  37572. }),
  37573. vue.createVNode(_component_u_form_item, {
  37574. labelWidth: "180rpx",
  37575. borderBottom: "",
  37576. label: "执业证编号",
  37577. prop: "practiseCode"
  37578. }, {
  37579. default: vue.withCtx(() => [
  37580. vue.createVNode(_component_u_input, {
  37581. border: "none",
  37582. placeholder: "请输入执业证编号",
  37583. modelValue: $data.form.practiseCode,
  37584. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.form.practiseCode = $event)
  37585. }, null, 8, ["modelValue"])
  37586. ]),
  37587. _: 1
  37588. /* STABLE */
  37589. }),
  37590. vue.createVNode(_component_u_form_item, {
  37591. labelWidth: "180rpx",
  37592. borderBottom: "",
  37593. label: "执业证书",
  37594. prop: "certificateImages"
  37595. }, {
  37596. default: vue.withCtx(() => [
  37597. vue.createVNode(_component_u_upload, {
  37598. fileList: $data.fileList4,
  37599. onAfterRead: $options.afterRead,
  37600. onDelete: $options.deletePic,
  37601. name: "4",
  37602. maxCount: 3
  37603. }, null, 8, ["fileList", "onAfterRead", "onDelete"])
  37604. ]),
  37605. _: 1
  37606. /* STABLE */
  37607. }),
  37608. vue.createVNode(_component_u_form_item, {
  37609. labelWidth: "180rpx",
  37610. borderBottom: "",
  37611. label: "联系电话",
  37612. prop: "mobile"
  37613. }, {
  37614. default: vue.withCtx(() => [
  37615. vue.createVNode(_component_u_input, {
  37616. border: "none",
  37617. placeholder: "请输入联系电话",
  37618. modelValue: $data.form.mobile,
  37619. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.form.mobile = $event)
  37620. }, null, 8, ["modelValue"])
  37621. ]),
  37622. _: 1
  37623. /* STABLE */
  37624. }),
  37625. vue.createVNode(_component_u_form_item, {
  37626. labelWidth: "180rpx",
  37627. borderBottom: "",
  37628. label: "登录帐号",
  37629. prop: "account"
  37630. }, {
  37631. default: vue.withCtx(() => [
  37632. vue.createVNode(_component_u_input, {
  37633. border: "none",
  37634. placeholder: "请输入登录帐号",
  37635. modelValue: $data.form.account,
  37636. "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.form.account = $event)
  37637. }, null, 8, ["modelValue"])
  37638. ]),
  37639. _: 1
  37640. /* STABLE */
  37641. }),
  37642. vue.createVNode(_component_u_form_item, {
  37643. labelWidth: "180rpx",
  37644. label: "登录密码",
  37645. prop: "password"
  37646. }, {
  37647. default: vue.withCtx(() => [
  37648. vue.createVNode(_component_u_input, {
  37649. border: "none",
  37650. type: "password",
  37651. placeholder: "请输入登录密码",
  37652. modelValue: $data.form.password,
  37653. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $data.form.password = $event)
  37654. }, null, 8, ["modelValue"])
  37655. ]),
  37656. _: 1
  37657. /* STABLE */
  37658. })
  37659. ]),
  37660. _: 1
  37661. /* STABLE */
  37662. }, 8, ["rules", "model"])
  37663. ]),
  37664. vue.createElementVNode("view", { class: "agree" }, [
  37665. vue.createVNode(_component_u_checkbox_group, {
  37666. modelValue: $data.checked,
  37667. "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $data.checked = $event),
  37668. placement: "column"
  37669. }, {
  37670. default: vue.withCtx(() => [
  37671. (vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  37672. activeColor: "#2BC7B9",
  37673. customStyle: { marginRight: "8px" },
  37674. key: 1,
  37675. label: "同意",
  37676. name: 1
  37677. }))
  37678. ]),
  37679. _: 1
  37680. /* STABLE */
  37681. }, 8, ["modelValue"]),
  37682. vue.createElementVNode("text", {
  37683. class: "text",
  37684. onClick: _cache[19] || (_cache[19] = ($event) => $options.openContent("doctorRegister"))
  37685. }, "《医生注册协议》"),
  37686. vue.createElementVNode("text", {
  37687. class: "text",
  37688. onClick: _cache[20] || (_cache[20] = ($event) => $options.openContent("doctorFiling"))
  37689. }, "《医生多机构备案协议》")
  37690. ]),
  37691. vue.createVNode(_component_u_picker, {
  37692. ref: "cityPicker",
  37693. onCancel: _cache[21] || (_cache[21] = ($event) => $data.cityShow = false),
  37694. keyName: "n",
  37695. onConfirm: $options.citySelect,
  37696. onChange: $options.cityChangeHandler,
  37697. show: $data.cityShow,
  37698. columns: $data.citys
  37699. }, null, 8, ["onConfirm", "onChange", "show", "columns"]),
  37700. vue.createVNode(_component_u_picker, {
  37701. ref: "deptPicker",
  37702. onCancel: _cache[22] || (_cache[22] = ($event) => $data.deptShow = false),
  37703. keyName: "deptName",
  37704. onConfirm: $options.deptSelect,
  37705. show: $data.deptShow,
  37706. columns: $data.depts
  37707. }, null, 8, ["onConfirm", "show", "columns"]),
  37708. vue.createVNode(_component_u_picker, {
  37709. onCancel: _cache[23] || (_cache[23] = ($event) => $data.hospitalShow = false),
  37710. keyName: "hospitalName",
  37711. onConfirm: $options.hospitalSelect,
  37712. show: $data.hospitalShow,
  37713. columns: $data.hospitals
  37714. }, null, 8, ["onConfirm", "show", "columns"]),
  37715. vue.createVNode(_component_u_picker, {
  37716. ref: "positionPicker",
  37717. onCancel: _cache[24] || (_cache[24] = ($event) => $data.positionShow = false),
  37718. keyName: "dictLabel",
  37719. onConfirm: $options.positionSelect,
  37720. show: $data.positionShow,
  37721. columns: $data.positions
  37722. }, null, 8, ["onConfirm", "show", "columns"])
  37723. ]),
  37724. vue.createElementVNode("view", { class: "btn-box" }, [
  37725. vue.createElementVNode("view", {
  37726. class: "sub-btn",
  37727. onClick: _cache[25] || (_cache[25] = ($event) => $options.submit())
  37728. }, "提交")
  37729. ])
  37730. ])
  37731. ]);
  37732. }
  37733. const Pages_userRegisterDoctor = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-be607d3d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/registerDoctor.vue"]]);
  37734. const _sfc_main$G = {
  37735. data() {
  37736. return {
  37737. tel: void 0,
  37738. version: "1.0"
  37739. };
  37740. },
  37741. onLoad() {
  37742. const accountInfo = wx.getAccountInfoSync();
  37743. this.version = accountInfo.miniProgram.version;
  37744. },
  37745. methods: {
  37746. callPhone() {
  37747. uni.makePhoneCall({
  37748. phoneNumber: "4000717770"
  37749. });
  37750. },
  37751. submit() {
  37752. }
  37753. }
  37754. };
  37755. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  37756. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  37757. vue.createElementVNode("view", { class: "logo" }, [
  37758. vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png" }),
  37759. vue.createElementVNode("p", null, "芸医汇互联网医院")
  37760. ]),
  37761. vue.createElementVNode("view", { class: "set-box" }, [
  37762. vue.createElementVNode("view", {
  37763. class: "item",
  37764. onClick: _cache[0] || (_cache[0] = ($event) => $options.callPhone())
  37765. }, [
  37766. vue.createElementVNode("view", { class: "left" }, [
  37767. vue.createElementVNode("text", { class: "text" }, "联系我们")
  37768. ]),
  37769. vue.createElementVNode("image", {
  37770. class: "right",
  37771. src: "/static/images/arrow_gray.png",
  37772. mode: "aspectFill"
  37773. })
  37774. ]),
  37775. vue.createElementVNode("view", { style: { "height": "1px", "background-color": "#F5F6FA" } }),
  37776. vue.createElementVNode("view", { class: "item" }, [
  37777. vue.createElementVNode("view", { class: "left" }, [
  37778. vue.createElementVNode("text", { class: "text" }, "在线客服")
  37779. ]),
  37780. vue.createElementVNode("image", {
  37781. class: "right",
  37782. src: "/static/images/arrow_gray.png",
  37783. mode: "aspectFill"
  37784. }),
  37785. vue.createElementVNode("button", {
  37786. class: "contact-btn",
  37787. "open-type": "contact"
  37788. }, " 1111 ")
  37789. ]),
  37790. vue.createElementVNode("view", { style: { "height": "1px", "background-color": "#F5F6FA" } }),
  37791. vue.createElementVNode("view", { class: "item" }, [
  37792. vue.createElementVNode("view", { class: "left" }, [
  37793. vue.createElementVNode("text", { class: "text" }, "版本号")
  37794. ]),
  37795. vue.createElementVNode("view", { class: "right-text" }, [
  37796. vue.createElementVNode(
  37797. "text",
  37798. { class: "text" },
  37799. "v" + vue.toDisplayString($data.version),
  37800. 1
  37801. /* TEXT */
  37802. )
  37803. ])
  37804. ])
  37805. ])
  37806. ]);
  37807. }
  37808. const Pages_userAbout = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-a8066ee1"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/about.vue"]]);
  37809. const _sfc_main$F = {
  37810. data() {
  37811. return {
  37812. address: []
  37813. };
  37814. },
  37815. onLoad() {
  37816. var that = this;
  37817. uni.$on("refreshAddress", () => {
  37818. that.getAddressList();
  37819. });
  37820. },
  37821. onShow() {
  37822. this.getAddressList();
  37823. },
  37824. methods: {
  37825. selectAddress(item) {
  37826. uni.$emit("updateAddress", item);
  37827. uni.navigateBack({
  37828. delta: 1
  37829. });
  37830. },
  37831. editAddress(item) {
  37832. uni.navigateTo({
  37833. url: "./addEditAddress?type=edit&addressId=" + item.addressId
  37834. });
  37835. },
  37836. delAddress(item) {
  37837. uni.showModal({
  37838. title: "提示",
  37839. content: "确认删除此地址吗?",
  37840. showCancel: true,
  37841. cancelText: "取消",
  37842. confirmText: "确定",
  37843. success: (res) => {
  37844. if (res.confirm) {
  37845. var data = { addressId: item.addressId };
  37846. delAddress(data).then(
  37847. (res2) => {
  37848. if (res2.code == 200) {
  37849. uni.showToast({
  37850. icon: "success",
  37851. title: "操作成功"
  37852. });
  37853. this.getAddressList();
  37854. } else {
  37855. uni.showToast({
  37856. icon: "none",
  37857. title: "请求失败"
  37858. });
  37859. }
  37860. },
  37861. (rej) => {
  37862. }
  37863. );
  37864. }
  37865. }
  37866. });
  37867. },
  37868. getAddressList() {
  37869. getAddressList().then(
  37870. (res) => {
  37871. if (res.code == 200) {
  37872. this.address = res.data;
  37873. } else {
  37874. uni.showToast({
  37875. icon: "none",
  37876. title: "请求失败"
  37877. });
  37878. }
  37879. },
  37880. (rej) => {
  37881. }
  37882. );
  37883. },
  37884. // 新建地址
  37885. addAddress() {
  37886. uni.navigateTo({
  37887. url: "./addEditAddress?type=add"
  37888. });
  37889. }
  37890. }
  37891. };
  37892. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  37893. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  37894. vue.createElementVNode("view", { class: "inner" }, [
  37895. (vue.openBlock(true), vue.createElementBlock(
  37896. vue.Fragment,
  37897. null,
  37898. vue.renderList($data.address, (item, index2) => {
  37899. return vue.openBlock(), vue.createElementBlock("view", {
  37900. key: index2,
  37901. onClick: vue.withModifiers(($event) => $options.selectAddress(item), ["stop"]),
  37902. class: "address-item"
  37903. }, [
  37904. vue.createElementVNode("view", { class: "info" }, [
  37905. vue.createElementVNode("view", { class: "title" }, [
  37906. item.isDefault == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  37907. key: 0,
  37908. class: "tag"
  37909. }, "默认")) : vue.createCommentVNode("v-if", true),
  37910. vue.createTextVNode(
  37911. " " + vue.toDisplayString(item.province) + vue.toDisplayString(item.city) + vue.toDisplayString(item.district) + vue.toDisplayString(item.detail),
  37912. 1
  37913. /* TEXT */
  37914. )
  37915. ]),
  37916. vue.createElementVNode("view", { class: "name-phone" }, [
  37917. vue.createElementVNode(
  37918. "text",
  37919. { class: "text" },
  37920. vue.toDisplayString(item.realName),
  37921. 1
  37922. /* TEXT */
  37923. ),
  37924. vue.createElementVNode(
  37925. "text",
  37926. { class: "text" },
  37927. vue.toDisplayString(_ctx.$parsePhone(item.phone)),
  37928. 1
  37929. /* TEXT */
  37930. )
  37931. ])
  37932. ]),
  37933. vue.createElementVNode("view", { class: "operat-box" }, [
  37934. vue.createElementVNode("image", {
  37935. src: "/static/images/del.png",
  37936. mode: "",
  37937. onClick: vue.withModifiers(($event) => $options.delAddress(item), ["stop"])
  37938. }, null, 8, ["onClick"]),
  37939. vue.createElementVNode("image", {
  37940. src: "/static/images/edit.png",
  37941. mode: "",
  37942. onClick: vue.withModifiers(($event) => $options.editAddress(item), ["stop"])
  37943. }, null, 8, ["onClick"])
  37944. ])
  37945. ], 8, ["onClick"]);
  37946. }),
  37947. 128
  37948. /* KEYED_FRAGMENT */
  37949. )),
  37950. $data.address.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  37951. key: 0,
  37952. class: "no-data-box",
  37953. onClick: _cache[0] || (_cache[0] = ($event) => $options.getAddressList())
  37954. }, [
  37955. vue.createElementVNode("image", {
  37956. src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  37957. mode: "aspectFit"
  37958. }),
  37959. vue.createElementVNode("view", { class: "empty-title" }, "暂无数据")
  37960. ])) : vue.createCommentVNode("v-if", true)
  37961. ]),
  37962. vue.createElementVNode("view", { class: "btn-box" }, [
  37963. vue.createElementVNode("view", {
  37964. class: "sub-btn",
  37965. onClick: _cache[1] || (_cache[1] = ($event) => $options.addAddress())
  37966. }, "新建收货地址")
  37967. ])
  37968. ]);
  37969. }
  37970. const Pages_userAddress = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/address.vue"]]);
  37971. const props$1 = {
  37972. props: {
  37973. // 是否为加载中状态
  37974. loading: {
  37975. type: Boolean,
  37976. default: props$y.switch.loading
  37977. },
  37978. // 是否为禁用装填
  37979. disabled: {
  37980. type: Boolean,
  37981. default: props$y.switch.disabled
  37982. },
  37983. // 开关尺寸,单位px
  37984. size: {
  37985. type: [String, Number],
  37986. default: props$y.switch.size
  37987. },
  37988. // 打开时的背景颜色
  37989. activeColor: {
  37990. type: String,
  37991. default: props$y.switch.activeColor
  37992. },
  37993. // 关闭时的背景颜色
  37994. inactiveColor: {
  37995. type: String,
  37996. default: props$y.switch.inactiveColor
  37997. },
  37998. // 通过v-model双向绑定的值
  37999. modelValue: {
  38000. type: [Boolean, String, Number],
  38001. default: props$y.switch.value
  38002. },
  38003. // switch打开时的值
  38004. activeValue: {
  38005. type: [String, Number, Boolean],
  38006. default: props$y.switch.activeValue
  38007. },
  38008. // switch关闭时的值
  38009. inactiveValue: {
  38010. type: [String, Number, Boolean],
  38011. default: props$y.switch.inactiveValue
  38012. },
  38013. // 是否开启异步变更,开启后需要手动控制输入值
  38014. asyncChange: {
  38015. type: Boolean,
  38016. default: props$y.switch.asyncChange
  38017. },
  38018. // 圆点与外边框的距离
  38019. space: {
  38020. type: [String, Number],
  38021. default: props$y.switch.space
  38022. }
  38023. }
  38024. };
  38025. const _sfc_main$E = {
  38026. name: "u-switch",
  38027. mixins: [mpMixin, mixin, props$1],
  38028. watch: {
  38029. modelValue: {
  38030. immediate: true,
  38031. handler(n) {
  38032. if (n !== this.inactiveValue && n !== this.activeValue) {
  38033. uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
  38034. }
  38035. }
  38036. }
  38037. },
  38038. data() {
  38039. return {
  38040. bgColor: "#ffffff"
  38041. };
  38042. },
  38043. computed: {
  38044. isActive() {
  38045. return this.modelValue === this.activeValue;
  38046. },
  38047. switchStyle() {
  38048. let style = {};
  38049. style.width = uni.$u.addUnit(this.size * 2 + 2);
  38050. style.height = uni.$u.addUnit(Number(this.size) + 2);
  38051. if (this.customInactiveColor) {
  38052. style.borderColor = "rgba(0, 0, 0, 0)";
  38053. }
  38054. style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
  38055. return style;
  38056. },
  38057. nodeStyle() {
  38058. let style = {};
  38059. style.width = uni.$u.addUnit(this.size - this.space);
  38060. style.height = uni.$u.addUnit(this.size - this.space);
  38061. const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
  38062. style.transform = `translateX(-${translateX})`;
  38063. return style;
  38064. },
  38065. bgStyle() {
  38066. let style = {};
  38067. style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
  38068. style.height = uni.$u.addUnit(this.size);
  38069. style.backgroundColor = this.inactiveColor;
  38070. style.transform = `scale(${this.isActive ? 0 : 1})`;
  38071. return style;
  38072. },
  38073. customInactiveColor() {
  38074. return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
  38075. }
  38076. },
  38077. emits: ["update:modelValue", "change"],
  38078. methods: {
  38079. clickHandler() {
  38080. if (!this.disabled && !this.loading) {
  38081. const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
  38082. if (!this.asyncChange) {
  38083. this.$emit("update:modelValue", oldValue);
  38084. }
  38085. this.$nextTick(() => {
  38086. this.$emit("change", oldValue);
  38087. });
  38088. }
  38089. }
  38090. }
  38091. };
  38092. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  38093. const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
  38094. return vue.openBlock(), vue.createElementBlock(
  38095. "view",
  38096. {
  38097. class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
  38098. style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
  38099. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
  38100. },
  38101. [
  38102. vue.createElementVNode(
  38103. "view",
  38104. {
  38105. class: "u-switch__bg",
  38106. style: vue.normalizeStyle([$options.bgStyle])
  38107. },
  38108. null,
  38109. 4
  38110. /* STYLE */
  38111. ),
  38112. vue.createElementVNode(
  38113. "view",
  38114. {
  38115. class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
  38116. style: vue.normalizeStyle([$options.nodeStyle]),
  38117. ref: "u-switch__node"
  38118. },
  38119. [
  38120. vue.createVNode(_component_u_loading_icon, {
  38121. show: _ctx.loading,
  38122. mode: "circle",
  38123. timingFunction: "linear",
  38124. color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
  38125. size: _ctx.size * 0.6
  38126. }, null, 8, ["show", "color", "size"])
  38127. ],
  38128. 6
  38129. /* CLASS, STYLE */
  38130. )
  38131. ],
  38132. 6
  38133. /* CLASS, STYLE */
  38134. );
  38135. }
  38136. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-6ab257b3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]);
  38137. const _sfc_main$D = {
  38138. components: {},
  38139. data() {
  38140. return {
  38141. content: null,
  38142. type: null,
  38143. addressId: null,
  38144. isDefault: false,
  38145. addressList: [[], [], []],
  38146. multiIndex: [0, 0, 0],
  38147. address: [],
  38148. form: {
  38149. realName: null,
  38150. phone: null,
  38151. detail: null,
  38152. address: null,
  38153. isDefault: 0
  38154. }
  38155. };
  38156. },
  38157. onLoad(option) {
  38158. this.type = option.type;
  38159. if (this.type == "edit") {
  38160. uni.setNavigationBarTitle({
  38161. title: "修改收货地址"
  38162. });
  38163. this.addressId = option.addressId;
  38164. this.getAddressById();
  38165. } else {
  38166. uni.setNavigationBarTitle({
  38167. title: "新增收货地址"
  38168. });
  38169. }
  38170. this.getCitys();
  38171. },
  38172. methods: {
  38173. parseAddress() {
  38174. if (this.content == null || this.content == "") {
  38175. uni.showToast({
  38176. icon: "none",
  38177. title: "请输入地址信息"
  38178. });
  38179. return;
  38180. }
  38181. var data = { content: this.content };
  38182. parseAddress(data).then(
  38183. (res) => {
  38184. if (res.code == 200) {
  38185. this.form.realName = res.data.name;
  38186. this.form.phone = res.data.mobile;
  38187. this.form.address = res.data.provinceName + res.data.cityName + res.data.expAreaName;
  38188. this.form.province = res.data.provinceName;
  38189. this.form.city = res.data.cityName;
  38190. this.form.district = res.data.expAreaName;
  38191. this.form.detail = res.data.streetName + res.data.address;
  38192. this.form.detail = this.form.detail.replace(/\s+/g, "");
  38193. } else {
  38194. uni.showToast({
  38195. icon: "none",
  38196. title: res.msg
  38197. });
  38198. }
  38199. },
  38200. (rej) => {
  38201. }
  38202. );
  38203. },
  38204. getAddressById() {
  38205. var data = { addressId: this.addressId };
  38206. getAddressById(data).then(
  38207. (res) => {
  38208. if (res.code == 200) {
  38209. this.form = res.data;
  38210. this.isDefault = this.form.isDefault == 1 ? true : false;
  38211. this.form.address = this.form.province + this.form.city + this.form.district;
  38212. } else {
  38213. uni.showToast({
  38214. icon: "none",
  38215. title: res.msg
  38216. });
  38217. }
  38218. },
  38219. (rej) => {
  38220. }
  38221. );
  38222. },
  38223. submit() {
  38224. if (this.type == "add") {
  38225. this.addAddress();
  38226. } else if (this.type == "edit") {
  38227. this.editAddress();
  38228. }
  38229. },
  38230. editAddress() {
  38231. this.form.isDefault = this.isDefault ? 1 : 0;
  38232. editAddress(this.form).then(
  38233. (res) => {
  38234. if (res.code == 200) {
  38235. uni.showToast({
  38236. icon: "success",
  38237. title: "操作成功"
  38238. });
  38239. setTimeout(function() {
  38240. uni.$emit("refreshAddress");
  38241. uni.navigateBack({
  38242. delta: 1
  38243. });
  38244. }, 500);
  38245. } else {
  38246. uni.showToast({
  38247. icon: "none",
  38248. title: res.msg
  38249. });
  38250. }
  38251. },
  38252. (rej) => {
  38253. }
  38254. );
  38255. },
  38256. addAddress() {
  38257. this.form.isDefault = this.isDefault ? 1 : 0;
  38258. addAddress(this.form).then(
  38259. (res) => {
  38260. if (res.code == 200) {
  38261. uni.showToast({
  38262. icon: "success",
  38263. title: "操作成功"
  38264. });
  38265. setTimeout(function() {
  38266. uni.$emit("refreshAddress");
  38267. uni.navigateBack({
  38268. delta: 1
  38269. });
  38270. }, 500);
  38271. } else {
  38272. uni.showToast({
  38273. icon: "none",
  38274. title: res.msg
  38275. });
  38276. }
  38277. },
  38278. (rej) => {
  38279. }
  38280. );
  38281. },
  38282. // 地区选择
  38283. pickerChange(e) {
  38284. this.multiIndex = e.detail.value;
  38285. this.form.address = this.addressList[0][this.multiIndex[0]].n + this.addressList[1][this.multiIndex[1]].n + this.addressList[2][this.multiIndex[2]].n;
  38286. this.form.province = this.addressList[0][this.multiIndex[0]].n;
  38287. this.form.city = this.addressList[1][this.multiIndex[1]].n;
  38288. this.form.district = this.addressList[2][this.multiIndex[2]].n;
  38289. this.form.cityId = this.addressList[1][this.multiIndex[1]].v;
  38290. },
  38291. pickerColumnchange(e) {
  38292. if (e.detail.column === 0) {
  38293. this.multiIndex[0] = e.detail.value;
  38294. this.addressList[1] = this.address[this.multiIndex[0]].c;
  38295. this.addressList[2] = this.address[this.multiIndex[0]].c[0].c;
  38296. this.multiIndex.splice(1, 1, 0);
  38297. this.multiIndex.splice(2, 1, 0);
  38298. }
  38299. if (e.detail.column === 1) {
  38300. this.multiIndex[1] = e.detail.value;
  38301. this.addressList[2] = this.address[this.multiIndex[0]].c[this.multiIndex[1]].c;
  38302. this.multiIndex.splice(2, 1, 0);
  38303. }
  38304. if (e.detail.column === 2) {
  38305. this.multiIndex[2] = e.detail.value;
  38306. }
  38307. },
  38308. getCitys() {
  38309. getCitys().then(
  38310. (res) => {
  38311. if (res.code == 200) {
  38312. this.address = res.data;
  38313. for (var i = 0; i < this.address.length; i++) {
  38314. this.addressList[0].push(this.address[i]);
  38315. }
  38316. for (var i = 0; i < this.address[0].c.length; i++) {
  38317. this.addressList[1].push(this.address[0].c[i]);
  38318. }
  38319. for (var i = 0; i < this.address[0].c[0].c.length; i++) {
  38320. this.addressList[2].push(this.address[0].c[0].c[i]);
  38321. }
  38322. } else {
  38323. uni.showToast({
  38324. icon: "none",
  38325. title: "请求失败"
  38326. });
  38327. }
  38328. },
  38329. (rej) => {
  38330. }
  38331. );
  38332. }
  38333. }
  38334. };
  38335. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  38336. const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
  38337. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  38338. vue.createElementVNode("view", { class: "inner" }, [
  38339. vue.createElementVNode("view", { class: "form-box" }, [
  38340. vue.createElementVNode("view", { class: "form-item" }, [
  38341. vue.createElementVNode("text", { class: "label" }, "收货人"),
  38342. vue.withDirectives(vue.createElementVNode(
  38343. "input",
  38344. {
  38345. type: "text",
  38346. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.realName = $event),
  38347. maxlength: "10",
  38348. placeholder: "请输入姓名",
  38349. class: "form-input"
  38350. },
  38351. null,
  38352. 512
  38353. /* NEED_PATCH */
  38354. ), [
  38355. [vue.vModelText, $data.form.realName]
  38356. ])
  38357. ]),
  38358. vue.createElementVNode("view", { class: "form-item" }, [
  38359. vue.createElementVNode("text", { class: "label" }, "手机号"),
  38360. vue.withDirectives(vue.createElementVNode(
  38361. "input",
  38362. {
  38363. type: "number",
  38364. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.phone = $event),
  38365. maxlength: "11",
  38366. placeholder: "请输入手机号",
  38367. class: "form-input"
  38368. },
  38369. null,
  38370. 512
  38371. /* NEED_PATCH */
  38372. ), [
  38373. [vue.vModelText, $data.form.phone]
  38374. ])
  38375. ]),
  38376. vue.createElementVNode("view", { class: "form-item" }, [
  38377. vue.createElementVNode("text", { class: "label" }, "所在地区"),
  38378. vue.createElementVNode("picker", {
  38379. value: $data.multiIndex,
  38380. class: "birth-picker",
  38381. mode: "multiSelector",
  38382. "range-key": "n",
  38383. range: $data.addressList,
  38384. onChange: _cache[3] || (_cache[3] = (...args) => $options.pickerChange && $options.pickerChange(...args)),
  38385. onColumnchange: _cache[4] || (_cache[4] = (...args) => $options.pickerColumnchange && $options.pickerColumnchange(...args))
  38386. }, [
  38387. vue.createElementVNode("view", { class: "right-box" }, [
  38388. vue.createElementVNode("view", { class: "input-box" }, [
  38389. vue.withDirectives(vue.createElementVNode(
  38390. "input",
  38391. {
  38392. type: "text",
  38393. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.address = $event),
  38394. placeholder: "请选择省市区",
  38395. class: "form-input",
  38396. disabled: "disabled"
  38397. },
  38398. null,
  38399. 512
  38400. /* NEED_PATCH */
  38401. ), [
  38402. [vue.vModelText, $data.form.address]
  38403. ])
  38404. ]),
  38405. vue.createElementVNode("image", {
  38406. class: "arrow",
  38407. src: "/static/images/arrow_gray.png",
  38408. mode: ""
  38409. })
  38410. ])
  38411. ], 40, ["value", "range"])
  38412. ]),
  38413. vue.createElementVNode("view", { class: "form-item" }, [
  38414. vue.createElementVNode("text", { class: "label" }, "详细地址"),
  38415. vue.withDirectives(vue.createElementVNode(
  38416. "input",
  38417. {
  38418. type: "text",
  38419. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.detail = $event),
  38420. placeholder: "请输入详细地址",
  38421. class: "form-input"
  38422. },
  38423. null,
  38424. 512
  38425. /* NEED_PATCH */
  38426. ), [
  38427. [vue.vModelText, $data.form.detail]
  38428. ])
  38429. ])
  38430. ]),
  38431. vue.createElementVNode("view", { class: "address-box" }, [
  38432. vue.withDirectives(vue.createElementVNode(
  38433. "textarea",
  38434. {
  38435. class: "textarea",
  38436. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.content = $event),
  38437. placeholder: "请粘贴或输入文本,点击'识别'自动识别姓名、电话、地址,格式:深圳市龙岗区坂田街道长坑路西2巷2号202 黄大大 18888888888"
  38438. },
  38439. null,
  38440. 512
  38441. /* NEED_PATCH */
  38442. ), [
  38443. [vue.vModelText, $data.content]
  38444. ]),
  38445. vue.createElementVNode("view", { class: "btns" }, [
  38446. vue.createElementVNode("view", {
  38447. class: "btn parse",
  38448. onClick: _cache[7] || (_cache[7] = ($event) => $options.parseAddress())
  38449. }, "识别")
  38450. ])
  38451. ]),
  38452. vue.createCommentVNode(" 设为默认地址 "),
  38453. vue.createElementVNode("view", { class: "setting-box" }, [
  38454. vue.createElementVNode("text", { class: "label" }, "设为默认地址"),
  38455. vue.createVNode(_component_u_switch, {
  38456. modelValue: $data.isDefault,
  38457. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.isDefault = $event),
  38458. activeColor: "#C39A58"
  38459. }, null, 8, ["modelValue"])
  38460. ])
  38461. ]),
  38462. vue.createElementVNode("view", { class: "btn-box" }, [
  38463. vue.createElementVNode("view", {
  38464. class: "sub-btn",
  38465. onClick: _cache[9] || (_cache[9] = ($event) => $options.submit())
  38466. }, "保存地址")
  38467. ])
  38468. ]);
  38469. }
  38470. const Pages_userAddEditAddress = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/addEditAddress.vue"]]);
  38471. const _sfc_main$C = {
  38472. data() {
  38473. return {
  38474. user: {
  38475. avatar: null,
  38476. phone: ""
  38477. }
  38478. };
  38479. },
  38480. onLoad() {
  38481. this.getUserInfo();
  38482. },
  38483. methods: {
  38484. bindblur(e) {
  38485. this.user.nickName = e.detail.value;
  38486. },
  38487. bindinput(e) {
  38488. this.user.nickName = e.detail.value;
  38489. },
  38490. onChooseAvatar(e) {
  38491. let {
  38492. avatarUrl
  38493. } = e.detail;
  38494. uni.uploadFile({
  38495. url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
  38496. //仅为示例,非真实的接口地址
  38497. filePath: avatarUrl,
  38498. name: "file",
  38499. formData: {
  38500. "user": "test"
  38501. // 上传附带参数
  38502. },
  38503. success: (uploadFileRes) => {
  38504. this.user.avatar = JSON.parse(uploadFileRes.data).url;
  38505. }
  38506. });
  38507. },
  38508. // chooseImage() {
  38509. // var that = this;
  38510. // uni.chooseImage({
  38511. // count: 1, // 默认9
  38512. // sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  38513. // sourceType: ['album', 'camera'], //从相册选择
  38514. // success: (res) => {
  38515. // uni.uploadFile({
  38516. // url: uni.getStorageSync('requestPath')+'/api/common/uploadOSS', //仅为示例,非真实的接口地址
  38517. // filePath: res.tempFilePaths[0],
  38518. // name: 'file',
  38519. // formData: {
  38520. // 'user': 'test' // 上传附带参数
  38521. // },
  38522. // success: (uploadFileRes) => {
  38523. // __f__('log','at pages_user/personInfo.vue:86',uploadFileRes)
  38524. // this.user.avatar =JSON.parse(uploadFileRes.data).data.url
  38525. // }
  38526. // });
  38527. // }
  38528. // });
  38529. // },
  38530. submit() {
  38531. editUser(this.user).then(
  38532. (res) => {
  38533. if (res.code == 200) {
  38534. uni.setStorageSync("avatar", this.avatar);
  38535. uni.setStorageSync("nickName", this.nickName);
  38536. uni.showToast({
  38537. icon: "success",
  38538. title: "修改成功"
  38539. });
  38540. this.getUserInfo();
  38541. } else {
  38542. uni.showToast({
  38543. icon: "none",
  38544. title: "请求失败"
  38545. });
  38546. }
  38547. },
  38548. (rej) => {
  38549. }
  38550. );
  38551. },
  38552. getUserInfo() {
  38553. getUserInfo$1().then(
  38554. (res) => {
  38555. if (res.code == 200) {
  38556. if (res.user != null) {
  38557. this.user = res.user;
  38558. } else {
  38559. this.utils.loginOut();
  38560. }
  38561. } else {
  38562. uni.showToast({
  38563. icon: "none",
  38564. title: "请求失败"
  38565. });
  38566. }
  38567. },
  38568. (rej) => {
  38569. }
  38570. );
  38571. }
  38572. }
  38573. };
  38574. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  38575. return vue.openBlock(), vue.createElementBlock("view", null, [
  38576. vue.createElementVNode("view", { class: "content" }, [
  38577. vue.createElementVNode("view", { class: "info-item" }, [
  38578. vue.createElementVNode("view", { class: "label" }, "头像"),
  38579. vue.createElementVNode("view", { class: "right" }, [
  38580. vue.createElementVNode("image", {
  38581. class: "head",
  38582. src: $data.user.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.user.avatar,
  38583. mode: ""
  38584. }, null, 8, ["src"]),
  38585. vue.createElementVNode(
  38586. "button",
  38587. {
  38588. class: "wx-head",
  38589. type: "balanced",
  38590. "open-type": "chooseAvatar",
  38591. onChooseavatar: _cache[0] || (_cache[0] = (...args) => $options.onChooseAvatar && $options.onChooseAvatar(...args))
  38592. },
  38593. null,
  38594. 32
  38595. /* NEED_HYDRATION */
  38596. )
  38597. ])
  38598. ]),
  38599. vue.createElementVNode("view", { class: "info-item" }, [
  38600. vue.createElementVNode("view", { class: "label" }, "昵称"),
  38601. vue.createElementVNode("view", { class: "right" }, [
  38602. vue.withDirectives(vue.createElementVNode(
  38603. "input",
  38604. {
  38605. type: "nickname",
  38606. onBlur: _cache[1] || (_cache[1] = (...args) => $options.bindblur && $options.bindblur(...args)),
  38607. onInput: _cache[2] || (_cache[2] = (...args) => $options.bindinput && $options.bindinput(...args)),
  38608. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.user.nickName = $event),
  38609. class: "input"
  38610. },
  38611. null,
  38612. 544
  38613. /* NEED_HYDRATION, NEED_PATCH */
  38614. ), [
  38615. [vue.vModelText, $data.user.nickName]
  38616. ]),
  38617. vue.createElementVNode("image", {
  38618. class: "image",
  38619. src: "/static/images/icon_edit.png",
  38620. mode: ""
  38621. })
  38622. ])
  38623. ]),
  38624. vue.createElementVNode("view", { class: "info-item" }, [
  38625. vue.createElementVNode("view", { class: "label" }, "手机号"),
  38626. vue.createElementVNode("view", { class: "right" }, [
  38627. $data.user != null ? (vue.openBlock(), vue.createElementBlock(
  38628. "text",
  38629. {
  38630. key: 0,
  38631. class: "text"
  38632. },
  38633. vue.toDisplayString(_ctx.$parsePhone($data.user.phone)),
  38634. 1
  38635. /* TEXT */
  38636. )) : vue.createCommentVNode("v-if", true),
  38637. vue.createElementVNode("image", {
  38638. class: "image",
  38639. src: "/static/images/icon_lock.png",
  38640. mode: ""
  38641. })
  38642. ])
  38643. ])
  38644. ]),
  38645. vue.createElementVNode("view", { class: "btn-box" }, [
  38646. vue.createElementVNode("view", {
  38647. class: "btn",
  38648. onClick: _cache[4] || (_cache[4] = ($event) => $options.submit())
  38649. }, "保存修改")
  38650. ])
  38651. ]);
  38652. }
  38653. const Pages_userPersonInfo = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-082ee3d6"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/personInfo.vue"]]);
  38654. const block0 = (Comp) => {
  38655. (Comp.$wxs || (Comp.$wxs = [])).push("handler");
  38656. (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "174adfb2";
  38657. };
  38658. function getTop(e) {
  38659. let top;
  38660. top = e.touches[0].pageY;
  38661. if (top - e.currentTarget.offsetTop < 150)
  38662. top = e.currentTarget.offsetTop;
  38663. if (top < 30)
  38664. top += 70;
  38665. return top - 30;
  38666. }
  38667. const _sfc_main$B = {
  38668. name: "node",
  38669. options: {},
  38670. data() {
  38671. return {
  38672. ctrl: {}
  38673. };
  38674. },
  38675. props: {
  38676. name: String,
  38677. attrs: {
  38678. type: Object,
  38679. default() {
  38680. return {};
  38681. }
  38682. },
  38683. childs: Array,
  38684. opts: Array
  38685. },
  38686. components: {
  38687. node
  38688. },
  38689. mounted() {
  38690. this.$nextTick(() => {
  38691. for (this.root = this.$parent; this.root.$options.name !== "mp-html"; this.root = this.root.$parent)
  38692. ;
  38693. });
  38694. if (this.opts[0]) {
  38695. let i;
  38696. for (i = this.childs.length; i--; ) {
  38697. if (this.childs[i].name === "img")
  38698. break;
  38699. }
  38700. if (i !== -1) {
  38701. this.observer = uni.createIntersectionObserver(this).relativeToViewport({
  38702. top: 500,
  38703. bottom: 500
  38704. });
  38705. this.observer.observe("._img", (res) => {
  38706. if (res.intersectionRatio) {
  38707. this.$set(this.ctrl, "load", 1);
  38708. this.observer.disconnect();
  38709. }
  38710. });
  38711. }
  38712. }
  38713. },
  38714. beforeDestroy() {
  38715. if (this.root._edit === this) {
  38716. this.root._edit = void 0;
  38717. }
  38718. if (this.observer) {
  38719. this.observer.disconnect();
  38720. }
  38721. },
  38722. methods: {
  38723. editStart(e) {
  38724. if (this.opts[5]) {
  38725. const i = e.currentTarget.dataset.i;
  38726. if (!this.ctrl["e" + i]) {
  38727. this.$set(this.ctrl, "e" + i, 1);
  38728. setTimeout(() => {
  38729. this.root._mask.push(() => this.$set(this.ctrl, "e" + i, 0));
  38730. }, 50);
  38731. this.root._edit = this;
  38732. this.i = i;
  38733. this.cursor = this.childs[i].text.length;
  38734. } else {
  38735. this.root._mask.pop();
  38736. this.root._maskTap();
  38737. this.$set(this.ctrl, "e" + i, 2);
  38738. setTimeout(() => {
  38739. this.$set(this.ctrl, "e" + i, 3);
  38740. }, 50);
  38741. }
  38742. }
  38743. },
  38744. editInput(e) {
  38745. const i = e.target.dataset.i;
  38746. const value2 = e.detail.value.replace(/ {2,}/, ($) => {
  38747. let res = " ";
  38748. for (let i2 = 1; i2 < $.length; i2++) {
  38749. res += " ";
  38750. }
  38751. return res;
  38752. });
  38753. this.root._editVal(`${this.opts[7]}.${i}.text`, this.childs[i].text, value2);
  38754. this.cursor = e.detail.cursor;
  38755. },
  38756. editEnd(e) {
  38757. const i = e.target.dataset.i;
  38758. this.$set(this.ctrl, "e" + i, 0);
  38759. this.root._setData(`${this.opts[7]}.${i}.text`, e.detail.value.replace(/ {2}/g, "  "));
  38760. if (e.detail.cursor !== void 0) {
  38761. this.cursor = e.detail.cursor;
  38762. }
  38763. },
  38764. insert(node2) {
  38765. setTimeout(() => {
  38766. const childs = this.childs.slice(0);
  38767. if (!childs[this.i]) {
  38768. childs.push(node2);
  38769. } else if (childs[this.i].text) {
  38770. const text = childs[this.i].text;
  38771. const list = [];
  38772. if (this.cursor) {
  38773. list.push({
  38774. type: "text",
  38775. text: text.substring(0, this.cursor)
  38776. });
  38777. }
  38778. list.push(node2);
  38779. if (this.cursor < text.length) {
  38780. list.push({
  38781. type: "text",
  38782. text: text.substring(this.cursor)
  38783. });
  38784. }
  38785. childs.splice(this.i, 1, ...list);
  38786. } else {
  38787. childs.splice(parseInt(this.i) + 1, 0, node2);
  38788. }
  38789. this.root._editVal(this.opts[7], this.childs, childs, true);
  38790. this.i = parseInt(this.i) + 1;
  38791. }, 200);
  38792. },
  38793. remove(i) {
  38794. const arr = this.childs.slice(0);
  38795. const delEle = arr.splice(i, 1)[0];
  38796. if (delEle.name === "img" || delEle.name === "video" || delEle.name === "audio") {
  38797. let src = delEle.attrs.src;
  38798. if (delEle.src) {
  38799. src = delEle.src.length === 1 ? delEle.src[0] : delEle.src;
  38800. }
  38801. this.root.$emit("remove", {
  38802. type: delEle.name,
  38803. src
  38804. });
  38805. }
  38806. this.root._edit = void 0;
  38807. this.root._maskTap();
  38808. this.root._editVal(this.opts[7], this.childs, arr, true);
  38809. },
  38810. nodeTap(e) {
  38811. if (this.opts[5]) {
  38812. if (this.root._lock)
  38813. return;
  38814. this.root._lock = true;
  38815. setTimeout(() => {
  38816. this.root._lock = false;
  38817. }, 50);
  38818. if (this.ctrl["e" + this.i] === 3)
  38819. return;
  38820. this.root._maskTap();
  38821. this.root._edit = this;
  38822. let start = this.opts[7].lastIndexOf("children.");
  38823. if (start !== -1) {
  38824. start += 9;
  38825. } else {
  38826. start = 6;
  38827. }
  38828. const i = parseInt(this.opts[7].substring(start, this.opts[7].lastIndexOf(".children")));
  38829. let parent = this.$parent;
  38830. while (parent && parent.$options.name !== "node") {
  38831. parent = parent.$parent;
  38832. }
  38833. if (!parent || this.opts[7].length - parent.opts[7].length > 15)
  38834. return;
  38835. this.$set(this.ctrl, "root", 1);
  38836. this.root._mask.push(() => this.$set(this.ctrl, "root", 0));
  38837. if (this.childs.length === 1 && this.childs[0].type === "text" && !this.ctrl.e0) {
  38838. this.$set(this.ctrl, "e0", 1);
  38839. this.root._mask.push(() => this.$set(this.ctrl, "e0", 0));
  38840. this.i = 0;
  38841. this.cursor = this.childs[0].text.length;
  38842. }
  38843. const items = this.root._getItem(parent.childs[i], i !== 0, i !== parent.childs.length - 1);
  38844. this.root._tooltip({
  38845. top: getTop(e),
  38846. items,
  38847. success: (tapIndex) => {
  38848. if (items[tapIndex] === "大小") {
  38849. const style = parent.childs[i].attrs.style || "";
  38850. let value2 = style.match(/;font-size:([0-9]+)px/);
  38851. if (value2) {
  38852. value2 = parseInt(value2[1]);
  38853. } else {
  38854. value2 = 16;
  38855. }
  38856. this.root._slider({
  38857. min: 10,
  38858. max: 30,
  38859. value: value2,
  38860. top: getTop(e),
  38861. changing: (val) => {
  38862. if (Math.abs(val - value2) > 2) {
  38863. parent.changeStyle("font-size", i, val + "px", value2 + "px");
  38864. value2 = e.detail.value;
  38865. }
  38866. },
  38867. change: (val) => {
  38868. if (val !== value2) {
  38869. parent.changeStyle("font-size", i, val + "px", value2 + "px");
  38870. }
  38871. this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, parent.childs[i].attrs.style);
  38872. }
  38873. });
  38874. } else if (items[tapIndex] === "上移" || items[tapIndex] === "下移") {
  38875. const arr = parent.childs.slice(0);
  38876. const item = arr[i];
  38877. if (items[tapIndex] === "上移") {
  38878. arr[i] = arr[i - 1];
  38879. arr[i - 1] = item;
  38880. } else {
  38881. arr[i] = arr[i + 1];
  38882. arr[i + 1] = item;
  38883. }
  38884. this.root._editVal(parent.opts[7], parent.childs, arr, true);
  38885. } else if (items[tapIndex] === "删除") {
  38886. parent.remove(i);
  38887. } else {
  38888. const style = parent.childs[i].attrs.style || "";
  38889. let newStyle = "";
  38890. const item = items[tapIndex];
  38891. let name;
  38892. let value2;
  38893. if (item === "斜体") {
  38894. name = "font-style";
  38895. value2 = "italic";
  38896. } else if (item === "粗体") {
  38897. name = "font-weight";
  38898. value2 = "bold";
  38899. } else if (item === "下划线") {
  38900. name = "text-decoration";
  38901. value2 = "underline";
  38902. } else if (item === "居中") {
  38903. name = "text-align";
  38904. value2 = "center";
  38905. } else if (item === "缩进") {
  38906. name = "text-indent";
  38907. value2 = "2em";
  38908. }
  38909. if (style.includes(name + ":")) {
  38910. newStyle = style.replace(new RegExp(name + ":[^;]+"), "");
  38911. } else {
  38912. newStyle = style + ";" + name + ":" + value2;
  38913. }
  38914. this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, newStyle, true);
  38915. }
  38916. }
  38917. });
  38918. }
  38919. },
  38920. mediaTap(e) {
  38921. if (this.opts[5]) {
  38922. const i = e.target.dataset.i;
  38923. const node2 = this.childs[i];
  38924. const items = this.root._getItem(node2);
  38925. this.root._edit = this;
  38926. this.i = i;
  38927. this.root._tooltip({
  38928. top: e.target.offsetTop - 30,
  38929. items,
  38930. success: (tapIndex) => {
  38931. switch (items[tapIndex]) {
  38932. case "封面":
  38933. this.root.getSrc("img", node2.attrs.poster || "").then((url2) => {
  38934. this.root._editVal(`${this.opts[7]}.${i}.attrs.poster`, node2.attrs.poster, url2 instanceof Array ? url2[0] : url2, true);
  38935. }).catch(() => {
  38936. });
  38937. break;
  38938. case "删除":
  38939. this.remove(i);
  38940. break;
  38941. case "循环":
  38942. case "不循环":
  38943. this.root._setData(`${this.opts[7]}.${i}.attrs.loop`, !node2.attrs.loop);
  38944. uni.showToast({
  38945. title: "成功"
  38946. });
  38947. break;
  38948. case "自动播放":
  38949. case "不自动播放":
  38950. this.root._setData(`${this.opts[7]}.${i}.attrs.autoplay`, !node2.attrs.autoplay);
  38951. uni.showToast({
  38952. title: "成功"
  38953. });
  38954. break;
  38955. }
  38956. }
  38957. });
  38958. this.root._lock = true;
  38959. setTimeout(() => {
  38960. this.root._lock = false;
  38961. }, 50);
  38962. }
  38963. },
  38964. changeStyle(name, i, value2, oldVal) {
  38965. let style = this.childs[i].attrs.style || "";
  38966. if (style.includes(";" + name + ":" + oldVal)) {
  38967. style = style.replace(";" + name + ":" + oldVal, ";" + name + ":" + value2);
  38968. } else {
  38969. style += ";" + name + ":" + value2;
  38970. }
  38971. this.root._setData(`${this.opts[7]}.${i}.attrs.style`, style);
  38972. },
  38973. /**
  38974. * @description 播放视频事件
  38975. * @param {Event} e
  38976. */
  38977. play(e) {
  38978. this.root.$emit("play");
  38979. },
  38980. /**
  38981. * @description 图片点击事件
  38982. * @param {Event} e
  38983. */
  38984. imgTap(e) {
  38985. if (!this.opts[5]) {
  38986. const node2 = this.childs[e.currentTarget.dataset.i];
  38987. if (node2.a) {
  38988. this.linkTap(node2.a);
  38989. return;
  38990. }
  38991. if (node2.attrs.ignore)
  38992. return;
  38993. node2.attrs.src = node2.attrs.src || node2.attrs["data-src"];
  38994. this.root.$emit("imgtap", node2.attrs);
  38995. if (this.root.previewImg) {
  38996. uni.previewImage({
  38997. current: parseInt(node2.attrs.i),
  38998. urls: this.root.imgList
  38999. });
  39000. }
  39001. } else {
  39002. const i = e.currentTarget.dataset.i;
  39003. const node2 = this.childs[i];
  39004. const items = this.root._getItem(node2);
  39005. this.root._edit = this;
  39006. this.i = i;
  39007. this.root._maskTap();
  39008. this.$set(this.ctrl, "e" + i, 1);
  39009. this.root._mask.push(() => this.$set(this.ctrl, "e" + i, 0));
  39010. this.root._tooltip({
  39011. top: getTop(e),
  39012. items,
  39013. success: (tapIndex) => {
  39014. if (items[tapIndex] === "换图") {
  39015. this.root.getSrc("img", node2.attrs.src || "").then((url2) => {
  39016. this.root._editVal(this.opts[7] + "." + i + ".attrs.src", node2.attrs.src, url2 instanceof Array ? url2[0] : url2, true);
  39017. }).catch(() => {
  39018. });
  39019. } else if (items[tapIndex] === "宽度") {
  39020. const style = node2.attrs.style || "";
  39021. let value2 = style.match(/max-width:([0-9]+)%/);
  39022. if (value2) {
  39023. value2 = parseInt(value2[1]);
  39024. } else {
  39025. value2 = 100;
  39026. }
  39027. this.root._slider({
  39028. min: 0,
  39029. max: 100,
  39030. value: value2,
  39031. top: getTop(e),
  39032. changing: (val) => {
  39033. if (Math.abs(val - value2) > 5) {
  39034. this.changeStyle("max-width", i, val + "%", value2 + "%");
  39035. value2 = val;
  39036. }
  39037. },
  39038. change: (val) => {
  39039. if (val !== value2) {
  39040. this.changeStyle("max-width", i, val + "%", value2 + "%");
  39041. value2 = val;
  39042. }
  39043. this.root._editVal(this.opts[7] + "." + i + ".attrs.style", style, this.childs[i].attrs.style);
  39044. }
  39045. });
  39046. } else if (items[tapIndex] === "超链接") {
  39047. this.root.getSrc("link", node2.a ? node2.a.href : "").then((url2) => {
  39048. if (node2.a) {
  39049. this.root._editVal(this.opts[7] + "." + i + ".a.href", node2.a.href, url2, true);
  39050. } else {
  39051. const link = {
  39052. name: "a",
  39053. attrs: {
  39054. href: url2
  39055. },
  39056. children: [node2]
  39057. };
  39058. node2.a = link.attrs;
  39059. this.root._editVal(this.opts[7] + "." + i, node2, link, true);
  39060. }
  39061. wx.showToast({
  39062. title: "成功"
  39063. });
  39064. }).catch(() => {
  39065. });
  39066. } else if (items[tapIndex] === "预览图") {
  39067. this.root.getSrc("img", node2.attrs["original-src"] || "").then((url2) => {
  39068. this.root._editVal(this.opts[7] + "." + i + ".attrs.original-src", node2.attrs["original-src"], url2 instanceof Array ? url2[0] : url2, true);
  39069. uni.showToast({
  39070. title: "成功"
  39071. });
  39072. }).catch(() => {
  39073. });
  39074. } else if (items[tapIndex] === "删除") {
  39075. this.remove(i);
  39076. } else {
  39077. this.root._setData(this.opts[7] + "." + i + ".attrs.ignore", !node2.attrs.ignore);
  39078. uni.showToast({
  39079. title: "成功"
  39080. });
  39081. }
  39082. }
  39083. });
  39084. this.root._lock = true;
  39085. setTimeout(() => {
  39086. this.root._lock = false;
  39087. }, 50);
  39088. }
  39089. },
  39090. /**
  39091. * @description 图片长按
  39092. */
  39093. imgLongTap(e) {
  39094. const attrs = this.childs[e.currentTarget.dataset.i].attrs;
  39095. if (this.opts[3] && !attrs.ignore) {
  39096. uni.showActionSheet({
  39097. itemList: ["保存图片"],
  39098. success: () => {
  39099. const save = (path) => {
  39100. uni.saveImageToPhotosAlbum({
  39101. filePath: path,
  39102. success() {
  39103. uni.showToast({
  39104. title: "保存成功"
  39105. });
  39106. }
  39107. });
  39108. };
  39109. if (this.root.imgList[attrs.i].startsWith("http")) {
  39110. uni.downloadFile({
  39111. url: this.root.imgList[attrs.i],
  39112. success: (res) => save(res.tempFilePath)
  39113. });
  39114. } else {
  39115. save(this.root.imgList[attrs.i]);
  39116. }
  39117. }
  39118. });
  39119. }
  39120. },
  39121. /**
  39122. * @description 图片加载完成事件
  39123. * @param {Event} e
  39124. */
  39125. imgLoad(e) {
  39126. const i = e.currentTarget.dataset.i;
  39127. if (!this.childs[i].w) {
  39128. this.$set(this.ctrl, i, e.detail.width);
  39129. if (this.opts[5]) {
  39130. const path = this.opts[7] + "." + i + ".attrs.";
  39131. if (e.detail.width < 150)
  39132. this.root._setData(path + "ignore", "T");
  39133. this.root._setData(path + "width", e.detail.width.toString());
  39134. }
  39135. } else if (this.opts[1] && !this.ctrl[i] || this.ctrl[i] === -1) {
  39136. this.$set(this.ctrl, i, 1);
  39137. }
  39138. },
  39139. /**
  39140. * @description 链接点击事件
  39141. * @param {Event} e
  39142. */
  39143. linkTap(e) {
  39144. if (!this.opts[5]) {
  39145. const node2 = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {};
  39146. const attrs = node2.attrs || e;
  39147. const href = attrs.href;
  39148. this.root.$emit("linktap", Object.assign({
  39149. innerText: this.root.getText(node2.children || [])
  39150. // 链接内的文本内容
  39151. }, attrs));
  39152. if (href) {
  39153. if (href[0] === "#") {
  39154. this.root.navigateTo(href.substring(1)).catch(() => {
  39155. });
  39156. } else if (href.split("?")[0].includes("://")) {
  39157. if (this.root.copyLink) {
  39158. plus.runtime.openWeb(href);
  39159. }
  39160. } else {
  39161. uni.navigateTo({
  39162. url: href,
  39163. fail() {
  39164. uni.switchTab({
  39165. url: href,
  39166. fail() {
  39167. }
  39168. });
  39169. }
  39170. });
  39171. }
  39172. }
  39173. } else {
  39174. const i = e.currentTarget.dataset.i;
  39175. const node2 = this.childs[i];
  39176. const items = this.root._getItem(node2);
  39177. this.root._tooltip({
  39178. top: getTop(e),
  39179. items,
  39180. success: (tapIndex) => {
  39181. if (items[tapIndex] === "更换链接") {
  39182. this.root.getSrc("link", node2.attrs.href).then((url2) => {
  39183. this.root._editVal(this.opts[7] + "." + i + ".attrs.href", node2.attrs.href, url2, true);
  39184. uni.showToast({
  39185. title: "成功"
  39186. });
  39187. }).catch(() => {
  39188. });
  39189. } else {
  39190. this.remove(i);
  39191. }
  39192. }
  39193. });
  39194. }
  39195. },
  39196. /**
  39197. * @description 错误事件
  39198. * @param {Event} e
  39199. */
  39200. mediaError(e) {
  39201. const i = e.currentTarget.dataset.i;
  39202. const node2 = this.childs[i];
  39203. if (node2.name === "video" || node2.name === "audio") {
  39204. let index2 = (this.ctrl[i] || 0) + 1;
  39205. if (index2 > node2.src.length) {
  39206. index2 = 0;
  39207. }
  39208. if (index2 < node2.src.length) {
  39209. this.$set(this.ctrl, i, index2);
  39210. return;
  39211. }
  39212. } else if (node2.name === "img") {
  39213. if (this.opts[2]) {
  39214. this.$set(this.ctrl, i, -1);
  39215. }
  39216. }
  39217. if (this.root) {
  39218. this.root.$emit("error", {
  39219. source: node2.name,
  39220. attrs: node2.attrs,
  39221. errMsg: e.detail.errMsg
  39222. });
  39223. }
  39224. }
  39225. }
  39226. };
  39227. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  39228. const _component_node = vue.resolveComponent("node", true);
  39229. return vue.openBlock(), vue.createElementBlock("view", {
  39230. onClick: _cache[11] || (_cache[11] = (...args) => $options.nodeTap && $options.nodeTap(...args)),
  39231. id: $props.attrs.id,
  39232. class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class),
  39233. style: vue.normalizeStyle(($data.ctrl.root ? "border:1px solid black;padding:5px;display:block;" : "") + $props.attrs.style)
  39234. }, [
  39235. (vue.openBlock(true), vue.createElementBlock(
  39236. vue.Fragment,
  39237. null,
  39238. vue.renderList($props.childs, (n, i) => {
  39239. return vue.openBlock(), vue.createElementBlock(
  39240. vue.Fragment,
  39241. { key: i },
  39242. [
  39243. vue.createCommentVNode(" 图片 "),
  39244. vue.createCommentVNode(" 占位图 "),
  39245. n.name === "img" && ($props.opts[1] && !$data.ctrl[i] || $data.ctrl[i] < 0) ? (vue.openBlock(), vue.createElementBlock("image", {
  39246. key: 0,
  39247. class: "_img",
  39248. style: vue.normalizeStyle(n.attrs.style),
  39249. src: $data.ctrl[i] < 0 ? $props.opts[2] : $props.opts[1],
  39250. mode: "widthFix"
  39251. }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
  39252. vue.createCommentVNode(" 显示图片 "),
  39253. n.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", {
  39254. key: 1,
  39255. id: n.attrs.id,
  39256. class: vue.normalizeClass("_img " + n.attrs.class),
  39257. style: vue.normalizeStyle(($data.ctrl["e" + i] ? "border:1px dashed black;padding:3px;" : "") + ($data.ctrl[i] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i] || 1) + "px;" + n.attrs.style),
  39258. src: n.attrs.src || ($data.ctrl.load ? n.attrs["data-src"] : ""),
  39259. mode: !n.h ? "widthFix" : !n.w ? "heightFix" : "",
  39260. "data-i": i,
  39261. onLoad: _cache[0] || (_cache[0] = (...args) => $options.imgLoad && $options.imgLoad(...args)),
  39262. onError: _cache[1] || (_cache[1] = (...args) => $options.mediaError && $options.mediaError(...args)),
  39263. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])),
  39264. onLongpress: _cache[3] || (_cache[3] = (...args) => $options.imgLongTap && $options.imgLongTap(...args))
  39265. }, null, 46, ["id", "src", "mode", "data-i"])) : n.type === "text" && !$data.ctrl["e" + i] ? (vue.openBlock(), vue.createElementBlock(
  39266. vue.Fragment,
  39267. { key: 2 },
  39268. [
  39269. vue.createCommentVNode(" 文本 "),
  39270. vue.createElementVNode("text", {
  39271. "data-i": i,
  39272. "user-select": $props.opts[4],
  39273. decode: !$props.opts[5],
  39274. onClick: _cache[4] || (_cache[4] = (...args) => $options.editStart && $options.editStart(...args))
  39275. }, [
  39276. vue.createTextVNode(
  39277. vue.toDisplayString(n.text) + " ",
  39278. 1
  39279. /* TEXT */
  39280. ),
  39281. !n.text ? (vue.openBlock(), vue.createElementBlock(
  39282. "text",
  39283. {
  39284. key: 0,
  39285. style: { "color": "gray" }
  39286. },
  39287. vue.toDisplayString($props.opts[6] || "请输入"),
  39288. 1
  39289. /* TEXT */
  39290. )) : vue.createCommentVNode("v-if", true)
  39291. ], 8, ["data-i", "user-select", "decode"])
  39292. ],
  39293. 2112
  39294. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  39295. )) : n.type === "text" && $data.ctrl["e" + i] === 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  39296. key: 3,
  39297. "data-i": i,
  39298. style: { "border": "1px dashed black", "min-width": "50px", "width": "auto", "padding": "5px", "display": "block" },
  39299. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.editStart && $options.editStart(...args), ["stop"]))
  39300. }, [
  39301. vue.createTextVNode(
  39302. vue.toDisplayString(n.text) + " ",
  39303. 1
  39304. /* TEXT */
  39305. ),
  39306. !n.text ? (vue.openBlock(), vue.createElementBlock(
  39307. "text",
  39308. {
  39309. key: 0,
  39310. style: { "color": "gray" }
  39311. },
  39312. vue.toDisplayString($props.opts[6] || "请输入"),
  39313. 1
  39314. /* TEXT */
  39315. )) : vue.createCommentVNode("v-if", true)
  39316. ], 8, ["data-i"])) : n.type === "text" ? (vue.openBlock(), vue.createElementBlock("textarea", {
  39317. key: 4,
  39318. style: { "border": "1px dashed black", "min-width": "50px", "width": "auto", "padding": "5px" },
  39319. "auto-height": "",
  39320. maxlength: "-1",
  39321. focus: $data.ctrl["e" + i] === 3,
  39322. value: n.text,
  39323. "data-i": i,
  39324. onInput: _cache[6] || (_cache[6] = (...args) => $options.editInput && $options.editInput(...args)),
  39325. onBlur: _cache[7] || (_cache[7] = (...args) => $options.editEnd && $options.editEnd(...args))
  39326. }, null, 40, ["focus", "value", "data-i"])) : n.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 5 }, "\\n")) : n.name === "a" ? (vue.openBlock(), vue.createElementBlock(
  39327. vue.Fragment,
  39328. { key: 6 },
  39329. [
  39330. vue.createCommentVNode(" 链接 "),
  39331. vue.createElementVNode("view", {
  39332. id: n.attrs.id,
  39333. class: vue.normalizeClass((n.attrs.href ? "_a " : "") + n.attrs.class),
  39334. "hover-class": "_hover",
  39335. style: vue.normalizeStyle("display:inline;" + n.attrs.style),
  39336. "data-i": i,
  39337. onClick: _cache[8] || (_cache[8] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"]))
  39338. }, [
  39339. vue.createVNode(_component_node, {
  39340. name: "span",
  39341. childs: n.children,
  39342. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children"],
  39343. style: { "display": "inherit" }
  39344. }, null, 8, ["childs", "opts"])
  39345. ], 14, ["id", "data-i"])
  39346. ],
  39347. 2112
  39348. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  39349. )) : n.html ? (vue.openBlock(), vue.createElementBlock(
  39350. vue.Fragment,
  39351. { key: 7 },
  39352. [
  39353. vue.createCommentVNode(" 视频 "),
  39354. vue.createElementVNode("view", {
  39355. "data-i": i,
  39356. onClick: _cache[9] || (_cache[9] = (...args) => $options.mediaTap && $options.mediaTap(...args)),
  39357. id: n.attrs.id,
  39358. class: vue.normalizeClass("_video " + n.attrs.class),
  39359. style: vue.normalizeStyle(n.attrs.style),
  39360. innerHTML: n.html,
  39361. onVplay: _cache[10] || (_cache[10] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"]))
  39362. }, null, 46, ["data-i", "id", "innerHTML"])
  39363. ],
  39364. 2112
  39365. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  39366. )) : n.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", {
  39367. key: 8,
  39368. style: vue.normalizeStyle(n.attrs.style),
  39369. allowfullscreen: n.attrs.allowfullscreen,
  39370. frameborder: n.attrs.frameborder,
  39371. src: n.attrs.src
  39372. }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", {
  39373. key: 9,
  39374. style: vue.normalizeStyle(n.attrs.style),
  39375. src: n.attrs.src
  39376. }, null, 12, ["src"])) : n.name === "table" && (n.c || $props.opts[5]) || n.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", {
  39377. key: 10,
  39378. id: n.attrs.id,
  39379. class: vue.normalizeClass("_" + n.name + " " + n.attrs.class),
  39380. style: vue.normalizeStyle(n.attrs.style)
  39381. }, [
  39382. n.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, {
  39383. key: 0,
  39384. childs: n.children,
  39385. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children"]
  39386. }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
  39387. vue.Fragment,
  39388. { key: 1 },
  39389. vue.renderList(n.children, (tbody, x) => {
  39390. return vue.openBlock(), vue.createElementBlock(
  39391. "view",
  39392. {
  39393. key: x,
  39394. class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class),
  39395. style: vue.normalizeStyle(tbody.attrs.style)
  39396. },
  39397. [
  39398. tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, {
  39399. key: 0,
  39400. childs: tbody.children,
  39401. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + x + ".children"]
  39402. }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
  39403. vue.Fragment,
  39404. { key: 1 },
  39405. vue.renderList(tbody.children, (tr, y) => {
  39406. return vue.openBlock(), vue.createElementBlock(
  39407. vue.Fragment,
  39408. { key: y },
  39409. [
  39410. tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock(
  39411. "view",
  39412. {
  39413. key: 0,
  39414. class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
  39415. style: vue.normalizeStyle(tr.attrs.style)
  39416. },
  39417. [
  39418. vue.createVNode(_component_node, {
  39419. childs: tr.children,
  39420. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + x + ".children." + y + ".children"]
  39421. }, null, 8, ["childs", "opts"])
  39422. ],
  39423. 6
  39424. /* CLASS, STYLE */
  39425. )) : (vue.openBlock(), vue.createElementBlock(
  39426. "view",
  39427. {
  39428. key: 1,
  39429. class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
  39430. style: vue.normalizeStyle(tr.attrs.style)
  39431. },
  39432. [
  39433. (vue.openBlock(true), vue.createElementBlock(
  39434. vue.Fragment,
  39435. null,
  39436. vue.renderList(tr.children, (td, z) => {
  39437. return vue.openBlock(), vue.createElementBlock(
  39438. "view",
  39439. {
  39440. key: z,
  39441. class: vue.normalizeClass("_" + td.name + " " + td.attrs.class),
  39442. style: vue.normalizeStyle(td.attrs.style)
  39443. },
  39444. [
  39445. vue.createVNode(_component_node, {
  39446. childs: td.children,
  39447. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + x + ".children." + y + ".children." + z + ".children"]
  39448. }, null, 8, ["childs", "opts"])
  39449. ],
  39450. 6
  39451. /* CLASS, STYLE */
  39452. );
  39453. }),
  39454. 128
  39455. /* KEYED_FRAGMENT */
  39456. ))
  39457. ],
  39458. 6
  39459. /* CLASS, STYLE */
  39460. ))
  39461. ],
  39462. 64
  39463. /* STABLE_FRAGMENT */
  39464. );
  39465. }),
  39466. 128
  39467. /* KEYED_FRAGMENT */
  39468. ))
  39469. ],
  39470. 6
  39471. /* CLASS, STYLE */
  39472. );
  39473. }),
  39474. 128
  39475. /* KEYED_FRAGMENT */
  39476. ))
  39477. ], 14, ["id"])) : !$props.opts[5] && !n.c ? (vue.openBlock(), vue.createElementBlock(
  39478. vue.Fragment,
  39479. { key: 11 },
  39480. [
  39481. vue.createCommentVNode(" 富文本 "),
  39482. vue.createElementVNode("rich-text", {
  39483. id: n.attrs.id,
  39484. style: vue.normalizeStyle(n.f + ";display:inline"),
  39485. preview: false,
  39486. selectable: $props.opts[4],
  39487. "user-select": $props.opts[4],
  39488. nodes: [n]
  39489. }, null, 12, ["id", "selectable", "user-select", "nodes"])
  39490. ],
  39491. 2112
  39492. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  39493. )) : n.c === 2 ? (vue.openBlock(), vue.createElementBlock(
  39494. vue.Fragment,
  39495. { key: 12 },
  39496. [
  39497. vue.createCommentVNode(" 继续递归 "),
  39498. vue.createElementVNode("view", {
  39499. id: n.attrs.id,
  39500. class: vue.normalizeClass("_block _" + n.name + " " + n.attrs.class),
  39501. style: vue.normalizeStyle(n.f + ";" + n.attrs.style)
  39502. }, [
  39503. (vue.openBlock(true), vue.createElementBlock(
  39504. vue.Fragment,
  39505. null,
  39506. vue.renderList(n.children, (n2, j) => {
  39507. return vue.openBlock(), vue.createBlock(_component_node, {
  39508. key: j,
  39509. style: vue.normalizeStyle(n2.f),
  39510. name: n2.name,
  39511. attrs: n2.attrs,
  39512. childs: n2.children,
  39513. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children." + j + ".children"]
  39514. }, null, 8, ["style", "name", "attrs", "childs", "opts"]);
  39515. }),
  39516. 128
  39517. /* KEYED_FRAGMENT */
  39518. ))
  39519. ], 14, ["id"])
  39520. ],
  39521. 2112
  39522. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  39523. )) : (vue.openBlock(), vue.createBlock(_component_node, {
  39524. key: 13,
  39525. style: vue.normalizeStyle(n.f),
  39526. name: n.name,
  39527. attrs: n.attrs,
  39528. childs: n.children,
  39529. opts: [$props.opts[0], $props.opts[1], $props.opts[2], $props.opts[3], $props.opts[4], $props.opts[5], $props.opts[6], $props.opts[7] + "." + i + ".children"]
  39530. }, null, 8, ["style", "name", "attrs", "childs", "opts"]))
  39531. ],
  39532. 64
  39533. /* STABLE_FRAGMENT */
  39534. );
  39535. }),
  39536. 128
  39537. /* KEYED_FRAGMENT */
  39538. ))
  39539. ], 14, ["id"]);
  39540. }
  39541. if (typeof block0 === "function")
  39542. block0(_sfc_main$B);
  39543. const node = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-b9c8a97d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mp-html/node/node.vue"]]);
  39544. const config$1 = {
  39545. // 信任的标签(保持标签名不变)
  39546. trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),
  39547. // 块级标签(转为 div,其他的非信任标签转为 span)
  39548. blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),
  39549. // 行内标签
  39550. inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"),
  39551. // 要移除的标签
  39552. ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),
  39553. // 自闭合的标签
  39554. voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),
  39555. // html 实体
  39556. entities: {
  39557. lt: "<",
  39558. gt: ">",
  39559. quot: '"',
  39560. apos: "'",
  39561. ensp: " ",
  39562. emsp: " ",
  39563. nbsp: " ",
  39564. semi: ";",
  39565. ndash: "–",
  39566. mdash: "—",
  39567. middot: "·",
  39568. lsquo: "‘",
  39569. rsquo: "’",
  39570. ldquo: "“",
  39571. rdquo: "”",
  39572. bull: "•",
  39573. hellip: "…",
  39574. larr: "←",
  39575. uarr: "↑",
  39576. rarr: "→",
  39577. darr: "↓"
  39578. },
  39579. // 默认的标签样式
  39580. tagStyle: {
  39581. address: "font-style:italic",
  39582. big: "display:inline;font-size:1.2em",
  39583. caption: "display:table-caption;text-align:center",
  39584. center: "text-align:center",
  39585. cite: "font-style:italic",
  39586. dd: "margin-left:40px",
  39587. mark: "background-color:yellow",
  39588. pre: "font-family:monospace;white-space:pre",
  39589. s: "text-decoration:line-through",
  39590. small: "display:inline;font-size:0.8em",
  39591. strike: "text-decoration:line-through",
  39592. u: "text-decoration:underline"
  39593. },
  39594. // svg 大小写对照表
  39595. svgDict: {
  39596. animatetransform: "animateTransform",
  39597. lineargradient: "linearGradient",
  39598. viewbox: "viewBox",
  39599. attributename: "attributeName",
  39600. repeatcount: "repeatCount",
  39601. repeatdur: "repeatDur"
  39602. }
  39603. };
  39604. const tagSelector = {};
  39605. const {
  39606. windowWidth
  39607. } = uni.getSystemInfoSync();
  39608. const blankChar = makeMap(" ,\r,\n, ,\f");
  39609. let idIndex = 0;
  39610. config$1.ignoreTags.iframe = void 0;
  39611. config$1.trustTags.iframe = true;
  39612. config$1.ignoreTags.embed = void 0;
  39613. config$1.trustTags.embed = true;
  39614. function makeMap(str) {
  39615. const map = /* @__PURE__ */ Object.create(null);
  39616. const list = str.split(",");
  39617. for (let i = list.length; i--; ) {
  39618. map[list[i]] = true;
  39619. }
  39620. return map;
  39621. }
  39622. function decodeEntity(str, amp) {
  39623. let i = str.indexOf("&");
  39624. while (i !== -1) {
  39625. const j = str.indexOf(";", i + 3);
  39626. let code2;
  39627. if (j === -1)
  39628. break;
  39629. if (str[i + 1] === "#") {
  39630. code2 = parseInt((str[i + 2] === "x" ? "0" : "") + str.substring(i + 2, j));
  39631. if (!isNaN(code2)) {
  39632. str = str.substr(0, i) + String.fromCharCode(code2) + str.substr(j + 1);
  39633. }
  39634. } else {
  39635. code2 = str.substring(i + 1, j);
  39636. if (config$1.entities[code2] || code2 === "amp" && amp) {
  39637. str = str.substr(0, i) + (config$1.entities[code2] || "&") + str.substr(j + 1);
  39638. }
  39639. }
  39640. i = str.indexOf("&", i + 1);
  39641. }
  39642. return str;
  39643. }
  39644. function mergeNodes(nodes) {
  39645. let i = nodes.length - 1;
  39646. for (let j = i; j >= -1; j--) {
  39647. if (j === -1 || nodes[j].c || !nodes[j].name || nodes[j].name !== "div" && nodes[j].name !== "p" && nodes[j].name[0] !== "h" || (nodes[j].attrs.style || "").includes("inline")) {
  39648. if (i - j >= 5) {
  39649. nodes.splice(j + 1, i - j, {
  39650. name: "div",
  39651. attrs: {},
  39652. children: nodes.slice(j + 1, i + 1)
  39653. });
  39654. }
  39655. i = j - 1;
  39656. }
  39657. }
  39658. }
  39659. function Parser(vm) {
  39660. this.options = vm || {};
  39661. this.tagStyle = Object.assign({}, config$1.tagStyle, this.options.tagStyle);
  39662. this.imgList = vm.imgList || [];
  39663. this.plugins = vm.plugins || [];
  39664. this.attrs = /* @__PURE__ */ Object.create(null);
  39665. this.stack = [];
  39666. this.nodes = [];
  39667. this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0;
  39668. }
  39669. Parser.prototype.parse = function(content) {
  39670. for (let i = this.plugins.length; i--; ) {
  39671. if (this.plugins[i].onUpdate) {
  39672. content = this.plugins[i].onUpdate(content, config$1) || content;
  39673. }
  39674. }
  39675. new Lexer(this).parse(content);
  39676. while (this.stack.length) {
  39677. this.popNode();
  39678. }
  39679. if (this.nodes.length > 50) {
  39680. mergeNodes(this.nodes);
  39681. }
  39682. return this.nodes;
  39683. };
  39684. Parser.prototype.expose = function() {
  39685. for (let i = this.stack.length; i--; ) {
  39686. const item = this.stack[i];
  39687. if (item.c || item.name === "a" || item.name === "video" || item.name === "audio")
  39688. return;
  39689. item.c = 1;
  39690. }
  39691. };
  39692. Parser.prototype.hook = function(node2) {
  39693. for (let i = this.plugins.length; i--; ) {
  39694. if (this.plugins[i].onParse && this.plugins[i].onParse(node2, this) === false) {
  39695. return false;
  39696. }
  39697. }
  39698. return true;
  39699. };
  39700. Parser.prototype.getUrl = function(url2) {
  39701. const domain = this.options.domain;
  39702. if (url2[0] === "/") {
  39703. if (url2[1] === "/") {
  39704. url2 = (domain ? domain.split("://")[0] : "http") + ":" + url2;
  39705. } else if (domain) {
  39706. url2 = domain + url2;
  39707. } else {
  39708. url2 = plus.io.convertLocalFileSystemURL(url2);
  39709. }
  39710. } else if (!url2.includes("data:") && !url2.includes("://")) {
  39711. if (domain) {
  39712. url2 = domain + "/" + url2;
  39713. } else {
  39714. url2 = plus.io.convertLocalFileSystemURL(url2);
  39715. }
  39716. }
  39717. return url2;
  39718. };
  39719. Parser.prototype.parseStyle = function(node2) {
  39720. const attrs = node2.attrs;
  39721. const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";"));
  39722. const styleObj = {};
  39723. let tmp = "";
  39724. if (attrs.id && !this.xml) {
  39725. if (this.options.useAnchor) {
  39726. this.expose();
  39727. } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") {
  39728. attrs.id = void 0;
  39729. }
  39730. }
  39731. if (attrs.width) {
  39732. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px");
  39733. attrs.width = void 0;
  39734. }
  39735. if (attrs.height) {
  39736. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px");
  39737. attrs.height = void 0;
  39738. }
  39739. for (let i = 0, len = list.length; i < len; i++) {
  39740. const info = list[i].split(":");
  39741. if (info.length < 2)
  39742. continue;
  39743. const key = info.shift().trim().toLowerCase();
  39744. let value2 = info.join(":").trim();
  39745. if (value2[0] === "-" && value2.lastIndexOf("-") > 0 || value2.includes("safe")) {
  39746. tmp += `;${key}:${value2}`;
  39747. } else if (!styleObj[key] || value2.includes("import") || !styleObj[key].includes("import")) {
  39748. if (value2.includes("url")) {
  39749. let j = value2.indexOf("(") + 1;
  39750. if (j) {
  39751. while (value2[j] === '"' || value2[j] === "'" || blankChar[value2[j]]) {
  39752. j++;
  39753. }
  39754. value2 = value2.substr(0, j) + this.getUrl(value2.substr(j));
  39755. }
  39756. } else if (value2.includes("rpx")) {
  39757. value2 = value2.replace(/[0-9.]+\s*rpx/g, ($) => parseFloat($) * windowWidth / 750 + "px");
  39758. }
  39759. styleObj[key] = value2;
  39760. }
  39761. }
  39762. node2.attrs.style = tmp;
  39763. return styleObj;
  39764. };
  39765. Parser.prototype.onTagName = function(name) {
  39766. this.tagName = this.xml ? name : name.toLowerCase();
  39767. if (this.tagName === "svg") {
  39768. this.xml = (this.xml || 0) + 1;
  39769. }
  39770. };
  39771. Parser.prototype.onAttrName = function(name) {
  39772. name = this.xml ? name : name.toLowerCase();
  39773. if (name.substr(0, 5) === "data-") {
  39774. if (name === "data-src" && !this.attrs.src) {
  39775. this.attrName = "src";
  39776. } else if (this.tagName === "img" || this.tagName === "a") {
  39777. this.attrName = name;
  39778. } else {
  39779. this.attrName = void 0;
  39780. }
  39781. } else {
  39782. this.attrName = name;
  39783. this.attrs[name] = "T";
  39784. }
  39785. };
  39786. Parser.prototype.onAttrVal = function(val) {
  39787. const name = this.attrName || "";
  39788. if (name === "style" || name === "href") {
  39789. this.attrs[name] = decodeEntity(val, true);
  39790. } else if (name.includes("src")) {
  39791. this.attrs[name] = this.getUrl(decodeEntity(val, true));
  39792. } else if (name) {
  39793. this.attrs[name] = val;
  39794. }
  39795. };
  39796. Parser.prototype.onOpenTag = function(selfClose) {
  39797. const node2 = /* @__PURE__ */ Object.create(null);
  39798. node2.name = this.tagName;
  39799. node2.attrs = this.attrs;
  39800. if (this.options.nodes.length) {
  39801. node2.type = "node";
  39802. }
  39803. this.attrs = /* @__PURE__ */ Object.create(null);
  39804. const attrs = node2.attrs;
  39805. const parent = this.stack[this.stack.length - 1];
  39806. const siblings = parent ? parent.children : this.nodes;
  39807. const close = this.xml ? selfClose : config$1.voidTags[node2.name];
  39808. if (tagSelector[node2.name]) {
  39809. attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : "");
  39810. }
  39811. if (node2.name === "embed") {
  39812. this.expose();
  39813. }
  39814. if (node2.name === "video" || node2.name === "audio") {
  39815. if (node2.name === "video" && !attrs.id) {
  39816. attrs.id = "v" + idIndex++;
  39817. }
  39818. if (!attrs.controls && !attrs.autoplay) {
  39819. attrs.controls = "T";
  39820. }
  39821. node2.src = [];
  39822. if (attrs.src) {
  39823. node2.src.push(attrs.src);
  39824. attrs.src = void 0;
  39825. }
  39826. this.expose();
  39827. }
  39828. if (close) {
  39829. if (!this.hook(node2) || config$1.ignoreTags[node2.name]) {
  39830. if (node2.name === "base" && !this.options.domain) {
  39831. this.options.domain = attrs.href;
  39832. } else if (node2.name === "source" && parent && (parent.name === "video" || parent.name === "audio") && attrs.src) {
  39833. parent.src.push(attrs.src);
  39834. }
  39835. return;
  39836. }
  39837. const styleObj = this.parseStyle(node2);
  39838. if (node2.name === "img") {
  39839. if (attrs.src) {
  39840. if (attrs.src.includes("webp")) {
  39841. node2.webp = "T";
  39842. }
  39843. if (attrs.src.includes("data:") && !attrs["original-src"]) {
  39844. attrs.ignore = "T";
  39845. }
  39846. if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) {
  39847. for (let i = this.stack.length; i--; ) {
  39848. const item = this.stack[i];
  39849. if (item.name === "a") {
  39850. node2.a = item.attrs;
  39851. break;
  39852. }
  39853. item.c = 1;
  39854. }
  39855. attrs.i = this.imgList.length.toString();
  39856. let src = attrs["original-src"] || attrs.src;
  39857. this.imgList.push(src);
  39858. if (this.options.lazyLoad) {
  39859. attrs["data-src"] = attrs.src;
  39860. attrs.src = void 0;
  39861. }
  39862. }
  39863. }
  39864. if (styleObj.display === "inline") {
  39865. styleObj.display = "";
  39866. }
  39867. if (attrs.ignore) {
  39868. styleObj["max-width"] = styleObj["max-width"] || "100%";
  39869. attrs.style += ";-webkit-touch-callout:none";
  39870. }
  39871. if (parseInt(styleObj.width) > windowWidth) {
  39872. styleObj.height = void 0;
  39873. }
  39874. if (!isNaN(parseInt(styleObj.width))) {
  39875. node2.w = "T";
  39876. }
  39877. if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent && (parent.attrs.style || "").includes("height"))) {
  39878. node2.h = "T";
  39879. }
  39880. } else if (node2.name === "svg") {
  39881. siblings.push(node2);
  39882. this.stack.push(node2);
  39883. this.popNode();
  39884. return;
  39885. }
  39886. for (const key in styleObj) {
  39887. if (styleObj[key]) {
  39888. attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`;
  39889. }
  39890. }
  39891. attrs.style = attrs.style.substr(1) || void 0;
  39892. } else {
  39893. if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) {
  39894. this.pre = node2.pre = 1;
  39895. }
  39896. node2.children = [];
  39897. this.stack.push(node2);
  39898. }
  39899. siblings.push(node2);
  39900. };
  39901. Parser.prototype.onCloseTag = function(name) {
  39902. name = this.xml ? name : name.toLowerCase();
  39903. let i;
  39904. for (i = this.stack.length; i--; ) {
  39905. if (this.stack[i].name === name)
  39906. break;
  39907. }
  39908. if (i !== -1) {
  39909. while (this.stack.length > i) {
  39910. this.popNode();
  39911. }
  39912. } else if (name === "p" || name === "br") {
  39913. const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  39914. siblings.push({
  39915. name,
  39916. attrs: {
  39917. class: tagSelector[name] || "",
  39918. style: this.tagStyle[name] || ""
  39919. }
  39920. });
  39921. }
  39922. };
  39923. Parser.prototype.popNode = function() {
  39924. const editable = this.options.editable;
  39925. const node2 = this.stack.pop();
  39926. let attrs = node2.attrs;
  39927. const children = node2.children;
  39928. const parent = this.stack[this.stack.length - 1];
  39929. const siblings = parent ? parent.children : this.nodes;
  39930. if (!this.hook(node2) || config$1.ignoreTags[node2.name]) {
  39931. if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) {
  39932. uni.setNavigationBarTitle({
  39933. title: children[0].text
  39934. });
  39935. }
  39936. siblings.pop();
  39937. return;
  39938. }
  39939. if (node2.pre && this.pre !== 2) {
  39940. this.pre = node2.pre = void 0;
  39941. for (let i = this.stack.length; i--; ) {
  39942. if (this.stack[i].pre) {
  39943. this.pre = 1;
  39944. }
  39945. }
  39946. }
  39947. const styleObj = {};
  39948. if (node2.name === "svg") {
  39949. if (this.xml > 1) {
  39950. this.xml--;
  39951. return;
  39952. }
  39953. let src = "";
  39954. const style = attrs.style;
  39955. attrs.style = "";
  39956. attrs.xmlns = "http://www.w3.org/2000/svg";
  39957. (function traversal(node3) {
  39958. if (node3.type === "text") {
  39959. src += node3.text;
  39960. return;
  39961. }
  39962. const name = config$1.svgDict[node3.name] || node3.name;
  39963. src += "<" + name;
  39964. for (const item in node3.attrs) {
  39965. const val = node3.attrs[item];
  39966. if (val) {
  39967. src += ` ${config$1.svgDict[item] || item}="${val}"`;
  39968. }
  39969. }
  39970. if (!node3.children) {
  39971. src += "/>";
  39972. } else {
  39973. src += ">";
  39974. for (let i = 0; i < node3.children.length; i++) {
  39975. traversal(node3.children[i]);
  39976. }
  39977. src += "</" + name + ">";
  39978. }
  39979. })(node2);
  39980. node2.name = "img";
  39981. node2.attrs = {
  39982. src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"),
  39983. style,
  39984. ignore: "T"
  39985. };
  39986. node2.children = void 0;
  39987. this.xml = false;
  39988. return;
  39989. }
  39990. if (attrs.align) {
  39991. if (node2.name === "table") {
  39992. if (attrs.align === "center") {
  39993. styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto";
  39994. } else {
  39995. styleObj.float = attrs.align;
  39996. }
  39997. } else {
  39998. styleObj["text-align"] = attrs.align;
  39999. }
  40000. attrs.align = void 0;
  40001. }
  40002. if (attrs.dir) {
  40003. styleObj.direction = attrs.dir;
  40004. attrs.dir = void 0;
  40005. }
  40006. if (node2.name === "font") {
  40007. if (attrs.color) {
  40008. styleObj.color = attrs.color;
  40009. attrs.color = void 0;
  40010. }
  40011. if (attrs.face) {
  40012. styleObj["font-family"] = attrs.face;
  40013. attrs.face = void 0;
  40014. }
  40015. if (attrs.size) {
  40016. let size = parseInt(attrs.size);
  40017. if (!isNaN(size)) {
  40018. if (size < 1) {
  40019. size = 1;
  40020. } else if (size > 7) {
  40021. size = 7;
  40022. }
  40023. styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1];
  40024. }
  40025. attrs.size = void 0;
  40026. }
  40027. }
  40028. if ((attrs.class || "").includes("align-center")) {
  40029. styleObj["text-align"] = "center";
  40030. }
  40031. Object.assign(styleObj, this.parseStyle(node2));
  40032. if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) {
  40033. styleObj["max-width"] = "100%";
  40034. styleObj["box-sizing"] = "border-box";
  40035. }
  40036. if (config$1.blockTags[node2.name]) {
  40037. if (!editable) {
  40038. node2.name = "div";
  40039. }
  40040. } else if (!config$1.trustTags[node2.name] && !this.xml) {
  40041. node2.name = "span";
  40042. }
  40043. if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") {
  40044. this.expose();
  40045. } else if (node2.name === "video") {
  40046. if ((styleObj.height || "").includes("auto")) {
  40047. styleObj.height = void 0;
  40048. }
  40049. let str = '<video style="width:100%;height:100%"';
  40050. if (editable) {
  40051. attrs.controls = "";
  40052. }
  40053. for (const item in attrs) {
  40054. if (attrs[item]) {
  40055. str += " " + item + '="' + attrs[item] + '"';
  40056. }
  40057. }
  40058. if (this.options.pauseVideo) {
  40059. str += ` onplay="this.dispatchEvent(new CustomEvent('vplay',{bubbles:!0}));for(var e=document.getElementsByTagName('video'),t=0;t<e.length;t++)e[t]!=this&&e[t].pause()"`;
  40060. }
  40061. str += ">";
  40062. for (let i = 0; i < node2.src.length; i++) {
  40063. str += '<source src="' + node2.src[i] + '">';
  40064. }
  40065. str += "</video>";
  40066. node2.html = str;
  40067. } else if ((node2.name === "ul" || node2.name === "ol") && (node2.c || editable)) {
  40068. const types2 = {
  40069. a: "lower-alpha",
  40070. A: "upper-alpha",
  40071. i: "lower-roman",
  40072. I: "upper-roman"
  40073. };
  40074. if (types2[attrs.type]) {
  40075. attrs.style += ";list-style-type:" + types2[attrs.type];
  40076. attrs.type = void 0;
  40077. }
  40078. for (let i = children.length; i--; ) {
  40079. if (children[i].name === "li") {
  40080. children[i].c = 1;
  40081. }
  40082. }
  40083. } else if (node2.name === "table") {
  40084. let padding = parseFloat(attrs.cellpadding);
  40085. let spacing = parseFloat(attrs.cellspacing);
  40086. const border = parseFloat(attrs.border);
  40087. const bordercolor = styleObj["border-color"];
  40088. const borderstyle = styleObj["border-style"];
  40089. if (node2.c || editable) {
  40090. if (isNaN(padding)) {
  40091. padding = 2;
  40092. }
  40093. if (isNaN(spacing)) {
  40094. spacing = 2;
  40095. }
  40096. }
  40097. if (border) {
  40098. attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`;
  40099. }
  40100. if (node2.flag && (node2.c || editable)) {
  40101. styleObj.display = "grid";
  40102. if (spacing) {
  40103. styleObj["grid-gap"] = spacing + "px";
  40104. styleObj.padding = spacing + "px";
  40105. } else if (border) {
  40106. attrs.style += ";border-left:0;border-top:0";
  40107. }
  40108. const width = [];
  40109. const trList = [];
  40110. const cells = [];
  40111. const map = {};
  40112. (function traversal(nodes) {
  40113. for (let i = 0; i < nodes.length; i++) {
  40114. if (nodes[i].name === "tr") {
  40115. trList.push(nodes[i]);
  40116. } else {
  40117. traversal(nodes[i].children || []);
  40118. }
  40119. }
  40120. })(children);
  40121. for (let row = 1; row <= trList.length; row++) {
  40122. let col = 1;
  40123. for (let j = 0; j < trList[row - 1].children.length; j++) {
  40124. const td = trList[row - 1].children[j];
  40125. if (td.name === "td" || td.name === "th") {
  40126. while (map[row + "." + col]) {
  40127. col++;
  40128. }
  40129. if (editable) {
  40130. td.r = row;
  40131. }
  40132. let style = td.attrs.style || "";
  40133. const start = style.indexOf("width") ? style.indexOf(";width") : 0;
  40134. if (start !== -1) {
  40135. let end = style.indexOf(";", start + 6);
  40136. if (end === -1) {
  40137. end = style.length;
  40138. }
  40139. if (!td.attrs.colspan) {
  40140. width[col] = style.substring(start ? start + 7 : 6, end);
  40141. }
  40142. style = style.substr(0, start) + style.substr(end);
  40143. }
  40144. style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style;
  40145. if (td.attrs.colspan) {
  40146. style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`;
  40147. if (!td.attrs.rowspan) {
  40148. style += `;grid-row-start:${row};grid-row-end:${row + 1}`;
  40149. }
  40150. col += parseInt(td.attrs.colspan) - 1;
  40151. }
  40152. if (td.attrs.rowspan) {
  40153. style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`;
  40154. if (!td.attrs.colspan) {
  40155. style += `;grid-column-start:${col};grid-column-end:${col + 1}`;
  40156. }
  40157. for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
  40158. for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
  40159. map[row + rowspan + "." + (col - colspan)] = 1;
  40160. }
  40161. }
  40162. }
  40163. if (style) {
  40164. td.attrs.style = style;
  40165. }
  40166. cells.push(td);
  40167. col++;
  40168. }
  40169. }
  40170. if (row === 1) {
  40171. let temp = "";
  40172. for (let i = 1; i < col; i++) {
  40173. temp += (width[i] ? width[i] : "auto") + " ";
  40174. }
  40175. styleObj["grid-template-columns"] = temp;
  40176. }
  40177. }
  40178. node2.children = cells;
  40179. } else {
  40180. if (node2.c || editable) {
  40181. styleObj.display = "table";
  40182. }
  40183. if (!isNaN(spacing)) {
  40184. styleObj["border-spacing"] = spacing + "px";
  40185. }
  40186. if (border || padding) {
  40187. (function traversal(nodes) {
  40188. for (let i = 0; i < nodes.length; i++) {
  40189. const td = nodes[i];
  40190. if (td.name === "th" || td.name === "td") {
  40191. if (border) {
  40192. td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`;
  40193. }
  40194. if (padding) {
  40195. td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`;
  40196. }
  40197. } else if (td.children) {
  40198. traversal(td.children);
  40199. }
  40200. }
  40201. })(children);
  40202. }
  40203. }
  40204. if (this.options.scrollTable && !(attrs.style || "").includes("inline")) {
  40205. const table = Object.assign({}, node2);
  40206. node2.name = "div";
  40207. node2.attrs = {
  40208. style: "overflow:auto"
  40209. };
  40210. node2.children = [table];
  40211. attrs = table.attrs;
  40212. }
  40213. } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) {
  40214. for (let i = this.stack.length; i--; ) {
  40215. if (this.stack[i].name === "table") {
  40216. this.stack[i].flag = 1;
  40217. break;
  40218. }
  40219. }
  40220. } else if (node2.name === "ruby") {
  40221. node2.name = "span";
  40222. for (let i = 0; i < children.length - 1; i++) {
  40223. if (children[i].type === "text" && children[i + 1].name === "rt") {
  40224. children[i] = {
  40225. name: "div",
  40226. attrs: {
  40227. style: "display:inline-block;text-align:center"
  40228. },
  40229. children: [{
  40230. name: "div",
  40231. attrs: {
  40232. style: "font-size:50%;" + (children[i + 1].attrs.style || "")
  40233. },
  40234. children: children[i + 1].children
  40235. }, children[i]]
  40236. };
  40237. children.splice(i + 1, 1);
  40238. }
  40239. }
  40240. } else if (!editable && node2.c) {
  40241. (function traversal(node3) {
  40242. node3.c = 2;
  40243. for (let i = node3.children.length; i--; ) {
  40244. const child = node3.children[i];
  40245. if (child.name && (config$1.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) {
  40246. traversal(child);
  40247. }
  40248. if (!child.c || child.name === "table") {
  40249. node3.c = 1;
  40250. }
  40251. }
  40252. })(node2);
  40253. }
  40254. if ((styleObj.display || "").includes("flex") && !(node2.c || editable)) {
  40255. for (let i = children.length; i--; ) {
  40256. const item = children[i];
  40257. if (item.f) {
  40258. item.attrs.style = (item.attrs.style || "") + item.f;
  40259. item.f = void 0;
  40260. }
  40261. }
  40262. }
  40263. const flex = parent && ((parent.attrs.style || "").includes("flex") || (parent.attrs.style || "").includes("grid")) && !node2.c;
  40264. if (flex) {
  40265. node2.f = ";max-width:100%";
  40266. }
  40267. if (children.length >= 50 && (node2.c || editable) && !(styleObj.display || "").includes("flex")) {
  40268. mergeNodes(children);
  40269. }
  40270. for (const key in styleObj) {
  40271. if (styleObj[key]) {
  40272. const val = `;${key}:${styleObj[key].replace(" !important", "")}`;
  40273. if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) {
  40274. node2.f += val;
  40275. if (key === "width") {
  40276. attrs.style += ";width:100%";
  40277. }
  40278. } else {
  40279. attrs.style += val;
  40280. }
  40281. }
  40282. }
  40283. attrs.style = attrs.style.substr(1) || void 0;
  40284. };
  40285. Parser.prototype.onText = function(text) {
  40286. if (!this.pre) {
  40287. let trim2 = "";
  40288. let flag2;
  40289. for (let i = 0, len = text.length; i < len; i++) {
  40290. if (!blankChar[text[i]]) {
  40291. trim2 += text[i];
  40292. } else {
  40293. if (trim2[trim2.length - 1] !== " ") {
  40294. trim2 += " ";
  40295. }
  40296. if (text[i] === "\n" && !flag2) {
  40297. flag2 = true;
  40298. }
  40299. }
  40300. }
  40301. if (trim2 === " ") {
  40302. if (flag2)
  40303. return;
  40304. else {
  40305. const parent = this.stack[this.stack.length - 1];
  40306. if (parent && parent.name[0] === "t")
  40307. return;
  40308. }
  40309. }
  40310. text = trim2;
  40311. }
  40312. const node2 = /* @__PURE__ */ Object.create(null);
  40313. node2.type = "text";
  40314. node2.text = decodeEntity(text);
  40315. if (this.hook(node2)) {
  40316. const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  40317. siblings.push(node2);
  40318. }
  40319. };
  40320. function Lexer(handler) {
  40321. this.handler = handler;
  40322. }
  40323. Lexer.prototype.parse = function(content) {
  40324. this.content = content || "";
  40325. this.i = 0;
  40326. this.start = 0;
  40327. this.state = this.text;
  40328. for (let len = this.content.length; this.i !== -1 && this.i < len; ) {
  40329. this.state();
  40330. }
  40331. };
  40332. Lexer.prototype.checkClose = function(method) {
  40333. const selfClose = this.content[this.i] === "/";
  40334. if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") {
  40335. if (method) {
  40336. this.handler[method](this.content.substring(this.start, this.i));
  40337. }
  40338. this.i += selfClose ? 2 : 1;
  40339. this.start = this.i;
  40340. this.handler.onOpenTag(selfClose);
  40341. if (this.handler.tagName === "script") {
  40342. this.i = this.content.indexOf("</", this.i);
  40343. if (this.i !== -1) {
  40344. this.i += 2;
  40345. this.start = this.i;
  40346. }
  40347. this.state = this.endTag;
  40348. } else {
  40349. this.state = this.text;
  40350. }
  40351. return true;
  40352. }
  40353. return false;
  40354. };
  40355. Lexer.prototype.text = function() {
  40356. this.i = this.content.indexOf("<", this.i);
  40357. if (this.i === -1) {
  40358. if (this.start < this.content.length) {
  40359. this.handler.onText(this.content.substring(this.start, this.content.length));
  40360. }
  40361. return;
  40362. }
  40363. const c = this.content[this.i + 1];
  40364. if (c >= "a" && c <= "z" || c >= "A" && c <= "Z") {
  40365. if (this.start !== this.i) {
  40366. this.handler.onText(this.content.substring(this.start, this.i));
  40367. }
  40368. this.start = ++this.i;
  40369. this.state = this.tagName;
  40370. } else if (c === "/" || c === "!" || c === "?") {
  40371. if (this.start !== this.i) {
  40372. this.handler.onText(this.content.substring(this.start, this.i));
  40373. }
  40374. const next = this.content[this.i + 2];
  40375. if (c === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) {
  40376. this.i += 2;
  40377. this.start = this.i;
  40378. this.state = this.endTag;
  40379. return;
  40380. }
  40381. let end = "-->";
  40382. if (c !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") {
  40383. end = ">";
  40384. }
  40385. this.i = this.content.indexOf(end, this.i);
  40386. if (this.i !== -1) {
  40387. this.i += end.length;
  40388. this.start = this.i;
  40389. }
  40390. } else {
  40391. this.i++;
  40392. }
  40393. };
  40394. Lexer.prototype.tagName = function() {
  40395. if (blankChar[this.content[this.i]]) {
  40396. this.handler.onTagName(this.content.substring(this.start, this.i));
  40397. while (blankChar[this.content[++this.i]])
  40398. ;
  40399. if (this.i < this.content.length && !this.checkClose()) {
  40400. this.start = this.i;
  40401. this.state = this.attrName;
  40402. }
  40403. } else if (!this.checkClose("onTagName")) {
  40404. this.i++;
  40405. }
  40406. };
  40407. Lexer.prototype.attrName = function() {
  40408. let c = this.content[this.i];
  40409. if (blankChar[c] || c === "=") {
  40410. this.handler.onAttrName(this.content.substring(this.start, this.i));
  40411. let needVal = c === "=";
  40412. const len = this.content.length;
  40413. while (++this.i < len) {
  40414. c = this.content[this.i];
  40415. if (!blankChar[c]) {
  40416. if (this.checkClose())
  40417. return;
  40418. if (needVal) {
  40419. this.start = this.i;
  40420. this.state = this.attrVal;
  40421. return;
  40422. }
  40423. if (this.content[this.i] === "=") {
  40424. needVal = true;
  40425. } else {
  40426. this.start = this.i;
  40427. this.state = this.attrName;
  40428. return;
  40429. }
  40430. }
  40431. }
  40432. } else if (!this.checkClose("onAttrName")) {
  40433. this.i++;
  40434. }
  40435. };
  40436. Lexer.prototype.attrVal = function() {
  40437. const c = this.content[this.i];
  40438. const len = this.content.length;
  40439. if (c === '"' || c === "'") {
  40440. this.start = ++this.i;
  40441. this.i = this.content.indexOf(c, this.i);
  40442. if (this.i === -1)
  40443. return;
  40444. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  40445. } else {
  40446. for (; this.i < len; this.i++) {
  40447. if (blankChar[this.content[this.i]]) {
  40448. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  40449. break;
  40450. } else if (this.checkClose("onAttrVal"))
  40451. return;
  40452. }
  40453. }
  40454. while (blankChar[this.content[++this.i]])
  40455. ;
  40456. if (this.i < len && !this.checkClose()) {
  40457. this.start = this.i;
  40458. this.state = this.attrName;
  40459. }
  40460. };
  40461. Lexer.prototype.endTag = function() {
  40462. const c = this.content[this.i];
  40463. if (blankChar[c] || c === ">" || c === "/") {
  40464. this.handler.onCloseTag(this.content.substring(this.start, this.i));
  40465. if (c !== ">") {
  40466. this.i = this.content.indexOf(">", this.i);
  40467. if (this.i === -1)
  40468. return;
  40469. }
  40470. this.start = ++this.i;
  40471. this.state = this.text;
  40472. } else {
  40473. this.i++;
  40474. }
  40475. };
  40476. const config = {
  40477. // 普通标签的菜单项
  40478. node: ["大小", "斜体", "粗体", "下划线", "居中", "缩进", "上移", "下移", "删除"],
  40479. // 图片的菜单项
  40480. img: ["换图", "宽度", "超链接", "预览图", "禁用预览", "上移", "下移", "删除"],
  40481. // 链接的菜单项
  40482. link: ["更换链接", "上移", "下移", "删除"],
  40483. // 音视频的菜单项
  40484. media: ["封面", "循环", "自动播放", "上移", "下移", "删除"]
  40485. };
  40486. function Editable(vm) {
  40487. this.vm = vm;
  40488. this.editHistory = [];
  40489. this.editI = -1;
  40490. vm._mask = [];
  40491. vm._setData = function(path, val) {
  40492. const paths = path.split(".");
  40493. let target = vm;
  40494. for (let i = 0; i < paths.length - 1; i++) {
  40495. target = target[paths[i]];
  40496. }
  40497. vm.$set(target, paths.pop(), val);
  40498. };
  40499. const move = (num) => {
  40500. setTimeout(() => {
  40501. const item = this.editHistory[this.editI + num];
  40502. if (item) {
  40503. this.editI += num;
  40504. vm._setData(item.key, item.value);
  40505. }
  40506. }, 200);
  40507. };
  40508. vm.undo = () => move(-1);
  40509. vm.redo = () => move(1);
  40510. vm._editVal = (path, oldVal, newVal, set) => {
  40511. while (this.editI < this.editHistory.length - 1) {
  40512. this.editHistory.pop();
  40513. }
  40514. while (this.editHistory.length > 30) {
  40515. this.editHistory.pop();
  40516. this.editI--;
  40517. }
  40518. const last = this.editHistory[this.editHistory.length - 1];
  40519. if (!last || last.key !== path) {
  40520. if (last) {
  40521. this.editHistory.pop();
  40522. this.editI--;
  40523. }
  40524. this.editHistory.push({
  40525. key: path,
  40526. value: oldVal
  40527. });
  40528. this.editI++;
  40529. }
  40530. this.editHistory.push({
  40531. key: path,
  40532. value: newVal
  40533. });
  40534. this.editI++;
  40535. if (set) {
  40536. vm._setData(path, newVal);
  40537. }
  40538. };
  40539. vm._getItem = function(node2, up, down) {
  40540. let items;
  40541. let i;
  40542. if (node2.name === "img") {
  40543. items = config.img.slice(0);
  40544. if (!vm.getSrc) {
  40545. i = items.indexOf("换图");
  40546. if (i !== -1) {
  40547. items.splice(i, 1);
  40548. }
  40549. i = items.indexOf("超链接");
  40550. if (i !== -1) {
  40551. items.splice(i, 1);
  40552. }
  40553. i = items.indexOf("预览图");
  40554. if (i !== -1) {
  40555. items.splice(i, 1);
  40556. }
  40557. }
  40558. i = items.indexOf("禁用预览");
  40559. if (i !== -1 && node2.attrs.ignore) {
  40560. items[i] = "启用预览";
  40561. }
  40562. } else if (node2.name === "a") {
  40563. items = config.link.slice(0);
  40564. if (!vm.getSrc) {
  40565. i = items.indexOf("更换链接");
  40566. if (i !== -1) {
  40567. items.splice(i, 1);
  40568. }
  40569. }
  40570. } else if (node2.name === "video" || node2.name === "audio") {
  40571. items = config.media.slice(0);
  40572. i = items.indexOf("封面");
  40573. if (!vm.getSrc && i !== -1) {
  40574. items.splice(i, 1);
  40575. }
  40576. i = items.indexOf("循环");
  40577. if (node2.attrs.loop && i !== -1) {
  40578. items[i] = "不循环";
  40579. }
  40580. i = items.indexOf("自动播放");
  40581. if (node2.attrs.autoplay && i !== -1) {
  40582. items[i] = "不自动播放";
  40583. }
  40584. } else {
  40585. items = config.node.slice(0);
  40586. }
  40587. if (!up) {
  40588. i = items.indexOf("上移");
  40589. if (i !== -1) {
  40590. items.splice(i, 1);
  40591. }
  40592. }
  40593. if (!down) {
  40594. i = items.indexOf("下移");
  40595. if (i !== -1) {
  40596. items.splice(i, 1);
  40597. }
  40598. }
  40599. return items;
  40600. };
  40601. vm._tooltip = function(obj) {
  40602. vm.$set(vm, "tooltip", {
  40603. top: obj.top,
  40604. items: obj.items
  40605. });
  40606. vm._tooltipcb = obj.success;
  40607. };
  40608. vm._slider = function(obj) {
  40609. vm.$set(vm, "slider", {
  40610. min: obj.min,
  40611. max: obj.max,
  40612. value: obj.value,
  40613. top: obj.top
  40614. });
  40615. vm._slideringcb = obj.changing;
  40616. vm._slidercb = obj.change;
  40617. };
  40618. vm._maskTap = function() {
  40619. while (vm._mask.length) {
  40620. vm._mask.pop()();
  40621. }
  40622. if (vm.tooltip) {
  40623. vm.$set(vm, "tooltip", null);
  40624. }
  40625. if (vm.slider) {
  40626. vm.$set(vm, "slider", null);
  40627. }
  40628. };
  40629. function insert(node2) {
  40630. if (vm._edit) {
  40631. vm._edit.insert(node2);
  40632. } else {
  40633. const nodes = vm.nodes.slice(0);
  40634. nodes.push(node2);
  40635. vm._editVal("nodes", vm.nodes, nodes, true);
  40636. }
  40637. }
  40638. vm.insertHtml = (html) => {
  40639. this.inserting = true;
  40640. const arr = new Parser(vm).parse(html);
  40641. this.inserting = void 0;
  40642. for (let i = 0; i < arr.length; i++) {
  40643. insert(arr[i]);
  40644. }
  40645. };
  40646. vm.insertImg = function() {
  40647. vm.getSrc && vm.getSrc("img").then((src) => {
  40648. if (typeof src === "string") {
  40649. src = [src];
  40650. }
  40651. const parser = new Parser(vm);
  40652. for (let i = 0; i < src.length; i++) {
  40653. insert({
  40654. name: "img",
  40655. attrs: {
  40656. src: parser.getUrl(src[i])
  40657. }
  40658. });
  40659. }
  40660. }).catch(() => {
  40661. });
  40662. };
  40663. vm.insertLink = function() {
  40664. vm.getSrc && vm.getSrc("link").then((url2) => {
  40665. insert({
  40666. name: "a",
  40667. attrs: {
  40668. href: url2
  40669. },
  40670. children: [{
  40671. type: "text",
  40672. text: url2
  40673. }]
  40674. });
  40675. }).catch(() => {
  40676. });
  40677. };
  40678. vm.insertTable = function(rows, cols) {
  40679. const table = {
  40680. name: "table",
  40681. attrs: {
  40682. style: "display:table;width:100%;margin:10px 0;text-align:center;border-spacing:0;border-collapse:collapse;border:1px solid gray"
  40683. },
  40684. children: []
  40685. };
  40686. for (let i = 0; i < rows; i++) {
  40687. const tr = {
  40688. name: "tr",
  40689. attrs: {},
  40690. children: []
  40691. };
  40692. for (let j = 0; j < cols; j++) {
  40693. tr.children.push({
  40694. name: "td",
  40695. attrs: {
  40696. style: "padding:2px;border:1px solid gray"
  40697. },
  40698. children: [{
  40699. type: "text",
  40700. text: ""
  40701. }]
  40702. });
  40703. }
  40704. table.children.push(tr);
  40705. }
  40706. insert(table);
  40707. };
  40708. function insertMedia(node2) {
  40709. if (typeof node2.src === "string") {
  40710. node2.src = [node2.src];
  40711. }
  40712. const parser = new Parser(vm);
  40713. for (let i = 0; i < node2.src.length; i++) {
  40714. node2.src[i] = parser.getUrl(node2.src[i]);
  40715. }
  40716. insert({
  40717. name: "div",
  40718. attrs: {
  40719. style: "text-align:center"
  40720. },
  40721. children: [node2]
  40722. });
  40723. }
  40724. vm.insertVideo = function() {
  40725. vm.getSrc && vm.getSrc("video").then((src) => {
  40726. insertMedia({
  40727. name: "video",
  40728. attrs: {
  40729. controls: "T"
  40730. },
  40731. children: [],
  40732. src,
  40733. html: `<video src="${src}" style="width:100%;height:100%"></video>`
  40734. });
  40735. }).catch(() => {
  40736. });
  40737. };
  40738. vm.insertAudio = function() {
  40739. vm.getSrc && vm.getSrc("audio").then((attrs) => {
  40740. let src;
  40741. if (attrs.src) {
  40742. src = attrs.src;
  40743. attrs.src = void 0;
  40744. } else {
  40745. src = attrs;
  40746. attrs = {};
  40747. }
  40748. attrs.controls = "T";
  40749. insertMedia({
  40750. name: "audio",
  40751. attrs,
  40752. children: [],
  40753. src
  40754. });
  40755. }).catch(() => {
  40756. });
  40757. };
  40758. vm.insertText = function() {
  40759. insert({
  40760. name: "p",
  40761. attrs: {},
  40762. children: [{
  40763. type: "text",
  40764. text: ""
  40765. }]
  40766. });
  40767. };
  40768. vm.clear = function() {
  40769. vm._maskTap();
  40770. vm._edit = void 0;
  40771. vm.$set(vm, "nodes", [{
  40772. name: "p",
  40773. attrs: {},
  40774. children: [{
  40775. type: "text",
  40776. text: ""
  40777. }]
  40778. }]);
  40779. };
  40780. vm.getContent = function() {
  40781. let html = "";
  40782. (function traversal(nodes, table) {
  40783. for (let i = 0; i < nodes.length; i++) {
  40784. let item = nodes[i];
  40785. if (item.type === "text") {
  40786. html += item.text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g, "<br>").replace(/\xa0/g, "&nbsp;");
  40787. } else {
  40788. if (item.name === "img") {
  40789. item.attrs.i = "";
  40790. if ((item.attrs.src || "").includes("data:image/svg+xml;utf8,")) {
  40791. html += item.attrs.src.substr(24).replace(/%23/g, "#").replace("<svg", '<svg style="' + (item.attrs.style || "") + '"');
  40792. continue;
  40793. }
  40794. } else if (item.name === "video" || item.name === "audio") {
  40795. item = JSON.parse(JSON.stringify(item));
  40796. if (item.src.length > 1) {
  40797. item.children = [];
  40798. for (let j = 0; j < item.src.length; j++) {
  40799. item.children.push({
  40800. name: "source",
  40801. attrs: {
  40802. src: item.src[j]
  40803. }
  40804. });
  40805. }
  40806. } else {
  40807. item.attrs.src = item.src[0];
  40808. }
  40809. } else if (item.name === "div" && (item.attrs.style || "").includes("overflow:auto") && (item.children[0] || {}).name === "table") {
  40810. item = item.children[0];
  40811. }
  40812. if (item.name === "table") {
  40813. item = JSON.parse(JSON.stringify(item));
  40814. table = item.attrs;
  40815. if ((item.attrs.style || "").includes("display:grid")) {
  40816. item.attrs.style = item.attrs.style.split("display:grid")[0];
  40817. const children = [{
  40818. name: "tr",
  40819. attrs: {},
  40820. children: []
  40821. }];
  40822. for (let j = 0; j < item.children.length; j++) {
  40823. item.children[j].attrs.style = item.children[j].attrs.style.replace(/grid-[^;]+;*/g, "");
  40824. if (item.children[j].r !== children.length) {
  40825. children.push({
  40826. name: "tr",
  40827. attrs: {},
  40828. children: [item.children[j]]
  40829. });
  40830. } else {
  40831. children[children.length - 1].children.push(item.children[j]);
  40832. }
  40833. }
  40834. item.children = children;
  40835. }
  40836. }
  40837. html += "<" + item.name;
  40838. for (const attr in item.attrs) {
  40839. let val = item.attrs[attr];
  40840. if (!val)
  40841. continue;
  40842. if (val === "T" || val === true) {
  40843. html += " " + attr;
  40844. continue;
  40845. } else if (item.name[0] === "t" && attr === "style" && table) {
  40846. val = val.replace(/;*display:table[^;]*/, "");
  40847. if (table.border) {
  40848. val = val.replace(/border[^;]+;*/g, ($) => $.includes("collapse") ? $ : "");
  40849. }
  40850. if (table.cellpadding) {
  40851. val = val.replace(/padding[^;]+;*/g, "");
  40852. }
  40853. if (!val)
  40854. continue;
  40855. }
  40856. html += " " + attr + '="' + val.replace(/"/g, "&quot;") + '"';
  40857. }
  40858. html += ">";
  40859. if (item.children) {
  40860. traversal(item.children, table);
  40861. html += "</" + item.name + ">";
  40862. }
  40863. }
  40864. }
  40865. })(vm.nodes);
  40866. for (let i = vm.plugins.length; i--; ) {
  40867. if (vm.plugins[i].onGetContent) {
  40868. html = vm.plugins[i].onGetContent(html) || html;
  40869. }
  40870. }
  40871. return html;
  40872. };
  40873. }
  40874. Editable.prototype.onUpdate = function(content, config2) {
  40875. if (this.vm.editable) {
  40876. this.vm._maskTap();
  40877. config2.entities.amp = "&";
  40878. if (!this.inserting) {
  40879. this.vm._edit = void 0;
  40880. if (!content) {
  40881. setTimeout(() => {
  40882. this.vm.$set(this.vm, "nodes", [{
  40883. name: "p",
  40884. attrs: {},
  40885. children: [{
  40886. type: "text",
  40887. text: ""
  40888. }]
  40889. }]);
  40890. }, 0);
  40891. }
  40892. }
  40893. }
  40894. };
  40895. Editable.prototype.onParse = function(node2) {
  40896. if (this.vm.editable && (node2.name === "td" || node2.name === "th") && !this.vm.getText(node2.children)) {
  40897. node2.children.push({
  40898. type: "text",
  40899. text: ""
  40900. });
  40901. }
  40902. };
  40903. const plugins = [Editable];
  40904. const _sfc_main$A = {
  40905. name: "mp-html",
  40906. data() {
  40907. return {
  40908. tooltip: null,
  40909. slider: null,
  40910. nodes: []
  40911. };
  40912. },
  40913. props: {
  40914. editable: Boolean,
  40915. placeholder: String,
  40916. containerStyle: {
  40917. type: String,
  40918. default: ""
  40919. },
  40920. content: {
  40921. type: String,
  40922. default: ""
  40923. },
  40924. copyLink: {
  40925. type: [Boolean, String],
  40926. default: true
  40927. },
  40928. domain: String,
  40929. errorImg: {
  40930. type: String,
  40931. default: ""
  40932. },
  40933. lazyLoad: {
  40934. type: [Boolean, String],
  40935. default: false
  40936. },
  40937. loadingImg: {
  40938. type: String,
  40939. default: ""
  40940. },
  40941. pauseVideo: {
  40942. type: [Boolean, String],
  40943. default: true
  40944. },
  40945. previewImg: {
  40946. type: [Boolean, String],
  40947. default: true
  40948. },
  40949. scrollTable: [Boolean, String],
  40950. selectable: [Boolean, String],
  40951. setTitle: {
  40952. type: [Boolean, String],
  40953. default: true
  40954. },
  40955. showImgMenu: {
  40956. type: [Boolean, String],
  40957. default: true
  40958. },
  40959. tagStyle: Object,
  40960. useAnchor: [Boolean, Number]
  40961. },
  40962. emits: ["load", "ready", "imgtap", "linktap", "play", "error"],
  40963. components: {
  40964. node
  40965. },
  40966. watch: {
  40967. editable(val) {
  40968. this.setContent(val ? this.content : this.getContent());
  40969. if (!val)
  40970. this._maskTap();
  40971. },
  40972. content(content) {
  40973. this.setContent(content);
  40974. }
  40975. },
  40976. created() {
  40977. this.plugins = [];
  40978. for (let i = plugins.length; i--; ) {
  40979. this.plugins.push(new plugins[i](this));
  40980. }
  40981. },
  40982. mounted() {
  40983. if ((this.content || this.editable) && !this.nodes.length) {
  40984. this.setContent(this.content);
  40985. }
  40986. },
  40987. beforeDestroy() {
  40988. this._hook("onDetached");
  40989. clearInterval(this._timer);
  40990. },
  40991. methods: {
  40992. _containTap() {
  40993. if (!this._lock && !this.slider) {
  40994. this._edit = void 0;
  40995. this._maskTap();
  40996. }
  40997. },
  40998. _tooltipTap(e) {
  40999. this._tooltipcb(e.currentTarget.dataset.i);
  41000. this.$set(this, "tooltip", null);
  41001. },
  41002. _sliderChanging(e) {
  41003. this._slideringcb(e.detail.value);
  41004. },
  41005. _sliderChange(e) {
  41006. this._slidercb(e.detail.value);
  41007. },
  41008. /**
  41009. * @description 将锚点跳转的范围限定在一个 scroll-view 内
  41010. * @param {Object} page scroll-view 所在页面的示例
  41011. * @param {String} selector scroll-view 的选择器
  41012. * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名
  41013. */
  41014. in(page2, selector, scrollTop) {
  41015. if (page2 && selector && scrollTop) {
  41016. this._in = {
  41017. page: page2,
  41018. selector,
  41019. scrollTop
  41020. };
  41021. }
  41022. },
  41023. /**
  41024. * @description 锚点跳转
  41025. * @param {String} id 要跳转的锚点 id
  41026. * @param {Number} offset 跳转位置的偏移量
  41027. * @returns {Promise}
  41028. */
  41029. navigateTo(id, offset) {
  41030. return new Promise((resolve, reject2) => {
  41031. if (!this.useAnchor) {
  41032. reject2(Error("Anchor is disabled"));
  41033. return;
  41034. }
  41035. offset = offset || parseInt(this.useAnchor) || 0;
  41036. let deep = " ";
  41037. const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect();
  41038. if (this._in) {
  41039. selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect();
  41040. } else {
  41041. selector.selectViewport().scrollOffset();
  41042. }
  41043. selector.exec((res) => {
  41044. if (!res[0]) {
  41045. reject2(Error("Label not found"));
  41046. return;
  41047. }
  41048. const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset;
  41049. if (this._in) {
  41050. this._in.page[this._in.scrollTop] = scrollTop;
  41051. } else {
  41052. uni.pageScrollTo({
  41053. scrollTop,
  41054. duration: 300
  41055. });
  41056. }
  41057. resolve();
  41058. });
  41059. });
  41060. },
  41061. /**
  41062. * @description 获取文本内容
  41063. * @return {String}
  41064. */
  41065. getText(nodes) {
  41066. let text = "";
  41067. (function traversal(nodes2) {
  41068. for (let i = 0; i < nodes2.length; i++) {
  41069. const node2 = nodes2[i];
  41070. if (node2.type === "text") {
  41071. text += node2.text.replace(/&amp;/g, "&");
  41072. } else if (node2.name === "br") {
  41073. text += "\n";
  41074. } else {
  41075. const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7";
  41076. if (isBlock && text && text[text.length - 1] !== "\n") {
  41077. text += "\n";
  41078. }
  41079. if (node2.children) {
  41080. traversal(node2.children);
  41081. }
  41082. if (isBlock && text[text.length - 1] !== "\n") {
  41083. text += "\n";
  41084. } else if (node2.name === "td" || node2.name === "th") {
  41085. text += " ";
  41086. }
  41087. }
  41088. }
  41089. })(nodes || this.nodes);
  41090. return text;
  41091. },
  41092. /**
  41093. * @description 获取内容大小和位置
  41094. * @return {Promise}
  41095. */
  41096. getRect() {
  41097. return new Promise((resolve, reject2) => {
  41098. uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject2(Error("Root label not found")));
  41099. });
  41100. },
  41101. /**
  41102. * @description 暂停播放媒体
  41103. */
  41104. pauseMedia() {
  41105. for (let i = (this._videos || []).length; i--; ) {
  41106. this._videos[i].pause();
  41107. }
  41108. const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()';
  41109. let page2 = this.$parent;
  41110. while (!page2.$scope)
  41111. page2 = page2.$parent;
  41112. page2.$scope.$getAppWebview().evalJS(command);
  41113. },
  41114. /**
  41115. * @description 设置内容
  41116. * @param {String} content html 内容
  41117. * @param {Boolean} append 是否在尾部追加
  41118. */
  41119. setContent(content, append) {
  41120. if (!append || !this.imgList) {
  41121. this.imgList = [];
  41122. }
  41123. const nodes = new Parser(this).parse(content);
  41124. this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes);
  41125. this._videos = [];
  41126. this.$nextTick(() => {
  41127. this._hook("onLoad");
  41128. this.$emit("load");
  41129. });
  41130. let height;
  41131. clearInterval(this._timer);
  41132. this._timer = setInterval(() => {
  41133. this.getRect().then((rect) => {
  41134. if (rect.height === height) {
  41135. this.$emit("ready", rect);
  41136. clearInterval(this._timer);
  41137. }
  41138. height = rect.height;
  41139. }).catch(() => {
  41140. });
  41141. }, 350);
  41142. },
  41143. /**
  41144. * @description 调用插件钩子函数
  41145. */
  41146. _hook(name) {
  41147. for (let i = plugins.length; i--; ) {
  41148. if (this.plugins[i][name]) {
  41149. this.plugins[i][name]();
  41150. }
  41151. }
  41152. }
  41153. }
  41154. };
  41155. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  41156. const _component_node = vue.resolveComponent("node");
  41157. return vue.openBlock(), vue.createElementBlock(
  41158. "view",
  41159. {
  41160. id: "_root",
  41161. class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"),
  41162. style: vue.normalizeStyle(($props.editable ? "min-height:200px;" : "") + $props.containerStyle),
  41163. onClick: _cache[3] || (_cache[3] = (...args) => $options._containTap && $options._containTap(...args))
  41164. },
  41165. [
  41166. !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, {
  41167. key: 1,
  41168. childs: $data.nodes,
  41169. opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable, $props.editable, $props.placeholder, "nodes"],
  41170. name: "span"
  41171. }, null, 8, ["childs", "opts"])),
  41172. $data.tooltip ? (vue.openBlock(), vue.createElementBlock(
  41173. "view",
  41174. {
  41175. key: 2,
  41176. class: "_tooltip_contain",
  41177. style: vue.normalizeStyle("top:" + $data.tooltip.top + "px")
  41178. },
  41179. [
  41180. vue.createElementVNode("view", { class: "_tooltip" }, [
  41181. (vue.openBlock(true), vue.createElementBlock(
  41182. vue.Fragment,
  41183. null,
  41184. vue.renderList($data.tooltip.items, (item, index2) => {
  41185. return vue.openBlock(), vue.createElementBlock("view", {
  41186. key: index2,
  41187. class: "_tooltip_item",
  41188. "data-i": index2,
  41189. onClick: _cache[0] || (_cache[0] = (...args) => $options._tooltipTap && $options._tooltipTap(...args))
  41190. }, vue.toDisplayString(item), 9, ["data-i"]);
  41191. }),
  41192. 128
  41193. /* KEYED_FRAGMENT */
  41194. ))
  41195. ])
  41196. ],
  41197. 4
  41198. /* STYLE */
  41199. )) : vue.createCommentVNode("v-if", true),
  41200. $data.slider ? (vue.openBlock(), vue.createElementBlock(
  41201. "view",
  41202. {
  41203. key: 3,
  41204. class: "_slider",
  41205. style: vue.normalizeStyle("top:" + $data.slider.top + "px")
  41206. },
  41207. [
  41208. vue.createElementVNode("slider", {
  41209. value: $data.slider.value,
  41210. min: $data.slider.min,
  41211. max: $data.slider.max,
  41212. "handle-size": "14",
  41213. "block-size": "14",
  41214. "show-value": "",
  41215. activeColor: "white",
  41216. style: { "padding": "3px" },
  41217. onChanging: _cache[1] || (_cache[1] = (...args) => $options._sliderChanging && $options._sliderChanging(...args)),
  41218. onChange: _cache[2] || (_cache[2] = (...args) => $options._sliderChange && $options._sliderChange(...args))
  41219. }, null, 40, ["value", "min", "max"])
  41220. ],
  41221. 4
  41222. /* STYLE */
  41223. )) : vue.createCommentVNode("v-if", true)
  41224. ],
  41225. 6
  41226. /* CLASS, STYLE */
  41227. );
  41228. }
  41229. const mpHtml = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-334fab66"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/mp-html/mp-html.vue"]]);
  41230. const _sfc_main$z = {
  41231. components: {
  41232. mpHtml
  41233. },
  41234. data() {
  41235. return {
  41236. type: null,
  41237. content: ""
  41238. };
  41239. },
  41240. onLoad(options) {
  41241. this.type = options.type;
  41242. if (this.type == "doctorAgreement") {
  41243. uni.setNavigationBarTitle({
  41244. title: "入驻协议"
  41245. });
  41246. }
  41247. if (this.type == "userRegister") {
  41248. uni.setNavigationBarTitle({
  41249. title: "用户协议"
  41250. });
  41251. }
  41252. if (this.type == "userPrivacy") {
  41253. uni.setNavigationBarTitle({
  41254. title: "隐私协议"
  41255. });
  41256. }
  41257. this.getConfig();
  41258. },
  41259. methods: {
  41260. getConfig() {
  41261. var data = { key: "his.agreementConfig" };
  41262. getConfigByKey(data).then(
  41263. (res) => {
  41264. if (res.code == 200) {
  41265. if (this.type == "doctorRegister") {
  41266. this.content = JSON.parse(res.data).doctorRegister;
  41267. } else if (this.type == "doctorFiling") {
  41268. this.content = JSON.parse(res.data).doctorFiling;
  41269. } else if (this.type == "userRegister") {
  41270. this.content = JSON.parse(res.data).userRegister;
  41271. } else if (this.type == "userPrivacy") {
  41272. this.content = JSON.parse(res.data).userPrivacy;
  41273. }
  41274. }
  41275. },
  41276. (rej) => {
  41277. }
  41278. );
  41279. }
  41280. }
  41281. };
  41282. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  41283. const _component_mp_html = vue.resolveComponent("mp-html");
  41284. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  41285. vue.createVNode(_component_mp_html, { content: $data.content }, null, 8, ["content"])
  41286. ]);
  41287. }
  41288. const Pages_userAgreement = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-b3cf2c5c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/agreement.vue"]]);
  41289. const _sfc_main$y = {
  41290. mixins: [MescrollMixin],
  41291. // 使用mixin
  41292. data() {
  41293. return {
  41294. hosLevelOptions: [],
  41295. tabs: [
  41296. {
  41297. index: 1,
  41298. name: "关注医生"
  41299. },
  41300. {
  41301. index: 2,
  41302. name: "签约医生"
  41303. }
  41304. ],
  41305. type: 0,
  41306. mescroll: null,
  41307. downOption: {
  41308. //下拉刷新
  41309. use: true,
  41310. auto: false
  41311. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  41312. },
  41313. upOption: {
  41314. onScroll: false,
  41315. use: true,
  41316. // 是否启用上拉加载; 默认true
  41317. page: {
  41318. pae: 0,
  41319. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  41320. size: 10
  41321. // 每页数据的数量,默认10
  41322. },
  41323. noMoreSize: 10,
  41324. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  41325. textNoMore: "已经到底了",
  41326. empty: {
  41327. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  41328. tip: "暂无数据"
  41329. }
  41330. },
  41331. dataList: []
  41332. };
  41333. },
  41334. onLoad(options) {
  41335. this.getDictByKey("sys_hospital_level");
  41336. },
  41337. methods: {
  41338. getDictByKey(key) {
  41339. var data = { key };
  41340. getDictByKey(data).then(
  41341. (res) => {
  41342. if (res.code == 200) {
  41343. if (key == "sys_hospital_level") {
  41344. this.hosLevelOptions = res.data;
  41345. }
  41346. }
  41347. },
  41348. (err) => {
  41349. }
  41350. );
  41351. },
  41352. typeChange(item) {
  41353. this.type = item.index;
  41354. formatAppLog("log", "at pages_user/myDoctorList.vue:138", this.type);
  41355. this.mescroll.resetUpScroll();
  41356. },
  41357. navTo(url2) {
  41358. uni.navigateTo({
  41359. url: url2
  41360. });
  41361. },
  41362. mescrollInit(mescroll) {
  41363. this.mescroll = mescroll;
  41364. },
  41365. /*下拉刷新的回调 */
  41366. downCallback() {
  41367. this.mescroll.resetUpScroll();
  41368. },
  41369. /*上拉加载的回调*/
  41370. upCallback(page2) {
  41371. var that = this;
  41372. var data = {
  41373. type: this.type + 1,
  41374. pageNum: page2.num,
  41375. pageSize: page2.size
  41376. };
  41377. getMyDoctorList(data).then((res) => {
  41378. if (res.code == 200) {
  41379. if (page2.num == 1) {
  41380. res.data.list.forEach(function(value2, index2, array3) {
  41381. value2.prices = JSON.parse(value2.priceJson);
  41382. });
  41383. that.dataList = res.data.list;
  41384. } else {
  41385. that.dataList = that.dataList.concat(res.data.list);
  41386. }
  41387. that.mescroll.endBySize(res.data.list.length, res.data.total);
  41388. } else {
  41389. uni.showToast({
  41390. icon: "none",
  41391. title: "请求失败"
  41392. });
  41393. that.dataList = null;
  41394. that.mescroll.endErr();
  41395. }
  41396. });
  41397. }
  41398. }
  41399. };
  41400. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  41401. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  41402. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  41403. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  41404. vue.createElementVNode("view", { class: "top-fixed" }, [
  41405. vue.createVNode(_component_u_tabs, {
  41406. current: $data.type,
  41407. scrollable: false,
  41408. list: $data.tabs,
  41409. lineColor: "#C39A58",
  41410. onChange: $options.typeChange
  41411. }, null, 8, ["current", "list", "onChange"])
  41412. ]),
  41413. vue.createVNode(_component_mescroll_body, {
  41414. top: "88rpx",
  41415. bottom: "0",
  41416. ref: "mescrollRef",
  41417. onInit: $options.mescrollInit,
  41418. down: $data.downOption,
  41419. up: $data.upOption,
  41420. onDown: $options.downCallback,
  41421. onUp: $options.upCallback
  41422. }, {
  41423. default: vue.withCtx(() => [
  41424. vue.createElementVNode("view", { class: "doctors" }, [
  41425. vue.createElementVNode("view", { class: "doctor-box" }, [
  41426. (vue.openBlock(true), vue.createElementBlock(
  41427. vue.Fragment,
  41428. null,
  41429. vue.renderList($data.dataList, (item, index2) => {
  41430. return vue.openBlock(), vue.createElementBlock("view", {
  41431. class: "doctor",
  41432. onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId)
  41433. }, [
  41434. vue.createElementVNode("view", { class: "item" }, [
  41435. vue.createElementVNode("view", { class: "left" }, [
  41436. vue.createElementVNode("view", { class: "head-box" }, [
  41437. vue.createElementVNode("image", {
  41438. mode: "aspectFill",
  41439. class: "doc-img",
  41440. src: item.avatar
  41441. }, null, 8, ["src"]),
  41442. item.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  41443. key: 0,
  41444. class: "isline"
  41445. }, [
  41446. vue.createElementVNode("view", { class: "img" }, [
  41447. vue.createElementVNode("image", { src: "/static/images/isline.png" }),
  41448. vue.createElementVNode("view", { class: "name" }, "在线")
  41449. ])
  41450. ])) : vue.createCommentVNode("v-if", true)
  41451. ])
  41452. ]),
  41453. vue.createElementVNode("view", { class: "right" }, [
  41454. vue.createElementVNode("view", { class: "doc-box" }, [
  41455. vue.createElementVNode(
  41456. "view",
  41457. { class: "doc-name" },
  41458. vue.toDisplayString(item.doctorName),
  41459. 1
  41460. /* TEXT */
  41461. ),
  41462. vue.createElementVNode(
  41463. "view",
  41464. { class: "doc-position" },
  41465. vue.toDisplayString(item.position),
  41466. 1
  41467. /* TEXT */
  41468. ),
  41469. vue.createElementVNode(
  41470. "view",
  41471. { class: "doc-dept" },
  41472. vue.toDisplayString(item.deptName),
  41473. 1
  41474. /* TEXT */
  41475. )
  41476. ]),
  41477. vue.createElementVNode("view", { class: "hospital-box" }, [
  41478. vue.createElementVNode("view", { class: "tag" }, [
  41479. vue.createElementVNode(
  41480. "text",
  41481. null,
  41482. vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item.hospitalLevel)),
  41483. 1
  41484. /* TEXT */
  41485. )
  41486. ]),
  41487. vue.createElementVNode(
  41488. "view",
  41489. { class: "name" },
  41490. vue.toDisplayString(item.hospitalName),
  41491. 1
  41492. /* TEXT */
  41493. )
  41494. ]),
  41495. vue.createElementVNode("view", { class: "doc-spec" }, [
  41496. vue.createElementVNode(
  41497. "view",
  41498. { class: "spec ellipsis2" },
  41499. vue.toDisplayString(item.speciality),
  41500. 1
  41501. /* TEXT */
  41502. )
  41503. ]),
  41504. vue.createElementVNode("view", { class: "doc-count" }, [
  41505. vue.createElementVNode("view", { class: "name" }, "好评:"),
  41506. vue.createElementVNode(
  41507. "view",
  41508. { class: "count" },
  41509. vue.toDisplayString(item.pingStar) + "分",
  41510. 1
  41511. /* TEXT */
  41512. ),
  41513. vue.createElementVNode("view", { class: "name" }, "接诊量:"),
  41514. vue.createElementVNode(
  41515. "view",
  41516. { class: "count" },
  41517. vue.toDisplayString(item.pingStar),
  41518. 1
  41519. /* TEXT */
  41520. ),
  41521. vue.createElementVNode("view", { class: "name" }, "平均响应:"),
  41522. vue.createElementVNode("view", { class: "count" })
  41523. ]),
  41524. vue.createElementVNode("view", { class: "doc-price" }, [
  41525. vue.createElementVNode("view", { class: "btn" }, [
  41526. vue.createTextVNode(" 咨询医生¥ "),
  41527. (vue.openBlock(true), vue.createElementBlock(
  41528. vue.Fragment,
  41529. null,
  41530. vue.renderList(item.prices, (price, index3) => {
  41531. return vue.openBlock(), vue.createElementBlock("text", null, [
  41532. vue.createTextVNode(
  41533. vue.toDisplayString(price.price.toFixed(2)) + " ",
  41534. 1
  41535. /* TEXT */
  41536. ),
  41537. index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
  41538. ]);
  41539. }),
  41540. 256
  41541. /* UNKEYED_FRAGMENT */
  41542. ))
  41543. ])
  41544. ])
  41545. ])
  41546. ])
  41547. ], 8, ["onClick"]);
  41548. }),
  41549. 256
  41550. /* UNKEYED_FRAGMENT */
  41551. ))
  41552. ])
  41553. ])
  41554. ]),
  41555. _: 1
  41556. /* STABLE */
  41557. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  41558. ]);
  41559. }
  41560. const Pages_userMyDoctorList = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-bdd0a4ce"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/myDoctorList.vue"]]);
  41561. let request$3 = new Request$1().http;
  41562. function getPatientList() {
  41563. return request$3("/app/patient/getPatientList", null, "GET");
  41564. }
  41565. function getPatientById(data) {
  41566. return request$3("/app/patient/getPatientById", data, "GET");
  41567. }
  41568. function delPatient(data) {
  41569. return request$3("/app/patient/delPatient", data, "POST", "application/json;charset=UTF-8");
  41570. }
  41571. function addPatient(data) {
  41572. return request$3("/app/patient/addPatient", data, "POST", "application/json;charset=UTF-8");
  41573. }
  41574. function editPatient(data) {
  41575. return request$3("/app/patient/editPatient", data, "POST", "application/json;charset=UTF-8");
  41576. }
  41577. const _sfc_main$x = {
  41578. data() {
  41579. return {
  41580. patient: []
  41581. };
  41582. },
  41583. onLoad() {
  41584. this.getPatientList();
  41585. uni.$on("refreshPatient", () => {
  41586. this.getPatientList();
  41587. });
  41588. },
  41589. methods: {
  41590. selectPatient(item) {
  41591. uni.$emit("refreshOrderPatient", item);
  41592. uni.navigateBack({
  41593. delta: 1
  41594. });
  41595. },
  41596. editPatient(item) {
  41597. uni.navigateTo({
  41598. url: "./addEditPatient?type=edit&patientId=" + item.patientId
  41599. });
  41600. },
  41601. delPatient(item) {
  41602. uni.showModal({
  41603. title: "提示",
  41604. content: "确认删除吗?",
  41605. showCancel: true,
  41606. cancelText: "取消",
  41607. confirmText: "确定",
  41608. success: (res) => {
  41609. if (res.confirm) {
  41610. var data = { patientId: item.patientId };
  41611. delPatient(data).then(
  41612. (res2) => {
  41613. if (res2.code == 200) {
  41614. uni.showToast({
  41615. icon: "success",
  41616. title: "操作成功"
  41617. });
  41618. this.getPatientList();
  41619. } else {
  41620. uni.showToast({
  41621. icon: "none",
  41622. title: "请求失败"
  41623. });
  41624. }
  41625. },
  41626. (rej) => {
  41627. }
  41628. );
  41629. }
  41630. }
  41631. });
  41632. },
  41633. getPatientList() {
  41634. getPatientList().then(
  41635. (res) => {
  41636. uni.hideLoading();
  41637. if (res.code == 200) {
  41638. this.patient = res.data;
  41639. } else {
  41640. uni.showToast({
  41641. icon: "none",
  41642. title: "请求失败"
  41643. });
  41644. }
  41645. },
  41646. (rej) => {
  41647. }
  41648. );
  41649. },
  41650. addPatient() {
  41651. uni.navigateTo({
  41652. url: "./addEditPatient?type=add"
  41653. });
  41654. }
  41655. }
  41656. };
  41657. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  41658. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  41659. vue.createElementVNode("view", { class: "inner" }, [
  41660. (vue.openBlock(true), vue.createElementBlock(
  41661. vue.Fragment,
  41662. null,
  41663. vue.renderList($data.patient, (item, index2) => {
  41664. return vue.openBlock(), vue.createElementBlock("view", {
  41665. key: index2,
  41666. onClick: vue.withModifiers(($event) => $options.selectPatient(item), ["stop"]),
  41667. class: "peop-item"
  41668. }, [
  41669. vue.createElementVNode("view", { class: "info" }, [
  41670. vue.createElementVNode(
  41671. "view",
  41672. { class: "name" },
  41673. vue.toDisplayString(item.patientName),
  41674. 1
  41675. /* TEXT */
  41676. ),
  41677. vue.createElementVNode("view", { class: "detail" }, [
  41678. item.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  41679. key: 0,
  41680. class: "text"
  41681. }, "男")) : vue.createCommentVNode("v-if", true),
  41682. item.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  41683. key: 1,
  41684. class: "text"
  41685. }, "女")) : vue.createCommentVNode("v-if", true),
  41686. vue.createElementVNode(
  41687. "text",
  41688. { class: "text" },
  41689. vue.toDisplayString(_ctx.$getAge(item.birthday)) + "岁",
  41690. 1
  41691. /* TEXT */
  41692. ),
  41693. vue.createElementVNode(
  41694. "text",
  41695. { class: "text" },
  41696. vue.toDisplayString(_ctx.$parseIdCard(item.idCard)),
  41697. 1
  41698. /* TEXT */
  41699. )
  41700. ])
  41701. ]),
  41702. vue.createElementVNode("view", { class: "operat-box" }, [
  41703. vue.createElementVNode("image", {
  41704. src: "/static/images/del.png",
  41705. mode: "",
  41706. onClick: vue.withModifiers(($event) => $options.delPatient(item), ["stop"])
  41707. }, null, 8, ["onClick"]),
  41708. vue.createElementVNode("image", {
  41709. src: "/static/images/edit.png",
  41710. mode: "",
  41711. onClick: vue.withModifiers(($event) => $options.editPatient(item), ["stop"])
  41712. }, null, 8, ["onClick"])
  41713. ])
  41714. ], 8, ["onClick"]);
  41715. }),
  41716. 128
  41717. /* KEYED_FRAGMENT */
  41718. )),
  41719. $data.patient.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  41720. key: 0,
  41721. class: "no-data-box",
  41722. onClick: _cache[0] || (_cache[0] = ($event) => $options.getPatientList())
  41723. }, [
  41724. vue.createElementVNode("image", {
  41725. src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  41726. mode: "aspectFit"
  41727. }),
  41728. vue.createElementVNode("view", { class: "empty-title" }, "暂无数据")
  41729. ])) : vue.createCommentVNode("v-if", true)
  41730. ]),
  41731. vue.createElementVNode("view", { class: "btn-box" }, [
  41732. vue.createElementVNode("view", {
  41733. class: "sub-btn",
  41734. onClick: _cache[1] || (_cache[1] = (...args) => $options.addPatient && $options.addPatient(...args))
  41735. }, "创建就诊人")
  41736. ])
  41737. ]);
  41738. }
  41739. const Pages_userPatient = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/patient.vue"]]);
  41740. const props = {
  41741. props: {
  41742. // 标签类型info、primary、success、warning、error
  41743. type: {
  41744. type: String,
  41745. default: props$y.tag.type
  41746. },
  41747. // 不可用
  41748. disabled: {
  41749. type: [Boolean, String],
  41750. default: props$y.tag.disabled
  41751. },
  41752. // 标签的大小,large,medium,mini
  41753. size: {
  41754. type: String,
  41755. default: props$y.tag.size
  41756. },
  41757. // tag的形状,circle(两边半圆形), square(方形,带圆角)
  41758. shape: {
  41759. type: String,
  41760. default: props$y.tag.shape
  41761. },
  41762. // 标签文字
  41763. text: {
  41764. type: [String, Number],
  41765. default: props$y.tag.text
  41766. },
  41767. // 背景颜色,默认为空字符串,即不处理
  41768. bgColor: {
  41769. type: String,
  41770. default: props$y.tag.bgColor
  41771. },
  41772. // 标签字体颜色,默认为空字符串,即不处理
  41773. color: {
  41774. type: String,
  41775. default: props$y.tag.color
  41776. },
  41777. // 标签的边框颜色
  41778. borderColor: {
  41779. type: String,
  41780. default: props$y.tag.borderColor
  41781. },
  41782. // 关闭按钮图标的颜色
  41783. closeColor: {
  41784. type: String,
  41785. default: props$y.tag.closeColor
  41786. },
  41787. // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
  41788. name: {
  41789. type: [String, Number],
  41790. default: props$y.tag.name
  41791. },
  41792. // // 模式选择,dark|light|plain
  41793. // mode: {
  41794. // type: String,
  41795. // default: 'light'
  41796. // },
  41797. // 镂空时是否填充背景色
  41798. plainFill: {
  41799. type: Boolean,
  41800. default: props$y.tag.plainFill
  41801. },
  41802. // 是否镂空
  41803. plain: {
  41804. type: Boolean,
  41805. default: props$y.tag.plain
  41806. },
  41807. // 是否可关闭
  41808. closable: {
  41809. type: Boolean,
  41810. default: props$y.tag.closable
  41811. },
  41812. // 是否显示
  41813. show: {
  41814. type: Boolean,
  41815. default: props$y.tag.show
  41816. },
  41817. // 内置图标,或绝对路径的图片
  41818. icon: {
  41819. type: String,
  41820. default: props$y.tag.icon
  41821. }
  41822. }
  41823. };
  41824. const _sfc_main$w = {
  41825. name: "u-tag",
  41826. mixins: [mpMixin, mixin, props],
  41827. data() {
  41828. return {};
  41829. },
  41830. computed: {
  41831. style() {
  41832. const style = {};
  41833. if (this.bgColor) {
  41834. style.backgroundColor = this.bgColor;
  41835. }
  41836. if (this.color) {
  41837. style.color = this.color;
  41838. }
  41839. if (this.borderColor) {
  41840. style.borderColor = this.borderColor;
  41841. }
  41842. return style;
  41843. },
  41844. // nvue下,文本颜色无法继承父元素
  41845. textColor() {
  41846. const style = {};
  41847. if (this.color) {
  41848. style.color = this.color;
  41849. }
  41850. return style;
  41851. },
  41852. imgStyle() {
  41853. const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
  41854. return {
  41855. width,
  41856. height: width
  41857. };
  41858. },
  41859. // 文本的样式
  41860. closeSize() {
  41861. const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
  41862. return size;
  41863. },
  41864. // 图标大小
  41865. iconSize() {
  41866. const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
  41867. return size;
  41868. },
  41869. // 图标颜色
  41870. elIconColor() {
  41871. return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
  41872. }
  41873. },
  41874. methods: {
  41875. // 点击关闭按钮
  41876. closeHandler() {
  41877. this.$emit("close", this.name);
  41878. },
  41879. // 点击标签
  41880. clickHandler() {
  41881. this.$emit("click", this.name);
  41882. }
  41883. }
  41884. };
  41885. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  41886. const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
  41887. const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
  41888. return vue.openBlock(), vue.createBlock(_component_u_transition, {
  41889. mode: "fade",
  41890. show: _ctx.show,
  41891. style: { "display": "inline-flex" }
  41892. }, {
  41893. default: vue.withCtx(() => [
  41894. vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
  41895. vue.createElementVNode(
  41896. "view",
  41897. {
  41898. 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`]]),
  41899. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
  41900. style: vue.normalizeStyle([{
  41901. marginRight: _ctx.closable ? "10px" : 0,
  41902. marginTop: _ctx.closable ? "10px" : 0
  41903. }, $options.style])
  41904. },
  41905. [
  41906. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  41907. _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
  41908. key: 0,
  41909. class: "u-tag__icon"
  41910. }, [
  41911. _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
  41912. key: 0,
  41913. src: _ctx.icon,
  41914. style: vue.normalizeStyle([$options.imgStyle])
  41915. }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
  41916. key: 1,
  41917. color: $options.elIconColor,
  41918. name: _ctx.icon,
  41919. size: $options.iconSize
  41920. }, null, 8, ["color", "name", "size"]))
  41921. ])) : vue.createCommentVNode("v-if", true)
  41922. ], true),
  41923. vue.createElementVNode(
  41924. "text",
  41925. {
  41926. class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
  41927. style: vue.normalizeStyle([$options.textColor])
  41928. },
  41929. vue.toDisplayString(_ctx.text),
  41930. 7
  41931. /* TEXT, CLASS, STYLE */
  41932. )
  41933. ],
  41934. 6
  41935. /* CLASS, STYLE */
  41936. ),
  41937. _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
  41938. "view",
  41939. {
  41940. key: 0,
  41941. class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
  41942. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
  41943. style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
  41944. },
  41945. [
  41946. vue.createVNode(_component_u_icon, {
  41947. name: "close",
  41948. size: $options.closeSize,
  41949. color: "#ffffff"
  41950. }, null, 8, ["size"])
  41951. ],
  41952. 6
  41953. /* CLASS, STYLE */
  41954. )) : vue.createCommentVNode("v-if", true)
  41955. ])
  41956. ]),
  41957. _: 3
  41958. /* FORWARDED */
  41959. }, 8, ["show"]);
  41960. }
  41961. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-2fd891bb"], ["__file", "E:/Project/2023/问诊平台/his_user_app/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]);
  41962. const _sfc_main$v = {
  41963. data() {
  41964. return {
  41965. relationShow: false,
  41966. relations: [
  41967. {
  41968. name: "本人"
  41969. },
  41970. {
  41971. name: "配偶"
  41972. },
  41973. {
  41974. name: "父母"
  41975. },
  41976. {
  41977. name: "子女"
  41978. },
  41979. {
  41980. name: "朋友"
  41981. },
  41982. {
  41983. name: "亲戚"
  41984. },
  41985. {
  41986. name: "其他"
  41987. }
  41988. ],
  41989. historyAllergics: [
  41990. {
  41991. name: "阿司匹林",
  41992. checked: 0
  41993. },
  41994. {
  41995. name: "磺胺类",
  41996. checked: 0
  41997. },
  41998. {
  41999. name: "头孢类",
  42000. checked: 0
  42001. },
  42002. {
  42003. name: "青毒素类",
  42004. checked: 0
  42005. },
  42006. {
  42007. name: "奶制品",
  42008. checked: 0
  42009. },
  42010. {
  42011. name: "其他",
  42012. checked: 0
  42013. }
  42014. ],
  42015. selfMedHistorys: [
  42016. {
  42017. name: "糖尿病",
  42018. checked: 0
  42019. },
  42020. {
  42021. name: "哮喘",
  42022. checked: 0
  42023. },
  42024. {
  42025. name: "恶性肿瘤",
  42026. checked: 0
  42027. },
  42028. {
  42029. name: "高血压",
  42030. checked: 0
  42031. },
  42032. {
  42033. name: "其他",
  42034. checked: 0
  42035. }
  42036. ],
  42037. familyMedHistorys: [
  42038. {
  42039. name: "糖尿病",
  42040. checked: 0
  42041. },
  42042. {
  42043. name: "哮喘",
  42044. checked: 0
  42045. },
  42046. {
  42047. name: "恶性肿瘤",
  42048. checked: 0
  42049. },
  42050. {
  42051. name: "高血压",
  42052. checked: 0
  42053. },
  42054. {
  42055. name: "其他",
  42056. checked: 0
  42057. }
  42058. ],
  42059. type: null,
  42060. patientId: null,
  42061. form: {
  42062. sex: 1,
  42063. birthday: "",
  42064. idCard: "",
  42065. relation: "",
  42066. // 与本人关系
  42067. liverUnusual: "正常",
  42068. // 肝功能是否异常
  42069. renalUnusual: "正常",
  42070. // 肾功能是否异常
  42071. historyAllergic: "无",
  42072. // 过敏史
  42073. familyMedHistory: "无",
  42074. // 家族病史
  42075. selfMedHistory: "无"
  42076. // 个人病史
  42077. }
  42078. };
  42079. },
  42080. onLoad(option) {
  42081. this.type = option.type;
  42082. if (this.type == "edit") {
  42083. this.patientId = option.patientId;
  42084. this.getPatientById();
  42085. uni.setNavigationBarTitle({
  42086. title: "编辑就诊人"
  42087. });
  42088. } else {
  42089. uni.setNavigationBarTitle({
  42090. title: "新增就诊人"
  42091. });
  42092. }
  42093. },
  42094. methods: {
  42095. liverUnusualChange(item) {
  42096. formatAppLog("log", "at pages_user/addEditPatient.vue:289", item);
  42097. this.form.liverUnusual = item.detail.value;
  42098. },
  42099. renalUnusualChange(item) {
  42100. formatAppLog("log", "at pages_user/addEditPatient.vue:293", item);
  42101. this.form.renalUnusual = item.detail.value;
  42102. },
  42103. historyAllergicOptionChange(item) {
  42104. item.checked = item.checked == 1 ? 0 : 1;
  42105. },
  42106. selfMedHistoryOptionChange(item) {
  42107. item.checked = item.checked == 1 ? 0 : 1;
  42108. },
  42109. familyMedHistoryOptionChange(item) {
  42110. item.checked = item.checked == 1 ? 0 : 1;
  42111. },
  42112. historyAllergicChange(item) {
  42113. formatAppLog("log", "at pages_user/addEditPatient.vue:306", item);
  42114. this.form.historyAllergic = item.detail.value;
  42115. },
  42116. selfMedHistoryChange(item) {
  42117. formatAppLog("log", "at pages_user/addEditPatient.vue:310", item);
  42118. this.form.selfMedHistory = item.detail.value;
  42119. },
  42120. familyMedHistoryChange(item) {
  42121. formatAppLog("log", "at pages_user/addEditPatient.vue:314", item);
  42122. this.form.familyMedHistory = item.detail.value;
  42123. },
  42124. relationSelect(e) {
  42125. this.form.relation = e.name;
  42126. },
  42127. idcardChange() {
  42128. if (this.form.idCard.length == 18) {
  42129. var json = this.$parseIDCardInfo(this.form.idCard);
  42130. this.form.birthday = json.birthday;
  42131. formatAppLog("log", "at pages_user/addEditPatient.vue:324", json);
  42132. }
  42133. },
  42134. genderChange(type2) {
  42135. this.form.sex = type2;
  42136. },
  42137. getPatientById() {
  42138. var data = { patientId: this.patientId };
  42139. getPatientById(data).then(
  42140. (res) => {
  42141. if (res.code == 200) {
  42142. this.form = res.data;
  42143. this.date = this.form.birthday;
  42144. if (this.form.historyAllergic != null && this.form.historyAllergic != "无") {
  42145. var options = this.form.historyAllergic.split(",");
  42146. this.historyAllergics.forEach((item) => {
  42147. for (var i = 0; i < options.length; i++) {
  42148. if (item.name == options[i]) {
  42149. item.checked = 1;
  42150. }
  42151. }
  42152. });
  42153. this.form.historyAllergic = "有";
  42154. }
  42155. if (this.form.selfMedHistory != null && this.form.selfMedHistory != "无") {
  42156. var options = this.form.selfMedHistory.split(",");
  42157. this.selfMedHistorys.forEach((item) => {
  42158. for (var i = 0; i < options.length; i++) {
  42159. if (item.name == options[i]) {
  42160. item.checked = 1;
  42161. }
  42162. }
  42163. });
  42164. this.form.selfMedHistory = "有";
  42165. }
  42166. if (this.form.familyMedHistory != null && this.form.familyMedHistory != "无") {
  42167. var options = this.form.familyMedHistory.split(",");
  42168. this.familyMedHistorys.forEach((item) => {
  42169. for (var i = 0; i < options.length; i++) {
  42170. if (item.name == options[i]) {
  42171. item.checked = 1;
  42172. }
  42173. }
  42174. });
  42175. this.form.familyMedHistory = "有";
  42176. }
  42177. } else {
  42178. uni.showToast({
  42179. title: res.msg
  42180. });
  42181. }
  42182. },
  42183. (rej) => {
  42184. }
  42185. );
  42186. },
  42187. submit() {
  42188. if (this.type == "add") {
  42189. this.addPatient();
  42190. } else if (this.type == "edit") {
  42191. this.editPatient();
  42192. }
  42193. },
  42194. editPatient() {
  42195. var data = {
  42196. patientId: this.patientId,
  42197. patientName: this.form.patientName,
  42198. mobile: this.form.mobile,
  42199. sex: this.form.sex,
  42200. birthday: this.form.birthday,
  42201. idCard: this.form.idCard,
  42202. relation: this.form.relation,
  42203. // 与本人关系
  42204. liverUnusual: this.form.liverUnusual,
  42205. // 肝功能是否异常
  42206. renalUnusual: this.form.renalUnusual
  42207. // 肾功能是否异常
  42208. };
  42209. if (this.form.historyAllergic == "有") {
  42210. var options = [];
  42211. this.historyAllergics.forEach((item) => {
  42212. if (item.checked == 1) {
  42213. options.push(item.name);
  42214. }
  42215. });
  42216. data.historyAllergic = options.toString();
  42217. } else {
  42218. data.historyAllergic = this.form.historyAllergic;
  42219. }
  42220. if (this.form.selfMedHistory == "有") {
  42221. var options = [];
  42222. this.selfMedHistorys.forEach((item) => {
  42223. if (item.checked == 1) {
  42224. options.push(item.name);
  42225. }
  42226. });
  42227. data.selfMedHistory = options.toString();
  42228. } else {
  42229. data.selfMedHistory = this.form.selfMedHistory;
  42230. }
  42231. if (this.form.familyMedHistory == "有") {
  42232. var options = [];
  42233. this.familyMedHistorys.forEach((item) => {
  42234. if (item.checked == 1) {
  42235. options.push(item.name);
  42236. }
  42237. });
  42238. data.familyMedHistory = options.toString();
  42239. } else {
  42240. data.familyMedHistory = this.form.familyMedHistory;
  42241. }
  42242. editPatient(data).then(
  42243. (res) => {
  42244. if (res.code == 200) {
  42245. uni.showToast({
  42246. icon: "success",
  42247. title: "操作成功"
  42248. });
  42249. setTimeout(function() {
  42250. uni.$emit("refreshPatient");
  42251. uni.navigateBack({
  42252. delta: 1
  42253. });
  42254. }, 500);
  42255. } else {
  42256. uni.showToast({
  42257. icon: "none",
  42258. title: res.msg
  42259. });
  42260. }
  42261. },
  42262. (rej) => {
  42263. }
  42264. );
  42265. },
  42266. addPatient() {
  42267. var data = {
  42268. patientName: this.form.patientName,
  42269. mobile: this.form.mobile,
  42270. sex: this.form.sex,
  42271. birthday: this.form.birthday,
  42272. idCard: this.form.idCard,
  42273. relation: this.form.relation,
  42274. // 与本人关系
  42275. liverUnusual: this.form.liverUnusual,
  42276. // 肝功能是否异常
  42277. renalUnusual: this.form.renalUnusual
  42278. // 肾功能是否异常
  42279. };
  42280. if (this.form.historyAllergic == "有") {
  42281. var options = [];
  42282. this.historyAllergics.forEach((item) => {
  42283. if (item.checked == 1) {
  42284. options.push(item.name);
  42285. }
  42286. });
  42287. data.historyAllergic = options.toString();
  42288. } else {
  42289. data.historyAllergic = this.form.historyAllergic;
  42290. }
  42291. if (this.form.selfMedHistory == "有") {
  42292. var options = [];
  42293. this.selfMedHistorys.forEach((item) => {
  42294. if (item.checked == 1) {
  42295. options.push(item.name);
  42296. }
  42297. });
  42298. data.selfMedHistory = options.toString();
  42299. } else {
  42300. data.selfMedHistory = this.form.selfMedHistory;
  42301. }
  42302. if (this.form.familyMedHistory == "有") {
  42303. var options = [];
  42304. this.familyMedHistorys.forEach((item) => {
  42305. if (item.checked == 1) {
  42306. options.push(item.name);
  42307. }
  42308. });
  42309. data.familyMedHistory = options.toString();
  42310. } else {
  42311. data.familyMedHistory = this.form.familyMedHistory;
  42312. }
  42313. addPatient(data).then(
  42314. (res) => {
  42315. if (res.code == 200) {
  42316. uni.showToast({
  42317. icon: "success",
  42318. title: "操作成功"
  42319. });
  42320. setTimeout(function() {
  42321. uni.$emit("refreshPatient");
  42322. uni.navigateBack({
  42323. delta: 1
  42324. });
  42325. }, 500);
  42326. } else {
  42327. uni.showToast({
  42328. icon: "none",
  42329. title: res.msg
  42330. });
  42331. }
  42332. },
  42333. (rej) => {
  42334. }
  42335. );
  42336. },
  42337. // 出生日期选择
  42338. birthdayChange: function(e) {
  42339. this.form.birthday = e.target.value;
  42340. }
  42341. }
  42342. };
  42343. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  42344. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  42345. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2);
  42346. const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_2$1);
  42347. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  42348. vue.createElementVNode("view", { class: "inner" }, [
  42349. vue.createVNode(_component_u_alert, {
  42350. title: "国家卫健委要求,就医行为必须实名登记",
  42351. type: "info"
  42352. }),
  42353. vue.createElementVNode("view", { class: "form-box" }, [
  42354. vue.createElementVNode("view", { class: "form-item" }, [
  42355. vue.createElementVNode("text", { class: "label" }, "姓名"),
  42356. vue.withDirectives(vue.createElementVNode(
  42357. "input",
  42358. {
  42359. class: "input-width",
  42360. type: "text",
  42361. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.patientName = $event),
  42362. placeholder: "请输入真实姓名",
  42363. "placeholder-class": "form-input"
  42364. },
  42365. null,
  42366. 512
  42367. /* NEED_PATCH */
  42368. ), [
  42369. [vue.vModelText, $data.form.patientName]
  42370. ])
  42371. ]),
  42372. vue.createElementVNode("view", { class: "form-item" }, [
  42373. vue.createElementVNode("text", { class: "label" }, "性别"),
  42374. vue.createElementVNode("radio-group", { style: { "display": "flex", "align-items": "center" } }, [
  42375. vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
  42376. vue.createElementVNode("radio", {
  42377. onClick: _cache[1] || (_cache[1] = ($event) => $options.genderChange(1)),
  42378. color: "#C39A58",
  42379. value: "1",
  42380. checked: $data.form.sex === 1,
  42381. style: { "margin-right": "16upx" }
  42382. }, null, 8, ["checked"]),
  42383. vue.createElementVNode("text", { class: "option-text" }, "男")
  42384. ]),
  42385. vue.createElementVNode("label", null, [
  42386. vue.createElementVNode("radio", {
  42387. onClick: _cache[2] || (_cache[2] = ($event) => $options.genderChange(2)),
  42388. color: "#C39A58",
  42389. value: "2",
  42390. checked: $data.form.sex === 2,
  42391. style: { "margin-right": "16upx" }
  42392. }, null, 8, ["checked"]),
  42393. vue.createElementVNode("text", { class: "option-text" }, "女")
  42394. ])
  42395. ])
  42396. ]),
  42397. vue.createElementVNode("view", { class: "form-item" }, [
  42398. vue.createElementVNode("text", { class: "label" }, "联系方式"),
  42399. vue.withDirectives(vue.createElementVNode(
  42400. "input",
  42401. {
  42402. class: "input-width",
  42403. type: "phone",
  42404. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.mobile = $event),
  42405. placeholder: "请输入联系方式",
  42406. "placeholder-class": "form-input"
  42407. },
  42408. null,
  42409. 512
  42410. /* NEED_PATCH */
  42411. ), [
  42412. [vue.vModelText, $data.form.mobile]
  42413. ])
  42414. ]),
  42415. vue.createElementVNode("view", { class: "form-item" }, [
  42416. vue.createElementVNode("text", { class: "label" }, "身份证号"),
  42417. vue.withDirectives(vue.createElementVNode(
  42418. "input",
  42419. {
  42420. class: "input-width",
  42421. type: "idcard",
  42422. onBlur: _cache[4] || (_cache[4] = ($event) => $options.idcardChange()),
  42423. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.idCard = $event),
  42424. placeholder: "请输入身份证号",
  42425. "placeholder-class": "form-input"
  42426. },
  42427. null,
  42428. 544
  42429. /* NEED_HYDRATION, NEED_PATCH */
  42430. ), [
  42431. [vue.vModelText, $data.form.idCard]
  42432. ])
  42433. ]),
  42434. vue.createElementVNode("view", { class: "form-item" }, [
  42435. vue.createElementVNode("text", { class: "label" }, "出生年月"),
  42436. vue.createElementVNode("picker", {
  42437. value: $data.form.birthday,
  42438. start: "1900-01-01",
  42439. class: "birth-picker",
  42440. mode: "date",
  42441. onChange: _cache[6] || (_cache[6] = (...args) => $options.birthdayChange && $options.birthdayChange(...args))
  42442. }, [
  42443. vue.createElementVNode("view", { class: "right-box" }, [
  42444. vue.createElementVNode("view", { class: "input-box" }, [
  42445. vue.createElementVNode("input", {
  42446. type: "text",
  42447. value: $data.form.birthday,
  42448. placeholder: "请选择出生年月",
  42449. "placeholder-class": "form-input",
  42450. disabled: "disabled"
  42451. }, null, 8, ["value"])
  42452. ]),
  42453. vue.createElementVNode("image", {
  42454. class: "arrow",
  42455. src: "/static/images/arrow_gray.png",
  42456. mode: ""
  42457. })
  42458. ])
  42459. ], 40, ["value"])
  42460. ])
  42461. ]),
  42462. vue.createElementVNode("view", { class: "form-box" }, [
  42463. vue.createElementVNode("view", {
  42464. class: "form-item",
  42465. onClick: _cache[7] || (_cache[7] = ($event) => $data.relationShow = true)
  42466. }, [
  42467. vue.createElementVNode("text", { class: "label" }, "与本人关系"),
  42468. vue.createElementVNode("view", { class: "right-box" }, [
  42469. vue.createElementVNode("view", { class: "input-box" }, [
  42470. vue.createElementVNode("input", {
  42471. type: "text",
  42472. value: $data.form.relation,
  42473. placeholder: "请选择",
  42474. "placeholder-class": "form-input",
  42475. disabled: "disabled"
  42476. }, null, 8, ["value"])
  42477. ]),
  42478. vue.createElementVNode("image", {
  42479. class: "arrow",
  42480. src: "/static/images/arrow_gray.png",
  42481. mode: ""
  42482. })
  42483. ])
  42484. ])
  42485. ]),
  42486. vue.createElementVNode("view", { class: "form-box" }, [
  42487. vue.createElementVNode("view", { class: "form-item" }, [
  42488. vue.createElementVNode("text", { class: "label" }, "肝功能"),
  42489. vue.createElementVNode(
  42490. "radio-group",
  42491. {
  42492. onChange: _cache[8] || (_cache[8] = (...args) => $options.liverUnusualChange && $options.liverUnusualChange(...args)),
  42493. style: { "display": "flex", "align-items": "center" }
  42494. },
  42495. [
  42496. vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
  42497. vue.createElementVNode("radio", {
  42498. color: "#C39A58",
  42499. value: "正常",
  42500. checked: $data.form.liverUnusual === "正常",
  42501. style: { "margin-right": "16upx" }
  42502. }, null, 8, ["checked"]),
  42503. vue.createElementVNode("text", { class: "option-text" }, "正常")
  42504. ]),
  42505. vue.createElementVNode("label", null, [
  42506. vue.createElementVNode("radio", {
  42507. color: "#C39A58",
  42508. value: "异常",
  42509. checked: $data.form.liverUnusual === "异常",
  42510. style: { "margin-right": "16upx" }
  42511. }, null, 8, ["checked"]),
  42512. vue.createElementVNode("text", { class: "option-text" }, "异常")
  42513. ])
  42514. ],
  42515. 32
  42516. /* NEED_HYDRATION */
  42517. )
  42518. ]),
  42519. vue.createElementVNode("view", { class: "form-item" }, [
  42520. vue.createElementVNode("text", { class: "label" }, "肾功能"),
  42521. vue.createElementVNode(
  42522. "radio-group",
  42523. {
  42524. onChange: _cache[9] || (_cache[9] = (...args) => $options.renalUnusualChange && $options.renalUnusualChange(...args)),
  42525. style: { "display": "flex", "align-items": "center" }
  42526. },
  42527. [
  42528. vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
  42529. vue.createElementVNode("radio", {
  42530. color: "#C39A58",
  42531. value: "正常",
  42532. checked: $data.form.renalUnusual === "正常",
  42533. style: { "margin-right": "16upx" }
  42534. }, null, 8, ["checked"]),
  42535. vue.createElementVNode("text", { class: "option-text" }, "正常")
  42536. ]),
  42537. vue.createElementVNode("label", null, [
  42538. vue.createElementVNode("radio", {
  42539. color: "#C39A58",
  42540. value: "异常",
  42541. checked: $data.form.renalUnusual === "异常",
  42542. style: { "margin-right": "16upx" }
  42543. }, null, 8, ["checked"]),
  42544. vue.createElementVNode("text", { class: "option-text" }, "异常")
  42545. ])
  42546. ],
  42547. 32
  42548. /* NEED_HYDRATION */
  42549. )
  42550. ]),
  42551. vue.createElementVNode("view", { class: "form-item" }, [
  42552. vue.createElementVNode("text", { class: "label" }, "过敏史"),
  42553. vue.createElementVNode(
  42554. "radio-group",
  42555. {
  42556. onChange: _cache[10] || (_cache[10] = (...args) => $options.historyAllergicChange && $options.historyAllergicChange(...args)),
  42557. style: { "display": "flex", "align-items": "center", "justify-content": "flex-end", "margin": "5rpx 0rpx" }
  42558. },
  42559. [
  42560. vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
  42561. vue.createElementVNode("radio", {
  42562. color: "#C39A58",
  42563. value: "无",
  42564. checked: $data.form.historyAllergic === "无",
  42565. style: { "margin-right": "16upx" }
  42566. }, null, 8, ["checked"]),
  42567. vue.createElementVNode("text", { class: "option-text" }, "无")
  42568. ]),
  42569. vue.createElementVNode("label", null, [
  42570. vue.createElementVNode("radio", {
  42571. color: "#C39A58",
  42572. value: "有",
  42573. checked: $data.form.historyAllergic === "有",
  42574. style: { "margin-right": "16upx" }
  42575. }, null, 8, ["checked"]),
  42576. vue.createElementVNode("text", { class: "option-text" }, "有")
  42577. ])
  42578. ],
  42579. 32
  42580. /* NEED_HYDRATION */
  42581. )
  42582. ]),
  42583. $data.form.historyAllergic == "有" ? (vue.openBlock(), vue.createElementBlock("view", {
  42584. key: 0,
  42585. class: "form-item"
  42586. }, [
  42587. vue.createElementVNode("view", {
  42588. class: "option-box",
  42589. style: { "margin": "5rpx 0rpx" }
  42590. }, [
  42591. (vue.openBlock(true), vue.createElementBlock(
  42592. vue.Fragment,
  42593. null,
  42594. vue.renderList($data.historyAllergics, (item, index2) => {
  42595. return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [
  42596. vue.createVNode(_component_u_tag, {
  42597. onClick: ($event) => $options.historyAllergicOptionChange(item),
  42598. borderColor: item.checked == 1 ? "#ffffff" : "#C39A58",
  42599. bgColor: item.checked == 1 ? "#C39A58" : "#ffffff",
  42600. color: item.checked == 1 ? "#ffffff" : "#C39A58",
  42601. shape: "circle",
  42602. text: item.name
  42603. }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"])
  42604. ]);
  42605. }),
  42606. 256
  42607. /* UNKEYED_FRAGMENT */
  42608. ))
  42609. ])
  42610. ])) : vue.createCommentVNode("v-if", true),
  42611. vue.createElementVNode("view", { class: "form-item" }, [
  42612. vue.createElementVNode("text", { class: "label" }, "个人病史"),
  42613. vue.createElementVNode(
  42614. "radio-group",
  42615. {
  42616. onChange: _cache[11] || (_cache[11] = (...args) => $options.selfMedHistoryChange && $options.selfMedHistoryChange(...args)),
  42617. style: { "display": "flex", "align-items": "center" }
  42618. },
  42619. [
  42620. vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
  42621. vue.createElementVNode("radio", {
  42622. color: "#C39A58",
  42623. value: "无",
  42624. checked: $data.form.selfMedHistory === "无",
  42625. style: { "margin-right": "16upx" }
  42626. }, null, 8, ["checked"]),
  42627. vue.createElementVNode("text", { class: "option-text" }, "无")
  42628. ]),
  42629. vue.createElementVNode("label", null, [
  42630. vue.createElementVNode("radio", {
  42631. color: "#C39A58",
  42632. value: "有",
  42633. checked: $data.form.selfMedHistory === "有",
  42634. style: { "margin-right": "16upx" }
  42635. }, null, 8, ["checked"]),
  42636. vue.createElementVNode("text", { class: "option-text" }, "有")
  42637. ])
  42638. ],
  42639. 32
  42640. /* NEED_HYDRATION */
  42641. )
  42642. ]),
  42643. $data.form.selfMedHistory == "有" ? (vue.openBlock(), vue.createElementBlock("view", {
  42644. key: 1,
  42645. class: "form-item"
  42646. }, [
  42647. vue.createElementVNode("view", {
  42648. class: "option-box",
  42649. style: { "margin": "5rpx 0rpx" }
  42650. }, [
  42651. (vue.openBlock(true), vue.createElementBlock(
  42652. vue.Fragment,
  42653. null,
  42654. vue.renderList($data.selfMedHistorys, (item, index2) => {
  42655. return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [
  42656. vue.createVNode(_component_u_tag, {
  42657. onClick: ($event) => $options.selfMedHistoryOptionChange(item),
  42658. borderColor: item.checked == 1 ? "#ffffff" : "#C39A58",
  42659. bgColor: item.checked == 1 ? "#C39A58" : "#ffffff",
  42660. color: item.checked == 1 ? "#ffffff" : "#C39A58",
  42661. shape: "circle",
  42662. text: item.name
  42663. }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"])
  42664. ]);
  42665. }),
  42666. 256
  42667. /* UNKEYED_FRAGMENT */
  42668. ))
  42669. ])
  42670. ])) : vue.createCommentVNode("v-if", true),
  42671. vue.createElementVNode("view", { class: "form-item" }, [
  42672. vue.createElementVNode("text", { class: "label" }, "家庭病史"),
  42673. vue.createElementVNode(
  42674. "radio-group",
  42675. {
  42676. onChange: _cache[12] || (_cache[12] = (...args) => $options.familyMedHistoryChange && $options.familyMedHistoryChange(...args)),
  42677. style: { "display": "flex", "align-items": "center" }
  42678. },
  42679. [
  42680. vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
  42681. vue.createElementVNode("radio", {
  42682. color: "#C39A58",
  42683. value: "无",
  42684. checked: $data.form.familyMedHistory === "无",
  42685. style: { "margin-right": "16upx" }
  42686. }, null, 8, ["checked"]),
  42687. vue.createElementVNode("text", { class: "option-text" }, "无")
  42688. ]),
  42689. vue.createElementVNode("label", null, [
  42690. vue.createElementVNode("radio", {
  42691. color: "#C39A58",
  42692. value: "有",
  42693. checked: $data.form.familyMedHistory === "有",
  42694. style: { "margin-right": "16upx" }
  42695. }, null, 8, ["checked"]),
  42696. vue.createElementVNode("text", { class: "option-text" }, "有")
  42697. ])
  42698. ],
  42699. 32
  42700. /* NEED_HYDRATION */
  42701. )
  42702. ]),
  42703. $data.form.familyMedHistory == "有" ? (vue.openBlock(), vue.createElementBlock("view", {
  42704. key: 2,
  42705. class: "form-item"
  42706. }, [
  42707. vue.createElementVNode("view", {
  42708. class: "option-box",
  42709. style: { "margin": "5rpx 0rpx" }
  42710. }, [
  42711. (vue.openBlock(true), vue.createElementBlock(
  42712. vue.Fragment,
  42713. null,
  42714. vue.renderList($data.familyMedHistorys, (item, index2) => {
  42715. return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [
  42716. vue.createVNode(_component_u_tag, {
  42717. onClick: ($event) => $options.familyMedHistoryOptionChange(item),
  42718. borderColor: item.checked == 1 ? "#ffffff" : "#C39A58",
  42719. bgColor: item.checked == 1 ? "#C39A58" : "#ffffff",
  42720. color: item.checked == 1 ? "#ffffff" : "#C39A58",
  42721. shape: "circle",
  42722. text: item.name
  42723. }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"])
  42724. ]);
  42725. }),
  42726. 256
  42727. /* UNKEYED_FRAGMENT */
  42728. ))
  42729. ])
  42730. ])) : vue.createCommentVNode("v-if", true)
  42731. ])
  42732. ]),
  42733. vue.createElementVNode("view", { class: "btn-box" }, [
  42734. vue.createElementVNode("view", {
  42735. class: "sub-btn",
  42736. onClick: _cache[13] || (_cache[13] = ($event) => $options.submit())
  42737. }, "保存就诊人")
  42738. ]),
  42739. vue.createVNode(_component_u_action_sheet, {
  42740. show: $data.relationShow,
  42741. actions: $data.relations,
  42742. title: "请选择",
  42743. onClose: _cache[14] || (_cache[14] = ($event) => $data.relationShow = false),
  42744. onSelect: $options.relationSelect
  42745. }, null, 8, ["show", "actions", "onSelect"])
  42746. ]);
  42747. }
  42748. const Pages_userAddEditPatient = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/addEditPatient.vue"]]);
  42749. const _sfc_main$u = {
  42750. name: "UserCoupon",
  42751. props: {},
  42752. mixins: [MescrollMixin],
  42753. // 使用mixin
  42754. data: function() {
  42755. return {
  42756. tabs: [
  42757. {
  42758. id: 0,
  42759. name: "待使用"
  42760. },
  42761. {
  42762. id: 1,
  42763. name: "已使用"
  42764. },
  42765. {
  42766. id: 2,
  42767. name: "已过期"
  42768. }
  42769. ],
  42770. status: 0,
  42771. mescroll: null,
  42772. downOption: {
  42773. //下拉刷新
  42774. use: true,
  42775. auto: false
  42776. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  42777. },
  42778. upOption: {
  42779. onScroll: false,
  42780. use: true,
  42781. // 是否启用上拉加载; 默认true
  42782. page: {
  42783. pae: 0,
  42784. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  42785. size: 10
  42786. // 每页数据的数量,默认10
  42787. },
  42788. noMoreSize: 10,
  42789. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  42790. textNoMore: "已经到底了",
  42791. empty: {
  42792. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  42793. tip: "暂无数据"
  42794. }
  42795. },
  42796. dataList: []
  42797. };
  42798. },
  42799. watch: {},
  42800. onShow() {
  42801. },
  42802. methods: {
  42803. statusChange(item) {
  42804. formatAppLog("log", "at pages_user/myCouponList.vue:96", item);
  42805. this.status = item.id;
  42806. this.mescroll.resetUpScroll();
  42807. },
  42808. navTo(url2) {
  42809. uni.navigateTo({
  42810. url: url2
  42811. });
  42812. },
  42813. mescrollInit(mescroll) {
  42814. this.mescroll = mescroll;
  42815. },
  42816. /*下拉刷新的回调 */
  42817. downCallback() {
  42818. this.mescroll.resetUpScroll();
  42819. },
  42820. /*上拉加载的回调*/
  42821. upCallback(page2) {
  42822. var that = this;
  42823. var data = {
  42824. status: this.status,
  42825. pageNum: page2.num,
  42826. pageSize: page2.size
  42827. };
  42828. getMyCouponList(data).then((res) => {
  42829. if (res.code == 200) {
  42830. if (page2.num == 1) {
  42831. that.dataList = res.data.list;
  42832. } else {
  42833. that.dataList = that.dataList.concat(res.data.list);
  42834. }
  42835. that.mescroll.endBySize(res.data.list.length, res.data.total);
  42836. } else {
  42837. uni.showToast({
  42838. icon: "none",
  42839. title: "请求失败"
  42840. });
  42841. that.dataList = null;
  42842. that.mescroll.endErr();
  42843. }
  42844. });
  42845. }
  42846. }
  42847. };
  42848. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  42849. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  42850. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  42851. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  42852. vue.createElementVNode("view", { class: "top-fixed" }, [
  42853. vue.createVNode(_component_u_tabs, {
  42854. current: _ctx.status,
  42855. scrollable: false,
  42856. list: _ctx.tabs,
  42857. lineColor: "#C39A58",
  42858. onChange: $options.statusChange
  42859. }, null, 8, ["current", "list", "onChange"])
  42860. ]),
  42861. vue.createVNode(_component_mescroll_body, {
  42862. top: "88rpx",
  42863. bottom: "0",
  42864. ref: "mescrollRef",
  42865. onInit: $options.mescrollInit,
  42866. down: _ctx.downOption,
  42867. up: _ctx.upOption,
  42868. onDown: $options.downCallback,
  42869. onUp: $options.upCallback
  42870. }, {
  42871. default: vue.withCtx(() => [
  42872. vue.createElementVNode("view", { class: "coupon-box" }, [
  42873. (vue.openBlock(true), vue.createElementBlock(
  42874. vue.Fragment,
  42875. null,
  42876. vue.renderList(_ctx.dataList, (item) => {
  42877. return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
  42878. vue.createElementVNode("view", { class: "left" }, [
  42879. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  42880. key: 0,
  42881. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png",
  42882. mode: "widthFix"
  42883. })) : vue.createCommentVNode("v-if", true),
  42884. item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  42885. key: 1,
  42886. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png",
  42887. mode: "widthFix"
  42888. })) : vue.createCommentVNode("v-if", true),
  42889. vue.createElementVNode("view", { style: { "z-index": "999" } }, [
  42890. vue.createTextVNode(" ¥"),
  42891. item.price != null ? (vue.openBlock(), vue.createElementBlock(
  42892. "span",
  42893. {
  42894. key: 0,
  42895. class: "num"
  42896. },
  42897. vue.toDisplayString(item.price.toFixed(2)),
  42898. 1
  42899. /* TEXT */
  42900. )) : vue.createCommentVNode("v-if", true)
  42901. ]),
  42902. item.minPrice != null ? (vue.openBlock(), vue.createElementBlock(
  42903. "view",
  42904. {
  42905. key: 2,
  42906. class: "pic-num"
  42907. },
  42908. "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
  42909. 1
  42910. /* TEXT */
  42911. )) : vue.createCommentVNode("v-if", true)
  42912. ]),
  42913. vue.createElementVNode("view", { class: "right" }, [
  42914. vue.createElementVNode(
  42915. "view",
  42916. { class: "title" },
  42917. vue.toDisplayString(item.title),
  42918. 1
  42919. /* TEXT */
  42920. ),
  42921. vue.createElementVNode("view", { class: "btns" }, [
  42922. item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  42923. "view",
  42924. { key: 0 },
  42925. vue.toDisplayString(item.limitTime) + " 到期",
  42926. 1
  42927. /* TEXT */
  42928. )) : vue.createCommentVNode("v-if", true),
  42929. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  42930. "view",
  42931. { key: 1 },
  42932. "使用时间 " + vue.toDisplayString(item.useTime),
  42933. 1
  42934. /* TEXT */
  42935. )) : vue.createCommentVNode("v-if", true),
  42936. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  42937. key: 2,
  42938. class: "bnt gray"
  42939. }, "已使用")) : vue.createCommentVNode("v-if", true),
  42940. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  42941. key: 3,
  42942. class: "bnt gray"
  42943. }, "已过期")) : vue.createCommentVNode("v-if", true),
  42944. item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  42945. key: 4,
  42946. class: "btn"
  42947. }, "可使用")) : vue.createCommentVNode("v-if", true)
  42948. ])
  42949. ])
  42950. ]);
  42951. }),
  42952. 256
  42953. /* UNKEYED_FRAGMENT */
  42954. ))
  42955. ])
  42956. ]),
  42957. _: 1
  42958. /* STABLE */
  42959. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  42960. ]);
  42961. }
  42962. const Pages_userMyCouponList = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-f4d41b7b"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/myCouponList.vue"]]);
  42963. const _sfc_main$t = {
  42964. data() {
  42965. return {
  42966. certs: []
  42967. };
  42968. },
  42969. onLoad(val) {
  42970. this.getConfigByKey();
  42971. },
  42972. methods: {
  42973. getConfigByKey() {
  42974. var data = { key: "his.certs" };
  42975. getConfigByKey(data).then(
  42976. (res) => {
  42977. if (res.code == 200) {
  42978. this.certs = JSON.parse(res.data).certs.split(",");
  42979. }
  42980. },
  42981. (rej) => {
  42982. }
  42983. );
  42984. },
  42985. showImg(item) {
  42986. var urls = [];
  42987. urls.push(item);
  42988. uni.previewImage({
  42989. urls,
  42990. current: 0
  42991. });
  42992. }
  42993. }
  42994. };
  42995. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  42996. return vue.openBlock(), vue.createElementBlock("view", { class: "my-content" }, [
  42997. (vue.openBlock(true), vue.createElementBlock(
  42998. vue.Fragment,
  42999. null,
  43000. vue.renderList($data.certs, (item) => {
  43001. return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
  43002. vue.createElementVNode("image", {
  43003. onClick: ($event) => $options.showImg(item),
  43004. src: item
  43005. }, null, 8, ["onClick", "src"])
  43006. ]);
  43007. }),
  43008. 256
  43009. /* UNKEYED_FRAGMENT */
  43010. ))
  43011. ]);
  43012. }
  43013. const Pages_userCert = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-18b08804"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/cert.vue"]]);
  43014. let request$2 = new Request$1().http;
  43015. function getFollowList(data) {
  43016. return request$2("/app/follow/getFollowList", data, "GET");
  43017. }
  43018. function getFollowById(data) {
  43019. return request$2("/app/follow/getFollowById", data, "GET");
  43020. }
  43021. function doFollow(data) {
  43022. return request$2("/app/follow/doFollow", data, "POST", "application/json;charset=UTF-8");
  43023. }
  43024. const _sfc_main$s = {
  43025. mixins: [MescrollMixin],
  43026. // 使用mixin
  43027. data() {
  43028. return {
  43029. tabs: [
  43030. {
  43031. id: -1,
  43032. name: "全部"
  43033. },
  43034. {
  43035. id: 0,
  43036. name: "未完成"
  43037. },
  43038. {
  43039. id: 1,
  43040. name: "已完成"
  43041. }
  43042. ],
  43043. writeStatus: -1,
  43044. mescroll: null,
  43045. downOption: {
  43046. //下拉刷新
  43047. use: true,
  43048. auto: false
  43049. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  43050. },
  43051. upOption: {
  43052. onScroll: false,
  43053. use: true,
  43054. // 是否启用上拉加载; 默认true
  43055. page: {
  43056. pae: 0,
  43057. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  43058. size: 10
  43059. // 每页数据的数量,默认10
  43060. },
  43061. noMoreSize: 10,
  43062. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  43063. textNoMore: "已经到底了",
  43064. empty: {
  43065. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  43066. tip: "暂无数据"
  43067. }
  43068. },
  43069. dataList: []
  43070. };
  43071. },
  43072. onLoad() {
  43073. var that = this;
  43074. uni.$on("refreshFollowList", () => {
  43075. that.mescroll.resetUpScroll();
  43076. });
  43077. },
  43078. onShow() {
  43079. },
  43080. methods: {
  43081. doFoloow(item) {
  43082. uni.navigateTo({
  43083. url: "./doFollow?followId=" + item.followId
  43084. });
  43085. },
  43086. showDetails(item) {
  43087. uni.navigateTo({
  43088. url: "./followDetails?followId=" + item.followId
  43089. });
  43090. },
  43091. statusChange(item) {
  43092. this.writeStatus = item.id;
  43093. formatAppLog("log", "at pages_user/followList.vue:111", item);
  43094. this.mescroll.resetUpScroll();
  43095. },
  43096. navTo(url2) {
  43097. uni.navigateTo({
  43098. url: url2
  43099. });
  43100. },
  43101. mescrollInit(mescroll) {
  43102. this.mescroll = mescroll;
  43103. },
  43104. /*下拉刷新的回调 */
  43105. downCallback() {
  43106. this.mescroll.resetUpScroll();
  43107. },
  43108. /*上拉加载的回调*/
  43109. upCallback(page2) {
  43110. var that = this;
  43111. var data = {
  43112. pageNum: page2.num,
  43113. pageSize: page2.size
  43114. };
  43115. if (this.writeStatus != -1) {
  43116. data.writeStatus = this.writeStatus;
  43117. }
  43118. getFollowList(data).then((res) => {
  43119. if (res.code == 200) {
  43120. if (page2.num == 1) {
  43121. that.dataList = res.data.list;
  43122. } else {
  43123. that.dataList = that.dataList.concat(res.data.list);
  43124. }
  43125. that.mescroll.endBySize(res.data.list.length, res.data.total);
  43126. } else {
  43127. uni.showToast({
  43128. icon: "none",
  43129. title: "请求失败"
  43130. });
  43131. that.dataList = null;
  43132. that.mescroll.endErr();
  43133. }
  43134. });
  43135. }
  43136. }
  43137. };
  43138. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  43139. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  43140. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  43141. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  43142. vue.createElementVNode("view", { class: "top-fixed" }, [
  43143. vue.createVNode(_component_u_tabs, {
  43144. scrollable: false,
  43145. list: $data.tabs,
  43146. lineColor: "#C39A58",
  43147. onChange: $options.statusChange
  43148. }, null, 8, ["list", "onChange"])
  43149. ]),
  43150. vue.createVNode(_component_mescroll_body, {
  43151. top: "88rpx",
  43152. bottom: "0",
  43153. ref: "mescrollRef",
  43154. onInit: $options.mescrollInit,
  43155. down: $data.downOption,
  43156. up: $data.upOption,
  43157. onDown: $options.downCallback,
  43158. onUp: $options.upCallback
  43159. }, {
  43160. default: vue.withCtx(() => [
  43161. vue.createElementVNode("view", { class: "order-list" }, [
  43162. (vue.openBlock(true), vue.createElementBlock(
  43163. vue.Fragment,
  43164. null,
  43165. vue.renderList($data.dataList, (item) => {
  43166. return vue.openBlock(), vue.createElementBlock("view", {
  43167. class: "order-item",
  43168. onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
  43169. }, [
  43170. vue.createElementVNode("view", { class: "order-top" }, [
  43171. vue.createElementVNode("view", { class: "left" }, [
  43172. vue.createElementVNode(
  43173. "view",
  43174. { class: "title" },
  43175. vue.toDisplayString(item.tempName),
  43176. 1
  43177. /* TEXT */
  43178. )
  43179. ]),
  43180. item.writeStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  43181. key: 0,
  43182. class: "status red"
  43183. }, " 未完成 ")) : vue.createCommentVNode("v-if", true),
  43184. item.writeStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  43185. key: 1,
  43186. class: "status green"
  43187. }, " 已完成 ")) : vue.createCommentVNode("v-if", true)
  43188. ]),
  43189. vue.createElementVNode("view", { class: "order-cont" }, [
  43190. vue.createElementVNode("view", { class: "order-time-box" }, [
  43191. vue.createElementVNode("view", { class: "order-time" }, [
  43192. vue.createElementVNode(
  43193. "view",
  43194. { class: "time" },
  43195. vue.toDisplayString(item.planTime),
  43196. 1
  43197. /* TEXT */
  43198. ),
  43199. vue.createElementVNode(
  43200. "view",
  43201. { class: "count" },
  43202. vue.toDisplayString(item.num) + "/" + vue.toDisplayString(item.totalNum) + "期",
  43203. 1
  43204. /* TEXT */
  43205. )
  43206. ]),
  43207. vue.createElementVNode("view", { class: "right" }, [
  43208. item.writeStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  43209. key: 0,
  43210. class: "btn red",
  43211. onClick: vue.withModifiers(($event) => $options.doFoloow(item), ["stop"])
  43212. }, "去填写", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  43213. item.writeStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  43214. key: 1,
  43215. class: "btn green",
  43216. onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"])
  43217. }, "查看", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  43218. ])
  43219. ])
  43220. ])
  43221. ], 8, ["onClick"]);
  43222. }),
  43223. 256
  43224. /* UNKEYED_FRAGMENT */
  43225. ))
  43226. ])
  43227. ]),
  43228. _: 1
  43229. /* STABLE */
  43230. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  43231. ]);
  43232. }
  43233. const Pages_userFollowList = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-7c72c7c3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/followList.vue"]]);
  43234. const _sfc_main$r = {
  43235. data() {
  43236. return {
  43237. followId: null,
  43238. follow: null,
  43239. doctor: null,
  43240. form: null
  43241. };
  43242. },
  43243. onLoad(options) {
  43244. this.followId = options.followId;
  43245. },
  43246. onShow() {
  43247. this.getFollowById();
  43248. },
  43249. methods: {
  43250. toIM() {
  43251. var id = "C2CD-" + this.follow.doctorId;
  43252. formatAppLog("log", "at pages_user/followDetails.vue:83", uni.$TUIKit.TUIConversationServer);
  43253. store.commit("timStore/setType", "startFollow");
  43254. store.commit("timStore/setOrderId", this.follow.orderId);
  43255. store.commit("timStore/setFollowId", this.follow.followId);
  43256. store.commit("timStore/setImType", 2);
  43257. store.commit("timStore/setConversationID", id);
  43258. uni.$TUIKit.TUIConversationServer.setMessageRead(id);
  43259. uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
  43260. var _a;
  43261. formatAppLog("log", "at pages_user/followDetails.vue:93", res);
  43262. const { conversation } = res.data;
  43263. store.commit("timStore/setConversation", conversation);
  43264. let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
  43265. conversation.userProfile;
  43266. url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
  43267. uni.redirectTo({ url: url2 });
  43268. }).catch((err) => {
  43269. formatAppLog("warn", "at pages_user/followDetails.vue:114", "获取 group profile 异常 = ", err);
  43270. });
  43271. },
  43272. doFollow() {
  43273. uni.showModal({
  43274. title: "提示",
  43275. content: "确认提交吗吗?",
  43276. showCancel: true,
  43277. cancelText: "取消",
  43278. confirmText: "确定",
  43279. success: (res) => {
  43280. if (res.confirm) {
  43281. var data = {
  43282. followId: this.followId,
  43283. formJson: JSON.stringify(this.form)
  43284. };
  43285. doFollow(data).then(
  43286. (res2) => {
  43287. if (res2.code == 200) {
  43288. uni.showToast({
  43289. icon: "success",
  43290. title: "操作成功"
  43291. });
  43292. setTimeout(function() {
  43293. uni.$emit("refreshFollowList");
  43294. uni.navigateBack({
  43295. delta: 1
  43296. });
  43297. }, 500);
  43298. } else {
  43299. uni.showToast({
  43300. icon: "none",
  43301. title: res2.msg
  43302. });
  43303. }
  43304. },
  43305. (rej) => {
  43306. }
  43307. );
  43308. }
  43309. }
  43310. });
  43311. },
  43312. getFollowById() {
  43313. var data = { followId: this.followId };
  43314. getFollowById(data).then(
  43315. (res) => {
  43316. if (res.code == 200) {
  43317. this.follow = res.follow;
  43318. this.doctor = res.doctor;
  43319. this.form = JSON.parse(this.follow.formJson);
  43320. }
  43321. },
  43322. (err) => {
  43323. }
  43324. );
  43325. }
  43326. }
  43327. };
  43328. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  43329. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  43330. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
  43331. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
  43332. const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
  43333. const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
  43334. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  43335. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  43336. vue.createVNode(_component_u_alert, {
  43337. fontSize: "13",
  43338. type: "info",
  43339. description: "为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!"
  43340. }),
  43341. vue.createElementVNode("view", { class: "cont-box" }, [
  43342. vue.createElementVNode("view", { class: "cont" }, [
  43343. vue.createElementVNode("view", { class: "doctor" }, [
  43344. vue.createElementVNode("view", { class: "left" }, [
  43345. vue.createElementVNode(
  43346. "view",
  43347. { class: "name" },
  43348. "发布医生:" + vue.toDisplayString(_ctx.dortor != null ? $data.doctor.doctorName : ""),
  43349. 1
  43350. /* TEXT */
  43351. ),
  43352. $data.follow != null ? (vue.openBlock(), vue.createElementBlock(
  43353. "view",
  43354. {
  43355. key: 0,
  43356. class: "count"
  43357. },
  43358. vue.toDisplayString($data.follow.num) + "/" + vue.toDisplayString($data.follow.totalNum) + "期",
  43359. 1
  43360. /* TEXT */
  43361. )) : vue.createCommentVNode("v-if", true)
  43362. ]),
  43363. vue.createElementVNode(
  43364. "view",
  43365. { class: "right" },
  43366. vue.toDisplayString($data.follow.planTime),
  43367. 1
  43368. /* TEXT */
  43369. )
  43370. ]),
  43371. vue.createElementVNode("view", { class: "item-box" }, [
  43372. (vue.openBlock(true), vue.createElementBlock(
  43373. vue.Fragment,
  43374. null,
  43375. vue.renderList($data.form, (item, index2) => {
  43376. return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
  43377. vue.createElementVNode(
  43378. "view",
  43379. { class: "title" },
  43380. vue.toDisplayString(item.question),
  43381. 1
  43382. /* TEXT */
  43383. ),
  43384. vue.createElementVNode("view", { class: "option" }, [
  43385. item.type == 1 ? (vue.openBlock(), vue.createBlock(_component_u_radio_group, {
  43386. key: 0,
  43387. disabled: true,
  43388. modelValue: item.answers,
  43389. "onUpdate:modelValue": ($event) => item.answers = $event,
  43390. placement: "column"
  43391. }, {
  43392. default: vue.withCtx(() => [
  43393. (vue.openBlock(true), vue.createElementBlock(
  43394. vue.Fragment,
  43395. null,
  43396. vue.renderList(item.options, (option, subIndex) => {
  43397. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  43398. customStyle: { marginBottom: "8px" },
  43399. key: subIndex,
  43400. label: option,
  43401. name: option
  43402. }, null, 8, ["label", "name"]);
  43403. }),
  43404. 128
  43405. /* KEYED_FRAGMENT */
  43406. ))
  43407. ]),
  43408. _: 2
  43409. /* DYNAMIC */
  43410. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
  43411. item.type == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
  43412. key: 1,
  43413. disabled: true,
  43414. modelValue: item.answers,
  43415. "onUpdate:modelValue": ($event) => item.answers = $event,
  43416. placement: "column"
  43417. }, {
  43418. default: vue.withCtx(() => [
  43419. (vue.openBlock(true), vue.createElementBlock(
  43420. vue.Fragment,
  43421. null,
  43422. vue.renderList(item.options, (option, subIndex) => {
  43423. return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  43424. customStyle: { marginBottom: "8px" },
  43425. key: subIndex,
  43426. label: option,
  43427. name: option
  43428. }, null, 8, ["label", "name"]);
  43429. }),
  43430. 128
  43431. /* KEYED_FRAGMENT */
  43432. ))
  43433. ]),
  43434. _: 2
  43435. /* DYNAMIC */
  43436. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
  43437. item.type == 3 ? (vue.openBlock(), vue.createBlock(_component_u__textarea, {
  43438. key: 2,
  43439. disabled: true,
  43440. count: "",
  43441. maxlength: "200",
  43442. modelValue: item.answers,
  43443. "onUpdate:modelValue": ($event) => item.answers = $event,
  43444. placeholder: "请输入内容"
  43445. }, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
  43446. ])
  43447. ]);
  43448. }),
  43449. 256
  43450. /* UNKEYED_FRAGMENT */
  43451. ))
  43452. ])
  43453. ])
  43454. ]),
  43455. vue.createElementVNode("view", { class: "btn-box" }, [
  43456. vue.createElementVNode("view", {
  43457. class: "btn cancel",
  43458. onClick: _cache[0] || (_cache[0] = ($event) => $options.toIM())
  43459. }, "咨询")
  43460. ])
  43461. ]);
  43462. }
  43463. const Pages_userFollowDetails = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-e5734008"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/followDetails.vue"]]);
  43464. const _sfc_main$q = {
  43465. mixins: [MescrollMixin],
  43466. // 使用mixin
  43467. data() {
  43468. return {
  43469. tabs: [
  43470. {
  43471. id: 0,
  43472. name: "全部"
  43473. },
  43474. {
  43475. id: 1,
  43476. name: "待评价"
  43477. },
  43478. {
  43479. id: 2,
  43480. name: "已评价"
  43481. }
  43482. ],
  43483. status: 0,
  43484. mescroll: null,
  43485. downOption: {
  43486. //下拉刷新
  43487. use: true,
  43488. auto: false
  43489. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  43490. },
  43491. upOption: {
  43492. onScroll: false,
  43493. use: true,
  43494. // 是否启用上拉加载; 默认true
  43495. page: {
  43496. pae: 0,
  43497. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  43498. size: 10
  43499. // 每页数据的数量,默认10
  43500. },
  43501. noMoreSize: 10,
  43502. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  43503. textNoMore: "已经到底了",
  43504. empty: {
  43505. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  43506. tip: "暂无数据"
  43507. }
  43508. },
  43509. dataList: []
  43510. };
  43511. },
  43512. onLoad() {
  43513. var that = this;
  43514. uni.$on("refreshDrugReportList", () => {
  43515. that.mescroll.resetUpScroll();
  43516. });
  43517. },
  43518. onShow() {
  43519. },
  43520. methods: {
  43521. doPing(item) {
  43522. uni.navigateTo({
  43523. url: "./drugReportPing?reportId=" + item.reportId
  43524. });
  43525. },
  43526. showDetails(item) {
  43527. uni.navigateTo({
  43528. url: "./drugReportDetails?reportId=" + item.reportId
  43529. });
  43530. },
  43531. statusChange(item) {
  43532. this.status = item.id;
  43533. formatAppLog("log", "at pages_user/drugReportList.vue:113", item);
  43534. this.mescroll.resetUpScroll();
  43535. },
  43536. navTo(url2) {
  43537. uni.navigateTo({
  43538. url: url2
  43539. });
  43540. },
  43541. mescrollInit(mescroll) {
  43542. this.mescroll = mescroll;
  43543. },
  43544. /*下拉刷新的回调 */
  43545. downCallback() {
  43546. this.mescroll.resetUpScroll();
  43547. },
  43548. /*上拉加载的回调*/
  43549. upCallback(page2) {
  43550. var that = this;
  43551. var data = {
  43552. pageNum: page2.num,
  43553. pageSize: page2.size
  43554. };
  43555. if (this.status != 0) {
  43556. data.status = this.status;
  43557. }
  43558. getDrugReportList(data).then((res) => {
  43559. if (res.code == 200) {
  43560. if (page2.num == 1) {
  43561. that.dataList = res.data.list;
  43562. } else {
  43563. that.dataList = that.dataList.concat(res.data.list);
  43564. }
  43565. that.mescroll.endBySize(res.data.list.length, res.data.total);
  43566. } else {
  43567. uni.showToast({
  43568. icon: "none",
  43569. title: "请求失败"
  43570. });
  43571. that.dataList = null;
  43572. that.mescroll.endErr();
  43573. }
  43574. });
  43575. }
  43576. }
  43577. };
  43578. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  43579. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  43580. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  43581. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  43582. vue.createElementVNode("view", { class: "top-fixed" }, [
  43583. vue.createVNode(_component_u_tabs, {
  43584. scrollable: false,
  43585. list: $data.tabs,
  43586. lineColor: "#C39A58",
  43587. onChange: $options.statusChange
  43588. }, null, 8, ["list", "onChange"])
  43589. ]),
  43590. vue.createVNode(_component_mescroll_body, {
  43591. top: "88rpx",
  43592. bottom: "0",
  43593. ref: "mescrollRef",
  43594. onInit: $options.mescrollInit,
  43595. down: $data.downOption,
  43596. up: $data.upOption,
  43597. onDown: $options.downCallback,
  43598. onUp: $options.upCallback
  43599. }, {
  43600. default: vue.withCtx(() => [
  43601. vue.createElementVNode("view", { class: "order-list" }, [
  43602. (vue.openBlock(true), vue.createElementBlock(
  43603. vue.Fragment,
  43604. null,
  43605. vue.renderList($data.dataList, (item) => {
  43606. return vue.openBlock(), vue.createElementBlock("view", {
  43607. class: "order-item",
  43608. onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
  43609. }, [
  43610. vue.createElementVNode("view", { class: "order-top" }, [
  43611. vue.createElementVNode("view", { class: "left" }, [
  43612. vue.createElementVNode("image", {
  43613. class: "head",
  43614. mode: "aspectFill",
  43615. src: item.avatar
  43616. }, null, 8, ["src"]),
  43617. vue.createElementVNode(
  43618. "view",
  43619. { class: "name" },
  43620. vue.toDisplayString(item.doctorName),
  43621. 1
  43622. /* TEXT */
  43623. )
  43624. ]),
  43625. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  43626. key: 0,
  43627. class: "status red"
  43628. }, " 未评价 ")) : vue.createCommentVNode("v-if", true),
  43629. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  43630. key: 1,
  43631. class: "status green"
  43632. }, " 已评价 ")) : vue.createCommentVNode("v-if", true)
  43633. ]),
  43634. vue.createElementVNode("view", { class: "order-cont" }, [
  43635. vue.createElementVNode(
  43636. "view",
  43637. { class: "order-desc" },
  43638. "咨询总结:" + vue.toDisplayString(item.reportSummary),
  43639. 1
  43640. /* TEXT */
  43641. ),
  43642. vue.createElementVNode("view", { class: "order-time-box" }, [
  43643. vue.createElementVNode("view", { class: "order-time" }, [
  43644. vue.createElementVNode(
  43645. "view",
  43646. { class: "time" },
  43647. vue.toDisplayString(item.createTime),
  43648. 1
  43649. /* TEXT */
  43650. )
  43651. ]),
  43652. vue.createElementVNode("view", { class: "right" }, [
  43653. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  43654. key: 0,
  43655. class: "btn green",
  43656. onClick: vue.withModifiers(($event) => $options.doPing(item), ["stop"])
  43657. }, "去评价", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  43658. vue.createElementVNode("view", {
  43659. class: "btn green",
  43660. onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"])
  43661. }, "查看", 8, ["onClick"])
  43662. ])
  43663. ])
  43664. ])
  43665. ], 8, ["onClick"]);
  43666. }),
  43667. 256
  43668. /* UNKEYED_FRAGMENT */
  43669. ))
  43670. ])
  43671. ]),
  43672. _: 1
  43673. /* STABLE */
  43674. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  43675. ]);
  43676. }
  43677. const Pages_userDrugReportList = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-b91fd820"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/drugReportList.vue"]]);
  43678. const _sfc_main$p = {
  43679. data() {
  43680. return {
  43681. report: null,
  43682. form: {
  43683. reportId: null,
  43684. pingStar: 0,
  43685. pingContent: ""
  43686. }
  43687. };
  43688. },
  43689. onLoad(options) {
  43690. this.form.reportId = options.reportId;
  43691. this.getDrugReportById();
  43692. },
  43693. methods: {
  43694. getDrugReportById() {
  43695. var data = { reportId: this.form.reportId };
  43696. getDrugReportById(data).then(
  43697. (res) => {
  43698. if (res.code == 200) {
  43699. this.report = res.data;
  43700. }
  43701. },
  43702. (err) => {
  43703. }
  43704. );
  43705. },
  43706. submit() {
  43707. uni.showLoading({
  43708. title: "处理中..."
  43709. });
  43710. pingReport(this.form).then(
  43711. (res) => {
  43712. uni.hideLoading();
  43713. if (res.code == 200) {
  43714. uni.showToast({
  43715. icon: "success",
  43716. title: "评价成功"
  43717. });
  43718. uni.$emit("refreshDrugReportList");
  43719. setTimeout(function() {
  43720. uni.navigateBack({
  43721. delta: 1
  43722. });
  43723. }, 2e3);
  43724. } else {
  43725. uni.showToast({
  43726. icon: "none",
  43727. title: res.msg
  43728. });
  43729. }
  43730. },
  43731. (rej) => {
  43732. }
  43733. );
  43734. }
  43735. }
  43736. };
  43737. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  43738. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  43739. return vue.openBlock(), vue.createElementBlock("view", null, [
  43740. vue.createElementVNode("view", { class: "content" }, [
  43741. vue.createElementVNode("view", { class: "ping" }, [
  43742. vue.createElementVNode("view", { class: "title" }, " 咨询评价 "),
  43743. $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", {
  43744. key: 0,
  43745. class: "doc-box"
  43746. }, [
  43747. vue.createElementVNode("view", { class: "left" }, [
  43748. vue.createElementVNode("image", {
  43749. src: $data.report.avatar,
  43750. mode: "aspectFill"
  43751. }, null, 8, ["src"])
  43752. ]),
  43753. vue.createElementVNode("view", { class: "right" }, [
  43754. vue.createElementVNode("view", { class: "doc-name-box" }, [
  43755. vue.createElementVNode(
  43756. "view",
  43757. { class: "doc-name" },
  43758. vue.toDisplayString($data.report.doctorName),
  43759. 1
  43760. /* TEXT */
  43761. )
  43762. ])
  43763. ])
  43764. ])) : vue.createCommentVNode("v-if", true),
  43765. vue.createElementVNode("view", { class: "ping-star" }, [
  43766. vue.createElementVNode("text", { class: "label" }, "评分"),
  43767. vue.createElementVNode("view", { class: "star" }, [
  43768. vue.createVNode(_component_u_rate, {
  43769. size: "24",
  43770. "active-color": "#fcab36",
  43771. modelValue: $data.form.pingStar,
  43772. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.pingStar = $event)
  43773. }, null, 8, ["modelValue"])
  43774. ])
  43775. ]),
  43776. vue.createElementVNode("view", { class: "ping-content" }, [
  43777. vue.createElementVNode("view", { class: "textarea-box" }, [
  43778. vue.withDirectives(vue.createElementVNode(
  43779. "textarea",
  43780. {
  43781. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.pingContent = $event),
  43782. placeholder: "写入您对医生的评价吧",
  43783. maxlength: "200"
  43784. },
  43785. null,
  43786. 512
  43787. /* NEED_PATCH */
  43788. ), [
  43789. [vue.vModelText, $data.form.pingContent]
  43790. ]),
  43791. vue.createElementVNode(
  43792. "view",
  43793. { class: "num-box" },
  43794. vue.toDisplayString($data.form.pingContent.length) + "/200",
  43795. 1
  43796. /* TEXT */
  43797. )
  43798. ])
  43799. ])
  43800. ])
  43801. ]),
  43802. vue.createElementVNode("view", { class: "btn-box" }, [
  43803. vue.createElementVNode("view", {
  43804. class: "btn",
  43805. onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
  43806. }, "提交评价")
  43807. ])
  43808. ]);
  43809. }
  43810. const Pages_userDrugReportPing = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-d5c2a17c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/drugReportPing.vue"]]);
  43811. const _sfc_main$o = {
  43812. data() {
  43813. return {
  43814. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  43815. reportId: null,
  43816. report: null
  43817. };
  43818. },
  43819. onLoad(options) {
  43820. this.reportId = options.reportId;
  43821. },
  43822. onShow() {
  43823. this.getDrugReportById();
  43824. },
  43825. methods: {
  43826. goBack() {
  43827. uni.navigateBack();
  43828. },
  43829. doPing() {
  43830. uni.navigateTo({
  43831. url: "./drugReportPing?reportId=" + this.reportId
  43832. });
  43833. },
  43834. getDrugReportById() {
  43835. var data = { reportId: this.reportId };
  43836. getDrugReportById(data).then(
  43837. (res) => {
  43838. if (res.code == 200) {
  43839. this.report = res.data;
  43840. }
  43841. },
  43842. (err) => {
  43843. }
  43844. );
  43845. }
  43846. }
  43847. };
  43848. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  43849. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  43850. vue.createElementVNode("view", { class: "cont" }, [
  43851. vue.createElementVNode("view", { class: "bg" }, [
  43852. vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3305ca20c3f646c6b465918efb07f849.png" })
  43853. ]),
  43854. vue.createElementVNode("view", { class: "top-box" }, [
  43855. vue.createElementVNode(
  43856. "view",
  43857. {
  43858. class: "status_bar",
  43859. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  43860. },
  43861. null,
  43862. 4
  43863. /* STYLE */
  43864. ),
  43865. vue.createElementVNode("view", { class: "top-title" }, [
  43866. vue.createElementVNode("image", {
  43867. onClick: _cache[0] || (_cache[0] = ($event) => $options.goBack()),
  43868. src: "/static/images/icon_back_w.png"
  43869. }),
  43870. vue.createElementVNode("view", { class: "title" }, "用药报告")
  43871. ])
  43872. ]),
  43873. $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", {
  43874. key: 0,
  43875. class: "cont-box"
  43876. }, [
  43877. vue.createElementVNode(
  43878. "view",
  43879. {
  43880. class: "status_bar",
  43881. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  43882. },
  43883. null,
  43884. 4
  43885. /* STYLE */
  43886. ),
  43887. vue.createElementVNode("view", { class: "user" }, [
  43888. vue.createElementVNode("image", {
  43889. src: $data.report.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.report.avatar
  43890. }, null, 8, ["src"]),
  43891. vue.createElementVNode("view", { class: "user-box" }, [
  43892. vue.createElementVNode(
  43893. "view",
  43894. { class: "username" },
  43895. vue.toDisplayString($data.report.doctorName),
  43896. 1
  43897. /* TEXT */
  43898. )
  43899. ])
  43900. ]),
  43901. vue.createElementVNode("view", { class: "items" }, [
  43902. vue.createElementVNode("view", { class: "result-box" }, [
  43903. vue.createElementVNode("view", { class: "name" }, "用药咨询报告"),
  43904. vue.createElementVNode(
  43905. "view",
  43906. { class: "time" },
  43907. "报告时间 " + vue.toDisplayString($data.report.createTime),
  43908. 1
  43909. /* TEXT */
  43910. )
  43911. ]),
  43912. vue.createElementVNode("view", { class: "item-box" }, [
  43913. vue.createElementVNode("view", { class: "item" }, [
  43914. vue.createElementVNode("view", { class: "title-box" }, [
  43915. vue.createElementVNode("view", { class: "title-line" }),
  43916. vue.createElementVNode("view", { class: "title" }, "咨询总结")
  43917. ]),
  43918. vue.createElementVNode(
  43919. "view",
  43920. { class: "descs" },
  43921. vue.toDisplayString($data.report.reportSummary),
  43922. 1
  43923. /* TEXT */
  43924. )
  43925. ]),
  43926. vue.createElementVNode("view", { class: "line" })
  43927. ]),
  43928. vue.createElementVNode("view", { class: "item-box" }, [
  43929. vue.createElementVNode("view", { class: "item" }, [
  43930. vue.createElementVNode("view", { class: "title-box" }, [
  43931. vue.createElementVNode("view", { class: "title-line" }),
  43932. vue.createElementVNode("view", { class: "title" }, "生活建议")
  43933. ]),
  43934. $data.report.reportAdvice != null ? (vue.openBlock(), vue.createElementBlock(
  43935. "view",
  43936. {
  43937. key: 0,
  43938. class: "descs"
  43939. },
  43940. vue.toDisplayString($data.report.reportAdvice),
  43941. 1
  43942. /* TEXT */
  43943. )) : vue.createCommentVNode("v-if", true)
  43944. ])
  43945. ])
  43946. ]),
  43947. vue.createCommentVNode(' <view class="sign">\r\n 医生签名\r\n <image :src="report.doctorSignUrl"></image>\r\n </view>\r\n <view class="tips">\r\n 注:本次会诊,仅为针对患者当前身体情况的咨询问诊建议,不作为长期参考依据。\r\n </view> ')
  43948. ])) : vue.createCommentVNode("v-if", true)
  43949. ]),
  43950. $data.report.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  43951. key: 0,
  43952. class: "btn-box"
  43953. }, [
  43954. vue.createElementVNode("view", {
  43955. class: "btn",
  43956. onClick: _cache[1] || (_cache[1] = ($event) => $options.doPing())
  43957. }, "咨询评价")
  43958. ])) : vue.createCommentVNode("v-if", true)
  43959. ]);
  43960. }
  43961. const Pages_userDrugReportDetails = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-4dee7337"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/drugReportDetails.vue"]]);
  43962. const _sfc_main$n = {
  43963. data() {
  43964. return {
  43965. followId: null,
  43966. follow: null,
  43967. doctor: null,
  43968. form: null
  43969. };
  43970. },
  43971. onLoad(options) {
  43972. this.followId = options.followId;
  43973. },
  43974. onShow() {
  43975. this.getFollowById();
  43976. },
  43977. methods: {
  43978. doFollow() {
  43979. uni.showModal({
  43980. title: "提示",
  43981. content: "确认提交吗吗?",
  43982. showCancel: true,
  43983. cancelText: "取消",
  43984. confirmText: "确定",
  43985. success: (res) => {
  43986. if (res.confirm) {
  43987. var data = {
  43988. followId: this.followId,
  43989. formJson: JSON.stringify(this.form)
  43990. };
  43991. doFollow(data).then(
  43992. (res2) => {
  43993. if (res2.code == 200) {
  43994. uni.showToast({
  43995. icon: "success",
  43996. title: "操作成功"
  43997. });
  43998. setTimeout(function() {
  43999. uni.$emit("refreshFollowList");
  44000. uni.navigateBack({
  44001. delta: 1
  44002. });
  44003. }, 500);
  44004. } else {
  44005. uni.showToast({
  44006. icon: "none",
  44007. title: res2.msg
  44008. });
  44009. }
  44010. },
  44011. (rej) => {
  44012. }
  44013. );
  44014. }
  44015. }
  44016. });
  44017. },
  44018. getFollowById() {
  44019. var data = { followId: this.followId };
  44020. getFollowById(data).then(
  44021. (res) => {
  44022. if (res.code == 200) {
  44023. this.follow = res.follow;
  44024. this.doctor = res.doctor;
  44025. this.form = JSON.parse(this.follow.formJson);
  44026. this.form.forEach(function(element) {
  44027. if (element.type == 3) {
  44028. element.answers = "";
  44029. }
  44030. });
  44031. }
  44032. },
  44033. (err) => {
  44034. }
  44035. );
  44036. }
  44037. }
  44038. };
  44039. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  44040. const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
  44041. const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
  44042. const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
  44043. const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
  44044. const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
  44045. const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
  44046. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  44047. vue.createVNode(_component_u_alert, {
  44048. fontSize: "13",
  44049. type: "info",
  44050. description: "为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!"
  44051. }),
  44052. vue.createElementVNode("view", { class: "cont-box" }, [
  44053. vue.createElementVNode("view", { class: "cont" }, [
  44054. vue.createElementVNode("view", { class: "doctor" }, [
  44055. vue.createElementVNode("view", { class: "left" }, [
  44056. vue.createElementVNode(
  44057. "view",
  44058. { class: "name" },
  44059. "发布医生:" + vue.toDisplayString(_ctx.dortor != null ? $data.doctor.doctorName : ""),
  44060. 1
  44061. /* TEXT */
  44062. ),
  44063. $data.follow != null ? (vue.openBlock(), vue.createElementBlock(
  44064. "view",
  44065. {
  44066. key: 0,
  44067. class: "count"
  44068. },
  44069. vue.toDisplayString($data.follow.num) + "/" + vue.toDisplayString($data.follow.totalNum) + "期",
  44070. 1
  44071. /* TEXT */
  44072. )) : vue.createCommentVNode("v-if", true)
  44073. ]),
  44074. vue.createElementVNode(
  44075. "view",
  44076. { class: "right" },
  44077. vue.toDisplayString($data.follow.planTime),
  44078. 1
  44079. /* TEXT */
  44080. )
  44081. ]),
  44082. vue.createElementVNode("view", { class: "item-box" }, [
  44083. (vue.openBlock(true), vue.createElementBlock(
  44084. vue.Fragment,
  44085. null,
  44086. vue.renderList($data.form, (item, index2) => {
  44087. return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
  44088. vue.createElementVNode("view", { class: "title" }, [
  44089. vue.createTextVNode(
  44090. vue.toDisplayString(item.question),
  44091. 1
  44092. /* TEXT */
  44093. ),
  44094. item.require ? (vue.openBlock(), vue.createElementBlock("text", {
  44095. key: 0,
  44096. class: "tip"
  44097. }, "(必填)")) : vue.createCommentVNode("v-if", true)
  44098. ]),
  44099. vue.createElementVNode("view", { class: "option" }, [
  44100. item.type == 1 ? (vue.openBlock(), vue.createBlock(_component_u_radio_group, {
  44101. key: 0,
  44102. modelValue: item.answers,
  44103. "onUpdate:modelValue": ($event) => item.answers = $event,
  44104. placement: "column"
  44105. }, {
  44106. default: vue.withCtx(() => [
  44107. (vue.openBlock(true), vue.createElementBlock(
  44108. vue.Fragment,
  44109. null,
  44110. vue.renderList(item.options, (option, subIndex) => {
  44111. return vue.openBlock(), vue.createBlock(_component_u_radio, {
  44112. customStyle: { marginBottom: "8px" },
  44113. key: subIndex,
  44114. label: option,
  44115. name: option
  44116. }, null, 8, ["label", "name"]);
  44117. }),
  44118. 128
  44119. /* KEYED_FRAGMENT */
  44120. ))
  44121. ]),
  44122. _: 2
  44123. /* DYNAMIC */
  44124. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
  44125. item.type == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
  44126. key: 1,
  44127. modelValue: item.answers,
  44128. "onUpdate:modelValue": ($event) => item.answers = $event,
  44129. placement: "column"
  44130. }, {
  44131. default: vue.withCtx(() => [
  44132. (vue.openBlock(true), vue.createElementBlock(
  44133. vue.Fragment,
  44134. null,
  44135. vue.renderList(item.options, (option, subIndex) => {
  44136. return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
  44137. customStyle: { marginBottom: "8px" },
  44138. key: subIndex,
  44139. label: option,
  44140. name: option
  44141. }, null, 8, ["label", "name"]);
  44142. }),
  44143. 128
  44144. /* KEYED_FRAGMENT */
  44145. ))
  44146. ]),
  44147. _: 2
  44148. /* DYNAMIC */
  44149. }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
  44150. item.type == 3 ? (vue.openBlock(), vue.createBlock(_component_u__textarea, {
  44151. key: 2,
  44152. count: "",
  44153. maxlength: "200",
  44154. modelValue: item.answers,
  44155. "onUpdate:modelValue": ($event) => item.answers = $event,
  44156. placeholder: "请输入内容"
  44157. }, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
  44158. ])
  44159. ]);
  44160. }),
  44161. 256
  44162. /* UNKEYED_FRAGMENT */
  44163. ))
  44164. ])
  44165. ])
  44166. ]),
  44167. vue.createElementVNode("view", { class: "btn-box" }, [
  44168. vue.createElementVNode("view", {
  44169. class: "sub-btn",
  44170. onClick: _cache[0] || (_cache[0] = ($event) => $options.doFollow())
  44171. }, "提交随访")
  44172. ])
  44173. ]);
  44174. }
  44175. const Pages_userDoFollow = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-22d7de8a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/doFollow.vue"]]);
  44176. let request$1 = new Request$1().http;
  44177. function getIntegralGoodsList(data) {
  44178. return request$1("/app/integral/getIntegralGoodsList", data, "GET");
  44179. }
  44180. function getIntegralGoodsById(data) {
  44181. return request$1("/app/integral/getIntegralGoodsById", data, "GET");
  44182. }
  44183. function getUserIntegralLogsList(data) {
  44184. return request$1("/app/integral/getUserIntegralLogsList", data, "GET");
  44185. }
  44186. function getIntegralOrderList(data) {
  44187. return request$1("/app/integral/getIntegralOrderList", data, "GET");
  44188. }
  44189. function getIntegralOrderById(data) {
  44190. return request$1("/app/integral/getIntegralOrderById", data, "GET");
  44191. }
  44192. function createOrder(data) {
  44193. return request$1("/app/integral/createOrder", data, "POST", "application/json;charset=UTF-8");
  44194. }
  44195. function getUserSign() {
  44196. return request$1("/app/integral/getUserSign", null, "GET");
  44197. }
  44198. function doSign(data) {
  44199. return request$1("/app/integral/sign", data, "POST", "application/json;charset=UTF-8");
  44200. }
  44201. const _sfc_main$m = {
  44202. mixins: [MescrollMixin],
  44203. data() {
  44204. return {
  44205. integral: 0,
  44206. type: "0",
  44207. typeOptions: [],
  44208. tabIndex: 0,
  44209. tabs: [],
  44210. mescroll: null,
  44211. downOption: {
  44212. //下拉刷新
  44213. use: true,
  44214. auto: false
  44215. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  44216. },
  44217. upOption: {
  44218. onScroll: false,
  44219. use: true,
  44220. // 是否启用上拉加载; 默认true
  44221. page: {
  44222. pae: 0,
  44223. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  44224. size: 10
  44225. // 每页数据的数量,默认10
  44226. },
  44227. noMoreSize: 10,
  44228. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  44229. textNoMore: "已经到底了",
  44230. empty: {
  44231. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  44232. tip: "暂无数据"
  44233. }
  44234. },
  44235. dataList: []
  44236. };
  44237. },
  44238. onLoad() {
  44239. this.getDictByKey("sys_integral_goods_type");
  44240. this.getUserInfo();
  44241. },
  44242. methods: {
  44243. getUserInfo() {
  44244. getUserInfo$1().then(
  44245. (res) => {
  44246. if (res.code == 200) {
  44247. if (res.user != null) {
  44248. this.integral = res.user.integral;
  44249. }
  44250. } else {
  44251. uni.showToast({
  44252. icon: "none",
  44253. title: "请求失败"
  44254. });
  44255. }
  44256. },
  44257. (rej) => {
  44258. }
  44259. );
  44260. },
  44261. navTo(url2) {
  44262. uni.navigateTo({
  44263. url: url2
  44264. });
  44265. },
  44266. getDictByKey(key) {
  44267. var data = { key };
  44268. var that = this;
  44269. getDictByKey(data).then(
  44270. (res) => {
  44271. if (res.code == 200) {
  44272. this.typeOptions = res.data;
  44273. this.typeOptions.forEach(function(item, index2) {
  44274. var data2 = { name: item.dictLabel };
  44275. that.tabs.push(data2);
  44276. });
  44277. if (this.tabs.length > 0) {
  44278. this.tabIndex = 0;
  44279. }
  44280. }
  44281. },
  44282. (err) => {
  44283. }
  44284. );
  44285. },
  44286. tabChange(item) {
  44287. formatAppLog("log", "at pages_user/integralGoodsList.vue:135", item.index);
  44288. this.type = this.typeOptions[item.index].dictValue;
  44289. this.mescroll.resetUpScroll();
  44290. },
  44291. mescrollInit(mescroll) {
  44292. this.mescroll = mescroll;
  44293. },
  44294. /*下拉刷新的回调 */
  44295. downCallback(mescroll) {
  44296. mescroll.resetUpScroll();
  44297. },
  44298. upCallback(page2) {
  44299. var that = this;
  44300. var data = {
  44301. pageNum: page2.num,
  44302. pageSize: page2.size
  44303. };
  44304. if (this.type != null) {
  44305. data.goodsType = this.type;
  44306. }
  44307. getIntegralGoodsList(data).then((res) => {
  44308. if (res.code == 200) {
  44309. if (page2.num == 1) {
  44310. that.dataList = res.data.list;
  44311. } else {
  44312. that.dataList = that.dataList.concat(res.data.list);
  44313. }
  44314. that.mescroll.endBySize(res.data.list.length, res.data.total);
  44315. } else {
  44316. uni.showToast({
  44317. icon: "none",
  44318. title: "请求失败"
  44319. });
  44320. that.dataList = null;
  44321. that.mescroll.endErr();
  44322. }
  44323. });
  44324. }
  44325. }
  44326. };
  44327. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  44328. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  44329. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  44330. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  44331. vue.createElementVNode("view", { class: "cont-box" }, [
  44332. vue.createElementVNode("view", { class: "top-box" }, [
  44333. vue.createElementVNode("view", { class: "my-integral" }, [
  44334. vue.createElementVNode("view", { class: "left" }, [
  44335. vue.createElementVNode("view", { class: "label" }, "我的积分"),
  44336. vue.createElementVNode(
  44337. "view",
  44338. { class: "integral" },
  44339. vue.toDisplayString($data.integral),
  44340. 1
  44341. /* TEXT */
  44342. )
  44343. ]),
  44344. vue.createElementVNode("view", { class: "btn-box" }, [
  44345. vue.createElementVNode("view", {
  44346. class: "btn",
  44347. onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_user/integralLogsList"))
  44348. }, "积分记录"),
  44349. vue.createElementVNode("view", {
  44350. class: "btn",
  44351. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_user/integralOrderList"))
  44352. }, "兑换记录")
  44353. ])
  44354. ]),
  44355. $data.tabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  44356. key: 0,
  44357. class: "tabs"
  44358. }, [
  44359. vue.createVNode(_component_u_tabs, {
  44360. current: $data.tabIndex,
  44361. scrollable: true,
  44362. list: $data.tabs,
  44363. lineColor: "#C39A58",
  44364. onChange: $options.tabChange
  44365. }, null, 8, ["current", "list", "onChange"])
  44366. ])) : vue.createCommentVNode("v-if", true)
  44367. ]),
  44368. vue.createVNode(_component_mescroll_body, {
  44369. top: "288rpx",
  44370. bottom: "0",
  44371. ref: "mescrollRef",
  44372. onInit: $options.mescrollInit,
  44373. onDown: $options.downCallback,
  44374. onUp: $options.upCallback,
  44375. down: $data.downOption,
  44376. up: $data.upOption
  44377. }, {
  44378. default: vue.withCtx(() => [
  44379. vue.createElementVNode("view", { class: "integral-box" }, [
  44380. (vue.openBlock(true), vue.createElementBlock(
  44381. vue.Fragment,
  44382. null,
  44383. vue.renderList($data.dataList, (item, index2) => {
  44384. return vue.openBlock(), vue.createElementBlock("view", {
  44385. class: "item",
  44386. onClick: ($event) => $options.navTo("/pages_user/integralGoodsDetails?goodsId=" + item.goodsId)
  44387. }, [
  44388. vue.createElementVNode("view", { class: "top" }, [
  44389. vue.createElementVNode("image", {
  44390. src: item.imgUrl
  44391. }, null, 8, ["src"])
  44392. ]),
  44393. vue.createElementVNode("view", { class: "bottom" }, [
  44394. vue.createElementVNode(
  44395. "view",
  44396. { class: "title ellipsis2" },
  44397. vue.toDisplayString(item.goodsName),
  44398. 1
  44399. /* TEXT */
  44400. ),
  44401. vue.createElementVNode("view", { class: "price-box" }, [
  44402. vue.createElementVNode(
  44403. "view",
  44404. { class: "price" },
  44405. vue.toDisplayString(item.integral) + "积分",
  44406. 1
  44407. /* TEXT */
  44408. ),
  44409. vue.createElementVNode(
  44410. "view",
  44411. { class: "count" },
  44412. "原价:" + vue.toDisplayString(item.otPrice.toFixed(2)) + "元",
  44413. 1
  44414. /* TEXT */
  44415. )
  44416. ])
  44417. ])
  44418. ], 8, ["onClick"]);
  44419. }),
  44420. 256
  44421. /* UNKEYED_FRAGMENT */
  44422. ))
  44423. ])
  44424. ]),
  44425. _: 1
  44426. /* STABLE */
  44427. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  44428. ])
  44429. ]);
  44430. }
  44431. const Pages_userIntegralGoodsList = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-a55124e7"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralGoodsList.vue"]]);
  44432. const _sfc_main$l = {
  44433. data() {
  44434. return {
  44435. imgs: [],
  44436. activeImg: 1,
  44437. goodsId: null,
  44438. item: {}
  44439. };
  44440. },
  44441. onLoad(option) {
  44442. this.goodsId = option.goodsId;
  44443. },
  44444. onShow() {
  44445. this.getIntegralGoodsById();
  44446. },
  44447. methods: {
  44448. submit() {
  44449. uni.navigateTo({
  44450. url: "./integralOrderPay?goodsId=" + this.goodsId
  44451. });
  44452. },
  44453. swiperChange(event) {
  44454. this.activeImg = event.detail.current + 1;
  44455. },
  44456. showImg() {
  44457. uni.previewImage({
  44458. urls: this.imgs,
  44459. current: this.imgs[0]
  44460. });
  44461. },
  44462. getIntegralGoodsById() {
  44463. let data = { goodsId: this.goodsId };
  44464. getIntegralGoodsById(data).then(
  44465. (res) => {
  44466. if (res.code == 200) {
  44467. this.item = res.data;
  44468. if (res.data.images != null) {
  44469. this.imgs = res.data.images.split(",");
  44470. } else {
  44471. this.activeImg = 0;
  44472. }
  44473. formatAppLog("log", "at pages_user/integralGoodsDetails.vue:98", this.imgs);
  44474. } else {
  44475. uni.showToast({
  44476. icon: "none",
  44477. title: "请求失败"
  44478. });
  44479. }
  44480. },
  44481. (rej) => {
  44482. }
  44483. );
  44484. }
  44485. }
  44486. };
  44487. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  44488. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  44489. vue.createElementVNode("view", { class: "cont-box" }, [
  44490. vue.createElementVNode("view", {
  44491. class: "goods-banner",
  44492. onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg())
  44493. }, [
  44494. vue.createElementVNode(
  44495. "swiper",
  44496. {
  44497. class: "swiper",
  44498. "indicator-dots": false,
  44499. circular: true,
  44500. autoplay: true,
  44501. interval: 3e3,
  44502. duration: 1e3,
  44503. "indicator-color": "rgba(255, 255, 255, 0.6)",
  44504. "indicator-active-color": "#ffffff",
  44505. onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  44506. },
  44507. [
  44508. (vue.openBlock(true), vue.createElementBlock(
  44509. vue.Fragment,
  44510. null,
  44511. vue.renderList($data.imgs, (item, index2) => {
  44512. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  44513. class: "swiper-item",
  44514. key: index2
  44515. }, [
  44516. vue.createElementVNode("image", {
  44517. src: item,
  44518. mode: "aspectFit"
  44519. }, null, 8, ["src"])
  44520. ]);
  44521. }),
  44522. 128
  44523. /* KEYED_FRAGMENT */
  44524. ))
  44525. ],
  44526. 32
  44527. /* NEED_HYDRATION */
  44528. ),
  44529. vue.createCommentVNode(" 数量 "),
  44530. vue.createElementVNode(
  44531. "view",
  44532. { class: "num-box" },
  44533. vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length),
  44534. 1
  44535. /* TEXT */
  44536. )
  44537. ]),
  44538. vue.createElementVNode("view", { class: "integral-box" }, [
  44539. vue.createElementVNode(
  44540. "view",
  44541. { class: "title" },
  44542. vue.toDisplayString($data.item.goodsName),
  44543. 1
  44544. /* TEXT */
  44545. ),
  44546. vue.createElementVNode("view", { class: "num-box" }, [
  44547. vue.createElementVNode(
  44548. "view",
  44549. { class: "price" },
  44550. vue.toDisplayString($data.item.integral) + " 积分",
  44551. 1
  44552. /* TEXT */
  44553. ),
  44554. vue.createElementVNode(
  44555. "view",
  44556. { class: "count" },
  44557. "原价:" + vue.toDisplayString($data.item.otPrice.toFixed(2)) + "元",
  44558. 1
  44559. /* TEXT */
  44560. )
  44561. ])
  44562. ]),
  44563. vue.createElementVNode("view", { class: "desc-box" }, [
  44564. vue.createElementVNode("view", {
  44565. class: "desc",
  44566. innerHTML: $data.item.descs
  44567. }, null, 8, ["innerHTML"])
  44568. ])
  44569. ]),
  44570. vue.createElementVNode("view", { class: "btn-foot" }, [
  44571. vue.createElementVNode("view", { class: "p-price-box" }, [
  44572. vue.createElementVNode("view", { class: "p-name" }, "兑换积分: "),
  44573. vue.createElementVNode(
  44574. "view",
  44575. { class: "p-price" },
  44576. vue.toDisplayString($data.item.integral),
  44577. 1
  44578. /* TEXT */
  44579. )
  44580. ]),
  44581. vue.createElementVNode("view", { class: "btn-box" }, [
  44582. vue.createElementVNode("view", {
  44583. class: "btn buy",
  44584. onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
  44585. }, " 立即兑换 ")
  44586. ])
  44587. ])
  44588. ]);
  44589. }
  44590. const Pages_userIntegralGoodsDetails = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralGoodsDetails.vue"]]);
  44591. const _sfc_main$k = {
  44592. mixins: [MescrollMixin],
  44593. data() {
  44594. return {
  44595. orderStatusOptions: [],
  44596. searchKey: "",
  44597. status: "0",
  44598. tabs: [
  44599. { name: "全部", id: "0" },
  44600. { name: "待发货", id: "1" },
  44601. { name: "待收货", id: "2" },
  44602. { name: "已完成", id: "3" },
  44603. { name: "已取消", id: "-1" }
  44604. ],
  44605. mescroll: null,
  44606. // 上拉加载的配置
  44607. upOption: {
  44608. onScroll: false,
  44609. use: true,
  44610. // 是否启用上拉加载; 默认true
  44611. page: {
  44612. pae: 0,
  44613. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  44614. size: 10
  44615. // 每页数据的数量,默认10
  44616. },
  44617. noMoreSize: 10,
  44618. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  44619. textNoMore: "已经到底了",
  44620. empty: {
  44621. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  44622. tip: "暂无数据"
  44623. }
  44624. },
  44625. // 列表数据
  44626. dataList: []
  44627. };
  44628. },
  44629. onLoad() {
  44630. this.getDictByKey("sys_integral_order_status");
  44631. },
  44632. methods: {
  44633. getDictByKey(key) {
  44634. var data = { key };
  44635. getDictByKey(data).then(
  44636. (res) => {
  44637. if (res.code == 200) {
  44638. if (key == "sys_integral_order_status") {
  44639. this.orderStatusOptions = res.data;
  44640. }
  44641. }
  44642. },
  44643. (err) => {
  44644. }
  44645. );
  44646. },
  44647. tabChange(item) {
  44648. this.status = item.id;
  44649. this.mescroll.resetUpScroll();
  44650. },
  44651. mescrollInit(mescroll) {
  44652. this.mescroll = mescroll;
  44653. },
  44654. /*下拉刷新的回调 */
  44655. downCallback(mescroll) {
  44656. mescroll.resetUpScroll();
  44657. },
  44658. upCallback(page2) {
  44659. var that = this;
  44660. var data = {
  44661. keyword: this.searchKey,
  44662. status: this.status,
  44663. pageNum: page2.num,
  44664. pageSize: page2.size
  44665. };
  44666. getIntegralOrderList(data).then((res) => {
  44667. if (res.code == 200) {
  44668. res.data.list.forEach(function(value2, index2, array3) {
  44669. value2.items = [];
  44670. value2.items.push(JSON.parse(value2.itemJson));
  44671. });
  44672. if (page2.num == 1) {
  44673. that.dataList = res.data.list;
  44674. } else {
  44675. that.dataList = that.dataList.concat(res.data.list);
  44676. }
  44677. that.mescroll.endBySize(res.data.list.length, res.data.total);
  44678. } else {
  44679. uni.showToast({
  44680. icon: "none",
  44681. title: "请求失败"
  44682. });
  44683. that.dataList = null;
  44684. that.mescroll.endErr();
  44685. }
  44686. });
  44687. },
  44688. // 查看订单详情
  44689. showDetail(item) {
  44690. uni.navigateTo({
  44691. url: "./integralOrderDetails?orderId=" + item.orderId
  44692. });
  44693. }
  44694. }
  44695. };
  44696. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  44697. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  44698. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  44699. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  44700. vue.createElementVNode("view", { class: "top-fixed" }, [
  44701. vue.createVNode(_component_u_tabs, {
  44702. scrollable: false,
  44703. list: $data.tabs,
  44704. lineColor: "#C39A58",
  44705. onChange: $options.tabChange
  44706. }, null, 8, ["list", "onChange"])
  44707. ]),
  44708. vue.createCommentVNode(" 订单列表 "),
  44709. vue.createVNode(_component_mescroll_body, {
  44710. top: "88rpx",
  44711. bottom: "0",
  44712. ref: "mescrollRef",
  44713. onInit: $options.mescrollInit,
  44714. onDown: $options.downCallback,
  44715. onUp: $options.upCallback,
  44716. down: _ctx.downOption,
  44717. up: $data.upOption
  44718. }, {
  44719. default: vue.withCtx(() => [
  44720. vue.createElementVNode("view", { class: "order-list" }, [
  44721. (vue.openBlock(true), vue.createElementBlock(
  44722. vue.Fragment,
  44723. null,
  44724. vue.renderList($data.dataList, (item, index2) => {
  44725. return vue.openBlock(), vue.createElementBlock("view", {
  44726. key: index2,
  44727. class: "item"
  44728. }, [
  44729. vue.createCommentVNode(" 订单号,状态 "),
  44730. vue.createElementVNode("view", {
  44731. class: "ordersn-box",
  44732. onClick: ($event) => $options.showDetail(item)
  44733. }, [
  44734. vue.createElementVNode(
  44735. "view",
  44736. { class: "num" },
  44737. "订单号:" + vue.toDisplayString(item.orderCode),
  44738. 1
  44739. /* TEXT */
  44740. ),
  44741. vue.createElementVNode("view", { class: "status-box" }, [
  44742. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  44743. "text",
  44744. {
  44745. key: 0,
  44746. class: "text info"
  44747. },
  44748. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  44749. 1
  44750. /* TEXT */
  44751. )) : vue.createCommentVNode("v-if", true),
  44752. item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
  44753. "text",
  44754. {
  44755. key: 1,
  44756. class: "text success"
  44757. },
  44758. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  44759. 1
  44760. /* TEXT */
  44761. )) : vue.createCommentVNode("v-if", true),
  44762. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  44763. "text",
  44764. {
  44765. key: 2,
  44766. class: "text info"
  44767. },
  44768. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  44769. 1
  44770. /* TEXT */
  44771. )) : vue.createCommentVNode("v-if", true)
  44772. ])
  44773. ], 8, ["onClick"]),
  44774. vue.createElementVNode("view", { class: "drug-list" }, [
  44775. (vue.openBlock(true), vue.createElementBlock(
  44776. vue.Fragment,
  44777. null,
  44778. vue.renderList(item.items, (subItem, subIndex) => {
  44779. return vue.openBlock(), vue.createElementBlock("view", {
  44780. onClick: ($event) => $options.showDetail(item),
  44781. key: subIndex,
  44782. class: "drug-item"
  44783. }, [
  44784. vue.createElementVNode("view", { class: "img-box" }, [
  44785. vue.createElementVNode("image", {
  44786. src: subItem.imgUrl == "" ? "/static/images/drug.svg" : subItem.imgUrl,
  44787. mode: "aspectFill"
  44788. }, null, 8, ["src"])
  44789. ]),
  44790. vue.createElementVNode("view", { class: "drug-info" }, [
  44791. vue.createElementVNode("view", null, [
  44792. vue.createElementVNode(
  44793. "view",
  44794. { class: "name-box ellipsis2" },
  44795. vue.toDisplayString(subItem.goodsName),
  44796. 1
  44797. /* TEXT */
  44798. )
  44799. ]),
  44800. vue.createElementVNode("view", { class: "num-box" }, [
  44801. vue.createElementVNode("view", { class: "price" }, [
  44802. vue.createElementVNode("text", { class: "unit" }, "积分"),
  44803. vue.createElementVNode(
  44804. "text",
  44805. { class: "num" },
  44806. vue.toDisplayString(subItem.integral),
  44807. 1
  44808. /* TEXT */
  44809. )
  44810. ]),
  44811. vue.createElementVNode("view", { class: "amount" }, "x1")
  44812. ])
  44813. ])
  44814. ], 8, ["onClick"]);
  44815. }),
  44816. 128
  44817. /* KEYED_FRAGMENT */
  44818. )),
  44819. vue.createCommentVNode(" 实付金额、按钮 "),
  44820. vue.createElementVNode("view", { class: "bottom-box" }, [
  44821. vue.createElementVNode("view", { class: "amount-paid" }, [
  44822. vue.createElementVNode("text", { class: "label" }, "使用积分:"),
  44823. vue.createElementVNode("view", { class: "price-box" }, [
  44824. vue.createElementVNode("view", { class: "unit" }, "¥"),
  44825. vue.createElementVNode(
  44826. "view",
  44827. { class: "num" },
  44828. vue.toDisplayString(item.integral),
  44829. 1
  44830. /* TEXT */
  44831. )
  44832. ])
  44833. ]),
  44834. vue.createElementVNode("view", { class: "btn-box" }, [
  44835. vue.createElementVNode("view", { class: "btn cancel" }, [
  44836. vue.createTextVNode(" 联系客服 "),
  44837. vue.createElementVNode("button", {
  44838. class: "contact-btn",
  44839. "open-type": "contact"
  44840. })
  44841. ])
  44842. ])
  44843. ])
  44844. ])
  44845. ]);
  44846. }),
  44847. 128
  44848. /* KEYED_FRAGMENT */
  44849. ))
  44850. ])
  44851. ]),
  44852. _: 1
  44853. /* STABLE */
  44854. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  44855. ]);
  44856. }
  44857. const Pages_userIntegralOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-84740af3"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderList.vue"]]);
  44858. const _sfc_main$j = {
  44859. data() {
  44860. return {
  44861. orderId: null,
  44862. order: null,
  44863. item: null
  44864. };
  44865. },
  44866. onLoad(option) {
  44867. this.orderId = option.orderId;
  44868. },
  44869. onShow() {
  44870. this.getIntegralOrderById();
  44871. },
  44872. methods: {
  44873. getIntegralOrderById() {
  44874. var data = { orderId: this.orderId };
  44875. getIntegralOrderById(data).then((res) => {
  44876. if (res.code == 200) {
  44877. this.order = res.data;
  44878. this.item = JSON.parse(this.order.itemJson);
  44879. } else {
  44880. uni.showToast({
  44881. icon: "none",
  44882. title: "请求失败"
  44883. });
  44884. }
  44885. });
  44886. },
  44887. // 复制订单编号
  44888. copyOrderSn(text) {
  44889. uni.setClipboardData({
  44890. data: text,
  44891. success: () => {
  44892. uni.showToast({
  44893. title: "内容已成功复制到剪切板",
  44894. icon: "none"
  44895. });
  44896. }
  44897. });
  44898. }
  44899. }
  44900. };
  44901. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  44902. return vue.openBlock(), vue.createElementBlock("view", null, [
  44903. vue.createElementVNode("view", { class: "cont" }, [
  44904. vue.createElementVNode("view", { class: "bg" }),
  44905. vue.createElementVNode("view", { class: "inner" }, [
  44906. vue.createCommentVNode(" 订单状态 "),
  44907. vue.createElementVNode("view", { class: "order-status" }, [
  44908. vue.createCommentVNode(" 待发货 "),
  44909. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  44910. key: 0,
  44911. class: "inner"
  44912. }, [
  44913. vue.createElementVNode("view", { class: "img-box" }, [
  44914. vue.createElementVNode("image", {
  44915. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png",
  44916. mode: ""
  44917. })
  44918. ]),
  44919. vue.createElementVNode("view", { class: "status-box" }, [
  44920. vue.createElementVNode("text", { class: "status" }, "待发货"),
  44921. vue.createElementVNode("text", { class: "desc" }, "等待后台发货")
  44922. ])
  44923. ])) : vue.createCommentVNode("v-if", true),
  44924. vue.createCommentVNode(" 已发货、待收货 "),
  44925. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  44926. key: 1,
  44927. class: "inner"
  44928. }, [
  44929. vue.createElementVNode("view", { class: "img-box" }, [
  44930. vue.createElementVNode("image", {
  44931. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png",
  44932. mode: ""
  44933. })
  44934. ]),
  44935. vue.createElementVNode("view", { class: "status-box" }, [
  44936. vue.createElementVNode("text", { class: "status" }, "待收货"),
  44937. vue.createElementVNode("text", { class: "desc" }, "运输中")
  44938. ])
  44939. ])) : vue.createCommentVNode("v-if", true),
  44940. vue.createCommentVNode(" 已完成 "),
  44941. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  44942. key: 2,
  44943. class: "inner"
  44944. }, [
  44945. vue.createElementVNode("view", { class: "img-box" }, [
  44946. vue.createElementVNode("image", {
  44947. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
  44948. mode: ""
  44949. })
  44950. ]),
  44951. vue.createElementVNode("view", { class: "status-box" }, [
  44952. vue.createElementVNode("text", { class: "status" }, "已完成"),
  44953. vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成")
  44954. ])
  44955. ])) : vue.createCommentVNode("v-if", true),
  44956. vue.createCommentVNode("交易取消 "),
  44957. $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  44958. key: 3,
  44959. class: "inner"
  44960. }, [
  44961. vue.createElementVNode("view", { class: "img-box" }, [
  44962. vue.createElementVNode("image", {
  44963. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
  44964. mode: ""
  44965. })
  44966. ]),
  44967. vue.createElementVNode("view", { class: "status-box" }, [
  44968. vue.createElementVNode("text", { class: "status" }, "交易关闭"),
  44969. vue.createElementVNode("text", { class: "desc" }, "订单已取消")
  44970. ])
  44971. ])) : vue.createCommentVNode("v-if", true)
  44972. ]),
  44973. vue.createCommentVNode(" 下单人信息 "),
  44974. $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", {
  44975. key: 0,
  44976. class: "order-placer"
  44977. }, [
  44978. vue.createElementVNode("view", { class: "inner" }, [
  44979. vue.createElementVNode("image", {
  44980. class: "location",
  44981. src: "/static/images/location.png",
  44982. mode: ""
  44983. }),
  44984. vue.createElementVNode("view", { class: "info" }, [
  44985. vue.createElementVNode("view", { class: "name-phone" }, [
  44986. vue.createElementVNode(
  44987. "text",
  44988. { class: "text" },
  44989. vue.toDisplayString($data.order.userName),
  44990. 1
  44991. /* TEXT */
  44992. ),
  44993. $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock(
  44994. "text",
  44995. {
  44996. key: 0,
  44997. class: "text"
  44998. },
  44999. vue.toDisplayString($data.order.userPhone),
  45000. 1
  45001. /* TEXT */
  45002. )) : vue.createCommentVNode("v-if", true)
  45003. ]),
  45004. vue.createElementVNode(
  45005. "view",
  45006. { class: "address ellipsis2" },
  45007. vue.toDisplayString($data.order.userAddress),
  45008. 1
  45009. /* TEXT */
  45010. )
  45011. ])
  45012. ])
  45013. ])) : vue.createCommentVNode("v-if", true),
  45014. vue.createElementVNode("view", { class: "content" }, [
  45015. vue.createElementVNode("view", { class: "goods-list" }, [
  45016. vue.createElementVNode("view", { class: "item" }, [
  45017. vue.createElementVNode("view", { class: "img-box" }, [
  45018. vue.createElementVNode("image", {
  45019. src: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl,
  45020. mode: "aspectFill"
  45021. }, null, 8, ["src"])
  45022. ]),
  45023. vue.createElementVNode("view", { class: "info-box" }, [
  45024. vue.createElementVNode("view", null, [
  45025. vue.createElementVNode(
  45026. "view",
  45027. { class: "name-box ellipsis2" },
  45028. vue.toDisplayString($data.item.goodsName),
  45029. 1
  45030. /* TEXT */
  45031. )
  45032. ]),
  45033. vue.createElementVNode("view", { class: "price-num" }, [
  45034. vue.createElementVNode("view", { class: "price" }, [
  45035. vue.createElementVNode("text", { class: "unit" }, "积分:"),
  45036. vue.createElementVNode(
  45037. "text",
  45038. { class: "num" },
  45039. vue.toDisplayString($data.item.integral),
  45040. 1
  45041. /* TEXT */
  45042. )
  45043. ]),
  45044. vue.createElementVNode("view", { class: "num" }, "x1")
  45045. ])
  45046. ])
  45047. ])
  45048. ]),
  45049. vue.createCommentVNode(" 订单信息 "),
  45050. vue.createElementVNode("view", { class: "order-info" }, [
  45051. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  45052. vue.createElementVNode("view", { class: "item" }, [
  45053. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  45054. vue.createElementVNode("view", { class: "sn-box" }, [
  45055. vue.createElementVNode(
  45056. "text",
  45057. { class: "text" },
  45058. vue.toDisplayString($data.order.orderCode),
  45059. 1
  45060. /* TEXT */
  45061. ),
  45062. vue.createElementVNode("view", {
  45063. class: "copy-btn",
  45064. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode))
  45065. }, "复制")
  45066. ])
  45067. ]),
  45068. vue.createElementVNode("view", { class: "item" }, [
  45069. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  45070. vue.createElementVNode(
  45071. "text",
  45072. { class: "text" },
  45073. vue.toDisplayString($data.order.createTime),
  45074. 1
  45075. /* TEXT */
  45076. )
  45077. ]),
  45078. vue.createElementVNode("view", { class: "item" }, [
  45079. vue.createElementVNode("text", { class: "label" }, "使用积分"),
  45080. vue.createElementVNode(
  45081. "text",
  45082. { class: "text" },
  45083. "¥" + vue.toDisplayString($data.order.integral),
  45084. 1
  45085. /* TEXT */
  45086. )
  45087. ]),
  45088. $data.order.deliveryName != null ? (vue.openBlock(), vue.createElementBlock("view", {
  45089. key: 0,
  45090. class: "item"
  45091. }, [
  45092. vue.createElementVNode("text", { class: "label" }, "物流公司"),
  45093. vue.createElementVNode(
  45094. "text",
  45095. { class: "text" },
  45096. vue.toDisplayString($data.order.deliveryName),
  45097. 1
  45098. /* TEXT */
  45099. )
  45100. ])) : vue.createCommentVNode("v-if", true),
  45101. $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", {
  45102. key: 1,
  45103. class: "item"
  45104. }, [
  45105. vue.createElementVNode("text", { class: "label" }, "物流单号"),
  45106. vue.createElementVNode(
  45107. "text",
  45108. { class: "text" },
  45109. vue.toDisplayString($data.order.deliverySn),
  45110. 1
  45111. /* TEXT */
  45112. )
  45113. ])) : vue.createCommentVNode("v-if", true)
  45114. ])
  45115. ])
  45116. ])
  45117. ]),
  45118. vue.createCommentVNode(" 按钮 "),
  45119. vue.createElementVNode("view", { class: "btn-box" }, [
  45120. vue.createElementVNode("view", { class: "btn cancel" }, [
  45121. vue.createTextVNode(" 联系客服 "),
  45122. vue.createElementVNode("button", {
  45123. class: "contact-btn",
  45124. "open-type": "contact"
  45125. })
  45126. ])
  45127. ])
  45128. ]);
  45129. }
  45130. const Pages_userIntegralOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderDetails.vue"]]);
  45131. const _sfc_main$i = {
  45132. mixins: [MescrollMixin],
  45133. // 使用mixin
  45134. data() {
  45135. return {
  45136. typeOptions: [],
  45137. mescroll: null,
  45138. downOption: {
  45139. auto: false
  45140. //不要自动加载
  45141. },
  45142. upOption: {
  45143. onScroll: false,
  45144. use: true,
  45145. // 是否启用上拉加载; 默认true
  45146. page: {
  45147. num: 0,
  45148. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  45149. size: 10
  45150. // 每页数据的数量,默认10
  45151. },
  45152. noMoreSize: 10,
  45153. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  45154. textNoMore: "已经到底了",
  45155. empty: {
  45156. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  45157. tip: "暂无数据"
  45158. }
  45159. },
  45160. dataList: []
  45161. };
  45162. },
  45163. onLoad() {
  45164. this.getDictByKey("sys_integral_log_type");
  45165. },
  45166. methods: {
  45167. getDictByKey(key) {
  45168. var data = { key };
  45169. getDictByKey(data).then(
  45170. (res) => {
  45171. if (res.code == 200) {
  45172. this.typeOptions = res.data;
  45173. }
  45174. },
  45175. (err) => {
  45176. }
  45177. );
  45178. },
  45179. mescrollInit(mescroll) {
  45180. this.mescroll = mescroll;
  45181. },
  45182. /*下拉刷新的回调 */
  45183. downCallback(mescroll) {
  45184. mescroll.resetUpScroll();
  45185. },
  45186. upCallback(page2) {
  45187. var that = this;
  45188. var data = {
  45189. pageNum: page2.num,
  45190. pageSize: page2.size
  45191. };
  45192. getUserIntegralLogsList(data).then((res) => {
  45193. uni.hideLoading();
  45194. if (res.code == 200) {
  45195. if (page2.num == 1) {
  45196. that.dataList = res.data.list;
  45197. } else {
  45198. that.dataList = that.dataList.concat(res.data.list);
  45199. }
  45200. that.mescroll.endBySize(res.data.list.length, res.data.total);
  45201. } else {
  45202. uni.showToast({
  45203. icon: "none",
  45204. title: "请求失败"
  45205. });
  45206. that.dataList = null;
  45207. that.mescroll.endErr();
  45208. }
  45209. });
  45210. }
  45211. }
  45212. };
  45213. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  45214. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  45215. return vue.openBlock(), vue.createElementBlock("view", { class: "page" }, [
  45216. vue.createElementVNode("view", { class: "content" }, [
  45217. vue.createVNode(_component_mescroll_body, {
  45218. ref: "mescrollRef",
  45219. onInit: $options.mescrollInit,
  45220. up: $data.upOption,
  45221. down: $data.downOption,
  45222. onDown: $options.downCallback,
  45223. onUp: $options.upCallback
  45224. }, {
  45225. default: vue.withCtx(() => [
  45226. (vue.openBlock(true), vue.createElementBlock(
  45227. vue.Fragment,
  45228. null,
  45229. vue.renderList($data.dataList, (item) => {
  45230. return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
  45231. vue.createElementVNode("view", { class: "left" }, [
  45232. vue.createElementVNode(
  45233. "text",
  45234. { class: "title" },
  45235. vue.toDisplayString(_ctx.$getDictLabelName($data.typeOptions, item.logType)),
  45236. 1
  45237. /* TEXT */
  45238. ),
  45239. vue.createElementVNode(
  45240. "view",
  45241. { class: "time" },
  45242. vue.toDisplayString(item.createTime),
  45243. 1
  45244. /* TEXT */
  45245. )
  45246. ]),
  45247. vue.createElementVNode("view", { class: "right" }, [
  45248. vue.createElementVNode(
  45249. "text",
  45250. {
  45251. class: vue.normalizeClass(item.integral > 0 ? "money green" : "money red")
  45252. },
  45253. vue.toDisplayString(item.integral),
  45254. 3
  45255. /* TEXT, CLASS */
  45256. ),
  45257. vue.createElementVNode(
  45258. "text",
  45259. { class: "remark" },
  45260. "剩余积分:" + vue.toDisplayString(item.balance),
  45261. 1
  45262. /* TEXT */
  45263. )
  45264. ])
  45265. ]);
  45266. }),
  45267. 256
  45268. /* UNKEYED_FRAGMENT */
  45269. ))
  45270. ]),
  45271. _: 1
  45272. /* STABLE */
  45273. }, 8, ["onInit", "up", "down", "onDown", "onUp"])
  45274. ])
  45275. ]);
  45276. }
  45277. const Pages_userIntegralLogsList = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-b9674a7d"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralLogsList.vue"]]);
  45278. const _sfc_main$h = {
  45279. data() {
  45280. return {
  45281. addressId: null,
  45282. address: null,
  45283. orderId: null,
  45284. order: null,
  45285. item: null
  45286. };
  45287. },
  45288. onLoad(option) {
  45289. this.goodsId = option.goodsId;
  45290. var that = this;
  45291. uni.$on("updateAddress", (e) => {
  45292. that.addressId = e.addressId;
  45293. that.address = e;
  45294. that.address.address = e.province + e.city + e.district + e.detail;
  45295. });
  45296. this.getIntegralGoodsById();
  45297. },
  45298. methods: {
  45299. getIntegralGoodsById() {
  45300. var data = { goodsId: this.goodsId };
  45301. formatAppLog("log", "at pages_user/integralOrderPay.vue:97", data);
  45302. getIntegralGoodsById(data).then(
  45303. (res) => {
  45304. if (res.code == 200) {
  45305. this.item = res.data;
  45306. }
  45307. },
  45308. (rej) => {
  45309. }
  45310. );
  45311. },
  45312. openAddress() {
  45313. uni.navigateTo({
  45314. url: "/pages_user/address"
  45315. });
  45316. },
  45317. payOrder() {
  45318. if (this.addressId == null) {
  45319. uni.showToast({
  45320. icon: "none",
  45321. title: "请选择收货地址"
  45322. });
  45323. return;
  45324. }
  45325. var data = {
  45326. goodsId: this.goodsId,
  45327. addressId: this.addressId
  45328. };
  45329. uni.showLoading();
  45330. createOrder(data).then(
  45331. (res) => {
  45332. if (res.code == 200) {
  45333. uni.redirectTo({
  45334. url: "./integralOrderPaySuccess?orderId=" + res.order.orderId
  45335. });
  45336. } else {
  45337. uni.showToast({
  45338. icon: "none",
  45339. title: res.msg
  45340. });
  45341. }
  45342. },
  45343. (rej) => {
  45344. }
  45345. );
  45346. }
  45347. }
  45348. };
  45349. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  45350. return vue.openBlock(), vue.createElementBlock("view", null, [
  45351. vue.createElementVNode("view", { class: "inner-box" }, [
  45352. vue.createCommentVNode(" 收货人 "),
  45353. $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", {
  45354. key: 0,
  45355. class: "address-box",
  45356. onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress())
  45357. }, [
  45358. vue.createElementVNode("view", { class: "left" }, [
  45359. vue.createElementVNode("view", { class: "name-box" }, [
  45360. vue.createElementVNode("text", { class: "text name" }, "添加收货地址")
  45361. ])
  45362. ]),
  45363. vue.createElementVNode("view", { class: "arrow-box" }, [
  45364. vue.createElementVNode("image", {
  45365. src: "/static/images/arrow_gray.png",
  45366. mode: ""
  45367. })
  45368. ])
  45369. ])) : vue.createCommentVNode("v-if", true),
  45370. $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", {
  45371. key: 1,
  45372. class: "address-box",
  45373. onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress())
  45374. }, [
  45375. vue.createElementVNode("view", { class: "left" }, [
  45376. vue.createElementVNode("view", { class: "name-box" }, [
  45377. vue.createElementVNode(
  45378. "text",
  45379. { class: "text name" },
  45380. vue.toDisplayString($data.address.realName),
  45381. 1
  45382. /* TEXT */
  45383. ),
  45384. $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock(
  45385. "text",
  45386. {
  45387. key: 0,
  45388. class: "text"
  45389. },
  45390. vue.toDisplayString($data.address.phone),
  45391. 1
  45392. /* TEXT */
  45393. )) : vue.createCommentVNode("v-if", true)
  45394. ]),
  45395. vue.createElementVNode(
  45396. "view",
  45397. { class: "address" },
  45398. vue.toDisplayString($data.address.address),
  45399. 1
  45400. /* TEXT */
  45401. )
  45402. ]),
  45403. vue.createElementVNode("view", { class: "arrow-box" }, [
  45404. vue.createElementVNode("image", {
  45405. src: "/static/images/arrow_gray.png",
  45406. mode: ""
  45407. })
  45408. ])
  45409. ])) : vue.createCommentVNode("v-if", true),
  45410. vue.createCommentVNode(" 药品列表 "),
  45411. vue.createElementVNode("view", { class: "goods-list" }, [
  45412. vue.createElementVNode("view", { class: "item" }, [
  45413. vue.createElementVNode("view", { class: "img-box" }, [
  45414. vue.createElementVNode("image", {
  45415. src: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl,
  45416. mode: "aspectFill"
  45417. }, null, 8, ["src"])
  45418. ]),
  45419. vue.createElementVNode("view", { class: "info-box" }, [
  45420. vue.createElementVNode("view", null, [
  45421. vue.createElementVNode(
  45422. "view",
  45423. { class: "name-box ellipsis2" },
  45424. vue.toDisplayString($data.item.goodsName),
  45425. 1
  45426. /* TEXT */
  45427. )
  45428. ]),
  45429. vue.createElementVNode("view", { class: "price-num" }, [
  45430. vue.createElementVNode("view", { class: "price" }, [
  45431. vue.createElementVNode("text", { class: "unit" }, "积分"),
  45432. vue.createElementVNode(
  45433. "text",
  45434. { class: "num" },
  45435. vue.toDisplayString($data.item.integral),
  45436. 1
  45437. /* TEXT */
  45438. )
  45439. ]),
  45440. vue.createElementVNode("view", { class: "num" }, "x1")
  45441. ])
  45442. ])
  45443. ])
  45444. ]),
  45445. vue.createElementVNode("view", { class: "other-info" }, [
  45446. vue.createElementVNode("view", { class: "item" }, [
  45447. vue.createElementVNode("view", { class: "left" }, [
  45448. vue.createElementVNode("text", { class: "label" }, "所需积分:")
  45449. ]),
  45450. vue.createElementVNode("view", { class: "right" }, [
  45451. vue.createElementVNode(
  45452. "text",
  45453. { class: "text" },
  45454. vue.toDisplayString($data.item.integral),
  45455. 1
  45456. /* TEXT */
  45457. )
  45458. ])
  45459. ])
  45460. ])
  45461. ]),
  45462. vue.createCommentVNode(" 底部按钮 "),
  45463. vue.createElementVNode("view", { class: "btn-box" }, [
  45464. $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  45465. key: 0,
  45466. class: "btn",
  45467. onClick: _cache[2] || (_cache[2] = ($event) => $options.payOrder())
  45468. }, "立即兑换")) : vue.createCommentVNode("v-if", true)
  45469. ])
  45470. ]);
  45471. }
  45472. const Pages_userIntegralOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderPay.vue"]]);
  45473. const _sfc_main$g = {
  45474. data() {
  45475. return {
  45476. order: null
  45477. };
  45478. },
  45479. onLoad(option) {
  45480. uni.setNavigationBarTitle({
  45481. title: "支付结果"
  45482. });
  45483. uni.$emit("refreshStoreOrder");
  45484. this.orderId = option.orderId;
  45485. this.getIntegralOrderById();
  45486. },
  45487. methods: {
  45488. getIntegralOrderById() {
  45489. var data = { orderId: this.orderId };
  45490. var that = this;
  45491. uni.showLoading();
  45492. getIntegralOrderById(data).then(
  45493. (res) => {
  45494. uni.hideLoading();
  45495. if (res.code == 200) {
  45496. that.order = res.data;
  45497. } else {
  45498. uni.showToast({
  45499. icon: "none",
  45500. title: res.msg
  45501. });
  45502. }
  45503. },
  45504. (rej) => {
  45505. }
  45506. );
  45507. },
  45508. copyTest(text) {
  45509. uni.setClipboardData({
  45510. data: text,
  45511. success: () => {
  45512. uni.showToast({
  45513. title: "内容已成功复制到剪切板",
  45514. icon: "none"
  45515. });
  45516. }
  45517. });
  45518. },
  45519. showOrderDetails(orderId) {
  45520. formatAppLog("log", "at pages_user/integralOrderPaySuccess.vue:87", orderId);
  45521. uni.redirectTo({
  45522. url: "./integralOrderDetails?orderId=" + orderId
  45523. });
  45524. }
  45525. }
  45526. };
  45527. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  45528. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  45529. vue.createElementVNode("view", { class: "inner" }, [
  45530. vue.createElementVNode("view", { class: "top" }, [
  45531. vue.createElementVNode("text", { class: "title" }, "兑换成功"),
  45532. vue.createElementVNode("image", {
  45533. class: "icon",
  45534. src: "/static/images/success.png"
  45535. }),
  45536. vue.createElementVNode("view", { class: "btn-box" }, [
  45537. vue.createElementVNode("view", {
  45538. class: "btn cancel",
  45539. onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
  45540. }, " 查看订单")
  45541. ])
  45542. ]),
  45543. vue.createCommentVNode(" 订单详情查看 "),
  45544. vue.createElementVNode("view", { class: "order-info" }, [
  45545. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  45546. vue.createElementVNode("view", { class: "item" }, [
  45547. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  45548. vue.createElementVNode("view", { class: "sn-box" }, [
  45549. vue.createElementVNode(
  45550. "text",
  45551. { class: "text" },
  45552. vue.toDisplayString($data.order.orderCode),
  45553. 1
  45554. /* TEXT */
  45555. ),
  45556. vue.createElementVNode("view", {
  45557. class: "copy-btn",
  45558. onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderCode))
  45559. }, "复制")
  45560. ])
  45561. ]),
  45562. vue.createElementVNode("view", { class: "item" }, [
  45563. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  45564. vue.createElementVNode(
  45565. "text",
  45566. { class: "text" },
  45567. vue.toDisplayString($data.order.integral),
  45568. 1
  45569. /* TEXT */
  45570. )
  45571. ]),
  45572. vue.createElementVNode("view", { class: "item" }, [
  45573. vue.createElementVNode("text", { class: "label" }, "兑换时间"),
  45574. vue.createElementVNode(
  45575. "text",
  45576. { class: "text" },
  45577. vue.toDisplayString($data.order.createTime),
  45578. 1
  45579. /* TEXT */
  45580. )
  45581. ])
  45582. ])
  45583. ])
  45584. ]);
  45585. }
  45586. const Pages_userIntegralOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderPaySuccess.vue"]]);
  45587. const _sfc_main$f = {
  45588. name: "Loading",
  45589. props: {
  45590. loaded: Boolean,
  45591. loading: Boolean
  45592. }
  45593. };
  45594. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  45595. return $props.loading || !$props.loaded ? (vue.openBlock(), vue.createElementBlock("view", {
  45596. key: 0,
  45597. class: "Loads acea-row row-center-wrapper",
  45598. style: { "margin-top": "20rpx" }
  45599. }, [
  45600. $props.loading ? (vue.openBlock(), vue.createElementBlock(
  45601. vue.Fragment,
  45602. { key: 0 },
  45603. [
  45604. vue.createElementVNode("view", { class: "iconfont icon-jiazai loading acea-row row-center-wrapper" }),
  45605. vue.createTextVNode(" 正在加载中 ")
  45606. ],
  45607. 64
  45608. /* STABLE_FRAGMENT */
  45609. )) : vue.createCommentVNode("v-if", true),
  45610. !$props.loading ? (vue.openBlock(), vue.createElementBlock(
  45611. vue.Fragment,
  45612. { key: 1 },
  45613. [
  45614. vue.createTextVNode(" 上拉加载更多 ")
  45615. ],
  45616. 64
  45617. /* STABLE_FRAGMENT */
  45618. )) : vue.createCommentVNode("v-if", true)
  45619. ])) : vue.createCommentVNode("v-if", true);
  45620. }
  45621. const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-65e10ca8"], ["__file", "E:/Project/2023/问诊平台/his_user_app/components/Loading.vue"]]);
  45622. const _sfc_main$e = {
  45623. components: {
  45624. Loading
  45625. },
  45626. data() {
  45627. return {
  45628. typeOptions: [],
  45629. isDaySign: false,
  45630. top: 0,
  45631. signNum: 0,
  45632. integral: 0,
  45633. sign: [],
  45634. // 状态栏的高度
  45635. statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
  45636. // tab切换
  45637. tags: [{ lable: "全部", value: 0 }, { lable: "获得", value: 1 }, { lable: "消耗", value: 2 }],
  45638. // 选中的tab
  45639. tabIndex: 0,
  45640. current: 0,
  45641. page: {
  45642. type: 0,
  45643. page: 1,
  45644. pageSize: 10
  45645. },
  45646. list: [],
  45647. loaded: false,
  45648. loading: false
  45649. };
  45650. },
  45651. onLoad(option) {
  45652. this.getDictByKey("sys_integral_log_type");
  45653. this.getUserSign();
  45654. this.getUserIntegralLogsList();
  45655. },
  45656. onReachBottom() {
  45657. !this.loading && this.getUserIntegralLogsList();
  45658. },
  45659. onPageScroll(e) {
  45660. if (e.scrollTop > 30) {
  45661. this.topFixed = true;
  45662. } else {
  45663. this.topFixed = false;
  45664. }
  45665. },
  45666. onPageScroll(e) {
  45667. this.top = e.scrollTop;
  45668. },
  45669. computed: {
  45670. // 计算属性的 getter
  45671. bg: function() {
  45672. return "rgba(255,142,60, " + this.top / 30 + ")";
  45673. }
  45674. },
  45675. methods: {
  45676. getDictByKey(key) {
  45677. var data = { key };
  45678. getDictByKey(data).then(
  45679. (res) => {
  45680. if (res.code == 200) {
  45681. this.typeOptions = res.data;
  45682. }
  45683. },
  45684. (err) => {
  45685. }
  45686. );
  45687. },
  45688. doSign() {
  45689. var data = {};
  45690. doSign(data).then(
  45691. (res) => {
  45692. if (res.code == 200) {
  45693. uni.showToast({
  45694. icon: "success",
  45695. title: res.msg
  45696. });
  45697. this.list = [];
  45698. this.page.page = 1;
  45699. this.list = [];
  45700. this.loaded = false;
  45701. this.loading = false;
  45702. this.getUserIntegralLogsList();
  45703. this.getUserSign();
  45704. } else {
  45705. uni.showToast({
  45706. icon: "none",
  45707. title: res.msg
  45708. });
  45709. }
  45710. },
  45711. (rej) => {
  45712. }
  45713. );
  45714. },
  45715. getUserSign() {
  45716. getUserSign().then(
  45717. (res) => {
  45718. if (res.code == 200) {
  45719. this.data = res.member;
  45720. this.signNum = res.signNum;
  45721. this.isDaySign = res.isDaySign;
  45722. this.integral = res.integral;
  45723. this.sign = JSON.parse(res.sign);
  45724. } else {
  45725. uni.showToast({
  45726. icon: "none",
  45727. title: "请求失败"
  45728. });
  45729. }
  45730. },
  45731. (rej) => {
  45732. }
  45733. );
  45734. },
  45735. getUserIntegralLogsList() {
  45736. let that = this;
  45737. if (that.loaded == true || that.loading == true)
  45738. return;
  45739. that.loading = true;
  45740. uni.showLoading({
  45741. title: "加载中..."
  45742. });
  45743. getUserIntegralLogsList(that.page).then(
  45744. (res) => {
  45745. that.loading = false;
  45746. that.loaded = res.data.list.length < that.page.pageSize;
  45747. that.page.page = that.page.page + 1;
  45748. that.list.push.apply(that.list, res.data.list);
  45749. uni.hideLoading();
  45750. },
  45751. (err) => {
  45752. uni.hideLoading();
  45753. uni.showToast({
  45754. title: err.msg,
  45755. icon: "none",
  45756. duration: 2e3
  45757. });
  45758. }
  45759. );
  45760. },
  45761. // 返回上一页
  45762. back() {
  45763. uni.navigateBack();
  45764. },
  45765. // tab选择
  45766. tabChange(item) {
  45767. formatAppLog("log", "at pages_user/integral.vue:254", item);
  45768. this.tabIndex = item.value;
  45769. this.page.type = this.tabIndex;
  45770. this.page.page = 1;
  45771. this.list = [];
  45772. this.loaded = false;
  45773. this.loading = false;
  45774. this.getUserIntegralLogsList();
  45775. }
  45776. }
  45777. };
  45778. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  45779. const _component_Loading = vue.resolveComponent("Loading");
  45780. return vue.openBlock(), vue.createElementBlock("view", null, [
  45781. vue.createElementVNode("view", { class: "top-cont" }, [
  45782. vue.createCommentVNode(" 背景图片 "),
  45783. vue.createElementVNode("image", {
  45784. class: "bg",
  45785. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ed4a8ff0406747a68e40988b210d1c78.png",
  45786. mode: ""
  45787. }),
  45788. vue.createElementVNode("view", { class: "top-inner" }, [
  45789. vue.createCommentVNode(" 这里是状态栏 "),
  45790. vue.createElementVNode(
  45791. "view",
  45792. {
  45793. class: "fixed-top-box",
  45794. style: vue.normalizeStyle({ background: $options.bg })
  45795. },
  45796. [
  45797. vue.createElementVNode(
  45798. "view",
  45799. {
  45800. class: "status_bar",
  45801. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  45802. },
  45803. null,
  45804. 4
  45805. /* STYLE */
  45806. ),
  45807. vue.createElementVNode("view", {
  45808. class: "back-box",
  45809. onClick: _cache[0] || (_cache[0] = (...args) => $options.back && $options.back(...args))
  45810. }, [
  45811. vue.createElementVNode("image", {
  45812. src: "/static/images/back_white.png",
  45813. mode: ""
  45814. }),
  45815. vue.createElementVNode("text", { class: "title" }, "我的积分"),
  45816. vue.createElementVNode("text")
  45817. ])
  45818. ],
  45819. 4
  45820. /* STYLE */
  45821. ),
  45822. vue.createCommentVNode(" 顶部固定后站位元素 "),
  45823. vue.createElementVNode("view", { style: { "padding-bottom": "88upx" } }, [
  45824. vue.createElementVNode(
  45825. "view",
  45826. {
  45827. style: vue.normalizeStyle({ height: $data.statusBarHeight })
  45828. },
  45829. null,
  45830. 4
  45831. /* STYLE */
  45832. )
  45833. ]),
  45834. vue.createCommentVNode(" 可用积分 "),
  45835. vue.createElementVNode("view", { class: "available-points" }, [
  45836. vue.createElementVNode("text", { class: "label" }, "可用积分"),
  45837. vue.createElementVNode(
  45838. "text",
  45839. { class: "num" },
  45840. vue.toDisplayString($data.integral),
  45841. 1
  45842. /* TEXT */
  45843. )
  45844. ]),
  45845. vue.createCommentVNode(" 签到 "),
  45846. vue.createElementVNode("view", { class: "singn-content" }, [
  45847. vue.createElementVNode("view", { class: "sign-in-box" }, [
  45848. vue.createElementVNode("view", { class: "inner" }, [
  45849. vue.createElementVNode("view", { class: "title-box" }, [
  45850. vue.createTextVNode("已连续签到"),
  45851. vue.createElementVNode(
  45852. "text",
  45853. { class: "num" },
  45854. vue.toDisplayString($data.signNum),
  45855. 1
  45856. /* TEXT */
  45857. ),
  45858. vue.createTextVNode("天")
  45859. ]),
  45860. vue.createCommentVNode(" 签到天数 "),
  45861. vue.createElementVNode("view", { class: "sign-list" }, [
  45862. (vue.openBlock(true), vue.createElementBlock(
  45863. vue.Fragment,
  45864. null,
  45865. vue.renderList($data.sign, (item, index2) => {
  45866. return vue.openBlock(), vue.createElementBlock(
  45867. "view",
  45868. {
  45869. key: index2,
  45870. class: vue.normalizeClass($data.signNum >= index2 + 1 ? "item active" : "item")
  45871. },
  45872. [
  45873. vue.createElementVNode("view", { class: "line" }),
  45874. vue.createElementVNode("view", { class: "right" }, [
  45875. vue.createCommentVNode(" 已签到图标 "),
  45876. $data.signNum >= index2 + 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  45877. key: 0,
  45878. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f3bdd5d388854e9a8f365904840c3b32.png",
  45879. mode: ""
  45880. })) : (vue.openBlock(), vue.createElementBlock(
  45881. vue.Fragment,
  45882. { key: 1 },
  45883. [
  45884. vue.createCommentVNode(" 未签到图标 "),
  45885. vue.createElementVNode("image", {
  45886. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/c593e551e4b246b981aaa58deb1fe725.png",
  45887. mode: ""
  45888. })
  45889. ],
  45890. 2112
  45891. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  45892. )),
  45893. vue.createElementVNode(
  45894. "text",
  45895. { class: "text" },
  45896. vue.toDisplayString(item.day),
  45897. 1
  45898. /* TEXT */
  45899. )
  45900. ])
  45901. ],
  45902. 2
  45903. /* CLASS */
  45904. );
  45905. }),
  45906. 128
  45907. /* KEYED_FRAGMENT */
  45908. ))
  45909. ])
  45910. ]),
  45911. vue.createCommentVNode(" 签到按钮 "),
  45912. vue.createElementVNode("view", { class: "sign-btn-box" }, [
  45913. $data.isDaySign == false ? (vue.openBlock(), vue.createElementBlock("view", {
  45914. key: 0,
  45915. class: "btn",
  45916. onClick: _cache[1] || (_cache[1] = ($event) => $options.doSign())
  45917. }, [
  45918. vue.createElementVNode("image", {
  45919. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png",
  45920. mode: ""
  45921. }),
  45922. vue.createElementVNode("text", { class: "text" }, "签到")
  45923. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  45924. key: 1,
  45925. class: "btn"
  45926. }, [
  45927. vue.createElementVNode("image", {
  45928. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png",
  45929. mode: ""
  45930. }),
  45931. vue.createElementVNode("text", { class: "text" }, "签到")
  45932. ]))
  45933. ])
  45934. ])
  45935. ]),
  45936. vue.createElementVNode("view", { class: "content" }, [
  45937. vue.createCommentVNode(" 积分列表 "),
  45938. vue.createElementVNode("view", { class: "points-cont" }, [
  45939. vue.createCommentVNode(" tab切换 "),
  45940. vue.createElementVNode("view", { class: "pub-tab-box" }, [
  45941. vue.createElementVNode("view", { class: "tab-inner" }, [
  45942. (vue.openBlock(true), vue.createElementBlock(
  45943. vue.Fragment,
  45944. null,
  45945. vue.renderList($data.tags, (item, index2) => {
  45946. return vue.openBlock(), vue.createElementBlock("view", {
  45947. key: index2,
  45948. class: vue.normalizeClass($data.tabIndex == item.value ? "item active" : "item"),
  45949. onClick: ($event) => $options.tabChange(item)
  45950. }, [
  45951. vue.createElementVNode("view", { class: "text" }, [
  45952. vue.createTextVNode(
  45953. vue.toDisplayString(item.lable) + " ",
  45954. 1
  45955. /* TEXT */
  45956. ),
  45957. vue.withDirectives(vue.createElementVNode(
  45958. "image",
  45959. {
  45960. class: "tab-bg",
  45961. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1828ea6b3b124b5f84e3556267a8d9ef.png",
  45962. mode: ""
  45963. },
  45964. null,
  45965. 512
  45966. /* NEED_PATCH */
  45967. ), [
  45968. [vue.vShow, $data.tabIndex == item.value]
  45969. ])
  45970. ])
  45971. ], 10, ["onClick"]);
  45972. }),
  45973. 128
  45974. /* KEYED_FRAGMENT */
  45975. ))
  45976. ])
  45977. ]),
  45978. vue.createCommentVNode(" 列表 "),
  45979. vue.createElementVNode("view", { class: "point-list" }, [
  45980. (vue.openBlock(true), vue.createElementBlock(
  45981. vue.Fragment,
  45982. null,
  45983. vue.renderList($data.list, (item, index2) => {
  45984. return vue.openBlock(), vue.createElementBlock("view", {
  45985. key: index2,
  45986. class: "item"
  45987. }, [
  45988. vue.createElementVNode("view", { class: "left" }, [
  45989. vue.createElementVNode(
  45990. "text",
  45991. { class: "title" },
  45992. vue.toDisplayString(_ctx.$getDictLabelName($data.typeOptions, item.logType)),
  45993. 1
  45994. /* TEXT */
  45995. ),
  45996. vue.createElementVNode(
  45997. "view",
  45998. { class: "time" },
  45999. vue.toDisplayString(item.createTime),
  46000. 1
  46001. /* TEXT */
  46002. )
  46003. ]),
  46004. vue.createElementVNode("view", { class: "right" }, [
  46005. item.integral < 0 ? (vue.openBlock(), vue.createElementBlock(
  46006. "text",
  46007. {
  46008. key: 0,
  46009. class: "less"
  46010. },
  46011. vue.toDisplayString(item.integral),
  46012. 1
  46013. /* TEXT */
  46014. )) : (vue.openBlock(), vue.createElementBlock(
  46015. "text",
  46016. {
  46017. key: 1,
  46018. class: "add"
  46019. },
  46020. "+" + vue.toDisplayString(item.integral),
  46021. 1
  46022. /* TEXT */
  46023. ))
  46024. ])
  46025. ]);
  46026. }),
  46027. 128
  46028. /* KEYED_FRAGMENT */
  46029. ))
  46030. ]),
  46031. vue.createVNode(_component_Loading, {
  46032. loaded: $data.loaded,
  46033. loading: $data.loading
  46034. }, null, 8, ["loaded", "loading"])
  46035. ])
  46036. ])
  46037. ])
  46038. ])
  46039. ]);
  46040. }
  46041. const Pages_userIntegral = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integral.vue"]]);
  46042. const _sfc_main$d = {
  46043. data() {
  46044. return {
  46045. form: {
  46046. userName: null,
  46047. password: null
  46048. }
  46049. };
  46050. },
  46051. computed: {},
  46052. onLoad() {
  46053. },
  46054. onHide() {
  46055. },
  46056. onUnload() {
  46057. },
  46058. mounted() {
  46059. },
  46060. methods: {
  46061. submit() {
  46062. login(this.form).then(
  46063. (res) => {
  46064. if (res.code == 200) {
  46065. uni.showToast({
  46066. icon: "success",
  46067. title: "登录成功"
  46068. });
  46069. uni.setStorageSync("companyId", res.user.companyId);
  46070. uni.setStorageSync("companyUserId", res.user.userId);
  46071. uni.setStorageSync("CompanyUserToken", res.companyUserToken);
  46072. uni.redirectTo({
  46073. url: "/pages_company/index"
  46074. });
  46075. } else {
  46076. uni.showToast({
  46077. icon: "none",
  46078. title: res.msg
  46079. });
  46080. }
  46081. },
  46082. (rej) => {
  46083. }
  46084. );
  46085. }
  46086. }
  46087. };
  46088. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  46089. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  46090. vue.createElementVNode("view", { class: "inner" }, [
  46091. vue.createElementVNode("view", { class: "form-box" }, [
  46092. vue.createElementVNode("view", { class: "form-item" }, [
  46093. vue.createElementVNode("text", { class: "label" }, "员工帐号"),
  46094. vue.withDirectives(vue.createElementVNode(
  46095. "input",
  46096. {
  46097. type: "text",
  46098. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.userName = $event),
  46099. placeholder: "登录帐号",
  46100. "placeholder-class": "form-input"
  46101. },
  46102. null,
  46103. 512
  46104. /* NEED_PATCH */
  46105. ), [
  46106. [vue.vModelText, $data.form.userName]
  46107. ])
  46108. ]),
  46109. vue.createElementVNode("view", { class: "form-item" }, [
  46110. vue.createElementVNode("text", { class: "label" }, "员工密码"),
  46111. vue.withDirectives(vue.createElementVNode(
  46112. "input",
  46113. {
  46114. type: "password",
  46115. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.password = $event),
  46116. placeholder: "登录密码",
  46117. "placeholder-class": "form-input"
  46118. },
  46119. null,
  46120. 512
  46121. /* NEED_PATCH */
  46122. ), [
  46123. [vue.vModelText, $data.form.password]
  46124. ])
  46125. ])
  46126. ])
  46127. ]),
  46128. vue.createElementVNode("view", { class: "btn-box" }, [
  46129. vue.createElementVNode("view", {
  46130. class: "sub-btn",
  46131. onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
  46132. }, "员工登录")
  46133. ])
  46134. ]);
  46135. }
  46136. const Pages_companyLogin = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/login.vue"]]);
  46137. const _sfc_main$c = {
  46138. data() {
  46139. return {
  46140. companyId: null,
  46141. companyUserId: null,
  46142. user: null
  46143. };
  46144. },
  46145. onLoad() {
  46146. },
  46147. onShow() {
  46148. this.companyId = uni.getStorageSync("companyId");
  46149. this.companyUserId = uni.getStorageSync("companyUserId");
  46150. formatAppLog("log", "at pages_company/index.vue:81", this.companyUserId);
  46151. this.getUserInfo();
  46152. },
  46153. onShareAppMessage(res) {
  46154. return {
  46155. title: "问诊",
  46156. path: "/pages/TUIKit/TUIPages/TUIConversation/index",
  46157. imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
  46158. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  46159. };
  46160. },
  46161. methods: {
  46162. navTo(url2) {
  46163. uni.navigateTo({
  46164. url: url2
  46165. });
  46166. },
  46167. getUserInfo() {
  46168. var data = {};
  46169. getUserInfo(data).then(
  46170. (res) => {
  46171. if (res.code == 200) {
  46172. this.user = res.data;
  46173. } else {
  46174. uni.setStorageSync("CompanyUserToken", null);
  46175. uni.showToast({
  46176. icon: "none",
  46177. title: res.msg
  46178. });
  46179. uni.navigateBack({
  46180. delta: -1
  46181. });
  46182. }
  46183. },
  46184. (rej) => {
  46185. }
  46186. );
  46187. },
  46188. logout() {
  46189. uni.showModal({
  46190. title: "提示",
  46191. content: "确认退出登录吗?",
  46192. showCancel: true,
  46193. cancelText: "取消",
  46194. confirmText: "确定",
  46195. success: (res) => {
  46196. if (res.confirm) {
  46197. uni.setStorageSync("CompanyUserToken", null);
  46198. uni.navigateBack({
  46199. delta: -1
  46200. });
  46201. }
  46202. }
  46203. });
  46204. },
  46205. // 跳转页面
  46206. navgetTo(url2) {
  46207. this.$isLogin().then((res) => {
  46208. if (res) {
  46209. uni.navigateTo({
  46210. url: url2
  46211. });
  46212. }
  46213. });
  46214. }
  46215. }
  46216. };
  46217. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  46218. return vue.openBlock(), vue.createElementBlock("view", { class: "top-cont" }, [
  46219. vue.createElementVNode("view", { class: "content" }, [
  46220. vue.createElementVNode("view", { class: "user-info" }, [
  46221. vue.createElementVNode("view", { class: "left" }, [
  46222. vue.createElementVNode("view", { class: "name-phone" }, [
  46223. $data.user != null ? (vue.openBlock(), vue.createElementBlock(
  46224. "view",
  46225. {
  46226. key: 0,
  46227. class: "name"
  46228. },
  46229. vue.toDisplayString($data.user.nickName),
  46230. 1
  46231. /* TEXT */
  46232. )) : vue.createCommentVNode("v-if", true),
  46233. $data.user != null ? (vue.openBlock(), vue.createElementBlock(
  46234. "view",
  46235. {
  46236. key: 1,
  46237. class: "phone"
  46238. },
  46239. vue.toDisplayString(_ctx.$parsePhone($data.user.phonenumber)),
  46240. 1
  46241. /* TEXT */
  46242. )) : vue.createCommentVNode("v-if", true)
  46243. ])
  46244. ]),
  46245. $data.user != null ? (vue.openBlock(), vue.createElementBlock(
  46246. "view",
  46247. {
  46248. key: 0,
  46249. class: "msg-box"
  46250. },
  46251. vue.toDisplayString($data.user.deptName),
  46252. 1
  46253. /* TEXT */
  46254. )) : vue.createCommentVNode("v-if", true)
  46255. ]),
  46256. vue.createCommentVNode(" 常用工具 "),
  46257. vue.createElementVNode("view", { class: "used-tools" }, [
  46258. vue.createElementVNode("view", { class: "title" }, "常用工具"),
  46259. vue.createElementVNode("view", { class: "tools-list" }, [
  46260. vue.createElementVNode("view", {
  46261. class: "item",
  46262. onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_company/couponList?isShare=1&couponType=5"))
  46263. }, [
  46264. vue.createElementVNode("image", {
  46265. src: "/static/images/icon_my_coupon.png",
  46266. mode: ""
  46267. }),
  46268. vue.createElementVNode("text", { class: "text" }, "私域疗法券")
  46269. ]),
  46270. vue.createElementVNode("view", {
  46271. class: "item",
  46272. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_company/couponList?isShare=1&couponType=2"))
  46273. }, [
  46274. vue.createElementVNode("image", {
  46275. src: "/static/images/icon_my_coupon.png",
  46276. mode: ""
  46277. }),
  46278. vue.createElementVNode("text", { class: "text" }, "中药免单券")
  46279. ]),
  46280. vue.createElementVNode("view", {
  46281. class: "item",
  46282. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_company/packageList"))
  46283. }, [
  46284. vue.createElementVNode("image", {
  46285. src: "/static/images/icon_company_2.png",
  46286. mode: ""
  46287. }),
  46288. vue.createElementVNode("text", { class: "text" }, "疗法")
  46289. ]),
  46290. vue.createElementVNode("view", {
  46291. class: "item",
  46292. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquirySelectType?companyId=" + $data.companyId + "&companyUserId=" + $data.companyUserId + "&isShare=1"))
  46293. }, [
  46294. vue.createElementVNode("image", {
  46295. src: "/static/images/icon_company_3.png",
  46296. mode: ""
  46297. }),
  46298. vue.createElementVNode("text", { class: "text" }, "会诊")
  46299. ]),
  46300. vue.createElementVNode("view", {
  46301. class: "item",
  46302. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_order/inquirySelect?inquiryType=3&companyId=" + $data.companyId + "&companyUserId=" + $data.companyUserId + "&isShare=1"))
  46303. }, [
  46304. vue.createElementVNode("image", {
  46305. src: "/static/images/icon_company_3.png",
  46306. mode: ""
  46307. }),
  46308. vue.createElementVNode("text", { class: "text" }, "按方开药")
  46309. ]),
  46310. vue.createElementVNode("view", {
  46311. class: "item",
  46312. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_company/packageOrderList"))
  46313. }, [
  46314. vue.createElementVNode("image", {
  46315. src: "/static/images/icon_company_3.png",
  46316. mode: ""
  46317. }),
  46318. vue.createElementVNode("text", { class: "text" }, "套餐订单")
  46319. ]),
  46320. vue.createElementVNode("view", {
  46321. class: "item",
  46322. onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("/pages_company/inquiryOrderList"))
  46323. }, [
  46324. vue.createElementVNode("image", {
  46325. src: "/static/images/icon_company_3.png",
  46326. mode: ""
  46327. }),
  46328. vue.createElementVNode("text", { class: "text" }, "问诊订单")
  46329. ]),
  46330. vue.createElementVNode("view", {
  46331. class: "item",
  46332. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_company/storeOrderList"))
  46333. }, [
  46334. vue.createElementVNode("image", {
  46335. src: "/static/images/icon_company_3.png",
  46336. mode: ""
  46337. }),
  46338. vue.createElementVNode("text", { class: "text" }, "药品订单")
  46339. ]),
  46340. vue.createElementVNode("view", { class: "item" }, [
  46341. vue.createElementVNode("image", {
  46342. src: "/static/images/icon_company_3.png",
  46343. mode: ""
  46344. }),
  46345. vue.createElementVNode("text", { class: "text" }, "问诊分享"),
  46346. vue.createElementVNode("button", {
  46347. class: "share-btn",
  46348. "open-type": "share"
  46349. })
  46350. ])
  46351. ])
  46352. ]),
  46353. vue.createCommentVNode(" 退出登录按钮 "),
  46354. vue.createElementVNode("view", {
  46355. class: "logout",
  46356. onClick: _cache[8] || (_cache[8] = (...args) => $options.logout && $options.logout(...args))
  46357. }, "退出登录")
  46358. ])
  46359. ]);
  46360. }
  46361. const Pages_companyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/index.vue"]]);
  46362. const _sfc_main$b = {
  46363. mixins: [MescrollMixin],
  46364. data() {
  46365. return {
  46366. cates: [],
  46367. privateType: 0,
  46368. keyword: "",
  46369. mescroll: null,
  46370. downOption: {
  46371. //下拉刷新
  46372. use: true,
  46373. auto: false
  46374. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  46375. },
  46376. upOption: {
  46377. onScroll: false,
  46378. use: true,
  46379. // 是否启用上拉加载; 默认true
  46380. page: {
  46381. pae: 0,
  46382. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  46383. size: 10
  46384. // 每页数据的数量,默认10
  46385. },
  46386. noMoreSize: 10,
  46387. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  46388. textNoMore: "已经到底了",
  46389. empty: {
  46390. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  46391. tip: "暂无数据"
  46392. }
  46393. },
  46394. dataList: []
  46395. };
  46396. },
  46397. onShow() {
  46398. this.getPackagCateList(2);
  46399. },
  46400. methods: {
  46401. getPackagCateList(type2) {
  46402. var data = { type: type2 };
  46403. getPackagCateList(data).then(
  46404. (res) => {
  46405. if (res.code == 200) {
  46406. this.cates = res.data;
  46407. }
  46408. },
  46409. (err) => {
  46410. }
  46411. );
  46412. },
  46413. showMore(item) {
  46414. item.displayMore = item.displayMore == 1 ? 0 : 1;
  46415. item.displayText = item.displayMore == 1 ? "收起" : "点击查看方案明细";
  46416. },
  46417. navTo(url2) {
  46418. uni.navigateTo({
  46419. url: url2
  46420. });
  46421. },
  46422. doSearch() {
  46423. this.mescroll.resetUpScroll();
  46424. },
  46425. mescrollInit(mescroll) {
  46426. this.mescroll = mescroll;
  46427. },
  46428. /*下拉刷新的回调 */
  46429. downCallback(mescroll) {
  46430. mescroll.resetUpScroll();
  46431. },
  46432. upCallback(page2) {
  46433. var that = this;
  46434. var data = {
  46435. isShow: 0,
  46436. keyword: this.keyword,
  46437. privateType: this.privateType,
  46438. pageNum: page2.num,
  46439. pageSize: page2.size
  46440. };
  46441. getPackageList(data).then((res) => {
  46442. if (res.code == 200) {
  46443. res.data.list.forEach(function(element) {
  46444. element.displayMore = 0;
  46445. element.displayText = "点击查看方案明细";
  46446. if (element.productJson != null) {
  46447. element.products = JSON.parse(element.productJson);
  46448. } else {
  46449. element.products = [];
  46450. }
  46451. });
  46452. if (page2.num == 1) {
  46453. that.dataList = res.data.list;
  46454. } else {
  46455. that.dataList = that.dataList.concat(res.data.list);
  46456. }
  46457. that.mescroll.endBySize(res.data.list.length, res.data.total);
  46458. } else {
  46459. uni.showToast({
  46460. icon: "none",
  46461. title: "请求失败"
  46462. });
  46463. that.dataList = null;
  46464. that.mescroll.endErr();
  46465. }
  46466. });
  46467. },
  46468. choseType(item) {
  46469. this.privateType = item.cateCode;
  46470. this.mescroll.resetUpScroll();
  46471. }
  46472. }
  46473. };
  46474. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  46475. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  46476. return vue.openBlock(), vue.createElementBlock("view", null, [
  46477. vue.createElementVNode("view", { class: "top-content" }, [
  46478. vue.createCommentVNode(" 搜索框 "),
  46479. vue.createElementVNode("view", { class: "search-cont" }, [
  46480. vue.createElementVNode("view", { class: "inner" }, [
  46481. vue.createElementVNode("image", {
  46482. class: "icon-search",
  46483. src: "/static/images/icon_search.png",
  46484. mode: ""
  46485. }),
  46486. vue.withDirectives(vue.createElementVNode(
  46487. "input",
  46488. {
  46489. type: "text",
  46490. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
  46491. placeholder: "输入健康疗法名称或别名搜索",
  46492. "confirm-type": "search",
  46493. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  46494. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  46495. },
  46496. null,
  46497. 544
  46498. /* NEED_HYDRATION, NEED_PATCH */
  46499. ), [
  46500. [vue.vModelText, $data.keyword]
  46501. ])
  46502. ])
  46503. ]),
  46504. vue.createElementVNode("view", { class: "cate-list" }, [
  46505. vue.createCommentVNode(" 关键字列表 "),
  46506. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  46507. vue.createElementVNode("view", { class: "inner" }, [
  46508. (vue.openBlock(true), vue.createElementBlock(
  46509. vue.Fragment,
  46510. null,
  46511. vue.renderList($data.cates, (item, index2) => {
  46512. return vue.openBlock(), vue.createElementBlock("view", {
  46513. key: index2,
  46514. class: vue.normalizeClass($data.privateType == item.cateCode ? "item active" : "item"),
  46515. onClick: ($event) => $options.choseType(item)
  46516. }, vue.toDisplayString(item.cateName), 11, ["onClick"]);
  46517. }),
  46518. 128
  46519. /* KEYED_FRAGMENT */
  46520. ))
  46521. ])
  46522. ])
  46523. ])
  46524. ]),
  46525. vue.createVNode(_component_mescroll_body, {
  46526. top: "192rpx",
  46527. ref: "mescrollRef",
  46528. onInit: $options.mescrollInit,
  46529. onDown: $options.downCallback,
  46530. onUp: $options.upCallback,
  46531. down: $data.downOption,
  46532. up: $data.upOption
  46533. }, {
  46534. default: vue.withCtx(() => [
  46535. vue.createElementVNode("view", { class: "package-list" }, [
  46536. (vue.openBlock(true), vue.createElementBlock(
  46537. vue.Fragment,
  46538. null,
  46539. vue.renderList($data.dataList, (item, index2) => {
  46540. return vue.openBlock(), vue.createElementBlock("view", {
  46541. key: index2,
  46542. class: "item"
  46543. }, [
  46544. vue.createElementVNode("view", { class: "top-box" }, [
  46545. vue.createElementVNode(
  46546. "view",
  46547. { class: "title" },
  46548. vue.toDisplayString(item.packageName),
  46549. 1
  46550. /* TEXT */
  46551. ),
  46552. vue.createElementVNode(
  46553. "view",
  46554. { class: "subtitle" },
  46555. "别名:" + vue.toDisplayString(item.secondName),
  46556. 1
  46557. /* TEXT */
  46558. )
  46559. ]),
  46560. vue.createCommentVNode(" 药品列表 "),
  46561. vue.createElementVNode("view", { class: "drug-list" }, [
  46562. (vue.openBlock(true), vue.createElementBlock(
  46563. vue.Fragment,
  46564. null,
  46565. vue.renderList(item.products, (subItem, subIndex) => {
  46566. return vue.openBlock(), vue.createElementBlock(
  46567. "view",
  46568. {
  46569. key: subIndex,
  46570. class: vue.normalizeClass(["drug-item", item.displayMore == 0 ? "hide" : "show"])
  46571. },
  46572. [
  46573. vue.createElementVNode("view", { class: "img-box" }, [
  46574. vue.createElementVNode("image", {
  46575. src: subItem.image,
  46576. mode: "aspectFill"
  46577. }, null, 8, ["src"])
  46578. ]),
  46579. vue.createElementVNode("view", { class: "drug-info" }, [
  46580. vue.createElementVNode("view", null, [
  46581. vue.createElementVNode(
  46582. "view",
  46583. { class: "name-box ellipsis2" },
  46584. vue.toDisplayString(subItem.productName),
  46585. 1
  46586. /* TEXT */
  46587. ),
  46588. vue.createElementVNode(
  46589. "view",
  46590. { class: "spec" },
  46591. vue.toDisplayString(subItem.sku),
  46592. 1
  46593. /* TEXT */
  46594. )
  46595. ]),
  46596. vue.createElementVNode("view", { class: "num-box" }, [
  46597. subItem.price != null ? (vue.openBlock(), vue.createElementBlock("view", {
  46598. key: 0,
  46599. class: "price"
  46600. }, [
  46601. vue.createElementVNode("text", { class: "unit" }, "¥"),
  46602. vue.createElementVNode(
  46603. "text",
  46604. { class: "num" },
  46605. vue.toDisplayString(subItem.price.toFixed(2)),
  46606. 1
  46607. /* TEXT */
  46608. )
  46609. ])) : vue.createCommentVNode("v-if", true),
  46610. vue.createElementVNode(
  46611. "view",
  46612. { class: "amount" },
  46613. "x" + vue.toDisplayString(subItem.count),
  46614. 1
  46615. /* TEXT */
  46616. )
  46617. ])
  46618. ])
  46619. ],
  46620. 2
  46621. /* CLASS */
  46622. );
  46623. }),
  46624. 128
  46625. /* KEYED_FRAGMENT */
  46626. )),
  46627. vue.createElementVNode("view", {
  46628. class: "display-more",
  46629. onClick: ($event) => $options.showMore(item)
  46630. }, vue.toDisplayString(item.displayText), 9, ["onClick"]),
  46631. vue.createCommentVNode(" 实付金额、按钮 "),
  46632. vue.createElementVNode("view", { class: "bottom-box" }, [
  46633. vue.createElementVNode("view", { class: "amount-paid" }, [
  46634. vue.createElementVNode("text", { class: "label" }, "套餐价格:"),
  46635. item.totalPrice != null ? (vue.openBlock(), vue.createElementBlock("view", {
  46636. key: 0,
  46637. class: "price-box"
  46638. }, [
  46639. vue.createElementVNode("view", { class: "unit" }, "¥"),
  46640. vue.createElementVNode(
  46641. "view",
  46642. { class: "num" },
  46643. vue.toDisplayString(item.totalPrice.toFixed(2)),
  46644. 1
  46645. /* TEXT */
  46646. )
  46647. ])) : vue.createCommentVNode("v-if", true)
  46648. ]),
  46649. vue.createElementVNode("view", { class: "btn-box" }, [
  46650. vue.createElementVNode("view", {
  46651. class: "btn pay",
  46652. onClick: vue.withModifiers(($event) => $options.navTo("/pages_company/packageDetails?packageId=" + item.packageId), ["stop"])
  46653. }, " 查看详情 ", 8, ["onClick"])
  46654. ])
  46655. ])
  46656. ])
  46657. ]);
  46658. }),
  46659. 128
  46660. /* KEYED_FRAGMENT */
  46661. ))
  46662. ]),
  46663. vue.createCommentVNode(` <view class="package-box" >
  46664. <view class="item" @click="navTo('/pages_company/packageDetails?packageId='+item.packageId)" v-for="(item,index) in dataList">
  46665. <view class="top">
  46666. <image :src="item.imgUrl"></image>
  46667. </view>
  46668. <view class="bottom">
  46669. <view class="title ellipsis2">
  46670. {{item.packageName}}
  46671. </view>
  46672. <view class="price-box">
  46673. <view class="price">¥{{item.price.toFixed(2)}}元/日</view>
  46674. <view class="count">{{item.sales}}人已购</view>
  46675. </view>
  46676. </view>
  46677. </view>
  46678. </view> `)
  46679. ]),
  46680. _: 1
  46681. /* STABLE */
  46682. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  46683. ]);
  46684. }
  46685. const Pages_companyPackageList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageList.vue"]]);
  46686. const _sfc_main$a = {
  46687. data() {
  46688. return {
  46689. displayText: "查看更多",
  46690. displayMore: 0,
  46691. imgs: [],
  46692. activeImg: 1,
  46693. doctorShow: false,
  46694. doctors: [],
  46695. products: [],
  46696. packageId: null,
  46697. item: {},
  46698. describe: null,
  46699. doctorId: null,
  46700. doctorPageNum: 1,
  46701. doctorLastPage: false,
  46702. doctorTotal: 0
  46703. };
  46704. },
  46705. onLoad(option) {
  46706. this.packageId = option.packageId;
  46707. this.companyId = uni.getStorageSync("companyId");
  46708. this.companyUserId = uni.getStorageSync("companyUserId");
  46709. },
  46710. onShow() {
  46711. this.getPackageById();
  46712. this.getPackageDoctorList();
  46713. },
  46714. onShareAppMessage(res) {
  46715. return {
  46716. title: this.item.packageName,
  46717. path: "/pages_index/packageDetails?packageId=" + this.packageId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId,
  46718. imageUrl: this.item.imgUrl
  46719. //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  46720. };
  46721. },
  46722. methods: {
  46723. showMore() {
  46724. this.displayMore = this.displayMore == 1 ? 0 : 1;
  46725. this.displayText = this.displayMore == 1 ? "收起" : "查看更多";
  46726. formatAppLog("log", "at pages_company/packageDetails.vue:194", this.displayText);
  46727. },
  46728. swiperChange(event) {
  46729. this.activeImg = event.detail.current + 1;
  46730. },
  46731. handleDoctorClick(item) {
  46732. this.doctorShow = false;
  46733. this.doctorId = item.doctorId;
  46734. uni.navigateTo({
  46735. url: "/pages_index/packageForm?packageId=" + this.packageId + "&doctorId=" + this.doctorId
  46736. });
  46737. },
  46738. lower(event) {
  46739. if (this.doctorTotal > this.doctors.length) {
  46740. this.doctorPageNum++;
  46741. this.getPackageDoctorList();
  46742. }
  46743. },
  46744. doctorOpen() {
  46745. this.doctorShow = true;
  46746. },
  46747. doctorClose() {
  46748. this.doctorShow = false;
  46749. },
  46750. showImg() {
  46751. uni.previewImage({
  46752. urls: this.imgs,
  46753. current: this.imgs[0]
  46754. });
  46755. },
  46756. getPackageDoctorList() {
  46757. if (this.doctorLastPage) {
  46758. return;
  46759. }
  46760. var data = {
  46761. packageId: this.packageId,
  46762. pageNum: this.doctorPageNum,
  46763. pageSize: 10
  46764. };
  46765. var that = this;
  46766. getPackageDoctorList(data).then(
  46767. (res) => {
  46768. if (res.code == 200) {
  46769. if (this.doctorPageNum == 0) {
  46770. that.doctors = res.data.list;
  46771. } else {
  46772. that.doctors = that.doctors.concat(res.data.list);
  46773. }
  46774. this.doctorLastPage = res.data.isLastPage;
  46775. this.doctorTotal = res.data.total;
  46776. formatAppLog("log", "at pages_company/packageDetails.vue:250", that.doctors);
  46777. } else {
  46778. uni.showToast({
  46779. icon: "none",
  46780. title: "请求失败"
  46781. });
  46782. }
  46783. },
  46784. (rej) => {
  46785. }
  46786. );
  46787. },
  46788. getPackageById() {
  46789. let data = { packageId: this.packageId };
  46790. getPackageById(data).then(
  46791. (res) => {
  46792. if (res.code == 200) {
  46793. this.item = res.data;
  46794. if (res.data.images != null) {
  46795. this.imgs = res.data.images.split(",");
  46796. } else {
  46797. this.activeImg = 0;
  46798. }
  46799. this.describe = JSON.parse(this.item.describeJson);
  46800. if (this.item.productJson != null) {
  46801. this.products = JSON.parse(this.item.productJson);
  46802. }
  46803. formatAppLog("log", "at pages_company/packageDetails.vue:278", this.imgs);
  46804. } else {
  46805. uni.showToast({
  46806. icon: "none",
  46807. title: "请求失败"
  46808. });
  46809. }
  46810. },
  46811. (rej) => {
  46812. }
  46813. );
  46814. }
  46815. }
  46816. };
  46817. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  46818. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  46819. vue.createCommentVNode(' <view class="img-box" @click="showImg()">\r\n <image :src="item.imgUrl"></image>\r\n </view> '),
  46820. vue.createElementVNode("view", { class: "cont-box" }, [
  46821. vue.createElementVNode("view", {
  46822. class: "goods-banner",
  46823. onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg())
  46824. }, [
  46825. vue.createElementVNode(
  46826. "swiper",
  46827. {
  46828. class: "swiper",
  46829. "indicator-dots": false,
  46830. circular: true,
  46831. autoplay: true,
  46832. interval: 3e3,
  46833. duration: 1e3,
  46834. "indicator-color": "rgba(255, 255, 255, 0.6)",
  46835. "indicator-active-color": "#ffffff",
  46836. onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  46837. },
  46838. [
  46839. (vue.openBlock(true), vue.createElementBlock(
  46840. vue.Fragment,
  46841. null,
  46842. vue.renderList($data.imgs, (item, index2) => {
  46843. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  46844. class: "swiper-item",
  46845. key: index2
  46846. }, [
  46847. vue.createElementVNode("image", {
  46848. src: item,
  46849. mode: "aspectFit"
  46850. }, null, 8, ["src"])
  46851. ]);
  46852. }),
  46853. 128
  46854. /* KEYED_FRAGMENT */
  46855. ))
  46856. ],
  46857. 32
  46858. /* NEED_HYDRATION */
  46859. ),
  46860. vue.createCommentVNode(" 数量 "),
  46861. vue.createElementVNode(
  46862. "view",
  46863. { class: "num-box" },
  46864. vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length),
  46865. 1
  46866. /* TEXT */
  46867. )
  46868. ]),
  46869. vue.createElementVNode("view", { class: "package-box" }, [
  46870. vue.createElementVNode(
  46871. "view",
  46872. { class: "title" },
  46873. vue.toDisplayString($data.item.packageName),
  46874. 1
  46875. /* TEXT */
  46876. ),
  46877. vue.createElementVNode("view", { class: "desc" }, [
  46878. $data.item.cycle > 0 ? (vue.openBlock(), vue.createElementBlock(
  46879. "view",
  46880. {
  46881. key: 0,
  46882. class: "cycle"
  46883. },
  46884. "用药周期" + vue.toDisplayString($data.item.cycle) + "天",
  46885. 1
  46886. /* TEXT */
  46887. )) : vue.createCommentVNode("v-if", true),
  46888. $data.item.duration > 0 ? (vue.openBlock(), vue.createElementBlock(
  46889. "view",
  46890. {
  46891. key: 1,
  46892. class: "duration"
  46893. },
  46894. "签约时长" + vue.toDisplayString($data.item.duration) + "天",
  46895. 1
  46896. /* TEXT */
  46897. )) : vue.createCommentVNode("v-if", true)
  46898. ]),
  46899. vue.createElementVNode("view", { class: "num-box" }, [
  46900. vue.createElementVNode("view", { class: "price-box" }, [
  46901. $data.item != null ? (vue.openBlock(), vue.createElementBlock(
  46902. "view",
  46903. {
  46904. key: 0,
  46905. class: "price"
  46906. },
  46907. "¥" + vue.toDisplayString($data.item.price.toFixed(2)) + "元/日",
  46908. 1
  46909. /* TEXT */
  46910. )) : vue.createCommentVNode("v-if", true),
  46911. $data.item != null && $data.item.packageSubType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  46912. key: 1,
  46913. class: "price"
  46914. }, "咨询包")) : vue.createCommentVNode("v-if", true),
  46915. $data.item != null && $data.item.packageSubType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  46916. key: 2,
  46917. class: "price"
  46918. }, "治疗包")) : vue.createCommentVNode("v-if", true),
  46919. $data.item != null && $data.item.packageSubType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  46920. key: 3,
  46921. class: "price"
  46922. }, "产品包")) : vue.createCommentVNode("v-if", true)
  46923. ]),
  46924. vue.createElementVNode(
  46925. "view",
  46926. { class: "count" },
  46927. vue.toDisplayString($data.item.sales) + "人已购",
  46928. 1
  46929. /* TEXT */
  46930. )
  46931. ])
  46932. ]),
  46933. $data.products.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  46934. key: 0,
  46935. class: "drug-box"
  46936. }, [
  46937. vue.createElementVNode("view", { class: "title-box" }, [
  46938. vue.createElementVNode("view", { class: "line" }),
  46939. vue.createElementVNode("view", { class: "title" }, "产品列表")
  46940. ]),
  46941. vue.createElementVNode("view", { class: "drug-list" }, [
  46942. (vue.openBlock(true), vue.createElementBlock(
  46943. vue.Fragment,
  46944. null,
  46945. vue.renderList($data.products, (product, index2) => {
  46946. return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
  46947. ($data.displayMore == 0 ? index2 < 2 : true) ? (vue.openBlock(), vue.createElementBlock("view", {
  46948. key: 0,
  46949. class: "drug"
  46950. }, [
  46951. vue.createElementVNode("view", { class: "img-box" }, [
  46952. vue.createElementVNode("image", {
  46953. src: product.image,
  46954. mode: "aspectFill"
  46955. }, null, 8, ["src"])
  46956. ]),
  46957. vue.createElementVNode("view", { class: "drug-info" }, [
  46958. vue.createElementVNode("view", null, [
  46959. vue.createElementVNode(
  46960. "view",
  46961. { class: "name-box ellipsis2" },
  46962. vue.toDisplayString(product.productName),
  46963. 1
  46964. /* TEXT */
  46965. ),
  46966. vue.createElementVNode(
  46967. "view",
  46968. { class: "spec" },
  46969. vue.toDisplayString(product.sku),
  46970. 1
  46971. /* TEXT */
  46972. )
  46973. ]),
  46974. vue.createElementVNode("view", { class: "num-box" }, [
  46975. vue.createElementVNode(
  46976. "view",
  46977. { class: "use" },
  46978. vue.toDisplayString(product.usageMethod),
  46979. 1
  46980. /* TEXT */
  46981. ),
  46982. vue.createElementVNode("view", { class: "price" }, [
  46983. vue.createCommentVNode(' <text class="unit">¥</text>\r\n <text class="num">{{product.price.toFixed(2)}}</text> ')
  46984. ]),
  46985. vue.createCommentVNode(' <view class="amount">x{{product.count}}</view> ')
  46986. ])
  46987. ])
  46988. ])) : vue.createCommentVNode("v-if", true)
  46989. ]);
  46990. }),
  46991. 256
  46992. /* UNKEYED_FRAGMENT */
  46993. ))
  46994. ]),
  46995. $data.products.length > 2 ? (vue.openBlock(), vue.createElementBlock(
  46996. "view",
  46997. {
  46998. key: 0,
  46999. class: "display-more",
  47000. onClick: _cache[2] || (_cache[2] = ($event) => $options.showMore())
  47001. },
  47002. vue.toDisplayString($data.displayText),
  47003. 1
  47004. /* TEXT */
  47005. )) : vue.createCommentVNode("v-if", true)
  47006. ])) : vue.createCommentVNode("v-if", true),
  47007. $data.describe.use != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47008. key: 1,
  47009. class: "desc-box"
  47010. }, [
  47011. vue.createElementVNode("view", { class: "title-box" }, [
  47012. vue.createElementVNode("view", { class: "line" }),
  47013. vue.createElementVNode("view", { class: "title" }, "功能")
  47014. ]),
  47015. $data.describe != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47016. key: 0,
  47017. class: "desc",
  47018. innerHTML: $data.describe.use
  47019. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
  47020. ])) : vue.createCommentVNode("v-if", true),
  47021. $data.item.indication != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47022. key: 2,
  47023. class: "desc-box"
  47024. }, [
  47025. vue.createElementVNode("view", { class: "title-box" }, [
  47026. vue.createElementVNode("view", { class: "line" }),
  47027. vue.createElementVNode("view", { class: "title" }, "主治")
  47028. ]),
  47029. $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47030. key: 0,
  47031. class: "desc",
  47032. innerHTML: $data.item.indication
  47033. }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
  47034. ])) : vue.createCommentVNode("v-if", true),
  47035. $data.describe.usageMethod != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47036. key: 3,
  47037. class: "desc-box"
  47038. }, [
  47039. vue.createElementVNode("view", { class: "title-box" }, [
  47040. vue.createElementVNode("view", { class: "line" }),
  47041. vue.createElementVNode("view", { class: "title" }, "服用/使用方式")
  47042. ]),
  47043. vue.createElementVNode("view", {
  47044. class: "desc",
  47045. innerHTML: $data.describe.usageMethod
  47046. }, null, 8, ["innerHTML"])
  47047. ])) : vue.createCommentVNode("v-if", true),
  47048. $data.describe.forPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47049. key: 4,
  47050. class: "desc-box"
  47051. }, [
  47052. vue.createElementVNode("view", { class: "title-box" }, [
  47053. vue.createElementVNode("view", { class: "line" }),
  47054. vue.createElementVNode("view", { class: "title" }, "适宜人群")
  47055. ]),
  47056. vue.createElementVNode("view", {
  47057. class: "desc",
  47058. innerHTML: $data.describe.forPeople
  47059. }, null, 8, ["innerHTML"])
  47060. ])) : vue.createCommentVNode("v-if", true),
  47061. $data.describe.tabooPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47062. key: 5,
  47063. class: "desc-box"
  47064. }, [
  47065. vue.createElementVNode("view", { class: "title-box" }, [
  47066. vue.createElementVNode("view", { class: "line" }),
  47067. vue.createElementVNode("view", { class: "title" }, "禁忌人群")
  47068. ]),
  47069. vue.createElementVNode("view", {
  47070. class: "desc",
  47071. innerHTML: $data.describe.tabooPeople
  47072. }, null, 8, ["innerHTML"])
  47073. ])) : vue.createCommentVNode("v-if", true),
  47074. $data.item.explain != null ? (vue.openBlock(), vue.createElementBlock("view", {
  47075. key: 6,
  47076. class: "desc-box"
  47077. }, [
  47078. vue.createElementVNode("view", { class: "title-box" }, [
  47079. vue.createElementVNode("view", { class: "line" }),
  47080. vue.createElementVNode("view", { class: "title" }, "方解/搭配优势")
  47081. ]),
  47082. vue.createElementVNode("view", {
  47083. class: "desc",
  47084. innerHTML: $data.item.explain
  47085. }, null, 8, ["innerHTML"])
  47086. ])) : vue.createCommentVNode("v-if", true),
  47087. vue.createElementVNode("view", { class: "desc-box" }, [
  47088. vue.createElementVNode("view", { class: "title-box" }, [
  47089. vue.createElementVNode("view", { class: "line" }),
  47090. vue.createElementVNode("view", { class: "title" }, "套餐描述")
  47091. ]),
  47092. vue.createElementVNode("view", {
  47093. class: "desc",
  47094. innerHTML: $data.item.desc
  47095. }, null, 8, ["innerHTML"])
  47096. ])
  47097. ]),
  47098. vue.createElementVNode("view", { class: "btn-foot" }, [
  47099. vue.createElementVNode("view", { class: "p-price-box" }, [
  47100. vue.createElementVNode("view", { class: "p-name" }, "¥"),
  47101. $data.item != null ? (vue.openBlock(), vue.createElementBlock(
  47102. "view",
  47103. {
  47104. key: 0,
  47105. class: "p-price"
  47106. },
  47107. vue.toDisplayString($data.item.totalPrice.toFixed(2)),
  47108. 1
  47109. /* TEXT */
  47110. )) : vue.createCommentVNode("v-if", true)
  47111. ]),
  47112. vue.createElementVNode("view", { class: "btn-box" }, [
  47113. vue.createElementVNode("view", { class: "btn buy" }, [
  47114. vue.createTextVNode(" 分享 "),
  47115. vue.createElementVNode("button", {
  47116. class: "contact-btn",
  47117. "data-name": "shareBtn",
  47118. "open-type": "share"
  47119. }, "分享")
  47120. ])
  47121. ])
  47122. ])
  47123. ]);
  47124. }
  47125. const Pages_companyPackageDetails = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageDetails.vue"]]);
  47126. const _sfc_main$9 = {
  47127. mixins: [MescrollMixin],
  47128. data() {
  47129. return {
  47130. orderStatusOptions: [],
  47131. searchKey: "",
  47132. status: "0",
  47133. tabs: [
  47134. { name: "全部", id: "0" },
  47135. { name: "待支付", id: "1" },
  47136. { name: "服务中", id: "2" },
  47137. { name: "已完成", id: "3" },
  47138. { name: "已取消", id: "-1" },
  47139. { name: "已退款", id: "-2" }
  47140. ],
  47141. mescroll: null,
  47142. downOption: {
  47143. //下拉刷新
  47144. use: true,
  47145. auto: false
  47146. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  47147. },
  47148. upOption: {
  47149. onScroll: false,
  47150. use: true,
  47151. // 是否启用上拉加载; 默认true
  47152. page: {
  47153. pae: 0,
  47154. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  47155. size: 10
  47156. // 每页数据的数量,默认10
  47157. },
  47158. noMoreSize: 10,
  47159. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  47160. textNoMore: "已经到底了",
  47161. empty: {
  47162. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  47163. tip: "暂无数据"
  47164. }
  47165. },
  47166. dataList: []
  47167. };
  47168. },
  47169. onLoad(options) {
  47170. var that = this;
  47171. uni.$on("refreshPackageOrder", () => {
  47172. that.mescroll.resetUpScroll();
  47173. });
  47174. this.getDictByKey("sys_package_order_status");
  47175. },
  47176. onShow() {
  47177. },
  47178. methods: {
  47179. getDictByKey(key) {
  47180. var data = { key };
  47181. getDictByKey(data).then(
  47182. (res) => {
  47183. if (res.code == 200) {
  47184. if (key == "sys_package_order_status") {
  47185. this.orderStatusOptions = res.data;
  47186. }
  47187. }
  47188. },
  47189. (err) => {
  47190. }
  47191. );
  47192. },
  47193. showDetails(item) {
  47194. uni.navigateTo({
  47195. url: "/pages_company/packageOrderDetails?orderId=" + item.orderId
  47196. });
  47197. },
  47198. tabChange(item) {
  47199. this.status = item.id;
  47200. formatAppLog("log", "at pages_company/packageOrderList.vue:141", item);
  47201. this.mescroll.resetUpScroll();
  47202. },
  47203. mescrollInit(mescroll) {
  47204. this.mescroll = mescroll;
  47205. },
  47206. /*下拉刷新的回调 */
  47207. downCallback(mescroll) {
  47208. mescroll.resetUpScroll();
  47209. },
  47210. upCallback(page2) {
  47211. var that = this;
  47212. var data = {
  47213. status: this.status,
  47214. pageNum: page2.num,
  47215. pageSize: page2.size
  47216. };
  47217. getCompanyUserPackageOrderList(data).then((res) => {
  47218. if (res.code == 200) {
  47219. if (page2.num == 1) {
  47220. that.dataList = res.data.list;
  47221. } else {
  47222. that.dataList = that.dataList.concat(res.data.list);
  47223. }
  47224. that.mescroll.endBySize(res.data.list.length, res.data.total);
  47225. } else {
  47226. uni.showToast({
  47227. icon: "none",
  47228. title: "请求失败"
  47229. });
  47230. that.dataList = null;
  47231. that.mescroll.endErr();
  47232. }
  47233. });
  47234. }
  47235. }
  47236. };
  47237. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  47238. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  47239. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  47240. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  47241. vue.createElementVNode("view", { class: "top-fixed" }, [
  47242. vue.createVNode(_component_u_tabs, {
  47243. scrollable: true,
  47244. list: $data.tabs,
  47245. lineColor: "#C39A58",
  47246. onChange: $options.tabChange
  47247. }, null, 8, ["list", "onChange"])
  47248. ]),
  47249. vue.createVNode(_component_mescroll_body, {
  47250. top: "88rpx",
  47251. bottom: "0",
  47252. ref: "mescrollRef",
  47253. onInit: $options.mescrollInit,
  47254. onDown: $options.downCallback,
  47255. onUp: $options.upCallback,
  47256. down: $data.downOption,
  47257. up: $data.upOption
  47258. }, {
  47259. default: vue.withCtx(() => [
  47260. vue.createElementVNode("view", { class: "order-box" }, [
  47261. (vue.openBlock(true), vue.createElementBlock(
  47262. vue.Fragment,
  47263. null,
  47264. vue.renderList($data.dataList, (item) => {
  47265. return vue.openBlock(), vue.createElementBlock("view", {
  47266. class: "order-item",
  47267. onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"])
  47268. }, [
  47269. vue.createElementVNode("view", { class: "top-box" }, [
  47270. vue.createElementVNode(
  47271. "view",
  47272. { class: "num" },
  47273. "订单号:" + vue.toDisplayString(item.orderSn),
  47274. 1
  47275. /* TEXT */
  47276. ),
  47277. vue.createElementVNode("view", { class: "status-box" }, [
  47278. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  47279. "text",
  47280. {
  47281. key: 0,
  47282. class: "text info"
  47283. },
  47284. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  47285. 1
  47286. /* TEXT */
  47287. )) : vue.createCommentVNode("v-if", true),
  47288. item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
  47289. "text",
  47290. {
  47291. key: 1,
  47292. class: "text success"
  47293. },
  47294. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  47295. 1
  47296. /* TEXT */
  47297. )) : vue.createCommentVNode("v-if", true),
  47298. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  47299. "text",
  47300. {
  47301. key: 2,
  47302. class: "text info"
  47303. },
  47304. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  47305. 1
  47306. /* TEXT */
  47307. )) : vue.createCommentVNode("v-if", true)
  47308. ])
  47309. ]),
  47310. vue.createElementVNode("view", { class: "package-box" }, [
  47311. vue.createElementVNode("view", { class: "left" }, [
  47312. vue.createElementVNode("image", {
  47313. src: item.imgUrl
  47314. }, null, 8, ["src"])
  47315. ]),
  47316. vue.createElementVNode("view", { class: "right" }, [
  47317. vue.createElementVNode(
  47318. "view",
  47319. { class: "title" },
  47320. vue.toDisplayString(item.packageName),
  47321. 1
  47322. /* TEXT */
  47323. ),
  47324. vue.createElementVNode("view", { class: "desc" }, [
  47325. vue.createElementVNode(
  47326. "view",
  47327. { class: "cycle" },
  47328. "用药周期" + vue.toDisplayString(item.cycle) + "天",
  47329. 1
  47330. /* TEXT */
  47331. ),
  47332. vue.createElementVNode(
  47333. "view",
  47334. { class: "duration" },
  47335. "签约时长" + vue.toDisplayString(item.duration) + "天",
  47336. 1
  47337. /* TEXT */
  47338. )
  47339. ]),
  47340. vue.createCommentVNode(' <view class="price-box">\n <view class="price">¥30元/日</view>\n <view class="count">6.2w人已购</view>\n </view> ')
  47341. ])
  47342. ]),
  47343. vue.createElementVNode("view", { class: "bottom-box" }, [
  47344. vue.createElementVNode("view", { class: "amount-paid" }, [
  47345. vue.createElementVNode("text", { class: "label" }, "订单金额:"),
  47346. vue.createElementVNode("view", { class: "price-box" }, [
  47347. vue.createElementVNode("view", { class: "unit" }, "¥"),
  47348. vue.createElementVNode(
  47349. "view",
  47350. { class: "num" },
  47351. vue.toDisplayString(item.payPrice.toFixed(2)),
  47352. 1
  47353. /* TEXT */
  47354. )
  47355. ])
  47356. ]),
  47357. vue.createElementVNode("view", { class: "btn-box" }, [
  47358. vue.createCommentVNode(' <view v-if="item.status == 1" class="btn cancel" @click="cancel(item)">取消订单</view> '),
  47359. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  47360. key: 0,
  47361. class: "btn pay"
  47362. }, "查看订单")) : vue.createCommentVNode("v-if", true)
  47363. ])
  47364. ])
  47365. ], 8, ["onClick"]);
  47366. }),
  47367. 256
  47368. /* UNKEYED_FRAGMENT */
  47369. ))
  47370. ])
  47371. ]),
  47372. _: 1
  47373. /* STABLE */
  47374. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  47375. ]);
  47376. }
  47377. const Pages_companyPackageOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-c4b00143"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageOrderList.vue"]]);
  47378. const _sfc_main$8 = {
  47379. data() {
  47380. return {
  47381. orderId: null,
  47382. order: {},
  47383. package: null,
  47384. items: []
  47385. };
  47386. },
  47387. onLoad(option) {
  47388. this.orderId = option.orderId;
  47389. this.getPackageOrderById();
  47390. },
  47391. onShow() {
  47392. },
  47393. methods: {
  47394. getPackageOrderById() {
  47395. var data = { orderId: this.orderId };
  47396. getCompanyUserPackageOrderById(data).then((res) => {
  47397. if (res.code == 200) {
  47398. this.order = res.order;
  47399. this.package = JSON.parse(this.order.packageJson);
  47400. } else {
  47401. uni.showToast({
  47402. icon: "none",
  47403. title: "请求失败"
  47404. });
  47405. }
  47406. });
  47407. },
  47408. pay() {
  47409. uni.navigateTo({
  47410. url: "/pages_order/packageOrderPay?orderId=" + this.order.orderId
  47411. });
  47412. },
  47413. // 返回上一页
  47414. back() {
  47415. let pages2 = getCurrentPages();
  47416. formatAppLog("log", "at pages_company/packageOrderDetails.vue:180", pages2.length);
  47417. if (pages2.length > 1) {
  47418. uni.navigateBack();
  47419. } else {
  47420. uni.reLaunch({
  47421. url: "/pages/common/launch"
  47422. });
  47423. }
  47424. },
  47425. // 复制订单编号
  47426. copyOrderSn(text) {
  47427. uni.setClipboardData({
  47428. data: text,
  47429. success: () => {
  47430. uni.showToast({
  47431. title: "内容已成功复制到剪切板",
  47432. icon: "none"
  47433. });
  47434. }
  47435. });
  47436. }
  47437. }
  47438. };
  47439. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  47440. return vue.openBlock(), vue.createElementBlock("view", null, [
  47441. vue.createElementVNode("view", { class: "cont" }, [
  47442. vue.createElementVNode("view", { class: "bg" }),
  47443. vue.createElementVNode("view", { class: "inner" }, [
  47444. vue.createCommentVNode(" 订单状态 "),
  47445. vue.createElementVNode("view", { class: "order-status" }, [
  47446. vue.createCommentVNode(" 待付款 "),
  47447. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  47448. key: 0,
  47449. class: "inner"
  47450. }, [
  47451. vue.createElementVNode("view", { class: "img-box" }, [
  47452. vue.createElementVNode("image", {
  47453. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
  47454. mode: ""
  47455. })
  47456. ]),
  47457. vue.createElementVNode("view", { class: "status-box" }, [
  47458. vue.createElementVNode("text", { class: "status" }, "待付款"),
  47459. vue.createCommentVNode(' <text class="desc">请在{{payLimitTime}}前完成支付</text> ')
  47460. ])
  47461. ])) : vue.createCommentVNode("v-if", true),
  47462. vue.createCommentVNode(" 服务中 "),
  47463. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  47464. key: 1,
  47465. class: "inner"
  47466. }, [
  47467. vue.createElementVNode("view", { class: "img-box" }, [
  47468. vue.createElementVNode("image", {
  47469. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b71efb4b5ca54564b553569d578738b4.png",
  47470. mode: ""
  47471. })
  47472. ]),
  47473. vue.createElementVNode("view", { class: "status-box" }, [
  47474. vue.createElementVNode("text", { class: "status" }, "服务中"),
  47475. vue.createElementVNode("text", { class: "desc" }, "正在服务中")
  47476. ])
  47477. ])) : vue.createCommentVNode("v-if", true),
  47478. vue.createCommentVNode(" 已完成 "),
  47479. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  47480. key: 2,
  47481. class: "inner"
  47482. }, [
  47483. vue.createElementVNode("view", { class: "img-box" }, [
  47484. vue.createElementVNode("image", {
  47485. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
  47486. mode: ""
  47487. })
  47488. ]),
  47489. vue.createElementVNode("view", { class: "status-box" }, [
  47490. vue.createElementVNode("text", { class: "status" }, "已完成"),
  47491. vue.createElementVNode("text", { class: "desc" }, "服务已完成")
  47492. ])
  47493. ])) : vue.createCommentVNode("v-if", true),
  47494. vue.createCommentVNode("交易取消 "),
  47495. $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  47496. key: 3,
  47497. class: "inner"
  47498. }, [
  47499. vue.createElementVNode("view", { class: "img-box" }, [
  47500. vue.createElementVNode("image", {
  47501. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
  47502. mode: ""
  47503. })
  47504. ]),
  47505. vue.createElementVNode("view", { class: "status-box" }, [
  47506. vue.createElementVNode("text", { class: "status" }, "交易关闭"),
  47507. vue.createElementVNode("text", { class: "desc" }, "订单已取消")
  47508. ])
  47509. ])) : vue.createCommentVNode("v-if", true),
  47510. $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
  47511. key: 4,
  47512. class: "inner"
  47513. }, [
  47514. vue.createElementVNode("view", { class: "img-box" }, [
  47515. vue.createElementVNode("image", {
  47516. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
  47517. mode: ""
  47518. })
  47519. ]),
  47520. vue.createElementVNode("view", { class: "status-box" }, [
  47521. vue.createElementVNode("text", { class: "status" }, "退款成功"),
  47522. vue.createElementVNode("text", { class: "desc" }, "已成功退款")
  47523. ])
  47524. ])) : vue.createCommentVNode("v-if", true)
  47525. ]),
  47526. vue.createElementVNode("view", { class: "content" }, [
  47527. vue.createElementVNode("view", { class: "package-box" }, [
  47528. vue.createElementVNode("view", { class: "left" }, [
  47529. vue.createElementVNode("image", {
  47530. src: $data.package.imgUrl
  47531. }, null, 8, ["src"])
  47532. ]),
  47533. vue.createElementVNode("view", { class: "right" }, [
  47534. vue.createElementVNode(
  47535. "view",
  47536. { class: "title" },
  47537. vue.toDisplayString($data.package.packageName),
  47538. 1
  47539. /* TEXT */
  47540. ),
  47541. vue.createElementVNode("view", { class: "desc" }, [
  47542. vue.createElementVNode(
  47543. "view",
  47544. { class: "cycle" },
  47545. "用药周期" + vue.toDisplayString($data.package.cycle) + "天",
  47546. 1
  47547. /* TEXT */
  47548. ),
  47549. vue.createElementVNode(
  47550. "view",
  47551. { class: "duration" },
  47552. "签约时长" + vue.toDisplayString($data.package.duration) + "天",
  47553. 1
  47554. /* TEXT */
  47555. )
  47556. ]),
  47557. vue.createCommentVNode(' <view class="price-box">\r\n <view class="price">¥30元/日</view>\r\n <view class="count">6.2w人已购</view>\r\n </view> ')
  47558. ])
  47559. ]),
  47560. vue.createCommentVNode(" 订单信息 "),
  47561. vue.createElementVNode("view", { class: "order-info" }, [
  47562. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  47563. vue.createElementVNode("view", { class: "item" }, [
  47564. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  47565. vue.createElementVNode("view", { class: "sn-box" }, [
  47566. vue.createElementVNode(
  47567. "text",
  47568. { class: "text" },
  47569. vue.toDisplayString($data.order.orderSn),
  47570. 1
  47571. /* TEXT */
  47572. ),
  47573. vue.createElementVNode("view", {
  47574. class: "copy-btn",
  47575. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderSn))
  47576. }, "复制")
  47577. ])
  47578. ]),
  47579. vue.createElementVNode("view", { class: "item" }, [
  47580. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  47581. vue.createElementVNode(
  47582. "text",
  47583. { class: "text" },
  47584. vue.toDisplayString($data.order.createTime),
  47585. 1
  47586. /* TEXT */
  47587. )
  47588. ]),
  47589. vue.createElementVNode("view", { class: "item" }, [
  47590. vue.createElementVNode("text", { class: "label" }, "支付方式"),
  47591. $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  47592. key: 0,
  47593. class: "text"
  47594. }, "微信支付")) : vue.createCommentVNode("v-if", true),
  47595. $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  47596. key: 1,
  47597. class: "text"
  47598. }, "物流代收")) : vue.createCommentVNode("v-if", true),
  47599. $data.order.payType == 3 ? (vue.openBlock(), vue.createElementBlock("text", {
  47600. key: 2,
  47601. class: "text"
  47602. }, "货到付款")) : vue.createCommentVNode("v-if", true)
  47603. ]),
  47604. vue.createElementVNode("view", { class: "item" }, [
  47605. vue.createElementVNode("text", { class: "label" }, "订单金额"),
  47606. $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
  47607. "text",
  47608. {
  47609. key: 0,
  47610. class: "text"
  47611. },
  47612. "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
  47613. 1
  47614. /* TEXT */
  47615. )) : vue.createCommentVNode("v-if", true)
  47616. ]),
  47617. vue.createElementVNode("view", { class: "item" }, [
  47618. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  47619. $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
  47620. "text",
  47621. {
  47622. key: 0,
  47623. class: "text"
  47624. },
  47625. "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
  47626. 1
  47627. /* TEXT */
  47628. )) : vue.createCommentVNode("v-if", true)
  47629. ]),
  47630. vue.createElementVNode("view", { class: "item" }, [
  47631. vue.createElementVNode("text", { class: "label" }, "抵扣金额"),
  47632. $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
  47633. "text",
  47634. {
  47635. key: 0,
  47636. class: "text"
  47637. },
  47638. "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  47639. 1
  47640. /* TEXT */
  47641. )) : vue.createCommentVNode("v-if", true)
  47642. ]),
  47643. vue.createElementVNode("view", { class: "item" }, [
  47644. vue.createElementVNode("text", { class: "label" }, "代收金额"),
  47645. $data.order.payRemain != null ? (vue.openBlock(), vue.createElementBlock(
  47646. "text",
  47647. {
  47648. key: 0,
  47649. class: "text"
  47650. },
  47651. "¥" + vue.toDisplayString($data.order.payRemain.toFixed(2)),
  47652. 1
  47653. /* TEXT */
  47654. )) : vue.createCommentVNode("v-if", true)
  47655. ]),
  47656. vue.createElementVNode("view", { class: "item" }, [
  47657. vue.createElementVNode("text", { class: "label" }, "运费金额"),
  47658. $data.order.payDelivery != null ? (vue.openBlock(), vue.createElementBlock(
  47659. "text",
  47660. {
  47661. key: 0,
  47662. class: "text"
  47663. },
  47664. "¥" + vue.toDisplayString($data.order.payDelivery.toFixed(2)),
  47665. 1
  47666. /* TEXT */
  47667. )) : vue.createCommentVNode("v-if", true)
  47668. ]),
  47669. vue.createElementVNode("view", { class: "item" }, [
  47670. vue.createElementVNode("text", { class: "label" }, "支付时间"),
  47671. vue.createElementVNode(
  47672. "text",
  47673. { class: "text" },
  47674. vue.toDisplayString($data.order.payTime),
  47675. 1
  47676. /* TEXT */
  47677. )
  47678. ])
  47679. ])
  47680. ])
  47681. ])
  47682. ]),
  47683. vue.createCommentVNode(" 按钮 "),
  47684. vue.createElementVNode("view", { class: "btn-box" }, [
  47685. vue.createCommentVNode(' <view class="btn cancel" v-if="order.status==1" @click="cancel()">取消订单</view> '),
  47686. vue.createCommentVNode(' <view class="btn pay" v-if="order.status==1" @click="pay()">支付</view> ')
  47687. ])
  47688. ]);
  47689. }
  47690. const Pages_companyPackageOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageOrderDetails.vue"]]);
  47691. let request = new Request$1().http;
  47692. function getCouponList(data) {
  47693. return request("/app/coupon/getCouponList", data, "GET");
  47694. }
  47695. function getCouponById(data) {
  47696. return request("/app/coupon/getCouponById", data, "GET");
  47697. }
  47698. function genCode(data) {
  47699. return request("/app/coupon/genCode", data, "GET");
  47700. }
  47701. function receive(data) {
  47702. return request("/app/coupon/receive", data, "POST", "application/json;charset=UTF-8");
  47703. }
  47704. const _sfc_main$7 = {
  47705. name: "UserCoupon",
  47706. props: {},
  47707. mixins: [MescrollMixin],
  47708. // 使用mixin
  47709. data: function() {
  47710. return {
  47711. keyword: "",
  47712. cateOptions: [],
  47713. cateId: null,
  47714. couponType: null,
  47715. mescroll: null,
  47716. downOption: {
  47717. //下拉刷新
  47718. use: true,
  47719. auto: false
  47720. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  47721. },
  47722. upOption: {
  47723. onScroll: false,
  47724. use: true,
  47725. // 是否启用上拉加载; 默认true
  47726. page: {
  47727. pae: 0,
  47728. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  47729. size: 10
  47730. // 每页数据的数量,默认10
  47731. },
  47732. noMoreSize: 10,
  47733. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  47734. textNoMore: "已经到底了",
  47735. empty: {
  47736. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  47737. tip: "暂无数据"
  47738. }
  47739. },
  47740. dataList: [],
  47741. isShare: null
  47742. };
  47743. },
  47744. watch: {},
  47745. onLoad(options) {
  47746. this.couponType = options.couponType;
  47747. this.isShare = options.isShare;
  47748. },
  47749. onShow() {
  47750. if (this.couponType == 5) {
  47751. this.getDictByKey("sys_package_private_type");
  47752. } else if (this.couponType == 6) {
  47753. this.getDictByKey("sys_package_disease_type");
  47754. }
  47755. },
  47756. methods: {
  47757. choseCate(item) {
  47758. this.cateId = item.dictValue;
  47759. this.mescroll.resetUpScroll();
  47760. },
  47761. getDictByKey(key) {
  47762. var data = { key };
  47763. getDictByKey(data).then(
  47764. (res) => {
  47765. if (res.code == 200) {
  47766. this.cateOptions = res.data;
  47767. }
  47768. },
  47769. (err) => {
  47770. }
  47771. );
  47772. },
  47773. doSearch() {
  47774. this.mescroll.resetUpScroll();
  47775. },
  47776. navTo(url2) {
  47777. uni.navigateTo({
  47778. url: url2
  47779. });
  47780. },
  47781. mescrollInit(mescroll) {
  47782. this.mescroll = mescroll;
  47783. },
  47784. /*下拉刷新的回调 */
  47785. downCallback() {
  47786. this.mescroll.resetUpScroll();
  47787. },
  47788. /*上拉加载的回调*/
  47789. upCallback(page2) {
  47790. var that = this;
  47791. var data = {
  47792. keyword: this.keyword,
  47793. couponType: this.couponType,
  47794. pageNum: page2.num,
  47795. pageSize: page2.size
  47796. };
  47797. if (this.cateId != null) {
  47798. data.cateId = this.cateId;
  47799. }
  47800. getCouponList(data).then((res) => {
  47801. if (res.code == 200) {
  47802. if (page2.num == 1) {
  47803. that.dataList = res.data.list;
  47804. } else {
  47805. that.dataList = that.dataList.concat(res.data.list);
  47806. }
  47807. that.mescroll.endBySize(res.data.list.length, res.data.total);
  47808. } else {
  47809. uni.showToast({
  47810. icon: "none",
  47811. title: "请求失败"
  47812. });
  47813. that.dataList = null;
  47814. that.mescroll.endErr();
  47815. }
  47816. });
  47817. }
  47818. }
  47819. };
  47820. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  47821. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  47822. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  47823. _ctx.couponType == 5 || _ctx.couponType == 6 ? (vue.openBlock(), vue.createElementBlock("view", {
  47824. key: 0,
  47825. class: "top-content"
  47826. }, [
  47827. vue.createCommentVNode(" 搜索框 "),
  47828. vue.createElementVNode("view", { class: "search-cont" }, [
  47829. vue.createElementVNode("view", { class: "inner" }, [
  47830. vue.createElementVNode("image", {
  47831. class: "icon-search",
  47832. src: "/static/images/icon_search.png",
  47833. mode: ""
  47834. }),
  47835. vue.withDirectives(vue.createElementVNode(
  47836. "input",
  47837. {
  47838. type: "text",
  47839. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keyword = $event),
  47840. placeholder: "输入名称搜索",
  47841. "confirm-type": "search",
  47842. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
  47843. "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
  47844. },
  47845. null,
  47846. 544
  47847. /* NEED_HYDRATION, NEED_PATCH */
  47848. ), [
  47849. [vue.vModelText, _ctx.keyword]
  47850. ])
  47851. ])
  47852. ]),
  47853. vue.createElementVNode("view", { class: "cate-list" }, [
  47854. vue.createCommentVNode(" 关键字列表 "),
  47855. vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
  47856. vue.createElementVNode("view", { class: "inner" }, [
  47857. (vue.openBlock(true), vue.createElementBlock(
  47858. vue.Fragment,
  47859. null,
  47860. vue.renderList(_ctx.cateOptions, (item, index2) => {
  47861. return vue.openBlock(), vue.createElementBlock("view", {
  47862. key: index2,
  47863. class: vue.normalizeClass(_ctx.cateId == item.dictValue ? "item active" : "item"),
  47864. onClick: ($event) => $options.choseCate(item)
  47865. }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
  47866. }),
  47867. 128
  47868. /* KEYED_FRAGMENT */
  47869. ))
  47870. ])
  47871. ])
  47872. ])
  47873. ])) : vue.createCommentVNode("v-if", true),
  47874. vue.createVNode(_component_mescroll_body, {
  47875. top: _ctx.couponType == 5 || _ctx.couponType == 6 ? "192rpx" : "0rpx",
  47876. bottom: "0",
  47877. ref: "mescrollRef",
  47878. onInit: $options.mescrollInit,
  47879. down: _ctx.downOption,
  47880. up: _ctx.upOption,
  47881. onDown: $options.downCallback,
  47882. onUp: $options.upCallback
  47883. }, {
  47884. default: vue.withCtx(() => [
  47885. vue.createElementVNode("view", { class: "tui-coupon-list" }, [
  47886. (vue.openBlock(true), vue.createElementBlock(
  47887. vue.Fragment,
  47888. null,
  47889. vue.renderList(_ctx.dataList, (item, index2) => {
  47890. return vue.openBlock(), vue.createElementBlock("view", {
  47891. class: "tui-coupon-item tui-top20",
  47892. key: index2
  47893. }, [
  47894. vue.createElementVNode("image", {
  47895. src: "/static/images/bg_coupon_3x.png",
  47896. class: "tui-coupon-bg",
  47897. mode: "widthFix"
  47898. }),
  47899. vue.createElementVNode("view", { class: "tui-coupon-item-left" }, [
  47900. vue.createElementVNode("view", { class: "tui-coupon-price-box" }, [
  47901. vue.createElementVNode("view", { class: "tui-coupon-price-sign" }, "¥"),
  47902. vue.createElementVNode(
  47903. "view",
  47904. {
  47905. class: vue.normalizeClass(["tui-coupon-price", { "tui-price-small": false }])
  47906. },
  47907. vue.toDisplayString(item.price.toFixed(2)),
  47908. 1
  47909. /* TEXT */
  47910. )
  47911. ]),
  47912. vue.createElementVNode(
  47913. "view",
  47914. { class: "tui-coupon-intro" },
  47915. "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
  47916. 1
  47917. /* TEXT */
  47918. )
  47919. ]),
  47920. vue.createElementVNode("view", { class: "tui-coupon-item-right" }, [
  47921. vue.createElementVNode("view", { class: "tui-coupon-content" }, [
  47922. vue.createElementVNode("view", { class: "tui-coupon-title-box" }, [
  47923. vue.createElementVNode(
  47924. "view",
  47925. { class: "tui-coupon-title" },
  47926. vue.toDisplayString(item.title),
  47927. 1
  47928. /* TEXT */
  47929. )
  47930. ]),
  47931. vue.createElementVNode("view", { class: "tui-coupon-rule" }, [
  47932. vue.createElementVNode("view", { class: "tui-rule-box tui-padding-btm" }, [
  47933. vue.createElementVNode("view", { class: "tui-coupon-circle" }),
  47934. vue.createElementVNode("view", { class: "tui-coupon-text" }, "不可叠加使用")
  47935. ]),
  47936. vue.createElementVNode("view", { class: "tui-rule-box" }, [
  47937. vue.createElementVNode("view", { class: "tui-coupon-circle" }),
  47938. vue.createElementVNode(
  47939. "view",
  47940. { class: "tui-coupon-text" },
  47941. vue.toDisplayString(item.limitTime) + " 到期",
  47942. 1
  47943. /* TEXT */
  47944. )
  47945. ])
  47946. ])
  47947. ])
  47948. ]),
  47949. vue.createElementVNode("view", { class: "tui-btn-box" }, [
  47950. vue.createElementVNode("view", {
  47951. class: "btn receive",
  47952. onClick: ($event) => $options.navTo("/pages_company/couponDetails?isShare=" + _ctx.isShare + "&couponId=" + item.couponId)
  47953. }, "查看", 8, ["onClick"])
  47954. ])
  47955. ]);
  47956. }),
  47957. 128
  47958. /* KEYED_FRAGMENT */
  47959. ))
  47960. ])
  47961. ]),
  47962. _: 1
  47963. /* STABLE */
  47964. }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])
  47965. ]);
  47966. }
  47967. const Pages_companyCouponList = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-343ae408"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/couponList.vue"]]);
  47968. const _sfc_main$6 = {
  47969. name: "getCoupon",
  47970. props: {},
  47971. data: function() {
  47972. return {
  47973. couponId: null,
  47974. item: null,
  47975. isShare: null,
  47976. code: null
  47977. };
  47978. },
  47979. onLoad(options) {
  47980. this.couponId = options.couponId;
  47981. this.code = options.code;
  47982. if (!this.$isEmpty(options.isShare)) {
  47983. this.isShare = options.isShare;
  47984. this.genCode();
  47985. } else {
  47986. uni.hideShareMenu();
  47987. }
  47988. formatAppLog("log", "at pages_company/couponDetails.vue:63", options.couponId);
  47989. this.companyId = uni.getStorageSync("companyId");
  47990. this.companyUserId = uni.getStorageSync("companyUserId");
  47991. this.getCouponById();
  47992. },
  47993. //发送给朋友
  47994. onShareAppMessage(res) {
  47995. uni.showShareMenu({
  47996. withShareTicket: true
  47997. });
  47998. wx.updateShareMenu({
  47999. isPrivateMessage: true,
  48000. withShareTicket: true,
  48001. success(res2) {
  48002. formatAppLog("log", "at pages_company/couponDetails.vue:78", "updateShareMenu: ", res2);
  48003. },
  48004. fail() {
  48005. }
  48006. });
  48007. return {
  48008. title: this.item.title,
  48009. path: "/pages_company/couponDetails?couponId=" + this.item.couponId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&code=" + this.code
  48010. };
  48011. },
  48012. mounted: function() {
  48013. },
  48014. onShow() {
  48015. },
  48016. methods: {
  48017. genCode: function() {
  48018. let that = this;
  48019. var data = { couponId: this.couponId };
  48020. genCode(data).then(function(res) {
  48021. that.code = res.data;
  48022. }).catch(function(err) {
  48023. });
  48024. },
  48025. getCouponById: function() {
  48026. let that = this;
  48027. var data = {
  48028. couponId: this.couponId
  48029. };
  48030. getCouponById(data).then(function(res) {
  48031. that.item = res.data;
  48032. }).catch(function(err) {
  48033. uni.showToast({
  48034. title: err.msg,
  48035. icon: "none",
  48036. duration: 2e3
  48037. });
  48038. });
  48039. },
  48040. receive: function() {
  48041. var data = {
  48042. couponId: this.item.couponId,
  48043. companyId: this.companyId,
  48044. companyUserId: this.companyUserId,
  48045. code: this.code
  48046. };
  48047. receive(data).then(function(res) {
  48048. if (res.code == 200) {
  48049. uni.showToast({
  48050. title: "领取成功",
  48051. icon: "success",
  48052. duration: 2e3
  48053. });
  48054. } else {
  48055. uni.showToast({
  48056. title: res.msg,
  48057. duration: 2e3
  48058. });
  48059. }
  48060. }).catch(function(err) {
  48061. uni.showToast({
  48062. title: err.msg,
  48063. icon: "none",
  48064. duration: 2e3
  48065. });
  48066. });
  48067. }
  48068. }
  48069. };
  48070. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  48071. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  48072. _ctx.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
  48073. key: 0,
  48074. class: "tui-coupon-list"
  48075. }, [
  48076. vue.createElementVNode("view", { class: "tui-coupon-item tui-top20" }, [
  48077. vue.createElementVNode("image", {
  48078. src: "/static/images/bg_coupon_3x.png",
  48079. class: "tui-coupon-bg",
  48080. mode: "widthFix"
  48081. }),
  48082. vue.createElementVNode("view", { class: "tui-coupon-item-left" }, [
  48083. vue.createElementVNode("view", { class: "tui-coupon-price-box" }, [
  48084. vue.createElementVNode("view", { class: "tui-coupon-price-sign" }, "¥"),
  48085. vue.createElementVNode(
  48086. "view",
  48087. {
  48088. class: vue.normalizeClass(["tui-coupon-price", { "tui-price-small": false }])
  48089. },
  48090. vue.toDisplayString(_ctx.item.price.toFixed(2)),
  48091. 1
  48092. /* TEXT */
  48093. )
  48094. ]),
  48095. vue.createElementVNode(
  48096. "view",
  48097. { class: "tui-coupon-intro" },
  48098. "满" + vue.toDisplayString(_ctx.item.minPrice.toFixed(2)) + "元可用",
  48099. 1
  48100. /* TEXT */
  48101. )
  48102. ]),
  48103. vue.createElementVNode("view", { class: "tui-coupon-item-right" }, [
  48104. vue.createElementVNode("view", { class: "tui-coupon-content" }, [
  48105. vue.createElementVNode("view", { class: "tui-coupon-title-box" }, [
  48106. vue.createElementVNode(
  48107. "view",
  48108. { class: "tui-coupon-title" },
  48109. vue.toDisplayString(_ctx.item.title),
  48110. 1
  48111. /* TEXT */
  48112. )
  48113. ]),
  48114. vue.createElementVNode("view", { class: "tui-coupon-rule" }, [
  48115. vue.createElementVNode("view", { class: "tui-rule-box tui-padding-btm" }, [
  48116. vue.createElementVNode("view", { class: "tui-coupon-circle" }),
  48117. vue.createElementVNode("view", { class: "tui-coupon-text" }, "不可叠加使用")
  48118. ]),
  48119. vue.createElementVNode("view", { class: "tui-rule-box" }, [
  48120. vue.createElementVNode("view", { class: "tui-coupon-circle" }),
  48121. vue.createElementVNode(
  48122. "view",
  48123. { class: "tui-coupon-text" },
  48124. vue.toDisplayString(_ctx.item.limitTime) + " 到期",
  48125. 1
  48126. /* TEXT */
  48127. )
  48128. ])
  48129. ])
  48130. ])
  48131. ]),
  48132. vue.createElementVNode("view", { class: "tui-btn-box" }, [
  48133. _ctx.item.remainNumber > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  48134. key: 0,
  48135. class: "btn receive",
  48136. onClick: _cache[0] || (_cache[0] = ($event) => $options.receive())
  48137. }, "立即领取")) : _ctx.item.remainNumber == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  48138. key: 1,
  48139. class: "btn cancel"
  48140. }, "已领完")) : vue.createCommentVNode("v-if", true)
  48141. ])
  48142. ])
  48143. ])) : vue.createCommentVNode("v-if", true)
  48144. ]);
  48145. }
  48146. const Pages_companyCouponDetails = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-66a98d6c"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/couponDetails.vue"]]);
  48147. const _sfc_main$5 = {
  48148. mixins: [MescrollMixin],
  48149. // 使用mixin
  48150. data() {
  48151. return {
  48152. orderStatusOptions: [],
  48153. orderTypeOptions: [],
  48154. inquiryTypeOptions: [],
  48155. tabs: [
  48156. {
  48157. id: 2,
  48158. name: "快速问诊"
  48159. },
  48160. {
  48161. id: 1,
  48162. name: "专家问诊"
  48163. },
  48164. {
  48165. id: 3,
  48166. name: "开药问诊"
  48167. }
  48168. ],
  48169. inquiryType: 2,
  48170. mescroll: null,
  48171. downOption: {
  48172. //下拉刷新
  48173. use: true,
  48174. auto: false
  48175. // 不自动加载 (mixin已处理第一个tab触发downCallback)
  48176. },
  48177. upOption: {
  48178. onScroll: false,
  48179. use: true,
  48180. // 是否启用上拉加载; 默认true
  48181. page: {
  48182. pae: 0,
  48183. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  48184. size: 10
  48185. // 每页数据的数量,默认10
  48186. },
  48187. noMoreSize: 10,
  48188. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  48189. textNoMore: "已经到底了",
  48190. empty: {
  48191. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  48192. tip: "暂无数据"
  48193. }
  48194. },
  48195. dataList: []
  48196. };
  48197. },
  48198. onLoad() {
  48199. this.getDictByKey("sys_inquiry_order_type");
  48200. this.getDictByKey("sys_inquiry_type");
  48201. this.getDictByKey("sys_inquiry_status");
  48202. var that = this;
  48203. uni.$on("refreshInquiryOrder", () => {
  48204. that.mescroll.resetUpScroll();
  48205. });
  48206. },
  48207. onShow() {
  48208. },
  48209. methods: {
  48210. cancel(item) {
  48211. uni.showModal({
  48212. title: "提示",
  48213. content: "确认取消订单吗?",
  48214. showCancel: true,
  48215. cancelText: "取消",
  48216. confirmText: "确定",
  48217. success: (res) => {
  48218. if (res.confirm) {
  48219. var data = { orderId: item.orderId };
  48220. cancel(data).then(
  48221. (res2) => {
  48222. if (res2.code == 200) {
  48223. this.mescroll.resetUpScroll();
  48224. uni.showToast({
  48225. icon: "success",
  48226. title: "操作成功"
  48227. });
  48228. } else {
  48229. uni.showToast({
  48230. icon: "none",
  48231. title: res2.msg
  48232. });
  48233. }
  48234. },
  48235. (rej) => {
  48236. }
  48237. );
  48238. }
  48239. }
  48240. });
  48241. },
  48242. ping(item) {
  48243. uni.navigateTo({
  48244. url: "/pages_order/pingOrder?orderId=" + item.orderId
  48245. });
  48246. },
  48247. pay(item) {
  48248. uni.navigateTo({
  48249. url: "/pages_order/inquiryPay?orderId=" + item.orderId
  48250. });
  48251. },
  48252. toIM(item) {
  48253. var id = "C2CD-" + item.doctorId;
  48254. formatAppLog("log", "at pages_company/inquiryOrderList.vue:190", uni.$TUIKit.TUIConversationServer);
  48255. store.commit("timStore/setConversationID", id);
  48256. uni.$TUIKit.TUIConversationServer.setMessageRead(id);
  48257. uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
  48258. var _a;
  48259. store.commit("timStore/setImType", res.customData);
  48260. const { conversation } = res.data;
  48261. store.commit("timStore/setImType", 1);
  48262. store.commit("timStore/setConversation", conversation);
  48263. let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
  48264. conversation.userProfile;
  48265. url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}&orderId=` + item.orderId;
  48266. uni.redirectTo({ url: url2 });
  48267. }).catch((err) => {
  48268. formatAppLog("warn", "at pages_company/inquiryOrderList.vue:217", "获取 group profile 异常 = ", err);
  48269. });
  48270. },
  48271. getDictByKey(key) {
  48272. var data = { key };
  48273. getDictByKey(data).then(
  48274. (res) => {
  48275. if (res.code == 200) {
  48276. if (key == "sys_inquiry_order_type") {
  48277. this.orderTypeOptions = res.data;
  48278. }
  48279. if (key == "sys_inquiry_type") {
  48280. this.inquiryTypeOptions = res.data;
  48281. }
  48282. if (key == "sys_inquiry_status") {
  48283. this.orderStatusOptions = res.data;
  48284. }
  48285. }
  48286. },
  48287. (err) => {
  48288. }
  48289. );
  48290. },
  48291. inquiryTypeChange(item) {
  48292. this.inquiryType = item.id;
  48293. formatAppLog("log", "at pages_company/inquiryOrderList.vue:243", item);
  48294. this.mescroll.resetUpScroll();
  48295. },
  48296. navTo(url2) {
  48297. uni.navigateTo({
  48298. url: url2
  48299. });
  48300. },
  48301. mescrollInit(mescroll) {
  48302. this.mescroll = mescroll;
  48303. },
  48304. /*下拉刷新的回调 */
  48305. downCallback() {
  48306. this.mescroll.resetUpScroll();
  48307. },
  48308. /*上拉加载的回调*/
  48309. upCallback(page2) {
  48310. var that = this;
  48311. var data = {
  48312. inquiryType: this.inquiryType,
  48313. pageNum: page2.num,
  48314. pageSize: page2.size
  48315. };
  48316. getCompanyUserInquiryOrderList(data).then((res) => {
  48317. if (res.code == 200) {
  48318. if (page2.num == 1) {
  48319. that.dataList = res.data.list;
  48320. } else {
  48321. that.dataList = that.dataList.concat(res.data.list);
  48322. }
  48323. that.mescroll.endBySize(res.data.list.length, res.data.total);
  48324. } else {
  48325. uni.showToast({
  48326. icon: "none",
  48327. title: "请求失败"
  48328. });
  48329. that.dataList = null;
  48330. that.mescroll.endErr();
  48331. }
  48332. });
  48333. }
  48334. }
  48335. };
  48336. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  48337. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  48338. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  48339. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  48340. vue.createElementVNode("view", { class: "top-fixed" }, [
  48341. vue.createVNode(_component_u_tabs, {
  48342. scrollable: false,
  48343. list: $data.tabs,
  48344. lineColor: "#C39A58",
  48345. onChange: $options.inquiryTypeChange
  48346. }, null, 8, ["list", "onChange"])
  48347. ]),
  48348. vue.createVNode(_component_mescroll_body, {
  48349. top: "88rpx",
  48350. bottom: "0",
  48351. ref: "mescrollRef",
  48352. onInit: $options.mescrollInit,
  48353. down: $data.downOption,
  48354. up: $data.upOption,
  48355. onDown: $options.downCallback,
  48356. onUp: $options.upCallback
  48357. }, {
  48358. default: vue.withCtx(() => [
  48359. vue.createElementVNode("view", { class: "order-list" }, [
  48360. (vue.openBlock(true), vue.createElementBlock(
  48361. vue.Fragment,
  48362. null,
  48363. vue.renderList($data.dataList, (item) => {
  48364. return vue.openBlock(), vue.createElementBlock("view", {
  48365. class: "order-item",
  48366. onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
  48367. }, [
  48368. vue.createElementVNode("view", { class: "order-top" }, [
  48369. item.doctorId != null ? (vue.openBlock(), vue.createElementBlock("view", {
  48370. key: 0,
  48371. class: "left"
  48372. }, [
  48373. vue.createElementVNode("image", {
  48374. class: "head",
  48375. mode: "aspectFill",
  48376. src: item.avatar
  48377. }, null, 8, ["src"]),
  48378. vue.createElementVNode(
  48379. "view",
  48380. { class: "name" },
  48381. vue.toDisplayString(item.doctorName),
  48382. 1
  48383. /* TEXT */
  48384. ),
  48385. vue.createElementVNode(
  48386. "view",
  48387. { class: "dept" },
  48388. vue.toDisplayString(item.deptName),
  48389. 1
  48390. /* TEXT */
  48391. )
  48392. ])) : vue.createCommentVNode("v-if", true),
  48393. item.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  48394. key: 1,
  48395. class: "left"
  48396. }, [
  48397. item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  48398. key: 0,
  48399. class: "title"
  48400. }, " 支付后为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
  48401. item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  48402. key: 1,
  48403. class: "title"
  48404. }, " 正在为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
  48405. item.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  48406. key: 2,
  48407. class: "title"
  48408. }, " 订单已取消 ")) : vue.createCommentVNode("v-if", true),
  48409. item.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
  48410. key: 3,
  48411. class: "title"
  48412. }, " 订单已退款 ")) : vue.createCommentVNode("v-if", true),
  48413. item.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
  48414. key: 4,
  48415. class: "title"
  48416. }, " 医生已拒单 ")) : vue.createCommentVNode("v-if", true)
  48417. ])) : vue.createCommentVNode("v-if", true),
  48418. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  48419. "view",
  48420. {
  48421. key: 2,
  48422. class: "status red"
  48423. },
  48424. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  48425. 1
  48426. /* TEXT */
  48427. )) : vue.createCommentVNode("v-if", true),
  48428. item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  48429. "view",
  48430. {
  48431. key: 3,
  48432. class: "status red"
  48433. },
  48434. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  48435. 1
  48436. /* TEXT */
  48437. )) : vue.createCommentVNode("v-if", true),
  48438. item.status == 3 ? (vue.openBlock(), vue.createElementBlock(
  48439. "view",
  48440. {
  48441. key: 4,
  48442. class: "status green"
  48443. },
  48444. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  48445. 1
  48446. /* TEXT */
  48447. )) : vue.createCommentVNode("v-if", true),
  48448. item.status == 4 ? (vue.openBlock(), vue.createElementBlock(
  48449. "view",
  48450. {
  48451. key: 5,
  48452. class: "status green"
  48453. },
  48454. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  48455. 1
  48456. /* TEXT */
  48457. )) : vue.createCommentVNode("v-if", true),
  48458. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  48459. "view",
  48460. {
  48461. key: 6,
  48462. class: "status gray"
  48463. },
  48464. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  48465. 1
  48466. /* TEXT */
  48467. )) : vue.createCommentVNode("v-if", true)
  48468. ]),
  48469. vue.createElementVNode("view", { class: "order-cont" }, [
  48470. vue.createElementVNode("view", { class: "order-type" }, [
  48471. vue.createTextVNode(" 订单类型: "),
  48472. vue.createElementVNode(
  48473. "text",
  48474. null,
  48475. vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, item.inquiryType)),
  48476. 1
  48477. /* TEXT */
  48478. ),
  48479. vue.createElementVNode(
  48480. "text",
  48481. null,
  48482. "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, item.orderType)),
  48483. 1
  48484. /* TEXT */
  48485. )
  48486. ]),
  48487. vue.createElementVNode(
  48488. "view",
  48489. { class: "order-desc" },
  48490. "病情描述:" + vue.toDisplayString(item.title),
  48491. 1
  48492. /* TEXT */
  48493. ),
  48494. vue.createElementVNode("view", { class: "order-time-box" }, [
  48495. vue.createElementVNode(
  48496. "view",
  48497. { class: "order-time" },
  48498. vue.toDisplayString(item.createTime),
  48499. 1
  48500. /* TEXT */
  48501. ),
  48502. vue.createElementVNode("view", { class: "right" }, [
  48503. vue.createElementVNode("view", {
  48504. class: "btn",
  48505. onClick: vue.withModifiers(($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId), ["stop"])
  48506. }, "查看", 8, ["onClick"])
  48507. ])
  48508. ])
  48509. ])
  48510. ], 8, ["onClick"]);
  48511. }),
  48512. 256
  48513. /* UNKEYED_FRAGMENT */
  48514. ))
  48515. ])
  48516. ]),
  48517. _: 1
  48518. /* STABLE */
  48519. }, 8, ["onInit", "down", "up", "onDown", "onUp"])
  48520. ]);
  48521. }
  48522. const Pages_companyInquiryOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-c9704ce4"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/inquiryOrderList.vue"]]);
  48523. const _sfc_main$4 = {
  48524. data() {
  48525. return {
  48526. report: null,
  48527. patient: null,
  48528. hospital: null,
  48529. department: null,
  48530. doctor: null,
  48531. order: null,
  48532. orderId: null,
  48533. orderStatusOptions: [],
  48534. orderTypeOptions: [],
  48535. inquiryTypeOptions: [],
  48536. reportImages: [],
  48537. tongueImages: [],
  48538. faceImages: [],
  48539. forms: []
  48540. };
  48541. },
  48542. onLoad(options) {
  48543. this.orderId = options.orderId;
  48544. this.getDictByKey("sys_inquiry_order_type");
  48545. this.getDictByKey("sys_inquiry_type");
  48546. this.getDictByKey("sys_inquiry_status");
  48547. },
  48548. onShow() {
  48549. this.getCompanyUserInquiryOrderById();
  48550. },
  48551. methods: {
  48552. cancel() {
  48553. var that = this;
  48554. uni.showModal({
  48555. title: "提示",
  48556. content: "确认取消订单吗?",
  48557. showCancel: true,
  48558. cancelText: "取消",
  48559. confirmText: "确定",
  48560. success: (res) => {
  48561. if (res.confirm) {
  48562. var data = { orderId: this.orderId };
  48563. cancel(data).then(
  48564. (res2) => {
  48565. if (res2.code == 200) {
  48566. that.getMyInquiryOrderById();
  48567. uni.showToast({
  48568. icon: "success",
  48569. title: "操作成功"
  48570. });
  48571. } else {
  48572. uni.showToast({
  48573. icon: "none",
  48574. title: res2.msg
  48575. });
  48576. }
  48577. },
  48578. (rej) => {
  48579. }
  48580. );
  48581. }
  48582. }
  48583. });
  48584. },
  48585. ping() {
  48586. uni.navigateTo({
  48587. url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId
  48588. });
  48589. },
  48590. pay() {
  48591. uni.navigateTo({
  48592. url: "/pages_order/inquiryPay?orderId=" + this.orderId
  48593. });
  48594. },
  48595. toIM() {
  48596. var that = this;
  48597. var id = "C2CD-" + this.doctor.doctorId;
  48598. formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:371", uni.$TUIKit.TUIConversationServer);
  48599. store.commit("timStore/setConversationID", id);
  48600. uni.$TUIKit.TUIConversationServer.setMessageRead(id);
  48601. uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
  48602. var _a;
  48603. uni.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => {
  48604. formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:379", "更新order");
  48605. }).catch((err) => {
  48606. });
  48607. formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:384", res);
  48608. const { conversation } = res.data;
  48609. store.commit("timStore/setImType", 1);
  48610. store.commit("timStore/setConversation", conversation);
  48611. let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
  48612. conversation.userProfile;
  48613. url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
  48614. uni.redirectTo({ url: url2 });
  48615. }).catch((err) => {
  48616. formatAppLog("warn", "at pages_company/inquiryOrderDetails.vue:398", "获取 group profile 异常 = ", err);
  48617. });
  48618. },
  48619. navTo(url2) {
  48620. uni.navigateTo({
  48621. url: url2
  48622. });
  48623. },
  48624. copyOrderSn() {
  48625. uni.setClipboardData({
  48626. data: this.order.orderSn,
  48627. success: function() {
  48628. uni.showToast({
  48629. title: "复制成功",
  48630. icon: "none"
  48631. });
  48632. }
  48633. });
  48634. },
  48635. getCompanyUserInquiryOrderById() {
  48636. var that = this;
  48637. var data = { orderId: this.orderId };
  48638. getCompanyUserInquiryOrderById(data).then(
  48639. (res) => {
  48640. if (res.code == 200) {
  48641. this.order = res.data.order;
  48642. this.report = res.data.report;
  48643. this.patient = JSON.parse(res.data.order.patientJson);
  48644. if (this.report != null && this.report.formJson != null) {
  48645. this.forms = JSON.parse(this.report.formJson);
  48646. }
  48647. if (that.patient.reportImages != null) {
  48648. that.reportImages = that.patient.reportImages.split(",");
  48649. }
  48650. if (that.patient.tongueImages != null) {
  48651. that.tongueImages = that.patient.tongueImages.split(",");
  48652. }
  48653. if (that.patient.faceImages != null) {
  48654. that.faceImages = that.patient.faceImages.split(",");
  48655. }
  48656. this.doctor = res.data.doctor;
  48657. this.department = res.data.department;
  48658. this.hospital = res.data.hospital;
  48659. }
  48660. },
  48661. (err) => {
  48662. }
  48663. );
  48664. },
  48665. getDictByKey(key) {
  48666. var data = { key };
  48667. getDictByKey(data).then(
  48668. (res) => {
  48669. if (res.code == 200) {
  48670. if (key == "sys_inquiry_order_type") {
  48671. this.orderTypeOptions = res.data;
  48672. }
  48673. if (key == "sys_inquiry_type") {
  48674. this.inquiryTypeOptions = res.data;
  48675. }
  48676. if (key == "sys_inquiry_status") {
  48677. this.orderStatusOptions = res.data;
  48678. }
  48679. }
  48680. },
  48681. (err) => {
  48682. }
  48683. );
  48684. },
  48685. navTo(url2) {
  48686. uni.navigateTo({
  48687. url: url2
  48688. });
  48689. }
  48690. }
  48691. };
  48692. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  48693. const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
  48694. const _component_u_album = resolveEasycom(vue.resolveDynamicComponent("u-album"), __easycom_1$2);
  48695. const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2);
  48696. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  48697. vue.createElementVNode("view", { class: "cont" }, [
  48698. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  48699. key: 0,
  48700. class: "other-info"
  48701. }, [
  48702. vue.createElementVNode("view", { class: "title" }, "付款详情"),
  48703. vue.createElementVNode("view", { class: "item" }, [
  48704. vue.createElementVNode("view", { class: "left" }, [
  48705. vue.createElementVNode("text", { class: "label" }, "订单类型:"),
  48706. vue.createElementVNode(
  48707. "text",
  48708. { class: "text" },
  48709. vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
  48710. 1
  48711. /* TEXT */
  48712. ),
  48713. vue.createElementVNode(
  48714. "text",
  48715. { class: "text" },
  48716. "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
  48717. 1
  48718. /* TEXT */
  48719. )
  48720. ]),
  48721. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  48722. "view",
  48723. {
  48724. key: 0,
  48725. class: "status red"
  48726. },
  48727. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  48728. 1
  48729. /* TEXT */
  48730. )) : vue.createCommentVNode("v-if", true),
  48731. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock(
  48732. "view",
  48733. {
  48734. key: 1,
  48735. class: "status red"
  48736. },
  48737. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  48738. 1
  48739. /* TEXT */
  48740. )) : vue.createCommentVNode("v-if", true),
  48741. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock(
  48742. "view",
  48743. {
  48744. key: 2,
  48745. class: "status green"
  48746. },
  48747. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  48748. 1
  48749. /* TEXT */
  48750. )) : vue.createCommentVNode("v-if", true),
  48751. $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock(
  48752. "view",
  48753. {
  48754. key: 3,
  48755. class: "status green"
  48756. },
  48757. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  48758. 1
  48759. /* TEXT */
  48760. )) : vue.createCommentVNode("v-if", true),
  48761. $data.order.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  48762. "view",
  48763. {
  48764. key: 4,
  48765. class: "status gray"
  48766. },
  48767. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
  48768. 1
  48769. /* TEXT */
  48770. )) : vue.createCommentVNode("v-if", true)
  48771. ])
  48772. ])) : vue.createCommentVNode("v-if", true),
  48773. $data.doctor != null ? (vue.openBlock(), vue.createElementBlock("view", {
  48774. key: 1,
  48775. class: "doc-box"
  48776. }, [
  48777. vue.createElementVNode("view", { class: "title" }, "医生详情"),
  48778. vue.createElementVNode("view", { class: "doc-name-box" }, [
  48779. vue.createElementVNode(
  48780. "view",
  48781. { class: "doc-name" },
  48782. vue.toDisplayString($data.doctor.doctorName),
  48783. 1
  48784. /* TEXT */
  48785. ),
  48786. vue.createElementVNode("view", { class: "doc-star" }, [
  48787. vue.createVNode(_component_u_rate, {
  48788. activeColor: "#ffc603",
  48789. count: "5",
  48790. readonly: "",
  48791. modelValue: $data.doctor.pingStar,
  48792. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.doctor.pingStar = $event)
  48793. }, null, 8, ["modelValue"])
  48794. ])
  48795. ]),
  48796. vue.createElementVNode(
  48797. "view",
  48798. { class: "doc-dept-box" },
  48799. vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
  48800. 1
  48801. /* TEXT */
  48802. ),
  48803. vue.createElementVNode(
  48804. "view",
  48805. { class: "doc-his-box" },
  48806. vue.toDisplayString($data.hospital.hospitalName),
  48807. 1
  48808. /* TEXT */
  48809. ),
  48810. vue.createElementVNode("view", { class: "doc-spec-box" }, [
  48811. vue.createElementVNode("view", { class: "left" }, [
  48812. vue.createElementVNode("view", { class: "title" }, "擅长:"),
  48813. vue.createElementVNode(
  48814. "view",
  48815. { class: "spec" },
  48816. vue.toDisplayString($data.doctor.speciality),
  48817. 1
  48818. /* TEXT */
  48819. )
  48820. ]),
  48821. vue.createElementVNode("view", { class: "right" }, [
  48822. vue.createElementVNode("view", {
  48823. class: "btn",
  48824. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId))
  48825. }, "详情")
  48826. ])
  48827. ])
  48828. ])) : vue.createCommentVNode("v-if", true),
  48829. $data.patient != null && $data.order.inquiryType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  48830. key: 2,
  48831. class: "other-info"
  48832. }, [
  48833. vue.createElementVNode("view", { class: "title" }, "咨询内容"),
  48834. vue.createElementVNode("view", { class: "item" }, [
  48835. vue.createElementVNode("view", { class: "left" }, [
  48836. vue.createElementVNode("text", { class: "label" }, "患者信息:"),
  48837. vue.createElementVNode(
  48838. "text",
  48839. { class: "text" },
  48840. vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
  48841. 1
  48842. /* TEXT */
  48843. )
  48844. ])
  48845. ]),
  48846. vue.createElementVNode("view", { class: "item" }, [
  48847. vue.createElementVNode("view", { class: "left" }, [
  48848. vue.createElementVNode("text", { class: "label" }, "病情描述:"),
  48849. vue.createElementVNode(
  48850. "text",
  48851. { class: "text" },
  48852. vue.toDisplayString($data.patient.title),
  48853. 1
  48854. /* TEXT */
  48855. )
  48856. ])
  48857. ]),
  48858. vue.createElementVNode("view", { class: "item" }, [
  48859. vue.createElementVNode("view", { class: "left" }, [
  48860. vue.createElementVNode("text", { class: "label" }, "患病时间:"),
  48861. vue.createElementVNode(
  48862. "text",
  48863. { class: "text" },
  48864. vue.toDisplayString($data.patient.duration),
  48865. 1
  48866. /* TEXT */
  48867. )
  48868. ])
  48869. ]),
  48870. vue.createElementVNode("view", { class: "item" }, [
  48871. vue.createElementVNode("view", { class: "left" }, [
  48872. vue.createElementVNode("text", { class: "label" }, "就诊情况:"),
  48873. vue.createElementVNode(
  48874. "text",
  48875. { class: "text" },
  48876. vue.toDisplayString($data.patient.isVisit),
  48877. 1
  48878. /* TEXT */
  48879. )
  48880. ])
  48881. ])
  48882. ])) : vue.createCommentVNode("v-if", true),
  48883. $data.patient != null && $data.order.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  48884. key: 3,
  48885. class: "other-info"
  48886. }, [
  48887. vue.createElementVNode("view", { class: "title" }, "咨询内容"),
  48888. vue.createElementVNode("view", { class: "item" }, [
  48889. vue.createElementVNode("view", { class: "left" }, [
  48890. vue.createElementVNode("text", { class: "label" }, "患者信息:"),
  48891. vue.createElementVNode(
  48892. "text",
  48893. { class: "text" },
  48894. vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
  48895. 1
  48896. /* TEXT */
  48897. )
  48898. ])
  48899. ]),
  48900. vue.createElementVNode("view", { class: "item" }, [
  48901. vue.createElementVNode("view", { class: "left" }, [
  48902. vue.createElementVNode("text", { class: "label" }, "身高(CM):"),
  48903. vue.createElementVNode(
  48904. "text",
  48905. { class: "text" },
  48906. vue.toDisplayString($data.patient.height),
  48907. 1
  48908. /* TEXT */
  48909. )
  48910. ])
  48911. ]),
  48912. vue.createElementVNode("view", { class: "item" }, [
  48913. vue.createElementVNode("view", { class: "left" }, [
  48914. vue.createElementVNode("text", { class: "label" }, "体重(KG):"),
  48915. vue.createElementVNode(
  48916. "text",
  48917. { class: "text" },
  48918. vue.toDisplayString($data.patient.weight),
  48919. 1
  48920. /* TEXT */
  48921. )
  48922. ])
  48923. ]),
  48924. vue.createElementVNode("view", { class: "item" }, [
  48925. vue.createElementVNode("view", { class: "left" }, [
  48926. vue.createElementVNode("text", { class: "label" }, "联系电话:"),
  48927. vue.createElementVNode(
  48928. "text",
  48929. { class: "text" },
  48930. vue.toDisplayString($data.patient.mobile),
  48931. 1
  48932. /* TEXT */
  48933. )
  48934. ])
  48935. ]),
  48936. vue.createElementVNode("view", { class: "item" }, [
  48937. vue.createElementVNode("view", { class: "left" }, [
  48938. vue.createElementVNode("text", { class: "label" }, "学习进度:"),
  48939. vue.createElementVNode(
  48940. "text",
  48941. { class: "text" },
  48942. vue.toDisplayString($data.patient.study),
  48943. 1
  48944. /* TEXT */
  48945. )
  48946. ])
  48947. ]),
  48948. vue.createElementVNode("view", { class: "item" }, [
  48949. vue.createElementVNode("view", { class: "left" }, [
  48950. vue.createElementVNode("text", { class: "label" }, "期望会诊方式:"),
  48951. vue.createElementVNode(
  48952. "text",
  48953. { class: "text" },
  48954. vue.toDisplayString($data.patient.usage),
  48955. 1
  48956. /* TEXT */
  48957. )
  48958. ])
  48959. ]),
  48960. vue.createElementVNode("view", { class: "item" }, [
  48961. vue.createElementVNode("view", { class: "left" }, [
  48962. vue.createElementVNode("text", { class: "label" }, "病情描述:"),
  48963. vue.createElementVNode(
  48964. "text",
  48965. { class: "text" },
  48966. vue.toDisplayString($data.patient.title),
  48967. 1
  48968. /* TEXT */
  48969. )
  48970. ])
  48971. ]),
  48972. vue.createElementVNode("view", { class: "item" }, [
  48973. vue.createElementVNode("view", { class: "left" }, [
  48974. vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
  48975. vue.createElementVNode(
  48976. "text",
  48977. { class: "text" },
  48978. vue.toDisplayString($data.patient.drugs),
  48979. 1
  48980. /* TEXT */
  48981. )
  48982. ])
  48983. ]),
  48984. vue.createElementVNode("view", { class: "item" }, [
  48985. vue.createElementVNode("view", { class: "left" }, [
  48986. vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
  48987. vue.createElementVNode(
  48988. "text",
  48989. { class: "text" },
  48990. vue.toDisplayString($data.patient.duration),
  48991. 1
  48992. /* TEXT */
  48993. )
  48994. ])
  48995. ]),
  48996. vue.createElementVNode("view", { class: "item" }, [
  48997. vue.createElementVNode("view", { class: "left" }, [
  48998. vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
  48999. vue.createElementVNode(
  49000. "text",
  49001. { class: "text" },
  49002. vue.toDisplayString($data.patient.isVisit),
  49003. 1
  49004. /* TEXT */
  49005. )
  49006. ])
  49007. ]),
  49008. vue.createElementVNode("view", { class: "item" }, [
  49009. vue.createElementVNode("view", { class: "left" }, [
  49010. vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
  49011. ])
  49012. ]),
  49013. vue.createElementVNode("view", null, [
  49014. vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
  49015. ]),
  49016. vue.createElementVNode("view", { class: "item" }, [
  49017. vue.createElementVNode("view", { class: "left" }, [
  49018. vue.createElementVNode("text", { class: "label" }, "面部照片:")
  49019. ])
  49020. ]),
  49021. vue.createElementVNode("view", null, [
  49022. vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
  49023. ]),
  49024. vue.createElementVNode("view", { class: "item" }, [
  49025. vue.createElementVNode("view", { class: "left" }, [
  49026. vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
  49027. ])
  49028. ]),
  49029. vue.createElementVNode("view", null, [
  49030. vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
  49031. ])
  49032. ])) : vue.createCommentVNode("v-if", true),
  49033. $data.patient != null && $data.order.inquiryType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  49034. key: 4,
  49035. class: "other-info"
  49036. }, [
  49037. vue.createElementVNode("view", { class: "title" }, "咨询内容"),
  49038. vue.createElementVNode("view", { class: "item" }, [
  49039. vue.createElementVNode("view", { class: "left" }, [
  49040. vue.createElementVNode("text", { class: "label" }, "患者信息:"),
  49041. vue.createElementVNode(
  49042. "text",
  49043. { class: "text" },
  49044. vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
  49045. 1
  49046. /* TEXT */
  49047. )
  49048. ])
  49049. ]),
  49050. vue.createElementVNode("view", { class: "item" }, [
  49051. vue.createElementVNode("view", { class: "left" }, [
  49052. vue.createElementVNode("text", { class: "label" }, "病情描述:"),
  49053. vue.createElementVNode(
  49054. "text",
  49055. { class: "text" },
  49056. vue.toDisplayString($data.patient.title),
  49057. 1
  49058. /* TEXT */
  49059. )
  49060. ])
  49061. ]),
  49062. vue.createElementVNode("view", { class: "item" }, [
  49063. vue.createElementVNode("view", { class: "left" }, [
  49064. vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
  49065. vue.createElementVNode(
  49066. "text",
  49067. { class: "text" },
  49068. vue.toDisplayString($data.patient.drugs),
  49069. 1
  49070. /* TEXT */
  49071. )
  49072. ])
  49073. ]),
  49074. vue.createElementVNode("view", { class: "item" }, [
  49075. vue.createElementVNode("view", { class: "left" }, [
  49076. vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
  49077. vue.createElementVNode(
  49078. "text",
  49079. { class: "text" },
  49080. vue.toDisplayString($data.patient.duration),
  49081. 1
  49082. /* TEXT */
  49083. )
  49084. ])
  49085. ]),
  49086. vue.createElementVNode("view", { class: "item" }, [
  49087. vue.createElementVNode("view", { class: "left" }, [
  49088. vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
  49089. vue.createElementVNode(
  49090. "text",
  49091. { class: "text" },
  49092. vue.toDisplayString($data.patient.isVisit),
  49093. 1
  49094. /* TEXT */
  49095. )
  49096. ])
  49097. ]),
  49098. vue.createElementVNode("view", { class: "item" }, [
  49099. vue.createElementVNode("view", { class: "left" }, [
  49100. vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
  49101. ])
  49102. ]),
  49103. vue.createElementVNode("view", null, [
  49104. vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
  49105. ]),
  49106. vue.createElementVNode("view", { class: "item" }, [
  49107. vue.createElementVNode("view", { class: "left" }, [
  49108. vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
  49109. ])
  49110. ]),
  49111. vue.createElementVNode("view", null, [
  49112. vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
  49113. ]),
  49114. vue.createElementVNode("view", { class: "item" }, [
  49115. vue.createElementVNode("view", { class: "left" }, [
  49116. vue.createElementVNode("text", { class: "label" }, "面部照片:")
  49117. ])
  49118. ]),
  49119. vue.createElementVNode("view", null, [
  49120. vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
  49121. ])
  49122. ])) : vue.createCommentVNode("v-if", true),
  49123. $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  49124. key: 5,
  49125. class: "other-info"
  49126. }, [
  49127. vue.createElementVNode("view", { class: "title" }, "体检信息"),
  49128. (vue.openBlock(true), vue.createElementBlock(
  49129. vue.Fragment,
  49130. null,
  49131. vue.renderList($data.forms, (item) => {
  49132. return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
  49133. vue.createElementVNode("view", { class: "left" }, [
  49134. vue.createElementVNode(
  49135. "text",
  49136. { class: "label" },
  49137. vue.toDisplayString(item.title) + ":",
  49138. 1
  49139. /* TEXT */
  49140. ),
  49141. vue.createElementVNode("text", { class: "text" }, [
  49142. (vue.openBlock(true), vue.createElementBlock(
  49143. vue.Fragment,
  49144. null,
  49145. vue.renderList(item.option, (tag) => {
  49146. return vue.openBlock(), vue.createBlock(_component_u_tag, {
  49147. size: "mini",
  49148. plain: "",
  49149. type: "success",
  49150. style: { "margin-right": "5rpx", "margin-bottom": "5rpx" },
  49151. text: tag
  49152. }, null, 8, ["text"]);
  49153. }),
  49154. 256
  49155. /* UNKEYED_FRAGMENT */
  49156. ))
  49157. ])
  49158. ])
  49159. ]);
  49160. }),
  49161. 256
  49162. /* UNKEYED_FRAGMENT */
  49163. ))
  49164. ])) : vue.createCommentVNode("v-if", true),
  49165. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  49166. key: 6,
  49167. class: "other-info"
  49168. }, [
  49169. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  49170. vue.createElementVNode("view", { class: "item" }, [
  49171. vue.createElementVNode("view", { class: "left" }, [
  49172. vue.createElementVNode("text", { class: "label" }, "订单号码:"),
  49173. vue.createElementVNode(
  49174. "text",
  49175. { class: "text" },
  49176. vue.toDisplayString($data.order.orderSn),
  49177. 1
  49178. /* TEXT */
  49179. )
  49180. ]),
  49181. vue.createElementVNode("view", {
  49182. class: "item-btn",
  49183. onClick: _cache[2] || (_cache[2] = (...args) => $options.copyOrderSn && $options.copyOrderSn(...args))
  49184. }, "复制")
  49185. ]),
  49186. vue.createElementVNode("view", { class: "item" }, [
  49187. vue.createElementVNode("view", { class: "left" }, [
  49188. vue.createElementVNode("text", { class: "label" }, "下单时间:"),
  49189. vue.createElementVNode(
  49190. "text",
  49191. { class: "text" },
  49192. vue.toDisplayString($data.order.createTime),
  49193. 1
  49194. /* TEXT */
  49195. )
  49196. ])
  49197. ]),
  49198. vue.createElementVNode("view", { class: "item" }, [
  49199. vue.createElementVNode("view", { class: "left" }, [
  49200. vue.createElementVNode("text", { class: "label" }, "订单金额:"),
  49201. vue.createElementVNode(
  49202. "text",
  49203. { class: "text" },
  49204. vue.toDisplayString($data.order.money.toFixed(2)),
  49205. 1
  49206. /* TEXT */
  49207. )
  49208. ])
  49209. ]),
  49210. vue.createElementVNode("view", { class: "item" }, [
  49211. vue.createElementVNode("view", { class: "left" }, [
  49212. vue.createElementVNode("text", { class: "label" }, "优惠金额:"),
  49213. vue.createElementVNode(
  49214. "text",
  49215. { class: "text" },
  49216. vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  49217. 1
  49218. /* TEXT */
  49219. )
  49220. ])
  49221. ]),
  49222. vue.createElementVNode("view", { class: "item" }, [
  49223. vue.createElementVNode("view", { class: "left" }, [
  49224. vue.createElementVNode("text", { class: "label" }, "支付金额:"),
  49225. vue.createElementVNode(
  49226. "text",
  49227. { class: "text" },
  49228. vue.toDisplayString($data.order.payMoney.toFixed(2)),
  49229. 1
  49230. /* TEXT */
  49231. )
  49232. ])
  49233. ])
  49234. ])) : vue.createCommentVNode("v-if", true)
  49235. ]),
  49236. $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
  49237. key: 0,
  49238. class: "btn-box"
  49239. }, [
  49240. $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  49241. key: 0,
  49242. class: "btn",
  49243. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId))
  49244. }, "查看报告")) : vue.createCommentVNode("v-if", true)
  49245. ])) : vue.createCommentVNode("v-if", true)
  49246. ]);
  49247. }
  49248. const Pages_companyInquiryOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-2626eb2a"], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/inquiryOrderDetails.vue"]]);
  49249. const _sfc_main$3 = {
  49250. mixins: [MescrollMixin],
  49251. data() {
  49252. return {
  49253. orderStatusOptions: [],
  49254. searchKey: "",
  49255. status: "0",
  49256. tabs: [
  49257. { name: "全部", id: "0" },
  49258. { name: "待付款", id: "1" },
  49259. { name: "待发货", id: "2" },
  49260. { name: "待收货", id: "3" },
  49261. { name: "已完成", id: "4" }
  49262. ],
  49263. mescroll: null,
  49264. // 上拉加载的配置
  49265. upOption: {
  49266. onScroll: false,
  49267. use: true,
  49268. // 是否启用上拉加载; 默认true
  49269. page: {
  49270. pae: 0,
  49271. // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  49272. size: 10
  49273. // 每页数据的数量,默认10
  49274. },
  49275. noMoreSize: 10,
  49276. // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  49277. textNoMore: "已经到底了",
  49278. empty: {
  49279. icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
  49280. tip: "暂无数据"
  49281. }
  49282. },
  49283. // 列表数据
  49284. dataList: []
  49285. };
  49286. },
  49287. onLoad(option) {
  49288. var that = this;
  49289. uni.$on("refreshStoreOrder", () => {
  49290. that.mescroll.resetUpScroll();
  49291. });
  49292. this.getDictByKey("sys_order_status");
  49293. },
  49294. methods: {
  49295. getDictByKey(key) {
  49296. var data = { key };
  49297. getDictByKey(data).then(
  49298. (res) => {
  49299. if (res.code == 200) {
  49300. if (key == "sys_order_status") {
  49301. this.orderStatusOptions = res.data;
  49302. }
  49303. }
  49304. },
  49305. (err) => {
  49306. }
  49307. );
  49308. },
  49309. goSearch(e) {
  49310. this.searchKey = e.detail.value;
  49311. this.mescroll.resetUpScroll();
  49312. },
  49313. refund(item) {
  49314. uni.navigateTo({
  49315. url: "/pages_order/storeOrderRefundApply?orderId=" + item.orderId
  49316. });
  49317. },
  49318. tabChange(item) {
  49319. this.status = item.id;
  49320. this.mescroll.resetUpScroll();
  49321. },
  49322. mescrollInit(mescroll) {
  49323. this.mescroll = mescroll;
  49324. },
  49325. /*下拉刷新的回调 */
  49326. downCallback(mescroll) {
  49327. mescroll.resetUpScroll();
  49328. },
  49329. upCallback(page2) {
  49330. var that = this;
  49331. var data = {
  49332. keyword: this.searchKey,
  49333. status: this.status,
  49334. pageNum: page2.num,
  49335. pageSize: page2.size
  49336. };
  49337. getCompanyUserStoreOrderList(data).then((res) => {
  49338. if (res.code == 200) {
  49339. res.data.list.forEach(function(value2, index2, array3) {
  49340. value2.items = JSON.parse(value2.itemJson);
  49341. });
  49342. if (page2.num == 1) {
  49343. that.dataList = res.data.list;
  49344. } else {
  49345. that.dataList = that.dataList.concat(res.data.list);
  49346. }
  49347. that.mescroll.endBySize(res.data.list.length, res.data.total);
  49348. } else {
  49349. uni.showToast({
  49350. icon: "none",
  49351. title: "请求失败"
  49352. });
  49353. that.dataList = null;
  49354. that.mescroll.endErr();
  49355. }
  49356. });
  49357. },
  49358. // 查看订单详情
  49359. showDetail(item) {
  49360. uni.navigateTo({
  49361. url: "./storeOrderDetail?orderId=" + item.orderId
  49362. });
  49363. },
  49364. finish(item) {
  49365. var that = this;
  49366. uni.showModal({
  49367. title: "提示",
  49368. content: "确定已收货吗",
  49369. success: function(res) {
  49370. if (res.confirm) {
  49371. var data = {
  49372. orderId: item.orderId
  49373. };
  49374. finishOrder(data).then((res2) => {
  49375. if (res2.code == 200) {
  49376. uni.showToast({
  49377. icon: "success",
  49378. title: "操作成功"
  49379. });
  49380. that.mescroll.resetUpScroll();
  49381. } else {
  49382. uni.showToast({
  49383. icon: "none",
  49384. title: res2.msg
  49385. });
  49386. }
  49387. });
  49388. } else if (res.cancel)
  49389. ;
  49390. }
  49391. });
  49392. },
  49393. cancel(item) {
  49394. var that = this;
  49395. uni.showModal({
  49396. title: "提示",
  49397. content: "确定取消订单吗",
  49398. success: function(res) {
  49399. if (res.confirm) {
  49400. var data = {
  49401. orderId: item.orderId
  49402. };
  49403. cancelOrder(data).then((res2) => {
  49404. if (res2.code == 200) {
  49405. uni.showToast({
  49406. icon: "success",
  49407. title: "操作成功"
  49408. });
  49409. that.mescroll.resetUpScroll();
  49410. } else {
  49411. uni.showToast({
  49412. icon: "none",
  49413. title: res2.msg
  49414. });
  49415. }
  49416. });
  49417. } else if (res.cancel)
  49418. ;
  49419. }
  49420. });
  49421. },
  49422. pay(item) {
  49423. uni.navigateTo({
  49424. url: "/pages_order/storeOrderPay?orderId=" + item.orderId
  49425. });
  49426. },
  49427. // 查看物流
  49428. showDelivery(item) {
  49429. uni.navigateTo({
  49430. url: "./storeOrderDelivery?orderId=" + item.orderId
  49431. });
  49432. }
  49433. }
  49434. };
  49435. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  49436. const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
  49437. const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
  49438. return vue.openBlock(), vue.createElementBlock("view", null, [
  49439. vue.createElementVNode("view", { class: "top-fixed" }, [
  49440. vue.createVNode(_component_u_tabs, {
  49441. scrollable: false,
  49442. list: $data.tabs,
  49443. lineColor: "#C39A58",
  49444. onChange: $options.tabChange
  49445. }, null, 8, ["list", "onChange"])
  49446. ]),
  49447. vue.createCommentVNode(" 订单列表 "),
  49448. vue.createVNode(_component_mescroll_body, {
  49449. top: "88rpx",
  49450. bottom: "0",
  49451. ref: "mescrollRef",
  49452. onInit: $options.mescrollInit,
  49453. onDown: $options.downCallback,
  49454. onUp: $options.upCallback,
  49455. down: _ctx.downOption,
  49456. up: $data.upOption
  49457. }, {
  49458. default: vue.withCtx(() => [
  49459. vue.createElementVNode("view", { class: "order-list" }, [
  49460. (vue.openBlock(true), vue.createElementBlock(
  49461. vue.Fragment,
  49462. null,
  49463. vue.renderList($data.dataList, (item, index2) => {
  49464. return vue.openBlock(), vue.createElementBlock("view", {
  49465. onClick: ($event) => $options.showDetail(item),
  49466. key: index2,
  49467. class: "item"
  49468. }, [
  49469. vue.createCommentVNode(" 订单号,状态 "),
  49470. vue.createElementVNode("view", { class: "ordersn-box" }, [
  49471. vue.createElementVNode(
  49472. "view",
  49473. { class: "num" },
  49474. "订单号:" + vue.toDisplayString(item.orderCode),
  49475. 1
  49476. /* TEXT */
  49477. ),
  49478. vue.createElementVNode("view", { class: "status-box" }, [
  49479. item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
  49480. "text",
  49481. {
  49482. key: 0,
  49483. class: "text info"
  49484. },
  49485. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  49486. 1
  49487. /* TEXT */
  49488. )) : vue.createCommentVNode("v-if", true),
  49489. item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
  49490. "text",
  49491. {
  49492. key: 1,
  49493. class: "text success"
  49494. },
  49495. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  49496. 1
  49497. /* TEXT */
  49498. )) : vue.createCommentVNode("v-if", true),
  49499. item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
  49500. "text",
  49501. {
  49502. key: 2,
  49503. class: "text info"
  49504. },
  49505. vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
  49506. 1
  49507. /* TEXT */
  49508. )) : vue.createCommentVNode("v-if", true)
  49509. ])
  49510. ]),
  49511. vue.createCommentVNode(" 药品列表 "),
  49512. vue.createElementVNode("view", { class: "drug-list" }, [
  49513. item.isPackage != 1 ? (vue.openBlock(true), vue.createElementBlock(
  49514. vue.Fragment,
  49515. { key: 0 },
  49516. vue.renderList(item.items, (subItem, subIndex) => {
  49517. return vue.openBlock(), vue.createElementBlock("view", {
  49518. key: subIndex,
  49519. class: "drug-item"
  49520. }, [
  49521. vue.createElementVNode("view", { class: "img-box" }, [
  49522. vue.createElementVNode("image", {
  49523. src: JSON.parse(subItem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subItem.jsonInfo).image,
  49524. mode: "aspectFill"
  49525. }, null, 8, ["src"])
  49526. ]),
  49527. vue.createElementVNode("view", { class: "drug-info" }, [
  49528. vue.createElementVNode("view", null, [
  49529. vue.createElementVNode(
  49530. "view",
  49531. { class: "name-box ellipsis2" },
  49532. vue.toDisplayString(JSON.parse(subItem.jsonInfo).productName),
  49533. 1
  49534. /* TEXT */
  49535. ),
  49536. vue.createElementVNode(
  49537. "view",
  49538. { class: "spec ellipsis2" },
  49539. vue.toDisplayString(JSON.parse(subItem.jsonInfo).sku),
  49540. 1
  49541. /* TEXT */
  49542. )
  49543. ]),
  49544. vue.createElementVNode("view", { class: "num-box" }, [
  49545. vue.createElementVNode("view", { class: "price" }, [
  49546. vue.createCommentVNode(' <text class="unit">¥</text> '),
  49547. vue.createCommentVNode(' <text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text> ')
  49548. ]),
  49549. item.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
  49550. "view",
  49551. {
  49552. key: 0,
  49553. class: "amount"
  49554. },
  49555. "x" + vue.toDisplayString(JSON.parse(subItem.jsonInfo).num),
  49556. 1
  49557. /* TEXT */
  49558. )) : vue.createCommentVNode("v-if", true)
  49559. ])
  49560. ])
  49561. ]);
  49562. }),
  49563. 128
  49564. /* KEYED_FRAGMENT */
  49565. )) : vue.createCommentVNode("v-if", true),
  49566. vue.createCommentVNode(" 实付金额、按钮 "),
  49567. vue.createElementVNode("view", { class: "bottom-box" }, [
  49568. vue.createElementVNode("view", { class: "amount-paid" }, [
  49569. vue.createElementVNode("text", { class: "label" }, "订单金额:"),
  49570. vue.createElementVNode("view", { class: "price-box" }, [
  49571. vue.createElementVNode("view", { class: "unit" }, "¥"),
  49572. vue.createElementVNode(
  49573. "view",
  49574. { class: "num" },
  49575. vue.toDisplayString(item.payPrice.toFixed(2)),
  49576. 1
  49577. /* TEXT */
  49578. )
  49579. ])
  49580. ]),
  49581. vue.createElementVNode("view", { class: "btn-box" }, [
  49582. vue.createElementVNode("view", {
  49583. class: "btn",
  49584. onClick: ($event) => $options.showDetail(item)
  49585. }, "查看订单", 8, ["onClick"])
  49586. ])
  49587. ])
  49588. ])
  49589. ], 8, ["onClick"]);
  49590. }),
  49591. 128
  49592. /* KEYED_FRAGMENT */
  49593. ))
  49594. ])
  49595. ]),
  49596. _: 1
  49597. /* STABLE */
  49598. }, 8, ["onInit", "onDown", "onUp", "down", "up"])
  49599. ]);
  49600. }
  49601. const Pages_companyStoreOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderList.vue"]]);
  49602. const _sfc_main$2 = {
  49603. data() {
  49604. return {
  49605. payLimitTime: null,
  49606. orderId: null,
  49607. order: {},
  49608. items: []
  49609. };
  49610. },
  49611. onLoad(option) {
  49612. this.orderId = option.orderId;
  49613. },
  49614. onShow() {
  49615. this.getCompanyUserStoreOrderById();
  49616. },
  49617. methods: {
  49618. showPrescribe() {
  49619. var data = { prescribeId: this.order.prescribeId };
  49620. getPrescribeById(data).then(
  49621. (res) => {
  49622. if (res.code == 200) {
  49623. if (res.data.prescribe.prescribeImgUrl != null) {
  49624. var data2 = [];
  49625. data2.push(res.data.prescribe.prescribeImgUrl);
  49626. uni.previewImage({
  49627. current: 0,
  49628. urls: data2
  49629. });
  49630. } else {
  49631. uni.showToast({
  49632. icon: "none",
  49633. title: "电子处方单不存在"
  49634. });
  49635. }
  49636. }
  49637. },
  49638. (err) => {
  49639. }
  49640. );
  49641. },
  49642. getCompanyUserStoreOrderById() {
  49643. var data = { orderId: this.orderId };
  49644. getCompanyUserStoreOrderById(data).then((res) => {
  49645. if (res.code == 200) {
  49646. this.order = res.order;
  49647. this.items = res.items;
  49648. this.payLimitTime = res.payLimitTime;
  49649. this.prescribe = res.prescribe;
  49650. } else {
  49651. uni.showToast({
  49652. icon: "none",
  49653. title: "请求失败"
  49654. });
  49655. }
  49656. });
  49657. },
  49658. showDelivery() {
  49659. uni.navigateTo({
  49660. url: "./storeOrderDelivery?orderId=" + this.orderId
  49661. });
  49662. },
  49663. cancel() {
  49664. var that = this;
  49665. uni.showModal({
  49666. title: "提示",
  49667. content: "确定取消订单吗",
  49668. success: function(res) {
  49669. if (res.confirm) {
  49670. var data = {
  49671. orderId: that.order.orderId
  49672. };
  49673. cancelOrder(data).then((res2) => {
  49674. if (res2.code == 200) {
  49675. that.getMyStoreOrderById();
  49676. uni.$emit("refreshStoreOrder");
  49677. } else {
  49678. uni.showToast({
  49679. icon: "none",
  49680. title: res2.msg
  49681. });
  49682. }
  49683. });
  49684. } else if (res.cancel)
  49685. ;
  49686. }
  49687. });
  49688. },
  49689. finish() {
  49690. var that = this;
  49691. uni.showModal({
  49692. title: "提示",
  49693. content: "确定已收货吗",
  49694. success: function(res) {
  49695. if (res.confirm) {
  49696. var data = {
  49697. orderId: that.orderId
  49698. };
  49699. finishOrder(data).then((res2) => {
  49700. if (res2.code == 200) {
  49701. that.getMyStoreOrderById();
  49702. uni.$emit("refreshStoreOrder");
  49703. } else {
  49704. uni.showToast({
  49705. icon: "none",
  49706. title: res2.msg
  49707. });
  49708. }
  49709. });
  49710. } else if (res.cancel)
  49711. ;
  49712. }
  49713. });
  49714. },
  49715. pay() {
  49716. uni.navigateTo({
  49717. url: "/pages_order/storeOrderPay?orderId=" + this.order.orderId
  49718. });
  49719. },
  49720. payRemain() {
  49721. uni.navigateTo({
  49722. url: "/pages_user/user/paymentOrderRemain?orderId=" + this.order.orderId
  49723. });
  49724. },
  49725. // 复制订单编号
  49726. copyOrderSn(text) {
  49727. uni.setClipboardData({
  49728. data: text,
  49729. success: () => {
  49730. uni.showToast({
  49731. title: "内容已成功复制到剪切板",
  49732. icon: "none"
  49733. });
  49734. }
  49735. });
  49736. },
  49737. // 退货
  49738. refund() {
  49739. uni.navigateTo({
  49740. url: "/pages_order/storeOrderRefundApply?orderId=" + this.orderId
  49741. });
  49742. }
  49743. }
  49744. };
  49745. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  49746. return vue.openBlock(), vue.createElementBlock("view", null, [
  49747. vue.createElementVNode("view", { class: "cont" }, [
  49748. vue.createElementVNode("view", { class: "bg" }),
  49749. vue.createElementVNode("view", { class: "inner" }, [
  49750. vue.createCommentVNode(" 订单状态 "),
  49751. vue.createElementVNode("view", { class: "order-status" }, [
  49752. vue.createCommentVNode(" 待付款 "),
  49753. $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  49754. key: 0,
  49755. class: "inner"
  49756. }, [
  49757. vue.createElementVNode("view", { class: "img-box" }, [
  49758. vue.createElementVNode("image", {
  49759. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
  49760. mode: ""
  49761. })
  49762. ]),
  49763. vue.createElementVNode("view", { class: "status-box" }, [
  49764. vue.createElementVNode("text", { class: "status" }, "待付款"),
  49765. vue.createElementVNode(
  49766. "text",
  49767. { class: "desc" },
  49768. "请在" + vue.toDisplayString($data.payLimitTime) + "前完成支付",
  49769. 1
  49770. /* TEXT */
  49771. )
  49772. ])
  49773. ])) : vue.createCommentVNode("v-if", true),
  49774. vue.createCommentVNode(" 待发货 "),
  49775. $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  49776. key: 1,
  49777. class: "inner"
  49778. }, [
  49779. vue.createElementVNode("view", { class: "img-box" }, [
  49780. vue.createElementVNode("image", {
  49781. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png",
  49782. mode: ""
  49783. })
  49784. ]),
  49785. vue.createElementVNode("view", { class: "status-box" }, [
  49786. vue.createElementVNode("text", { class: "status" }, "待发货"),
  49787. vue.createElementVNode("text", { class: "desc" }, "等待后台发货")
  49788. ])
  49789. ])) : vue.createCommentVNode("v-if", true),
  49790. vue.createCommentVNode(" 已发货、待收货 "),
  49791. $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  49792. key: 2,
  49793. class: "inner"
  49794. }, [
  49795. vue.createElementVNode("view", { class: "img-box" }, [
  49796. vue.createElementVNode("image", {
  49797. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png",
  49798. mode: ""
  49799. })
  49800. ]),
  49801. vue.createElementVNode("view", { class: "status-box" }, [
  49802. vue.createElementVNode("text", { class: "status" }, "待收货"),
  49803. vue.createElementVNode("text", { class: "desc" }, "运输中")
  49804. ])
  49805. ])) : vue.createCommentVNode("v-if", true),
  49806. vue.createCommentVNode(" 已完成 "),
  49807. $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  49808. key: 3,
  49809. class: "inner"
  49810. }, [
  49811. vue.createElementVNode("view", { class: "img-box" }, [
  49812. vue.createElementVNode("image", {
  49813. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
  49814. mode: ""
  49815. })
  49816. ]),
  49817. vue.createElementVNode("view", { class: "status-box" }, [
  49818. vue.createElementVNode("text", { class: "status" }, "已完成"),
  49819. vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成")
  49820. ])
  49821. ])) : vue.createCommentVNode("v-if", true),
  49822. vue.createCommentVNode("交易取消 "),
  49823. $data.order.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
  49824. key: 4,
  49825. class: "inner"
  49826. }, [
  49827. vue.createElementVNode("view", { class: "img-box" }, [
  49828. vue.createElementVNode("image", {
  49829. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
  49830. mode: ""
  49831. })
  49832. ]),
  49833. vue.createElementVNode("view", { class: "status-box" }, [
  49834. vue.createElementVNode("text", { class: "status" }, "交易关闭"),
  49835. vue.createElementVNode("text", { class: "desc" }, "订单已取消")
  49836. ])
  49837. ])) : vue.createCommentVNode("v-if", true),
  49838. $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
  49839. key: 5,
  49840. class: "inner"
  49841. }, [
  49842. vue.createElementVNode("view", { class: "img-box" }, [
  49843. vue.createElementVNode("image", {
  49844. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
  49845. mode: ""
  49846. })
  49847. ]),
  49848. vue.createElementVNode("view", { class: "status-box" }, [
  49849. vue.createElementVNode("text", { class: "status" }, "申请售后"),
  49850. vue.createElementVNode("text", { class: "desc" }, "请等待客服审核")
  49851. ])
  49852. ])) : vue.createCommentVNode("v-if", true),
  49853. $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
  49854. key: 6,
  49855. class: "inner"
  49856. }, [
  49857. vue.createElementVNode("view", { class: "img-box" }, [
  49858. vue.createElementVNode("image", {
  49859. src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
  49860. mode: ""
  49861. })
  49862. ]),
  49863. vue.createElementVNode("view", { class: "status-box" }, [
  49864. vue.createElementVNode("text", { class: "status" }, "退款成功"),
  49865. vue.createElementVNode("text", { class: "desc" }, "已成功退款")
  49866. ])
  49867. ])) : vue.createCommentVNode("v-if", true)
  49868. ]),
  49869. vue.createCommentVNode(" 下单人信息 "),
  49870. $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", {
  49871. key: 0,
  49872. class: "order-placer"
  49873. }, [
  49874. vue.createElementVNode("view", { class: "inner" }, [
  49875. vue.createElementVNode("image", {
  49876. class: "location",
  49877. src: "/static/images/location.png",
  49878. mode: ""
  49879. }),
  49880. vue.createElementVNode("view", { class: "info" }, [
  49881. vue.createElementVNode("view", { class: "name-phone" }, [
  49882. vue.createElementVNode(
  49883. "text",
  49884. { class: "text" },
  49885. vue.toDisplayString($data.order.userName),
  49886. 1
  49887. /* TEXT */
  49888. ),
  49889. $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock(
  49890. "text",
  49891. {
  49892. key: 0,
  49893. class: "text"
  49894. },
  49895. vue.toDisplayString($data.order.userPhone),
  49896. 1
  49897. /* TEXT */
  49898. )) : vue.createCommentVNode("v-if", true)
  49899. ]),
  49900. vue.createElementVNode(
  49901. "view",
  49902. { class: "address ellipsis2" },
  49903. vue.toDisplayString($data.order.userAddress),
  49904. 1
  49905. /* TEXT */
  49906. )
  49907. ])
  49908. ])
  49909. ])) : vue.createCommentVNode("v-if", true),
  49910. vue.createElementVNode("view", { class: "content" }, [
  49911. vue.createCommentVNode(" 药品列表 "),
  49912. vue.createElementVNode("view", { class: "goods-list" }, [
  49913. (vue.openBlock(true), vue.createElementBlock(
  49914. vue.Fragment,
  49915. null,
  49916. vue.renderList($data.items, (item, index2) => {
  49917. return vue.openBlock(), vue.createElementBlock("view", {
  49918. key: index2,
  49919. class: "item"
  49920. }, [
  49921. vue.createElementVNode("view", { class: "img-box" }, [
  49922. vue.createElementVNode("image", {
  49923. src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
  49924. mode: "aspectFill"
  49925. }, null, 8, ["src"])
  49926. ]),
  49927. vue.createElementVNode("view", { class: "info-box" }, [
  49928. vue.createElementVNode("view", null, [
  49929. vue.createElementVNode(
  49930. "view",
  49931. { class: "name-box ellipsis2" },
  49932. vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
  49933. 1
  49934. /* TEXT */
  49935. ),
  49936. vue.createElementVNode(
  49937. "view",
  49938. { class: "spec ellipsis2" },
  49939. vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
  49940. 1
  49941. /* TEXT */
  49942. )
  49943. ]),
  49944. vue.createElementVNode("view", { class: "price-num" }, [
  49945. vue.createElementVNode("view", { class: "price" }, [
  49946. vue.createCommentVNode(' <text class="unit">¥</text> '),
  49947. vue.createCommentVNode(' <text class="num" v-if="JSON.parse(item.jsonInfo).price!=null">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> ')
  49948. ]),
  49949. $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
  49950. "view",
  49951. {
  49952. key: 0,
  49953. class: "num"
  49954. },
  49955. "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
  49956. 1
  49957. /* TEXT */
  49958. )) : vue.createCommentVNode("v-if", true)
  49959. ])
  49960. ])
  49961. ]);
  49962. }),
  49963. 128
  49964. /* KEYED_FRAGMENT */
  49965. )),
  49966. vue.createCommentVNode(" 已优惠、小计 "),
  49967. vue.createElementVNode("view", { class: "sub-total" }, [
  49968. vue.createElementVNode(
  49969. "view",
  49970. { class: "discount" },
  49971. " 订单金额:¥" + vue.toDisplayString($data.order.payPrice),
  49972. 1
  49973. /* TEXT */
  49974. ),
  49975. vue.createCommentVNode(' <text class="label">实付金额:</text>\r\n <view class="price">\r\n <text class="unit">¥</text>\r\n <text class="num">{{order.payMoney}}</text>\r\n </view> ')
  49976. ])
  49977. ]),
  49978. vue.createCommentVNode(" 订单信息 "),
  49979. vue.createElementVNode("view", { class: "order-info" }, [
  49980. vue.createElementVNode("view", { class: "title" }, "订单信息"),
  49981. vue.createElementVNode("view", { class: "item" }, [
  49982. vue.createElementVNode("text", { class: "label" }, "订单编号"),
  49983. vue.createElementVNode("view", { class: "sn-box" }, [
  49984. vue.createElementVNode(
  49985. "text",
  49986. { class: "text" },
  49987. vue.toDisplayString($data.order.orderCode),
  49988. 1
  49989. /* TEXT */
  49990. ),
  49991. vue.createElementVNode("view", {
  49992. class: "copy-btn",
  49993. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode))
  49994. }, "复制")
  49995. ])
  49996. ]),
  49997. vue.createElementVNode("view", { class: "item" }, [
  49998. vue.createElementVNode("text", { class: "label" }, "下单时间"),
  49999. vue.createElementVNode(
  50000. "text",
  50001. { class: "text" },
  50002. vue.toDisplayString($data.order.createTime),
  50003. 1
  50004. /* TEXT */
  50005. )
  50006. ]),
  50007. vue.createElementVNode("view", { class: "item" }, [
  50008. vue.createElementVNode("text", { class: "label" }, "支付方式"),
  50009. $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
  50010. key: 0,
  50011. class: "text"
  50012. }, "微信支付")) : vue.createCommentVNode("v-if", true),
  50013. $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
  50014. key: 1,
  50015. class: "text"
  50016. }, "物流代收")) : vue.createCommentVNode("v-if", true)
  50017. ]),
  50018. vue.createElementVNode("view", { class: "item" }, [
  50019. vue.createElementVNode("text", { class: "label" }, "订单金额"),
  50020. $data.order.totalPrice != null ? (vue.openBlock(), vue.createElementBlock(
  50021. "text",
  50022. {
  50023. key: 0,
  50024. class: "text"
  50025. },
  50026. "¥" + vue.toDisplayString($data.order.totalPrice.toFixed(2)),
  50027. 1
  50028. /* TEXT */
  50029. )) : vue.createCommentVNode("v-if", true)
  50030. ]),
  50031. vue.createElementVNode("view", { class: "item" }, [
  50032. vue.createElementVNode("text", { class: "label" }, "优惠金额"),
  50033. $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
  50034. "text",
  50035. {
  50036. key: 0,
  50037. class: "text"
  50038. },
  50039. "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
  50040. 1
  50041. /* TEXT */
  50042. )) : vue.createCommentVNode("v-if", true)
  50043. ]),
  50044. vue.createElementVNode("view", { class: "item" }, [
  50045. vue.createElementVNode("text", { class: "label" }, "应付金额"),
  50046. $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
  50047. "text",
  50048. {
  50049. key: 0,
  50050. class: "text"
  50051. },
  50052. "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
  50053. 1
  50054. /* TEXT */
  50055. )) : vue.createCommentVNode("v-if", true)
  50056. ]),
  50057. vue.createElementVNode("view", { class: "item" }, [
  50058. vue.createElementVNode("text", { class: "label" }, "支付金额"),
  50059. $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
  50060. "text",
  50061. {
  50062. key: 0,
  50063. class: "text"
  50064. },
  50065. "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
  50066. 1
  50067. /* TEXT */
  50068. )) : vue.createCommentVNode("v-if", true)
  50069. ]),
  50070. vue.createElementVNode("view", { class: "item" }, [
  50071. vue.createElementVNode("text", { class: "label" }, "支付时间"),
  50072. $data.order.payTime != null ? (vue.openBlock(), vue.createElementBlock(
  50073. "text",
  50074. {
  50075. key: 0,
  50076. class: "text"
  50077. },
  50078. vue.toDisplayString($data.order.payTime),
  50079. 1
  50080. /* TEXT */
  50081. )) : vue.createCommentVNode("v-if", true)
  50082. ]),
  50083. vue.createCommentVNode(' <view v-if="order.status >1" class="item">\r\n <text class="label">发货时间</text>\r\n <text class="text"></text>\r\n </view> ')
  50084. ])
  50085. ])
  50086. ])
  50087. ]),
  50088. vue.createCommentVNode(" 按钮 "),
  50089. vue.createElementVNode("view", { class: "btn-box" }, [
  50090. $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", {
  50091. key: 0,
  50092. class: "btn pay",
  50093. onClick: _cache[1] || (_cache[1] = ($event) => $options.showDelivery())
  50094. }, "查看物流")) : vue.createCommentVNode("v-if", true)
  50095. ])
  50096. ]);
  50097. }
  50098. const Pages_companyStoreOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderDetail.vue"]]);
  50099. const _sfc_main$1 = {
  50100. data() {
  50101. return {
  50102. orderId: null,
  50103. deliverySn: null,
  50104. express: {},
  50105. expressList: []
  50106. };
  50107. },
  50108. onLoad(option) {
  50109. this.orderId = option.orderId;
  50110. this.getExpress();
  50111. },
  50112. methods: {
  50113. getExpress() {
  50114. var data = { orderId: this.orderId };
  50115. getExpress(data).then((res) => {
  50116. if (res.code == 200) {
  50117. this.express = res.express;
  50118. this.expressList = res.data;
  50119. this.deliverySn = res.deliverySn;
  50120. } else {
  50121. uni.showToast({
  50122. icon: "none",
  50123. title: "请求失败"
  50124. });
  50125. }
  50126. });
  50127. },
  50128. // 返回上一页
  50129. back() {
  50130. uni.navigateBack();
  50131. },
  50132. // 复制运单号
  50133. copyOrderSn(text) {
  50134. uni.setClipboardData({
  50135. data: text,
  50136. success: () => {
  50137. uni.showToast({
  50138. title: "内容已成功复制到剪切板",
  50139. icon: "none"
  50140. });
  50141. }
  50142. });
  50143. },
  50144. // 拨打电话
  50145. callPhone(phone) {
  50146. uni.makePhoneCall({
  50147. phoneNumber: phone
  50148. });
  50149. }
  50150. }
  50151. };
  50152. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  50153. return vue.openBlock(), vue.createElementBlock("view", null, [
  50154. vue.createElementVNode("view", { class: "top-cont" }, [
  50155. vue.createCommentVNode(" 背景图片 "),
  50156. vue.createElementVNode("view", { class: "bg" }),
  50157. vue.createElementVNode("view", { class: "top-inner" }, [
  50158. vue.createCommentVNode(" 运单号 "),
  50159. vue.createElementVNode("view", { class: "waybill-number" }, [
  50160. vue.createElementVNode("view", { class: "inner" }, [
  50161. vue.createElementVNode("view", { class: "num-box" }, [
  50162. vue.createElementVNode("text", { class: "text" }, "运单号"),
  50163. vue.createElementVNode(
  50164. "text",
  50165. { class: "text" },
  50166. vue.toDisplayString($data.deliverySn),
  50167. 1
  50168. /* TEXT */
  50169. ),
  50170. vue.createElementVNode("view", {
  50171. class: "copy",
  50172. onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.deliverySn))
  50173. }, "复制")
  50174. ]),
  50175. vue.createElementVNode("view", { class: "kf-box" }, [
  50176. vue.createElementVNode(
  50177. "text",
  50178. { class: "text" },
  50179. vue.toDisplayString($data.express.name),
  50180. 1
  50181. /* TEXT */
  50182. ),
  50183. vue.createCommentVNode(' <text class="text">客服电话:95311</text> ')
  50184. ])
  50185. ])
  50186. ]),
  50187. $data.expressList != null ? (vue.openBlock(), vue.createElementBlock("view", {
  50188. key: 0,
  50189. class: "content"
  50190. }, [
  50191. vue.createCommentVNode(" 物流信息 "),
  50192. $data.expressList.Traces != null ? (vue.openBlock(), vue.createElementBlock("view", {
  50193. key: 0,
  50194. class: "refund-steps"
  50195. }, [
  50196. (vue.openBlock(true), vue.createElementBlock(
  50197. vue.Fragment,
  50198. null,
  50199. vue.renderList($data.expressList.Traces, (item, index2) => {
  50200. return vue.openBlock(), vue.createElementBlock("view", {
  50201. key: index2,
  50202. class: "steps"
  50203. }, [
  50204. vue.createElementVNode("view", { class: "title" }, [
  50205. vue.createCommentVNode(' <text v-if="index == 0" class="text black-text">已签收</text> '),
  50206. vue.createCommentVNode(' <text class="text gray-bold">运输中</text> '),
  50207. vue.createCommentVNode(" 左侧灰色圆点 "),
  50208. vue.createElementVNode("view", { class: "dot" }),
  50209. vue.createCommentVNode(" 对号 "),
  50210. vue.createElementVNode("image", {
  50211. class: "img",
  50212. src: "/static/images/complete.png",
  50213. mode: ""
  50214. }),
  50215. vue.createCommentVNode(" 运输中图标 "),
  50216. vue.createElementVNode("image", {
  50217. class: "img",
  50218. src: "/static/images/car40.png",
  50219. mode: ""
  50220. })
  50221. ]),
  50222. vue.createElementVNode(
  50223. "view",
  50224. { class: "desc-text" },
  50225. vue.toDisplayString(item.AcceptStation),
  50226. 1
  50227. /* TEXT */
  50228. ),
  50229. vue.createElementVNode(
  50230. "view",
  50231. { class: "time" },
  50232. vue.toDisplayString(item.AcceptTime),
  50233. 1
  50234. /* TEXT */
  50235. )
  50236. ]);
  50237. }),
  50238. 128
  50239. /* KEYED_FRAGMENT */
  50240. ))
  50241. ])) : vue.createCommentVNode("v-if", true)
  50242. ])) : vue.createCommentVNode("v-if", true)
  50243. ])
  50244. ])
  50245. ]);
  50246. }
  50247. const Pages_companyStoreOrderDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderDelivery.vue"]]);
  50248. __definePage("pages/common/launch", PagesCommonLaunch);
  50249. __definePage("pages/auth/login", PagesAuthLogin);
  50250. __definePage("pages/index/index", PagesIndexIndex);
  50251. __definePage("pages/index/h5", PagesIndexH5);
  50252. __definePage("pages/index/content", PagesIndexContent);
  50253. __definePage("pages/doctor/index", PagesDoctorIndex);
  50254. __definePage("pages/store/index", PagesStoreIndex);
  50255. __definePage("pages/user/index", PagesUserIndex);
  50256. __definePage("pages/TUIKit/TUIPages/TUIConversation/index", PagesTUIKitTUIPagesTUIConversationIndex);
  50257. __definePage("pages/TUIKit/TUIPages/TUIConversation/create", PagesTUIKitTUIPagesTUIConversationCreate);
  50258. __definePage("pages/TUIKit/TUIPages/TUIChat/index", PagesTUIKitTUIPagesTUIChatIndex);
  50259. __definePage("pages/TUIKit/TUIPages/TUIChat/components/message-elements/video-play", PagesTUIKitTUIPagesTUIChatComponentsMessageElementsVideoPlay);
  50260. __definePage("pages_index/testList", Pages_indexTestList);
  50261. __definePage("pages_index/testDetails", Pages_indexTestDetails);
  50262. __definePage("pages_index/test", Pages_indexTest);
  50263. __definePage("pages_index/testResult", Pages_indexTestResult);
  50264. __definePage("pages_index/testResultImg", Pages_indexTestResultImg);
  50265. __definePage("pages_index/articleList", Pages_indexArticleList);
  50266. __definePage("pages_index/articleDetails", Pages_indexArticleDetails);
  50267. __definePage("pages_index/diseaseList", Pages_indexDiseaseList);
  50268. __definePage("pages_index/diseaseDetails", Pages_indexDiseaseDetails);
  50269. __definePage("pages_index/hospitalList", Pages_indexHospitalList);
  50270. __definePage("pages_index/hospitalDetails", Pages_indexHospitalDetails);
  50271. __definePage("pages_index/search", Pages_indexSearch);
  50272. __definePage("pages_index/famousPrescribeList", Pages_indexFamousPrescribeList);
  50273. __definePage("pages_index/famousPrescribeDetails", Pages_indexFamousPrescribeDetails);
  50274. __definePage("pages_index/vesselList", Pages_indexVesselList);
  50275. __definePage("pages_index/vesselDetails", Pages_indexVesselDetails);
  50276. __definePage("pages_index/chineseMedicineList", Pages_indexChineseMedicineList);
  50277. __definePage("pages_index/chineseMedicineDetails", Pages_indexChineseMedicineDetails);
  50278. __definePage("pages_index/medicatedFoodList", Pages_indexMedicatedFoodList);
  50279. __definePage("pages_index/medicatedFoodDetails", Pages_indexMedicatedFoodDetails);
  50280. __definePage("pages_index/questionsList", Pages_indexQuestionsList);
  50281. __definePage("pages_index/questionsDetails", Pages_indexQuestionsDetails);
  50282. __definePage("pages_index/packageList", Pages_indexPackageList);
  50283. __definePage("pages_index/packageDetails", Pages_indexPackageDetails);
  50284. __definePage("pages_index/packageForm", Pages_indexPackageForm);
  50285. __definePage("pages_doctor/doctorArticleList", Pages_doctorDoctorArticleList);
  50286. __definePage("pages_doctor/doctorArticleDetails", Pages_doctorDoctorArticleDetails);
  50287. __definePage("pages_doctor/doctorList", Pages_doctorDoctorList);
  50288. __definePage("pages_doctor/doctorDetails", Pages_doctorDoctorDetails);
  50289. __definePage("pages_doctor/doctorPingList", Pages_doctorDoctorPingList);
  50290. __definePage("pages_doctor/doctorInfo", Pages_doctorDoctorInfo);
  50291. __definePage("pages_doctor/doctorImgs", Pages_doctorDoctorImgs);
  50292. __definePage("pages_order/inquiryOrderList", Pages_orderInquiryOrderList);
  50293. __definePage("pages_order/inquiryOrderDetails", Pages_orderInquiryOrderDetails);
  50294. __definePage("pages_order/inquiryOrderPingList", Pages_orderInquiryOrderPingList);
  50295. __definePage("pages_order/inquirySelect", Pages_orderInquirySelect);
  50296. __definePage("pages_order/inquirySelectType", Pages_orderInquirySelectType);
  50297. __definePage("pages_order/inquiryForm1", Pages_orderInquiryForm1);
  50298. __definePage("pages_order/inquiryForm2_1", Pages_orderInquiryForm2_1);
  50299. __definePage("pages_order/inquiryForm2_2", Pages_orderInquiryForm2_2);
  50300. __definePage("pages_order/inquiryForm3", Pages_orderInquiryForm3);
  50301. __definePage("pages_order/inquiryPay", Pages_orderInquiryPay);
  50302. __definePage("pages_order/inquiryPayment", Pages_orderInquiryPayment);
  50303. __definePage("pages_order/tzPay", Pages_orderTzPay);
  50304. __definePage("pages_order/tzWeixinPay", Pages_orderTzWeixinPay);
  50305. __definePage("pages_order/inquiryOrderPaySuccess", Pages_orderInquiryOrderPaySuccess);
  50306. __definePage("pages_order/storeOrderPaySuccess", Pages_orderStoreOrderPaySuccess);
  50307. __definePage("pages_order/pingOrder", Pages_orderPingOrder);
  50308. __definePage("pages_order/prescribeList", Pages_orderPrescribeList);
  50309. __definePage("pages_order/prescribeDetails", Pages_orderPrescribeDetails);
  50310. __definePage("pages_order/storeOrderList", Pages_orderStoreOrderList);
  50311. __definePage("pages_order/storeOrderDetail", Pages_orderStoreOrderDetail);
  50312. __definePage("pages_order/storeOrderPay", Pages_orderStoreOrderPay);
  50313. __definePage("pages_order/storeOrderPayment", Pages_orderStoreOrderPayment);
  50314. __definePage("pages_order/inquiryOrderReport", Pages_orderInquiryOrderReport);
  50315. __definePage("pages_order/packageOrderDetails", Pages_orderPackageOrderDetails);
  50316. __definePage("pages_order/packageOrderList", Pages_orderPackageOrderList);
  50317. __definePage("pages_order/packageOrderPay", Pages_orderPackageOrderPay);
  50318. __definePage("pages_order/packageOrderPaySuccess", Pages_orderPackageOrderPaySuccess);
  50319. __definePage("pages_order/storeOrderDelivery", Pages_orderStoreOrderDelivery);
  50320. __definePage("pages_order/storeOrderRefundApply", Pages_orderStoreOrderRefundApply);
  50321. __definePage("pages_order/storeOrderRefundSubmit", Pages_orderStoreOrderRefundSubmit);
  50322. __definePage("pages_order/storeOrderRefundList", Pages_orderStoreOrderRefundList);
  50323. __definePage("pages_order/storeOrderRefundDetails", Pages_orderStoreOrderRefundDetails);
  50324. __definePage("pages_order/storeOrderRefundAddDelivery", Pages_orderStoreOrderRefundAddDelivery);
  50325. __definePage("pages_order/packageOtherPayment", Pages_orderPackageOtherPayment);
  50326. __definePage("pages_order/packagePayment", Pages_orderPackagePayment);
  50327. __definePage("pages_user/registerDoctor", Pages_userRegisterDoctor);
  50328. __definePage("pages_user/about", Pages_userAbout);
  50329. __definePage("pages_user/address", Pages_userAddress);
  50330. __definePage("pages_user/addEditAddress", Pages_userAddEditAddress);
  50331. __definePage("pages_user/personInfo", Pages_userPersonInfo);
  50332. __definePage("pages_user/agreement", Pages_userAgreement);
  50333. __definePage("pages_user/myDoctorList", Pages_userMyDoctorList);
  50334. __definePage("pages_user/patient", Pages_userPatient);
  50335. __definePage("pages_user/addEditPatient", Pages_userAddEditPatient);
  50336. __definePage("pages_user/myCouponList", Pages_userMyCouponList);
  50337. __definePage("pages_user/cert", Pages_userCert);
  50338. __definePage("pages_user/followList", Pages_userFollowList);
  50339. __definePage("pages_user/followDetails", Pages_userFollowDetails);
  50340. __definePage("pages_user/drugReportList", Pages_userDrugReportList);
  50341. __definePage("pages_user/drugReportPing", Pages_userDrugReportPing);
  50342. __definePage("pages_user/drugReportDetails", Pages_userDrugReportDetails);
  50343. __definePage("pages_user/doFollow", Pages_userDoFollow);
  50344. __definePage("pages_user/integralGoodsList", Pages_userIntegralGoodsList);
  50345. __definePage("pages_user/integralGoodsDetails", Pages_userIntegralGoodsDetails);
  50346. __definePage("pages_user/integralOrderList", Pages_userIntegralOrderList);
  50347. __definePage("pages_user/integralOrderDetails", Pages_userIntegralOrderDetails);
  50348. __definePage("pages_user/integralLogsList", Pages_userIntegralLogsList);
  50349. __definePage("pages_user/integralOrderPay", Pages_userIntegralOrderPay);
  50350. __definePage("pages_user/integralOrderPaySuccess", Pages_userIntegralOrderPaySuccess);
  50351. __definePage("pages_user/integral", Pages_userIntegral);
  50352. __definePage("pages_company/login", Pages_companyLogin);
  50353. __definePage("pages_company/index", Pages_companyIndex);
  50354. __definePage("pages_company/packageList", Pages_companyPackageList);
  50355. __definePage("pages_company/packageDetails", Pages_companyPackageDetails);
  50356. __definePage("pages_company/packageOrderList", Pages_companyPackageOrderList);
  50357. __definePage("pages_company/packageOrderDetails", Pages_companyPackageOrderDetails);
  50358. __definePage("pages_company/couponList", Pages_companyCouponList);
  50359. __definePage("pages_company/couponDetails", Pages_companyCouponDetails);
  50360. __definePage("pages_company/inquiryOrderList", Pages_companyInquiryOrderList);
  50361. __definePage("pages_company/inquiryOrderDetails", Pages_companyInquiryOrderDetails);
  50362. __definePage("pages_company/storeOrderList", Pages_companyStoreOrderList);
  50363. __definePage("pages_company/storeOrderDetail", Pages_companyStoreOrderDetail);
  50364. __definePage("pages_company/storeOrderDelivery", Pages_companyStoreOrderDelivery);
  50365. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  50366. function getDefaultExportFromCjs(x) {
  50367. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  50368. }
  50369. var timWx = { exports: {} };
  50370. (function(module, exports) {
  50371. !function(e, t) {
  50372. module.exports = t();
  50373. }(commonjsGlobal, function() {
  50374. function e(e2, t2) {
  50375. var n2 = Object.keys(e2);
  50376. if (Object.getOwnPropertySymbols) {
  50377. var o2 = Object.getOwnPropertySymbols(e2);
  50378. t2 && (o2 = o2.filter(function(t3) {
  50379. return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
  50380. })), n2.push.apply(n2, o2);
  50381. }
  50382. return n2;
  50383. }
  50384. function t(t2) {
  50385. for (var n2 = 1; n2 < arguments.length; n2++) {
  50386. var o2 = null != arguments[n2] ? arguments[n2] : {};
  50387. n2 % 2 ? e(Object(o2), true).forEach(function(e2) {
  50388. i(t2, e2, o2[e2]);
  50389. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(o2)) : e(Object(o2)).forEach(function(e2) {
  50390. Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(o2, e2));
  50391. });
  50392. }
  50393. return t2;
  50394. }
  50395. function n(e2) {
  50396. return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
  50397. return typeof e3;
  50398. } : function(e3) {
  50399. return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
  50400. })(e2);
  50401. }
  50402. function o(e2, t2) {
  50403. if (!(e2 instanceof t2))
  50404. throw new TypeError("Cannot call a class as a function");
  50405. }
  50406. function s(e2, t2) {
  50407. for (var n2 = 0; n2 < t2.length; n2++) {
  50408. var o2 = t2[n2];
  50409. o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2);
  50410. }
  50411. }
  50412. function a(e2, t2, n2) {
  50413. return t2 && s(e2.prototype, t2), n2 && s(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2;
  50414. }
  50415. function i(e2, t2, n2) {
  50416. return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
  50417. }
  50418. function r(e2, t2) {
  50419. if ("function" != typeof t2 && null !== t2)
  50420. throw new TypeError("Super expression must either be null or a function");
  50421. e2.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e2, writable: true, configurable: true } }), Object.defineProperty(e2, "prototype", { writable: false }), t2 && c(e2, t2);
  50422. }
  50423. function u(e2) {
  50424. return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function(e3) {
  50425. return e3.__proto__ || Object.getPrototypeOf(e3);
  50426. })(e2);
  50427. }
  50428. function c(e2, t2) {
  50429. return (c = Object.setPrototypeOf || function(e3, t3) {
  50430. return e3.__proto__ = t3, e3;
  50431. })(e2, t2);
  50432. }
  50433. function l() {
  50434. if ("undefined" == typeof Reflect || !Reflect.construct)
  50435. return false;
  50436. if (Reflect.construct.sham)
  50437. return false;
  50438. if ("function" == typeof Proxy)
  50439. return true;
  50440. try {
  50441. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  50442. })), true;
  50443. } catch (e2) {
  50444. return false;
  50445. }
  50446. }
  50447. function d(e2, t2, n2) {
  50448. return (d = l() ? Reflect.construct : function(e3, t3, n3) {
  50449. var o2 = [null];
  50450. o2.push.apply(o2, t3);
  50451. var s2 = new (Function.bind.apply(e3, o2))();
  50452. return n3 && c(s2, n3.prototype), s2;
  50453. }).apply(null, arguments);
  50454. }
  50455. function p(e2) {
  50456. var t2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
  50457. return (p = function(e3) {
  50458. if (null === e3 || (n2 = e3, -1 === Function.toString.call(n2).indexOf("[native code]")))
  50459. return e3;
  50460. var n2;
  50461. if ("function" != typeof e3)
  50462. throw new TypeError("Super expression must either be null or a function");
  50463. if (void 0 !== t2) {
  50464. if (t2.has(e3))
  50465. return t2.get(e3);
  50466. t2.set(e3, o2);
  50467. }
  50468. function o2() {
  50469. return d(e3, arguments, u(this).constructor);
  50470. }
  50471. return o2.prototype = Object.create(e3.prototype, { constructor: { value: o2, enumerable: false, writable: true, configurable: true } }), c(o2, e3);
  50472. })(e2);
  50473. }
  50474. function g(e2, t2) {
  50475. if (null == e2)
  50476. return {};
  50477. var n2, o2, s2 = function(e3, t3) {
  50478. if (null == e3)
  50479. return {};
  50480. var n3, o3, s3 = {}, a3 = Object.keys(e3);
  50481. for (o3 = 0; o3 < a3.length; o3++)
  50482. n3 = a3[o3], t3.indexOf(n3) >= 0 || (s3[n3] = e3[n3]);
  50483. return s3;
  50484. }(e2, t2);
  50485. if (Object.getOwnPropertySymbols) {
  50486. var a2 = Object.getOwnPropertySymbols(e2);
  50487. for (o2 = 0; o2 < a2.length; o2++)
  50488. n2 = a2[o2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (s2[n2] = e2[n2]);
  50489. }
  50490. return s2;
  50491. }
  50492. function h(e2) {
  50493. if (void 0 === e2)
  50494. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  50495. return e2;
  50496. }
  50497. function _(e2, t2) {
  50498. if (t2 && ("object" == typeof t2 || "function" == typeof t2))
  50499. return t2;
  50500. if (void 0 !== t2)
  50501. throw new TypeError("Derived constructors may only return object or undefined");
  50502. return h(e2);
  50503. }
  50504. function f(e2) {
  50505. var t2 = l();
  50506. return function() {
  50507. var n2, o2 = u(e2);
  50508. if (t2) {
  50509. var s2 = u(this).constructor;
  50510. n2 = Reflect.construct(o2, arguments, s2);
  50511. } else
  50512. n2 = o2.apply(this, arguments);
  50513. return _(this, n2);
  50514. };
  50515. }
  50516. function v(e2, t2) {
  50517. return M(e2) || function(e3, t3) {
  50518. var n2 = null == e3 ? null : "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
  50519. if (null == n2)
  50520. return;
  50521. var o2, s2, a2 = [], i2 = true, r2 = false;
  50522. try {
  50523. for (n2 = n2.call(e3); !(i2 = (o2 = n2.next()).done) && (a2.push(o2.value), !t3 || a2.length !== t3); i2 = true)
  50524. ;
  50525. } catch (u2) {
  50526. r2 = true, s2 = u2;
  50527. } finally {
  50528. try {
  50529. i2 || null == n2.return || n2.return();
  50530. } finally {
  50531. if (r2)
  50532. throw s2;
  50533. }
  50534. }
  50535. return a2;
  50536. }(e2, t2) || I(e2, t2) || T();
  50537. }
  50538. function m(e2) {
  50539. return function(e3) {
  50540. if (Array.isArray(e3))
  50541. return C(e3);
  50542. }(e2) || y(e2) || I(e2) || function() {
  50543. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  50544. }();
  50545. }
  50546. function M(e2) {
  50547. if (Array.isArray(e2))
  50548. return e2;
  50549. }
  50550. function y(e2) {
  50551. if ("undefined" != typeof Symbol && null != e2[Symbol.iterator] || null != e2["@@iterator"])
  50552. return Array.from(e2);
  50553. }
  50554. function I(e2, t2) {
  50555. if (e2) {
  50556. if ("string" == typeof e2)
  50557. return C(e2, t2);
  50558. var n2 = Object.prototype.toString.call(e2).slice(8, -1);
  50559. return "Object" === n2 && e2.constructor && (n2 = e2.constructor.name), "Map" === n2 || "Set" === n2 ? Array.from(e2) : "Arguments" === n2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? C(e2, t2) : void 0;
  50560. }
  50561. }
  50562. function C(e2, t2) {
  50563. (null == t2 || t2 > e2.length) && (t2 = e2.length);
  50564. for (var n2 = 0, o2 = new Array(t2); n2 < t2; n2++)
  50565. o2[n2] = e2[n2];
  50566. return o2;
  50567. }
  50568. function T() {
  50569. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  50570. }
  50571. function D(e2, t2) {
  50572. var n2 = "undefined" != typeof Symbol && e2[Symbol.iterator] || e2["@@iterator"];
  50573. if (!n2) {
  50574. if (Array.isArray(e2) || (n2 = I(e2)) || t2 && e2 && "number" == typeof e2.length) {
  50575. n2 && (e2 = n2);
  50576. var o2 = 0, s2 = function() {
  50577. };
  50578. return { s: s2, n: function() {
  50579. return o2 >= e2.length ? { done: true } : { done: false, value: e2[o2++] };
  50580. }, e: function(e3) {
  50581. throw e3;
  50582. }, f: s2 };
  50583. }
  50584. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  50585. }
  50586. var a2, i2 = true, r2 = false;
  50587. return { s: function() {
  50588. n2 = n2.call(e2);
  50589. }, n: function() {
  50590. var e3 = n2.next();
  50591. return i2 = e3.done, e3;
  50592. }, e: function(e3) {
  50593. r2 = true, a2 = e3;
  50594. }, f: function() {
  50595. try {
  50596. i2 || null == n2.return || n2.return();
  50597. } finally {
  50598. if (r2)
  50599. throw a2;
  50600. }
  50601. } };
  50602. }
  50603. var k = { SDK_READY: "sdkStateReady", SDK_NOT_READY: "sdkStateNotReady", SDK_DESTROY: "sdkDestroy", MESSAGE_RECEIVED: "onMessageReceived", MESSAGE_MODIFIED: "onMessageModified", MESSAGE_REVOKED: "onMessageRevoked", MESSAGE_READ_BY_PEER: "onMessageReadByPeer", MESSAGE_READ_RECEIPT_RECEIVED: "onMessageReadReceiptReceived", MESSAGE_EXTENSIONS_UPDATED: "onMessageExtensionsUpdated", MESSAGE_EXTENSIONS_DELETED: "onMessageExtensionsDeleted", CONVERSATION_LIST_UPDATED: "onConversationListUpdated", TOTAL_UNREAD_MESSAGE_COUNT_UPDATED: "onTotalUnreadMessageCountUpdated", CONVERSATION_GROUP_LIST_UPDATED: "onConversationGroupListUpdated", CONVERSATION_IN_GROUP_UPDATED: "onConversationInGroupUpdated", GROUP_LIST_UPDATED: "onGroupListUpdated", GROUP_SYSTEM_NOTICE_RECEIVED: "receiveGroupSystemNotice", GROUP_ATTRIBUTES_UPDATED: "groupAttributesUpdated", GROUP_COUNTER_UPDATED: "onGroupCounterUpdated", TOPIC_CREATED: "onTopicCreated", TOPIC_DELETED: "onTopicDeleted", TOPIC_UPDATED: "onTopicUpdated", PROFILE_UPDATED: "onProfileUpdated", USER_STATUS_UPDATED: "onUserStatusUpdated", BLACKLIST_UPDATED: "blacklistUpdated", FRIEND_LIST_UPDATED: "onFriendListUpdated", FRIEND_GROUP_LIST_UPDATED: "onFriendGroupListUpdated", FRIEND_APPLICATION_LIST_UPDATED: "onFriendApplicationListUpdated", KICKED_OUT: "kickedOut", ERROR: "error", NET_STATE_CHANGE: "netStateChange", SDK_RELOAD: "sdkReload" }, E = { MSG_TEXT: "TIMTextElem", MSG_IMAGE: "TIMImageElem", MSG_SOUND: "TIMSoundElem", MSG_AUDIO: "TIMSoundElem", MSG_FILE: "TIMFileElem", MSG_FACE: "TIMFaceElem", MSG_VIDEO: "TIMVideoFileElem", MSG_GEO: "TIMLocationElem", MSG_LOCATION: "TIMLocationElem", MSG_GRP_TIP: "TIMGroupTipElem", MSG_GRP_SYS_NOTICE: "TIMGroupSystemNoticeElem", MSG_CUSTOM: "TIMCustomElem", MSG_MERGER: "TIMRelayElem", MSG_PRIORITY_HIGH: "High", MSG_PRIORITY_NORMAL: "Normal", MSG_PRIORITY_LOW: "Low", MSG_PRIORITY_LOWEST: "Lowest", CONV_C2C: "C2C", CONV_GROUP: "GROUP", CONV_TOPIC: "TOPIC", CONV_SYSTEM: "@TIM#SYSTEM", CONV_AT_ME: 1, CONV_AT_ALL: 2, CONV_AT_ALL_AT_ME: 3, CONV_MARK_TYPE_STAR: 1, CONV_MARK_TYPE_UNREAD: 2, CONV_MARK_TYPE_FOLD: 4, CONV_MARK_TYPE_HIDE: 8, GRP_PRIVATE: "Private", GRP_WORK: "Private", GRP_PUBLIC: "Public", GRP_CHATROOM: "ChatRoom", GRP_MEETING: "ChatRoom", GRP_AVCHATROOM: "AVChatRoom", GRP_COMMUNITY: "Community", GRP_MBR_ROLE_OWNER: "Owner", GRP_MBR_ROLE_ADMIN: "Admin", GRP_MBR_ROLE_MEMBER: "Member", GRP_MBR_ROLE_CUSTOM: "Custom", GRP_TIP_MBR_JOIN: 1, GRP_TIP_MBR_QUIT: 2, GRP_TIP_MBR_KICKED_OUT: 3, GRP_TIP_MBR_SET_ADMIN: 4, GRP_TIP_MBR_CANCELED_ADMIN: 5, GRP_TIP_GRP_PROFILE_UPDATED: 6, GRP_TIP_MBR_PROFILE_UPDATED: 7, GRP_TIP_BAN_AVCHATROOM_MEMBER: 10, GRP_TIP_UNBAN_AVCHATROOM_MEMBER: 11, MSG_REMIND_ACPT_AND_NOTE: "AcceptAndNotify", MSG_REMIND_ACPT_NOT_NOTE: "AcceptNotNotify", MSG_REMIND_DISCARD: "Discard", GENDER_UNKNOWN: "Gender_Type_Unknown", GENDER_FEMALE: "Gender_Type_Female", GENDER_MALE: "Gender_Type_Male", KICKED_OUT_MULT_ACCOUNT: "multipleAccount", KICKED_OUT_MULT_DEVICE: "multipleDevice", KICKED_OUT_USERSIG_EXPIRED: "userSigExpired", KICKED_OUT_REST_API: "REST_API_Kick", ALLOW_TYPE_ALLOW_ANY: "AllowType_Type_AllowAny", ALLOW_TYPE_NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_TYPE_DENY_ANY: "AllowType_Type_DenyAny", FORBID_TYPE_NONE: "AdminForbid_Type_None", FORBID_TYPE_SEND_OUT: "AdminForbid_Type_SendOut", JOIN_OPTIONS_FREE_ACCESS: "FreeAccess", JOIN_OPTIONS_NEED_PERMISSION: "NeedPermission", JOIN_OPTIONS_DISABLE_APPLY: "DisableApply", JOIN_STATUS_SUCCESS: "JoinedSuccess", JOIN_STATUS_ALREADY_IN_GROUP: "AlreadyInGroup", JOIN_STATUS_WAIT_APPROVAL: "WaitAdminApproval", INVITE_OPTIONS_DISABLE_INVITE: "DisableInvite", INVITE_OPTIONS_NEED_PERMISSION: "NeedPermission", INVITE_OPTIONS_FREE_ACCESS: "FreeAccess", GRP_PROFILE_OWNER_ID: "ownerID", GRP_PROFILE_CREATE_TIME: "createTime", GRP_PROFILE_LAST_INFO_TIME: "lastInfoTime", GRP_PROFILE_MEMBER_NUM: "memberNum", GRP_PROFILE_MAX_MEMBER_NUM: "maxMemberNum", GRP_PROFILE_JOIN_OPTION: "joinOption", GRP_PROFILE_INVITE_OPTION: "inviteOption", GRP_PROFILE_INTRODUCTION: "introduction", GRP_PROFILE_NOTIFICATION: "notification", GRP_PROFILE_MUTE_ALL_MBRS: "muteAllMembers", SNS_ADD_TYPE_SINGLE: "Add_Type_Single", SNS_ADD_TYPE_BOTH: "Add_Type_Both", SNS_DELETE_TYPE_SINGLE: "Delete_Type_Single", SNS_DELETE_TYPE_BOTH: "Delete_Type_Both", SNS_APPLICATION_TYPE_BOTH: "Pendency_Type_Both", SNS_APPLICATION_SENT_TO_ME: "Pendency_Type_ComeIn", SNS_APPLICATION_SENT_BY_ME: "Pendency_Type_SendOut", SNS_APPLICATION_AGREE: "Response_Action_Agree", SNS_APPLICATION_AGREE_AND_ADD: "Response_Action_AgreeAndAdd", SNS_CHECK_TYPE_BOTH: "CheckResult_Type_Both", SNS_CHECK_TYPE_SINGLE: "CheckResult_Type_Single", SNS_TYPE_NO_RELATION: "CheckResult_Type_NoRelation", SNS_TYPE_A_WITH_B: "CheckResult_Type_AWithB", SNS_TYPE_B_WITH_A: "CheckResult_Type_BWithA", SNS_TYPE_BOTH_WAY: "CheckResult_Type_BothWay", NET_STATE_CONNECTED: "connected", NET_STATE_CONNECTING: "connecting", NET_STATE_DISCONNECTED: "disconnected", MSG_AT_ALL: "__kImSDK_MesssageAtALL__", READ_ALL_C2C_MSG: "readAllC2CMessage", READ_ALL_GROUP_MSG: "readAllGroupMessage", READ_ALL_MSG: "readAllMessage", USER_STATUS_UNKNOWN: 0, USER_STATUS_ONLINE: 1, USER_STATUS_OFFLINE: 2, USER_STATUS_UNLOGINED: 3 }, S = function() {
  50604. function e2() {
  50605. o(this, e2), this.cache = [], this.options = null;
  50606. }
  50607. return a(e2, [{ key: "use", value: function(e3) {
  50608. if ("function" != typeof e3)
  50609. throw "middleware must be a function";
  50610. return this.cache.push(e3), this;
  50611. } }, { key: "next", value: function(e3) {
  50612. if (this.middlewares && this.middlewares.length > 0)
  50613. return this.middlewares.shift().call(this, this.options, this.next.bind(this));
  50614. } }, { key: "run", value: function(e3) {
  50615. return this.middlewares = this.cache.map(function(e4) {
  50616. return e4;
  50617. }), this.options = e3, this.next();
  50618. } }]), e2;
  50619. }(), L = function() {
  50620. function e2() {
  50621. var t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
  50622. o(this, e2), this.high = t2, this.low = n2;
  50623. }
  50624. return a(e2, [{ key: "equal", value: function(e3) {
  50625. return null !== e3 && (this.low === e3.low && this.high === e3.high);
  50626. } }, { key: "toString", value: function() {
  50627. var e3 = Number(this.high).toString(16), t2 = Number(this.low).toString(16);
  50628. if (t2.length < 8)
  50629. for (var n2 = 8 - t2.length; n2; )
  50630. t2 = "0" + t2, n2--;
  50631. return e3 + t2;
  50632. } }]), e2;
  50633. }(), A = { TEST: { CHINA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, OVERSEA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp-dev.im.qcloud.com" }, KOREA: { DEFAULT: "wss://wsskr-dev.im.qcloud.com" }, GERMANY: { DEFAULT: "wss://wssger-dev.im.qcloud.com" }, IND: { DEFAULT: "wss://wssind-dev.im.qcloud.com" }, JPN: { DEFAULT: "wss://wssjpn-dev.im.qcloud.com" }, USA: { DEFAULT: "wss://wssusa-dev.im.qcloud.com" } }, PRODUCTION: { CHINA: { DEFAULT: "wss://wss.im.qcloud.com", BACKUP: "wss://wss.tim.qq.com", STAT: "https://events.im.qcloud.com", ANYCAST: "wss://162.14.13.203" }, OVERSEA: { DEFAULT: "wss://wss.im.qcloud.com", BACKUP: "wss://wss.my-imcloud.com", STAT: "https://api.my-imcloud.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp.im.qcloud.com", BACKUP: "wss://wsssgp.my-imcloud.com", STAT: "https://apisgp.my-imcloud.com" }, KOREA: { DEFAULT: "wss://wsskr.im.qcloud.com", BACKUP: "wss://wsskr.my-imcloud.com", STAT: "https://apikr.my-imcloud.com" }, GERMANY: { DEFAULT: "wss://wssger.im.qcloud.com", BACKUP: "wss://wssger.my-imcloud.com", STAT: "https://apiger.my-imcloud.com" }, IND: { DEFAULT: "wss://wssind.my-imcloud.com", BACKUP: "wss://wssind.im.qcloud.com", STAT: "https://apiind.my-imcloud.com" }, JPN: { DEFAULT: "wss://wssjpn.im.qcloud.com", BACKUP: "wss://wssjpn.my-imcloud.com", STAT: "https://apijpn.my-imcloud.com" }, USA: { DEFAULT: "wss://wssusa.im.qcloud.com", BACKUP: "wss://wssusa.my-imcloud.com", STAT: "https://apiusa.my-imcloud.com" } } }, R = { ANDROID: 2, IOS: 3, MAC: 4, WEB: 7, WX_MP: 8, QQ_MP: 9, TT_MP: 10, BAIDU_MP: 11, ALI_MP: 12, IPAD: 13, UNI_NATIVE_APP: 15 }, N = "1.7.3", O = 537048168, G = "CHINA", U = "OVERSEA", P = "SINGAPORE", b = "KOREA", w = "GERMANY", F = "IND", q = "JPN", x = "USA", V = { HOST: { CURRENT: { DEFAULT: "wss://wss.im.qcloud.com", STAT: "https://events.im.qcloud.com" }, setCurrent: function() {
  50634. var e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : G;
  50635. this.CURRENT = A.PRODUCTION[e2];
  50636. } }, NAME: { OPEN_IM: "openim", OPEN_IM_MSG_EXT: "openim_msg_ext_http_svc", GROUP: "group_open_http_svc", GROUP_AVCHATROOM: "group_open_avchatroom_http_svc", GROUP_COMMUNITY: "million_group_open_http_svc", GROUP_ATTR: "group_open_attr_http_svc", FRIEND: "sns", PROFILE: "profile", RECENT_CONTACT: "recentcontact", PIC: "openpic", BIG_GROUP_NO_AUTH: "group_open_http_noauth_svc", BIG_GROUP_LONG_POLLING: "group_open_long_polling_http_svc", BIG_GROUP_LONG_POLLING_NO_AUTH: "group_open_long_polling_http_noauth_svc", IM_OPEN_STAT: "imopenstat", WEB_IM: "webim", IM_COS_SIGN: "im_cos_sign_svr", CUSTOM_UPLOAD: "im_cos_msg", HEARTBEAT: "heartbeat", IM_OPEN_PUSH: "im_open_push", IM_OPEN_STATUS: "im_open_status", IM_LONG_MESSAGE: "im_long_msg", IM_CONFIG_MANAGER: "im_sdk_config_mgr", STAT_SERVICE: "StatSvc", OVERLOAD_PUSH: "OverLoadPush", IM_MSG_AUDIT_MGR: "im_msg_audit_mgr", TUIROOM_SVR: "tui_room_svr", IM_OPEN_TRANSLATE: "im_open_translate" }, CMD: { LOGIN: "wslogin", LOGOUT_LONG_POLL: "longpollinglogout", LOGOUT: "wslogout", HELLO: "wshello", STAT_BACKGROUND: "ws_stat_background", STAT_FOREGROUND: "ws_stat_foreground", SET_TOKEN: "ws_stat_settoken", PORTRAIT_GET: "portrait_get_all", PORTRAIT_SET: "portrait_set", GET_LONG_POLL_ID: "getlongpollingid", LONG_POLL: "longpolling", AVCHATROOM_LONG_POLL: "get_msg", ADD_FRIEND: "friend_add", UPDATE_FRIEND: "friend_update", GET_FRIEND_LIST: "friend_get", GET_FRIEND_PROFILE: "friend_get_specified", DELETE_FRIEND: "friend_delete", CHECK_FRIEND: "friend_check", GET_FRIEND_GROUP_LIST: "group_get", RESPOND_FRIEND_APPLICATION: "friend_response", GET_FRIEND_APPLICATION_LIST: "pendency_get", DELETE_FRIEND_APPLICATION: "pendency_delete", REPORT_FRIEND_APPLICATION: "pendency_report", GET_GROUP_APPLICATION: "get_pendency", CREATE_FRIEND_GROUP: "group_add", DELETE_FRIEND_GROUP: "group_delete", UPDATE_FRIEND_GROUP: "group_update", GET_BLACKLIST: "black_list_get", ADD_BLACKLIST: "black_list_add", DELETE_BLACKLIST: "black_list_delete", CREATE_GROUP: "create_group", GET_JOINED_GROUPS: "get_joined_group_list", SET_GROUP_ATTRIBUTES: "set_group_attr", MODIFY_GROUP_ATTRIBUTES: "modify_group_attr", DELETE_GROUP_ATTRIBUTES: "delete_group_attr", CLEAR_GROUP_ATTRIBUTES: "clear_group_attr", GET_GROUP_ATTRIBUTES: "get_group_attr", SEND_MESSAGE: "sendmsg", REVOKE_C2C_MESSAGE: "msgwithdraw", DELETE_C2C_MESSAGE: "delete_c2c_msg_ramble", MODIFY_C2C_MESSAGE: "modify_c2c_msg", MODIFY_C2C_MESSAGE_EXTENSIONS: "set_key_values", GET_C2C_MESSAGE_EXTENSIONS: "get_key_values", SEND_GROUP_MESSAGE: "send_group_msg", REVOKE_GROUP_MESSAGE: "group_msg_recall", DELETE_GROUP_MESSAGE: "delete_group_ramble_msg_by_seq", MODIFY_GROUP_MESSAGE: "modify_group_msg", MODIFY_GROUP_MESSAGE_EXTENSIONS: "group_set_key_values", GET_GROUP_MESSAGE_EXTENSIONS: "group_get_key_values", GET_GROUP_INFO: "get_group_self_member_info", GET_GROUP_MEMBER_INFO: "get_specified_group_member_info", GET_GROUP_MEMBER_LIST: "get_group_member_info", GET_AVCHATROOM_MEMBER_LIST: "get_members", MARK_AVCHATROOM_MEMBER_INFO: "modify_user_info", QUIT_GROUP: "quit_group", CHANGE_GROUP_OWNER: "change_group_owner", DESTROY_GROUP: "destroy_group", ADD_GROUP_MEMBER: "add_group_member", DELETE_GROUP_MEMBER: "delete_group_member", BAN_AVCHATROOM_MEMBER: "ban_group_member", SEARCH_GROUP_BY_ID: "get_group_public_info", APPLY_JOIN_GROUP: "apply_join_group", HANDLE_APPLY_JOIN_GROUP: "handle_apply_join_group", HANDLE_INVITE_JOIN_GROUP: "handle_invite_join_permission_group", HANDLE_GROUP_INVITATION: "handle_invite_join_group", MODIFY_GROUP_INFO: "modify_group_base_info", MODIFY_GROUP_MEMBER_INFO: "modify_group_member_info", DELETE_GROUP_SYSTEM_MESSAGE: "deletemsg", DELETE_GROUP_AT_TIPS: "deletemsg", GET_GROUP_NOTIFY: "get_group_notify", GET_CONVERSATION_LIST: "get", PAGING_GET_CONVERSATION_LIST: "page_get", DELETE_CONVERSATION: "batch_delete", CLEAR_HISTORY_MESSAGE: "clear_msg", PIN_CONVERSATION: "top", SET_CONVERSATION_CUSTOM_DATA: "mark_contact", MARK_CONVERSATION: "mark_contact", CREATE_CONVERSATION_GROUP: "create_contact_group", DELETE_CONVERSATION_GROUP: "del_contact_group", UPDATE_CONVERSATION_GROUP: "update_contact_group", GET_CONVERSATION_GROUP_LIST: "get_contact_group", GET_MESSAGES: "getmsg", GET_C2C_ROAM_MESSAGES: "getroammsg", SET_C2C_PEER_MUTE_NOTIFICATIONS: "set_c2c_peer_mute_notifications", GET_C2C_PEER_MUTE_NOTIFICATIONS: "get_c2c_peer_mute_notifications", GET_GROUP_ROAM_MESSAGES: "group_msg_get", GET_READ_RECEIPT: "get_group_msg_receipt", GET_READ_RECEIPT_DETAIL: "get_group_msg_receipt_detail", SEND_READ_RECEIPT: "group_msg_receipt", SEND_C2C_READ_RECEIPT: "c2c_msg_read_receipt", SET_C2C_MESSAGE_READ: "msgreaded", GET_PEER_READ_TIME: "get_peer_read_time", SET_GROUP_MESSAGE_READ: "msg_read_report", FILE_READ_AND_WRITE_AUTHKEY: "authkey", FILE_UPLOAD: "pic_up", COS_SIGN: "cos", COS_PRE_SIG: "pre_sig", VIDEO_COVER: "video_cover", TIM_WEB_REPORT_V2: "tim_web_report_v2", BIG_DATA_HALLWAY_AUTH_KEY: "authkey", GET_ONLINE_MEMBER_NUM: "get_online_member_num", ALIVE: "alive", MESSAGE_PUSH: "msg_push", MULTI_MESSAGE_PUSH: "multi_msg_push_ws", MESSAGE_PUSH_ACK: "ws_msg_push_ack", STATUS_FORCE_OFFLINE: "stat_forceoffline", DOWNLOAD_MERGER_MESSAGE: "get_relay_json_msg", UPLOAD_MERGER_MESSAGE: "save_relay_json_msg", FETCH_CLOUD_CONTROL_CONFIG: "fetch_config", PUSHED_CLOUD_CONTROL_CONFIG: "push_configv2", FETCH_COMMERCIAL_CONFIG: "fetch_imsdk_purchase_bitsv2", PUSHED_COMMERCIAL_CONFIG: "push_imsdk_purchase_bitsv2", KICK_OTHER: "KickOther", OVERLOAD_NOTIFY: "notify2", SET_ALL_MESSAGE_READ: "read_all_unread_msg", CREATE_TOPIC: "create_topic", DELETE_TOPIC: "destroy_topic", UPDATE_TOPIC_PROFILE: "modify_topic", GET_TOPIC_LIST: "get_topic", SET_SELF_STATUS: "ws_set_custom_status", GET_USER_STATUS: "ws_get_user_status", SUBSCRIBE_USER_STATUS: "ws_status_subscribe", UNSUBSCRIBE_USER_STATUS: "ws_status_unsubscribe", GET_RPOFANITY_LIST: "get_local_words", TRANSLATE_TEXT: "ws_batch_trans_text", UPDATE_GROUP_COUNTER: "update_group_counter", GET_GROUP_COUNTER: "get_group_counter" }, CHANNEL: { SOCKET: 1, XHR: 2, AUTO: 0 }, NAME_VERSION: { openim: "v4", group_open_http_svc: "v4", sns: "v4", profile: "v4", recentcontact: "v4", openpic: "v4", group_open_http_noauth_svc: "v4", group_open_long_polling_http_svc: "v4", group_open_long_polling_http_noauth_svc: "v4", imopenstat: "v4", im_cos_sign_svr: "v4", im_cos_msg: "v4", webim: "v4", im_open_push: "v4", im_open_status: "v4" } }, B = { SEARCH_MSG: new L(0, Math.pow(2, 0)).toString(), SEARCH_GRP_SNS: new L(0, Math.pow(2, 1)).toString(), AVCHATROOM_HISTORY_MSG: new L(0, Math.pow(2, 2)).toString(), GRP_COMMUNITY: new L(0, Math.pow(2, 3)).toString(), MSG_TO_SPECIFIED_GRP_MBR: new L(0, Math.pow(2, 4)).toString(), AVCHATROOM_MBR_LIST: new L(0, Math.pow(2, 6)).toString(), USER_STATUS: new L(0, Math.pow(2, 7)).toString(), CONV_MARK: new L(0, Math.pow(2, 9)).toString(), CONV_GROUP: new L(0, Math.pow(2, 10)).toString(), AVCHATROOM_BAN_MBR: new L(0, Math.pow(2, 11)).toString(), MSG_EXT: new L(0, Math.pow(2, 13)).toString(), GRP_COUNTER: new L(0, Math.pow(2, 15)).toString() }, H = "c2c_text_message", K = "c2c_custom_message", W = "group_text_message", Y = "group_custom_message", j = "user_profile", z = "group_profile", J = "group_member_profile";
  50637. V.HOST.setCurrent(G);
  50638. var X = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting), Z = X && "function" == typeof wx.createGamePortal, Q = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), $ = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), ee = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), te = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), ne = "undefined" != typeof jd && "function" == typeof jd.getSystemInfoSync, oe = "undefined" != typeof uni && "undefined" == typeof window && "function" == typeof requireNativePlugin, se = "undefined" != typeof uni, ae = X || Q || $ || ee || te || oe || ne, ie = ("undefined" != typeof uni || "undefined" != typeof window) && !ae, re = Q ? qq : $ ? tt : ee ? swan : te ? my : X ? wx : oe ? uni : ne ? jd : {}, ue = ie && window && window.navigator && window.navigator.userAgent || "", ce = /(micromessenger|webbrowser)/i.test(ue), le = /AppleWebKit\/([\d.]+)/i.exec(ue);
  50639. le && parseFloat(le.pop());
  50640. var de, pe, ge = (de = "WEB", ce ? de = "WEB" : Q ? de = "QQ_MP" : $ ? de = "TT_MP" : ee ? de = "BAIDU_MP" : te ? de = "ALI_MP" : X ? de = "WX_MP" : oe && (de = "UNI_NATIVE_APP"), R[de]), he = /iPad/i.test(ue), _e = /iPhone/i.test(ue) && !he, fe = /iPod/i.test(ue), ve = _e || he || fe, me = (pe = ue.match(/OS (\d+)_/i)) && pe[1] ? pe[1] : null, Me = /Android/i.test(ue), ye = function() {
  50641. var e2 = ue.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);
  50642. if (!e2)
  50643. return null;
  50644. var t2 = e2[1] && parseFloat(e2[1]), n2 = e2[2] && parseFloat(e2[2]);
  50645. return t2 && n2 ? parseFloat(e2[1] + "." + e2[2]) : t2 || null;
  50646. }();
  50647. !function() {
  50648. var e2 = ue.match(/Chrome\/(\d+)/);
  50649. e2 && e2[1] && parseFloat(e2[1]);
  50650. }();
  50651. var Ie = /MSIE/.test(ue) || ue.indexOf("Trident") > -1 && ue.indexOf("rv:11.0") > -1, Ce = function() {
  50652. var e2 = /MSIE\s(\d+)\.\d/.exec(ue), t2 = e2 && parseFloat(e2[1]);
  50653. return !t2 && /Trident\/7.0/i.test(ue) && /rv:11.0/.test(ue) && (t2 = 11), t2;
  50654. }();
  50655. !function() {
  50656. var e2 = ue.match(/TBS\/(\d+)/i);
  50657. if (e2 && e2[1])
  50658. e2[1];
  50659. }();
  50660. var Te, De, ke = /Windows/i.test(ue), Ee = /MAC OS X/i.test(ue), Se = ie && "undefined" != typeof Worker && !Ie, Le = Me || ve, Ae = ie && void 0 !== window.tencent_cloud_im_csig_flutter_for_web_25F_cy;
  50661. Te = "undefined" != typeof console ? console : "undefined" != typeof commonjsGlobal && commonjsGlobal.console ? commonjsGlobal.console : "undefined" != typeof window && window.console ? window.console : {};
  50662. for (var Re = function() {
  50663. }, Ne = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], Oe = Ne.length; Oe--; )
  50664. De = Ne[Oe], console[De] || (Te[De] = Re);
  50665. var Ge = Te, Ue = 0, Pe = function() {
  50666. return (/* @__PURE__ */ new Date()).getTime() + Ue;
  50667. }, be = function() {
  50668. Ue = 0;
  50669. }, we = function() {
  50670. return Math.floor(Pe() / 1e3);
  50671. }, Fe = 0;
  50672. function qe() {
  50673. return Kt() ? "%c TIM %c" : "TIM";
  50674. }
  50675. function xe() {
  50676. var e2, t2 = ((e2 = /* @__PURE__ */ new Date()).setTime(Pe()), e2);
  50677. return t2.toLocaleTimeString("en-US", { hour12: false }) + "." + function(e3) {
  50678. var t3;
  50679. switch (e3.toString().length) {
  50680. case 1:
  50681. t3 = "00" + e3;
  50682. break;
  50683. case 2:
  50684. t3 = "0" + e3;
  50685. break;
  50686. default:
  50687. t3 = e3;
  50688. }
  50689. return t3;
  50690. }(t2.getMilliseconds());
  50691. }
  50692. var Ve = { arguments2String: function(e2) {
  50693. var t2 = "";
  50694. if (1 === e2.length)
  50695. t2 = e2[0];
  50696. else
  50697. for (var n2 = 0, o2 = e2.length; n2 < o2; n2++)
  50698. rt(e2[n2]) ? ct(e2[n2]) ? t2 += gt(e2[n2]) : t2 += JSON.stringify(e2[n2]) : t2 += e2[n2], t2 += " ";
  50699. return t2;
  50700. }, _exec: function(e2, t2) {
  50701. Kt() ? Ge[e2](qe(), "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", xe(), t2) : Ge[e2]("".concat(qe(), " ").concat(xe(), " ").concat(t2));
  50702. }, d: function() {
  50703. if (Fe <= -1) {
  50704. var e2 = this.arguments2String(arguments);
  50705. this._exec("debug", e2);
  50706. }
  50707. }, l: function() {
  50708. if (Fe <= 0) {
  50709. var e2 = this.arguments2String(arguments);
  50710. this._exec("log", e2);
  50711. }
  50712. }, log: function() {
  50713. if (Fe <= 0) {
  50714. var e2 = this.arguments2String(arguments);
  50715. this._exec("log", e2);
  50716. }
  50717. }, i: function() {
  50718. if (Fe <= 1) {
  50719. var e2 = this.arguments2String(arguments);
  50720. this._exec("info", e2);
  50721. }
  50722. }, w: function() {
  50723. if (Fe <= 2) {
  50724. var e2 = this.arguments2String(arguments);
  50725. this._exec("warn", e2);
  50726. }
  50727. }, e: function() {
  50728. if (Fe <= 3) {
  50729. var e2 = this.arguments2String(arguments);
  50730. this._exec("error", e2);
  50731. }
  50732. }, setLevel: function(e2) {
  50733. e2 < 4 && this._exec("log", "set level from " + Fe + " to " + e2), Fe = e2;
  50734. }, getLevel: function() {
  50735. return Fe;
  50736. } }, Be = { JPG: 1, JPEG: 1, GIF: 2, PNG: 3, BMP: 4, UNKNOWN: 255 }, He = { NICK: "Tag_Profile_IM_Nick", GENDER: "Tag_Profile_IM_Gender", BIRTHDAY: "Tag_Profile_IM_BirthDay", LOCATION: "Tag_Profile_IM_Location", SELFSIGNATURE: "Tag_Profile_IM_SelfSignature", ALLOWTYPE: "Tag_Profile_IM_AllowType", LANGUAGE: "Tag_Profile_IM_Language", AVATAR: "Tag_Profile_IM_Image", MESSAGESETTINGS: "Tag_Profile_IM_MsgSettings", ADMINFORBIDTYPE: "Tag_Profile_IM_AdminForbidType", LEVEL: "Tag_Profile_IM_Level", ROLE: "Tag_Profile_IM_Role" }, Ke = { UNKNOWN: "Gender_Type_Unknown", FEMALE: "Gender_Type_Female", MALE: "Gender_Type_Male" }, We = { NONE: "AdminForbid_Type_None", SEND_OUT: "AdminForbid_Type_SendOut" }, Ye = { NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_ANY: "AllowType_Type_AllowAny", DENY_ANY: "AllowType_Type_DenyAny" }, je = "JoinedSuccess", ze = "WaitAdminApproval", Je = "@TGS#_", Xe = "@TOPIC#_", Ze = ["url"], Qe = function(e2) {
  50737. return "map" === lt(e2);
  50738. }, $e = function(e2) {
  50739. return "file" === lt(e2);
  50740. }, et = function(e2) {
  50741. return null !== e2 && ("number" == typeof e2 && !isNaN(e2 - 0) || "object" === n(e2) && e2.constructor === Number);
  50742. }, nt = function(e2) {
  50743. return "string" == typeof e2;
  50744. }, ot = function(e2) {
  50745. return null !== e2 && "object" === n(e2);
  50746. }, st = function(e2) {
  50747. if ("object" !== n(e2) || null === e2)
  50748. return false;
  50749. var t2 = Object.getPrototypeOf(e2);
  50750. if (null === t2)
  50751. return true;
  50752. for (var o2 = t2; null !== Object.getPrototypeOf(o2); )
  50753. o2 = Object.getPrototypeOf(o2);
  50754. return t2 === o2;
  50755. }, at = function(e2) {
  50756. return "function" == typeof Array.isArray ? Array.isArray(e2) : "array" === lt(e2);
  50757. }, it = function(e2) {
  50758. return void 0 === e2;
  50759. }, rt = function(e2) {
  50760. return at(e2) || ot(e2);
  50761. }, ut = function(e2) {
  50762. return "function" == typeof e2;
  50763. }, ct = function(e2) {
  50764. return e2 instanceof Error;
  50765. }, lt = function(e2) {
  50766. return Object.prototype.toString.call(e2).match(/^\[object (.*)\]$/)[1].toLowerCase();
  50767. }, dt = function(e2) {
  50768. if ("string" != typeof e2)
  50769. return false;
  50770. var t2 = e2[0];
  50771. return !/[^a-zA-Z0-9]/.test(t2);
  50772. };
  50773. Date.now || (Date.now = function() {
  50774. return (/* @__PURE__ */ new Date()).getTime();
  50775. });
  50776. var pt = function e2(t2, n2, o2, s2) {
  50777. if (!rt(t2) || !rt(n2))
  50778. return 0;
  50779. for (var a2, i2 = 0, r2 = Object.keys(n2), u2 = 0, c2 = r2.length; u2 < c2; u2++)
  50780. if (a2 = r2[u2], !(it(n2[a2]) || o2 && o2.includes(a2)))
  50781. if (rt(t2[a2]) && rt(n2[a2]))
  50782. i2 += e2(t2[a2], n2[a2], o2, s2);
  50783. else {
  50784. if (s2 && s2.includes(n2[a2]))
  50785. continue;
  50786. t2[a2] !== n2[a2] && (t2[a2] = n2[a2], i2 += 1);
  50787. }
  50788. return i2;
  50789. }, gt = function(e2) {
  50790. return JSON.stringify(e2, ["message", "code"]);
  50791. }, ht = function(e2) {
  50792. if (0 === e2.length)
  50793. return 0;
  50794. for (var t2 = 0, n2 = 0, o2 = "undefined" != typeof document && void 0 !== document.characterSet ? document.characterSet : "UTF-8"; void 0 !== e2[t2]; )
  50795. n2 += e2[t2++].charCodeAt[t2] <= 255 ? 1 : false === o2 ? 3 : 2;
  50796. return n2;
  50797. }, _t = function(e2) {
  50798. var t2 = e2 || 99999999;
  50799. return Math.round(Math.random() * t2);
  50800. }, ft = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", vt = ft.length, mt = function(e2, t2) {
  50801. for (var n2 in e2)
  50802. if (e2[n2] === t2)
  50803. return true;
  50804. return false;
  50805. }, Mt = {}, yt = function(e2) {
  50806. return -1 === e2.indexOf("http://") || -1 === e2.indexOf("https://") ? "https://" + e2 : e2.replace(/https|http/, "https");
  50807. }, It = function e2(t2) {
  50808. if (0 === Object.getOwnPropertyNames(t2).length)
  50809. return /* @__PURE__ */ Object.create(null);
  50810. var o2 = Array.isArray(t2) ? [] : /* @__PURE__ */ Object.create(null), s2 = "";
  50811. for (var a2 in t2)
  50812. null !== t2[a2] ? void 0 !== t2[a2] ? (s2 = n(t2[a2]), ["string", "number", "function", "boolean"].indexOf(s2) >= 0 ? o2[a2] = t2[a2] : o2[a2] = e2(t2[a2])) : o2[a2] = void 0 : o2[a2] = null;
  50813. return o2;
  50814. };
  50815. function Ct(e2, t2) {
  50816. if (!at(e2) || !at(t2))
  50817. return false;
  50818. var n2 = false;
  50819. return t2.forEach(function(t3) {
  50820. var o2 = t3.key, s2 = t3.value, a2 = e2.find(function(e3) {
  50821. return e3.key === o2;
  50822. });
  50823. a2 ? a2.value !== s2 && (a2.value = s2, n2 = true) : (e2.push({ key: o2, value: s2 }), n2 = true);
  50824. }), n2;
  50825. }
  50826. var Tt = function(e2) {
  50827. return e2 === E.GRP_AVCHATROOM;
  50828. }, Dt = function(e2) {
  50829. var t2 = e2.type, n2 = e2.groupID;
  50830. return t2 === E.GRP_COMMUNITY || "".concat(n2).startsWith(Je) && !"".concat(n2).includes(Xe);
  50831. }, kt = function(e2) {
  50832. return "".concat(e2).startsWith(Je) && "".concat(e2).includes(Xe);
  50833. }, Et = function(e2) {
  50834. return nt(e2) && e2.slice(0, 3) === E.CONV_C2C;
  50835. }, St = function(e2) {
  50836. return nt(e2) && e2.slice(0, 5) === E.CONV_GROUP;
  50837. }, Lt = function(e2) {
  50838. return nt(e2) && e2 === E.CONV_SYSTEM;
  50839. };
  50840. function At(e2, t2) {
  50841. var n2 = {};
  50842. return Object.keys(e2).forEach(function(o2) {
  50843. n2[o2] = t2(e2[o2], o2);
  50844. }), n2;
  50845. }
  50846. function Rt(e2) {
  50847. return ae ? new Promise(function(t2, n2) {
  50848. re.getImageInfo({ src: e2, success: function(e3) {
  50849. t2({ width: e3.width, height: e3.height });
  50850. }, fail: function() {
  50851. t2({ width: 0, height: 0 });
  50852. } });
  50853. }) : Ie && 9 === Ce ? Promise.resolve({ width: 0, height: 0 }) : new Promise(function(t2, n2) {
  50854. var o2 = new Image();
  50855. o2.onload = function() {
  50856. t2({ width: this.width, height: this.height }), o2 = null;
  50857. }, o2.onerror = function() {
  50858. t2({ width: 0, height: 0 }), o2 = null;
  50859. }, o2.src = e2;
  50860. });
  50861. }
  50862. function Nt() {
  50863. function e2() {
  50864. return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
  50865. }
  50866. return "".concat(e2() + e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2());
  50867. }
  50868. function Ot() {
  50869. var e2 = "unknown";
  50870. if (Ee && (e2 = "mac"), ke && (e2 = "windows"), ve && (e2 = "ios"), Me && (e2 = "android"), ae)
  50871. try {
  50872. var t2 = re.getSystemInfoSync().platform;
  50873. void 0 !== t2 && (e2 = t2);
  50874. } catch (n2) {
  50875. }
  50876. return e2;
  50877. }
  50878. function Gt(e2, t2) {
  50879. e2 = e2.split("."), t2 = t2.split(".");
  50880. for (var n2 = Math.max(e2.length, t2.length); e2.length < n2; )
  50881. e2.push("0");
  50882. for (; t2.length < n2; )
  50883. t2.push("0");
  50884. for (var o2 = 0; o2 < n2; o2++) {
  50885. var s2 = parseInt(e2[o2]), a2 = parseInt(t2[o2]);
  50886. if (s2 > a2)
  50887. return 1;
  50888. if (s2 < a2)
  50889. return -1;
  50890. }
  50891. return 0;
  50892. }
  50893. function Ut(e2) {
  50894. var t2 = e2.originUrl, n2 = void 0 === t2 ? void 0 : t2, o2 = e2.originWidth, s2 = e2.originHeight, a2 = e2.min, i2 = void 0 === a2 ? 198 : a2, r2 = parseInt(o2), u2 = parseInt(s2), c2 = { url: void 0, width: 0, height: 0 };
  50895. if ((r2 <= u2 ? r2 : u2) <= i2)
  50896. c2.url = n2, c2.width = r2, c2.height = u2;
  50897. else {
  50898. u2 <= r2 ? (c2.width = Math.ceil(r2 * i2 / u2), c2.height = i2) : (c2.width = i2, c2.height = Math.ceil(u2 * i2 / r2));
  50899. var l2 = n2 && n2.indexOf("?") > -1 ? "".concat(n2, "&") : "".concat(n2, "?");
  50900. c2.url = "".concat(l2, 198 === i2 ? "imageView2/3/w/198/h/198" : "imageView2/3/w/720/h/720");
  50901. }
  50902. return it(n2) ? (c2.url, g(c2, Ze)) : c2;
  50903. }
  50904. function Pt(e2) {
  50905. var t2 = e2[2];
  50906. e2[2] = e2[1], e2[1] = t2;
  50907. for (var n2 = 0; n2 < e2.length; n2++)
  50908. e2[n2].setType(n2);
  50909. }
  50910. function bt(e2) {
  50911. var t2 = e2.servcmd;
  50912. return t2.slice(t2.indexOf(".") + 1);
  50913. }
  50914. function wt(e2, t2) {
  50915. return Math.round(Number(e2) * Math.pow(10, t2)) / Math.pow(10, t2);
  50916. }
  50917. function Ft(e2, t2) {
  50918. return e2.includes(t2);
  50919. }
  50920. function qt(e2, t2) {
  50921. return e2.includes(t2);
  50922. }
  50923. function xt(e2) {
  50924. return e2.split(Xe)[0];
  50925. }
  50926. var Vt = function(e2, t2, n2) {
  50927. if (it(t2))
  50928. return "";
  50929. switch (e2) {
  50930. case E.MSG_TEXT:
  50931. return t2.text;
  50932. case E.MSG_IMAGE:
  50933. return n2 ? "[Image]" : "[图片]";
  50934. case E.MSG_LOCATION:
  50935. return n2 ? "[Location]" : "[位置]";
  50936. case E.MSG_AUDIO:
  50937. return n2 ? "[Voice]" : "[语音]";
  50938. case E.MSG_VIDEO:
  50939. return n2 ? "[Video]" : "[视频]";
  50940. case E.MSG_FILE:
  50941. return n2 ? "[File]" : "[文件]";
  50942. case E.MSG_CUSTOM:
  50943. return n2 ? "[Custom Messages]" : "[自定义消息]";
  50944. case E.MSG_GRP_TIP:
  50945. return n2 ? "[Group Notification]" : "[群提示消息]";
  50946. case E.MSG_GRP_SYS_NOTICE:
  50947. return n2 ? "[Group System Message]" : "[群系统通知]";
  50948. case E.MSG_FACE:
  50949. return n2 ? "[Animated Sticker]" : "[动画表情]";
  50950. case E.MSG_MERGER:
  50951. return n2 ? "[Chat Record]" : "[聊天记录]";
  50952. default:
  50953. return "";
  50954. }
  50955. };
  50956. function Bt(e2) {
  50957. return e2 === E.MSG_TEXT || e2 === E.MSG_CUSTOM || e2 === E.MSG_LOCATION || e2 === E.MSG_FACE;
  50958. }
  50959. function Ht(e2) {
  50960. var t2 = [];
  50961. if (!nt(e2))
  50962. return t2;
  50963. var n2 = e2.length;
  50964. if (0 === n2)
  50965. return t2;
  50966. for (var o2 = n2 - 1; o2 >= 0; o2--)
  50967. "1" === e2[o2] && t2.push(Math.pow(2, n2 - o2 - 1));
  50968. return t2;
  50969. }
  50970. function Kt() {
  50971. return !Ie && !ae;
  50972. }
  50973. function Wt(e2) {
  50974. return "the length of userIDList cannot exceed ".concat(e2);
  50975. }
  50976. function Yt(e2, t2) {
  50977. if (e2) {
  50978. var n2 = e2;
  50979. return t2 && (e2.startsWith("http://") ? n2 = e2.replace(/^http:\/\/[^/]+/, t2) : e2.startsWith("https://") && (n2 = e2.replace(/^https:\/\/[^/]+/, t2))), n2;
  50980. }
  50981. }
  50982. var jt = Object.prototype.hasOwnProperty;
  50983. function zt(e2) {
  50984. if (null == e2)
  50985. return true;
  50986. if ("boolean" == typeof e2)
  50987. return false;
  50988. if ("number" == typeof e2)
  50989. return 0 === e2;
  50990. if ("string" == typeof e2)
  50991. return 0 === e2.length;
  50992. if ("function" == typeof e2)
  50993. return 0 === e2.length;
  50994. if (Array.isArray(e2))
  50995. return 0 === e2.length;
  50996. if (e2 instanceof Error)
  50997. return "" === e2.message;
  50998. if (st(e2)) {
  50999. for (var t2 in e2)
  51000. if (jt.call(e2, t2))
  51001. return false;
  51002. return true;
  51003. }
  51004. return !(!Qe(e2) && (n2 = e2, "set" !== lt(n2)) && !$e(e2)) && 0 === e2.size;
  51005. var n2;
  51006. }
  51007. function Jt(e2, t2, n2) {
  51008. if (void 0 === t2)
  51009. return true;
  51010. var o2 = true;
  51011. if (st(t2))
  51012. Object.keys(t2).forEach(function(s3) {
  51013. var a2 = 1 === e2.length ? e2[0][s3] : void 0;
  51014. o2 = !!Xt(a2, t2[s3], n2, s3) && o2;
  51015. });
  51016. else if (at(t2))
  51017. for (var s2 = 0; s2 < t2.length; s2++)
  51018. o2 = !!Xt(e2[s2], t2[s2], n2, t2[s2].name) && o2;
  51019. if (o2)
  51020. return o2;
  51021. throw new Error("Params validate failed.");
  51022. }
  51023. function Xt(e2, t2, n2, o2) {
  51024. if (void 0 === t2)
  51025. return true;
  51026. var s2 = true;
  51027. if (t2.required && zt(e2) && (Ve.e("[".concat(n2, '] Missing required params: "').concat(o2, '".')), s2 = false), !zt(e2)) {
  51028. var a2 = lt(e2), i2 = t2.type.toLowerCase();
  51029. a2 !== i2 && ("asyncfunction" === a2 && "function" === i2 || (Ve.e("[".concat(n2, '] Invalid params: type check failed for "').concat(o2, '".Expected ').concat(t2.type, ".")), s2 = false));
  51030. }
  51031. return t2.validator && !t2.validator(e2) && (Ve.e("[".concat(n2, "] Invalid params: custom validator check failed for params.")), s2 = false), s2;
  51032. }
  51033. var Zt, Qt = { UNSEND: "unSend", SUCCESS: "success", FAIL: "fail" }, $t = { NOT_START: "notStart", PENDING: "pending", RESOLVED: "resolved", REJECTED: "rejected" }, en = function(e2) {
  51034. if (!e2)
  51035. return false;
  51036. if (Et(e2) || St(e2) || Lt(e2))
  51037. return true;
  51038. var t2 = Sn("InvalidConversationID", e2);
  51039. return t2 && Ve.w(t2), false;
  51040. }, tn = function(e2) {
  51041. "" !== e2.desc && "" !== Sn("API_REFER") && Ve.w("[".concat(e2.api, "] | ").concat(e2.param, " | ").concat(e2.desc, ", ").concat(Sn("API_REFER")).concat(e2.api));
  51042. }, nn = function() {
  51043. return Sn("StringRequiredLog");
  51044. }, on = function(e2) {
  51045. return Sn("NonEmptyStringRequiredLog", e2);
  51046. }, sn = function() {
  51047. return Sn("NumberRequiredLog");
  51048. }, an = function() {
  51049. return Sn("UndefinedNotAllowedLog");
  51050. }, rn = function() {
  51051. return Sn("FileRequiredLog");
  51052. }, un = function() {
  51053. return Sn("FunctionRequiredLog");
  51054. }, cn = function() {
  51055. return Sn("ArrayRequiredLog");
  51056. }, ln = function() {
  51057. return Sn("NonEmptyArrayLog");
  51058. }, dn = function() {
  51059. return Sn("CallbackMissingLog");
  51060. }, pn = function() {
  51061. return Sn("PositiveIntegerRequiredLog");
  51062. }, gn = function(e2, t2) {
  51063. return Sn("StringNotLongerThanLog", e2, t2);
  51064. }, hn = function(e2, t2) {
  51065. return Sn("NumberLessThanLog", e2, t2);
  51066. }, _n = function(e2) {
  51067. return Sn("KeyValueStringRequiredLog", e2);
  51068. }, fn = function() {
  51069. return Sn("PlainObjectRequiredLog");
  51070. }, vn = function() {
  51071. return Sn("NonEmptyContentRequiredLog");
  51072. }, mn = function() {
  51073. return Sn("FileNotSelectedLog");
  51074. }, Mn = function() {
  51075. return Sn("MessageInstanceRequiredLog");
  51076. }, yn = function() {
  51077. return Sn("NonAnonymousFunctionLog");
  51078. }, In = function() {
  51079. return Sn("MessageExtensionNotAvailableLog");
  51080. }, Cn = { type: "String", required: true }, Tn = { type: "Array", required: true }, Dn = { type: "Object", required: true }, kn = { type: "Boolean", required: true }, En = { type: "number", required: true }, Sn = null, Ln = { hookGetAPITips: function(e2) {
  51081. Sn = e2;
  51082. }, login: { userID: Cn, userSig: Cn }, addToBlacklist: { userIDList: Tn }, removeFromBlacklist: { userIDList: Tn }, on: [{ name: "eventName", type: "String", validator: function(e2) {
  51083. return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "on", param: "eventName", desc: on("eventName") }), false);
  51084. } }, { name: "handler", type: "Function", validator: function(e2) {
  51085. return "function" != typeof e2 ? (tn({ api: "on", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "on", param: "handler", desc: yn() }), true);
  51086. } }], once: [{ name: "eventName", type: "String", validator: function(e2) {
  51087. return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "once", param: "eventName", desc: on("eventName") }), false);
  51088. } }, { name: "handler", type: "Function", validator: function(e2) {
  51089. return "function" != typeof e2 ? (tn({ api: "once", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "once", param: "handler", desc: yn() }), true);
  51090. } }], off: [{ name: "eventName", type: "String", validator: function(e2) {
  51091. return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "off", param: "eventName", desc: on("eventName") }), false);
  51092. } }, { name: "handler", type: "Function", validator: function(e2) {
  51093. return "function" != typeof e2 ? (tn({ api: "off", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "off", param: "handler", desc: yn() }), true);
  51094. } }], sendMessage: [t({ name: "message" }, Dn)], setMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
  51095. return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "setMessageExtensions", param: "message", desc: In() }), false);
  51096. } }), t({ name: "extensions" }, Tn)], getMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
  51097. return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "getMessageExtensions", param: "message", desc: In() }), false);
  51098. } })], deleteMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
  51099. return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "deleteMessageExtensions", param: "message", desc: In() }), false);
  51100. } })], getMessageList: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
  51101. return en(e2);
  51102. } }), nextReqMessageID: { type: "String" }, count: { type: "Number", validator: function(e2) {
  51103. return !(!it(e2) && !/^[1-9][0-9]*$/.test(e2)) || (tn({ api: "getMessageList", param: "count", desc: pn() }), false);
  51104. } } }, getMessageListHopping: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
  51105. return en(e2);
  51106. } }), sequence: { type: "Number" }, time: { type: "Number" }, direction: { type: "Number", validator: function(e2) {
  51107. return !(!it(e2) && 0 !== e2 && 1 !== e2) || (tn({ api: "getMessageListHopping", param: "direction", desc: Sn("0Or1RequiredLog") }), false);
  51108. } }, count: { type: "Number", validator: function(e2) {
  51109. return !(!it(e2) && !/^[1-9][0-9]*$/.test(e2)) || (tn({ api: "getMessageListHopping", param: "count", desc: pn }), false);
  51110. } } }, setMessageRead: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
  51111. return en(e2);
  51112. } }) }, setAllMessageRead: { scope: { type: "String", required: false, validator: function(e2) {
  51113. return !e2 || -1 !== [E.READ_ALL_C2C_MSG, E.READ_ALL_GROUP_MSG, E.READ_ALL_MSG].indexOf(e2) || (tn({ api: "setAllMessageRead", param: "scope", desc: "TIM.TYPES.READ_ALL_C2C_MSG or TIM.TYPES.READ_ALL_GROUP_MSG or TIM.TYPES.READ_ALL_MSG required" }), false);
  51114. } } }, getConversationProfile: [t(t({ name: "conversationID" }, Cn), {}, { validator: function(e2) {
  51115. return en(e2);
  51116. } })], clearHistoryMessage: [t(t({ name: "conversationID" }, Cn), {}, { validator: function(e2) {
  51117. return en(e2);
  51118. } })], pinConversation: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
  51119. return en(e2);
  51120. } }), isPinned: t({}, kn) }, setConversationCustomData: { conversationIDList: t({}, Tn), customData: { type: "String", validator: function(e2) {
  51121. return nt(e2) ? !(e2.length > 256) || (tn({ api: "setConversationCustomData", param: "customData", desc: gn("customData", 256) }), false) : (tn({ api: "setConversationCustomData", param: "customData", desc: nn() }), false);
  51122. } } }, markConversation: { conversationIDList: t({}, Tn), markType: { type: "number", validator: function(e2) {
  51123. return et(e2) ? e2 <= 0 ? (tn({ api: "markConversation", param: "markType", desc: (t2 = "markType", n2 = 0, Sn("NumberGreaterThanLog", t2, n2)) }), false) : !(e2 >= Math.pow(2, 64)) || (tn({ api: "markConversation", param: "markType", desc: hn("markType", "Math.pow(2,64)") }), false) : (tn({ api: "markConversation", param: "markType", desc: sn() }), false);
  51124. var t2, n2;
  51125. } }, enableMark: t({}, kn) }, createConversationGroup: { conversationIDList: t({}, Tn), groupName: t(t({}, Cn), {}, { validator: function(e2) {
  51126. return !!e2 && (!(e2.length > 32) || (tn({ api: "createConversationGroup", param: "groupName", desc: gn("groupName", 32) }), false));
  51127. } }) }, deleteConversationGroup: [t({ name: "groupName" }, Cn)], renameConversationGroup: { oldName: t({}, Cn), newName: t(t({}, Cn), {}, { validator: function(e2) {
  51128. return !!e2 && (!(e2.length > 32) || (tn({ api: "renameConversationGroup", param: "newName", desc: gn("newName", 32) }), false));
  51129. } }) }, addConversationsToGroup: { conversationIDList: t({}, Tn), groupName: t({}, Cn) }, deleteConversationsFromGroup: { conversationIDList: t({}, Tn), groupName: t({}, Cn) }, getGroupList: { groupProfileFilter: { type: "Array" } }, getGroupProfile: { groupID: Cn, groupCustomFieldFilter: { type: "Array" }, memberCustomFieldFilter: { type: "Array" } }, getGroupProfileAdvance: { groupIDList: Tn }, createGroup: { name: Cn }, joinGroup: { groupID: Cn, type: { type: "String" }, applyMessage: { type: "String" } }, quitGroup: [t({ name: "groupID" }, Cn)], handleApplication: { message: Dn, handleAction: Cn, handleMessage: { type: "String" } }, changeGroupOwner: { groupID: Cn, newOwnerID: Cn }, updateGroupProfile: { groupID: Cn, muteAllMembers: { type: "Boolean" } }, dismissGroup: [t({ name: "groupID" }, Cn)], searchGroupByID: [t({ name: "groupID" }, Cn)], initGroupAttributes: { groupID: Cn, groupAttributes: t(t({}, Dn), {}, { validator: function(e2) {
  51130. var t2 = true;
  51131. return Object.keys(e2).forEach(function(n2) {
  51132. if (!nt(e2[n2]))
  51133. return tn({ api: "initGroupAttributes", param: "groupAttributes", desc: _n("value") }), t2 = false;
  51134. }), t2;
  51135. } }) }, setGroupAttributes: { groupID: Cn, groupAttributes: t(t({}, Dn), {}, { validator: function(e2) {
  51136. var t2 = true;
  51137. return Object.keys(e2).forEach(function(n2) {
  51138. if (!nt(e2[n2]))
  51139. return tn({ api: "setGroupAttributes", param: "groupAttributes", desc: _n("value") }), t2 = false;
  51140. }), t2;
  51141. } }) }, deleteGroupAttributes: { groupID: Cn, keyList: { type: "Array", validator: function(e2) {
  51142. if (it(e2) || !at(e2))
  51143. return tn({ api: "deleteGroupAttributes", param: "keyList", desc: cn() }), false;
  51144. if (!zt(e2)) {
  51145. var t2 = true;
  51146. return e2.forEach(function(e3) {
  51147. if (!nt(e3))
  51148. return tn({ api: "deleteGroupAttributes", param: "keyList", desc: Sn("StringArrayRequiredLog") }), t2 = false;
  51149. }), t2;
  51150. }
  51151. return true;
  51152. } } }, getGroupAttributes: { groupID: Cn, keyList: { type: "Array", validator: function(e2) {
  51153. if (it(e2) || !at(e2))
  51154. return tn({ api: "getGroupAttributes", param: "keyList", desc: cn() }), false;
  51155. if (!zt(e2)) {
  51156. var t2 = true;
  51157. return e2.forEach(function(e3) {
  51158. if (!nt(e3))
  51159. return tn({ api: "getGroupAttributes", param: "keyList", desc: _n("key") }), t2 = false;
  51160. }), t2;
  51161. }
  51162. return true;
  51163. } } }, setGroupCounters: { groupID: Cn, counters: Dn }, increaseGroupCounter: { groupID: Cn, key: Cn, value: En }, decreaseGroupCounter: { groupID: Cn, key: Cn, value: En }, getGroupCounters: { groupID: Cn }, getGroupMemberList: { groupID: Cn, count: { type: "Number" } }, getGroupMemberProfile: { groupID: Cn, userIDList: Tn, memberCustomFieldFilter: { type: "Array" } }, addGroupMember: { groupID: Cn, userIDList: Tn }, setGroupMemberRole: { groupID: Cn, userID: Cn, role: Cn }, setGroupMemberMuteTime: { groupID: Cn, userID: Cn, muteTime: { type: "Number", validator: function(e2) {
  51164. return e2 >= 0;
  51165. } } }, setGroupMemberNameCard: { groupID: Cn, userID: { type: "String" }, nameCard: { type: "String", validator: function(e2) {
  51166. return nt(e2) ? (e2.length, true) : (tn({ api: "setGroupMemberNameCard", param: "nameCard", desc: nn() }), false);
  51167. } } }, setGroupMemberCustomField: { groupID: Cn, userID: { type: "String" }, memberCustomField: Tn }, deleteGroupMember: { groupID: Cn }, markGroupMemberList: { groupID: Cn, markType: { type: "number", validator: function(e2) {
  51168. return et(e2) ? !(e2 < 1e3) || (tn({ api: "markGroupMemberList", param: "markType", desc: (t2 = "markType", n2 = 1e3, Sn("NumberGreaterOrEqualLog", t2, n2)) }), false) : (tn({ api: "markGroupMemberList", param: "markType", desc: sn() }), false);
  51169. var t2, n2;
  51170. } }, userIDList: t({}, Tn), enableMark: t({}, kn) }, createTextMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51171. return st(e2) ? nt(e2.text) ? 0 !== e2.text.length || (tn({ api: "createTextMessage", param: "payload.text", desc: vn() }), false) : (tn({ api: "createTextMessage", param: "payload.text", desc: nn() }), false) : (tn({ api: "createTextMessage", param: "payload", desc: fn() }), false);
  51172. } }) }, createTextAtMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51173. return st(e2) ? nt(e2.text) ? 0 === e2.text.length ? (tn({ api: "createTextAtMessage", param: "payload.text", desc: vn() }), false) : !(e2.atUserList && !at(e2.atUserList)) || (tn({ api: "createTextAtMessage", param: "payload.atUserList", desc: cn() }), false) : (tn({ api: "createTextAtMessage", param: "payload.text", desc: nn() }), false) : (tn({ api: "createTextAtMessage", param: "payload", desc: fn() }), false);
  51174. } }) }, createCustomMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51175. return st(e2) ? e2.data && !nt(e2.data) ? (tn({ api: "createCustomMessage", param: "payload.data", desc: nn() }), false) : e2.description && !nt(e2.description) ? (tn({ api: "createCustomMessage", param: "payload.description", desc: nn() }), false) : !(e2.extension && !nt(e2.extension)) || (tn({ api: "createCustomMessage", param: "payload.extension", desc: nn() }), false) : (tn({ api: "createCustomMessage", param: "payload", desc: fn() }), false);
  51176. } }) }, createImageMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51177. if (!st(e2))
  51178. return tn({ api: "createImageMessage", param: "payload", desc: fn() }), false;
  51179. if (it(e2.file))
  51180. return tn({ api: "createImageMessage", param: "payload.file", desc: an() }), false;
  51181. if (ie) {
  51182. if (!(e2.file instanceof HTMLInputElement || $e(e2.file)))
  51183. return st(e2.file) && "undefined" != typeof uni ? 0 !== e2.file.tempFilePaths.length && 0 !== e2.file.tempFiles.length || (tn({ api: "createImageMessage", param: "payload.file", desc: mn() }), false) : (tn({ api: "createImageMessage", param: "payload.file", desc: rn() }), false);
  51184. if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length)
  51185. return tn({ api: "createImageMessage", param: "payload.file", desc: mn() }), false;
  51186. }
  51187. return true;
  51188. }, onProgress: { type: "Function", required: false, validator: function(e2) {
  51189. return it(e2) && tn({ api: "createImageMessage", param: "onProgress", desc: dn() }), true;
  51190. } } }) }, createAudioMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51191. return !!st(e2) || (tn({ api: "createAudioMessage", param: "payload", desc: fn() }), false);
  51192. } }), onProgress: { type: "Function", required: false, validator: function(e2) {
  51193. return it(e2) && tn({ api: "createAudioMessage", param: "onProgress", desc: dn() }), true;
  51194. } } }, createVideoMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51195. if (!st(e2))
  51196. return tn({ api: "createVideoMessage", param: "payload", desc: fn() }), false;
  51197. if (it(e2.file))
  51198. return tn({ api: "createVideoMessage", param: "payload.file", desc: an() }), false;
  51199. if (ie) {
  51200. if (!(e2.file instanceof HTMLInputElement || $e(e2.file)))
  51201. return st(e2.file) && "undefined" != typeof uni ? !!$e(e2.file.tempFile) || (tn({ api: "createVideoMessage", param: "payload.file", desc: mn() }), false) : (tn({ api: "createVideoMessage", param: "payload.file", desc: rn() }), false);
  51202. if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length)
  51203. return tn({ api: "createVideoMessage", param: "payload.file", desc: mn() }), false;
  51204. }
  51205. return true;
  51206. } }), onProgress: { type: "Function", required: false, validator: function(e2) {
  51207. return it(e2) && tn({ api: "createVideoMessage", param: "onProgress", desc: dn() }), true;
  51208. } } }, createFaceMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51209. return st(e2) ? et(e2.index) ? !!nt(e2.data) || (tn({ api: "createFaceMessage", param: "payload.data", desc: nn() }), false) : (tn({ api: "createFaceMessage", param: "payload.index", desc: sn() }), false) : (tn({ api: "createFaceMessage", param: "payload", desc: fn() }), false);
  51210. } }) }, createFileMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51211. if (!st(e2))
  51212. return tn({ api: "createFileMessage", param: "payload", desc: fn() }), false;
  51213. if (it(e2.file))
  51214. return tn({ api: "createFileMessage", param: "payload.file", desc: an() }), false;
  51215. if (ie) {
  51216. if (!(e2.file instanceof HTMLInputElement || $e(e2.file)))
  51217. return st(e2.file) && "undefined" != typeof uni ? 0 !== e2.file.tempFilePaths.length && 0 !== e2.file.tempFiles.length || (tn({ api: "createFileMessage", param: "payload.file", desc: mn() }), false) : (tn({ api: "createFileMessage", param: "payload.file", desc: rn() }), false);
  51218. if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length)
  51219. return tn({ api: "createFileMessage", param: "payload.file", desc: mn() }), false;
  51220. }
  51221. return true;
  51222. } }), onProgress: { type: "Function", required: false, validator: function(e2) {
  51223. return it(e2) && tn({ api: "createFileMessage", param: "onProgress", desc: dn() }), true;
  51224. } } }, createLocationMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51225. return st(e2) ? nt(e2.description) ? et(e2.longitude) ? !!et(e2.latitude) || (tn({ api: "createLocationMessage", param: "payload.latitude", desc: sn() }), false) : (tn({ api: "createLocationMessage", param: "payload.longitude", desc: sn() }), false) : (tn({ api: "createLocationMessage", param: "payload.description", desc: nn() }), false) : (tn({ api: "createLocationMessage", param: "payload", desc: fn() }), false);
  51226. } }) }, createMergerMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
  51227. if (zt(e2.messageList))
  51228. return tn({ api: "createMergerMessage", param: "payload.messageList", desc: ln() }), false;
  51229. if (zt(e2.compatibleText))
  51230. return tn({ api: "createMergerMessage", param: "payload.compatibleText", desc: on("compatibleText") }), false;
  51231. var t2 = false;
  51232. return e2.messageList.forEach(function(e3) {
  51233. e3.status === Qt.FAIL && (t2 = true);
  51234. }), !t2 || (tn({ api: "createMergerMessage", param: "payload.messageList", desc: Sn("MergeFailedMessageLog") }), false);
  51235. } }) }, revokeMessage: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
  51236. return zt(e2) ? (tn({ api: "revokeMessage", param: "message", desc: Mn() }), false) : e2.conversationType === E.CONV_SYSTEM ? (tn({ api: "revokeMessage", param: "message", desc: Sn("MessageCanBeRevokedDesc") }), false) : true !== e2.isRevoked || (tn({ api: "revokeMessage", param: "message", desc: Sn("MessageRevokedLog") }), false);
  51237. } })], deleteMessage: [t(t({ name: "messageList" }, Tn), {}, { validator: function(e2) {
  51238. return !zt(e2) || (tn({ api: "deleteMessage", param: "messageList", desc: ln() }), false);
  51239. } })], translateText: { sourceTextList: Tn, sourceLanguage: Cn, targetLanguage: Cn }, modifyMessage: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
  51240. return zt(e2) ? (tn({ api: "modifyMessage", param: "message", desc: Mn() }), false) : e2.conversationType === E.CONV_SYSTEM ? (tn({ api: "modifyMessage", param: "message", desc: Sn("MessageCanBeModifiedLog") }), false) : true !== e2._onlineOnlyFlag || (tn({ api: "modifyMessage", param: "message", desc: Sn("OnlineMessageNotSupportLog") }), false);
  51241. } })], getUserProfile: { userIDList: { type: "Array", validator: function(e2) {
  51242. return at(e2) ? (0 === e2.length && tn({ api: "getUserProfile", param: "userIDList", desc: ln() }), true) : (tn({ api: "getUserProfile", param: "userIDList", desc: cn() }), false);
  51243. } } }, updateMyProfile: { profileCustomField: { type: "Array", validator: function(e2) {
  51244. return !!it(e2) || (!!at(e2) || (tn({ api: "updateMyProfile", param: "profileCustomField", desc: cn() }), false));
  51245. } } }, setSelfStatus: { customStatus: { type: "String", validator: function(e2) {
  51246. return !!nt(e2) || (tn({ api: "setSelfStatus", param: "customStatus", desc: nn() }), false);
  51247. } } }, getUserStatus: { userIDList: { type: "Array", validator: function(e2) {
  51248. return at(e2) ? 0 !== e2.length || (tn({ api: "getUserStatus", param: "userIDList", desc: ln() }), false) : (tn({ api: "getUserStatus", param: "userIDList", desc: cn() }), false);
  51249. } } }, subscribeUserStatus: { userIDList: { type: "Array", validator: function(e2) {
  51250. return at(e2) ? 0 !== e2.length || (tn({ api: "subscribeUserStatus", param: "userIDList", desc: ln() }), false) : (tn({ api: "subscribeUserStatus", param: "userIDList", desc: cn() }), false);
  51251. } } }, unsubscribeUserStatus: { userIDList: { type: "Array", validator: function(e2) {
  51252. return !e2 || (!!at(e2) || (tn({ api: "subscribeUserStatus", param: "userIDList", desc: cn() }), false));
  51253. } } }, addFriend: { to: Cn, source: { type: "String", required: true, validator: function(e2) {
  51254. return !!e2 && (e2.startsWith("AddSource_Type_") ? !(e2.replace("AddSource_Type_", "").length > 8) || (tn({ api: "addFriend", param: "source", desc: gn("keyword", 8) }), false) : (tn({ api: "addFriend", param: "source", desc: Sn("SourcePrefixLog") }), false));
  51255. } }, remark: { type: "String", required: false, validator: function(e2) {
  51256. return !(nt(e2) && e2.length > 96) || (tn({ api: "addFriend", param: "remark", desc: gn("remark", 96) }), false);
  51257. } } }, deleteFriend: { userIDList: Tn }, checkFriend: { userIDList: Tn }, getFriendProfile: { userIDList: Tn }, updateFriend: { userID: Cn, remark: { type: "String", required: false, validator: function(e2) {
  51258. return !(nt(e2) && e2.length > 96) || (tn({ api: "updateFriend", param: "remark", desc: gn("remark", 96) }), false);
  51259. } }, friendCustomField: { type: "Array", required: false, validator: function(e2) {
  51260. if (e2) {
  51261. if (!at(e2))
  51262. return tn({ api: "updateFriend", param: "friendCustomField", desc: cn() }), false;
  51263. var t2 = true;
  51264. return e2.forEach(function(e3) {
  51265. return nt(e3.key) && -1 !== e3.key.indexOf("Tag_SNS_Custom") ? nt(e3.value) ? e3.key.replace("Tag_SNS_Custom_", "").length > 8 ? (tn({ api: "updateFriend", param: "friendCustomField", desc: gn("keyword", 8) }), t2 = false) : void 0 : (tn({ api: "updateFriend", param: "friendCustomField", desc: _n("value") }), t2 = false) : (tn({ api: "updateFriend", param: "friendCustomField", desc: Sn("FriendCustomFieldPrefixLog") }), t2 = false);
  51266. }), t2;
  51267. }
  51268. return true;
  51269. } } }, acceptFriendApplication: { userID: Cn }, refuseFriendApplication: { userID: Cn }, deleteFriendApplication: { userID: Cn }, createFriendGroup: { name: Cn }, deleteFriendGroup: { name: Cn }, addToFriendGroup: { name: Cn, userIDList: Tn }, removeFromFriendGroup: { name: Cn, userIDList: Tn }, renameFriendGroup: { oldName: Cn, newName: Cn }, sendMessageReadReceipt: [{ name: "messageList", type: "Array", validator: function(e2) {
  51270. return at(e2) ? 0 !== e2.length || (tn({ api: "sendMessageReadReceipt", param: "messageList", desc: ln() }), false) : (tn({ api: "sendMessageReadReceipt", param: "messageList", desc: cn() }), false);
  51271. } }], getMessageReadReceiptList: [{ name: "messageList", type: "Array", validator: function(e2) {
  51272. return at(e2) ? 0 !== e2.length || (tn({ api: "getMessageReadReceiptList", param: "messageList", desc: ln() }), false) : (tn({ api: "getMessageReadReceiptList", param: "messageList", desc: cn() }), false);
  51273. } }], createTopicInCommunity: { groupID: Cn, topicName: Cn }, deleteTopicFromCommunity: { groupID: Cn, topicIDList: { type: "Array", validator: function(e2) {
  51274. return !e2 || (!!at(e2) || (tn({ api: "deleteTopicFromCommunity", param: "topicIDList", desc: cn() }), false));
  51275. } } }, updateTopicProfile: { groupID: Cn, topicID: Cn }, getTopicList: { groupID: Cn, topicIDList: { type: "Array", validator: function(e2) {
  51276. return !e2 || (!!at(e2) || (tn({ api: "getTopicList", param: "topicIDList", desc: cn() }), false));
  51277. } } } }, An = { login: 1, logout: 1, on: 1, once: 1, off: 1, setLogLevel: 1, registerPlugin: 1, destroy: 1, createTextMessage: 1, createTextAtMessage: 1, createImageMessage: 1, createAudioMessage: 1, createVideoMessage: 1, createCustomMessage: 1, createFaceMessage: 1, createFileMessage: 1, createLocationMessage: 1, createMergerMessage: 1, downloadMergerMessage: 1, createForwardMessage: 1, sendMessage: 1, resendMessage: 1, revokeMessage: 1, deleteMessage: 1, translateText: 1, modifyMessage: 1, sendMessageReadReceipt: 1, getGroupMessageReadMemberList: 1, getMessageReadReceiptList: 1, setMessageExtensions: 1, getMessageExtensions: 1, deleteMessageExtensions: 1, getMessageList: 1, findMessage: 1, getMessageListHopping: 1, setMessageRead: 1, setAllMessageRead: 1, getConversationList: 1, getConversationProfile: 1, deleteConversation: 1, pinConversation: 1, getTotalUnreadMessageCount: 1, setConversationCustomData: 1, markConversation: 1, createConversationGroup: 1, getConversationGroupList: 1, deleteConversationGroup: 1, renameConversationGroup: 1, addConversationsToGroup: 1, deleteConversationsFromGroup: 1, clearHistoryMessage: 1, getGroupList: 1, getGroupProfile: 1, createGroup: 1, joinGroup: 1, updateGroupProfile: 1, quitGroup: 1, dismissGroup: 1, changeGroupOwner: 1, searchGroupByID: 1, setMessageRemindType: 1, getGroupApplicationList: 1, handleGroupApplication: 1, initGroupAttributes: 1, setGroupAttributes: 1, deleteGroupAttributes: 1, getGroupAttributes: 1, setGroupCounters: 1, increaseGroupCounter: 1, decreaseGroupCounter: 1, getGroupCounters: 1, getJoinedCommunityList: 1, createTopicInCommunity: 1, deleteTopicFromCommunity: 1, updateTopicProfile: 1, getTopicList: 1, getGroupMemberProfile: 1, getGroupMemberList: 1, addGroupMember: 1, deleteGroupMember: 1, setGroupMemberNameCard: 1, setGroupMemberMuteTime: 1, setGroupMemberRole: 1, setGroupMemberCustomField: 1, getGroupOnlineMemberCount: 1, markGroupMemberList: 1, getMyProfile: 1, getUserProfile: 1, updateMyProfile: 1, setSelfStatus: 1, getUserStatus: 1, subscribeUserStatus: 1, unsubscribeUserStatus: 1, getBlacklist: 1, addToBlacklist: 1, removeFromBlacklist: 1, getFriendList: 1, addFriend: 1, deleteFriend: 1, checkFriend: 1, updateFriend: 1, getFriendProfile: 1, getFriendApplicationList: 1, refuseFriendApplication: 1, deleteFriendApplication: 1, acceptFriendApplication: 1, setFriendApplicationRead: 1, getFriendGroupList: 1, createFriendGroup: 1, renameFriendGroup: 1, deleteFriendGroup: 1, addToFriendGroup: 1, removeFromFriendGroup: 1, callExperimentalAPI: 1 }, Rn = 1, Nn = 2, On = 3, Gn = 4, Un = 6, Pn = 7, bn = 8, wn = 9, Fn = 10, qn = 11, xn = 12, Vn = 13, Bn = 14, Hn = 15, Kn = 16, Wn = 17, Yn = 18, jn = 19, zn = 20, Jn = 21, Xn = 22, Zn = 23, Qn = 24, $n = 25, eo = 26, to = 27, no = 28, oo = 29, so = 30, ao = 31, io = 32, ro = 37, uo = function() {
  51278. function e2(t2) {
  51279. o(this, e2), this._m = t2, this._n = "";
  51280. }
  51281. return a(e2, [{ key: "isLoggedIn", value: function() {
  51282. return this._m.getModule(xn).isLoggedIn();
  51283. } }, { key: "isOversea", value: function() {
  51284. return this._m.getModule(xn).isOversea();
  51285. } }, { key: "isPrivateNetWork", value: function() {
  51286. return this._m.getModule(xn).isPrivateNetWork();
  51287. } }, { key: "getFileDownloadProxy", value: function() {
  51288. return this._m.getModule(xn).getFileDownloadProxy();
  51289. } }, { key: "getMyUserID", value: function() {
  51290. return this._m.getModule(xn).getUserID();
  51291. } }, { key: "getMyTinyID", value: function() {
  51292. return this._m.getModule(xn).getTinyID();
  51293. } }, { key: "getSDKAppID", value: function() {
  51294. return this._m.getModule(xn).getSDKAppID();
  51295. } }, { key: "isIntl", value: function() {
  51296. return this._m.getModule(xn).isIntl();
  51297. } }, { key: "isDevMode", value: function() {
  51298. return this._m.getModule(xn).isDevMode();
  51299. } }, { key: "getModule", value: function(e3) {
  51300. return this._m.getModule(e3);
  51301. } }, { key: "getPlatform", value: function() {
  51302. return ge;
  51303. } }, { key: "getNetworkType", value: function() {
  51304. return this._m.getModule(Hn).getNetworkType();
  51305. } }, { key: "probeNetwork", value: function(e3) {
  51306. return this._m.getModule(Hn).probe(e3);
  51307. } }, { key: "getCloudConfig", value: function(e3) {
  51308. return this._m.getModule(Zn).getCloudConfig(e3);
  51309. } }, { key: "emitOuterEvent", value: function(e3, t2) {
  51310. this._m.getOuterEmitterInstance().emit(e3, t2);
  51311. } }, { key: "emitInnerEvent", value: function(e3, t2) {
  51312. this._m.getInnerEmitterInstance().emit(e3, t2);
  51313. } }, { key: "getInnerEmitterInstance", value: function() {
  51314. return this._m.getInnerEmitterInstance();
  51315. } }, { key: "generateTjgID", value: function(e3) {
  51316. return this._m.getModule(xn).getTinyID() + "-" + e3.random;
  51317. } }, { key: "filterModifiedMessage", value: function(e3) {
  51318. if (!zt(e3)) {
  51319. var t2 = e3.filter(function(e4) {
  51320. return true === e4.isModified;
  51321. });
  51322. t2.length > 0 && this.emitOuterEvent(k.MESSAGE_MODIFIED, t2);
  51323. }
  51324. } }, { key: "filterUnmodifiedMessage", value: function(e3) {
  51325. return zt(e3) ? [] : e3.filter(function(e4) {
  51326. return false === e4.isModified;
  51327. });
  51328. } }, { key: "request", value: function(e3) {
  51329. return this._m.getModule(zn).request(e3);
  51330. } }, { key: "canIUse", value: function(e3) {
  51331. return this._m.getModule(to).canIUse(e3);
  51332. } }, { key: "getErrorMessage", value: function(e3, t2, n2) {
  51333. return this._m.getErrorMessage(e3, t2, n2);
  51334. } }, { key: "outputWarning", value: function(e3, t2, n2) {
  51335. var o2 = this.getErrorMessage(e3, t2, n2);
  51336. o2 && Ve.w(o2);
  51337. } }]), e2;
  51338. }(), co = "wslogin", lo = "wslogout", po = "wshello", go = "KickOther", ho = "getmsg", _o = "authkey", fo = "sendmsg", vo = "send_group_msg", mo = "portrait_get_all", Mo = "portrait_set", yo = "black_list_get", Io = "black_list_add", Co = "black_list_delete", To = "msgwithdraw", Do = "msgreaded", ko = "set_c2c_peer_mute_notifications", Eo = "get_c2c_peer_mute_notifications", So = "getroammsg", Lo = "get_peer_read_time", Ao = "delete_c2c_msg_ramble", Ro = "modify_c2c_msg", No = "set_key_values", Oo = "get_key_values", Go = "page_get", Uo = "get", Po = "batch_delete", bo = "clear_msg", wo = "top", Fo = "deletemsg", qo = "set_conv_custom_data", xo = "mark_contact", Vo = "create_contact_group", Bo = "del_contact_group", Ho = "update_contact_group", Ko = "add_conv_to_group", Wo = "del_conv_from_group", Yo = "get_contact_group", jo = "get_joined_group_list", zo = "get_group_self_member_info", Jo = "create_group", Xo = "destroy_group", Zo = "modify_group_base_info", Qo = "apply_join_group", $o = "apply_join_group_noauth", es = "quit_group", ts = "get_group_public_info", ns = "change_group_owner", os2 = "handle_apply_join_group", ss = "handle_invite_join_permission_group", as = "handle_invite_join_group", is = "group_msg_recall", rs = "msg_read_report", us = "read_all_unread_msg", cs = "group_msg_get", ls = "get_group_msg_receipt", ds = "group_msg_receipt", ps = "c2c_msg_read_receipt", gs = "get_group_msg_receipt_detail", hs = "get_pendency", _s = "deletemsg", fs = "get_msg", vs = "get_msg_noauth", ms = "get_online_member_num", Ms = "delete_group_ramble_msg_by_seq", ys = "modify_group_msg", Is = "set_group_attr", Cs = "modify_group_attr", Ts = "delete_group_attr", Ds = "clear_group_attr", ks = "get_group_attr", Es = "group_set_key_values", Ss = "group_get_key_values", Ls = "get_group_notify", As = "update_group_counter", Rs = "get_group_counter", Ns = "get_group_member_info", Os = "get_members", Gs = "get_specified_group_member_info", Us = "add_group_member", Ps = "delete_group_member", bs = "ban_group_member", ws = "modify_group_member_info", Fs = "modify_user_info", qs = "cos", xs = "pre_sig", Vs = "video_cover", Bs = "tim_web_report_v2", Hs = "alive", Ks = "msg_push", Ws = "multi_msg_push_ws", Ys = "ws_msg_push_ack", js = "stat_forceoffline", zs = "save_relay_json_msg", Js = "get_relay_json_msg", Xs = "fetch_config", Zs = "push_configv2", Qs = "fetch_imsdk_purchase_bitsv2", $s = "push_imsdk_purchase_bitsv2", ea = "notify2", ta = "create_topic", na = "destroy_topic", oa = "modify_topic", sa = "get_topic", aa = "ws_set_custom_status", ia = "ws_get_user_status", ra = "ws_status_subscribe", ua = "ws_status_unsubscribe", ca = "ws_stat_background", la = "ws_stat_foreground", da = "ws_stat_settoken", pa = "get_local_words", ga = "ws_batch_trans_text", ha = { NO_SDKAPPID: 2e3, NO_ACCOUNT_TYPE: 2001, NO_IDENTIFIER: 2002, NO_USERSIG: 2003, NO_TINYID: 2022, NO_A2KEY: 2023, USER_NOT_LOGGED_IN: 2024, REPEAT_LOGIN: 2025, COS_UNDETECTED: 2040, COS_GET_SIG_FAIL: 2041, MESSAGE_SEND_FAIL: 2100, MESSAGE_SEND_FAIL_NOT_IN_AVCHATROOM: 2101, MESSAGE_SEND_NEED_MESSAGE_INSTANCE: 2105, MESSAGE_SEND_INVALID_CONVERSATION_TYPE: 2106, MESSAGE_FILE_IS_EMPTY: 2108, MESSAGE_ONPROGRESS_FUNCTION_ERROR: 2109, MESSAGE_REVOKE_FAIL: 2110, MESSAGE_DELETE_FAIL: 2111, MESSAGE_UNREAD_ALL_FAIL: 2112, READ_RECEIPT_MESSAGE_LIST_EMPTY: 2114, MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL: 2115, CANNOT_DELETE_GROUP_SYSTEM_NOTICE: 2116, TRANSLATE_TEXT_FAIL: 2117, MESSAGE_IMAGE_SELECT_FILE_FIRST: 2251, MESSAGE_IMAGE_TYPES_LIMIT: 2252, MESSAGE_IMAGE_SIZE_LIMIT: 2253, MESSAGE_AUDIO_UPLOAD_FAIL: 2300, MESSAGE_AUDIO_SIZE_LIMIT: 2301, MESSAGE_VIDEO_UPLOAD_FAIL: 2350, MESSAGE_VIDEO_SIZE_LIMIT: 2351, MESSAGE_VIDEO_TYPES_LIMIT: 2352, MESSAGE_FILE_UPLOAD_FAIL: 2400, MESSAGE_FILE_SELECT_FILE_FIRST: 2401, MESSAGE_FILE_SIZE_LIMIT: 2402, MESSAGE_FILE_URL_IS_EMPTY: 2403, MESSAGE_MERGER_TYPE_INVALID: 2450, MESSAGE_MERGER_KEY_INVALID: 2451, MESSAGE_MERGER_DOWNLOAD_FAIL: 2452, MESSAGE_FORWARD_TYPE_INVALID: 2453, MESSAGE_MODIFY_CONFLICT: 2480, MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM: 2481, CONVERSATION_NOT_FOUND: 2500, USER_OR_GROUP_NOT_FOUND: 2501, CONVERSATION_UN_RECORDED_TYPE: 2502, INVALID_CONVERSATION_ID: 2503, ILLEGAL_GROUP_TYPE: 2600, CANNOT_JOIN_WORK: 2601, ILLEGAL_GROUP_ID: 2602, CANNOT_FIND_GROUP: 2603, CANNOT_CHANGE_OWNER_IN_AVCHATROOM: 2620, CANNOT_CHANGE_OWNER_TO_SELF: 2621, CANNOT_DISMISS_WORK: 2622, MEMBER_NOT_IN_GROUP: 2623, JOIN_GROUP_FAIL: 2660, CANNOT_ADD_MEMBER_IN_AVCHATROOM: 2661, CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN: 2662, NOT_OWNER: 2681, CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM: 2682, INVALID_MEMBER_ROLE: 2683, CANNOT_SET_SELF_MEMBER_ROLE: 2684, CANNOT_MUTE_SELF: 2685, BAN_DURATION_INVALID: 2686, NOT_MY_FRIEND: 2700, ALREADY_MY_FRIEND: 2701, FRIEND_GROUP_EXISTED: 2710, FRIEND_GROUP_NOT_EXIST: 2711, FRIEND_APPLICATION_NOT_EXIST: 2716, UPDATE_PROFILE_INVALID_PARAM: 2721, UPDATE_PROFILE_NO_KEY: 2722, CANNOT_ADD_SELF_TO_BLACKLIST: 2742, NETWORK_ERROR: 2800, NETWORK_TIMEOUT: 2801, NO_NETWORK: 2805, UNCAUGHT_ERROR: 2903, INVALID_OPERATION: 2905, INVALID_TRTC_CMD: 2995, OVER_FREQUENCY_LIMIT: 2996, CANNOT_FIND_PROTOCOL: 2997, CANNOT_FIND_MODULE: 2998, SDK_IS_NOT_READY: 2999, LOGGING_IN: 3e3, LOGIN_FAILED: 3001, KICKED_OUT_MULT_DEVICE: 3002, KICKED_OUT_MULT_ACCOUNT: 3003, KICKED_OUT_USERSIG_EXPIRED: 3004, LOGGED_OUT: 3005, KICKED_OUT_REST_API: 3006, ILLEGAL_TOPIC_ID: 3021, CANNOT_USE_COMMERCIAL_ABILITY: 3122, PROFANITY_FOUND: 3123, MESSAGE_A2KEY_EXPIRED: 20002, ACCOUNT_A2KEY_EXPIRED: 70001, HELLO_ANSWER_KICKED_OUT: 1002, OPEN_SERVICE_OVERLOAD_ERROR: 60022 }, _a = "networkRTT", fa = "messageE2EDelay", va = "sendMessageC2C", ma = "sendMessageGroup", Ma = "sendMessageGroupAV", ya = "sendMessageRichMedia", Ia = "cosUpload", Ca = "messageReceivedGroup", Ta = "messageReceivedGroupAVPush", Da = "messageReceivedGroupAVPull", ka = (i(Zt = {}, _a, 2), i(Zt, fa, 3), i(Zt, va, 4), i(Zt, ma, 5), i(Zt, Ma, 6), i(Zt, ya, 7), i(Zt, Ca, 8), i(Zt, Ta, 9), i(Zt, Da, 10), i(Zt, Ia, 11), Zt), Ea = { info: 4, warning: 5, error: 6 }, Sa = { wifi: 1, "2g": 2, "3g": 3, "4g": 4, "5g": 5, unknown: 6, none: 7, online: 8 }, La = { login: 4 }, Aa = function() {
  51339. function e2(t2) {
  51340. o(this, e2), this._n = "SSOLogData", this.eventType = La[t2] || 0, this.timestamp = 0, this.networkType = 8, this.code = 0, this.message = "", this.moreMessage = "", this.extension = t2, this.costTime = 0, this.duplicate = false, this.level = 4, this.uiPlatform = void 0, this._sentFlag = false, this._startts = Pe();
  51341. }
  51342. return a(e2, [{ key: "updateTimeStamp", value: function() {
  51343. this.timestamp = Pe();
  51344. } }, { key: "start", value: function(e3) {
  51345. return this._startts = e3, this;
  51346. } }, { key: "end", value: function() {
  51347. var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
  51348. if (!this._sentFlag) {
  51349. var n2 = Pe();
  51350. 0 === this.costTime && (this.costTime = n2 - this._startts), this.setMoreMessage("startts:".concat(this._startts, " endts:").concat(n2)), t2 ? (this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this)) : setTimeout(function() {
  51351. e3._sentFlag = true, e3._eventStatModule && e3._eventStatModule.pushIn(e3);
  51352. }, 0);
  51353. }
  51354. } }, { key: "setError", value: function(e3, t2, n2) {
  51355. if (!(e3 instanceof Error))
  51356. return Ve.w("".concat(this._n, ".setError value not instanceof Error, please check!")), this;
  51357. if (this._sentFlag)
  51358. return this;
  51359. if (this.setNetworkType(n2), t2)
  51360. e3.code && this.setCode(e3.code), e3.message && this.setMoreMessage(e3.message);
  51361. else {
  51362. var o2 = ha.NO_NETWORK;
  51363. this.setCode(o2);
  51364. }
  51365. return this.setLevel("error"), this;
  51366. } }, { key: "setCode", value: function(e3) {
  51367. return it(e3) || this._sentFlag || ("ECONNABORTED" === e3 && (this.code = 103), et(e3) ? this.code = e3 : Ve.w("".concat(this._n, ".setCode value not a number, please check!"), e3, n(e3))), this;
  51368. } }, { key: "setMessage", value: function(e3) {
  51369. return it(e3) || this._sentFlag || (et(e3) && (this.message = e3.toString()), nt(e3) && (this.message = e3)), this;
  51370. } }, { key: "setCostTime", value: function(e3) {
  51371. return this.costTime = e3, this;
  51372. } }, { key: "setLevel", value: function(e3) {
  51373. return it(e3) || this._sentFlag || (this.level = Ea[e3]), this;
  51374. } }, { key: "setMoreMessage", value: function(e3) {
  51375. return zt(this.moreMessage) ? this.moreMessage = "".concat(e3) : this.moreMessage += " ".concat(e3), this;
  51376. } }, { key: "setNetworkType", value: function(e3) {
  51377. if (it(e3))
  51378. Ve.w("".concat(this._n, ".setNetworkType value is undefined, please check!"));
  51379. else {
  51380. var t2 = Sa[e3.toLowerCase()];
  51381. it(t2) || (this.networkType = t2);
  51382. }
  51383. return this;
  51384. } }, { key: "getStartTs", value: function() {
  51385. return this._startts;
  51386. } }, { key: "setUIPlatform", value: function(e3) {
  51387. this.uiPlatform = e3;
  51388. } }], [{ key: "bindEventStatModule", value: function(t2) {
  51389. e2.prototype._eventStatModule = t2;
  51390. } }]), e2;
  51391. }(), Ra = function() {
  51392. function e2(t2) {
  51393. o(this, e2), this.type = E.MSG_TEXT, this.content = { text: t2.text || "" };
  51394. }
  51395. return a(e2, [{ key: "setText", value: function(e3) {
  51396. this.content.text = e3;
  51397. } }, { key: "sendable", value: function() {
  51398. return 0 !== this.content.text.length;
  51399. } }]), e2;
  51400. }(), Na = function() {
  51401. function e2(t2, n2) {
  51402. o(this, e2), this._imageMemoryURL = "", this._fileDownloadProxy = n2, ae ? this.createImageDataASURLInWXMiniApp(t2.file) : this.createImageDataASURLInWeb(t2.file), this._initImageInfoModel(), this.type = E.MSG_IMAGE, this._percent = 0, this.content = { imageFormat: t2.imageFormat || Be.UNKNOWN, uuid: t2.uuid, imageInfoArray: [] }, this.initImageInfoArray(t2.imageInfoArray), this._autoFixUrl();
  51403. }
  51404. return a(e2, [{ key: "_initImageInfoModel", value: function() {
  51405. var e3 = this;
  51406. this._ImageInfoModel = function(t2) {
  51407. this.instanceID = _t(9999999), this.sizeType = t2.type || 0, this.type = 0, this.size = t2.size || 0, this.width = t2.width || 0, this.height = t2.height || 0, this.imageUrl = t2.url || "", this.url = Yt(t2.url || e3._imageMemoryURL, e3._fileDownloadProxy);
  51408. }, this._ImageInfoModel.prototype = { setSizeType: function(e4) {
  51409. this.sizeType = e4;
  51410. }, setType: function(e4) {
  51411. this.type = e4;
  51412. }, setImageUrl: function(e4) {
  51413. e4 && (this.imageUrl = e4);
  51414. }, getImageUrl: function() {
  51415. return this.imageUrl;
  51416. } };
  51417. } }, { key: "initImageInfoArray", value: function(e3) {
  51418. for (var t2 = 0, n2 = null, o2 = null; t2 <= 2; )
  51419. o2 = it(e3) || it(e3[t2]) ? { type: 0, size: 0, width: 0, height: 0, url: "" } : e3[t2], (n2 = new this._ImageInfoModel(o2)).setSizeType(t2 + 1), n2.setType(t2), this.addImageInfo(n2), t2++;
  51420. this.updateAccessSideImageInfoArray();
  51421. } }, { key: "updateImageInfoArray", value: function(e3) {
  51422. for (var t2, n2 = this.content.imageInfoArray.length, o2 = 0; o2 < n2; o2++)
  51423. t2 = this.content.imageInfoArray[o2], e3[o2].size && (t2.size = e3[o2].size), e3[o2].url && t2.setImageUrl(e3[o2].url), e3[o2].width && (t2.width = e3[o2].width), e3[o2].height && (t2.height = e3[o2].height);
  51424. } }, { key: "_autoFixUrl", value: function() {
  51425. for (var e3 = this.content.imageInfoArray.length, t2 = "", n2 = "", o2 = ["http", "https"], s2 = null, a2 = 0; a2 < e3; a2++)
  51426. this.content.imageInfoArray[a2].url && "" !== (s2 = this.content.imageInfoArray[a2]).imageUrl && (n2 = s2.imageUrl.slice(0, s2.imageUrl.indexOf("://") + 1), t2 = s2.imageUrl.slice(s2.imageUrl.indexOf("://") + 1), o2.indexOf(n2) < 0 && (n2 = "https:"), this.content.imageInfoArray[a2].setImageUrl([n2, t2].join("")));
  51427. } }, { key: "updatePercent", value: function(e3) {
  51428. this._percent = e3, this._percent > 1 && (this._percent = 1);
  51429. } }, { key: "updateImageFormat", value: function(e3) {
  51430. this.content.imageFormat = Be[e3.toUpperCase()] || Be.UNKNOWN;
  51431. } }, { key: "createImageDataASURLInWeb", value: function(e3) {
  51432. void 0 !== e3 && e3.files.length > 0 && (this._imageMemoryURL = window.URL.createObjectURL(e3.files[0]));
  51433. } }, { key: "createImageDataASURLInWXMiniApp", value: function(e3) {
  51434. e3 && e3.url && (this._imageMemoryURL = e3.url);
  51435. } }, { key: "replaceImageInfo", value: function(e3, t2) {
  51436. this.content.imageInfoArray[t2] instanceof this._ImageInfoModel || (this.content.imageInfoArray[t2] = e3);
  51437. } }, { key: "addImageInfo", value: function(e3) {
  51438. this.content.imageInfoArray.length >= 3 || this.content.imageInfoArray.push(e3);
  51439. } }, { key: "updateAccessSideImageInfoArray", value: function() {
  51440. var e3 = this.content.imageInfoArray, t2 = e3[0], n2 = t2.width, o2 = void 0 === n2 ? 0 : n2, s2 = t2.height, a2 = void 0 === s2 ? 0 : s2;
  51441. 0 !== o2 && 0 !== a2 && (Pt(e3), Object.assign(e3[2], Ut({ originWidth: o2, originHeight: a2, min: 720 })));
  51442. } }, { key: "sendable", value: function() {
  51443. return 0 !== this.content.imageInfoArray.length && ("" !== this.content.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0].size);
  51444. } }]), e2;
  51445. }(), Oa = function() {
  51446. function e2(t2) {
  51447. o(this, e2), this.type = E.MSG_FACE, this.content = t2 || null;
  51448. }
  51449. return a(e2, [{ key: "sendable", value: function() {
  51450. return null !== this.content;
  51451. } }]), e2;
  51452. }(), Ga = function() {
  51453. function e2(t2, n2) {
  51454. o(this, e2), this.type = E.MSG_AUDIO, this._percent = 0, this.content = { downloadFlag: 2, second: t2.second, size: t2.size, url: Yt(t2.url, n2), remoteAudioUrl: t2.url || "", uuid: t2.uuid };
  51455. }
  51456. return a(e2, [{ key: "updatePercent", value: function(e3) {
  51457. this._percent = e3, this._percent > 1 && (this._percent = 1);
  51458. } }, { key: "updateAudioUrl", value: function(e3) {
  51459. this.content.remoteAudioUrl = e3;
  51460. } }, { key: "sendable", value: function() {
  51461. return "" !== this.content.remoteAudioUrl;
  51462. } }]), e2;
  51463. }(), Ua = { from: true, groupID: true, groupName: true, to: true }, Pa = function() {
  51464. function e2(t2) {
  51465. o(this, e2), this.type = E.MSG_GRP_TIP, this.content = {}, this._initContent(t2);
  51466. }
  51467. return a(e2, [{ key: "_initContent", value: function(e3) {
  51468. var t2 = this;
  51469. Object.keys(e3).forEach(function(n2) {
  51470. switch (n2) {
  51471. case "remarkInfo":
  51472. break;
  51473. case "groupProfile":
  51474. t2.content.groupProfile = {}, t2._initGroupProfile(e3[n2]);
  51475. break;
  51476. case "operatorInfo":
  51477. break;
  51478. case "memberInfoList":
  51479. case "msgMemberInfo":
  51480. t2._updateMemberList(e3[n2]);
  51481. break;
  51482. case "memberExtraInfo":
  51483. case "onlineMemberInfo":
  51484. break;
  51485. case "memberNum":
  51486. t2.content[n2] = e3[n2], t2.content.memberCount = e3[n2];
  51487. break;
  51488. case "newGroupProfile":
  51489. t2.content.newGroupProfile = {}, t2._initNewGroupProfile(e3[n2]);
  51490. break;
  51491. default:
  51492. t2.content[n2] = e3[n2];
  51493. }
  51494. }), this.content.userIDList || (this.content.userIDList = [this.content.operatorID]);
  51495. } }, { key: "_initGroupProfile", value: function(e3) {
  51496. for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) {
  51497. var o2 = t2[n2];
  51498. Ua[o2] && (this.content.groupProfile[o2] = e3[o2]);
  51499. }
  51500. } }, { key: "_updateMemberList", value: function(e3) {
  51501. zt(this.content.memberList) ? this.content.memberList = e3 : this.content.memberList.forEach(function(t2) {
  51502. e3.forEach(function(e4) {
  51503. t2.userID === e4.userID && Object.assign(t2, e4);
  51504. });
  51505. });
  51506. } }, { key: "_initNewGroupProfile", value: function(e3) {
  51507. for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) {
  51508. var o2 = t2[n2];
  51509. "muteAllMembers" !== o2 ? this.content.newGroupProfile[o2] = e3[o2] : this.content.newGroupProfile[o2] = 1 === e3[o2];
  51510. }
  51511. } }]), e2;
  51512. }(), ba = { from: true, groupID: true, groupName: true, to: true }, wa = function() {
  51513. function e2(t2) {
  51514. o(this, e2), this.type = E.MSG_GRP_SYS_NOTICE, this.content = {}, this._initContent(t2);
  51515. }
  51516. return a(e2, [{ key: "_initContent", value: function(e3) {
  51517. var t2 = this;
  51518. Object.keys(e3).forEach(function(n2) {
  51519. switch (n2) {
  51520. case "memberInfoList":
  51521. break;
  51522. case "remarkInfo":
  51523. t2.content.handleMessage = e3[n2];
  51524. break;
  51525. case "groupProfile":
  51526. t2.content.groupProfile = {}, t2._initGroupProfile(e3[n2]);
  51527. break;
  51528. default:
  51529. t2.content[n2] = e3[n2];
  51530. }
  51531. });
  51532. } }, { key: "_initGroupProfile", value: function(e3) {
  51533. for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) {
  51534. var o2 = t2[n2];
  51535. ba[o2] && ("groupName" === o2 ? this.content.groupProfile.name = e3[o2] : this.content.groupProfile[o2] = e3[o2]);
  51536. }
  51537. } }]), e2;
  51538. }(), Fa = function() {
  51539. function e2(t2, n2) {
  51540. o(this, e2), this.type = E.MSG_FILE, this._percent = 0;
  51541. var s2 = this._getFileInfo(t2);
  51542. this.content = { downloadFlag: 2, fileUrl: Yt(t2.url, n2) || "", uuid: t2.uuid, fileName: s2.name || "", fileSize: s2.size || 0 };
  51543. }
  51544. return a(e2, [{ key: "_getFileInfo", value: function(e3) {
  51545. if (!it(e3.fileName) && !it(e3.fileSize))
  51546. return { size: e3.fileSize, name: e3.fileName };
  51547. var t2 = e3.file.files[0];
  51548. if (oe) {
  51549. if (t2.path && -1 !== t2.path.indexOf(".")) {
  51550. var n2 = t2.path.slice(t2.path.lastIndexOf(".") + 1).toLowerCase();
  51551. t2.type = n2, t2.name || (t2.name = "".concat(_t(999999), ".").concat(n2));
  51552. }
  51553. t2.name || (t2.type = "", t2.name = t2.path.slice(t2.path.lastIndexOf("/") + 1).toLowerCase()), t2.suffix && (t2.type = t2.suffix), t2.url || (t2.url = t2.path);
  51554. }
  51555. return { size: t2.size, name: t2.name };
  51556. } }, { key: "updatePercent", value: function(e3) {
  51557. this._percent = e3, this._percent > 1 && (this._percent = 1);
  51558. } }, { key: "updateFileUrl", value: function(e3) {
  51559. this.content.fileUrl = e3;
  51560. } }, { key: "sendable", value: function() {
  51561. return "" !== this.content.fileUrl && ("" !== this.content.fileName && 0 !== this.content.fileSize);
  51562. } }]), e2;
  51563. }(), qa = function() {
  51564. function e2(t2) {
  51565. o(this, e2), this.type = E.MSG_CUSTOM, this.content = { data: t2.data || "", description: t2.description || "", extension: t2.extension || "" };
  51566. }
  51567. return a(e2, [{ key: "setData", value: function(e3) {
  51568. return this.content.data = e3, this;
  51569. } }, { key: "setDescription", value: function(e3) {
  51570. return this.content.description = e3, this;
  51571. } }, { key: "setExtension", value: function(e3) {
  51572. return this.content.extension = e3, this;
  51573. } }, { key: "sendable", value: function() {
  51574. return 0 !== this.content.data.length || 0 !== this.content.description.length || 0 !== this.content.extension.length;
  51575. } }]), e2;
  51576. }(), xa = function() {
  51577. function e2(t2, n2) {
  51578. o(this, e2), this.type = E.MSG_VIDEO, this._percent = 0, this.content = { remoteVideoUrl: t2.remoteVideoUrl || t2.videoUrl || "", videoFormat: t2.videoFormat, videoSecond: parseInt(t2.videoSecond, 10), videoSize: t2.videoSize, videoUrl: Yt(t2.videoUrl, n2), videoDownloadFlag: 2, videoUUID: t2.videoUUID, thumbUUID: t2.thumbUUID, thumbFormat: t2.thumbFormat, thumbWidth: t2.thumbWidth, snapshotWidth: t2.thumbWidth, thumbHeight: t2.thumbHeight, snapshotHeight: t2.thumbHeight, thumbSize: t2.thumbSize, snapshotSize: t2.thumbSize, thumbDownloadFlag: 2, thumbUrl: Yt(t2.thumbUrl, n2), snapshotUrl: Yt(t2.thumbUrl, n2) };
  51579. }
  51580. return a(e2, [{ key: "updatePercent", value: function(e3) {
  51581. this._percent = e3, this._percent > 1 && (this._percent = 1);
  51582. } }, { key: "updateVideoUrl", value: function(e3) {
  51583. e3 && (this.content.remoteVideoUrl = e3);
  51584. } }, { key: "updateSnapshotInfo", value: function(e3) {
  51585. var t2 = e3.snapshotUrl, n2 = e3.snapshotWidth, o2 = e3.snapshotHeight;
  51586. zt(t2) || (this.content.thumbUrl = this.content.snapshotUrl = t2), zt(n2) || (this.content.thumbWidth = this.content.snapshotWidth = Number(n2)), zt(o2) || (this.content.thumbHeight = this.content.snapshotHeight = Number(o2));
  51587. } }, { key: "sendable", value: function() {
  51588. return "" !== this.content.remoteVideoUrl;
  51589. } }]), e2;
  51590. }(), Va = function() {
  51591. function e2(t2) {
  51592. o(this, e2), this.type = E.MSG_LOCATION;
  51593. var n2 = t2.description, s2 = t2.longitude, a2 = t2.latitude;
  51594. this.content = { description: n2, longitude: s2, latitude: a2 };
  51595. }
  51596. return a(e2, [{ key: "sendable", value: function() {
  51597. return true;
  51598. } }]), e2;
  51599. }(), Ba = function() {
  51600. function e2(t2, n2) {
  51601. if (o(this, e2), this.from = t2.from, this.messageSender = t2.from, this.time = t2.time, this.messageSequence = t2.sequence, this.clientSequence = t2.clientSequence || t2.sequence, this.messageRandom = t2.random, this.cloudCustomData = t2.cloudCustomData || "", this.clientTime = t2.clientTime || void 0, t2.ID)
  51602. this.ID = t2.ID || "", this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.messageBody = [{ type: t2.type, payload: t2.payload }], t2.conversationType.startsWith(E.CONV_C2C) ? this.receiverUserID = t2.to : t2.conversationType.startsWith(E.CONV_GROUP) && (this.receiverGroupID = t2.to), this.messageReceiver = t2.to;
  51603. else {
  51604. this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.messageBody = [];
  51605. var s2 = t2.elements[0].type, a2 = t2.elements[0].content;
  51606. this._patchRichMediaPayload(s2, a2), this._updateRichMediaDownloadUrl(s2, a2, n2), s2 === E.MSG_MERGER ? this.messageBody.push({ type: s2, payload: new Ha(a2).content }) : this.messageBody.push({ type: s2, payload: a2 }), t2.groupID && (this.receiverGroupID = t2.groupID, this.messageReceiver = t2.groupID), t2.to && (this.receiverUserID = t2.to, this.messageReceiver = t2.to), this.ID = "".concat(t2.tinyID, "-").concat(t2.clientTime, "-").concat(t2.random);
  51607. }
  51608. }
  51609. return a(e2, [{ key: "_patchRichMediaPayload", value: function(e3, t2) {
  51610. e3 === E.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e4) {
  51611. !e4.imageUrl && e4.url && (e4.imageUrl = e4.url, e4.sizeType = e4.type, 1 === e4.type ? e4.type = 0 : 3 === e4.type && (e4.type = 1));
  51612. }) : e3 === E.MSG_VIDEO ? !t2.remoteVideoUrl && t2.videoUrl && (t2.remoteVideoUrl = t2.videoUrl) : e3 === E.MSG_AUDIO ? !t2.remoteAudioUrl && t2.url && (t2.remoteAudioUrl = t2.url) : e3 === E.MSG_FILE && !t2.fileUrl && t2.url && (t2.fileUrl = t2.url, t2.url = void 0);
  51613. } }, { key: "_updateRichMediaDownloadUrl", value: function(e3, t2, n2) {
  51614. n2 && (e3 === E.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e4) {
  51615. e4.url = Yt(e4.url, n2);
  51616. }) : e3 === E.MSG_VIDEO ? (t2.videoUrl = Yt(t2.videoUrl, n2), t2.snapshotUrl = Yt(t2.thumbUrl, n2), t2.snapshotHeight = t2.thumbHeight, t2.snapshotWidth = t2.thumbWidth) : e3 === E.MSG_AUDIO ? t2.url = Yt(t2.url, n2) : e3 === E.MSG_FILE && (t2.fileUrl = Yt(t2.fileUrl, n2)));
  51617. } }]), e2;
  51618. }(), Ha = function() {
  51619. function e2(t2, n2) {
  51620. if (o(this, e2), this.type = E.MSG_MERGER, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, t2.downloadKey) {
  51621. var s2 = t2.downloadKey, a2 = t2.pbDownloadKey, i2 = t2.title, r2 = t2.abstractList, u2 = t2.compatibleText, c2 = t2.version;
  51622. this.content.downloadKey = s2, this.content.pbDownloadKey = a2, this.content.title = i2, this.content.abstractList = r2, this.content.compatibleText = u2, this.content.version = c2 || 0;
  51623. } else if (zt(t2.messageList))
  51624. 1 === t2.layersOverLimit && (this.content.layersOverLimit = true);
  51625. else {
  51626. var l2 = t2.messageList, d2 = t2.title, p2 = t2.abstractList, g2 = t2.compatibleText, h2 = t2.version, _2 = [];
  51627. l2.forEach(function(e3) {
  51628. if (!zt(e3)) {
  51629. var t3 = new Ba(e3, n2);
  51630. _2.push(t3);
  51631. }
  51632. }), this.content.messageList = _2, this.content.title = d2, this.content.abstractList = p2, this.content.compatibleText = g2, this.content.version = h2 || 0;
  51633. }
  51634. }
  51635. return a(e2, [{ key: "sendable", value: function() {
  51636. return !zt(this.content.messageList) || !zt(this.content.downloadKey);
  51637. } }]), e2;
  51638. }(), Ka = { 1: E.MSG_PRIORITY_HIGH, 2: E.MSG_PRIORITY_NORMAL, 3: E.MSG_PRIORITY_LOW, 4: E.MSG_PRIORITY_LOWEST }, Wa = function() {
  51639. function e2(t2) {
  51640. o(this, e2), this.ID = "", this.conversationID = t2.conversationID || null, this.conversationType = t2.conversationType || E.CONV_C2C, this.conversationSubType = t2.conversationSubType, this.time = t2.time || Math.ceil(Date.now() / 1e3), this.sequence = t2.sequence || 0, this.clientSequence = t2.clientSequence || t2.sequence || 0, this.random = t2.random || 0 === t2.random ? t2.random : _t(), this.priority = this._computePriority(t2.priority), this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.isPeerRead = false, this.nameCard = "", this._elements = [], this.isPlaceMessage = t2.isPlaceMessage || 0, this.isRevoked = 2 === t2.isPlaceMessage || 8 === t2.msgFlagBits, this.from = t2.from || null, this.to = t2.to || null, this.flow = "", this.isSystemMessage = t2.isSystemMessage || false, this.protocol = t2.protocol || "JSON", this.isResend = false, this.isRead = false, this.status = t2.status || Qt.SUCCESS, this._onlineOnlyFlag = false, this._groupAtInfoList = [], this._relayFlag = false, this.atUserList = [], this.cloudCustomData = t2.cloudCustomData || "", this.isDeleted = false, this.isModified = false, this._isExcludedFromUnreadCount = !(!t2.messageControlInfo || 1 !== t2.messageControlInfo.excludedFromUnreadCount), this._isExcludedFromLastMessage = !(!t2.messageControlInfo || 1 !== t2.messageControlInfo.excludedFromLastMessage), this.clientTime = t2.clientTime || we() || 0, this.senderTinyID = t2.senderTinyID || t2.tinyID || "", this.readReceiptInfo = t2.readReceiptInfo || { readCount: void 0, unreadCount: void 0, isPeerRead: void 0 }, this.needReadReceipt = true === t2.needReadReceipt || 1 === t2.needReadReceipt, this.version = t2.messageVersion || 0, this.isBroadcastMessage = t2.isBroadcastMessage || false, this._receiverList = t2.receiverList || void 0, this.isSupportExtension = true === t2.isSupportExtension || 1 === t2.isSupportExtension, this.revoker = t2.revokerInfo && t2.revokerInfo.revoker || null, this.reInitialize(t2.currentUser), this.extractGroupInfo(t2.groupProfile || null), this.handleGroupAtInfo(t2), this.initC2CReadReceiptInfo(t2.readReceiptSentByPeer);
  51641. }
  51642. return a(e2, [{ key: "elements", get: function() {
  51643. return this._elements;
  51644. } }, { key: "getElements", value: function() {
  51645. return this._elements;
  51646. } }, { key: "extractGroupInfo", value: function(e3) {
  51647. if (null !== e3) {
  51648. nt(e3.nick) && (this.nick = e3.nick), nt(e3.avatar) && (this.avatar = e3.avatar);
  51649. var t2 = e3.messageFromAccountExtraInformation;
  51650. st(t2) && nt(t2.nameCard) && (this.nameCard = t2.nameCard);
  51651. }
  51652. } }, { key: "handleGroupAtInfo", value: function(e3) {
  51653. var t2 = this;
  51654. e3.payload && e3.payload.atUserList && e3.payload.atUserList.forEach(function(e4) {
  51655. e4 !== E.MSG_AT_ALL ? (t2._groupAtInfoList.push({ groupAtAllFlag: 0, groupAtUserID: e4 }), t2.atUserList.push(e4)) : (t2._groupAtInfoList.push({ groupAtAllFlag: 1 }), t2.atUserList.push(E.MSG_AT_ALL));
  51656. }), at(e3.groupAtInfo) && e3.groupAtInfo.forEach(function(e4) {
  51657. 0 === e4.groupAtAllFlag ? t2.atUserList.push(e4.groupAtUserID) : 1 === e4.groupAtAllFlag && t2.atUserList.push(E.MSG_AT_ALL);
  51658. });
  51659. } }, { key: "getGroupAtInfoList", value: function() {
  51660. return this._groupAtInfoList;
  51661. } }, { key: "_initProxy", value: function() {
  51662. this._elements[0] && (this.payload = this._elements[0].content, this.type = this._elements[0].type);
  51663. } }, { key: "reInitialize", value: function(e3) {
  51664. e3 && (this.status = this.from ? Qt.SUCCESS : Qt.UNSEND, !this.from && (this.from = e3)), this._initFlow(e3), this._initSequence(e3), this._concatConversationID(e3), this.generateMessageID();
  51665. } }, { key: "isSendable", value: function() {
  51666. return 0 !== this._elements.length && ("function" == typeof this._elements[0].sendable && this._elements[0].sendable());
  51667. } }, { key: "_initTo", value: function(e3) {
  51668. this.conversationType === E.CONV_GROUP && (this.to = e3.groupID);
  51669. } }, { key: "_initSequence", value: function(e3) {
  51670. 0 === this.clientSequence && e3 && (this.clientSequence = function(e4) {
  51671. if (!e4)
  51672. return false;
  51673. if (void 0 === Mt[e4]) {
  51674. var t2 = /* @__PURE__ */ new Date(), n2 = "3".concat(t2.getHours()).slice(-2), o2 = "0".concat(t2.getMinutes()).slice(-2), s2 = "0".concat(t2.getSeconds()).slice(-2);
  51675. Mt[e4] = parseInt([n2, o2, s2, "0001"].join("")), n2 = null, o2 = null, s2 = null, Ve.l("autoIncrementIndex start index:".concat(Mt[e4]));
  51676. }
  51677. return Mt[e4]++;
  51678. }(e3)), 0 === this.sequence && this.conversationType === E.CONV_C2C && (this.sequence = this.clientSequence);
  51679. } }, { key: "generateMessageID", value: function() {
  51680. this.from === E.CONV_SYSTEM && (this.senderTinyID = "144115198244471703"), this.ID = "".concat(this.senderTinyID, "-").concat(this.clientTime, "-").concat(this.random);
  51681. } }, { key: "_initFlow", value: function(e3) {
  51682. "" !== e3 && (e3 === this.from ? (this.flow = "out", this.isRead = true) : this.flow = "in");
  51683. } }, { key: "_concatConversationID", value: function(e3) {
  51684. var t2 = this.to, n2 = "", o2 = this.conversationType;
  51685. o2 !== E.CONV_SYSTEM ? (n2 = o2 === E.CONV_C2C ? e3 === this.from ? t2 : this.from : this.to, this.conversationID = n2 ? "".concat(o2).concat(n2) : null) : this.conversationID = E.CONV_SYSTEM;
  51686. } }, { key: "isElement", value: function(e3) {
  51687. return e3 instanceof Ra || e3 instanceof Na || e3 instanceof Oa || e3 instanceof Ga || e3 instanceof Fa || e3 instanceof xa || e3 instanceof Pa || e3 instanceof wa || e3 instanceof qa || e3 instanceof Va || e3 instanceof Ha;
  51688. } }, { key: "setElement", value: function(e3, t2) {
  51689. var n2 = this;
  51690. if (this.isElement(e3))
  51691. return this._elements = [e3], void this._initProxy();
  51692. var o2 = function(e4) {
  51693. if (e4.type && e4.content)
  51694. switch (e4.type) {
  51695. case E.MSG_TEXT:
  51696. n2.setTextElement(e4.content);
  51697. break;
  51698. case E.MSG_IMAGE:
  51699. n2.setImageElement(e4.content, t2);
  51700. break;
  51701. case E.MSG_AUDIO:
  51702. n2.setAudioElement(e4.content, t2);
  51703. break;
  51704. case E.MSG_FILE:
  51705. n2.setFileElement(e4.content, t2);
  51706. break;
  51707. case E.MSG_VIDEO:
  51708. n2.setVideoElement(e4.content, t2);
  51709. break;
  51710. case E.MSG_CUSTOM:
  51711. n2.setCustomElement(e4.content);
  51712. break;
  51713. case E.MSG_LOCATION:
  51714. n2.setLocationElement(e4.content);
  51715. break;
  51716. case E.MSG_GRP_TIP:
  51717. n2.setGroupTipElement(e4.content);
  51718. break;
  51719. case E.MSG_GRP_SYS_NOTICE:
  51720. n2.setGroupSystemNoticeElement(e4.content);
  51721. break;
  51722. case E.MSG_FACE:
  51723. n2.setFaceElement(e4.content);
  51724. break;
  51725. case E.MSG_MERGER:
  51726. n2.setMergerElement(e4.content, t2);
  51727. }
  51728. };
  51729. if (at(e3))
  51730. for (var s2 = 0; s2 < e3.length; s2++)
  51731. o2(e3[s2]);
  51732. else
  51733. o2(e3);
  51734. this._initProxy();
  51735. } }, { key: "clearElement", value: function() {
  51736. this._elements.length = 0;
  51737. } }, { key: "setTextElement", value: function(e3) {
  51738. var t2 = "string" == typeof e3 ? e3 : e3.text, n2 = new Ra({ text: t2 });
  51739. this._elements.push(n2);
  51740. } }, { key: "setImageElement", value: function(e3, t2) {
  51741. var n2 = new Na(e3, t2);
  51742. this._elements.push(n2);
  51743. } }, { key: "setAudioElement", value: function(e3, t2) {
  51744. var n2 = new Ga(e3, t2);
  51745. this._elements.push(n2);
  51746. } }, { key: "setFileElement", value: function(e3, t2) {
  51747. var n2 = new Fa(e3, t2);
  51748. this._elements.push(n2);
  51749. } }, { key: "setVideoElement", value: function(e3, t2) {
  51750. var n2 = new xa(e3, t2);
  51751. this._elements.push(n2);
  51752. } }, { key: "setLocationElement", value: function(e3) {
  51753. var t2 = new Va(e3);
  51754. this._elements.push(t2);
  51755. } }, { key: "setCustomElement", value: function(e3) {
  51756. var t2 = new qa(e3);
  51757. this._elements.push(t2);
  51758. } }, { key: "setGroupTipElement", value: function(e3) {
  51759. var t2 = {}, n2 = e3.operationType;
  51760. if (zt(e3.memberInfoList) ? e3.operatorInfo && (t2 = e3.operatorInfo) : n2 !== E.GRP_TIP_MBR_JOIN && n2 !== E.GRP_TIP_MBR_KICKED_OUT && n2 !== E.GRP_TIP_MBR_SET_ADMIN && n2 !== E.GRP_TIP_MBR_CANCELED_ADMIN || (t2 = e3.memberInfoList[0]), !zt(e3.memberExtraInfo)) {
  51761. var o2 = e3.memberExtraInfo.reason;
  51762. e3.msgMemberInfo.forEach(function(e4) {
  51763. e4.reason = o2;
  51764. });
  51765. }
  51766. var s2 = t2, a2 = s2.nick, i2 = s2.avatar;
  51767. nt(a2) && (this.nick = a2), nt(i2) && (this.avatar = i2);
  51768. var r2 = new Pa(e3);
  51769. this._elements.push(r2);
  51770. } }, { key: "setGroupSystemNoticeElement", value: function(e3) {
  51771. var t2 = new wa(e3);
  51772. this._elements.push(t2);
  51773. } }, { key: "setFaceElement", value: function(e3) {
  51774. var t2 = new Oa(e3);
  51775. this._elements.push(t2);
  51776. } }, { key: "setMergerElement", value: function(e3, t2) {
  51777. var n2 = new Ha(e3, t2);
  51778. this._elements.push(n2);
  51779. } }, { key: "setIsRead", value: function(e3) {
  51780. this.isRead = e3;
  51781. } }, { key: "setRelayFlag", value: function(e3) {
  51782. this._relayFlag = e3;
  51783. } }, { key: "getRelayFlag", value: function() {
  51784. return this._relayFlag;
  51785. } }, { key: "_computePriority", value: function(e3) {
  51786. if (it(e3))
  51787. return E.MSG_PRIORITY_NORMAL;
  51788. if (nt(e3) && -1 !== Object.values(Ka).indexOf(e3))
  51789. return e3;
  51790. if (et(e3)) {
  51791. var t2 = "" + e3;
  51792. if (-1 !== Object.keys(Ka).indexOf(t2))
  51793. return Ka[t2];
  51794. }
  51795. return E.MSG_PRIORITY_NORMAL;
  51796. } }, { key: "setNickAndAvatar", value: function(e3) {
  51797. var t2 = e3.nick, n2 = e3.avatar;
  51798. nt(t2) && (this.nick = t2), nt(n2) && (this.avatar = n2);
  51799. } }, { key: "setNameCard", value: function(e3) {
  51800. nt(e3) && (this.nameCard = e3);
  51801. } }, { key: "initC2CReadReceiptInfo", value: function(e3) {
  51802. this.conversationType === E.CONV_C2C && true === this.needReadReceipt && (this.readReceiptInfo.isPeerRead = 1 === e3);
  51803. } }]), e2;
  51804. }(), Ya = function(e2) {
  51805. return { code: 0, data: e2 || {} };
  51806. }, ja = function(e2) {
  51807. r(n2, e2);
  51808. var t2 = f(n2);
  51809. function n2(e3) {
  51810. var s2;
  51811. o(this, n2), s2 = t2.call(this);
  51812. var a2 = e3.code, i2 = e3.message, r2 = e3.data;
  51813. return s2.code = a2, s2.message = i2 || s2._getErrorMessage(s2.code), s2.data = r2 || {}, s2;
  51814. }
  51815. return a(n2);
  51816. }(p(Error)), za = null, Ja = function(e2) {
  51817. za = e2;
  51818. }, Xa = function(e2) {
  51819. return Promise.resolve(Ya(e2));
  51820. }, Za = function(e2) {
  51821. var t2 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  51822. if (e2 instanceof ja)
  51823. return t2 && null !== za && za.emit(k.ERROR, e2), Promise.reject(e2);
  51824. if (e2 instanceof Error) {
  51825. var n2 = new ja({ code: ha.UNCAUGHT_ERROR });
  51826. return t2 && null !== za && za.emit(k.ERROR, n2), Promise.reject(n2);
  51827. }
  51828. if (!it(e2) && !it(e2.code)) {
  51829. var o2 = new ja(e2);
  51830. return t2 && null !== za && za.emit(k.ERROR, o2), Promise.reject(o2);
  51831. }
  51832. }, Qa = function(e2) {
  51833. r(s2, e2);
  51834. var n2 = f(s2);
  51835. function s2(e3) {
  51836. var t2;
  51837. return o(this, s2), (t2 = n2.call(this, e3))._n = "C2CModule", t2._messageFromUnreadDBMap = /* @__PURE__ */ new Map(), t2._signalingFromUnreadDBList = [], t2;
  51838. }
  51839. return a(s2, [{ key: "onNewC2CMessage", value: function(e3) {
  51840. var t2 = e3.dataList, n3 = e3.isInstantMessage, o2 = e3.C2CRemainingUnreadList, s3 = e3.C2CPairUnreadList;
  51841. Ve.d("".concat(this._n, ".onNewC2CMessage count:").concat(t2.length, " isInstantMessage:").concat(n3));
  51842. var a2 = this._newC2CMessageStoredAndSummary({ dataList: t2, C2CRemainingUnreadList: o2, C2CPairUnreadList: s3, isInstantMessage: n3 }), i2 = a2.conversationOptionsList, r2 = a2.messageList, u2 = a2.isUnreadC2CMessage;
  51843. (this.filterModifiedMessage(r2), i2.length > 0) && this.getModule(qn).onNewMessage({ conversationOptionsList: i2, isInstantMessage: n3, isUnreadC2CMessage: u2 });
  51844. var c2 = this.filterUnmodifiedMessage(r2);
  51845. n3 && c2.length > 0 && this.emitOuterEvent(k.MESSAGE_RECEIVED, c2), r2.length = 0;
  51846. } }, { key: "_newC2CMessageStoredAndSummary", value: function(e3) {
  51847. for (var t2 = e3.dataList, n3 = e3.C2CRemainingUnreadList, o2 = e3.C2CPairUnreadList, s3 = e3.isInstantMessage, a2 = null, i2 = [], r2 = [], u2 = {}, c2 = this.getModule(Kn), l2 = this.getModule(eo), d2 = false, p2 = this.getModule(qn), g2 = this.getFileDownloadProxy(), h2 = 0, _2 = t2.length; h2 < _2; h2++)
  51848. if (this._isSignaling(t2[h2]))
  51849. this._signalingFromUnreadDBList.push(t2[h2].eventArray[0].c2CNotifyMsgArray[0]);
  51850. else {
  51851. var f2 = t2[h2];
  51852. f2.currentUser = this.getMyUserID(), f2.conversationType = E.CONV_C2C, f2.isSystemMessage = !!f2.isSystemMessage, (it(f2.nick) || it(f2.avatar)) && (d2 = true, Ve.d("".concat(this._n, "._newC2CMessageStoredAndSummary nick or avatar missing!"))), a2 = new Wa(f2), f2.elements = c2.parseElements(f2.elements, f2.from), a2.setElement(f2.elements, g2), a2.setNickAndAvatar({ nick: f2.nick, avatar: f2.avatar });
  51853. var v2 = a2.conversationID;
  51854. if (s3) {
  51855. if (1 === this._messageFromUnreadDBMap.get(a2.ID))
  51856. continue;
  51857. var m2 = false;
  51858. if (a2.from !== this.getMyUserID()) {
  51859. var M2 = p2.getLatestMessageSentByPeer(v2);
  51860. if (M2) {
  51861. var y2 = M2.nick, I2 = M2.avatar;
  51862. d2 ? a2.setNickAndAvatar({ nick: y2, avatar: I2 }) : y2 === a2.nick && I2 === a2.avatar || (m2 = true);
  51863. }
  51864. } else {
  51865. var C2 = p2.getLatestMessageSentByMe(v2);
  51866. if (C2) {
  51867. var T2 = C2.nick, D2 = C2.avatar;
  51868. T2 === a2.nick && D2 === a2.avatar || p2.modifyMessageSentByMe({ conversationID: v2, latestNick: a2.nick, latestAvatar: a2.avatar });
  51869. }
  51870. }
  51871. var k2 = 1 === t2[h2].isModified;
  51872. if (p2.isMessageSentByCurrentInstance(a2) ? a2.isModified = k2 : k2 = false, 0 === f2.msgLifeTime)
  51873. a2._onlineOnlyFlag = true, p2.isMessageSentByCurrentInstance(a2) || r2.push(a2);
  51874. else {
  51875. if (!p2.pushIntoMessageList(r2, a2, k2))
  51876. continue;
  51877. m2 && (p2.modifyMessageSentByPeer({ conversationID: v2, latestNick: a2.nick, latestAvatar: a2.avatar }), p2.updateUserProfileSpecifiedKey({ conversationID: v2, nick: a2.nick, avatar: a2.avatar }));
  51878. }
  51879. s3 && a2.clientTime > 0 && l2.addMessageDelay(a2.clientTime);
  51880. } else
  51881. this._messageFromUnreadDBMap.set(a2.ID, 1);
  51882. if (0 !== f2.msgLifeTime) {
  51883. if (false === a2._onlineOnlyFlag) {
  51884. var S2 = p2.getLastMessageTime(v2);
  51885. if (et(S2) && a2.time < S2)
  51886. continue;
  51887. if (it(u2[v2])) {
  51888. var L2 = 0;
  51889. "in" === a2.flow && (a2._isExcludedFromUnreadCount || (L2 = 1)), u2[v2] = i2.push({ conversationID: v2, unreadCount: L2, type: a2.conversationType, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1;
  51890. } else {
  51891. var A2 = u2[v2];
  51892. i2[A2].type = a2.conversationType, i2[A2].subType = a2.conversationSubType, i2[A2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || i2[A2].unreadCount++);
  51893. }
  51894. }
  51895. } else
  51896. a2._onlineOnlyFlag = true;
  51897. }
  51898. this._handleSignalingFromUnreadDB();
  51899. var R2 = false;
  51900. if (at(o2))
  51901. for (var N2 = function(e4, t3) {
  51902. if (o2[e4].unreadCount > 0) {
  51903. R2 = true;
  51904. var n4 = i2.find(function(t4) {
  51905. return t4.conversationID === "C2C".concat(o2[e4].from);
  51906. });
  51907. n4 ? n4.unreadCount = o2[e4].unreadCount : i2.push({ conversationID: "C2C".concat(o2[e4].from), unreadCount: o2[e4].unreadCount, type: E.CONV_C2C });
  51908. }
  51909. }, O2 = 0, G2 = o2.length; O2 < G2; O2++)
  51910. N2(O2);
  51911. if (at(n3))
  51912. for (var U2 = function(e4, t3) {
  51913. i2.find(function(t4) {
  51914. return t4.conversationID === "C2C".concat(n3[e4].from);
  51915. }) || i2.push({ conversationID: "C2C".concat(n3[e4].from), type: E.CONV_C2C, lastMsgTime: n3[e4].lastMsgTime });
  51916. }, P2 = 0, b2 = n3.length; P2 < b2; P2++)
  51917. U2(P2);
  51918. return { conversationOptionsList: i2, messageList: r2, isUnreadC2CMessage: R2 };
  51919. } }, { key: "_isSignaling", value: function(e3) {
  51920. var t2 = e3.eventArray;
  51921. return !(!at(t2) || 10 !== t2[0].event);
  51922. } }, { key: "_handleSignalingFromUnreadDB", value: function() {
  51923. var e3 = this._signalingFromUnreadDBList.length;
  51924. if (Ve.l("".concat(this._n, "._handleSignalingFromUnreadDB signalingCount:").concat(e3)), 0 !== e3) {
  51925. var t2 = [];
  51926. this._signalingFromUnreadDBList.forEach(function(e4) {
  51927. e4.hasOwnProperty("c2cMessageRevokedNotify") && t2.push(e4);
  51928. }), this.onC2CMessageRevoked({ dataList: t2 }), this._signalingFromUnreadDBList.length = 0, t2.length = 0;
  51929. }
  51930. } }, { key: "onC2CMessageRevoked", value: function(e3) {
  51931. var t2 = this, n3 = this.getModule(qn), o2 = [], s3 = null, a2 = true;
  51932. e3.dataList.forEach(function(e4) {
  51933. if (e4.c2cMessageRevokedNotify) {
  51934. var i2 = e4.c2cMessageRevokedNotify.revokedInfos;
  51935. it(i2) || i2.forEach(function(e5) {
  51936. var i3 = t2.getMyUserID() === e5.from ? "".concat(E.CONV_C2C).concat(e5.to) : "".concat(E.CONV_C2C).concat(e5.from);
  51937. s3 = n3.revoke(i3, e5.sequence, e5.random);
  51938. var r2 = e5.revokerInfo && e5.revokerInfo.revoker;
  51939. if (s3)
  51940. s3.revoker || (s3.revoker = r2, o2.push(s3));
  51941. else {
  51942. var u2 = { conversationID: i3, sequence: e5.sequence, time: e5.time, revoker: r2 };
  51943. n3.isLastMessageRevoked(u2) && (o2.push(u2), a2 = false);
  51944. }
  51945. });
  51946. }
  51947. }), 0 !== o2.length && (n3.onMessageRevoked(o2), true === a2 && (Ve.l("".concat(this._n, ".onC2CMessageRevoked count:").concat(o2.length)), this.emitOuterEvent(k.MESSAGE_REVOKED, o2)));
  51948. } }, { key: "onC2CMessageReadReceipt", value: function(e3) {
  51949. var t2 = this;
  51950. e3.dataList.forEach(function(e4) {
  51951. if (!zt(e4.c2cMessageReadReceipt)) {
  51952. var n3 = e4.c2cMessageReadReceipt.to;
  51953. e4.c2cMessageReadReceipt.uinPairReadArray.forEach(function(e5) {
  51954. var o2 = e5.peerReadTime;
  51955. Ve.d("".concat(t2._n, "._onC2CMessageReadReceipt to:").concat(n3, " peerReadTime:").concat(o2));
  51956. var s3 = "".concat(E.CONV_C2C).concat(n3), a2 = t2.getModule(qn);
  51957. a2.recordPeerReadTime(s3, o2), a2.updateMessageIsPeerReadProperty(s3, o2);
  51958. });
  51959. }
  51960. });
  51961. } }, { key: "onC2CMessageReadNotice", value: function(e3) {
  51962. var t2 = this;
  51963. e3.dataList.forEach(function(e4) {
  51964. if (!zt(e4.c2cMessageReadNotice)) {
  51965. var n3 = t2.getModule(qn);
  51966. e4.c2cMessageReadNotice.uinPairReadArray.forEach(function(e5) {
  51967. var o2 = e5.from, s3 = e5.peerReadTime;
  51968. Ve.d("".concat(t2._n, ".onC2CMessageReadNotice from:").concat(o2, " lastReadTime:").concat(s3));
  51969. var a2 = "".concat(E.CONV_C2C).concat(o2);
  51970. n3.updateIsReadAfterReadReport({ conversationID: a2, lastMessageTime: s3 }), n3.updateUnreadCount(a2);
  51971. });
  51972. }
  51973. });
  51974. } }, { key: "onC2CMessageModified", value: function(e3) {
  51975. Ve.d("".concat(this._n, ".onC2CMessageModified options:"), JSON.stringify(e3));
  51976. var n3 = this.getModule(qn);
  51977. e3.dataList.forEach(function(e4) {
  51978. n3.onMessageModified(t(t({}, e4), {}, { conversationType: E.CONV_C2C }));
  51979. });
  51980. } }, { key: "onReadReceiptList", value: function(e3) {
  51981. Ve.d("".concat(this._n, ".onReadReceiptList options:"), JSON.stringify(e3));
  51982. var t2 = e3.dataList, n3 = t2.userID, o2 = t2.readReceiptList;
  51983. this.getModule(qn).updateReadReceiptInfo({ userID: n3, readReceiptList: o2 });
  51984. } }, { key: "sendMessage", value: function(e3, t2) {
  51985. var n3 = this._createC2CMessagePack(e3, t2);
  51986. return this.request(n3);
  51987. } }, { key: "_createC2CMessagePack", value: function(e3, t2) {
  51988. var n3 = null;
  51989. t2 && (t2.offlinePushInfo && (n3 = t2.offlinePushInfo), true === t2.onlineUserOnly && (n3 ? n3.disablePush = true : n3 = { disablePush: true }));
  51990. var o2 = "";
  51991. nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (o2 = e3.cloudCustomData);
  51992. var s3 = [];
  51993. if (st(t2) && st(t2.messageControlInfo)) {
  51994. var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
  51995. true === i2 && s3.push("NoUnread"), true === r2 && s3.push("NoLastMsg"), true === u2 && s3.push("NoMsgCheck");
  51996. }
  51997. var c2 = this.isOnlineMessage(e3, t2) ? 0 : void 0;
  51998. return { protocolName: fo, tjgID: this.generateTjgID(e3), requestData: { fromAccount: this.getMyUserID(), toAccount: e3.to, msgBody: e3.getElements(), cloudCustomData: o2, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: c2, nick: e3.nick, avatar: e3.avatar, offlinePushInfo: n3 ? { pushFlag: true === n3.disablePush ? 1 : 0, title: n3.title || "", desc: n3.description || "", ext: n3.extension || "", apnsInfo: { badgeMode: true === n3.ignoreIOSBadge ? 1 : 0, isVoipPush: this._isVoipPush(n3) }, androidInfo: { OPPOChannelID: n3.androidOPPOChannelID || "" } } : void 0, messageControlInfo: 0 !== c2 ? s3 : void 0, clientTime: e3.clientTime, needReadReceipt: true === e3.needReadReceipt ? 1 : 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 } };
  51999. } }, { key: "_isVoipPush", value: function(e3) {
  52000. var t2 = void 0;
  52001. return it(e3.disableVoipPush) || (t2 = false === e3.disableVoipPush ? 1 : 0), t2;
  52002. } }, { key: "isOnlineMessage", value: function(e3, t2) {
  52003. return !(!t2 || true !== t2.onlineUserOnly);
  52004. } }, { key: "revokeMessage", value: function(e3) {
  52005. return this.request({ protocolName: To, requestData: { msgInfo: { fromAccount: e3.from, toAccount: e3.to, msgSeq: e3.sequence, msgRandom: e3.random, msgTimeStamp: e3.time } } });
  52006. } }, { key: "deleteMessage", value: function(e3) {
  52007. var t2 = e3.to, n3 = e3.keyList;
  52008. return Ve.l("".concat(this._n, ".deleteMessage toAccount:").concat(t2, " count:").concat(n3.length)), this.request({ protocolName: Ao, requestData: { fromAccount: this.getMyUserID(), to: t2, keyList: n3 } });
  52009. } }, { key: "modifyRemoteMessage", value: function(e3) {
  52010. var t2 = e3.from, n3 = e3.to, o2 = e3.version, s3 = void 0 === o2 ? 0 : o2, a2 = e3.sequence, i2 = e3.random, r2 = e3.time, u2 = e3.payload, c2 = e3.type, l2 = e3.cloudCustomData, d2 = void 0;
  52011. return Bt(c2) && (d2 = []).push({ type: c2, content: u2 }), this.request({ protocolName: Ro, requestData: { from: t2, to: n3, version: s3, sequence: a2, random: i2, time: r2, elements: d2, cloudCustomData: l2 } });
  52012. } }, { key: "setMessageRead", value: function(e3) {
  52013. var t2 = this, n3 = e3.conversationID, o2 = e3.lastMessageTime, s3 = "".concat(this._n, ".setMessageRead");
  52014. Ve.l("".concat(s3, " conversationID:").concat(n3, " lastMessageTime:").concat(o2)), et(o2) || this.outputWarning("DoNotModifyLastTime");
  52015. var a2 = new Aa("setC2CMessageRead");
  52016. return a2.setMessage("conversationID:".concat(n3, " lastMessageTime:").concat(o2)), this.request({ protocolName: Do, requestData: { C2CMsgReaded: { cookie: "", C2CMsgReadedItem: [{ toAccount: n3.replace("C2C", ""), lastMessageTime: o2, receipt: 1 }] } } }).then(function() {
  52017. a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok"));
  52018. var e4 = t2.getModule(qn);
  52019. return e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageTime: o2 }), e4.updateUnreadCount(n3), Ya();
  52020. }).catch(function(e4) {
  52021. return t2.probeNetwork().then(function(t3) {
  52022. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  52023. a2.setError(e4, o3, s4).end();
  52024. }), Ve.l("".concat(s3, " failed. error:"), e4), Za(e4);
  52025. });
  52026. } }, { key: "getRoamingMessage", value: function(e3) {
  52027. var t2 = this, n3 = "".concat(this._n, ".getRoamingMessage"), o2 = e3.peerAccount, s3 = e3.conversationID, a2 = e3.count, i2 = e3.lastMessageTime, r2 = e3.messageKey, u2 = "peerAccount:".concat(o2, " count:").concat(a2 || 15, " lastMessageTime:").concat(i2 || 0, " messageKey:").concat(r2);
  52028. Ve.l("".concat(n3, " ").concat(u2));
  52029. var c2 = new Aa("getC2CRoamingMessages");
  52030. return this.request({ protocolName: So, requestData: { peerAccount: o2, count: a2 || 15, lastMessageTime: i2 || 0, messageKey: r2 } }).then(function(e4) {
  52031. var o3 = e4.data, a3 = o3.complete, i3 = o3.messageList, r3 = o3.messageKey, l2 = o3.lastMessageTime;
  52032. it(i3) ? Ve.l("".concat(n3, " ok. complete:").concat(a3, " but messageList is undefined!")) : Ve.l("".concat(n3, " ok. complete:").concat(a3, " count:").concat(i3.length)), c2.setNetworkType(t2.getNetworkType()).setMessage("".concat(u2, " complete:").concat(a3, " length:").concat(i3.length)).end();
  52033. var d2 = t2.getModule(qn);
  52034. 1 === a3 && d2.setCompleted(s3);
  52035. var p2 = d2.onRoamingMessage(i3, s3);
  52036. d2.modifyMessageList(s3), d2.updateIsRead(s3), d2.updateRoamingMessageKeyAndTime(s3, r3, l2);
  52037. var g2 = d2.getPeerReadTime(s3);
  52038. if (Ve.l("".concat(n3, " update isPeerRead property. conversationID:").concat(s3, " peerReadTime:").concat(g2)), g2)
  52039. d2.updateMessageIsPeerReadProperty(s3, g2);
  52040. else {
  52041. var h2 = s3.replace(E.CONV_C2C, "");
  52042. t2.getRemotePeerReadTime([h2]).then(function() {
  52043. d2.updateMessageIsPeerReadProperty(s3, d2.getPeerReadTime(s3));
  52044. });
  52045. }
  52046. var _2 = "";
  52047. if (p2.length > 0)
  52048. _2 = p2[0].ID;
  52049. else {
  52050. var f2 = d2.getLocalOldestMessage(s3);
  52051. f2 && (_2 = f2.ID);
  52052. }
  52053. return Ve.l("".concat(n3, " nextReqID:").concat(_2, " stored message count:").concat(p2.length)), { nextReqID: _2, storedMessageList: p2 };
  52054. }).catch(function(e4) {
  52055. return t2.probeNetwork().then(function(t3) {
  52056. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  52057. c2.setMessage(u2).setError(e4, o3, s4).end();
  52058. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  52059. });
  52060. } }, { key: "getRoamingMessagesHopping", value: function(e3) {
  52061. var t2 = this, n3 = "".concat(this._n, ".getRoamingMessagesHopping"), o2 = e3.peerAccount, s3 = e3.time, a2 = void 0 === s3 ? 0 : s3, i2 = e3.count, r2 = e3.direction, u2 = "".concat(E.CONV_C2C).concat(o2), c2 = "peerAccount:".concat(o2, " count:").concat(i2, " time:").concat(a2, " direction:").concat(r2);
  52062. Ve.l("".concat(n3, " ").concat(c2));
  52063. var l2 = new Aa("getC2CRoamingMessagesHopping");
  52064. return this.request({ protocolName: So, requestData: { peerAccount: o2, count: i2 + 1, lastMessageTime: a2, direction: r2 } }).then(function(e4) {
  52065. var o3 = e4.data, s4 = o3.complete, a3 = o3.messageList, i3 = void 0 === a3 ? [] : a3, d2 = o3.lastMessageTime;
  52066. Ve.l("".concat(n3, " ok. complete:").concat(s4, " count:").concat(i3.length)), l2.setNetworkType(t2.getNetworkType()).setMessage("".concat(c2, " complete:").concat(s4, " length:").concat(i3.length)).end(), 1 !== s4 && (1 === r2 ? i3.pop() : i3.shift());
  52067. var p2 = t2.getModule(qn).onRoamingMessage(i3, u2, false);
  52068. t2._modifyMessageList(u2, p2);
  52069. var g2 = t2._computeResult({ complete: s4, lastMessageTime: d2, resultList: p2 });
  52070. return Ya(g2);
  52071. }).catch(function(e4) {
  52072. return t2.probeNetwork().then(function(t3) {
  52073. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  52074. l2.setMessage(c2).setError(e4, o3, s4).end();
  52075. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  52076. });
  52077. } }, { key: "_computeResult", value: function(e3) {
  52078. var t2 = e3.complete, n3 = void 0 === t2 ? 0 : t2, o2 = e3.lastMessageTime, s3 = e3.resultList, a2 = { messageList: m(void 0 === s3 ? [] : s3), isCompleted: false, nextMessageTime: "" };
  52079. return 1 === n3 ? (a2.isCompleted = true, a2) : (a2.nextMessageTime = o2, a2);
  52080. } }, { key: "_modifyMessageList", value: function(e3, t2) {
  52081. var n3 = this.getModule(qn).getLocalConversation(e3);
  52082. if (n3)
  52083. for (var o2 = n3.userProfile.nick, s3 = n3.userProfile.avatar, a2 = this.getModule(Gn).getNickAndAvatarByUserID(this.getMyUserID()), i2 = a2.nick, r2 = a2.avatar, u2 = t2.length - 1; u2 >= 0; u2--) {
  52084. var c2 = t2[u2];
  52085. "in" === c2.flow && (c2.nick !== o2 && c2.setNickAndAvatar({ nick: o2 }), c2.avatar !== s3 && c2.setNickAndAvatar({ avatar: s3 })), "out" === c2.flow && (c2.nick !== i2 && c2.setNickAndAvatar({ nick: i2 }), c2.avatar !== r2 && c2.setNickAndAvatar({ avatar: r2 }));
  52086. }
  52087. } }, { key: "getRemotePeerReadTime", value: function(e3) {
  52088. var t2 = this, n3 = "".concat(this._n, ".getRemotePeerReadTime");
  52089. if (zt(e3))
  52090. return Ve.w("".concat(n3, " userIDList is empty!")), Promise.resolve();
  52091. var o2 = new Aa("getPeerReadTime");
  52092. return Ve.l("".concat(n3, " userIDList:").concat(e3)), this.request({ protocolName: Lo, requestData: { userIDList: e3 } }).then(function(s3) {
  52093. var a2 = s3.data.peerReadTimeList;
  52094. Ve.l("".concat(n3, " ok. peerReadTimeList:").concat(a2));
  52095. for (var i2 = "", r2 = t2.getModule(qn), u2 = 0; u2 < e3.length; u2++)
  52096. i2 += "".concat(e3[u2], "-").concat(a2[u2], " "), a2[u2] > 0 && r2.recordPeerReadTime("C2C".concat(e3[u2]), a2[u2]);
  52097. o2.setNetworkType(t2.getNetworkType()).setMessage(i2).end();
  52098. }).catch(function(e4) {
  52099. t2.probeNetwork().then(function(t3) {
  52100. var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1];
  52101. o2.setError(e4, s3, a2).end();
  52102. }), Ve.w("".concat(n3, " failed. error:"), e4);
  52103. });
  52104. } }, { key: "sendReadReceipt", value: function(e3) {
  52105. var t2 = this, n3 = e3[0].conversationID.replace(E.CONV_C2C, ""), o2 = new Aa("sendC2CReadReceipt");
  52106. o2.setMessage("peerAccount:".concat(n3));
  52107. var s3 = this.getMyUserID(), a2 = e3.filter(function(e4) {
  52108. return e4.from !== s3 && true === e4.needReadReceipt;
  52109. }).map(function(e4) {
  52110. return { fromAccount: e4.from, toAccount: e4.to, sequence: e4.sequence, random: e4.random, time: e4.time, clientTime: e4.clientTime };
  52111. });
  52112. if (0 === a2.length)
  52113. return Za({ code: ha.READ_RECEIPT_MESSAGE_LIST_EMPTY });
  52114. var i2 = "".concat(this._n, ".sendReadReceipt");
  52115. return Ve.l("".concat(i2, ". peerAccount:").concat(n3, " messageInfoList length:").concat(a2.length)), this.request({ protocolName: ps, requestData: { peerAccount: n3, messageInfoList: a2 } }).then(function(e4) {
  52116. return o2.end(), Ve.l("".concat(i2, " ok")), Ya();
  52117. }).catch(function(e4) {
  52118. return t2.probeNetwork().then(function(t3) {
  52119. var n4 = v(t3, 2), s4 = n4[0], a3 = n4[1];
  52120. o2.setError(e4, s4, a3).end();
  52121. }), Ve.w("".concat(i2, " failed. error:"), e4), Za(e4);
  52122. });
  52123. } }, { key: "getReadReceiptList", value: function(e3) {
  52124. var t2 = "".concat(this._n, ".getReadReceiptList"), n3 = this.getMyUserID(), o2 = e3.filter(function(e4) {
  52125. return e4.from === n3 && true === e4.needReadReceipt;
  52126. });
  52127. return Ve.l("".concat(t2, " userID:").concat(n3, " messageList length:").concat(o2.length)), Xa({ messageList: o2 });
  52128. } }, { key: "getMessageExtensions", value: function(e3, t2) {
  52129. return Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.request({ protocolName: Oo, requestData: { from: e3.from, to: e3.to, messageKey: this._getMessageKey(e3), startSequence: t2 } });
  52130. } }, { key: "modifyMessageExtensions", value: function(e3, t2) {
  52131. var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
  52132. return Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3)), this.request({ protocolName: No, requestData: { from: e3.from, to: e3.to, messageKey: this._getMessageKey(e3), extensionList: t2, operateType: n3 } });
  52133. } }, { key: "_getMessageKey", value: function(e3) {
  52134. var t2 = e3.clientSequence, n3 = e3.random, o2 = e3.time;
  52135. return "".concat(t2, "_").concat(n3, "_").concat(o2);
  52136. } }, { key: "reset", value: function() {
  52137. Ve.l("".concat(this._n, ".reset")), this._messageFromUnreadDBMap.clear(), this._signalingFromUnreadDBList.length = 0;
  52138. } }]), s2;
  52139. }(uo), $a = function() {
  52140. function e2() {
  52141. o(this, e2), this.list = /* @__PURE__ */ new Map(), this._n = "MessageListHandler", this._latestMessageSentByPeerMap = /* @__PURE__ */ new Map(), this._latestMessageSentByMeMap = /* @__PURE__ */ new Map();
  52142. }
  52143. return a(e2, [{ key: "getLocalOldestMessageByConversationID", value: function(e3) {
  52144. if (!e3)
  52145. return null;
  52146. if (!this.list.has(e3))
  52147. return null;
  52148. var t2 = this.list.get(e3).values();
  52149. return t2 ? t2.next().value : null;
  52150. } }, { key: "pushIn", value: function(e3) {
  52151. var t2 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], n2 = e3.conversationID, o2 = true;
  52152. this.list.has(n2) || this.list.set(n2, /* @__PURE__ */ new Map());
  52153. var s2 = this._getUniqueIDOfMessage(e3), a2 = this.list.get(n2).has(s2);
  52154. if (a2) {
  52155. var i2 = this.list.get(n2).get(s2);
  52156. if (!t2 || true === i2.isModified)
  52157. return o2 = false;
  52158. }
  52159. return this.list.get(n2).set(s2, e3), this._setLatestMessageSentByPeer(n2, e3), this._setLatestMessageSentByMe(n2, e3), o2;
  52160. } }, { key: "unshift", value: function(e3, t2) {
  52161. var n2;
  52162. if (at(e3) ? e3.length > 0 && (n2 = e3[0].conversationID, this._unshiftMultipleMessages(e3, t2)) : (n2 = e3.conversationID, this._unshiftSingleMessage(e3, t2)), n2 && n2.startsWith(E.CONV_C2C)) {
  52163. var o2 = Array.from(this.list.get(n2).values()), s2 = o2.length;
  52164. if (0 === s2)
  52165. return;
  52166. for (var a2 = s2 - 1; a2 >= 0; a2--)
  52167. if ("out" === o2[a2].flow) {
  52168. this._setLatestMessageSentByMe(n2, o2[a2]);
  52169. break;
  52170. }
  52171. for (var i2 = s2 - 1; i2 >= 0; i2--)
  52172. if ("in" === o2[i2].flow) {
  52173. this._setLatestMessageSentByPeer(n2, o2[i2]);
  52174. break;
  52175. }
  52176. }
  52177. } }, { key: "_unshiftSingleMessage", value: function(e3, t2) {
  52178. var n2 = e3.conversationID, o2 = this._getUniqueIDOfMessage(e3);
  52179. if (!this.list.has(n2))
  52180. return this.list.set(n2, /* @__PURE__ */ new Map()), this.list.get(n2).set(o2, e3), void t2.push(e3);
  52181. var s2 = this.list.get(n2), a2 = Array.from(s2);
  52182. s2.has(o2) || (a2.unshift([o2, e3]), this.list.set(n2, new Map(a2)), t2.push(e3));
  52183. } }, { key: "_unshiftMultipleMessages", value: function(e3, t2) {
  52184. for (var n2 = e3.length, o2 = [], s2 = e3[0].conversationID, a2 = this.list.get(s2), i2 = this.list.has(s2) ? Array.from(a2) : [], r2 = 0; r2 < n2; r2++) {
  52185. var u2 = this._getUniqueIDOfMessage(e3[r2]);
  52186. a2 && a2.has(u2) || (o2.push([u2, e3[r2]]), t2.push(e3[r2]));
  52187. }
  52188. this.list.set(s2, new Map(o2.concat(i2)));
  52189. } }, { key: "remove", value: function(e3) {
  52190. var t2 = e3.conversationID, n2 = this._getUniqueIDOfMessage(e3);
  52191. this.list.has(t2) && this.list.get(t2).delete(n2);
  52192. } }, { key: "revoke", value: function(e3, t2, n2) {
  52193. if (Ve.d("revoke message", e3, t2, n2), this.list.has(e3)) {
  52194. var o2, s2 = D(this.list.get(e3));
  52195. try {
  52196. for (s2.s(); !(o2 = s2.n()).done; ) {
  52197. var a2 = v(o2.value, 2)[1];
  52198. if (a2.sequence === t2 && (it(n2) || a2.random === n2))
  52199. return a2.isRevoked || (a2.isRevoked = true), a2;
  52200. }
  52201. } catch (i2) {
  52202. s2.e(i2);
  52203. } finally {
  52204. s2.f();
  52205. }
  52206. }
  52207. return null;
  52208. } }, { key: "removeByConversationID", value: function(e3) {
  52209. this.list.has(e3) && (this.list.delete(e3), this._latestMessageSentByPeerMap.delete(e3), this._latestMessageSentByMeMap.delete(e3));
  52210. } }, { key: "findMessage", value: function(e3) {
  52211. var t2, n2 = null, o2 = D(this.list);
  52212. try {
  52213. for (o2.s(); !(t2 = o2.n()).done; )
  52214. for (var s2 = m(v(t2.value, 2)[1].values()), a2 = s2.length, i2 = 0; i2 < a2; i2++)
  52215. if (s2[i2].ID === e3) {
  52216. n2 = s2[i2];
  52217. break;
  52218. }
  52219. } catch (r2) {
  52220. o2.e(r2);
  52221. } finally {
  52222. o2.f();
  52223. }
  52224. return n2;
  52225. } }, { key: "updateMessageIsPeerReadProperty", value: function(e3, t2) {
  52226. var n2 = [];
  52227. if (this.list.has(e3)) {
  52228. var o2, s2 = D(this.list.get(e3));
  52229. try {
  52230. for (s2.s(); !(o2 = s2.n()).done; ) {
  52231. var a2 = v(o2.value, 2)[1];
  52232. a2.time <= t2 && !a2.isPeerRead && "out" === a2.flow && (a2.isPeerRead = true, n2.push(a2));
  52233. }
  52234. } catch (i2) {
  52235. s2.e(i2);
  52236. } finally {
  52237. s2.f();
  52238. }
  52239. Ve.l("".concat(this._n, ".updateMessageIsPeerReadProperty conversationID:").concat(e3, " peerReadTime:").concat(t2, " count:").concat(n2.length));
  52240. }
  52241. return n2;
  52242. } }, { key: "updateMessageIsModifiedProperty", value: function(e3) {
  52243. var t2 = e3.conversationID;
  52244. if (this.list.has(t2)) {
  52245. var n2 = this._getUniqueIDOfMessage(e3), o2 = this.list.get(t2).get(n2);
  52246. o2 && (o2.isModified = true);
  52247. }
  52248. } }, { key: "hasLocalMessageList", value: function(e3) {
  52249. return this.list.has(e3);
  52250. } }, { key: "getLocalMessageList", value: function(e3) {
  52251. return this.hasLocalMessageList(e3) ? m(this.list.get(e3).values()) : [];
  52252. } }, { key: "hasLocalMessage", value: function(e3, t2) {
  52253. for (var n2 = false, o2 = this.getLocalMessageList(e3), s2 = o2.length, a2 = 0; a2 < s2; a2++)
  52254. o2[a2].ID === t2 && (n2 = true);
  52255. return n2;
  52256. } }, { key: "getLocalMessage", value: function(e3, t2) {
  52257. for (var n2 = null, o2 = this.getLocalMessageList(e3), s2 = o2.length, a2 = 0; a2 < s2; a2++)
  52258. if (o2[a2].ID === t2) {
  52259. n2 = o2[a2];
  52260. break;
  52261. }
  52262. return n2;
  52263. } }, { key: "getLocalLastMessage", value: function(e3) {
  52264. var t2 = this.getLocalMessageList(e3);
  52265. return t2[t2.length - 1];
  52266. } }, { key: "getLocalOldestMessage", value: function(e3) {
  52267. return this.getLocalMessageList(e3)[0];
  52268. } }, { key: "_setLatestMessageSentByPeer", value: function(e3, t2) {
  52269. e3.startsWith(E.CONV_C2C) && "in" === t2.flow && this._latestMessageSentByPeerMap.set(e3, t2);
  52270. } }, { key: "_setLatestMessageSentByMe", value: function(e3, t2) {
  52271. e3.startsWith(E.CONV_C2C) && "out" === t2.flow && this._latestMessageSentByMeMap.set(e3, t2);
  52272. } }, { key: "getLatestMessageSentByPeer", value: function(e3) {
  52273. return this._latestMessageSentByPeerMap.get(e3);
  52274. } }, { key: "getLatestMessageSentByMe", value: function(e3) {
  52275. return this._latestMessageSentByMeMap.get(e3);
  52276. } }, { key: "modifyMessageSentByPeer", value: function(e3) {
  52277. var t2 = e3.conversationID, n2 = e3.latestNick, o2 = e3.latestAvatar, s2 = this.list.get(t2);
  52278. if (!zt(s2)) {
  52279. var a2 = Array.from(s2.values()), i2 = a2.length;
  52280. if (0 !== i2) {
  52281. for (var r2 = null, u2 = 0, c2 = false, l2 = i2 - 1; l2 >= 0; l2--)
  52282. "in" === a2[l2].flow && ((r2 = a2[l2]).nick !== n2 && (r2.setNickAndAvatar({ nick: n2 }), c2 = true), r2.avatar !== o2 && (r2.setNickAndAvatar({ avatar: o2 }), c2 = true), c2 && (u2 += 1));
  52283. Ve.l("".concat(this._n, ".modifyMessageSentByPeer conversationID:").concat(t2, " count:").concat(u2));
  52284. }
  52285. }
  52286. } }, { key: "modifyMessageSentByMe", value: function(e3) {
  52287. var t2 = e3.conversationID, n2 = e3.latestNick, o2 = e3.latestAvatar, s2 = this.list.get(t2);
  52288. if (!zt(s2)) {
  52289. var a2 = Array.from(s2.values()), i2 = a2.length;
  52290. if (0 !== i2) {
  52291. for (var r2 = null, u2 = 0, c2 = false, l2 = i2 - 1; l2 >= 0; l2--)
  52292. "out" === a2[l2].flow && ((r2 = a2[l2]).nick !== n2 && (r2.setNickAndAvatar({ nick: n2 }), c2 = true), r2.avatar !== o2 && (r2.setNickAndAvatar({ avatar: o2 }), c2 = true), c2 && (u2 += 1));
  52293. Ve.l("".concat(this._n, ".modifyMessageSentByMe conversationID:").concat(t2, " count:").concat(u2));
  52294. }
  52295. }
  52296. } }, { key: "getTopicConversationIDList", value: function(e3) {
  52297. return m(this.list.keys()).filter(function(t2) {
  52298. return t2.startsWith("".concat(E.CONV_GROUP).concat(e3));
  52299. });
  52300. } }, { key: "traversal", value: function() {
  52301. if (0 !== this.list.size && -1 === Ve.getLevel()) {
  52302. console.group("conversationID-messageCount");
  52303. var e3, t2 = D(this.list);
  52304. try {
  52305. for (t2.s(); !(e3 = t2.n()).done; ) {
  52306. var n2 = v(e3.value, 2), o2 = n2[0], s2 = n2[1];
  52307. formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "".concat(o2, "-").concat(s2.size));
  52308. }
  52309. } catch (a2) {
  52310. t2.e(a2);
  52311. } finally {
  52312. t2.f();
  52313. }
  52314. console.groupEnd();
  52315. }
  52316. } }, { key: "onMessageModified", value: function(e3, t2) {
  52317. if (!this.list.has(e3))
  52318. return { isUpdated: false, message: null };
  52319. var n2 = this._getUniqueIDOfMessage(t2), o2 = this.list.get(e3).has(n2);
  52320. if (Ve.d("".concat(this._n, ".onMessageModified conversationID:").concat(e3, " uniqueID:").concat(n2, " has:").concat(o2)), o2) {
  52321. var s2 = this.list.get(e3).get(n2), a2 = t2.messageVersion, i2 = t2.elements, r2 = t2.cloudCustomData;
  52322. return s2.version < a2 ? (s2.version = a2, s2._elements = JSON.parse(JSON.stringify(i2)), s2.payload = JSON.parse(JSON.stringify(i2[0].content)), s2.type = i2[0].type, s2.cloudCustomData = r2, s2.isModified = true, { isUpdated: true, message: s2 }) : { isUpdated: false, message: s2 };
  52323. }
  52324. return { isUpdated: false, message: null };
  52325. } }, { key: "_getUniqueIDOfMessage", value: function(e3) {
  52326. var t2 = e3.from, n2 = e3.to, o2 = e3.random, s2 = e3.sequence, a2 = e3.time;
  52327. return "".concat(t2, "-").concat(n2, "-").concat(o2, "-").concat(s2, "-").concat(a2);
  52328. } }, { key: "reset", value: function() {
  52329. this.list.clear(), this._latestMessageSentByPeerMap.clear(), this._latestMessageSentByMeMap.clear();
  52330. } }]), e2;
  52331. }(), ei = "_a2KeyAndTinyIDUpdated", ti = "_cloudConfigUpdated", ni = "_profileUpdated";
  52332. function oi(e2) {
  52333. this.mixin(e2);
  52334. }
  52335. oi.mixin = function(e2) {
  52336. var t2 = e2.prototype || e2;
  52337. t2._isReady = false, t2.ready = function(e3) {
  52338. var t3 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  52339. if (e3)
  52340. return this._isReady ? void (t3 ? e3.call(this) : setTimeout(e3, 1)) : (this._readyQueue = this._readyQueue || [], void this._readyQueue.push(e3));
  52341. }, t2.triggerReady = function() {
  52342. var e3 = this;
  52343. this._isReady = true, setTimeout(function() {
  52344. var t3 = e3._readyQueue;
  52345. e3._readyQueue = [], t3 && t3.length > 0 && t3.forEach(function(e4) {
  52346. e4.call(this);
  52347. }, e3);
  52348. }, 1);
  52349. }, t2.resetReady = function() {
  52350. this._isReady = false, this._readyQueue = [];
  52351. }, t2.isReady = function() {
  52352. return this._isReady;
  52353. };
  52354. };
  52355. var si = ["jpg", "jpeg", "gif", "png", "bmp", "image", "webp"], ai = ["mp4", "quicktime", "mov"], ii = 1, ri = 2, ui = 3, ci = 255, li = function() {
  52356. function e2(t2) {
  52357. var n2 = this;
  52358. o(this, e2), zt(t2) || (this.userID = t2.userID || "", this.nick = t2.nick || "", this.gender = t2.gender || "", this.birthday = t2.birthday || 0, this.location = t2.location || "", this.selfSignature = t2.selfSignature || "", this.allowType = t2.allowType || E.ALLOW_TYPE_ALLOW_ANY, this.language = t2.language || 0, this.avatar = t2.avatar || "", this.messageSettings = t2.messageSettings || 0, this.adminForbidType = t2.adminForbidType || E.FORBID_TYPE_NONE, this.level = t2.level || 0, this.role = t2.role || 0, this.lastUpdatedTime = 0, this.profileCustomField = [], zt(t2.profileCustomField) || t2.profileCustomField.forEach(function(e3) {
  52359. n2.profileCustomField.push({ key: e3.key, value: e3.value });
  52360. }));
  52361. }
  52362. return a(e2, [{ key: "validate", value: function(e3) {
  52363. var t2 = true, n2 = "";
  52364. if (zt(e3))
  52365. return { valid: false, tips: "empty options" };
  52366. if (e3.profileCustomField)
  52367. for (var o2 = e3.profileCustomField.length, s2 = null, a2 = 0; a2 < o2; a2++) {
  52368. if (s2 = e3.profileCustomField[a2], !nt(s2.key) || -1 === s2.key.indexOf("Tag_Profile_Custom"))
  52369. return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" };
  52370. if (!nt(s2.value))
  52371. return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" };
  52372. }
  52373. for (var i2 in e3)
  52374. if (Object.prototype.hasOwnProperty.call(e3, i2)) {
  52375. if ("profileCustomField" === i2)
  52376. continue;
  52377. if (zt(e3[i2]) && !nt(e3[i2]) && !et(e3[i2])) {
  52378. n2 = "key:" + i2 + ", invalid value:" + e3[i2], t2 = false;
  52379. continue;
  52380. }
  52381. switch (i2) {
  52382. case "nick":
  52383. nt(e3[i2]) || (n2 = "nick must be a string", t2 = false), ht(e3[i2]) > 500 && (n2 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(ht(e3[i2]), " bytes"), t2 = false);
  52384. break;
  52385. case "gender":
  52386. mt(Ke, e3.gender) || (n2 = "key:gender, invalid value:" + e3.gender, t2 = false);
  52387. break;
  52388. case "birthday":
  52389. et(e3.birthday) || (n2 = "birthday must be a number", t2 = false);
  52390. break;
  52391. case "location":
  52392. nt(e3.location) || (n2 = "location must be a string", t2 = false);
  52393. break;
  52394. case "selfSignature":
  52395. nt(e3.selfSignature) || (n2 = "selfSignature must be a string", t2 = false);
  52396. break;
  52397. case "allowType":
  52398. mt(Ye, e3.allowType) || (n2 = "key:allowType, invalid value:" + e3.allowType, t2 = false);
  52399. break;
  52400. case "language":
  52401. et(e3.language) || (n2 = "language must be a number", t2 = false);
  52402. break;
  52403. case "avatar":
  52404. nt(e3.avatar) || (n2 = "avatar must be a string", t2 = false);
  52405. break;
  52406. case "messageSettings":
  52407. 0 !== e3.messageSettings && 1 !== e3.messageSettings && (n2 = "messageSettings must be 0 or 1", t2 = false);
  52408. break;
  52409. case "adminForbidType":
  52410. mt(We, e3.adminForbidType) || (n2 = "key:adminForbidType, invalid value:" + e3.adminForbidType, t2 = false);
  52411. break;
  52412. case "level":
  52413. et(e3.level) || (n2 = "level must be a number", t2 = false);
  52414. break;
  52415. case "role":
  52416. et(e3.role) || (n2 = "role must be a number", t2 = false);
  52417. break;
  52418. default:
  52419. n2 = "unknown key:" + i2 + " " + e3[i2], t2 = false;
  52420. }
  52421. }
  52422. return { valid: t2, tips: n2 };
  52423. } }]), e2;
  52424. }(), di = a(function e2(t2) {
  52425. o(this, e2), this.value = t2, this.next = null;
  52426. }), pi = function() {
  52427. function e2(t2) {
  52428. o(this, e2), this.MAX_LENGTH = t2, this.pTail = null, this.pNodeToDel = null, this.map = /* @__PURE__ */ new Map();
  52429. }
  52430. return a(e2, [{ key: "set", value: function(e3) {
  52431. var t2 = new di(e3);
  52432. if (this.map.size < this.MAX_LENGTH)
  52433. null === this.pTail ? (this.pTail = t2, this.pNodeToDel = t2) : (this.pTail.next = t2, this.pTail = t2), this.map.set(e3, 1);
  52434. else {
  52435. var n2 = this.pNodeToDel;
  52436. this.pNodeToDel = this.pNodeToDel.next, this.map.delete(n2.value), n2.next = null, n2 = null, this.pTail.next = t2, this.pTail = t2, this.map.set(e3, 1);
  52437. }
  52438. } }, { key: "has", value: function(e3) {
  52439. return this.map.has(e3);
  52440. } }, { key: "delete", value: function(e3) {
  52441. this.has(e3) && this.map.delete(e3);
  52442. } }, { key: "tail", value: function() {
  52443. return this.pTail;
  52444. } }, { key: "size", value: function() {
  52445. return this.map.size;
  52446. } }, { key: "data", value: function() {
  52447. return Array.from(this.map.keys());
  52448. } }, { key: "reset", value: function() {
  52449. for (var e3; null !== this.pNodeToDel; )
  52450. e3 = this.pNodeToDel, this.pNodeToDel = this.pNodeToDel.next, e3.next = null, e3 = null;
  52451. this.pTail = null, this.map.clear();
  52452. } }]), e2;
  52453. }(), gi = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo", "createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum", "maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers", "isSupportTopic", "inviteOption", "_lastRevokedTime"], hi = function() {
  52454. function e2(t2) {
  52455. o(this, e2), this.groupID = "", this.name = "", this.avatar = "", this.type = "", this.introduction = "", this.notification = "", this.ownerID = "", this.createTime = "", this.infoSequence = "", this.lastInfoTime = "", this.selfInfo = { messageRemindType: "", joinTime: "", nameCard: "", role: "", userID: "", memberCustomField: void 0, readedSequence: 0, excludedUnreadSequenceList: void 0 }, this.lastMessage = { lastTime: "", lastSequence: "", fromAccount: "", messageForShow: "" }, this.nextMessageSeq = "", this.memberNum = "", this.memberCount = "", this.maxMemberNum = "", this.maxMemberCount = "", this.joinOption = "", this.inviteOption = "", this.groupCustomField = [], this.muteAllMembers = false, this.isSupportTopic = false, this._lastRevokedTime = 0, this._initGroup(t2);
  52456. }
  52457. return a(e2, [{ key: "memberNum", get: function() {
  52458. return this.memberCount;
  52459. }, set: function(e3) {
  52460. } }, { key: "maxMemberNum", get: function() {
  52461. return this.maxMemberCount;
  52462. }, set: function(e3) {
  52463. } }, { key: "_initGroup", value: function(e3) {
  52464. for (var t2 in e3)
  52465. gi.indexOf(t2) < 0 || ("selfInfo" !== t2 ? ("memberNum" === t2 && (this.memberCount = e3[t2]), "maxMemberNum" === t2 && (this.maxMemberCount = e3[t2]), "isSupportTopic" !== t2 ? this[t2] = e3[t2] : this.isSupportTopic = 1 === e3[t2]) : this.updateSelfInfo(e3[t2]));
  52466. } }, { key: "updateGroup", value: function(e3) {
  52467. var t2 = this;
  52468. e3.appid = void 0, e3.grossTopicNextMsgSeq = void 0, e3.selfInfo && (e3.selfInfo.grossTopicReadSeq = void 0);
  52469. var n2 = JSON.parse(JSON.stringify(e3));
  52470. n2.lastMsgTime && (this.lastMessage.lastTime = n2.lastMsgTime), it(n2.muteAllMembers) || ("On" === n2.muteAllMembers ? n2.muteAllMembers = true : n2.muteAllMembers = false), n2.groupCustomField && Ct(this.groupCustomField, n2.groupCustomField), it(n2.memberNum) || (this.memberCount = n2.memberNum), it(n2.maxMemberNum) || (this.maxMemberCount = n2.maxMemberNum), it(n2.isSupportTopic) || (this.isSupportTopic = et(n2.isSupportTopic) ? 1 === n2.isSupportTopic : n2.isSupportTopic), pt(this, n2, ["members", "errorCode", "lastMsgTime", "groupCustomField", "memberNum", "maxMemberNum", "isSupportTopic"]), at(n2.members) && n2.members.length > 0 && n2.members.forEach(function(e4) {
  52471. e4.userID === t2.selfInfo.userID && pt(t2.selfInfo, e4, ["sequence"]);
  52472. });
  52473. } }, { key: "updateSelfInfo", value: function(e3) {
  52474. var n2 = { nameCard: e3.nameCard, joinTime: e3.joinTime, role: e3.role, messageRemindType: e3.messageRemindType, readedSequence: e3.readedSequence, excludedUnreadSequenceList: e3.excludedUnreadSequenceList };
  52475. pt(this.selfInfo, t({}, n2), [], ["", null, void 0, 0, NaN]);
  52476. } }, { key: "setSelfNameCard", value: function(e3) {
  52477. this.selfInfo.nameCard = e3;
  52478. } }]), e2;
  52479. }(), _i = function(e2, n2) {
  52480. return it(e2) ? { lastTime: 0, lastSequence: 0, fromAccount: 0, messageForShow: "", payload: null, type: "", isRevoked: false, cloudCustomData: "", onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: false, revoker: null } : e2 instanceof Wa ? { lastTime: e2.time || 0, lastSequence: e2.sequence || 0, fromAccount: e2.from || "", messageForShow: Vt(e2.type, e2.payload, n2), payload: e2.payload || null, type: e2.type || null, isRevoked: e2.isRevoked || false, cloudCustomData: e2.cloudCustomData || "", onlineOnlyFlag: e2._onlineOnlyFlag || false, nick: e2.nick || "", nameCard: e2.nameCard || "", version: e2.version || 0, isPeerRead: e2.isPeerRead || false, revoker: e2.revoker || null } : t(t({}, e2), {}, { messageForShow: Vt(e2.type, e2.payload, n2) });
  52481. }, fi = function() {
  52482. function e2(t2, n2) {
  52483. o(this, e2), this.conversationID = t2.conversationID || "", this.unreadCount = t2.unreadCount || 0, this.type = t2.type || "", this.lastMessage = _i(t2.lastMessage, n2), t2.lastMsgTime && (this.lastMessage.lastTime = t2.lastMsgTime), this._isInfoCompleted = false, this.peerReadTime = t2.peerReadTime || 0, this.groupAtInfoList = [], this.remark = "", this.isPinned = t2.isPinned || false, this.messageRemindType = "", this.markList = t2.markList || [], this.customData = t2.customData || "", this.conversationGroupList = t2.conversationGroupList || [], this._initProfile(t2);
  52484. }
  52485. return a(e2, [{ key: "toAccount", get: function() {
  52486. return this.conversationID.startsWith(E.CONV_C2C) ? this.conversationID.replace(E.CONV_C2C, "") : this.conversationID.startsWith(E.CONV_GROUP) ? this.conversationID.replace(E.CONV_GROUP, "") : "";
  52487. } }, { key: "subType", get: function() {
  52488. return this.groupProfile ? this.groupProfile.type : "";
  52489. } }, { key: "_initProfile", value: function(e3) {
  52490. var t2 = this;
  52491. Object.keys(e3).forEach(function(n2) {
  52492. switch (n2) {
  52493. case "userProfile":
  52494. t2.userProfile = e3.userProfile;
  52495. break;
  52496. case "groupProfile":
  52497. t2.groupProfile = e3.groupProfile;
  52498. }
  52499. }), it(this.userProfile) && this.type === E.CONV_C2C ? this.userProfile = new li({ userID: e3.conversationID.replace("C2C", "") }) : it(this.groupProfile) && this.type === E.CONV_GROUP && (this.groupProfile = new hi({ groupID: e3.conversationID.replace("GROUP", "") }));
  52500. } }, { key: "updateUnreadCount", value: function(e3) {
  52501. var t2 = e3.nextUnreadCount, n2 = e3.isFromGetConversations, o2 = e3.isUnreadC2CMessage;
  52502. it(t2) || (Tt(this.subType) ? this.unreadCount = 0 : n2 && this.type === E.CONV_GROUP || n2 && this.type === E.CONV_TOPIC || o2 && this.type === E.CONV_C2C ? this.unreadCount = t2 : this.unreadCount = this.unreadCount + t2);
  52503. } }, { key: "updateLastMessage", value: function(e3) {
  52504. this.lastMessage = _i(e3);
  52505. } }, { key: "updateGroupAtInfoList", value: function(e3) {
  52506. if (!this._isNeedMergeGroupAtInfo(e3)) {
  52507. var t2, n2 = (M(t2 = e3.groupAtType) || y(t2) || I(t2) || T()).slice(0);
  52508. -1 !== n2.indexOf(E.CONV_AT_ME) && -1 !== n2.indexOf(E.CONV_AT_ALL) && (n2 = [E.CONV_AT_ALL_AT_ME]);
  52509. var o2 = { from: e3.from, groupID: e3.groupID, topicID: e3.topicID, messageSequence: e3.sequence, atTypeArray: n2, __random: e3.__random, __sequence: e3.__sequence };
  52510. this.groupAtInfoList.push(o2);
  52511. }
  52512. } }, { key: "_isNeedMergeGroupAtInfo", value: function(e3) {
  52513. var t2 = e3.groupID, n2 = e3.sequence;
  52514. if (!Dt({ groupID: t2 }))
  52515. return false;
  52516. var o2 = false;
  52517. return this.groupAtInfoList.forEach(function(t3) {
  52518. t3.messageSequence === n2 && (t3.atTypeArray.indexOf(E.CONV_AT_ME) > -1 && e3.groupAtType.indexOf(E.CONV_AT_ALL) > -1 && (t3.atTypeArray = [E.CONV_AT_ALL_AT_ME]), t3.atTypeArray.indexOf(E.CONV_AT_ALL) > -1 && e3.groupAtType.indexOf(E.CONV_AT_ME) > -1 && (t3.atTypeArray = [E.CONV_AT_ALL_AT_ME], t3.__random = e3.__random, t3.__sequence = e3.__sequence), o2 = true);
  52519. }), o2;
  52520. } }, { key: "clearGroupAtInfoList", value: function() {
  52521. this.groupAtInfoList.length = 0;
  52522. } }, { key: "reduceUnreadCount", value: function() {
  52523. return this.unreadCount >= 1 && (this.unreadCount -= 1, true);
  52524. } }, { key: "isLastMessageRevoked", value: function(e3) {
  52525. var t2 = e3.sequence, n2 = e3.time;
  52526. return this.type === E.CONV_C2C && t2 === this.lastMessage.lastSequence && n2 === this.lastMessage.lastTime || this.type === E.CONV_GROUP && t2 === this.lastMessage.lastSequence;
  52527. } }, { key: "setLastMessageRevoked", value: function(e3) {
  52528. this.lastMessage.isRevoked = e3;
  52529. } }, { key: "setLastMessageRevoker", value: function(e3) {
  52530. this.lastMessage.revoker = e3;
  52531. } }]), e2;
  52532. }(), vi = function() {
  52533. function e2(t2) {
  52534. o(this, e2), this._conversationModule = t2, this._n = "MessageRemindHandler", this._updateSequence = 0;
  52535. }
  52536. return a(e2, [{ key: "getC2CMessageRemindType", value: function() {
  52537. var e3 = this, t2 = "".concat(this._n, ".getC2CMessageRemindType");
  52538. return this._conversationModule.request({ protocolName: Eo, updateSequence: this._updateSequence }).then(function(n2) {
  52539. Ve.l("".concat(t2, " ok"));
  52540. var o2 = n2.data, s2 = o2.updateSequence, a2 = o2.muteFlagList;
  52541. e3._updateSequence = s2, e3._patchC2CMessageRemindType(a2);
  52542. }).catch(function(e4) {
  52543. Ve.e("".concat(t2, " failed. error:"), e4);
  52544. });
  52545. } }, { key: "_patchC2CMessageRemindType", value: function(e3) {
  52546. var t2 = this, n2 = 0, o2 = "";
  52547. at(e3) && e3.length > 0 && e3.forEach(function(e4) {
  52548. var s2 = e4.userID, a2 = e4.muteFlag;
  52549. 0 === a2 ? o2 = E.MSG_REMIND_ACPT_AND_NOTE : 1 === a2 ? o2 = E.MSG_REMIND_DISCARD : 2 === a2 && (o2 = E.MSG_REMIND_ACPT_NOT_NOTE), true === t2._conversationModule.patchMessageRemindType({ ID: s2, isC2CConversation: true, messageRemindType: o2 }) && (n2 += 1);
  52550. }), Ve.l("".concat(this._n, "._patchC2CMessageRemindType count:").concat(n2));
  52551. } }, { key: "set", value: function(e3) {
  52552. return e3.groupID ? this._setGroupMessageRemindType(e3) : at(e3.userIDList) ? this._setC2CMessageRemindType(e3) : void 0;
  52553. } }, { key: "_setGroupMessageRemindType", value: function(e3) {
  52554. var t2 = this, n2 = "".concat(this._n, "._setGroupMessageRemindType"), o2 = e3.groupID, s2 = e3.messageRemindType, a2 = "groupID:".concat(o2, " messageRemindType:").concat(s2), i2 = new Aa("setMessageRemindType");
  52555. return i2.setMessage(a2), this._getModule(wn).modifyGroupMemberInfo({ groupID: o2, messageRemindType: s2, userID: this._conversationModule.getMyUserID() }).then(function() {
  52556. i2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok. ").concat(a2));
  52557. var o3 = t2.onGroupMessageRemindTypeUpdated(e3);
  52558. return t2._conversationModule.emitTotalUnreadMessageCountUpdate(), Ya(o3);
  52559. }).catch(function(e4) {
  52560. return t2._conversationModule.probeNetwork().then(function(t3) {
  52561. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  52562. i2.setError(e4, o3, s3).end();
  52563. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52564. });
  52565. } }, { key: "onGroupMessageRemindTypeUpdated", value: function(e3) {
  52566. var t2 = e3.groupID, n2 = e3.messageRemindType, o2 = this._getModule(Pn).getLocalGroupProfile(t2);
  52567. if (o2 && (o2.selfInfo.messageRemindType = n2), kt(t2)) {
  52568. var s2 = t2, a2 = xt(s2), i2 = this._getModule(Fn).getLocalTopic(a2, s2);
  52569. return i2 && (i2.updateSelfInfo({ messageRemindType: n2 }), this._conversationModule.emitOuterEvent(k.TOPIC_UPDATED, { groupID: a2, topic: i2 })), { topic: i2 };
  52570. }
  52571. return this._conversationModule.patchMessageRemindType({ ID: t2, isC2CConversation: false, messageRemindType: n2 }) && this._emitConversationUpdate(), { group: o2 };
  52572. } }, { key: "_setC2CMessageRemindType", value: function(e3) {
  52573. var t2 = this, n2 = "".concat(this._n, "._setC2CMessageRemindType"), o2 = e3.userIDList, s2 = e3.messageRemindType, a2 = o2.slice(0, 30), i2 = 0;
  52574. s2 === E.MSG_REMIND_DISCARD ? i2 = 1 : s2 === E.MSG_REMIND_ACPT_NOT_NOTE && (i2 = 2);
  52575. var r2 = "userIDList:".concat(a2, " messageRemindType:").concat(s2), u2 = new Aa("setMessageRemindType");
  52576. return u2.setMessage(r2), this._conversationModule.request({ protocolName: ko, requestData: { userIDList: a2, muteFlag: i2 } }).then(function(e4) {
  52577. u2.setNetworkType(t2._conversationModule.getNetworkType()).end();
  52578. var o3 = e4.data, i3 = o3.updateSequence, r3 = o3.errorList;
  52579. t2._updateSequence = i3;
  52580. var c2 = [], l2 = [];
  52581. at(r3) && r3.forEach(function(e5) {
  52582. c2.push(e5.userID), l2.push({ userID: e5.userID, code: e5.errorCode });
  52583. });
  52584. var d2 = a2.filter(function(e5) {
  52585. return -1 === c2.indexOf(e5);
  52586. });
  52587. Ve.l("".concat(n2, " ok. successUserIDList:").concat(d2, " failureUserIDList:").concat(JSON.stringify(l2)));
  52588. var p2 = 0;
  52589. return d2.forEach(function(e5) {
  52590. t2._conversationModule.patchMessageRemindType({ ID: e5, isC2CConversation: true, messageRemindType: s2 }) && (p2 += 1);
  52591. }), p2 >= 1 && t2._emitConversationUpdate(), a2.length = c2.length = 0, t2._conversationModule.emitTotalUnreadMessageCountUpdate(), Xa({ successUserIDList: d2.map(function(e5) {
  52592. return { userID: e5 };
  52593. }), failureUserIDList: l2 });
  52594. }).catch(function(e4) {
  52595. return t2._conversationModule.probeNetwork().then(function(t3) {
  52596. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  52597. u2.setError(e4, o3, s3).end();
  52598. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52599. });
  52600. } }, { key: "_getModule", value: function(e3) {
  52601. return this._conversationModule.getModule(e3);
  52602. } }, { key: "_emitConversationUpdate", value: function() {
  52603. this._conversationModule.emitConversationUpdate(true, false);
  52604. } }, { key: "setUpdateSequence", value: function(e3) {
  52605. this._updateSequence = e3;
  52606. } }, { key: "reset", value: function() {
  52607. Ve.l("".concat(this._n, ".reset")), this._updateSequence = 0;
  52608. } }]), e2;
  52609. }(), mi = function() {
  52610. function e2(t2) {
  52611. o(this, e2), this._conversationModule = t2, this._n = "ConvGroupHandler", this._convGroupMap = /* @__PURE__ */ new Map(), this._startIndex = 0, this._pagingStatus = $t.NOT_START;
  52612. }
  52613. return a(e2, [{ key: "setConvCustomData", value: function(e3) {
  52614. var t2 = this, n2 = "".concat(this._n, ".").concat("setConvCustomData"), o2 = e3.conversationIDList, s2 = e3.customData;
  52615. Ve.l("".concat(n2, " options:"), e3);
  52616. var a2 = new Aa("setConvCustomData");
  52617. a2.setMessage(JSON.stringify(e3));
  52618. var i2 = { fromAccount: this._getMyUserID(), itemList: [] }, r2 = [], u2 = [];
  52619. return o2.forEach(function(e4) {
  52620. if (!t2._hasLocalConversation(e4))
  52621. return t2._onConversationNotFound(u2, e4), true;
  52622. if (!Et(e4) && !St(e4))
  52623. return t2._onConversationIDInvalid(u2, e4), true;
  52624. var n3 = { operationType: 2, contactItem: void 0, customMark: s2 };
  52625. Et(e4) ? n3.contactItem = { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } : St(e4) && (n3.contactItem = { type: 2, groupID: e4.replace(E.CONV_GROUP, "") }), i2.itemList.push(n3);
  52626. }), u2.length === o2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: qo, requestData: i2 }).then(function(e4) {
  52627. a2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52628. var o3 = e4.data.resultItem;
  52629. if (at(o3)) {
  52630. var i3, c2, l2 = false;
  52631. o3.forEach(function(e5) {
  52632. i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode ? (r2.push(i3), (c2 = t2._getLocalConversation(i3)) && c2.customData !== s2 && (c2.customData = s2, l2 = true)) : u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo });
  52633. }), true === l2 && t2._emitConversationUpdate();
  52634. }
  52635. return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
  52636. }).catch(function(e4) {
  52637. return t2._conversationModule.probeNetwork().then(function(t3) {
  52638. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  52639. a2.setError(e4, o3, s3).end();
  52640. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52641. });
  52642. } }, { key: "markConversation", value: function(e3) {
  52643. var t2 = this;
  52644. if (!this._conversationModule.canIUse(B.CONV_MARK))
  52645. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  52646. var n2 = "".concat(this._n, ".").concat("markConversation"), o2 = e3.conversationIDList, s2 = e3.markType, a2 = e3.enableMark;
  52647. Ve.l("".concat(n2, " options:"), e3);
  52648. var i2 = new Aa("markConversation");
  52649. i2.setMessage(JSON.stringify(e3));
  52650. var r2 = void 0, u2 = void 0, c2 = this._getFlagBit(s2);
  52651. true === a2 ? u2 = [c2] : r2 = [c2];
  52652. var l2 = { fromAccount: this._getMyUserID(), itemList: [] }, d2 = [], p2 = [];
  52653. return o2.forEach(function(e4) {
  52654. if (!t2._hasLocalConversation(e4))
  52655. return t2._onConversationNotFound(p2, e4), true;
  52656. if (!Et(e4) && !St(e4))
  52657. return t2._onConversationIDInvalid(p2, e4), true;
  52658. var n3 = { operationType: 1, contactItem: void 0, clearMark: r2, setMark: u2 };
  52659. Et(e4) ? n3.contactItem = { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } : St(e4) && (n3.contactItem = { type: 2, groupID: e4.replace(E.CONV_GROUP, "") }), l2.itemList.push(n3);
  52660. }), p2.length === o2.length ? Xa({ successConversationIDList: d2, failureConversationIDList: p2 }) : this._conversationModule.request({ protocolName: xo, requestData: l2 }).then(function(e4) {
  52661. i2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52662. var o3 = e4.data.resultItem;
  52663. if (at(o3)) {
  52664. var r3, u3, c3 = false;
  52665. o3.forEach(function(e5) {
  52666. if (r3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode) {
  52667. if (d2.push(r3), u3 = t2._getLocalConversation(r3)) {
  52668. var n3 = u3.markList.indexOf(s2);
  52669. true === a2 ? -1 === n3 && (u3.markList.push(s2), c3 = true) : -1 !== n3 && (u3.markList.splice(n3, 1), c3 = true);
  52670. }
  52671. } else
  52672. p2.push({ conversationID: r3, code: e5.resultCode, message: e5.resultInfo });
  52673. }), true === c3 && t2._emitConversationUpdate();
  52674. }
  52675. return Ya({ successConversationIDList: d2, failureConversationIDList: p2 });
  52676. }).catch(function(e4) {
  52677. return t2._conversationModule.probeNetwork().then(function(t3) {
  52678. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  52679. i2.setError(e4, o3, s3).end();
  52680. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52681. });
  52682. } }, { key: "getLocalConvGroupList", value: function() {
  52683. var e3 = this;
  52684. return Ve.l("".concat(this._n, ".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === $t.REJECTED ? this.getRemoteConvGroupList().then(function() {
  52685. return Ya(m(e3._convGroupMap.values()));
  52686. }) : Xa(m(this._convGroupMap.values()));
  52687. } }, { key: "getRemoteConvGroupList", value: function() {
  52688. var e3 = this, t2 = "".concat(this._n, ".getRemoteConvGroupList");
  52689. return this._pagingStatus = $t.PENDING, this._conversationModule.request({ protocolName: Yo, requestData: { fromAccount: this._getMyUserID(), startIndex: this._startIndex, startTime: we() } }).then(function(n2) {
  52690. var o2, s2, a2 = n2.data, i2 = a2.completeFlag, r2 = a2.contactItem, u2 = a2.nextStartIndex, c2 = void 0 === u2 ? 0 : u2, l2 = a2.groupItem;
  52691. (e3._startIndex = c2, Ve.l("".concat(t2, " completeFlag:").concat(i2, " nextStartIndex:").concat(c2)), at(l2) && l2.forEach(function(t3) {
  52692. var n3 = t3.convGroupID, o3 = t3.groupName;
  52693. e3._convGroupMap.set(n3, o3);
  52694. }), at(r2)) && r2.forEach(function(t3) {
  52695. var n3 = t3.standardMark, a3 = t3.customData, i3 = t3.convGroupIDList;
  52696. if (o2 = e3._concatConversationID(t3), (s2 = e3._getLocalConversation(o2)) && (s2.markList = Ht(n3), s2.customData = a3 || "", at(i3))) {
  52697. var r3 = [];
  52698. i3.forEach(function(t4) {
  52699. e3._convGroupMap.has(t4) && r3.push(e3._convGroupMap.get(t4));
  52700. }), s2.conversationGroupList = [].concat(r3), r3.length = 0;
  52701. }
  52702. });
  52703. if (0 === i2)
  52704. return e3.getRemoteConvGroupList();
  52705. 1 === i2 && (e3._pagingStatus = $t.RESOLVED, e3._emitConversationUpdate(), e3._emitConvGroupListUpdate());
  52706. }).catch(function(n2) {
  52707. e3._pagingStatus = $t.REJECTED, Ve.w("".concat(t2, " failed. error:"), n2);
  52708. });
  52709. } }, { key: "createConvGroup", value: function(e3) {
  52710. var t2 = this;
  52711. if (!this._conversationModule.canIUse(B.CONV_GROUP))
  52712. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  52713. var n2 = "".concat(this._n, ".").concat("createConvGroup");
  52714. Ve.l("".concat(n2, " options:"), e3);
  52715. var o2 = new Aa("createConvGroup");
  52716. o2.setMessage(JSON.stringify(e3));
  52717. var s2 = e3.groupName, a2 = e3.conversationIDList, i2 = { fromAccount: this._getMyUserID(), itemList: [{ groupName: s2, contactItem: [] }] }, r2 = [], u2 = [];
  52718. return a2.forEach(function(e4) {
  52719. return t2._hasLocalConversation(e4) ? Et(e4) || St(e4) ? void (Et(e4) ? i2.itemList[0].contactItem.push({ type: 1, toAccount: e4.replace(E.CONV_C2C, "") }) : St(e4) && i2.itemList[0].contactItem.push({ type: 2, groupID: e4.replace(E.CONV_GROUP, "") })) : (t2._onConversationIDInvalid(u2, e4), true) : (t2._onConversationNotFound(u2, e4), true);
  52720. }), u2.length === a2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Vo, requestData: i2 }).then(function(e4) {
  52721. o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52722. var a3 = e4.data.groupResultItem[0], i3 = a3.groupItem, c2 = a3.resultItem;
  52723. if (st(i3) && (t2._convGroupMap.set(i3.convGroupID, i3.groupName), t2._emitConvGroupListUpdate()), at(c2)) {
  52724. var l2, d2, p2 = false;
  52725. c2.forEach(function(e5) {
  52726. l2 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode ? (r2.push(l2), (d2 = t2._getLocalConversation(l2)) && -1 === d2.conversationGroupList.indexOf(s2) && (d2.conversationGroupList.push(s2), p2 = true)) : u2.push({ conversationID: l2, code: e5.resultCode, message: e5.resultInfo });
  52727. }), true === p2 && (t2._emitConversationUpdate(), t2._emitConvGroupListUpdate());
  52728. }
  52729. return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
  52730. }).catch(function(e4) {
  52731. return t2._conversationModule.probeNetwork().then(function(t3) {
  52732. var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
  52733. o2.setError(e4, s3, a3).end();
  52734. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52735. });
  52736. } }, { key: "deleteConvGroup", value: function(e3) {
  52737. var t2 = this;
  52738. if (!this._conversationModule.canIUse(B.CONV_GROUP))
  52739. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  52740. var n2 = "".concat(this._n, ".").concat("deleteConvGroup");
  52741. Ve.l("".concat(n2, " groupName:").concat(e3));
  52742. var o2 = new Aa("deleteConvGroup");
  52743. return o2.setMessage(e3), this._conversationModule.request({ protocolName: Bo, requestData: { fromAccount: this._getMyUserID(), groupName: [e3] } }).then(function(s2) {
  52744. o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52745. var a2 = s2.data.groupItem;
  52746. if (at(a2)) {
  52747. var i2 = false;
  52748. a2.forEach(function(e4) {
  52749. t2._convGroupMap.has(e4.convGroupID) && (t2._convGroupMap.delete(e4.convGroupID), i2 = true);
  52750. }), true === i2 && t2._emitConvGroupListUpdate();
  52751. }
  52752. t2._eraseFromConversationGroupList([e3]);
  52753. }).catch(function(e4) {
  52754. return t2._conversationModule.probeNetwork().then(function(t3) {
  52755. var n3 = v(t3, 2), s2 = n3[0], a2 = n3[1];
  52756. o2.setError(e4, s2, a2).end();
  52757. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52758. });
  52759. } }, { key: "renameConvGroup", value: function(e3) {
  52760. var t2 = this;
  52761. if (!this._conversationModule.canIUse(B.CONV_GROUP))
  52762. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  52763. var n2 = "".concat(this._n, ".").concat("renameConvGroup");
  52764. Ve.l("".concat(n2, " options:"), e3);
  52765. var o2 = new Aa("renameConvGroup");
  52766. o2.setMessage(JSON.stringify(e3));
  52767. var s2 = e3.oldName, a2 = e3.newName;
  52768. return this._conversationModule.request({ protocolName: Ho, requestData: { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 1, oldName: s2, newName: a2 } } }).then(function(e4) {
  52769. o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52770. var i2 = e4.data.updateGroupResult.convGroupID;
  52771. t2._convGroupMap.set(i2, a2), t2._emitConvGroupListUpdate();
  52772. var r2, u2, c2 = t2._conversationModule.getLocalConversationList(), l2 = false;
  52773. c2.forEach(function(e5) {
  52774. r2 = e5.conversationGroupList, -1 !== (u2 = r2.indexOf(s2)) && (r2.splice(u2, 1, a2), l2 = true);
  52775. }), true === l2 && t2._emitConversationUpdate();
  52776. }).catch(function(e4) {
  52777. return t2._conversationModule.probeNetwork().then(function(t3) {
  52778. var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
  52779. o2.setError(e4, s3, a3).end();
  52780. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52781. });
  52782. } }, { key: "addConvsToGroup", value: function(e3) {
  52783. var t2 = this;
  52784. if (!this._conversationModule.canIUse(B.CONV_GROUP))
  52785. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  52786. var n2 = "".concat(this._n, ".").concat("addConvsToGroup");
  52787. Ve.l("".concat(n2, " options:"), e3);
  52788. var o2 = new Aa("addConvsToGroup");
  52789. o2.setMessage(JSON.stringify(e3));
  52790. var s2 = e3.conversationIDList, a2 = e3.groupName, i2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a2, updateItem: [] } }, r2 = [], u2 = [];
  52791. return s2.forEach(function(e4) {
  52792. return t2._hasLocalConversation(e4) ? Et(e4) || St(e4) ? void (Et(e4) ? i2.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } }) : St(e4) && i2.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 2, groupID: e4.replace(E.CONV_GROUP, "") } })) : (t2._onConversationIDInvalid(u2, e4), true) : (t2._onConversationNotFound(u2, e4), true);
  52793. }), u2.length === s2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Ko, requestData: i2 }).then(function(e4) {
  52794. o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52795. var s3 = e4.data.updateGroupResult.contactResultItem;
  52796. if (at(s3)) {
  52797. var i3, c2, l2 = false;
  52798. s3.forEach(function(e5) {
  52799. i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode ? (c2 = t2._getLocalConversation(i3)) && -1 === c2.conversationGroupList.indexOf(a2) && (c2.conversationGroupList.push(a2), r2.push(i3), l2 = true) : u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo });
  52800. }), true === l2 && (t2._emitConversationUpdate(), t2._emitConvInGroupUpdate(a2));
  52801. }
  52802. return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
  52803. }).catch(function(e4) {
  52804. return t2._conversationModule.probeNetwork().then(function(t3) {
  52805. var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
  52806. o2.setError(e4, s3, a3).end();
  52807. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52808. });
  52809. } }, { key: "deleteConvsFromGroup", value: function(e3) {
  52810. var t2 = this;
  52811. if (!this._conversationModule.canIUse(B.CONV_GROUP))
  52812. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  52813. var n2 = "".concat(this._n, ".").concat("deleteConvsFromGroup");
  52814. Ve.l("".concat(n2, " options:"), e3);
  52815. var o2 = new Aa("deleteConvsFromGroup");
  52816. o2.setMessage(JSON.stringify(e3));
  52817. var s2 = e3.conversationIDList, a2 = e3.groupName, i2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a2, updateItem: [] } }, r2 = [], u2 = [];
  52818. return s2.forEach(function(e4) {
  52819. return t2._hasLocalConversation(e4) ? Et(e4) || St(e4) ? void (Et(e4) ? i2.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 1, toAccount: e4.replace(E.CONV_C2C, "") } }) : St(e4) && i2.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 2, groupID: e4.replace(E.CONV_GROUP, "") } })) : (t2._onConversationIDInvalid(u2, e4), true) : (t2._onConversationNotFound(u2, e4), true);
  52820. }), u2.length === s2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Wo, requestData: i2 }).then(function(e4) {
  52821. o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
  52822. var s3 = e4.data.updateGroupResult.contactResultItem;
  52823. if (at(s3)) {
  52824. var i3, c2, l2 = false;
  52825. s3.forEach(function(e5) {
  52826. if (i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode) {
  52827. if (c2 = t2._getLocalConversation(i3)) {
  52828. var n3 = c2.conversationGroupList.indexOf(a2);
  52829. -1 !== n3 && (c2.conversationGroupList.splice(n3, 1), r2.push(i3), l2 = true);
  52830. }
  52831. } else
  52832. u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo });
  52833. }), true === l2 && (t2._emitConversationUpdate(), t2._emitConvInGroupUpdate(a2));
  52834. }
  52835. return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
  52836. }).catch(function(e4) {
  52837. return t2._conversationModule.probeNetwork().then(function(t3) {
  52838. var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
  52839. o2.setError(e4, s3, a3).end();
  52840. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  52841. });
  52842. } }, { key: "onConvMarkUpdated", value: function(e3) {
  52843. var t2 = this;
  52844. if (!zt(e3)) {
  52845. var n2, o2;
  52846. Ve.d("".concat(this._n, ".onConvMarkUpdated markItemList:"), e3);
  52847. var s2 = false;
  52848. e3.forEach(function(e4) {
  52849. var a2 = e4.recentContactItem, i2 = e4.optType, r2 = e4.standardMark, u2 = e4.customMark;
  52850. if (n2 = t2._concatConversationID(a2), o2 = t2._getLocalConversation(n2))
  52851. if (1 === i2) {
  52852. var c2 = Ht(r2);
  52853. true !== function(e5, t3) {
  52854. if (e5 === t3)
  52855. return true;
  52856. if (!e5 || !t3)
  52857. return false;
  52858. if (e5.length !== t3.length)
  52859. return false;
  52860. for (var n3 = 0, o3 = e5.length; n3 < o3; n3++)
  52861. if (e5[n3] !== t3[n3])
  52862. return false;
  52863. return true;
  52864. }(o2.markList, c2) && (o2.markList = c2, s2 = true);
  52865. } else
  52866. 2 === i2 && o2.customData !== u2 && void 0 !== u2 && (o2.customData = u2, s2 = true);
  52867. }), true === s2 && this._emitConversationUpdate();
  52868. }
  52869. } }, { key: "onConvGroupCreated", value: function(e3) {
  52870. var t2 = this;
  52871. Ve.d("".concat(this._n, ".onConvGroupCreated resultList:"), e3);
  52872. var n2 = false, o2 = false;
  52873. at(e3) && (e3.forEach(function(e4) {
  52874. var s2 = e4.msgGroupItem, a2 = s2.groupID, i2 = s2.groupName;
  52875. t2._convGroupMap.get(a2) !== i2 && (t2._convGroupMap.set(a2, i2), o2 = true);
  52876. var r2, u2, c2 = e4.msgRecentContactItem;
  52877. at(c2) && c2.forEach(function(e5) {
  52878. r2 = t2._concatConversationID(e5), (u2 = t2._getLocalConversation(r2)) && -1 === u2.conversationGroupList.indexOf(i2) && (u2.conversationGroupList.push(i2), n2 = true);
  52879. });
  52880. }), true === n2 && this._emitConversationUpdate(), true === o2 && this._emitConvGroupListUpdate());
  52881. } }, { key: "onConvGroupDeleted", value: function(e3) {
  52882. var t2 = this;
  52883. Ve.d("".concat(this._n, ".onConvGroupDeleted groupItemList:"), e3);
  52884. var n2 = [];
  52885. if (at(e3)) {
  52886. var o2 = false;
  52887. e3.forEach(function(e4) {
  52888. var s2 = e4.groupID, a2 = e4.groupName;
  52889. t2._convGroupMap.has(s2) && (t2._convGroupMap.delete(s2), o2 = true, n2.push(a2));
  52890. }), true === o2 && this._emitConvGroupListUpdate();
  52891. }
  52892. this._eraseFromConversationGroupList(n2);
  52893. } }, { key: "_eraseFromConversationGroupList", value: function(e3) {
  52894. zt(e3) || (this._conversationModule.getLocalConversationList().forEach(function(t2) {
  52895. t2.conversationGroupList = t2.conversationGroupList.filter(function(t3) {
  52896. return !e3.includes(t3);
  52897. });
  52898. }), this._emitConversationUpdate());
  52899. } }, { key: "onConvGroupNameUpdated", value: function(e3) {
  52900. Ve.d("".concat(this._n, ".onConvGroupNameUpdated options:"), e3);
  52901. var t2 = e3.groupID, n2 = e3.groupName, o2 = e3.oldGroupName;
  52902. if (this._convGroupMap.get(t2) !== n2) {
  52903. this._convGroupMap.set(t2, n2), this._emitConvGroupListUpdate();
  52904. var s2, a2, i2 = this._conversationModule.getLocalConversationList(), r2 = false;
  52905. i2.forEach(function(e4) {
  52906. s2 = e4.conversationGroupList, -1 !== (a2 = s2.indexOf(o2)) && (s2.splice(a2, 1, n2), r2 = true);
  52907. }), true === r2 && this._emitConversationUpdate();
  52908. }
  52909. } }, { key: "onConvInGroupUpdated", value: function(e3) {
  52910. var t2 = this;
  52911. Ve.d("".concat(this._n, ".onConvInGroupUpdated options:"), e3);
  52912. var n2 = e3.oldGroupName, o2 = e3.recentContactUpdateGroupItem;
  52913. if (at(o2)) {
  52914. var s2, a2, i2, r2 = false;
  52915. o2.forEach(function(e4) {
  52916. var o3 = e4.contactOptType, u2 = e4.recentContactItem;
  52917. s2 = t2._concatConversationID(u2), (a2 = t2._getLocalConversation(s2)) && (i2 = a2.conversationGroupList.indexOf(n2), 1 === o3 ? -1 === i2 && (a2.conversationGroupList.push(n2), r2 = true) : 2 === o3 && -1 !== i2 && (a2.conversationGroupList.splice(i2, 1), r2 = true));
  52918. }), true === r2 && (this._emitConversationUpdate(), this._emitConvInGroupUpdate(n2));
  52919. }
  52920. } }, { key: "onConvAddedToOrDeletedFromGroup", value: function(e3) {
  52921. var t2 = this;
  52922. Ve.d("".concat(this._n, ".onConvAddedToOrDeletedFromGroup options:"), e3);
  52923. var n2 = e3.msgRecentContactItem, o2 = e3.msgRecentContactUpdateContactItem, s2 = this._concatConversationID(n2), a2 = this._getLocalConversation(s2);
  52924. if (a2 && at(o2)) {
  52925. var i2, r2 = false;
  52926. o2.forEach(function(e4) {
  52927. var n3 = e4.groupOptType, o3 = e4.recentContactGroupItem.groupName;
  52928. i2 = a2.conversationGroupList.indexOf(o3), 1 === n3 ? -1 === i2 && (a2.conversationGroupList.push(o3), r2 = true) : 2 === n3 && -1 !== i2 && (a2.conversationGroupList.splice(i2, 1), r2 = true), true === r2 && t2._emitConvInGroupUpdate(o3);
  52929. }), true === r2 && this._emitConversationUpdate();
  52930. }
  52931. } }, { key: "onConvGroupListSynced", value: function(e3) {
  52932. var t2 = this;
  52933. at(e3) && 0 !== e3.length && (Ve.l("".concat(this._n, ".onConvGroupListSynced groupItemList:"), e3), e3.forEach(function(e4) {
  52934. t2._convGroupMap.set(e4.convGroupID, e4.groupName);
  52935. }));
  52936. } }, { key: "getConvGroupListByID", value: function(e3) {
  52937. var t2 = this;
  52938. if (!zt(e3)) {
  52939. var n2 = [];
  52940. return e3.forEach(function(e4) {
  52941. t2._convGroupMap.has(e4) && n2.push(t2._convGroupMap.get(e4));
  52942. }), n2;
  52943. }
  52944. } }, { key: "_onConversationNotFound", value: function(e3, t2) {
  52945. e3.push({ conversationID: t2, code: ha.CONVERSATION_NOT_FOUND, message: this._conversationModule.getErrorMessage(ha.CONVERSATION_NOT_FOUND) });
  52946. } }, { key: "_onConversationIDInvalid", value: function(e3, t2) {
  52947. e3.push({ conversationID: t2, code: ha.INVALID_CONVERSATION_ID, message: this._conversationModule.getErrorMessage(ha.INVALID_CONVERSATION_ID) });
  52948. } }, { key: "_getFlagBit", value: function(e3) {
  52949. for (var t2 = e3.toString(2), n2 = t2.length, o2 = n2 - 1; o2 >= 0; o2--)
  52950. if ("1" === t2[o2])
  52951. return n2 - o2 - 1;
  52952. } }, { key: "_concatConversationID", value: function(e3) {
  52953. var t2, n2 = e3.type, o2 = e3.to, s2 = e3.groupID, a2 = e3.userID;
  52954. return 1 === n2 ? it(a2) ? it(o2) || (t2 = "".concat(E.CONV_C2C).concat(o2)) : t2 = "".concat(E.CONV_C2C).concat(a2) : 2 === n2 && (t2 = "".concat(E.CONV_GROUP).concat(s2)), t2;
  52955. } }, { key: "_getMyUserID", value: function() {
  52956. return this._conversationModule.getMyUserID();
  52957. } }, { key: "_insertConversationGroup", value: function(e3, t2) {
  52958. var n2 = this._getLocalConversation(e3);
  52959. if (n2) {
  52960. var o2 = n2.conversationGroupList;
  52961. -1 === o2.indexOf(t2) && o2.push(t2);
  52962. }
  52963. } }, { key: "_getLocalConversation", value: function(e3) {
  52964. return this._conversationModule.getLocalConversation(e3);
  52965. } }, { key: "_hasLocalConversation", value: function(e3) {
  52966. return this._conversationModule.hasLocalConversation(e3);
  52967. } }, { key: "_emitConversationUpdate", value: function() {
  52968. this._conversationModule.emitConversationUpdate(true, false);
  52969. } }, { key: "_emitConvGroupListUpdate", value: function() {
  52970. this._conversationModule.emitOuterEvent(k.CONVERSATION_GROUP_LIST_UPDATED, m(this._convGroupMap.values()));
  52971. } }, { key: "_emitConvInGroupUpdate", value: function(e3) {
  52972. var t2 = { groupName: e3, conversationList: [] }, n2 = this._conversationModule.getLocalConversationList();
  52973. t2.conversationList = n2.filter(function(t3) {
  52974. return t3.conversationGroupList.includes(e3);
  52975. }), this._conversationModule.emitOuterEvent(k.CONVERSATION_IN_GROUP_UPDATED, t2);
  52976. } }, { key: "reset", value: function() {
  52977. Ve.l("".concat(this._n, ".reset")), this._convGroupMap.clear(), this._startIndex = 0, this._pagingStatus = $t.NOT_START;
  52978. } }]), e2;
  52979. }(), Mi = function(e2) {
  52980. r(s2, e2);
  52981. var n2 = f(s2);
  52982. function s2(e3) {
  52983. var t2;
  52984. return o(this, s2), (t2 = n2.call(this, e3))._n = "ConversationModule", oi.mixin(h(t2)), t2._messageListHandler = new $a(), t2._messageRemindHandler = new vi(h(t2)), t2._convGroupHandler = new mi(h(t2)), t2.singlyLinkedList = new pi(100), t2._pagingStatus = $t.NOT_START, t2._pagingTimeStamp = 0, t2._pagingStartIndex = 0, t2._pagingPinnedTimeStamp = 0, t2._pagingPinnedStartIndex = 0, t2._pagingConvIDMap = /* @__PURE__ */ new Map(), t2._convIDFromUnreadDBMap = /* @__PURE__ */ new Map(), t2._conversationMap = /* @__PURE__ */ new Map(), t2._tmpGroupList = [], t2._tmpGroupAtTipsList = [], t2._peerReadTimeMap = /* @__PURE__ */ new Map(), t2._completedMap = /* @__PURE__ */ new Map(), t2._roamingMessageKeyAndTimeMap = /* @__PURE__ */ new Map(), t2._roamingMessageSequenceMap = /* @__PURE__ */ new Map(), t2._remoteGroupReadSequenceMap = /* @__PURE__ */ new Map(), t2._convTotalUnreadCount = 0, t2._pagingGetCostList = [], t2._initListeners(), t2;
  52985. }
  52986. return a(s2, [{ key: "_initListeners", value: function() {
  52987. var e3 = this.getInnerEmitterInstance();
  52988. e3.on(ei, this._initLocalConversationList, this), e3.on(ni, this._onProfileUpdated, this);
  52989. } }, { key: "onCheckTimer", value: function(e3) {
  52990. e3 % 60 == 0 && this._messageListHandler.traversal();
  52991. } }, { key: "_initLocalConversationList", value: function() {
  52992. var e3 = this, t2 = new Aa("_initLocalConversationList");
  52993. Ve.l("".concat(this._n, ".").concat("_initLocalConversationList"));
  52994. var n3 = "", o2 = this._getStorageConversationList(), s3 = this.isIntl();
  52995. if (o2) {
  52996. for (var a2 = o2.length, i2 = 0; i2 < a2; i2++) {
  52997. var r2 = o2[i2];
  52998. if (r2) {
  52999. if (r2.conversationID === "".concat(E.CONV_C2C, "@TLS#ERROR") || r2.conversationID === "".concat(E.CONV_C2C, "@TLS#NOT_FOUND"))
  53000. continue;
  53001. if (r2.groupProfile) {
  53002. var u2 = r2.groupProfile.type;
  53003. if (Tt(u2))
  53004. continue;
  53005. }
  53006. }
  53007. this._conversationMap.set(o2[i2].conversationID, new fi(o2[i2], s3));
  53008. }
  53009. this.emitConversationUpdate(true, false), n3 = "count:".concat(a2);
  53010. } else
  53011. n3 = "count:0";
  53012. t2.setNetworkType(this.getNetworkType()).setMessage(n3).end(), this.getModule(Un) || this.triggerReady(), this.ready(function() {
  53013. e3._tmpGroupList.length > 0 && (e3.updateConversationGroupProfile(e3._tmpGroupList), e3._tmpGroupList.length = 0);
  53014. }), this.syncConversationList();
  53015. } }, { key: "onMessageSent", value: function(e3) {
  53016. this._onSendOrReceiveMessage({ conversationOptionsList: e3.conversationOptionsList, isInstantMessage: true });
  53017. } }, { key: "onNewMessage", value: function(e3) {
  53018. this._onSendOrReceiveMessage(e3);
  53019. } }, { key: "_onSendOrReceiveMessage", value: function(e3) {
  53020. var t2 = this, n3 = e3.conversationOptionsList, o2 = e3.isInstantMessage, s3 = void 0 === o2 || o2, a2 = e3.isUnreadC2CMessage, i2 = void 0 !== a2 && a2, r2 = e3.updateUnreadCount, u2 = void 0 === r2 || r2;
  53021. this._isReady ? 0 !== n3.length && (this._getC2CPeerReadTime(n3), this._updateLocalConversationList({ conversationOptionsList: n3, isInstantMessage: s3, isUnreadC2CMessage: i2, isFromGetConversations: false, updateUnreadCount: u2 }), s3 || (this._convIDFromUnreadDBMap = new Map([].concat(m(this._convIDFromUnreadDBMap), m(n3.map(function(e4) {
  53022. return [e4.conversationID, 1];
  53023. })))), this._diffAndDeleteConversation()), this._setStorageConversationList(), n3.filter(function(e4) {
  53024. return e4.type === E.CONV_TOPIC;
  53025. }).length > 0 || this.emitConversationUpdate()) : this.ready(function() {
  53026. t2._onSendOrReceiveMessage(e3);
  53027. });
  53028. } }, { key: "updateConversationGroupProfile", value: function(e3) {
  53029. var t2 = this;
  53030. if (!at(e3) || 0 !== e3.length)
  53031. if (0 !== this._conversationMap.size) {
  53032. var n3 = false;
  53033. e3.forEach(function(e4) {
  53034. var o2 = "GROUP".concat(e4.groupID);
  53035. if (t2._conversationMap.has(o2)) {
  53036. n3 = true;
  53037. var s3 = t2._conversationMap.get(o2);
  53038. s3.groupProfile = JSON.parse(JSON.stringify(e4)), s3.lastMessage.lastSequence < e4.nextMessageSeq && (s3.lastMessage.lastSequence = e4.nextMessageSeq - 1), s3.subType || (s3.subType = e4.type);
  53039. }
  53040. }), n3 && this.emitConversationUpdate(true, false);
  53041. } else
  53042. this._tmpGroupList = e3;
  53043. } }, { key: "_updateConversationUserProfile", value: function(e3) {
  53044. var t2 = this;
  53045. e3.data.forEach(function(e4) {
  53046. var n3 = "C2C".concat(e4.userID);
  53047. t2._conversationMap.has(n3) && (t2._conversationMap.get(n3).userProfile = e4);
  53048. }), this.emitConversationUpdate(true, false);
  53049. } }, { key: "onMessageRevoked", value: function(e3) {
  53050. var t2 = this;
  53051. if (0 !== e3.length) {
  53052. var n3 = null, o2 = false, s3 = [];
  53053. e3.forEach(function(e4) {
  53054. (n3 = t2._conversationMap.get(e4.conversationID)) && (n3.type === E.CONV_TOPIC ? s3.push(e4) : (n3.reduceUnreadCount() && (o2 = true), n3.isLastMessageRevoked({ sequence: e4.sequence, time: e4.time }) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), o2 = true)));
  53055. }), this.getModule(Fn).onMessageRevoked(s3), o2 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate());
  53056. }
  53057. } }, { key: "isLastMessageRevoked", value: function(e3) {
  53058. var t2 = false, n3 = e3.conversationID, o2 = e3.sequence, s3 = e3.time, a2 = this._conversationMap.get(n3);
  53059. a2 && (t2 = a2.type === E.CONV_TOPIC ? this.getModule(Fn).isLastMessageRevoked({ topicID: n3.replace(E.CONV_GROUP, ""), sequence: o2 }) : a2.isLastMessageRevoked({ sequence: o2, time: s3 }));
  53060. return Ve.l("".concat(this._n, ".isLastMessageRevoked options:").concat(JSON.stringify(e3), " ret:").concat(t2)), t2;
  53061. } }, { key: "onMessageDeleted", value: function(e3) {
  53062. var t2 = this;
  53063. if (0 !== e3.length) {
  53064. var n3 = null;
  53065. e3.forEach(function(e4) {
  53066. (n3 = t2._messageListHandler.getLocalMessage(e4.conversationID, e4.ID)) && (n3.isDeleted = true), e4 !== n3 && (e4.isDeleted = true);
  53067. });
  53068. for (var o2 = e3[0].conversationID, s3 = this._messageListHandler.getLocalMessageList(o2), a2 = {}, i2 = s3.length - 1; i2 >= 0; i2--)
  53069. if (!s3[i2].isDeleted) {
  53070. a2 = s3[i2];
  53071. break;
  53072. }
  53073. var r2 = this._conversationMap.get(o2);
  53074. if (r2) {
  53075. var u2 = false;
  53076. r2.lastMessage.lastSequence === a2.sequence && r2.lastMessage.lastTime === a2.time || (zt(a2) && (a2 = void 0), r2.updateLastMessage(a2), r2.type !== E.CONV_TOPIC && (u2 = true), Ve.l("".concat(this._n, ".onMessageDeleted. update conversationID:").concat(o2, " with lastMessage:"), r2.lastMessage)), o2.startsWith(E.CONV_C2C) && this.updateUnreadCount(o2), u2 && this.emitConversationUpdate(true, false);
  53077. }
  53078. }
  53079. } }, { key: "onMessageModified", value: function(e3) {
  53080. var t2 = e3.conversationType, n3 = e3.from, o2 = e3.to, s3 = e3.time, a2 = e3.sequence, i2 = e3.elements, r2 = e3.cloudCustomData, u2 = e3.messageVersion, c2 = this.getMyUserID(), l2 = "".concat(t2).concat(o2);
  53081. o2 === c2 && t2 === E.CONV_C2C && (l2 = "".concat(t2).concat(n3));
  53082. var d2 = this._messageListHandler.onMessageModified(l2, e3), p2 = d2.isUpdated, g2 = d2.message;
  53083. true === p2 && this.emitOuterEvent(k.MESSAGE_MODIFIED, [g2]);
  53084. var h2 = this._isTopicConversation(l2);
  53085. if (Ve.l("".concat(this._n, ".onMessageModified isUpdated:").concat(p2, " isTopicMessage:").concat(h2, " from:").concat(n3, " to:").concat(o2)), h2) {
  53086. this.getModule(Fn).onMessageModified(e3);
  53087. } else {
  53088. var _2 = this._conversationMap.get(l2);
  53089. if (_2) {
  53090. var f2 = _2.lastMessage;
  53091. Ve.d("".concat(this._n.onMessageModified, " lastMessage:"), JSON.stringify(f2), "options:", JSON.stringify(e3)), f2 && f2.lastTime === s3 && f2.lastSequence === a2 && f2.version !== u2 && (f2.type = i2[0].type, f2.payload = i2[0].content, f2.messageForShow = Vt(f2.type, f2.payload, this.isIntl()), f2.cloudCustomData = r2, f2.version = u2, this.emitConversationUpdate(true, false));
  53092. }
  53093. }
  53094. return g2;
  53095. } }, { key: "onNewGroupAtTips", value: function(e3) {
  53096. var n3 = this, o2 = e3.dataList, s3 = null;
  53097. o2.forEach(function(e4) {
  53098. e4.groupAtTips ? s3 = e4.groupAtTips : e4.elements ? s3 = t(t({}, e4.elements), {}, { sync: true }) : e4.groupAtType && (s3 = t(t({}, e4), {}, { sync: true })), s3.__random = e4.random, s3.__sequence = e4.clientSequence, n3._tmpGroupAtTipsList.push(s3);
  53099. }), Ve.d("".concat(this._n, ".onNewGroupAtTips isReady:").concat(this._isReady), this._tmpGroupAtTipsList), this._isReady && this._handleGroupAtTipsList();
  53100. } }, { key: "_handleGroupAtTipsList", value: function() {
  53101. var e3 = this;
  53102. if (0 !== this._tmpGroupAtTipsList.length) {
  53103. var t2 = false;
  53104. this._tmpGroupAtTipsList.forEach(function(n3) {
  53105. var o2 = n3.groupID, s3 = n3.from, a2 = n3.topicID, i2 = void 0 === a2 ? void 0 : a2, r2 = n3.sync, u2 = void 0 !== r2 && r2;
  53106. if (s3 !== e3.getMyUserID())
  53107. if (it(i2)) {
  53108. var c2 = e3._conversationMap.get("".concat(E.CONV_GROUP).concat(o2));
  53109. c2 && (c2.updateGroupAtInfoList(n3), t2 = true);
  53110. } else {
  53111. var l2 = e3._conversationMap.get("".concat(E.CONV_GROUP).concat(i2));
  53112. if (l2) {
  53113. l2.updateGroupAtInfoList(n3);
  53114. var d2 = e3.getModule(Fn), p2 = l2.groupAtInfoList;
  53115. d2.onConversationProxy({ topicID: i2, groupAtInfoList: p2 });
  53116. }
  53117. if (zt(l2) && u2)
  53118. e3.updateTopicConversation([{ conversationID: "".concat(E.CONV_GROUP).concat(i2), type: E.CONV_TOPIC }]), e3._conversationMap.get("".concat(E.CONV_GROUP).concat(i2)).updateGroupAtInfoList(n3);
  53119. }
  53120. }), t2 && this.emitConversationUpdate(true, false), this._tmpGroupAtTipsList.length = 0;
  53121. }
  53122. } }, { key: "_getC2CPeerReadTime", value: function(e3) {
  53123. var t2 = this, n3 = [];
  53124. if (e3.forEach(function(e4) {
  53125. t2._conversationMap.has(e4.conversationID) || e4.type !== E.CONV_C2C || n3.push(e4.conversationID.replace(E.CONV_C2C, ""));
  53126. }), n3.length > 0) {
  53127. Ve.d("".concat(this._n, "._getC2CPeerReadTime userIDList:").concat(n3));
  53128. var o2 = this.getModule(Un);
  53129. o2 && o2.getRemotePeerReadTime(n3);
  53130. }
  53131. } }, { key: "_getStorageConversationList", value: function() {
  53132. return this.getModule(Vn).getItem("conversationMap");
  53133. } }, { key: "_setStorageConversationList", value: function() {
  53134. var e3 = this.getLocalConversationList().filter(function(e4) {
  53135. return e4.type === E.CONV_C2C || e4.type === E.CONV_GROUP && e4.lastMessage.type !== E.MSG_GRP_TIP;
  53136. }).slice(0, 20).map(function(e4) {
  53137. return { conversationID: e4.conversationID, type: e4.type, subType: e4.subType, lastMessage: e4.lastMessage, groupProfile: e4.groupProfile, userProfile: e4.userProfile };
  53138. });
  53139. this.getModule(Vn).setItem("conversationMap", e3);
  53140. } }, { key: "emitConversationUpdate", value: function() {
  53141. var e3 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConversationList();
  53142. if (t2) {
  53143. var o2 = this.getModule(Pn);
  53144. o2 && o2.updateGroupLastMessage(n3);
  53145. }
  53146. e3 && this.emitOuterEvent(k.CONVERSATION_LIST_UPDATED);
  53147. } }, { key: "getLocalConversationList", value: function() {
  53148. return m(this._conversationMap.values()).filter(function(e3) {
  53149. return e3.type !== E.CONV_TOPIC;
  53150. });
  53151. } }, { key: "getLocalConversation", value: function(e3) {
  53152. return this._conversationMap.get(e3);
  53153. } }, { key: "hasLocalConversation", value: function(e3) {
  53154. return this._conversationMap.has(e3);
  53155. } }, { key: "getLocalOldestMessage", value: function(e3) {
  53156. return this._messageListHandler.getLocalOldestMessage(e3);
  53157. } }, { key: "syncConversationList", value: function() {
  53158. var e3 = this, t2 = new Aa("syncConversationList");
  53159. return this._pagingStatus === $t.NOT_START && this._conversationMap.clear(), this._pagingGetConversationList().then(function(n3) {
  53160. var o2 = function(e4) {
  53161. if (at(e4) && 0 !== e4.length) {
  53162. var t3 = 0;
  53163. return e4.forEach(function(e5) {
  53164. t3 += e5;
  53165. }), (t3 / e4.length).toFixed(0);
  53166. }
  53167. }(e3._pagingGetCostList);
  53168. return Ve.l("".concat(e3._n, ".").concat("syncConversationList", ". sum ").concat(function(e4) {
  53169. if (at(e4) && 0 !== e4.length) {
  53170. var t3 = 0;
  53171. return e4.forEach(function(e5) {
  53172. t3 += e5;
  53173. }), t3.toFixed(0);
  53174. }
  53175. }(e3._pagingGetCostList), " ms, average ").concat(o2, " ms")), e3._pagingGetCostList.length = 0, e3._pagingStatus = $t.RESOLVED, e3._diffAndDeleteConversation(), e3.emitConversationUpdate(true, false), e3._setStorageConversationList(), e3._handleC2CPeerReadTime(), e3._patchConversationProperties(), t2.setMessage(e3._conversationMap.size).setMoreMessage(o2).setNetworkType(e3.getNetworkType()).end(), n3;
  53176. }).catch(function(n3) {
  53177. return e3._pagingStatus = $t.REJECTED, t2.setMessage(e3._pagingTimeStamp), e3.probeNetwork().then(function(e4) {
  53178. var o2 = v(e4, 2), s3 = o2[0], a2 = o2[1];
  53179. t2.setError(n3, s3, a2).end();
  53180. }), Za(n3);
  53181. });
  53182. } }, { key: "_diffAndDeleteConversation", value: function() {
  53183. var e3 = this;
  53184. if (this._isSyncCompleted()) {
  53185. var t2 = [];
  53186. this._conversationMap.forEach(function(n3, o2) {
  53187. !e3._pagingConvIDMap.has(o2) && e3._convIDFromUnreadDBMap.has(o2) && (e3._conversationMap.delete(o2), t2.push(o2));
  53188. }), Ve.l("".concat(this._n, "._diffAndDeleteConversation list:").concat(t2));
  53189. }
  53190. } }, { key: "_patchConversationProperties", value: function() {
  53191. var e3 = this, t2 = Date.now(), n3 = this.checkAndPatchRemark(), o2 = this._messageRemindHandler.getC2CMessageRemindType(), s3 = this.getModule(Pn).getGroupList();
  53192. Promise.all([n3, o2, s3]).then(function() {
  53193. var n4 = Date.now() - t2;
  53194. Ve.l("".concat(e3._n, "._patchConversationProperties ok. cost ").concat(n4, " ms")), e3.emitConversationUpdate(true, false), e3.emitTotalUnreadMessageCountUpdate();
  53195. });
  53196. } }, { key: "_pagingGetConversationList", value: function() {
  53197. var e3 = this, t2 = "".concat(this._n, "._pagingGetConversationList");
  53198. Ve.l("".concat(t2, " timeStamp:").concat(this._pagingTimeStamp, " startIndex:").concat(this._pagingStartIndex) + " pinnedTimeStamp:".concat(this._pagingPinnedTimeStamp, " pinnedStartIndex:").concat(this._pagingPinnedStartIndex));
  53199. var n3 = Date.now();
  53200. return this._pagingStatus = $t.PENDING, this.request({ protocolName: Go, requestData: { fromAccount: this.getMyUserID(), timeStamp: this._pagingTimeStamp, startIndex: this._pagingStartIndex, pinnedTimeStamp: this._pagingPinnedTimeStamp, pinnedStartIndex: this._pagingPinnedStartIndex, orderType: 1 } }).then(function(o2) {
  53201. var s3 = o2.data, a2 = s3.completeFlag, i2 = s3.conversations, r2 = void 0 === i2 ? [] : i2, u2 = s3.timeStamp, c2 = s3.startIndex, l2 = s3.pinnedTimeStamp, d2 = s3.pinnedStartIndex, p2 = s3.groupItem, g2 = Date.now() - n3;
  53202. if (e3._pagingGetCostList.push(g2), Ve.l("".concat(t2, " ok. completeFlag:").concat(a2, " count:").concat(r2.length, " cost ").concat(g2, " ms")), e3._convGroupHandler.onConvGroupListSynced(p2), r2.length > 0) {
  53203. var h2 = e3._getConversationOptions(r2);
  53204. e3._pagingConvIDMap = new Map([].concat(m(e3._pagingConvIDMap), m(h2.map(function(e4) {
  53205. return [e4.conversationID, 1];
  53206. })))), e3._updateLocalConversationList({ conversationOptionsList: h2, isFromGetConversations: true }), e3.isLoggedIn() && e3.emitConversationUpdate();
  53207. }
  53208. if (!e3._isReady) {
  53209. if (!e3.isLoggedIn())
  53210. return Xa();
  53211. e3.triggerReady();
  53212. }
  53213. return e3._pagingTimeStamp = u2, e3._pagingStartIndex = c2, e3._pagingPinnedTimeStamp = l2, e3._pagingPinnedStartIndex = d2, 1 !== a2 ? e3._pagingGetConversationList() : (e3._handleGroupAtTipsList(), e3._convGroupHandler.getRemoteConvGroupList(), Xa());
  53214. }).catch(function(n4) {
  53215. throw e3.isLoggedIn() && (e3._isReady || (Ve.w("".concat(t2, " failed. error:"), n4), e3.triggerReady())), n4;
  53216. });
  53217. } }, { key: "_updateLocalConversationList", value: function(e3) {
  53218. var t2, n3 = e3.isFromGetConversations, o2 = e3.isInstantMessage, s3 = Date.now();
  53219. t2 = this._getTmpConversationListMapping(e3), this._conversationMap = new Map(this._sortConversationList([].concat(m(t2.toBeUpdatedConversationList), m(this._conversationMap)))), n3 || (this._updateUserOrGroupProfile(t2.newConversationList), o2 && this.emitTotalUnreadMessageCountUpdate()), Ve.d("".concat(this._n, "._updateLocalConversationList cost ").concat(Date.now() - s3, " ms"));
  53220. } }, { key: "_getTmpConversationListMapping", value: function(e3) {
  53221. for (var t2 = e3.conversationOptionsList, n3 = e3.isFromGetConversations, o2 = e3.isInstantMessage, s3 = e3.isUnreadC2CMessage, a2 = void 0 !== s3 && s3, i2 = e3.updateUnreadCount, r2 = [], u2 = [], c2 = this.getModule(Pn), l2 = this.getModule(bn), d2 = this.isIntl(), p2 = 0, g2 = t2.length; p2 < g2; p2++) {
  53222. var h2 = new fi(t2[p2], d2), _2 = h2.conversationID;
  53223. if (_2 !== "".concat(E.CONV_C2C, "@TLS#ERROR") && _2 !== "".concat(E.CONV_C2C, "@TLS#NOT_FOUND"))
  53224. if (this._conversationMap.has(_2)) {
  53225. var f2 = this._conversationMap.get(_2), v2 = ["unreadCount", "allowType", "adminForbidType", "payload", "isPinned"];
  53226. false === o2 && v2.push("lastMessage");
  53227. var m2 = t2[p2].lastMessage, M2 = !it(m2);
  53228. M2 || t2[p2].type === E.CONV_TOPIC || this._onLastMessageNotExist(t2[p2]), it(o2) && M2 && null === f2.lastMessage.payload && (f2.lastMessage.payload = m2.payload), zt(f2.lastMessage.revoker) || (f2.lastMessage.revoker = null), pt(f2, h2, v2, [null, void 0, "", 0, NaN]), true === i2 && f2.updateUnreadCount({ nextUnreadCount: h2.unreadCount, isFromGetConversations: n3, isUnreadC2CMessage: a2 }), o2 && M2 && (m2.payload && (f2.lastMessage.payload = m2.payload), f2.type === E.CONV_GROUP && (f2.lastMessage.nameCard = m2.nameCard, f2.lastMessage.nick = m2.nick)), M2 && f2.lastMessage.cloudCustomData !== m2.cloudCustomData && (f2.lastMessage.cloudCustomData = m2.cloudCustomData || ""), this._conversationMap.delete(_2), r2.push([_2, f2]);
  53229. } else {
  53230. if (h2.type === E.CONV_GROUP && c2) {
  53231. var y2 = h2.groupProfile.groupID, I2 = c2.getLocalGroupProfile(y2);
  53232. I2 && (h2.groupProfile = I2, true === i2 && h2.updateUnreadCount({ nextUnreadCount: 0 }));
  53233. } else if (h2.type === E.CONV_C2C) {
  53234. var C2 = _2.replace(E.CONV_C2C, "");
  53235. l2 && l2.isMyFriend(C2) && (h2.remark = l2.getFriendRemark(C2));
  53236. }
  53237. u2.push(h2), r2.push([_2, h2]);
  53238. }
  53239. }
  53240. var T2 = this.getModule(Fn);
  53241. return r2.forEach(function(e4) {
  53242. if (e4[1].type === E.CONV_TOPIC) {
  53243. var t3 = e4[1], n4 = t3.conversationID, o3 = t3.unreadCount, s4 = t3.groupAtInfoList;
  53244. T2.onConversationProxy({ topicID: n4.replace(E.CONV_GROUP, ""), unreadCount: o3, groupAtInfoList: zt(s4) ? void 0 : s4 });
  53245. }
  53246. }), { toBeUpdatedConversationList: r2, newConversationList: u2 };
  53247. } }, { key: "_onLastMessageNotExist", value: function(e3) {
  53248. new Aa("lastMessageNotExist").setMessage("".concat(JSON.stringify(e3))).setNetworkType(this.getNetworkType()).end();
  53249. } }, { key: "_sortConversationList", value: function(e3) {
  53250. var t2 = [], n3 = [], o2 = [], s3 = [];
  53251. return e3.forEach(function(e4) {
  53252. true === e4[1].isPinned ? zt(e4[1].lastMessage.lastTime) ? n3.push(e4) : t2.push(e4) : zt(e4[1].lastMessage.lastTime) ? s3.push(e4) : o2.push(e4);
  53253. }), t2.sort(function(e4, t3) {
  53254. return t3[1].lastMessage.lastTime - e4[1].lastMessage.lastTime;
  53255. }).concat(n3).concat(o2.sort(function(e4, t3) {
  53256. return t3[1].lastMessage.lastTime - e4[1].lastMessage.lastTime;
  53257. })).concat(s3);
  53258. } }, { key: "_sortConversationListAndEmitEvent", value: function() {
  53259. this._conversationMap = new Map(this._sortConversationList(m(this._conversationMap))), this.emitConversationUpdate(true, false);
  53260. } }, { key: "_updateUserOrGroupProfile", value: function(e3) {
  53261. var t2 = this;
  53262. if (0 !== e3.length) {
  53263. var n3 = [], o2 = [], s3 = this.getModule(Gn), a2 = this.getModule(Pn);
  53264. e3.forEach(function(e4) {
  53265. if (e4.type === E.CONV_C2C)
  53266. n3.push(e4.toAccount);
  53267. else if (e4.type === E.CONV_GROUP) {
  53268. var t3 = e4.toAccount;
  53269. a2.hasLocalGroup(t3) ? e4.groupProfile = a2.getLocalGroupProfile(t3) : o2.push(t3);
  53270. }
  53271. }), Ve.l("".concat(this._n, "._updateUserOrGroupProfile c2cUserIDList:").concat(n3, " groupIDList:").concat(o2)), n3.length > 0 && s3.getUserProfile({ userIDList: n3 }).then(function(e4) {
  53272. var n4 = e4.data;
  53273. at(n4) ? n4.forEach(function(e5) {
  53274. t2._doUpdateUserProfile("C2C".concat(e5.userID), e5);
  53275. }) : t2._doUpdateUserProfile("C2C".concat(n4.userID), n4);
  53276. }), o2.length > 0 && a2.getGroupProfileAdvance({ groupIDList: o2, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "FaceUrl"] } }).then(function(e4) {
  53277. e4.data.successGroupList.forEach(function(e5) {
  53278. var n4 = "GROUP".concat(e5.groupID);
  53279. if (t2._conversationMap.has(n4)) {
  53280. var o3 = t2._conversationMap.get(n4);
  53281. pt(o3.groupProfile, e5, [], [null, void 0, "", 0, NaN]), !o3.subType && e5.type && (o3.subType = e5.type);
  53282. }
  53283. });
  53284. });
  53285. }
  53286. } }, { key: "_doUpdateUserProfile", value: function(e3, t2) {
  53287. this.hasLocalConversation(e3) && (this.getLocalConversation(e3).userProfile = t2);
  53288. } }, { key: "_getConversationOptions", value: function(e3) {
  53289. var n3 = this, o2 = [], s3 = e3.filter(function(e4) {
  53290. var t2 = e4.type, n4 = e4.userID;
  53291. return 1 === t2 && "@TLS#NOT_FOUND" !== n4 && "@TLS#ERROR" !== n4 || 2 === t2;
  53292. }), a2 = this.getMyUserID(), i2 = s3.map(function(e4) {
  53293. if (it(e4.lastMsg) && (e4.lastMsg = { elements: [] }), 1 === e4.type) {
  53294. var s4 = { userID: e4.userID, nick: e4.peerNick, avatar: e4.peerAvatar };
  53295. return o2.push(s4), { conversationID: "C2C".concat(e4.userID), type: "C2C", lastMessage: { lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.lastC2CMsgFromAccount, messageForShow: e4.messageShow, type: e4.lastMsg.elements[0] ? e4.lastMsg.elements[0].type : null, payload: e4.lastMsg.elements[0] ? n3._amendLayersOverLimitProperty(e4.lastMsg.elements[0].content) : null, cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 8 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: e4.lastC2CMsgFromAccount === a2 && e4.time <= e4.c2cPeerReadTime, revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }, userProfile: new li(s4), peerReadTime: e4.c2cPeerReadTime, isPinned: 1 === e4.isPinned, messageRemindType: "", customData: e4.customMark || "", markList: Ht(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId) };
  53296. }
  53297. return { conversationID: "GROUP".concat(e4.groupID), type: "GROUP", lastMessage: t(t({ lastTime: e4.time, lastSequence: e4.sequence, fromAccount: e4.msgGroupFromAccount, messageForShow: e4.messageShow }, n3._patchTypeAndPayload(e4)), {}, { cloudCustomData: e4.lastMsg.cloudCustomData || "", isRevoked: 2 === e4.lastMessageFlag, onlineOnlyFlag: false, nick: e4.senderNick || "", nameCard: e4.senderNameCard || "", revoker: e4.lastMsg.revokerInfo ? e4.lastMsg.revokerInfo.revoker : null }), groupProfile: new hi({ groupID: e4.groupID, name: e4.groupNick, avatar: e4.groupImage }), unreadCount: e4.unreadCount, peerReadTime: 0, isPinned: 1 === e4.isPinned, messageRemindType: "", version: 0, customData: e4.customMark || "", markList: Ht(e4.standardMark), conversationGroupList: n3._convGroupHandler.getConvGroupListByID(e4.contactGroupId) };
  53298. });
  53299. o2.length > 0 && this.getModule(Gn).onConversationsProfileUpdated(o2);
  53300. return i2;
  53301. } }, { key: "_patchTypeAndPayload", value: function(e3) {
  53302. var n3 = e3.lastMsg, o2 = n3.event, s3 = void 0 === o2 ? void 0 : o2, a2 = n3.elements, i2 = void 0 === a2 ? [] : a2, r2 = n3.groupTips, u2 = void 0 === r2 ? {} : r2;
  53303. if (!it(s3) && !zt(u2)) {
  53304. var c2 = new Wa(u2);
  53305. c2.setElement({ type: E.MSG_GRP_TIP, content: t(t({}, u2.elements), {}, { groupProfile: u2.groupProfile }) });
  53306. var l2 = JSON.parse(JSON.stringify(c2.payload));
  53307. return c2 = null, { type: E.MSG_GRP_TIP, payload: l2 };
  53308. }
  53309. return { type: i2[0] ? i2[0].type : null, payload: i2[0] ? this._amendLayersOverLimitProperty(i2[0].content) : null };
  53310. } }, { key: "_amendLayersOverLimitProperty", value: function(e3) {
  53311. var t2 = e3.layersOverLimit;
  53312. return 0 === t2 ? e3.layersOverLimit = false : 1 === t2 && (e3.layersOverLimit = true), e3;
  53313. } }, { key: "getLocalMessageList", value: function(e3) {
  53314. return this._messageListHandler.getLocalMessageList(e3);
  53315. } }, { key: "deleteLocalMessage", value: function(e3) {
  53316. e3 instanceof Wa && this._messageListHandler.remove(e3);
  53317. } }, { key: "onConversationDeleted", value: function(e3) {
  53318. if (at(e3)) {
  53319. var t2 = e3.map(function(e4) {
  53320. var t3 = e4.type, n3 = e4.userID, o2 = e4.groupID;
  53321. return 1 === t3 ? "".concat(E.CONV_C2C).concat(n3) : 2 === t3 ? "".concat(E.CONV_GROUP).concat(o2) : void 0;
  53322. });
  53323. Ve.l("".concat(this._n, ".onConversationDeleted conversationIDList:").concat(t2)), this.deleteLocalConversationList(t2);
  53324. }
  53325. } }, { key: "onConversationPinned", value: function(e3) {
  53326. var t2 = this;
  53327. if (at(e3)) {
  53328. var n3 = false;
  53329. e3.forEach(function(e4) {
  53330. var o2, s3 = e4.type, a2 = e4.userID, i2 = e4.groupID;
  53331. 1 === s3 ? o2 = t2.getLocalConversation("".concat(E.CONV_C2C).concat(a2)) : 2 === s3 && (o2 = t2.getLocalConversation("".concat(E.CONV_GROUP).concat(i2))), o2 && (Ve.l("".concat(t2._n, ".onConversationPinned conversationID:").concat(o2.conversationID, " isPinned:").concat(o2.isPinned)), o2.isPinned || (o2.isPinned = true, n3 = true));
  53332. }), n3 && this._sortConversationListAndEmitEvent();
  53333. }
  53334. } }, { key: "onConversationUnpinned", value: function(e3) {
  53335. var t2 = this;
  53336. if (at(e3)) {
  53337. var n3 = false;
  53338. e3.forEach(function(e4) {
  53339. var o2, s3 = e4.type, a2 = e4.userID, i2 = e4.groupID;
  53340. 1 === s3 ? o2 = t2.getLocalConversation("".concat(E.CONV_C2C).concat(a2)) : 2 === s3 && (o2 = t2.getLocalConversation("".concat(E.CONV_GROUP).concat(i2))), o2 && (Ve.l("".concat(t2._n, ".onConversationUnpinned conversationID:").concat(o2.conversationID, " isPinned:").concat(o2.isPinned)), o2.isPinned && (o2.isPinned = false, n3 = true));
  53341. }), n3 && this._sortConversationListAndEmitEvent();
  53342. }
  53343. } }, { key: "getMessageList", value: function(e3) {
  53344. var t2 = this, n3 = e3.conversationID, o2 = e3.nextReqMessageID, s3 = e3.count, a2 = "".concat(this._n, ".getMessageList"), i2 = this.getLocalConversation(n3), r2 = "";
  53345. if (i2 && i2.groupProfile && (r2 = i2.groupProfile.type), Tt(r2))
  53346. return Ve.l("".concat(a2, " not available in avchatroom. conversationID:").concat(n3)), Xa({ messageList: [], nextReqMessageID: "", isCompleted: true });
  53347. (it(s3) || s3 > 15) && (s3 = 15), !o2 && this._isNotInCommunity(n3) && (this._messageListHandler.removeByConversationID(n3), this._completedMap.delete(n3), this._roamingMessageSequenceMap.delete(n3));
  53348. var u2 = this._computeRemainingCount({ conversationID: n3, nextReqMessageID: o2 }), c2 = this._completedMap.has(n3);
  53349. if (Ve.l("".concat(a2, " conversationID:").concat(n3, " nextReqMessageID:").concat(o2) + " remainingCount:".concat(u2, " count:").concat(s3, " isCompleted:").concat(c2)), this._needGetHistory({ conversationID: n3, remainingCount: u2, count: s3 }))
  53350. return this.getHistoryMessages({ conversationID: n3, nextReqMessageID: o2, count: 20 }).then(function(e4) {
  53351. var o3 = e4.nextReqID, s4 = e4.storedMessageList, i3 = t2._completedMap.has(n3), r3 = s4;
  53352. u2 > 0 && (r3 = t2._messageListHandler.getLocalMessageList(n3).slice(0, s4.length + u2));
  53353. var c3 = { nextReqMessageID: i3 ? "" : o3, messageList: r3, isCompleted: i3 };
  53354. return Ve.l("".concat(a2, " ret.nextReqMessageID:").concat(c3.nextReqMessageID, " ret.isCompleted:").concat(c3.isCompleted, " ret.length:").concat(r3.length)), Ya(c3);
  53355. });
  53356. this.modifyMessageList(n3);
  53357. var l2 = this._getMessageListFromMemory({ conversationID: n3, nextReqMessageID: o2, count: s3 });
  53358. return Xa(l2);
  53359. } }, { key: "_getMessageListFromMemory", value: function(e3) {
  53360. var t2 = e3.conversationID, n3 = e3.nextReqMessageID, o2 = e3.count, s3 = "".concat(this._n, "._getMessageListFromMemory"), a2 = this._messageListHandler.getLocalMessageList(t2), i2 = a2.length, r2 = 0, u2 = { isCompleted: false, nextReqMessageID: "", messageList: [] };
  53361. return n3 ? (r2 = a2.findIndex(function(e4) {
  53362. return e4.ID === n3;
  53363. })) > o2 ? (u2.messageList = a2.slice(r2 - o2, r2), u2.nextReqMessageID = a2[r2 - o2].ID) : (u2.messageList = a2.slice(0, r2), u2.isCompleted = true) : i2 > o2 ? (r2 = i2 - o2, u2.messageList = a2.slice(r2, i2), u2.nextReqMessageID = a2[r2].ID) : (u2.messageList = a2.slice(0, i2), u2.isCompleted = true), Ve.l("".concat(s3, " conversationID:").concat(t2) + " ret.nextReqMessageID:".concat(u2.nextReqMessageID, " ret.isCompleted:").concat(u2.isCompleted, " ret.length:").concat(u2.messageList.length)), u2;
  53364. } }, { key: "getMessageListHopping", value: function(e3) {
  53365. var t2 = e3.conversationID, n3 = e3.sequence, o2 = e3.time, s3 = e3.count, a2 = e3.direction, i2 = void 0 === a2 ? 0 : a2;
  53366. if ((it(s3) || s3 > 15) && (s3 = 15), t2.startsWith(E.CONV_C2C)) {
  53367. var r2 = this.getModule(Un), u2 = t2.replace(E.CONV_C2C, "");
  53368. return r2.getRoamingMessagesHopping({ peerAccount: u2, time: o2, count: s3, direction: i2 });
  53369. }
  53370. if (t2.startsWith(E.CONV_GROUP)) {
  53371. var c2 = this.getModule(Pn), l2 = t2.replace(E.CONV_GROUP, "");
  53372. return c2.getRoamingMessagesHopping({ groupID: l2, sequence: n3, count: s3, direction: i2 });
  53373. }
  53374. } }, { key: "_computeRemainingCount", value: function(e3) {
  53375. var t2 = e3.conversationID, n3 = e3.nextReqMessageID, o2 = this._messageListHandler.getLocalMessageList(t2), s3 = o2.length;
  53376. if (!n3)
  53377. return s3;
  53378. var a2 = 0;
  53379. return Et(t2) ? a2 = o2.findIndex(function(e4) {
  53380. return e4.ID === n3;
  53381. }) : St(t2) && (a2 = -1 !== n3.indexOf("-") ? o2.findIndex(function(e4) {
  53382. return e4.ID === n3;
  53383. }) : o2.findIndex(function(e4) {
  53384. return e4.sequence === n3;
  53385. })), -1 === a2 && (a2 = 0), a2;
  53386. } }, { key: "_getMessageListSize", value: function(e3) {
  53387. return this._messageListHandler.getLocalMessageList(e3).length;
  53388. } }, { key: "_needGetHistory", value: function(e3) {
  53389. var t2 = e3.conversationID, n3 = e3.remainingCount, o2 = e3.count, s3 = this.getLocalConversation(t2), a2 = "";
  53390. return s3 && s3.groupProfile && (a2 = s3.groupProfile.type), !Lt(t2) && !Tt(a2) && (!(St(t2) && this._isPagingGetGroupListCompleted() && this._getLocalGroupCount() <= 4e3 && !this._hasLocalGroup(t2) && !this._isTopicConversation(t2)) && (n3 <= o2 && !this._completedMap.has(t2)));
  53391. } }, { key: "_isTopicConversation", value: function(e3) {
  53392. var t2 = e3.replace(E.CONV_GROUP, "");
  53393. return kt(t2);
  53394. } }, { key: "getHistoryMessages", value: function(e3) {
  53395. var t2 = e3.conversationID, n3 = e3.count;
  53396. if (t2 === E.CONV_SYSTEM)
  53397. return Xa();
  53398. var o2 = 15;
  53399. n3 > 20 && (o2 = 20);
  53400. var s3 = null;
  53401. if (Et(t2)) {
  53402. var a2 = this._roamingMessageKeyAndTimeMap.has(t2);
  53403. return (s3 = this.getModule(Un)) ? s3.getRoamingMessage({ conversationID: t2, peerAccount: t2.replace(E.CONV_C2C, ""), count: o2, lastMessageTime: a2 ? this._roamingMessageKeyAndTimeMap.get(t2).lastMessageTime : 0, messageKey: a2 ? this._roamingMessageKeyAndTimeMap.get(t2).messageKey : "" }) : Za({ code: ha.CANNOT_FIND_MODULE });
  53404. }
  53405. if (St(t2)) {
  53406. if (!(s3 = this.getModule(Pn)))
  53407. return Za({ code: ha.CANNOT_FIND_MODULE });
  53408. var i2 = null;
  53409. this._conversationMap.has(t2) && (i2 = this._conversationMap.get(t2).lastMessage);
  53410. var r2 = 0;
  53411. i2 && (r2 = i2.lastSequence);
  53412. var u2 = this._roamingMessageSequenceMap.get(t2);
  53413. return s3.getRoamingMessage({ conversationID: t2, groupID: t2.replace(E.CONV_GROUP, ""), count: o2, sequence: u2 || r2 });
  53414. }
  53415. return Xa();
  53416. } }, { key: "patchConversationLastMessage", value: function(e3) {
  53417. var t2 = this.getLocalConversation(e3);
  53418. if (t2) {
  53419. var n3 = t2.lastMessage, o2 = n3.messageForShow, s3 = n3.payload;
  53420. if (zt(o2) || zt(s3)) {
  53421. var a2 = this._messageListHandler.getLocalMessageList(e3);
  53422. if (0 === a2.length)
  53423. return;
  53424. var i2 = a2[a2.length - 1];
  53425. Ve.l("".concat(this._n, ".patchConversationLastMessage conversationID:").concat(e3, " payload:"), i2.payload), t2.updateLastMessage(i2);
  53426. }
  53427. }
  53428. } }, { key: "onRoamingMessage", value: function() {
  53429. var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], n3 = arguments.length > 1 ? arguments[1] : void 0, o2 = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], s3 = n3.startsWith(E.CONV_C2C) ? E.CONV_C2C : E.CONV_GROUP, a2 = null, i2 = [], r2 = [], u2 = 0, c2 = e3.length, l2 = null, d2 = s3 === E.CONV_GROUP, p2 = this.getModule(Kn), g2 = this.getFileDownloadProxy(), h2 = function() {
  53430. u2 = d2 ? e3.length - 1 : 0, c2 = d2 ? 0 : e3.length;
  53431. }, _2 = function() {
  53432. d2 ? --u2 : ++u2;
  53433. }, f2 = function() {
  53434. return d2 ? u2 >= c2 : u2 < c2;
  53435. };
  53436. for (h2(); f2(); _2())
  53437. if (d2 && 1 === e3[u2].sequence && o2 && this.setCompleted(n3), 1 !== e3[u2].isPlaceMessage)
  53438. if ((a2 = new Wa(e3[u2])).to = e3[u2].to, s3 !== E.CONV_GROUP || it(e3[u2].topicID) || (a2.to = e3[u2].topicID), a2.isSystemMessage = !!e3[u2].isSystemMessage, a2.conversationType = s3, 4 === e3[u2].event ? l2 = { type: E.MSG_GRP_TIP, content: t(t({}, e3[u2].elements), {}, { groupProfile: e3[u2].groupProfile }) } : (e3[u2].elements = p2.parseElements(e3[u2].elements, e3[u2].from), l2 = e3[u2].elements), d2 || a2.setNickAndAvatar({ nick: e3[u2].nick, avatar: e3[u2].avatar }), zt(l2)) {
  53439. var v2 = new Aa("emptyMessageBody");
  53440. v2.setMessage("from:".concat(a2.from, " to:").concat(a2.to, " sequence:").concat(a2.sequence, " event:").concat(e3[u2].event)), v2.setNetworkType(this.getNetworkType()).setLevel("warning").end();
  53441. } else
  53442. a2.setElement(l2, g2), a2.reInitialize(this.getMyUserID()), i2.push(a2);
  53443. return h2 = _2 = f2 = null, o2 ? (this._messageListHandler.unshift(i2, r2), i2 = null, r2) : (r2 = null, i2);
  53444. } }, { key: "findMessage", value: function(e3) {
  53445. return this._messageListHandler.findMessage(e3);
  53446. } }, { key: "_isNotInCommunity", value: function(e3) {
  53447. var t2 = false;
  53448. if (e3.startsWith(E.CONV_GROUP) && this._isTopicConversation(e3)) {
  53449. var n3 = xt(e3.replace(E.CONV_GROUP, ""));
  53450. this.getModule(Pn).hasLocalGroup(n3) || (t2 = true);
  53451. }
  53452. return t2;
  53453. } }, { key: "deleteTopicRoamingMessageInfo", value: function(e3) {
  53454. var t2 = this;
  53455. Dt({ groupID: e3 }) && this._messageListHandler.getTopicConversationIDList(e3).forEach(function(e4) {
  53456. t2._messageListHandler.removeByConversationID(e4), t2._completedMap.delete(e4), t2._roamingMessageSequenceMap.delete(e4);
  53457. });
  53458. } }, { key: "deleteGroupRomaingMessageInfo", value: function(e3) {
  53459. var t2 = "".concat(E.CONV_GROUP).concat(e3);
  53460. this._messageListHandler.removeByConversationID(t2), this._completedMap.delete(t2), this._roamingMessageSequenceMap.delete(t2);
  53461. } }, { key: "setMessageRead", value: function(e3) {
  53462. var t2 = e3.conversationID, n3 = this.getLocalConversation(t2);
  53463. if (Ve.l("".concat(this._n, ".setMessageRead conversationID:").concat(t2, " unreadCount:").concat(n3 ? n3.unreadCount : 0)), !n3)
  53464. return Xa();
  53465. if (n3.type !== E.CONV_GROUP && n3.type !== E.CONV_TOPIC || zt(n3.groupAtInfoList) || this.deleteGroupAtTips(t2), 0 === n3.unreadCount)
  53466. return Xa();
  53467. if (n3.type === E.CONV_GROUP && !this._hasLocalGroup(t2))
  53468. return 0 !== n3.unreadCount && (n3.unreadCount = 0, this.emitConversationUpdate(true, false)), Xa();
  53469. var o2 = this._messageListHandler.getLocalLastMessage(t2), s3 = n3.lastMessage.lastTime;
  53470. o2 && s3 < o2.time && (s3 = o2.time);
  53471. var a2 = n3.lastMessage.lastSequence;
  53472. if (o2 && a2 < o2.sequence && (a2 = o2.sequence), n3.type === E.CONV_TOPIC && it(o2)) {
  53473. var i2 = this.getModule(Fn), r2 = t2.replace(E.CONV_GROUP, ""), u2 = xt(r2), c2 = i2.getLocalTopic(u2, r2);
  53474. c2 && (a2 = c2.nextMessageSeq - 1);
  53475. }
  53476. var l2 = null;
  53477. switch (n3.type) {
  53478. case E.CONV_C2C:
  53479. return (l2 = this.getModule(Un)) ? l2.setMessageRead({ conversationID: t2, lastMessageTime: s3 }) : Za({ code: ha.CANNOT_FIND_MODULE });
  53480. case E.CONV_GROUP:
  53481. case E.CONV_TOPIC:
  53482. return (l2 = this.getModule(Pn)) ? l2.setMessageRead({ conversationID: t2, lastMessageSeq: a2 }) : Za({ code: ha.CANNOT_FIND_MODULE });
  53483. case E.CONV_SYSTEM:
  53484. return n3.unreadCount = 0, this.emitConversationUpdate(true, false), Xa();
  53485. default:
  53486. return Xa();
  53487. }
  53488. } }, { key: "setAllMessageRead", value: function() {
  53489. var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n3 = "setAllMessageRead", o2 = "".concat(this._n, ".").concat(n3);
  53490. t2.scope || (t2.scope = E.READ_ALL_MSG), Ve.l("".concat(o2, " options:"), t2);
  53491. var s3 = this._createSetAllMessageReadPack(t2);
  53492. if (0 === s3.readAllC2CMessage && 0 === s3.groupMessageReadInfoList.length)
  53493. return Xa();
  53494. var a2 = new Aa(n3);
  53495. return this.request({ protocolName: us, requestData: s3 }).then(function(n4) {
  53496. var o3 = n4.data, s4 = e3._handleAllMessageRead(o3);
  53497. return a2.setMessage("scope:".concat(t2.scope, " failureGroups:").concat(JSON.stringify(s4))).setNetworkType(e3.getNetworkType()).end(), Xa();
  53498. }).catch(function(t3) {
  53499. return e3.probeNetwork().then(function(e4) {
  53500. var n4 = v(e4, 2), o3 = n4[0], s4 = n4[1];
  53501. a2.setError(t3, o3, s4).end();
  53502. }), Ve.w("".concat(o2, " failed. error:"), t3), Za({ code: t3 && t3.code ? t3.code : ha.MESSAGE_UNREAD_ALL_FAIL, message: t3 && t3.message ? t3.message : void 0 });
  53503. });
  53504. } }, { key: "setConversationCustomData", value: function(e3) {
  53505. return this._convGroupHandler.setConvCustomData(e3);
  53506. } }, { key: "markConversation", value: function(e3) {
  53507. return this._convGroupHandler.markConversation(e3);
  53508. } }, { key: "getConversationGroupList", value: function() {
  53509. return this._convGroupHandler.getLocalConvGroupList();
  53510. } }, { key: "createConversationGroup", value: function(e3) {
  53511. return this._convGroupHandler.createConvGroup(e3);
  53512. } }, { key: "deleteConversationGroup", value: function(e3) {
  53513. return this._convGroupHandler.deleteConvGroup(e3);
  53514. } }, { key: "renameConversationGroup", value: function(e3) {
  53515. return this._convGroupHandler.renameConvGroup(e3);
  53516. } }, { key: "addConversationsToGroup", value: function(e3) {
  53517. return this._convGroupHandler.addConvsToGroup(e3);
  53518. } }, { key: "deleteConversationsFromGroup", value: function(e3) {
  53519. return this._convGroupHandler.deleteConvsFromGroup(e3);
  53520. } }, { key: "onConversationMarkUpdated", value: function(e3) {
  53521. this._convGroupHandler.onConvMarkUpdated(e3);
  53522. } }, { key: "onConversationGroupCreated", value: function(e3) {
  53523. this._convGroupHandler.onConvGroupCreated(e3);
  53524. } }, { key: "onConversationGroupDeleted", value: function(e3) {
  53525. this._convGroupHandler.onConvGroupDeleted(e3);
  53526. } }, { key: "onConversationGroupNameUpdated", value: function(e3) {
  53527. this._convGroupHandler.onConvGroupNameUpdated(e3);
  53528. } }, { key: "onConversationInGroupUpdated", value: function(e3) {
  53529. this._convGroupHandler.onConvInGroupUpdated(e3);
  53530. } }, { key: "onConversationAddedToOrDeletedFromGroup", value: function(e3) {
  53531. this._convGroupHandler.onConvAddedToOrDeletedFromGroup(e3);
  53532. } }, { key: "_getConversationLastMessageSequence", value: function(e3) {
  53533. var t2 = this._messageListHandler.getLocalLastMessage(e3.conversationID), n3 = e3.lastMessage.lastSequence;
  53534. return t2 && n3 < t2.sequence && (n3 = t2.sequence), n3;
  53535. } }, { key: "_getConversationLastMessageTime", value: function(e3) {
  53536. var t2 = this._messageListHandler.getLocalLastMessage(e3.conversationID), n3 = e3.lastMessage.lastTime;
  53537. return t2 && n3 < t2.time && (n3 = t2.time), n3;
  53538. } }, { key: "_createSetAllMessageReadPack", value: function(e3) {
  53539. var t2, n3 = { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, o2 = e3.scope, s3 = D(this._conversationMap);
  53540. try {
  53541. for (s3.s(); !(t2 = s3.n()).done; ) {
  53542. var a2 = v(t2.value, 2)[1];
  53543. if (a2.unreadCount > 0) {
  53544. if (a2.type === E.CONV_C2C && 0 === n3.readAllC2CMessage) {
  53545. if (o2 === E.READ_ALL_MSG)
  53546. n3.readAllC2CMessage = 1;
  53547. else if (o2 === E.READ_ALL_C2C_MSG) {
  53548. n3.readAllC2CMessage = 1;
  53549. break;
  53550. }
  53551. } else if (a2.type === E.CONV_GROUP && (o2 === E.READ_ALL_GROUP_MSG || o2 === E.READ_ALL_MSG)) {
  53552. var i2 = this._getConversationLastMessageSequence(a2);
  53553. n3.groupMessageReadInfoList.push({ groupID: a2.groupProfile.groupID, messageSequence: i2 });
  53554. }
  53555. }
  53556. }
  53557. } catch (r2) {
  53558. s3.e(r2);
  53559. } finally {
  53560. s3.f();
  53561. }
  53562. return n3;
  53563. } }, { key: "onPushedAllMessageRead", value: function(e3) {
  53564. this._handleAllMessageRead(e3);
  53565. } }, { key: "_handleAllMessageRead", value: function(e3) {
  53566. var t2 = e3.groupMessageReadInfoList, n3 = e3.readAllC2CMessage, o2 = this._parseGroupReadInfo(t2);
  53567. return this._updateAllConversationUnreadCount({ readAllC2CMessage: n3 }) >= 1 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate()), o2;
  53568. } }, { key: "_parseGroupReadInfo", value: function(e3) {
  53569. var t2 = [];
  53570. if (e3 && e3.length)
  53571. for (var n3 = 0, o2 = e3.length; n3 < o2; n3++) {
  53572. var s3 = e3[n3], a2 = s3.groupID, i2 = s3.sequence, r2 = s3.retCode, u2 = s3.lastMessageSeq;
  53573. it(r2) ? this._remoteGroupReadSequenceMap.set(a2, u2) : (this._remoteGroupReadSequenceMap.set(a2, i2), 0 !== r2 && t2.push("".concat(a2, "-").concat(i2, "-").concat(r2)));
  53574. }
  53575. return t2;
  53576. } }, { key: "_updateAllConversationUnreadCount", value: function(e3) {
  53577. var t2, n3 = e3.readAllC2CMessage, o2 = 0, s3 = D(this._conversationMap);
  53578. try {
  53579. for (s3.s(); !(t2 = s3.n()).done; ) {
  53580. var a2 = v(t2.value, 2), i2 = a2[0], r2 = a2[1];
  53581. if (r2.unreadCount >= 1) {
  53582. if (1 === n3 && r2.type === E.CONV_C2C) {
  53583. var u2 = this._getConversationLastMessageTime(r2);
  53584. this.updateIsReadAfterReadReport({ conversationID: i2, lastMessageTime: u2 });
  53585. } else if (r2.type === E.CONV_GROUP) {
  53586. var c2 = i2.replace(E.CONV_GROUP, "");
  53587. if (this._remoteGroupReadSequenceMap.has(c2)) {
  53588. var l2 = this._remoteGroupReadSequenceMap.get(c2), d2 = this._getConversationLastMessageSequence(r2);
  53589. this.updateIsReadAfterReadReport({ conversationID: i2, remoteReadSequence: l2 }), d2 >= l2 && this._remoteGroupReadSequenceMap.delete(c2);
  53590. }
  53591. }
  53592. this.updateUnreadCount(i2, false) && (o2 += 1);
  53593. }
  53594. }
  53595. } catch (p2) {
  53596. s3.e(p2);
  53597. } finally {
  53598. s3.f();
  53599. }
  53600. return o2;
  53601. } }, { key: "isRemoteRead", value: function(e3) {
  53602. var t2 = e3.conversationID, n3 = e3.sequence, o2 = t2.replace(E.CONV_GROUP, ""), s3 = false;
  53603. if (this._remoteGroupReadSequenceMap.has(o2)) {
  53604. var a2 = this._remoteGroupReadSequenceMap.get(o2);
  53605. n3 <= a2 && (s3 = true, Ve.l("".concat(this._n, ".isRemoteRead conversationID:").concat(t2, " messageSequence:").concat(n3, " remoteReadSequence:").concat(a2))), n3 >= a2 + 10 && this._remoteGroupReadSequenceMap.delete(o2);
  53606. }
  53607. return s3;
  53608. } }, { key: "updateIsReadAfterReadReport", value: function(e3) {
  53609. var t2 = e3.conversationID, n3 = e3.lastMessageSeq, o2 = e3.lastMessageTime, s3 = this._messageListHandler.getLocalMessageList(t2);
  53610. if (0 !== s3.length) {
  53611. for (var a2, i2 = s3.length - 1; i2 >= 0; i2--)
  53612. if (a2 = s3[i2], !(o2 && a2.time > o2 || n3 && a2.sequence > n3)) {
  53613. if ("in" === a2.flow && a2.isRead)
  53614. break;
  53615. a2.setIsRead(true);
  53616. }
  53617. }
  53618. } }, { key: "updateUnreadCount", value: function(e3) {
  53619. var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = false, o2 = this.getLocalConversation(e3), s3 = this._messageListHandler.getLocalMessageList(e3);
  53620. if (o2) {
  53621. var a2 = o2.unreadCount, i2 = s3.filter(function(e4) {
  53622. return !e4.isRead && !e4._onlineOnlyFlag && !e4.isDeleted;
  53623. }).length;
  53624. if (a2 !== i2 && (o2.unreadCount = i2, n3 = true, Ve.l("".concat(this._n, ".updateUnreadCount from ").concat(a2, " to ").concat(i2, ", conversationID:").concat(e3)), true === t2 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate())), n3 && o2.type === E.CONV_TOPIC) {
  53625. var r2 = o2.unreadCount, u2 = this.getModule(Fn), c2 = e3.replace(E.CONV_GROUP, "");
  53626. u2.onConversationProxy({ topicID: c2, unreadCount: r2 });
  53627. }
  53628. return n3;
  53629. }
  53630. } }, { key: "clearGroupAtInfoList", value: function(e3) {
  53631. var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConversation(e3);
  53632. if (n3 && n3.groupAtInfoList.length > 0) {
  53633. if (n3.clearGroupAtInfoList(), Ve.l("".concat(this._n, ".clearGroupAtInfoList conversationID:").concat(e3)), n3.type === E.CONV_TOPIC) {
  53634. var o2 = n3.groupAtInfoList, s3 = this.getModule(Fn), a2 = e3.replace(E.CONV_GROUP, "");
  53635. s3.onConversationProxy({ topicID: a2, groupAtInfoList: o2 });
  53636. }
  53637. true === t2 && this.emitConversationUpdate(true, false);
  53638. }
  53639. } }, { key: "updateReadReceiptInfo", value: function(e3) {
  53640. var t2 = this, n3 = e3.userID, o2 = void 0 === n3 ? void 0 : n3, s3 = e3.groupID, a2 = void 0 === s3 ? void 0 : s3, i2 = e3.readReceiptList;
  53641. if (!zt(i2)) {
  53642. var r2 = [];
  53643. if (it(o2)) {
  53644. if (!it(a2)) {
  53645. var u2 = "".concat(E.CONV_GROUP).concat(a2);
  53646. i2.forEach(function(e4) {
  53647. var n4 = e4.tinyID, o3 = e4.clientTime, s4 = e4.random, i3 = e4.readCount, c3 = e4.unreadCount, l2 = "".concat(n4, "-").concat(o3, "-").concat(s4), d2 = t2._messageListHandler.getLocalMessage(u2, l2), p2 = { groupID: a2, messageID: l2, readCount: 0, unreadCount: 0 };
  53648. d2 && (et(i3) && (d2.readReceiptInfo.readCount = i3, p2.readCount = i3), et(c3) && (d2.readReceiptInfo.unreadCount = c3, p2.unreadCount = c3), r2.push(p2));
  53649. });
  53650. }
  53651. } else {
  53652. var c2 = "".concat(E.CONV_C2C).concat(o2);
  53653. i2.forEach(function(e4) {
  53654. var n4 = e4.tinyID, s4 = e4.clientTime, a3 = e4.random, i3 = "".concat(n4, "-").concat(s4, "-").concat(a3), u3 = t2._messageListHandler.getLocalMessage(c2, i3);
  53655. if (u3) {
  53656. u3.readReceiptInfo.isPeerRead = true;
  53657. var l2 = { userID: o2, messageID: i3, isPeerRead: true };
  53658. r2.push(l2);
  53659. }
  53660. });
  53661. }
  53662. r2.length > 0 && this.emitOuterEvent(k.MESSAGE_READ_RECEIPT_RECEIVED, r2);
  53663. }
  53664. } }, { key: "recomputeGroupUnreadCount", value: function(e3) {
  53665. var t2 = e3.conversationID, n3 = e3.count, o2 = this.getLocalConversation(t2);
  53666. if (o2) {
  53667. var s3 = o2.unreadCount, a2 = s3 - n3;
  53668. a2 < 0 && (a2 = 0), o2.unreadCount = a2, Ve.l("".concat(this._n, ".recomputeGroupUnreadCount from ").concat(s3, " to ").concat(a2, ", conversationID:").concat(t2));
  53669. }
  53670. } }, { key: "updateIsRead", value: function(e3) {
  53671. var t2 = this.getLocalConversation(e3), n3 = this.getLocalMessageList(e3);
  53672. if (t2 && 0 !== n3.length && !Lt(t2.type)) {
  53673. for (var o2 = [], s3 = 0, a2 = n3.length; s3 < a2; s3++)
  53674. "in" !== n3[s3].flow ? "out" !== n3[s3].flow || n3[s3].isRead || n3[s3].setIsRead(true) : o2.push(n3[s3]);
  53675. var i2 = 0;
  53676. if (t2.type === E.CONV_C2C) {
  53677. var r2 = o2.slice(-t2.unreadCount).filter(function(e4) {
  53678. return e4.isRevoked;
  53679. }).length;
  53680. i2 = o2.length - t2.unreadCount - r2;
  53681. } else
  53682. i2 = o2.length - t2.unreadCount;
  53683. for (var u2 = 0; u2 < i2 && !o2[u2].isRead; u2++)
  53684. o2[u2].setIsRead(true);
  53685. }
  53686. } }, { key: "deleteGroupAtTips", value: function(e3) {
  53687. var t2 = this, n3 = "".concat(this._n, ".deleteGroupAtTips");
  53688. Ve.l("".concat(n3));
  53689. var o2 = this._conversationMap.get(e3);
  53690. if (!o2)
  53691. return Promise.resolve();
  53692. var s3 = o2.groupAtInfoList;
  53693. if (0 === s3.length)
  53694. return Promise.resolve();
  53695. var a2 = void 0;
  53696. e3.startsWith(E.CONV_GROUP) && (a2 = e3.replace(E.CONV_GROUP, ""));
  53697. var i2 = m(s3);
  53698. if ((Dt({ groupID: a2 }) || kt(a2)) && 0 === (i2 = s3.filter(function(e4) {
  53699. return !e4.atTypeArray.includes(E.CONV_AT_ALL);
  53700. })).length)
  53701. return this.clearGroupAtInfoList(e3, false), Promise.resolve();
  53702. var r2 = this.getMyUserID();
  53703. return this.request({ protocolName: Fo, requestData: { messageListToDelete: i2.map(function(e4) {
  53704. return { from: e4.from, to: r2, messageSeq: e4.__sequence, messageRandom: e4.__random, groupID: it(e4.topicID) ? e4.groupID : e4.topicID };
  53705. }) } }).then(function() {
  53706. return Ve.l("".concat(n3, " ok. count:").concat(s3.length)), t2.clearGroupAtInfoList(e3, false), Promise.resolve();
  53707. }).catch(function(e4) {
  53708. return Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  53709. });
  53710. } }, { key: "appendToMessageList", value: function(e3) {
  53711. this._messageListHandler.pushIn(e3);
  53712. } }, { key: "setMessageRandom", value: function(e3) {
  53713. this.singlyLinkedList.set(e3.random);
  53714. } }, { key: "deleteMessageRandom", value: function(e3) {
  53715. this.singlyLinkedList.delete(e3.random);
  53716. } }, { key: "pushIntoMessageList", value: function(e3, t2, n3) {
  53717. return !(!this._messageListHandler.pushIn(t2, n3) || this._isMessageFromCurrentInstance(t2) && !n3) && (e3.push(t2), true);
  53718. } }, { key: "_isMessageFromCurrentInstance", value: function(e3) {
  53719. return this.singlyLinkedList.has(e3.random);
  53720. } }, { key: "revoke", value: function(e3, t2, n3) {
  53721. return this._messageListHandler.revoke(e3, t2, n3);
  53722. } }, { key: "getPeerReadTime", value: function(e3) {
  53723. return this._peerReadTimeMap.get(e3);
  53724. } }, { key: "recordPeerReadTime", value: function(e3, t2) {
  53725. this._peerReadTimeMap.has(e3) ? this._peerReadTimeMap.get(e3) < t2 && this._peerReadTimeMap.set(e3, t2) : this._peerReadTimeMap.set(e3, t2);
  53726. } }, { key: "updateMessageIsPeerReadProperty", value: function(e3, t2) {
  53727. if (e3.startsWith(E.CONV_C2C) && t2 > 0) {
  53728. var n3 = this._messageListHandler.updateMessageIsPeerReadProperty(e3, t2);
  53729. if (n3.length > 0 && this.emitOuterEvent(k.MESSAGE_READ_BY_PEER, n3), this._conversationMap.has(e3)) {
  53730. var o2 = this._conversationMap.get(e3).lastMessage;
  53731. zt(o2) || o2.fromAccount === this.getMyUserID() && o2.lastTime <= t2 && !o2.isPeerRead && (o2.isPeerRead = true, this.emitConversationUpdate(true, false));
  53732. }
  53733. }
  53734. } }, { key: "updateMessageIsModifiedProperty", value: function(e3) {
  53735. this._messageListHandler.updateMessageIsModifiedProperty(e3);
  53736. } }, { key: "setCompleted", value: function(e3) {
  53737. Ve.l("".concat(this._n, ".setCompleted. conversationID:").concat(e3)), this._completedMap.set(e3, true);
  53738. } }, { key: "updateRoamingMessageKeyAndTime", value: function(e3, t2, n3) {
  53739. this._roamingMessageKeyAndTimeMap.set(e3, { messageKey: t2, lastMessageTime: n3 });
  53740. } }, { key: "updateRoamingMessageSequence", value: function(e3, t2) {
  53741. this._roamingMessageSequenceMap.set(e3, t2);
  53742. } }, { key: "getConversationList", value: function(e3) {
  53743. var t2 = this, n3 = "getConversationList", o2 = "".concat(this._n, ".").concat(n3), s3 = "pagingStatus:".concat(this._pagingStatus, ", local conversation count:").concat(this._conversationMap.size, ", options:").concat(e3);
  53744. if (Ve.l("".concat(o2, ". ").concat(s3)), this._pagingStatus === $t.REJECTED) {
  53745. var a2 = new Aa(n3);
  53746. return a2.setMessage(s3), this.syncConversationList().then(function() {
  53747. a2.setNetworkType(t2.getNetworkType()).end();
  53748. var n4 = t2._getConversationList(e3);
  53749. return Ya({ conversationList: n4, isSyncCompleted: t2._isSyncCompleted() });
  53750. }).catch(function(e4) {
  53751. return t2.probeNetwork().then(function(t3) {
  53752. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  53753. a2.setError(e4, o3, s4).end();
  53754. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  53755. });
  53756. }
  53757. if (0 === this._conversationMap.size) {
  53758. var i2 = new Aa(n3);
  53759. return i2.setMessage(s3), this.syncConversationList().then(function() {
  53760. i2.setNetworkType(t2.getNetworkType()).end();
  53761. var n4 = t2._getConversationList(e3);
  53762. return Ya({ conversationList: n4, isSyncCompleted: t2._isSyncCompleted() });
  53763. }).catch(function(e4) {
  53764. return t2.probeNetwork().then(function(t3) {
  53765. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  53766. i2.setError(e4, o3, s4).end();
  53767. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  53768. });
  53769. }
  53770. var r2 = this._getConversationList(e3);
  53771. return Ve.l("".concat(o2, ". returned conversation count:").concat(r2.length)), Xa({ conversationList: r2, isSyncCompleted: this._isSyncCompleted() });
  53772. } }, { key: "_getConversationList", value: function(e3) {
  53773. if (it(e3))
  53774. return this.getLocalConversationList();
  53775. if (at(e3))
  53776. return 0 === e3.length ? [] : this.getLocalConversationList().filter(function(t3) {
  53777. return e3.includes(t3.conversationID);
  53778. });
  53779. if (st(e3)) {
  53780. var t2 = e3.type, n3 = e3.markType, o2 = e3.groupName;
  53781. return this.getLocalConversationList().filter(function(e4) {
  53782. return (t2 !== E.CONV_C2C && t2 !== E.CONV_GROUP || e4.type === t2) && (!nt(o2) || e4.conversationGroupList.includes(o2)) && (!et(n3) || e4.markList.includes(n3));
  53783. });
  53784. }
  53785. return [];
  53786. } }, { key: "_handleC2CPeerReadTime", value: function() {
  53787. var e3, t2 = D(this._conversationMap);
  53788. try {
  53789. for (t2.s(); !(e3 = t2.n()).done; ) {
  53790. var n3 = v(e3.value, 2), o2 = n3[0], s3 = n3[1];
  53791. s3.type === E.CONV_C2C && (Ve.d("".concat(this._n, "._handleC2CPeerReadTime conversationID:").concat(o2, " peerReadTime:").concat(s3.peerReadTime)), this.recordPeerReadTime(o2, s3.peerReadTime));
  53792. }
  53793. } catch (a2) {
  53794. t2.e(a2);
  53795. } finally {
  53796. t2.f();
  53797. }
  53798. } }, { key: "_isPagingGetGroupListCompleted", value: function() {
  53799. return this.getModule(Pn).isPagingGetCompleted();
  53800. } }, { key: "_getLocalGroupCount", value: function() {
  53801. return this.getModule(Pn).getLocalGroupList().length;
  53802. } }, { key: "_hasLocalGroup", value: function(e3) {
  53803. return this.getModule(Pn).hasLocalGroup(e3.replace(E.CONV_GROUP, ""));
  53804. } }, { key: "getConversationProfile", value: function(e3) {
  53805. var t2, n3 = this;
  53806. if ((t2 = this._conversationMap.has(e3) ? this._conversationMap.get(e3) : new fi({ conversationID: e3, type: e3.slice(0, 3) === E.CONV_C2C ? E.CONV_C2C : E.CONV_GROUP }, this.isIntl()))._isInfoCompleted || t2.type === E.CONV_SYSTEM)
  53807. return Xa({ conversation: t2 });
  53808. if (St(e3) && !this._hasLocalGroup(e3))
  53809. return Xa({ conversation: t2 });
  53810. var o2 = "".concat(this._n, ".").concat("getConversationProfile"), s3 = new Aa("getConversationProfile");
  53811. return Ve.l("".concat(o2, ". conversationID:").concat(e3, " remark:").concat(t2.remark, " lastMessage:"), t2.lastMessage), this._updateUserOrGroupProfileCompletely(t2).then(function(a2) {
  53812. s3.setNetworkType(n3.getNetworkType()).setMessage("conversationID:".concat(e3, " unreadCount:").concat(a2.data.conversation.unreadCount)).end();
  53813. var i2 = n3.getModule(bn);
  53814. if (i2 && t2.type === E.CONV_C2C) {
  53815. var r2 = e3.replace(E.CONV_C2C, "");
  53816. if (i2.isMyFriend(r2)) {
  53817. var u2 = i2.getFriendRemark(r2);
  53818. t2.remark !== u2 && (t2.remark = u2, Ve.l("".concat(o2, ". conversationID:").concat(e3, " patch remark:").concat(t2.remark)));
  53819. }
  53820. }
  53821. return Ve.l("".concat(o2, " ok. conversationID:").concat(e3)), a2;
  53822. }).catch(function(t3) {
  53823. return n3.probeNetwork().then(function(n4) {
  53824. var o3 = v(n4, 2), a2 = o3[0], i2 = o3[1];
  53825. s3.setError(t3, a2, i2).setMessage("conversationID:".concat(e3)).end();
  53826. }), Ve.e("".concat(o2, " failed. error:"), t3), Za(t3);
  53827. });
  53828. } }, { key: "_updateUserOrGroupProfileCompletely", value: function(e3) {
  53829. var t2 = this;
  53830. return e3.type === E.CONV_C2C ? this.getModule(Gn).getUserProfile({ userIDList: [e3.toAccount] }).then(function(n3) {
  53831. var o2 = n3.data;
  53832. return 0 === o2.length ? Za(new ja({ code: ha.USER_OR_GROUP_NOT_FOUND })) : (e3.userProfile = o2[0], e3._isInfoCompleted = true, t2._unshiftConversation(e3), Xa({ conversation: e3 }));
  53833. }) : this.getModule(Pn).getGroupProfile({ groupID: e3.toAccount }).then(function(n3) {
  53834. return e3.groupProfile = n3.data.group, e3._isInfoCompleted = true, t2._unshiftConversation(e3), Xa({ conversation: e3 });
  53835. });
  53836. } }, { key: "_unshiftConversation", value: function(e3) {
  53837. e3 instanceof fi && !this._conversationMap.has(e3.conversationID) && (this._conversationMap = new Map([[e3.conversationID, e3]].concat(m(this._conversationMap))), this._setStorageConversationList(), this.emitConversationUpdate(true, false));
  53838. } }, { key: "_onProfileUpdated", value: function(e3) {
  53839. var t2 = this;
  53840. e3.data.forEach(function(e4) {
  53841. var n3 = e4.userID;
  53842. if (n3 === t2.getMyUserID())
  53843. t2._onMyProfileModified({ latestNick: e4.nick, latestAvatar: e4.avatar });
  53844. else {
  53845. var o2 = t2._conversationMap.get("".concat(E.CONV_C2C).concat(n3));
  53846. o2 && (o2.userProfile = e4);
  53847. }
  53848. });
  53849. } }, { key: "_isSyncCompleted", value: function() {
  53850. return this._pagingStatus === $t.RESOLVED;
  53851. } }, { key: "_errorLog", value: function(e3, t2, n3, o2) {
  53852. var s3 = new Error("Params validate failed."), a2 = "".concat(this.getErrorMessage("API_REFER")).concat(e3);
  53853. throw Ve.w("[".concat(e3, "] | ").concat(t2, " | ").concat(this.getErrorMessage(n3, o2), ", ").concat(a2)), Ve.e("[".concat(e3, "] Invalid ").concat(t2, ": type check failed for ").concat(t2, ".")), s3;
  53854. } }, { key: "_isValidConversationID", value: function(e3) {
  53855. return Et(e3) || St(e3) || Lt(e3);
  53856. } }, { key: "deleteConversation", value: function(e3) {
  53857. var t2 = this, n3 = "deleteConversation";
  53858. return nt(e3) || ot(e3) || this._errorLog(n3, "options", "StringOrObjectRequiredLog"), nt(e3) ? (this._isValidConversationID(e3) || this._errorLog(n3, "options", "InvalidConversationID", e3), Ve.l("".concat(this._n, ".").concat(n3, " conversationID:").concat(e3)), this.deleteConversationList({ conversationIDList: [e3], flag: 1 })) : (at(e3.conversationIDList) || this._errorLog(n3, "conversationIDList", "ArrayRequiredLog"), 0 === e3.conversationIDList.length && this._errorLog(n3, "conversationIDList", "NonEmptyArrayLog"), e3.conversationIDList.forEach(function(e4) {
  53859. t2._isValidConversationID(e4) || t2._errorLog(n3, "conversationIDList", "InvalidConversationID", e4);
  53860. }), "clearHistoryMessage" in e3 && "boolean" != typeof e3.clearHistoryMessage && this._errorLog(n3, "clearHistoryMessage", "BooleanRequiredLog"), e3.conversationIDList.length > 100 && (e3.conversationIDList = e3.conversationIDList.slice(0, 100)), this.deleteConversationList(e3));
  53861. } }, { key: "deleteConversationList", value: function(e3) {
  53862. var t2 = this, n3 = e3.conversationIDList, o2 = void 0 === n3 ? [] : n3, s3 = e3.clearHistoryMessage, a2 = void 0 === s3 || s3, i2 = e3.flag, r2 = void 0 === i2 ? 0 : i2, u2 = "".concat(this._n, ".").concat("deleteConversationList");
  53863. Ve.l("".concat(u2, " conversationIDList.length:").concat(o2.length, " clearHistoryMessage:").concat(a2));
  53864. var c2 = new Aa("deleteConversationList");
  53865. return c2.setMessage("conversationIDList:".concat(o2)), Promise.all([this.rmLocalOnlyConversationList(o2), this.rmLocalAndRemoteConversationList(o2, a2)]).then(function(e4) {
  53866. c2.setNetworkType(t2.getNetworkType()).end();
  53867. var n4 = [].concat(m(e4[0]), m(e4[1]));
  53868. return 0 === n4.length ? Za(new ja({ code: ha.CONVERSATION_NOT_FOUND })) : (Ve.l("".concat(u2, " ok")), Xa(1 === r2 ? { conversationID: n4[0] } : { conversationIDList: n4 }));
  53869. }).catch(function(e4) {
  53870. return t2.probeNetwork().then(function(t3) {
  53871. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  53872. c2.setError(e4, o3, s4).end();
  53873. }), Ve.e("".concat(u2, " failed. error:"), e4), Za(e4);
  53874. });
  53875. } }, { key: "rmLocalOnlyConversationList", value: function(e3) {
  53876. var t2 = this;
  53877. return e3.filter(function(e4) {
  53878. if (!t2._conversationMap.has(e4))
  53879. return false;
  53880. var n3 = t2.getLocalConversation(e4).type;
  53881. return n3 !== E.CONV_GROUP || t2._hasLocalGroup(e4) ? n3 === E.CONV_SYSTEM && (t2.getModule(Pn).deleteGroupSystemNotice({ messageList: t2._messageListHandler.getLocalMessageList(e4) }), t2.deleteLocalConversation(e4), true) : (t2.deleteLocalConversation(e4), true);
  53882. });
  53883. } }, { key: "rmLocalAndRemoteConversationList", value: function(e3, t2) {
  53884. var n3 = this, o2 = { fromAccount: this.getMyUserID(), conversationList: [], clearHistoryMessage: t2 ? 1 : 0 };
  53885. return e3.forEach(function(e4) {
  53886. if (n3._conversationMap.has(e4)) {
  53887. var t3 = n3.getLocalConversation(e4).type;
  53888. t3 === E.CONV_C2C ? o2.conversationList.push({ toAccount: e4.replace(t3, ""), type: 1 }) : t3 === E.CONV_GROUP && n3._hasLocalGroup(e4) && o2.conversationList.push({ toGroupID: e4.replace(t3, ""), type: 2 });
  53889. }
  53890. }), 0 === o2.conversationList.length ? [] : this.request({ protocolName: Po, requestData: o2 }).then(function(e4) {
  53891. var t3 = [];
  53892. return e4.data.resultList.length > 0 && e4.data.resultList.map(function(e5) {
  53893. if (0 === e5.code) {
  53894. var n4 = 1 === e5.type ? "".concat(E.CONV_C2C).concat(e5.to) : "".concat(E.CONV_GROUP).concat(e5.groupID);
  53895. t3.push(n4);
  53896. }
  53897. }), n3.deleteLocalConversationList(t3), t3;
  53898. });
  53899. } }, { key: "clearHistoryMessage", value: function(e3) {
  53900. var t2 = this, n3 = { fromAccount: this.getMyUserID(), toAccount: void 0, type: void 0, toGroupID: void 0 };
  53901. if (!this._conversationMap.has(e3))
  53902. return Za({ code: ha.CONVERSATION_NOT_FOUND });
  53903. var o2 = this._conversationMap.get(e3).type;
  53904. if (o2 === E.CONV_C2C)
  53905. n3.type = 1, n3.toAccount = e3.replace(E.CONV_C2C, "");
  53906. else {
  53907. if (o2 !== E.CONV_GROUP)
  53908. return o2 === E.CONV_SYSTEM ? (this.getModule(Pn).deleteGroupSystemNotice({ messageList: this._messageListHandler.getLocalMessageList(e3) }), Xa({ conversationID: e3 })) : Za({ code: ha.CONVERSATION_UN_RECORDED_TYPE });
  53909. n3.type = 2, n3.toGroupID = e3.replace(E.CONV_GROUP, "");
  53910. }
  53911. var s3 = "".concat(this._n, ".").concat("clearHistoryMessage"), a2 = new Aa("clearHistoryMessage");
  53912. return a2.setMessage("conversationID:".concat(e3)), Ve.l("".concat(s3, ". conversationID:").concat(e3)), this.setMessageRead({ conversationID: e3 }).then(function() {
  53913. return t2.request({ protocolName: bo, requestData: n3 });
  53914. }).then(function() {
  53915. a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok")), t2._messageListHandler.removeByConversationID(e3), t2.setCompleted(e3);
  53916. var n4 = t2.getLocalConversation(e3);
  53917. return n4 && (n4.updateLastMessage(), t2._sortConversationListAndEmitEvent()), Xa({ conversationID: e3 });
  53918. }).catch(function(e4) {
  53919. return t2.probeNetwork().then(function(t3) {
  53920. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  53921. a2.setError(e4, o3, s4).end();
  53922. }), Ve.e("".concat(s3, " failed. error:"), e4), Za(e4);
  53923. });
  53924. } }, { key: "pinConversation", value: function(e3) {
  53925. var t2 = this, n3 = e3.conversationID, o2 = e3.isPinned;
  53926. if (!this._conversationMap.has(n3))
  53927. return Za({ code: ha.CONVERSATION_NOT_FOUND });
  53928. var s3 = this.getLocalConversation(n3);
  53929. if (s3.isPinned === o2)
  53930. return Xa({ conversationID: n3 });
  53931. var a2 = "".concat(this._n, ".").concat("pinConversation"), i2 = new Aa("pinConversation");
  53932. i2.setMessage("conversationID:".concat(n3, " isPinned:").concat(o2)), Ve.l("".concat(a2, ". conversationID:").concat(n3, " isPinned:").concat(o2));
  53933. var r2 = null;
  53934. return Et(n3) ? r2 = { type: 1, toAccount: n3.replace(E.CONV_C2C, "") } : St(n3) && (r2 = { type: 2, groupID: n3.replace(E.CONV_GROUP, "") }), this.request({ protocolName: wo, requestData: { fromAccount: this.getMyUserID(), operationType: true === o2 ? 1 : 2, itemList: [r2] } }).then(function() {
  53935. return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok")), s3.isPinned !== o2 && (s3.isPinned = o2, t2._sortConversationListAndEmitEvent()), Ya({ conversationID: n3 });
  53936. }).catch(function(e4) {
  53937. return t2.probeNetwork().then(function(t3) {
  53938. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  53939. i2.setError(e4, o3, s4).end();
  53940. }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4);
  53941. });
  53942. } }, { key: "setMessageRemindType", value: function(e3) {
  53943. return this._messageRemindHandler.set(e3);
  53944. } }, { key: "patchMessageRemindType", value: function(e3) {
  53945. var t2 = e3.ID, n3 = e3.isC2CConversation, o2 = e3.messageRemindType, s3 = false, a2 = this.getLocalConversation(n3 ? "".concat(E.CONV_C2C).concat(t2) : "".concat(E.CONV_GROUP).concat(t2));
  53946. return a2 && a2.messageRemindType !== o2 && (a2.messageRemindType = o2, s3 = true), Ve.d("".concat(this._n, ".patchMessageRemindType options:"), e3, "ret:".concat(s3)), s3;
  53947. } }, { key: "onC2CMessageRemindTypeSynced", value: function(e3) {
  53948. var t2 = this, n3 = "".concat(this._n, ".onC2CMessageRemindTypeSynced");
  53949. Ve.d(n3, e3), e3.dataList.forEach(function(e4) {
  53950. if (!zt(e4.muteNotificationsSync)) {
  53951. var o2, s3 = e4.muteNotificationsSync, a2 = s3.to, i2 = s3.updateSequence, r2 = s3.muteFlag;
  53952. t2._messageRemindHandler.setUpdateSequence(i2), 0 === r2 ? o2 = E.MSG_REMIND_ACPT_AND_NOTE : 1 === r2 ? o2 = E.MSG_REMIND_DISCARD : 2 === r2 && (o2 = E.MSG_REMIND_ACPT_NOT_NOTE);
  53953. var u2 = 0;
  53954. t2.patchMessageRemindType({ ID: a2, isC2CConversation: true, messageRemindType: o2 }) && (u2 += 1), Ve.l("".concat(n3, " updateCount:").concat(u2)), u2 >= 1 && t2.emitConversationUpdate(true, false);
  53955. }
  53956. });
  53957. } }, { key: "onGroupMessageRemindTypeSynced", value: function(e3) {
  53958. Ve.d("".concat(this._n, ".onGroupMessageRemindTypeSynced options:"), e3), this._messageRemindHandler.onGroupMessageRemindTypeUpdated(e3);
  53959. } }, { key: "deleteLocalConversation", value: function(e3) {
  53960. var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this._conversationMap.has(e3);
  53961. if (Ve.d("".concat(this._n, ".deleteLocalConversation conversationID:").concat(e3, " has:").concat(n3)), n3 && (this._conversationMap.delete(e3), this._roamingMessageKeyAndTimeMap.has(e3) && this._roamingMessageKeyAndTimeMap.delete(e3), this._roamingMessageSequenceMap.has(e3) && this._roamingMessageSequenceMap.delete(e3), this._setStorageConversationList(), this._messageListHandler.removeByConversationID(e3), this._completedMap.delete(e3), t2)) {
  53962. var o2 = !this._isTopicConversation(e3);
  53963. this.emitConversationUpdate(o2, false);
  53964. }
  53965. } }, { key: "deleteLocalConversationList", value: function(e3) {
  53966. var t2 = this, n3 = 0, o2 = false;
  53967. e3.forEach(function(e4) {
  53968. t2._conversationMap.has(e4) && (n3 += t2._conversationMap.get(e4).unreadCount || 0, t2.deleteLocalConversation(e4, false), o2 = true);
  53969. }), Ve.l("".concat(this._n, ".deleteLocalConversationList conversationIDList.length:").concat(e3.length, " isConvIDExisted:").concat(o2)), o2 && (this.emitConversationUpdate(true, false), n3 > 0 && this.emitTotalUnreadMessageCountUpdate());
  53970. } }, { key: "isMessageSentByCurrentInstance", value: function(e3) {
  53971. return !(!this._messageListHandler.hasLocalMessage(e3.conversationID, e3.ID) && !this.singlyLinkedList.has(e3.random));
  53972. } }, { key: "modifyMessageList", value: function(e3) {
  53973. if (e3.startsWith(E.CONV_C2C) && this._conversationMap.has(e3)) {
  53974. var t2 = this._conversationMap.get(e3), n3 = Date.now();
  53975. this._messageListHandler.modifyMessageSentByPeer({ conversationID: e3, latestNick: t2.userProfile.nick, latestAvatar: t2.userProfile.avatar });
  53976. var o2 = this.getModule(Gn).getNickAndAvatarByUserID(this.getMyUserID());
  53977. this._messageListHandler.modifyMessageSentByMe({ conversationID: e3, latestNick: o2.nick, latestAvatar: o2.avatar }), Ve.l("".concat(this._n, ".modifyMessageList conversationID:").concat(e3, " cost ").concat(Date.now() - n3, " ms"));
  53978. }
  53979. } }, { key: "updateUserProfileSpecifiedKey", value: function(e3) {
  53980. Ve.l("".concat(this._n, ".updateUserProfileSpecifiedKey options:"), e3);
  53981. var t2 = e3.conversationID, n3 = e3.nick, o2 = e3.avatar;
  53982. if (this._conversationMap.has(t2)) {
  53983. var s3 = this._conversationMap.get(t2).userProfile;
  53984. nt(n3) && s3.nick !== n3 && (s3.nick = n3), nt(o2) && s3.avatar !== o2 && (s3.avatar = o2), this.emitConversationUpdate(true, false);
  53985. }
  53986. } }, { key: "_onMyProfileModified", value: function(e3) {
  53987. var n3 = this, o2 = this.getLocalConversationList(), s3 = Date.now();
  53988. o2.forEach(function(o3) {
  53989. n3.modifyMessageSentByMe(t({ conversationID: o3.conversationID }, e3));
  53990. }), Ve.l("".concat(this._n, "._onMyProfileModified. modify all messages sent by me, cost ").concat(Date.now() - s3, " ms"));
  53991. } }, { key: "modifyMessageSentByMe", value: function(e3) {
  53992. this._messageListHandler.modifyMessageSentByMe(e3);
  53993. } }, { key: "getLatestMessageSentByMe", value: function(e3) {
  53994. return this._messageListHandler.getLatestMessageSentByMe(e3);
  53995. } }, { key: "modifyMessageSentByPeer", value: function(e3) {
  53996. this._messageListHandler.modifyMessageSentByPeer(e3);
  53997. } }, { key: "getLatestMessageSentByPeer", value: function(e3) {
  53998. return this._messageListHandler.getLatestMessageSentByPeer(e3);
  53999. } }, { key: "pushIntoNoticeResult", value: function(e3, t2) {
  54000. return !(!this._messageListHandler.pushIn(t2) || this.singlyLinkedList.has(t2.random)) && (e3.push(t2), true);
  54001. } }, { key: "getLocalLastMessage", value: function(e3) {
  54002. return this._messageListHandler.getLocalLastMessage(e3);
  54003. } }, { key: "checkAndPatchRemark", value: function() {
  54004. var e3 = Promise.resolve();
  54005. if (0 === this._conversationMap.size)
  54006. return e3;
  54007. var t2 = this.getModule(bn);
  54008. if (!t2)
  54009. return e3;
  54010. var n3 = m(this._conversationMap.values()).filter(function(e4) {
  54011. return e4.type === E.CONV_C2C;
  54012. });
  54013. if (0 === n3.length)
  54014. return e3;
  54015. var o2 = 0;
  54016. return n3.forEach(function(e4) {
  54017. var n4 = e4.conversationID.replace(E.CONV_C2C, "");
  54018. if (t2.isMyFriend(n4)) {
  54019. var s3 = t2.getFriendRemark(n4);
  54020. e4.remark !== s3 && (e4.remark = s3, o2 += 1);
  54021. }
  54022. }), Ve.l("".concat(this._n, ".checkAndPatchRemark. c2c conversation count:").concat(n3.length, ", patched count:").concat(o2)), e3;
  54023. } }, { key: "updateTopicConversation", value: function(e3) {
  54024. this._updateLocalConversationList({ conversationOptionsList: e3, isFromGetConversations: true });
  54025. } }, { key: "sendReadReceipt", value: function(e3) {
  54026. var t2 = e3[0], n3 = null;
  54027. return t2.conversationType === E.CONV_C2C ? n3 = this._m.getModule(Un) : t2.conversationType === E.CONV_GROUP && (n3 = this._m.getModule(Pn)), n3 ? n3.sendReadReceipt(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  54028. } }, { key: "getReadReceiptList", value: function(e3) {
  54029. var t2 = e3[0], n3 = null;
  54030. return t2.conversationType === E.CONV_C2C ? n3 = this._m.getModule(Un) : t2.conversationType === E.CONV_GROUP && (n3 = this._m.getModule(Pn)), n3 ? n3.getReadReceiptList(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  54031. } }, { key: "getLastMessageTime", value: function(e3) {
  54032. var t2 = this.getLocalConversation(e3);
  54033. return t2 ? t2.lastMessage.lastTime : 0;
  54034. } }, { key: "getTotalUnreadMessageCount", value: function() {
  54035. var e3 = this.getLocalConversationList(), t2 = 0;
  54036. return e3.forEach(function(e4) {
  54037. e4.type !== E.CONV_SYSTEM && ("" !== e4.messageRemindType && e4.messageRemindType !== E.MSG_REMIND_ACPT_AND_NOTE || (t2 += e4.unreadCount));
  54038. }), t2;
  54039. } }, { key: "emitTotalUnreadMessageCountUpdate", value: function() {
  54040. var e3 = this.getTotalUnreadMessageCount();
  54041. this._convTotalUnreadCount !== e3 && (Ve.l("".concat(this._n, ".emitTotalUnreadMessageCountUpdate from ").concat(this._convTotalUnreadCount, " to ").concat(e3)), this._convTotalUnreadCount = e3, this.emitOuterEvent(k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED));
  54042. } }, { key: "reset", value: function() {
  54043. Ve.l("".concat(this._n, ".reset")), this._pagingStatus = $t.NOT_START, this._messageListHandler.reset(), this._messageRemindHandler.reset(), this._roamingMessageKeyAndTimeMap.clear(), this._roamingMessageSequenceMap.clear(), this.singlyLinkedList.reset(), this._peerReadTimeMap.clear(), this._completedMap.clear(), this._conversationMap.clear(), this._pagingTimeStamp = 0, this._pagingStartIndex = 0, this._pagingPinnedTimeStamp = 0, this._pagingPinnedStartIndex = 0, this._remoteGroupReadSequenceMap.clear(), this._convTotalUnreadCount = 0, this._pagingGetCostList.length = 0, this.resetReady();
  54044. } }]), s2;
  54045. }(uo), yi = function() {
  54046. function e2(t2) {
  54047. o(this, e2), this._groupModule = t2, this._n = "GroupTipsHandler", this._cachedGroupTipsMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this._getTopicPendingMap = /* @__PURE__ */ new Map();
  54048. }
  54049. return a(e2, [{ key: "onCheckTimer", value: function(e3) {
  54050. e3 % 1 == 0 && this._cachedGroupTipsMap.size > 0 && this._checkCachedGroupTips();
  54051. } }, { key: "_checkCachedGroupTips", value: function() {
  54052. var e3 = this;
  54053. this._cachedGroupTipsMap.forEach(function(t2, n2) {
  54054. var o2 = e3._checkCountMap.get(n2), s2 = e3._groupModule.hasLocalGroup(n2);
  54055. Ve.l("".concat(e3._n, "._checkCachedGroupTips groupID:").concat(n2, " hasLocalGroup:").concat(s2, " checkCount:").concat(o2)), s2 ? (e3._notifyCachedGroupTips(n2), e3._checkCountMap.delete(n2), e3._groupModule.deleteUnjoinedAVChatRoom(n2)) : o2 >= e3.MAX_CHECK_COUNT ? (e3._deleteCachedGroupTips(n2), e3._checkCountMap.delete(n2)) : (o2++, e3._checkCountMap.set(n2, o2));
  54056. });
  54057. } }, { key: "onNewGroupTips", value: function(e3) {
  54058. Ve.d("".concat(this._n, ".onReceiveGroupTips count:").concat(e3.dataList.length));
  54059. var t2 = this.newGroupTipsStoredAndSummary(e3), n2 = t2.eventDataList, o2 = t2.result, s2 = t2.AVChatRoomMessageList;
  54060. (s2.length > 0 && this._groupModule.onAVChatRoomMessage(s2), n2.length > 0) && (this._groupModule.updateNextMessageSeq(n2), this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: n2, isInstantMessage: true }));
  54061. o2.length > 0 && (this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, o2), this.handleMessageList(o2));
  54062. } }, { key: "newGroupTipsStoredAndSummary", value: function(e3) {
  54063. for (var n2 = this, o2 = e3.event, s2 = e3.dataList, a2 = null, i2 = [], r2 = [], u2 = {}, c2 = [], l2 = function(e4, l3) {
  54064. var d3 = It(s2[e4]);
  54065. if (6 === o2) {
  54066. if (n2._groupModule.isGroupAttributesUpdatedNotice(d3))
  54067. return "continue";
  54068. if (n2._groupModule.isGroupCountersNotice(d3))
  54069. return "continue";
  54070. }
  54071. var p3 = d3.groupProfile, g2 = p3.groupID, h2 = p3.communityType, _2 = void 0 === h2 ? 0 : h2, f2 = p3.topicID, v2 = void 0 === f2 ? void 0 : f2, m2 = p3.invisible, M2 = void 0, y2 = n2._groupModule.isMessageFromTopic(_2, v2);
  54072. if (y2) {
  54073. M2 = E.CONV_TOPIC, d3.to = v2;
  54074. var I2 = n2._groupModule.getModule(Fn);
  54075. I2.hasLocalTopic(g2, v2) || n2._getTopicPendingMap.has(v2) || (n2._getTopicPendingMap.set(v2, 1), I2.getTopicList({ groupID: g2, topicIDList: [v2] }).finally(function() {
  54076. n2._getTopicPendingMap.delete(v2);
  54077. }));
  54078. }
  54079. var C2 = n2._groupModule.hasLocalGroup(g2);
  54080. if (!C2 && n2._groupModule.isUnjoinedAVChatRoom(g2))
  54081. return "continue";
  54082. if (!C2 && !y2)
  54083. return n2._cacheGroupTipsAndProbe({ groupID: g2, event: o2, item: d3 }), "continue";
  54084. if (n2._groupModule.isMessageFromOrToAVChatroom(g2))
  54085. return d3.event = o2, c2.push(d3), "continue";
  54086. if (d3.currentUser = n2._groupModule.getMyUserID(), d3.conversationType = E.CONV_GROUP, (a2 = new Wa(d3)).setElement({ type: E.MSG_GRP_TIP, content: t(t({}, d3.elements), {}, { groupProfile: d3.groupProfile }) }), a2.isSystemMessage = false, 1 === m2)
  54087. return n2._qualityStat(a2), "continue";
  54088. var T2 = n2._groupModule.getModule(qn), D2 = a2, k2 = D2.conversationID, S2 = D2.sequence;
  54089. if (6 === o2)
  54090. a2._onlineOnlyFlag = true, r2.push(a2);
  54091. else if (!T2.pushIntoNoticeResult(r2, a2))
  54092. return "continue";
  54093. if (n2._groupModule.isMessageFromCommunityOfTopic(_2, v2))
  54094. return "continue";
  54095. if (6 === o2 && T2.getLocalConversation(k2))
  54096. return "continue";
  54097. 6 !== o2 && n2._qualityStat(a2);
  54098. var L2 = T2.isRemoteRead({ conversationID: k2, sequence: S2 });
  54099. if (it(u2[k2])) {
  54100. var A2 = 0;
  54101. "in" === a2.flow && (a2._isExcludedFromUnreadCount || a2._onlineOnlyFlag || L2 || (A2 = 1)), u2[k2] = i2.push({ conversationID: k2, unreadCount: A2, type: it(M2) ? a2.conversationType : M2, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1;
  54102. } else {
  54103. var R2 = u2[k2];
  54104. i2[R2].type = a2.conversationType, i2[R2].subType = a2.conversationSubType, i2[R2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || a2._onlineOnlyFlag || L2 || i2[R2].unreadCount++);
  54105. }
  54106. }, d2 = 0, p2 = s2.length; d2 < p2; d2++)
  54107. l2(d2);
  54108. return { eventDataList: i2, result: r2, AVChatRoomMessageList: c2 };
  54109. } }, { key: "_qualityStat", value: function(e3) {
  54110. this._groupModule.getModule(eo).addMessageSequence({ key: Ca, message: e3 });
  54111. } }, { key: "handleMessageList", value: function(e3) {
  54112. var t2 = this;
  54113. e3.forEach(function(e4) {
  54114. switch (e4.payload.operationType) {
  54115. case 1:
  54116. t2._onNewMemberComeIn(e4);
  54117. break;
  54118. case 2:
  54119. t2._onMemberQuit(e4);
  54120. break;
  54121. case 3:
  54122. t2._onMemberKickedOut(e4);
  54123. break;
  54124. case 4:
  54125. t2._onMemberSetAdmin(e4);
  54126. break;
  54127. case 5:
  54128. t2._onMemberCancelledAdmin(e4);
  54129. break;
  54130. case 6:
  54131. t2._onGroupProfileModified(e4);
  54132. break;
  54133. case 7:
  54134. t2._onMemberInfoModified(e4);
  54135. break;
  54136. case 8:
  54137. t2._onTopicProfileUpdated(e4);
  54138. break;
  54139. default:
  54140. Ve.w("".concat(t2._n, ".handleMessageList unknown operationType:").concat(e4.payload.operationType));
  54141. }
  54142. });
  54143. } }, { key: "_onNewMemberComeIn", value: function(e3) {
  54144. var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2);
  54145. s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2));
  54146. } }, { key: "_onMemberQuit", value: function(e3) {
  54147. var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2);
  54148. s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)), this._groupModule.getModule(wn).deleteLocalGroupMembers(o2, e3.payload.userIDList);
  54149. } }, { key: "_onMemberKickedOut", value: function(e3) {
  54150. var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2);
  54151. s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)), this._groupModule.getModule(wn).deleteLocalGroupMembers(o2, e3.payload.userIDList);
  54152. } }, { key: "_updateConversationGroupProfile", value: function(e3) {
  54153. this._groupModule.getModule(qn).updateConversationGroupProfile([e3]);
  54154. } }, { key: "_onMemberSetAdmin", value: function(e3) {
  54155. var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.userIDList, o2 = this._groupModule.getModule(wn);
  54156. n2.forEach(function(e4) {
  54157. var n3 = o2.getLocalGroupMemberInfo(t2, e4);
  54158. n3 && n3.updateRole(E.GRP_MBR_ROLE_ADMIN);
  54159. });
  54160. } }, { key: "_onMemberCancelledAdmin", value: function(e3) {
  54161. var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.userIDList, o2 = this._groupModule.getModule(wn);
  54162. n2.forEach(function(e4) {
  54163. var n3 = o2.getLocalGroupMemberInfo(t2, e4);
  54164. n3 && n3.updateRole(E.GRP_MBR_ROLE_MEMBER);
  54165. });
  54166. } }, { key: "_onGroupProfileModified", value: function(e3) {
  54167. var t2 = this, n2 = e3.payload, o2 = n2.newGroupProfile, s2 = n2.groupProfile.groupID, a2 = this._groupModule.getLocalGroupProfile(s2);
  54168. Object.keys(o2).forEach(function(e4) {
  54169. switch (e4) {
  54170. case "ownerID":
  54171. t2._ownerChanged(a2, o2);
  54172. break;
  54173. case "groupName":
  54174. a2.name = o2[e4];
  54175. break;
  54176. default:
  54177. a2[e4] = o2[e4];
  54178. }
  54179. });
  54180. var i2 = !a2.isSupportTopic;
  54181. this._groupModule.emitGroupListUpdate(true, i2);
  54182. } }, { key: "_ownerChanged", value: function(e3, t2) {
  54183. var n2 = e3.groupID, o2 = this._groupModule.getLocalGroupProfile(n2), s2 = this._groupModule.getMyUserID();
  54184. if (s2 === t2.ownerID) {
  54185. o2.updateGroup({ selfInfo: { role: E.GRP_MBR_ROLE_OWNER } });
  54186. var a2 = this._groupModule.getModule(wn), i2 = a2.getLocalGroupMemberInfo(n2, s2), r2 = this._groupModule.getLocalGroupProfile(n2).ownerID, u2 = a2.getLocalGroupMemberInfo(n2, r2);
  54187. i2 && i2.updateRole(E.GRP_MBR_ROLE_OWNER), u2 && u2.updateRole(E.GRP_MBR_ROLE_MEMBER);
  54188. }
  54189. } }, { key: "_onMemberInfoModified", value: function(e3) {
  54190. var t2 = e3.to, n2 = e3.payload, o2 = n2.groupProfile, s2 = n2.memberList, a2 = o2.groupID;
  54191. kt(t2) && this._updateTopicMuteTime(e3);
  54192. var i2 = this._groupModule.getModule(wn);
  54193. s2.forEach(function(e4) {
  54194. var t3 = i2.getLocalGroupMemberInfo(a2, e4.userID);
  54195. t3 && et(e4.muteTime) && t3.updateMuteUntil(e4.muteTime);
  54196. });
  54197. } }, { key: "_updateTopicMuteTime", value: function(e3) {
  54198. var t2 = e3.to, n2 = e3.payload, o2 = n2.groupProfile, s2 = n2.memberList, a2 = void 0 === s2 ? [] : s2, i2 = this._groupModule.getModule(Fn), r2 = o2.groupID, u2 = i2.getLocalTopic(r2, t2);
  54199. if (u2) {
  54200. for (var c2 = false, l2 = 0; l2 < a2.length; l2++) {
  54201. var d2 = a2[l2];
  54202. if (d2.userID === this._groupModule.getMyUserID() && d2.muteTime >= 0) {
  54203. u2.updateSelfInfo({ muteTime: d2.muteTime }), c2 = true;
  54204. break;
  54205. }
  54206. }
  54207. c2 && this._groupModule.emitOuterEvent(k.TOPIC_UPDATED, { groupID: r2, topic: u2 });
  54208. }
  54209. } }, { key: "_onTopicProfileUpdated", value: function(e3) {
  54210. var n2 = e3.payload, o2 = n2.groupProfile.groupID, s2 = n2.newTopicInfo;
  54211. this._groupModule.getModule(Fn).onTopicProfileUpdated(t({ groupID: o2, topicID: e3.to }, s2));
  54212. } }, { key: "_cacheGroupTips", value: function(e3, t2) {
  54213. this._cachedGroupTipsMap.has(e3) || this._cachedGroupTipsMap.set(e3, []), this._cachedGroupTipsMap.get(e3).push(t2);
  54214. } }, { key: "_deleteCachedGroupTips", value: function(e3) {
  54215. this._cachedGroupTipsMap.has(e3) && this._cachedGroupTipsMap.delete(e3);
  54216. } }, { key: "_notifyCachedGroupTips", value: function(e3) {
  54217. var t2 = this, n2 = this._cachedGroupTipsMap.get(e3) || [];
  54218. n2.forEach(function(e4) {
  54219. t2.onNewGroupTips(e4);
  54220. }), this._deleteCachedGroupTips(e3), Ve.l("".concat(this._n, "._notifyCachedGroupTips groupID:").concat(e3, " count:").concat(n2.length));
  54221. } }, { key: "_cacheGroupTipsAndProbe", value: function(e3) {
  54222. var t2 = this, n2 = e3.groupID, o2 = e3.event, s2 = e3.item;
  54223. this._cacheGroupTips(n2, { event: o2, dataList: [s2] }), this._groupModule.getGroupSimplifiedInfo(n2).then(function(e4) {
  54224. e4.type === E.GRP_AVCHATROOM ? t2._groupModule.hasLocalGroup(n2) ? t2._notifyCachedGroupTips(n2) : t2._groupModule.setUnjoinedAVChatRoom(n2) : (t2._groupModule.updateGroupMap([e4]), t2._notifyCachedGroupTips(n2));
  54225. }), this._checkCountMap.has(n2) || this._checkCountMap.set(n2, 0), Ve.l("".concat(this._n, "._cacheGroupTipsAndProbe groupID:").concat(n2));
  54226. } }, { key: "reset", value: function() {
  54227. this._cachedGroupTipsMap.clear(), this._checkCountMap.clear(), this._getTopicPendingMap.clear();
  54228. } }]), e2;
  54229. }(), Ii = function() {
  54230. function e2(t2) {
  54231. o(this, e2), this._groupModule = t2, this._n = "CommonGroupHandler", this.tempConversationList = null, this._cachedGroupMessageMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this._getTopicPendingMap = /* @__PURE__ */ new Map(), this._isPagingGetCompleted = false, t2.getInnerEmitterInstance().once(ei, this._initGroupList, this);
  54232. }
  54233. return a(e2, [{ key: "onCheckTimer", value: function(e3) {
  54234. e3 % 1 == 0 && this._cachedGroupMessageMap.size > 0 && this._checkCachedGroupMessage();
  54235. } }, { key: "_checkCachedGroupMessage", value: function() {
  54236. var e3 = this;
  54237. this._cachedGroupMessageMap.forEach(function(t2, n2) {
  54238. var o2 = e3._checkCountMap.get(n2), s2 = e3._groupModule.hasLocalGroup(n2);
  54239. Ve.l("".concat(e3._n, "._checkCachedGroupMessage groupID:").concat(n2, " hasLocalGroup:").concat(s2, " checkCount:").concat(o2)), s2 ? (e3._notifyCachedGroupMessage(n2), e3._checkCountMap.delete(n2), e3._groupModule.deleteUnjoinedAVChatRoom(n2)) : o2 >= e3.MAX_CHECK_COUNT ? (e3._deleteCachedGroupMessage(n2), e3._checkCountMap.delete(n2)) : (o2++, e3._checkCountMap.set(n2, o2));
  54240. });
  54241. } }, { key: "_initGroupList", value: function() {
  54242. var e3 = this;
  54243. Ve.l("".concat(this._n, "._initGroupList"));
  54244. var t2 = new Aa("getGroupListInStorage"), n2 = this._groupModule.getStorageGroupList();
  54245. if (at(n2) && n2.length > 0) {
  54246. n2.forEach(function(t3) {
  54247. e3._groupModule.initGroupMap(t3);
  54248. }), this._groupModule.emitGroupListUpdate(true, false);
  54249. var o2 = this._groupModule.getLocalGroupList().length;
  54250. t2.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:".concat(o2)).end();
  54251. } else
  54252. t2.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:0").end();
  54253. Ve.l("".concat(this._n, "._initGroupList ok"));
  54254. } }, { key: "handleUpdateGroupLastMessage", value: function(e3) {
  54255. var n2 = "".concat(this._n, ".handleUpdateGroupLastMessage");
  54256. if (Ve.l("".concat(n2, " conversation count:").concat(e3.length, ", local group count:").concat(this._groupModule.getLocalGroupList().length)), 0 !== this._groupModule.getGroupMap().size) {
  54257. for (var o2, s2, a2, i2 = false, r2 = 0, u2 = e3.length; r2 < u2; r2++)
  54258. (o2 = e3[r2]).type === E.CONV_GROUP && (s2 = o2.conversationID.split(/^GROUP/)[1], (a2 = this._groupModule.getLocalGroupProfile(s2)) && (a2.lastMessage = t({}, o2.lastMessage), i2 = true));
  54259. i2 && (this._groupModule.sortLocalGroupList(), this._groupModule.emitGroupListUpdate(true, false));
  54260. } else
  54261. this.tempConversationList = e3;
  54262. } }, { key: "onNewGroupMessage", value: function(e3) {
  54263. Ve.d("".concat(this._n, ".onNewGroupMessage count:").concat(e3.dataList.length));
  54264. var t2 = this._newGroupMessageStoredAndSummary(e3), n2 = t2.conversationOptionsList, o2 = t2.messageList, s2 = t2.AVChatRoomMessageList;
  54265. (s2.length > 0 && this._groupModule.onAVChatRoomMessage(s2), this._groupModule.filterModifiedMessage(o2), n2.length > 0) && (this._groupModule.updateNextMessageSeq(n2), this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: n2, isInstantMessage: e3.isInstantMessage || true, updateUnreadCount: e3.updateUnreadCount || true }));
  54266. var a2 = this._groupModule.filterUnmodifiedMessage(o2);
  54267. a2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, a2), o2.length = 0;
  54268. } }, { key: "_newGroupMessageStoredAndSummary", value: function(e3) {
  54269. var t2 = this, n2 = e3.dataList, o2 = e3.event, s2 = e3.isInstantMessage, a2 = null, i2 = [], r2 = [], u2 = [], c2 = {}, l2 = this._groupModule.getModule(Kn), d2 = this._groupModule.getFileDownloadProxy(), p2 = n2.length;
  54270. p2 > 1 && n2.sort(function(e4, t3) {
  54271. return e4.sequence - t3.sequence;
  54272. });
  54273. for (var g2 = function(e4) {
  54274. var p3 = It(n2[e4]), g3 = p3.groupProfile, h3 = g3.groupID, _2 = g3.communityType, f2 = void 0 === _2 ? 0 : _2, v2 = g3.topicID, m2 = void 0 === v2 ? void 0 : v2, M2 = g3.invisible, y2 = void 0, I2 = t2._groupModule.isMessageFromTopic(f2, m2);
  54275. if (I2) {
  54276. y2 = E.CONV_TOPIC, p3.to = m2;
  54277. var C2 = t2._groupModule.getModule(Fn);
  54278. C2.hasLocalTopic(h3, m2) || t2._getTopicPendingMap.has(m2) || (t2._getTopicPendingMap.set(m2, 1), C2.getTopicList({ groupID: h3, topicIDList: [m2] }).finally(function() {
  54279. t2._getTopicPendingMap.delete(m2);
  54280. }));
  54281. }
  54282. var T2 = t2._groupModule.hasLocalGroup(h3);
  54283. if (!T2 && t2._groupModule.isUnjoinedAVChatRoom(h3))
  54284. return "continue";
  54285. if (!T2 && !I2)
  54286. return t2._cacheGroupMessageAndProbe({ groupID: h3, event: o2, item: p3 }), "continue";
  54287. if (t2._groupModule.isMessageFromOrToAVChatroom(h3))
  54288. return p3.event = o2, u2.push(p3), "continue";
  54289. if (p3.currentUser = t2._groupModule.getMyUserID(), p3.conversationType = E.CONV_GROUP, p3.isSystemMessage = !!p3.isSystemMessage, a2 = new Wa(p3), p3.elements = l2.parseElements(p3.elements, p3.from), a2.setElement(p3.elements, d2), 1 === M2)
  54290. return t2._qualityStat(s2, a2), "continue";
  54291. var D2 = 1 === n2[e4].isModified, k2 = t2._groupModule.getModule(qn);
  54292. if (k2.isMessageSentByCurrentInstance(a2) ? a2.isModified = D2 : D2 = false, 1 === p3.onlineOnlyFlag)
  54293. a2._onlineOnlyFlag = true, k2.isMessageSentByCurrentInstance(a2) || r2.push(a2);
  54294. else {
  54295. if (t2._groupModule.isMessageFromCommunityOfTopic(f2, m2))
  54296. return r2.push(a2), "continue";
  54297. if (!k2.pushIntoMessageList(r2, a2, D2))
  54298. return "continue";
  54299. t2._qualityStat(s2, a2);
  54300. var S2 = a2, L2 = S2.conversationID, A2 = S2.sequence, R2 = k2.isRemoteRead({ conversationID: L2, sequence: A2 });
  54301. if (it(c2[L2])) {
  54302. var N2 = 0;
  54303. "in" === a2.flow && (a2._isExcludedFromUnreadCount || R2 || (N2 = 1)), c2[L2] = i2.push({ conversationID: L2, unreadCount: N2, type: it(y2) ? a2.conversationType : y2, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1;
  54304. } else {
  54305. var O2 = c2[L2];
  54306. i2[O2].type = it(y2) ? a2.conversationType : y2, i2[O2].subType = a2.conversationSubType, i2[O2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || R2 || i2[O2].unreadCount++);
  54307. }
  54308. }
  54309. }, h2 = 0; h2 < p2; h2++)
  54310. g2(h2);
  54311. return { conversationOptionsList: i2, messageList: r2, AVChatRoomMessageList: u2 };
  54312. } }, { key: "_qualityStat", value: function(e3, t2) {
  54313. var n2 = this._groupModule.getModule(eo);
  54314. n2.addMessageSequence({ key: Ca, message: t2 }), e3 && t2.clientTime > 0 && n2.addMessageDelay(t2.clientTime);
  54315. } }, { key: "onGroupMessageRevoked", value: function(e3) {
  54316. var t2 = this._groupModule.getModule(qn), n2 = [], o2 = null, s2 = true;
  54317. e3.dataList.forEach(function(e4) {
  54318. var a2 = e4.elements.revokedInfos;
  54319. it(a2) || a2.forEach(function(e5) {
  54320. var a3 = zt(e5.topicID) ? "GROUP".concat(e5.groupID) : "GROUP".concat(e5.topicID);
  54321. o2 = t2.revoke(a3, e5.sequence, e5.random);
  54322. var i2 = e5.revokerInfo && e5.revokerInfo.revoker;
  54323. if (o2)
  54324. o2.revoker = i2, n2.push(o2);
  54325. else {
  54326. var r2 = { conversationID: a3, to: e5.topicID || "", sequence: e5.sequence, time: e5.time, revoker: i2 };
  54327. t2.isLastMessageRevoked(r2) && (n2.push(r2), s2 = false);
  54328. }
  54329. });
  54330. }), 0 !== n2.length && (t2.onMessageRevoked(n2), true === s2 && (Ve.l("".concat(this._n, ".onGroupMessageRevoked count:").concat(n2.length)), this._groupModule.emitOuterEvent(k.MESSAGE_REVOKED, n2)));
  54331. } }, { key: "_groupListTreeShaking", value: function(e3) {
  54332. for (var t2 = new Map(m(this._groupModule.getGroupMap())), n2 = 0, o2 = e3.length; n2 < o2; n2++)
  54333. t2.delete(e3[n2].groupID);
  54334. this._groupModule.hasJoinedAVChatRoom() && this._groupModule.getJoinedAVChatRoom().forEach(function(e4) {
  54335. t2.delete(e4);
  54336. });
  54337. this._groupModule.getGroupMap().forEach(function(e4, n3) {
  54338. e4.isSupportTopic && t2.delete(n3);
  54339. });
  54340. for (var s2 = m(t2.keys()), a2 = 0, i2 = s2.length; a2 < i2; a2++)
  54341. this._groupModule.deleteGroup(s2[a2]);
  54342. } }, { key: "getGroupList", value: function(e3) {
  54343. var t2 = this, n2 = "".concat(this._n, ".").concat("getGroupList"), o2 = new Aa("getGroupList");
  54344. Ve.l("".concat(n2));
  54345. var s2 = { introduction: "Introduction", notification: "Notification", createTime: "CreateTime", ownerID: "Owner_Account", lastInfoTime: "LastInfoTime", memberNum: "MemberNum", maxMemberNum: "MaxMemberNum", joinOption: "ApplyJoinOption", inviteOption: "InviteJoinOption", muteAllMembers: "ShutUpAllMember" }, a2 = ["Type", "Name", "FaceUrl", "NextMsgSeq", "LastMsgTime", "AtInfoList", "LastRecallTime"], i2 = [];
  54346. e3 && e3.groupProfileFilter && e3.groupProfileFilter.forEach(function(e4) {
  54347. s2[e4] && a2.push(s2[e4]);
  54348. });
  54349. var r2 = (e3 || {}).isGroupWithTopicOnly, u2 = void 0 !== r2 && r2;
  54350. return this._pagingGetGroupList({ limit: 50, offset: 0, groupBaseInfoFilter: a2, groupList: i2, isGroupWithTopicOnly: u2 }).then(function() {
  54351. Ve.l("".concat(n2, " ok. count:").concat(i2.length, " isGroupWithTopicOnly:").concat(u2)), u2 || t2._groupListTreeShaking(i2), t2._groupModule.updateGroupMap(i2);
  54352. var e4 = t2._groupModule.getLocalGroupList().length;
  54353. o2.setNetworkType(t2._groupModule.getNetworkType()).setMessage("remote count:".concat(i2.length, ", after tree shaking, local count:").concat(e4, ", isGroupWithTopicOnly:").concat(u2)).end(), t2.tempConversationList && (t2.handleUpdateGroupLastMessage(t2.tempConversationList), t2.tempConversationList = null), t2._groupModule.patchGroupMessageRemindType(), t2._groupModule.recomputeUnreadCount(), t2._groupModule.emitGroupListUpdate(true, !u2);
  54354. var s3 = t2._groupModule.getLocalGroupList();
  54355. if (u2) {
  54356. var a3 = s3.filter(function(e5) {
  54357. return true === e5.isSupportTopic;
  54358. });
  54359. return Ya({ groupList: a3 });
  54360. }
  54361. return t2._isPagingGetCompleted = true, Ya({ groupList: s3 });
  54362. }).catch(function(e4) {
  54363. return t2._groupModule.probeNetwork().then(function(t3) {
  54364. var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
  54365. o2.setError(e4, s3, a3).end();
  54366. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  54367. });
  54368. } }, { key: "isPagingGetCompleted", value: function() {
  54369. return this._isPagingGetCompleted;
  54370. } }, { key: "_pagingGetGroupList", value: function(e3) {
  54371. var t2 = this, n2 = "".concat(this._n, ".").concat("_pagingGetGroupList"), o2 = e3.isCommunityRelay, s2 = void 0 !== o2 && o2, a2 = e3.isGroupWithTopicOnly, i2 = void 0 !== a2 && a2, r2 = e3.limit, u2 = e3.offset, c2 = e3.groupBaseInfoFilter, l2 = e3.groupList;
  54372. if (i2)
  54373. return this._pagingGetGroupListWithTopic({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2 });
  54374. var d2 = new Aa("_pagingGetGroupList");
  54375. return this._groupModule.request({ protocolName: jo, requestData: { type: s2 ? E.GRP_COMMUNITY : void 0, memberAccount: this._groupModule.getMyUserID(), limit: r2, offset: u2, responseFilter: { groupBaseInfoFilter: c2, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] } } }).then(function(e4) {
  54376. var o3 = e4.data, a3 = o3.groups, i3 = void 0 === a3 ? [] : a3, p2 = o3.totalCount;
  54377. l2.push.apply(l2, m(i3)), t2._handleGroupAtInfoWithoutTopic(s2, i3);
  54378. var g2 = u2 + r2, h2 = !(p2 > g2), _2 = "offset:".concat(u2, " totalCount:").concat(p2, " isCompleted:").concat(h2, " ") + "currentCount:".concat(l2.length, " isCommunityRelay:").concat(s2);
  54379. return d2.setNetworkType(t2._groupModule.getNetworkType()).setMessage("".concat(_2)).end(), s2 || h2 ? !s2 && h2 ? (Ve.l("".concat(n2, " start to get community list")), u2 = 0, t2._pagingGetGroupList({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2, isCommunityRelay: true })) : s2 && !h2 ? (u2 = g2, t2._pagingGetGroupList({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2, isCommunityRelay: true })) : (Ve.l("".concat(n2, " ok. totalCount:").concat(l2.length)), Ya({ groupList: l2 })) : (u2 = g2, t2._pagingGetGroupList({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2 }));
  54380. }).catch(function(e4) {
  54381. return 11e3 !== e4.code && t2._groupModule.probeNetwork().then(function(t3) {
  54382. var n3 = v(t3, 2), o3 = n3[0], a3 = n3[1];
  54383. d2.setMessage("isCommunityRelay:".concat(s2)).setError(e4, o3, a3).end();
  54384. }), s2 ? (11e3 === e4.code && (d2 = null, Ve.l("".concat(n2, " ok. community unavailable"))), Xa({ groupList: l2 })) : Za(e4);
  54385. });
  54386. } }, { key: "_pagingGetGroupListWithTopic", value: function(e3) {
  54387. var t2 = this, n2 = "".concat(this._n, "._pagingGetGroupListWithTopic"), o2 = e3.limit, s2 = e3.offset, a2 = e3.groupBaseInfoFilter, i2 = e3.groupList, r2 = new Aa("pagingGetGroupListWithTopic");
  54388. return this._groupModule.request({ protocolName: jo, requestData: { type: E.GRP_COMMUNITY, memberAccount: this._groupModule.getMyUserID(), limit: o2, offset: s2, responseFilter: { groupBaseInfoFilter: a2, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] }, isSupportTopic: 1 } }).then(function(e4) {
  54389. var u2 = e4.data, c2 = u2.groups, l2 = void 0 === c2 ? [] : c2, d2 = u2.totalCount;
  54390. i2.push.apply(i2, m(l2));
  54391. var p2 = s2 + o2, g2 = !(d2 > p2), h2 = "offset:".concat(s2, " totalCount:").concat(d2, " isCompleted:").concat(g2, " ") + "currentCount:".concat(i2.length);
  54392. return r2.setNetworkType(t2._groupModule.getNetworkType()).setMessage("".concat(h2)).end(), g2 ? (Ve.l("".concat(n2, " ok. totalCount:").concat(i2.length)), Ya({ groupList: i2 })) : (s2 = p2, t2._pagingGetGroupListWithTopic({ limit: o2, offset: s2, groupBaseInfoFilter: a2, groupList: i2 }));
  54393. }).catch(function(e4) {
  54394. return t2._groupModule.probeNetwork().then(function(t3) {
  54395. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54396. r2.setError(e4, o3, s3).end();
  54397. }), Za(e4);
  54398. });
  54399. } }, { key: "_cacheGroupMessage", value: function(e3, t2) {
  54400. this._cachedGroupMessageMap.has(e3) || this._cachedGroupMessageMap.set(e3, []), this._cachedGroupMessageMap.get(e3).push(t2);
  54401. } }, { key: "_deleteCachedGroupMessage", value: function(e3) {
  54402. this._cachedGroupMessageMap.has(e3) && this._cachedGroupMessageMap.delete(e3);
  54403. } }, { key: "_notifyCachedGroupMessage", value: function(e3) {
  54404. var t2 = this, n2 = this._cachedGroupMessageMap.get(e3) || [];
  54405. n2.forEach(function(e4) {
  54406. t2.onNewGroupMessage(e4);
  54407. }), this._deleteCachedGroupMessage(e3), Ve.l("".concat(this._n, "._notifyCachedGroupMessage groupID:").concat(e3, " count:").concat(n2.length));
  54408. } }, { key: "_cacheGroupMessageAndProbe", value: function(e3) {
  54409. var t2 = this, n2 = e3.groupID, o2 = e3.event, s2 = e3.item;
  54410. this._cacheGroupMessage(n2, { event: o2, dataList: [s2] }), this._groupModule.getGroupSimplifiedInfo(n2).then(function(e4) {
  54411. e4.type === E.GRP_AVCHATROOM ? t2._groupModule.hasLocalGroup(n2) ? t2._notifyCachedGroupMessage(n2) : t2._groupModule.setUnjoinedAVChatRoom(n2) : (t2._groupModule.updateGroupMap([e4]), t2._notifyCachedGroupMessage(n2));
  54412. }), this._checkCountMap.has(n2) || this._checkCountMap.set(n2, 0), Ve.l("".concat(this._n, "._cacheGroupMessageAndProbe groupID:").concat(n2));
  54413. } }, { key: "_handleGroupAtInfoWithoutTopic", value: function(e3, n2) {
  54414. var o2 = this;
  54415. e3 && 0 !== n2.length && n2.forEach(function(e4) {
  54416. var n3 = e4.groupID, s2 = e4.groupAtInfoList, a2 = [];
  54417. it(s2) || (s2.forEach(function(e5) {
  54418. a2.push(t(t({}, e5), {}, { groupID: n3 }));
  54419. }), o2._groupModule.getModule(qn).onNewGroupAtTips({ dataList: a2 }));
  54420. });
  54421. } }, { key: "reset", value: function() {
  54422. this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._getTopicPendingMap.clear(), this._isPagingGetCompleted = false, this._groupModule.getInnerEmitterInstance().once(ei, this._initGroupList, this);
  54423. } }]), e2;
  54424. }(), Ci = 1, Ti = 2, Di = 3, ki = 4, Ei = 5, Si = function() {
  54425. function e2(t2) {
  54426. o(this, e2), this._groupModule = t2, this._n = "GroupAttributesHandler", this._groupAttributesMap = /* @__PURE__ */ new Map(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4, this._groupModule.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this);
  54427. }
  54428. return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
  54429. var e3 = this._groupModule.getCloudConfig("grp_attr_cache_time");
  54430. it(e3) || (this.CACHE_EXPIRE_TIME = Number(e3));
  54431. } }, { key: "updateLocalMainSequenceOnReconnected", value: function() {
  54432. this._groupAttributesMap.forEach(function(e3) {
  54433. e3.localMainSequence = 0;
  54434. });
  54435. } }, { key: "isGroupAttributesUpdatedNotice", value: function(e3) {
  54436. var t2 = e3.to, n2 = e3.elements.newGroupProfile, o2 = !it(n2) && !zt(n2.groupAttributeOption);
  54437. return o2 && this._onGroupAttributesUpdated({ groupID: t2, groupAttributeOption: n2.groupAttributeOption }), o2;
  54438. } }, { key: "_onGroupAttributesUpdated", value: function(e3) {
  54439. var t2 = this, n2 = e3.groupID, o2 = e3.groupAttributeOption, s2 = o2.mainSequence, a2 = o2.isWithChangedAttributeInfo, i2 = o2.groupAttributeList, r2 = void 0 === i2 ? [] : i2, u2 = o2.operationType;
  54440. if (Ve.l("".concat(this._n, ".onGroupAttributesUpdated. ") + "groupID:".concat(n2, " isWithChangedAttributeInfo:").concat(a2, " operationType:").concat(u2)), !it(u2)) {
  54441. this._groupAttributesCopy = this._getCachedAttributes({ groupID: n2 });
  54442. var c2 = s2 - this._getLocalGroupAttributes(n2).localMainSequence;
  54443. if (0 !== c2) {
  54444. if (1 === a2 && 1 === c2)
  54445. return this._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: s2, groupAttributeList: r2, operationType: u2 }), void this._emitGroupAttributesUpdated(n2);
  54446. if (this._hasLocalGroupAttributes(n2)) {
  54447. var l2 = this._getLocalGroupAttributes(n2).avChatRoomKey;
  54448. this._getGroupAttributes({ groupID: n2, avChatRoomKey: l2 }).then(function() {
  54449. t2._emitGroupAttributesUpdated(n2);
  54450. });
  54451. }
  54452. }
  54453. }
  54454. } }, { key: "initGroupAttributesCache", value: function(e3) {
  54455. var t2 = e3.groupID, n2 = e3.avChatRoomKey, o2 = void 0 === n2 ? void 0 : n2;
  54456. this._groupAttributesMap.set(t2, { lastUpdateTime: 0, localMainSequence: 0, remoteMainSequence: 0, attributes: /* @__PURE__ */ new Map(), avChatRoomKey: o2 }), Ve.l("".concat(this._n, ".initGroupAttributesCache groupID:").concat(t2, " avChatRoomKey:").concat(o2));
  54457. } }, { key: "initGroupAttributes", value: function(e3) {
  54458. var t2 = this, n2 = e3.groupID, o2 = e3.groupAttributes, s2 = this._getLocalGroupAttributes(n2), a2 = s2.remoteMainSequence, i2 = s2.avChatRoomKey, r2 = new Aa("initGroupAttributes");
  54459. return r2.setMessage("groupID:".concat(n2, " avChatRoomKey:").concat(i2, " mainSequence:").concat(a2)), this._groupModule.request({ protocolName: Is, requestData: { groupID: n2, avChatRoomKey: i2, mainSequence: a2, groupAttributeList: this._transformGroupAttributes(o2) } }).then(function(e4) {
  54460. Ve.l("".concat(t2._n, ".").concat("initGroupAttributes", " ok. groupID:").concat(n2));
  54461. var s3 = e4.data, a3 = s3.mainSequence, i3 = m(s3.groupAttributeList);
  54462. return i3.forEach(function(e5) {
  54463. e5.value = o2[e5.key];
  54464. }), t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: n2 }), t2._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: a3, groupAttributeList: i3, operationType: Ci }), t2._emitGroupAttributesUpdated(n2), r2.setNetworkType(t2._groupModule.getNetworkType()).end(), Ya({ groupAttributes: o2 });
  54465. }).catch(function(e4) {
  54466. return t2._groupModule.probeNetwork().then(function(t3) {
  54467. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54468. r2.setError(e4, o3, s3).end();
  54469. }), Za(e4);
  54470. });
  54471. } }, { key: "setGroupAttributes", value: function(e3) {
  54472. var t2 = this, n2 = "".concat(this._n, ".").concat("setGroupAttributes"), o2 = e3.groupID, s2 = e3.groupAttributes, a2 = this._getLocalGroupAttributes(o2), i2 = a2.remoteMainSequence, r2 = a2.avChatRoomKey, u2 = a2.attributes, c2 = this._transformGroupAttributes(s2);
  54473. c2.forEach(function(e4) {
  54474. var t3 = e4.key;
  54475. e4.sequence = 0, u2.has(t3) && (e4.sequence = u2.get(t3).sequence);
  54476. });
  54477. var l2 = new Aa("setGroupAttributes");
  54478. return l2.setMessage("groupID:".concat(o2, " groupAttributes:").concat(JSON.stringify(s2))), Ve.l("".concat(n2, ". groupID:").concat(o2, " mainSequence:").concat(i2)), this._groupModule.request({ protocolName: Cs, requestData: { groupID: o2, avChatRoomKey: r2, mainSequence: i2, groupAttributeList: c2 } }).then(function(e4) {
  54479. Ve.l("".concat(n2, " ok."));
  54480. var a3 = e4.data, i3 = a3.mainSequence, r3 = m(a3.groupAttributeList);
  54481. return r3.forEach(function(e5) {
  54482. e5.value = s2[e5.key];
  54483. }), t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: o2 }), t2._refreshCachedGroupAttributes({ groupID: o2, remoteMainSequence: i3, groupAttributeList: r3, operationType: Ti }), t2._emitGroupAttributesUpdated(o2), l2.setNetworkType(t2._groupModule.getNetworkType()).end(), Ya({ groupAttributes: s2 });
  54484. }).catch(function(e4) {
  54485. return t2._groupModule.probeNetwork().then(function(t3) {
  54486. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54487. l2.setError(e4, o3, s3).end();
  54488. }), Za(e4);
  54489. });
  54490. } }, { key: "deleteGroupAttributes", value: function(e3) {
  54491. var t2 = this, n2 = e3.groupID, o2 = e3.keyList, s2 = void 0 === o2 ? [] : o2, a2 = this._getLocalGroupAttributes(n2), i2 = a2.remoteMainSequence, r2 = a2.avChatRoomKey, u2 = a2.attributes, c2 = m(u2.keys()), l2 = Ds, d2 = Di, p2 = { groupID: n2, avChatRoomKey: r2, mainSequence: i2 }, g2 = [];
  54492. s2.length > 0 && (c2 = [], l2 = Ts, d2 = ki, s2.forEach(function(e4) {
  54493. var t3 = 0;
  54494. u2.has(e4) && (t3 = u2.get(e4).sequence, c2.push(e4)), g2.push({ key: e4, sequence: t3 });
  54495. }), p2.groupAttributeList = g2);
  54496. var h2 = new Aa("deleteGroupAttributes");
  54497. return h2.setMessage("groupID:".concat(n2, " mainSequence:").concat(i2, " keyList:").concat(s2, " protocolName:").concat(l2)), this._groupModule.request({ protocolName: l2, requestData: p2 }).then(function(e4) {
  54498. Ve.l("".concat(t2._n, ".").concat("deleteGroupAttributes", " ok. groupID:").concat(n2));
  54499. var o3 = e4.data.mainSequence;
  54500. return t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: n2 }), t2._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: o3, groupAttributeList: g2, operationType: d2 }), t2._emitGroupAttributesUpdated(n2), h2.setNetworkType(t2._groupModule.getNetworkType()).end(), Ya({ keyList: c2 });
  54501. }).catch(function(e4) {
  54502. return t2._groupModule.probeNetwork().then(function(t3) {
  54503. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54504. h2.setError(e4, o3, s3).end();
  54505. }), Za(e4);
  54506. });
  54507. } }, { key: "getGroupAttributes", value: function(e3) {
  54508. var t2 = this, n2 = "".concat(this._n, ".").concat("getGroupAttributes"), o2 = e3.groupID, s2 = this._getLocalGroupAttributes(o2), a2 = s2.avChatRoomKey, i2 = s2.lastUpdateTime, r2 = s2.localMainSequence, u2 = s2.remoteMainSequence, c2 = new Aa("getGroupAttributes");
  54509. if (c2.setMessage("groupID:".concat(o2, " localMainSequence:").concat(r2, " remoteMainSequence:").concat(u2, " keyList:").concat(e3.keyList)), Date.now() - i2 >= this.CACHE_EXPIRE_TIME || r2 < u2)
  54510. return this._getGroupAttributes({ groupID: o2, avChatRoomKey: a2 }).then(function(s3) {
  54511. c2.setMoreMessage("get attributes from remote. count:".concat(s3.length)).setNetworkType(t2._groupModule.getNetworkType()).end(), Ve.l("".concat(n2, " from remote. groupID:").concat(o2));
  54512. var a3 = t2._getCachedAttributes(e3);
  54513. return Ya({ groupAttributes: a3 });
  54514. }).catch(function(e4) {
  54515. return t2._groupModule.probeNetwork().then(function(t3) {
  54516. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54517. c2.setError(e4, o3, s3).end();
  54518. }), Za(e4);
  54519. });
  54520. c2.setMoreMessage("get attributes from cache").setNetworkType(this._groupModule.getNetworkType()).end(), Ve.l("".concat(n2, " from cache. groupID:").concat(o2));
  54521. var l2 = this._getCachedAttributes(e3);
  54522. return Xa({ groupAttributes: l2 });
  54523. } }, { key: "_getGroupAttributes", value: function(e3) {
  54524. var n2 = this, o2 = 0;
  54525. return it(e3.avChatRoomKey) || (o2 = 1), this._groupModule.request({ protocolName: ks, requestData: t(t({}, e3), {}, { groupType: o2 }) }).then(function(t2) {
  54526. Ve.l("".concat(n2._n, "._getGroupAttributes ok. groupID:").concat(e3.groupID));
  54527. var o3 = t2.data, s2 = o3.mainSequence, a2 = o3.groupAttributeList, i2 = m(a2);
  54528. return it(s2) || n2._refreshCachedGroupAttributes({ groupID: e3.groupID, remoteMainSequence: s2, groupAttributeList: i2, operationType: Ei }), a2;
  54529. }).catch(function(e4) {
  54530. return Za(e4);
  54531. });
  54532. } }, { key: "_refreshCachedGroupAttributes", value: function(e3) {
  54533. var t2 = e3.groupID, n2 = e3.remoteMainSequence, o2 = e3.groupAttributeList, s2 = e3.operationType;
  54534. if (this._hasLocalGroupAttributes(t2)) {
  54535. var a2 = this._getLocalGroupAttributes(t2), i2 = a2.localMainSequence;
  54536. if (s2 === Ei || n2 - i2 == 1)
  54537. a2.remoteMainSequence = n2, a2.localMainSequence = n2, a2.lastUpdateTime = Date.now(), this._updateCachedAttributes({ groupAttributes: a2, groupAttributeList: o2, operationType: s2 });
  54538. else {
  54539. if (i2 === n2)
  54540. return;
  54541. a2.remoteMainSequence = n2;
  54542. }
  54543. this._groupAttributesMap.set(t2, a2);
  54544. var r2 = "operationType:".concat(s2, " localMainSequence:").concat(i2, " remoteMainSequence:").concat(n2);
  54545. Ve.l("".concat(this._n, "._refreshCachedGroupAttributes. ").concat(r2));
  54546. }
  54547. } }, { key: "_getCachedAttributes", value: function(e3) {
  54548. var t2 = e3.groupID, n2 = e3.keyList, o2 = void 0 === n2 ? [] : n2, s2 = {};
  54549. if (this._hasLocalGroupAttributes(t2)) {
  54550. var a2 = this._getLocalGroupAttributes(t2).attributes;
  54551. if (o2.length > 0)
  54552. o2.forEach(function(e4) {
  54553. a2.has(e4) && (s2[e4] = a2.get(e4).value);
  54554. });
  54555. else {
  54556. var i2, r2 = D(a2.keys());
  54557. try {
  54558. for (r2.s(); !(i2 = r2.n()).done; ) {
  54559. var u2 = i2.value;
  54560. s2[u2] = a2.get(u2).value;
  54561. }
  54562. } catch (c2) {
  54563. r2.e(c2);
  54564. } finally {
  54565. r2.f();
  54566. }
  54567. }
  54568. }
  54569. return s2;
  54570. } }, { key: "_updateCachedAttributes", value: function(e3) {
  54571. var t2 = e3.groupAttributes, n2 = e3.groupAttributeList, o2 = e3.operationType;
  54572. o2 !== Di ? o2 !== ki ? (o2 === Ci && t2.attributes.clear(), n2.forEach(function(e4) {
  54573. var n3 = e4.key, o3 = e4.value, s2 = e4.sequence;
  54574. t2.attributes.set(n3, { value: o3, sequence: s2 });
  54575. })) : n2.forEach(function(e4) {
  54576. t2.attributes.delete(e4.key);
  54577. }) : t2.attributes.clear();
  54578. } }, { key: "_hasLocalGroupAttributes", value: function(e3) {
  54579. return this._groupAttributesMap.has(e3);
  54580. } }, { key: "_getLocalGroupAttributes", value: function(e3) {
  54581. return this._hasLocalGroupAttributes(e3) || this.initGroupAttributesCache({ groupID: e3 }), this._groupAttributesMap.get(e3);
  54582. } }, { key: "_transformGroupAttributes", value: function(e3) {
  54583. var t2 = [];
  54584. return Object.keys(e3).forEach(function(n2) {
  54585. t2.push({ key: n2, value: e3[n2] });
  54586. }), t2;
  54587. } }, { key: "_emitGroupAttributesUpdated", value: function(e3) {
  54588. var t2 = this._getCachedAttributes({ groupID: e3 }), n2 = this._computeAttrChangedInfo(t2), o2 = n2.updatedKeyList, s2 = n2.deletedKeyList;
  54589. Ve.l("".concat(this._n, "._emitGroupAttributesUpdated update:").concat(o2.length, ", delete:").concat(s2.length)), 0 === o2.length && 0 === s2.length || this._groupModule.emitOuterEvent(k.GROUP_ATTRIBUTES_UPDATED, { groupID: e3, groupAttributes: t2, updatedKeyList: o2, deletedKeyList: s2 });
  54590. } }, { key: "_computeAttrChangedInfo", value: function(e3) {
  54591. var t2 = this, n2 = [], o2 = [];
  54592. return Object.keys(e3).forEach(function(o3) {
  54593. e3[o3] !== t2._groupAttributesCopy[o3] && n2.push(o3);
  54594. }), Object.keys(this._groupAttributesCopy).forEach(function(t3) {
  54595. it(e3[t3]) && o2.push(t3);
  54596. }), this._groupAttributesCopy = {}, { updatedKeyList: n2, deletedKeyList: o2 };
  54597. } }, { key: "deleteLocalGroupAttributes", value: function(e3) {
  54598. this._hasLocalGroupAttributes(e3) && this._groupAttributesMap.delete(e3);
  54599. } }, { key: "reset", value: function() {
  54600. this._groupAttributesMap.clear(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4;
  54601. } }]), e2;
  54602. }(), Li = "Set", Ai = "Increase", Ri = "Decrease", Ni = function() {
  54603. function e2(t2) {
  54604. o(this, e2), this._groupModule = t2, this._n = "GroupCountersHandler", this._groupCountersMap = /* @__PURE__ */ new Map(), this.EXPIRE_TIME = 3e4, this._groupModule.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this);
  54605. }
  54606. return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
  54607. var e3 = this._groupModule.getCloudConfig("grp_counter_expire_time");
  54608. it(e3) || (this.EXPIRE_TIME = Number(e3));
  54609. } }, { key: "isGroupCountersNotice", value: function(e3) {
  54610. var t2 = e3.to, n2 = e3.elements.groupCounterInfo, o2 = false;
  54611. return zt(n2) || (this._onGroupCountersUpdated({ groupID: t2, groupCounterInfo: n2 }), o2 = true), o2;
  54612. } }, { key: "_onGroupCountersUpdated", value: function(e3) {
  54613. var t2 = this, n2 = e3.groupID;
  54614. e3.groupCounterInfo.forEach(function(e4) {
  54615. var o2 = e4.type, s2 = e4.groupCounterSeq, a2 = e4.counterList, i2 = void 0 === a2 ? [] : a2;
  54616. 0 !== o2 && 2 !== o2 || (t2._updateLocalGroupCounters({ groupID: n2, groupCounterSeq: s2, counterList: i2 }), i2.forEach(function(e5) {
  54617. t2._groupModule.emitOuterEvent(k.GROUP_COUNTER_UPDATED, { groupID: n2, key: e5.key, value: e5.value });
  54618. })), 1 === o2 && t2._deleteLocalGroupCounters({ groupID: n2, groupCounterSeq: s2, counterList: i2 });
  54619. }), Ve.l("".concat(this._n, "._onGroupCountersUpdated groupID:").concat(n2));
  54620. } }, { key: "initGroupCountersCache", value: function(e3) {
  54621. var t2 = e3.groupID, n2 = e3.avChatRoomKey;
  54622. this._groupCountersMap.set(t2, { lastUpdateTime: 0, groupCounterSeq: 0, counters: /* @__PURE__ */ new Map(), avChatRoomKey: n2 }), Ve.l("".concat(this._n, ".initGroupCountersCache groupID:").concat(t2, " avChatRoomKey:").concat(n2));
  54623. } }, { key: "setGroupCounters", value: function(e3) {
  54624. var t2 = this;
  54625. if (!this._groupModule.canIUse(B.GRP_COUNTER))
  54626. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  54627. var n2 = "".concat(this._n, ".setGroupCounters"), o2 = e3.groupID, s2 = e3.counters, a2 = this._convertObjectToList(s2), i2 = this._getLocalGroupCounters(o2).avChatRoomKey, r2 = "groupID:".concat(o2, " count:").concat(a2.length), u2 = new Aa("setGroupCounters");
  54628. return u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2)), this._updateGroupCounters({ groupID: o2, counterList: a2, avChatRoomKey: i2, mode: Li }).then(function(e4) {
  54629. return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 });
  54630. }).catch(function(e4) {
  54631. return t2._groupModule.probeNetwork().then(function(t3) {
  54632. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54633. u2.setError(e4, o3, s3).end();
  54634. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  54635. });
  54636. } }, { key: "increaseGroupCounter", value: function(e3) {
  54637. var t2 = this;
  54638. if (!this._groupModule.canIUse(B.GRP_COUNTER))
  54639. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  54640. var n2 = "".concat(this._n, ".increaseGroupCounters"), o2 = e3.groupID, s2 = e3.key, a2 = e3.value, i2 = this._getLocalGroupCounters(o2).avChatRoomKey, r2 = "groupID:".concat(o2, " key:").concat(s2, " value:").concat(a2), u2 = new Aa("increaseGroupCounter");
  54641. u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2));
  54642. var c2 = [{ key: s2, value: a2 }];
  54643. return this._updateGroupCounters({ groupID: o2, counterList: c2, avChatRoomKey: i2, mode: Ai }).then(function(e4) {
  54644. return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 });
  54645. }).catch(function(e4) {
  54646. return t2._groupModule.probeNetwork().then(function(t3) {
  54647. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54648. u2.setError(e4, o3, s3).end();
  54649. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  54650. });
  54651. } }, { key: "decreaseGroupCounter", value: function(e3) {
  54652. var t2 = this;
  54653. if (!this._groupModule.canIUse(B.GRP_COUNTER))
  54654. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  54655. var n2 = "".concat(this._n, ".decreaseGroupCounter"), o2 = e3.groupID, s2 = e3.key, a2 = e3.value, i2 = this._getLocalGroupCounters(o2).avChatRoomKey, r2 = "groupID:".concat(o2, " key:").concat(s2, " value:").concat(a2), u2 = new Aa("decreaseGroupCounter");
  54656. u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2));
  54657. var c2 = [{ key: s2, value: a2 }];
  54658. return this._updateGroupCounters({ groupID: o2, counterList: c2, avChatRoomKey: i2, mode: Ri }).then(function(e4) {
  54659. return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 });
  54660. }).catch(function(e4) {
  54661. return t2._groupModule.probeNetwork().then(function(t3) {
  54662. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54663. u2.setError(e4, o3, s3).end();
  54664. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  54665. });
  54666. } }, { key: "getGroupCounters", value: function(e3) {
  54667. var t2 = this;
  54668. if (!this._groupModule.canIUse(B.GRP_COUNTER))
  54669. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  54670. var n2 = "".concat(this._n, ".getGroupCounters"), o2 = e3.groupID, s2 = e3.keyList, a2 = void 0 === s2 ? [] : s2, i2 = this._getLocalGroupCounters(o2), r2 = i2.avChatRoomKey, u2 = i2.lastUpdateTime, c2 = new Aa("getGroupCounters");
  54671. if (c2.setMessage("groupID:".concat(o2)), Date.now() - u2 >= this.EXPIRE_TIME)
  54672. return this._getRemoteGroupCounters({ groupID: o2, avChatRoomKey: r2 }).then(function(e4) {
  54673. c2.setMoreMessage("from remote. count:".concat(e4.length)).end(), Ve.l("".concat(n2, " from remote. groupID:").concat(o2));
  54674. var s3 = t2._getLocalCounters(o2, a2);
  54675. return Ya({ counters: s3 });
  54676. }).catch(function(e4) {
  54677. return t2._groupModule.probeNetwork().then(function(t3) {
  54678. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  54679. c2.setError(e4, o3, s3).end();
  54680. }), Za(e4);
  54681. });
  54682. c2.setMoreMessage("from cache").end(), Ve.l("".concat(n2, " from cache. groupID:").concat(o2));
  54683. var l2 = this._getLocalCounters(o2, a2);
  54684. return Xa({ counters: l2 });
  54685. } }, { key: "_getRemoteGroupCounters", value: function(e3) {
  54686. var n2 = this;
  54687. return this._groupModule.request({ protocolName: Rs, requestData: t({}, e3) }).then(function(t2) {
  54688. var o2 = t2.data, s2 = o2.counterList, a2 = void 0 === s2 ? [] : s2, i2 = o2.groupCounterSeq;
  54689. return n2._updateLocalGroupCounters({ groupID: e3.groupID, counterList: a2, groupCounterSeq: i2 }), Ve.l("".concat(n2._n, "._getRemoteGroupCounters ok. groupID:").concat(e3.groupID)), a2;
  54690. }).catch(function(e4) {
  54691. return Za(e4);
  54692. });
  54693. } }, { key: "_convertObjectToList", value: function(e3) {
  54694. var t2 = [];
  54695. return Object.keys(e3).forEach(function(n2) {
  54696. t2.push({ key: n2, value: e3[n2] });
  54697. }), t2;
  54698. } }, { key: "_updateGroupCounters", value: function(e3) {
  54699. var n2 = "".concat(this._n, "._updateGroupCounters"), o2 = e3.groupID, s2 = e3.avChatRoomKey, a2 = e3.mode;
  54700. return Ve.l("".concat(n2, ". groupID:").concat(o2, " avChatRoomKey:").concat(s2, " mode:").concat(a2)), this._groupModule.request({ protocolName: As, requestData: t({}, e3) }).then(function(e4) {
  54701. Ve.l("".concat(n2, " ok."));
  54702. var t2 = e4.data.counterList, o3 = {};
  54703. return (void 0 === t2 ? [] : t2).forEach(function(e5) {
  54704. var t3 = e5.key, n3 = e5.value;
  54705. o3[t3] = n3;
  54706. }), o3;
  54707. }).catch(function(e4) {
  54708. return Za(e4);
  54709. });
  54710. } }, { key: "_hasLocalGroupCounters", value: function(e3) {
  54711. return this._groupCountersMap.has(e3);
  54712. } }, { key: "_getLocalGroupCounters", value: function(e3) {
  54713. return this._hasLocalGroupCounters(e3) || this.initGroupCountersCache({ groupID: e3 }), this._groupCountersMap.get(e3);
  54714. } }, { key: "_updateLocalGroupCounters", value: function(e3) {
  54715. var t2 = e3.groupID, n2 = e3.counterList, o2 = void 0 === n2 ? [] : n2, s2 = e3.groupCounterSeq;
  54716. if (this._hasLocalGroupCounters(t2)) {
  54717. var a2 = this._getLocalGroupCounters(t2), i2 = a2.counters, r2 = a2.avChatRoomKey, u2 = a2.groupCounterSeq;
  54718. if (s2 > 0 && s2 < u2)
  54719. return;
  54720. o2.forEach(function(e4) {
  54721. var t3 = e4.key, n3 = e4.value;
  54722. i2.set(t3, n3);
  54723. }), this._groupCountersMap.set(t2, { lastUpdateTime: Date.now(), groupCounterSeq: s2, counters: i2, avChatRoomKey: r2 });
  54724. }
  54725. } }, { key: "_deleteLocalGroupCounters", value: function(e3) {
  54726. var t2 = e3.groupID, n2 = e3.counterList, o2 = void 0 === n2 ? [] : n2, s2 = e3.groupCounterSeq;
  54727. if (this._hasLocalGroupCounters(t2)) {
  54728. var a2 = this._getLocalGroupCounters(t2), i2 = a2.counters, r2 = a2.avChatRoomKey;
  54729. o2.forEach(function(e4) {
  54730. i2.delete(e4.key);
  54731. }), this._groupCountersMap.set(t2, { lastUpdateTime: Date.now(), groupCounterSeq: s2, counters: i2, avChatRoomKey: r2 });
  54732. }
  54733. } }, { key: "_getLocalCounters", value: function(e3, t2) {
  54734. var n2 = {};
  54735. if (!this._hasLocalGroupCounters(e3))
  54736. return n2;
  54737. var o2 = this._getLocalGroupCounters(e3).counters;
  54738. if (t2.length > 0)
  54739. t2.forEach(function(e4) {
  54740. o2.has(e4) && (n2[e4] = o2.get(e4));
  54741. });
  54742. else {
  54743. var s2, a2 = D(o2.keys());
  54744. try {
  54745. for (a2.s(); !(s2 = a2.n()).done; ) {
  54746. var i2 = s2.value;
  54747. n2[i2] = o2.get(i2);
  54748. }
  54749. } catch (r2) {
  54750. a2.e(r2);
  54751. } finally {
  54752. a2.f();
  54753. }
  54754. }
  54755. return n2;
  54756. } }, { key: "reset", value: function() {
  54757. this._groupCountersMap.clear(), this.EXPIRE_TIME = 3e4;
  54758. } }]), e2;
  54759. }(), Oi = function() {
  54760. function e2(t2) {
  54761. o(this, e2);
  54762. var n2 = t2.manager, s2 = t2.groupID, a2 = t2.onInit, i2 = t2.onSuccess, r2 = t2.onFail;
  54763. this._n = "Polling", this._manager = n2, this._groupModule = n2._groupModule, this._onInit = a2, this._onSuccess = i2, this._onFail = r2, this._groupID = s2, this._timeoutID = -1, this._isRunning = false, this._protocolName = fs;
  54764. }
  54765. return a(e2, [{ key: "start", value: function() {
  54766. var e3 = this._groupModule.isLoggedIn();
  54767. e3 || (this._protocolName = vs), Ve.l("".concat(this._n, ".start pollingInterval:").concat(this._manager.getPollingInterval(), " isLoggedIn:").concat(e3)), this._isRunning = true, this._request();
  54768. } }, { key: "isRunning", value: function() {
  54769. return this._isRunning;
  54770. } }, { key: "_request", value: function() {
  54771. var e3 = this, t2 = this._onInit(this._groupID);
  54772. this._groupModule.request({ protocolName: this._protocolName, requestData: t2 }).then(function(t3) {
  54773. e3._onSuccess(e3._groupID, t3), e3.isRunning() && (clearTimeout(e3._timeoutID), e3._timeoutID = setTimeout(e3._request.bind(e3), e3._manager.getPollingInterval()));
  54774. }).catch(function(t3) {
  54775. e3._onFail(e3._groupID, t3), e3.isRunning() && (clearTimeout(e3._timeoutID), e3._timeoutID = setTimeout(e3._request.bind(e3), e3._manager.MAX_POLLING_INTERVAL));
  54776. });
  54777. } }, { key: "stop", value: function() {
  54778. Ve.l("".concat(this._n, ".stop")), this._timeoutID > 0 && (clearTimeout(this._timeoutID), this._timeoutID = -1), this._isRunning = false;
  54779. } }, { key: "getPollingTimerID", value: function() {
  54780. return this._timeoutID;
  54781. } }]), e2;
  54782. }(), Gi = { 3: true, 4: true, 5: true, 6: true, 17: true }, Ui = function() {
  54783. function e2(t2) {
  54784. o(this, e2), this._groupModule = t2, this._n = "AVChatRoomHandler", this._joinedGroupMap = /* @__PURE__ */ new Map(), this._pollingRequestInfoMap = /* @__PURE__ */ new Map(), this._pollingInstanceMap = /* @__PURE__ */ new Map(), this.sequencesLinkedList = new pi(200), this.messageIDLinkedList = new pi(100), this.receivedMessageCount = 0, this._reportMessageStackedCount = 0, this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this.DEFAULT_EXPIRE_TIME = 60, this.DEFAULT_POLLING_INTERVAL = 300, this.MAX_POLLING_INTERVAL = 2e3, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0, this._startBroadcastSeq = 1, this._broadcastMessageIDMap = /* @__PURE__ */ new Map(), this.DEFAULT_POLLING_SIMPLIFIED_MSG = 0;
  54785. }
  54786. return a(e2, [{ key: "hasJoinedAVChatRoom", value: function() {
  54787. return this._joinedGroupMap.size > 0;
  54788. } }, { key: "checkJoinedAVChatRoomByID", value: function(e3) {
  54789. return this._joinedGroupMap.has(e3);
  54790. } }, { key: "getJoinedAVChatRoom", value: function() {
  54791. return this._joinedGroupMap.size > 0 ? m(this._joinedGroupMap.keys()) : null;
  54792. } }, { key: "_updateRequestData", value: function(e3) {
  54793. var n2 = this._pollingRequestInfoMap.get(e3);
  54794. return e3 === m(this._pollingInstanceMap.keys())[0] ? t(t({}, n2), {}, { startBroadcastSeq: this._startBroadcastSeq, simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }) : t(t({}, n2), {}, { simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG });
  54795. } }, { key: "_handleSuccess", value: function(e3, t2) {
  54796. var n2 = t2.data, o2 = n2.key, s2 = n2.nextSeq, a2 = n2.rspMsgList, i2 = n2.errorCode, r2 = n2.nextBroadcastSeq, u2 = n2.broadcastMessageList;
  54797. if (0 !== i2) {
  54798. var c2 = this._pollingRequestInfoMap.get(e3), l2 = new Aa("longPollingAVError"), d2 = c2 ? "".concat(c2.key, "-").concat(c2.startSeq) : "requestInfo is undefined";
  54799. l2.setMessage("".concat(e3, "-").concat(d2, "-").concat(t2.errorInfo)).setCode(t2.errorCode).setNetworkType(this._groupModule.getNetworkType()).end(true);
  54800. } else {
  54801. if (!this.checkJoinedAVChatRoomByID(e3))
  54802. return;
  54803. nt(o2) && et(s2) && this._pollingRequestInfoMap.set(e3, { key: o2, startSeq: s2 }), et(r2) && r2 > this._startBroadcastSeq && (this._startBroadcastSeq = r2), at(a2) && a2.length > 0 ? (a2.forEach(function(e4) {
  54804. e4.to = e4.groupID;
  54805. }), this.onMessage(a2)) : (this._pollingNoMessageCount += 1, this._pollingNoMessageCount === this.DEFAULT_POLLING_NO_MESSAGE_COUNT && (this._pollingInterval = this.DEFAULT_POLLING_INTERVAL + this.DEFAULT_POLLING_INTERVAL_PLUS)), this._onBroadcastMessage(u2);
  54806. }
  54807. } }, { key: "_handleFailure", value: function(e3, t2) {
  54808. } }, { key: "onMessage", value: function(e3) {
  54809. if (at(e3) && 0 !== e3.length) {
  54810. 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL);
  54811. var t2 = null, n2 = [], o2 = this._getModule(qn), s2 = this._getModule(eo), a2 = e3.length;
  54812. a2 > 1 && e3.sort(function(e4, t3) {
  54813. return e4.sequence - t3.sequence;
  54814. });
  54815. for (var i2 = this._getModule(xn), r2 = 0; r2 < a2; r2++) {
  54816. var u2 = this.restoreMessageFromSimplified(e3[r2]);
  54817. if (Gi[u2.event]) {
  54818. if (6 === u2.event) {
  54819. if (this._groupModule.isGroupAttributesUpdatedNotice(u2))
  54820. continue;
  54821. if (this._groupModule.isGroupCountersNotice(u2))
  54822. continue;
  54823. }
  54824. this.receivedMessageCount += 1, t2 = this.packMessage(u2, u2.event);
  54825. var c2 = 1 === u2.isModified, l2 = 1 === u2.isHistoryMessage;
  54826. if ((i2.isUnlimitedAVChatRoom() || !this.sequencesLinkedList.has(t2.sequence)) && !this.messageIDLinkedList.has(t2.ID)) {
  54827. var d2 = t2.conversationID;
  54828. if (this.receivedMessageCount % 50 == 0 ? this._getModule(Xn).detectFirstRound(d2, this.sequencesLinkedList.data()) : this.receivedMessageCount % 80 == 0 && this._getModule(Xn).detectSecondRound(d2, this.sequencesLinkedList.data()), null !== this.sequencesLinkedList.tail()) {
  54829. var p2 = this.sequencesLinkedList.tail().value, g2 = t2.sequence - p2;
  54830. g2 > 1 && g2 <= 20 ? this._getModule(Xn).onMessageMaybeLost(d2, p2 + 1, g2 - 1) : g2 < -1 && g2 >= -20 && this._getModule(Xn).onMessageMaybeLost(d2, t2.sequence + 1, Math.abs(g2) - 1);
  54831. }
  54832. this.sequencesLinkedList.set(t2.sequence), this.messageIDLinkedList.set(t2.ID);
  54833. var h2 = false;
  54834. if (this._isMessageSentByCurrentInstance(t2) ? c2 && (h2 = true, t2.isModified = c2, o2.updateMessageIsModifiedProperty(t2)) : h2 = true, h2) {
  54835. if (t2.conversationType === E.CONV_SYSTEM && 5 === t2.payload.operationType && this._onGroupDismissed(t2.payload.groupProfile.groupID), !l2 && t2.conversationType !== E.CONV_SYSTEM) {
  54836. var _2 = t2.conversationID.replace(E.CONV_GROUP, "");
  54837. this._pollingInstanceMap.has(_2) ? this._groupModule.isLoggedIn() && s2.addMessageSequence({ key: Da, message: t2 }) : (t2.type !== E.MSG_GRP_TIP && t2.clientTime > 0 && s2.addMessageDelay(t2.clientTime), s2.addMessageSequence({ key: Ta, message: t2 }));
  54838. }
  54839. n2.push(t2);
  54840. }
  54841. }
  54842. } else
  54843. Ve.w("".concat(this._n, ".onMessage unknown event:").concat(u2.event));
  54844. }
  54845. if (0 !== n2.length) {
  54846. this._groupModule.filterModifiedMessage(n2);
  54847. var f2 = this.packConversationOption(n2);
  54848. if (f2.length > 0)
  54849. this._getModule(qn).onNewMessage({ conversationOptionsList: f2, isInstantMessage: true });
  54850. Ve.d("".concat(this._n, ".onMessage count:").concat(n2.length)), this._checkMessageStacked(n2);
  54851. var v2 = this._groupModule.filterUnmodifiedMessage(n2);
  54852. v2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, v2), n2.length = 0;
  54853. }
  54854. }
  54855. } }, { key: "isBroadcastOrNormal", value: function(e3) {
  54856. return 3 === e3 || 17 === e3;
  54857. } }, { key: "isGroupTip", value: function(e3) {
  54858. return 4 === e3 || 6 === e3;
  54859. } }, { key: "isGroupSystemNotice", value: function(e3) {
  54860. return 5 === e3;
  54861. } }, { key: "restoreGroupTipElements", value: function() {
  54862. var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
  54863. e3.groupJoinType || (e3.groupJoinType = 1);
  54864. var t2 = e3.operatorInfo, n2 = void 0 === t2 ? {} : t2, o2 = e3.operatorID, s2 = e3.userIDList, a2 = void 0 === s2 ? [] : s2, i2 = n2.userID, r2 = void 0 === i2 ? o2 : i2, u2 = n2.avatar, c2 = void 0 === u2 ? "" : u2, l2 = n2.nick, d2 = void 0 === l2 ? "" : l2;
  54865. e3.operatorInfo = { userID: r2, avatar: c2, nick: d2 };
  54866. var p2 = a2.map(function(e4) {
  54867. return { userID: e4 };
  54868. });
  54869. return e3.memberInfoList = e3.memberInfoList || p2, e3;
  54870. } }, { key: "restoreMessageFromSimplified", value: function(e3) {
  54871. var n2 = e3.event;
  54872. if (this.isBroadcastOrNormal(n2) && (e3.cloudCustomData = e3.cloudCustomData || "", e3.elements = e3.elements.map(function(e4) {
  54873. if (e4.type === E.MSG_CUSTOM) {
  54874. var n3 = e4.content, o3 = void 0 === n3 ? {} : n3;
  54875. e4.content = t({ data: "", description: "", extension: "" }, o3);
  54876. }
  54877. return e4;
  54878. })), (this.isGroupTip(n2) || this.isGroupSystemNotice(n2)) && (e3.from = e3.from || "@TIM#SYSTEM"), this.isGroupTip(n2)) {
  54879. e3.elements = this.restoreGroupTipElements(e3.elements);
  54880. var o2 = e3.elements, s2 = void 0 === o2 ? {} : o2, a2 = s2.operationType, r2 = s2.operatorInfo;
  54881. if (1 === a2) {
  54882. var u2 = [{ userID: (void 0 === r2 ? {} : r2).userID }];
  54883. s2.memberInfoList = s2.memberInfoList || u2;
  54884. }
  54885. }
  54886. if (this.isGroupSystemNotice(n2)) {
  54887. var c2 = e3.elements, l2 = c2.memberInfoList, d2 = c2.operatorInfo;
  54888. l2 || (l2 = void 0 === d2 ? {} : d2), e3.elements.memberInfoList = t({ userID: e3.elements.operatorID, avatar: "", nick: "" }, l2), e3.elements = t({ authentication: "", remarkInfo: "", messageKey: 1e3 * e3.time }, e3.elements);
  54889. var p2 = Object.keys(e3.elements).filter(function(e4) {
  54890. return "operatorInfo" !== e4;
  54891. }).reduce(function(n3, o3) {
  54892. return t(t({}, n3), {}, i({}, o3, e3.elements[o3]));
  54893. }, {});
  54894. e3.elements = p2;
  54895. }
  54896. return e3;
  54897. } }, { key: "_onGroupDismissed", value: function(e3) {
  54898. Ve.l("".concat(this._n, "._onGroupDismissed groupID:").concat(e3)), this._groupModule.deleteLocalGroupAndConversation(e3), this.reset(e3);
  54899. } }, { key: "_checkMessageStacked", value: function(e3) {
  54900. var t2 = "MessageStacked", n2 = e3.length;
  54901. n2 >= 100 && (this._groupModule.outputWarning(t2, n2), this._reportMessageStackedCount < 5 && (new Aa(t2).setNetworkType(this._groupModule.getNetworkType()).setMessage("count:".concat(n2, " groupID:").concat(m(this._joinedGroupMap.keys()))).setLevel("warning").end(), this._reportMessageStackedCount += 1));
  54902. } }, { key: "_isMessageSentByCurrentInstance", value: function(e3) {
  54903. return !!this._getModule(qn).isMessageSentByCurrentInstance(e3);
  54904. } }, { key: "packMessage", value: function(e3, t2) {
  54905. e3.currentUser = this._groupModule.getMyUserID(), e3.conversationType = 5 === t2 ? E.CONV_SYSTEM : E.CONV_GROUP, e3.isSystemMessage = !!e3.isSystemMessage;
  54906. var n2 = new Wa(e3), o2 = this.packElements(e3, t2);
  54907. return n2.setElement(o2, this._groupModule.getFileDownloadProxy()), n2;
  54908. } }, { key: "packElements", value: function(e3, n2) {
  54909. return 4 === n2 || 6 === n2 ? (this._updateMemberCountByGroupTips(e3), { type: E.MSG_GRP_TIP, content: t(t({}, e3.elements), {}, { groupProfile: e3.groupProfile }) }) : 5 === n2 ? { type: E.MSG_GRP_SYS_NOTICE, content: t(t({}, e3.elements), {}, { groupProfile: t(t({}, e3.groupProfile), {}, { groupID: e3.groupID }) }) } : this._getModule(Kn).parseElements(e3.elements, e3.from);
  54910. } }, { key: "packConversationOption", value: function(e3) {
  54911. for (var t2 = /* @__PURE__ */ new Map(), n2 = 0; n2 < e3.length; n2++) {
  54912. var o2 = e3[n2], s2 = o2.conversationID;
  54913. if (t2.has(s2)) {
  54914. var a2 = t2.get(s2);
  54915. a2.lastMessage = o2, "in" === o2.flow && a2.unreadCount++;
  54916. } else
  54917. t2.set(s2, { conversationID: o2.conversationID, unreadCount: "out" === o2.flow ? 0 : 1, type: o2.conversationType, subType: o2.conversationSubType, lastMessage: o2 });
  54918. }
  54919. return m(t2.values());
  54920. } }, { key: "_updateMemberCountByGroupTips", value: function(e3) {
  54921. var t2 = e3.groupProfile.groupID, n2 = e3.elements.onlineMemberInfo, o2 = void 0 === n2 ? void 0 : n2;
  54922. if (!zt(o2)) {
  54923. var s2 = o2.onlineMemberNum, a2 = void 0 === s2 ? 0 : s2, i2 = o2.expireTime, r2 = void 0 === i2 ? this.DEFAULT_EXPIRE_TIME : i2, u2 = this._onlineMemberCountMap.get(t2) || {}, c2 = Date.now();
  54924. zt(u2) ? Object.assign(u2, { lastReqTime: 0, lastSyncTime: 0, latestUpdateTime: c2, memberCount: a2, expireTime: r2 }) : (u2.latestUpdateTime = c2, u2.memberCount = a2), Ve.d("".concat(this._n, "._updateMemberCountByGroupTips info:"), u2), this._onlineMemberCountMap.set(t2, u2);
  54925. }
  54926. } }, { key: "_onBroadcastMessage", value: function(e3) {
  54927. if (!zt(e3)) {
  54928. for (var t2 = [], n2 = e3.length, o2 = null, s2 = 0; s2 < n2; s2++) {
  54929. var a2 = this.restoreMessageFromSimplified(e3[s2]);
  54930. Gi[a2.event] ? ((o2 = this.packMessage(a2, a2.event)).isBroadcastMessage = true, this._broadcastMessageIDMap.has(o2.ID) || (t2.push(o2), this._broadcastMessageIDMap.set(o2.ID, 1))) : Ve.w("".concat(this._n, "._onBroadcastMessage unknown event:").concat(a2.event));
  54931. }
  54932. t2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, t2);
  54933. }
  54934. } }, { key: "start", value: function(e3) {
  54935. if (this._pollingInstanceMap.has(e3)) {
  54936. var t2 = this._pollingInstanceMap.get(e3);
  54937. t2.isRunning() || t2.start();
  54938. } else {
  54939. var n2 = new Oi({ manager: this, groupID: e3, onInit: this._updateRequestData.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) });
  54940. n2.start(), this._pollingInstanceMap.set(e3, n2), Ve.l("".concat(this._n, ".start groupID:").concat(e3));
  54941. }
  54942. } }, { key: "handleJoinResult", value: function(e3) {
  54943. var t2 = this;
  54944. return this._preCheck().then(function() {
  54945. var n2 = e3.longPollingKey, o2 = e3.group, s2 = o2.groupID;
  54946. return t2._joinedGroupMap.set(s2, o2), t2._groupModule.updateGroupMap([o2]), t2._groupModule.deleteUnjoinedAVChatRoom(s2), t2._groupModule.emitGroupListUpdate(true, false), it(n2) ? Xa({ status: je, group: o2 }) : Promise.resolve();
  54947. });
  54948. } }, { key: "startRunLoop", value: function(e3) {
  54949. var t2 = this;
  54950. return this.handleJoinResult(e3).then(function() {
  54951. var n2 = e3.longPollingKey, o2 = e3.group, s2 = e3.startSeq, a2 = void 0 === s2 ? 0 : s2, i2 = o2.groupID;
  54952. return t2._pollingRequestInfoMap.set(i2, { key: n2, startSeq: a2 }), t2.start(i2), t2._groupModule.isLoggedIn() ? Xa({ status: je, group: o2 }) : Xa({ status: je });
  54953. });
  54954. } }, { key: "_preCheck", value: function() {
  54955. if (this._getModule(xn).isUnlimitedAVChatRoom())
  54956. return Promise.resolve();
  54957. if (!this.hasJoinedAVChatRoom())
  54958. return Promise.resolve();
  54959. var e3 = v(this._joinedGroupMap.entries().next().value, 2), t2 = e3[0], n2 = e3[1];
  54960. if (this._groupModule.isLoggedIn()) {
  54961. if (!(n2.selfInfo.role === E.GRP_MBR_ROLE_OWNER || n2.ownerID === this._groupModule.getMyUserID()))
  54962. return this._groupModule.quitGroup(t2);
  54963. this._groupModule.deleteLocalGroupAndConversation(t2);
  54964. } else
  54965. this._groupModule.deleteLocalGroupAndConversation(t2);
  54966. return this.reset(t2), Promise.resolve();
  54967. } }, { key: "joinWithoutAuth", value: function(e3) {
  54968. var t2 = this, n2 = e3.groupID, o2 = "".concat(this._n, ".").concat("joinWithoutAuth"), s2 = new Aa("joinWithoutAuth");
  54969. return this._groupModule.request({ protocolName: $o, requestData: e3 }).then(function(e4) {
  54970. var a2 = e4.data.longPollingKey;
  54971. if (t2._groupModule.probeNetwork().then(function(e5) {
  54972. var t3 = v(e5, 2);
  54973. t3[0];
  54974. var o3 = t3[1];
  54975. s2.setNetworkType(o3).setMessage("groupID:".concat(n2, " longPollingKey:").concat(a2)).end(true);
  54976. }), it(a2))
  54977. return Za({ code: ha.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN });
  54978. Ve.l("".concat(o2, " ok. groupID:").concat(n2)), t2._getModule(qn).setCompleted("".concat(E.CONV_GROUP).concat(n2));
  54979. var i2 = new hi({ groupID: n2 });
  54980. return t2.startRunLoop({ group: i2, longPollingKey: a2 }), Ya({ status: je });
  54981. }).catch(function(e4) {
  54982. return Ve.e("".concat(o2, " failed. groupID:").concat(n2, " error:"), e4), t2._groupModule.probeNetwork().then(function(t3) {
  54983. var o3 = v(t3, 2), a2 = o3[0], i2 = o3[1];
  54984. s2.setError(e4, a2, i2).setMessage("groupID:".concat(n2)).end(true);
  54985. }), Za(e4);
  54986. }).finally(function() {
  54987. t2._groupModule.getModule(Bn).reportAtOnce();
  54988. });
  54989. } }, { key: "getGroupOnlineMemberCount", value: function(e3) {
  54990. var t2 = this._onlineMemberCountMap.get(e3) || {}, n2 = Date.now();
  54991. return zt(t2) || n2 - t2.lastSyncTime > 1e3 * t2.expireTime && n2 - t2.latestUpdateTime > 1e4 && n2 - t2.lastReqTime > 3e3 ? (t2.lastReqTime = n2, this._onlineMemberCountMap.set(e3, t2), this._getGroupOnlineMemberCount(e3).then(function(e4) {
  54992. return Ya({ memberCount: e4.memberCount });
  54993. }).catch(function(e4) {
  54994. return Za(e4);
  54995. })) : Xa({ memberCount: t2.memberCount });
  54996. } }, { key: "_getGroupOnlineMemberCount", value: function(e3) {
  54997. var t2 = this, n2 = "".concat(this._n, ".").concat("_getGroupOnlineMemberCount");
  54998. return this._groupModule.request({ protocolName: ms, requestData: { groupID: e3 } }).then(function(o2) {
  54999. var s2 = t2._onlineMemberCountMap.get(e3) || {}, a2 = o2.data, i2 = a2.onlineMemberNum, r2 = void 0 === i2 ? 0 : i2, u2 = a2.expireTime, c2 = void 0 === u2 ? t2.DEFAULT_EXPIRE_TIME : u2;
  55000. Ve.l("".concat(n2, " ok. groupID:").concat(e3, " memberCount:").concat(r2, " expireTime:").concat(c2));
  55001. var l2 = Date.now();
  55002. return zt(s2) && (s2.lastReqTime = l2), t2._onlineMemberCountMap.set(e3, Object.assign(s2, { lastSyncTime: l2, latestUpdateTime: l2, memberCount: r2, expireTime: c2 })), { memberCount: r2 };
  55003. }).catch(function(o2) {
  55004. return Ve.w("".concat(n2, " failed. error:"), o2), new Aa("_getGroupOnlineMemberCount").setCode(o2.code).setMessage("groupID:".concat(e3, " error:").concat(JSON.stringify(o2))).setNetworkType(t2._groupModule.getNetworkType()).end(), Promise.reject(o2);
  55005. });
  55006. } }, { key: "_getModule", value: function(e3) {
  55007. return this._groupModule.getModule(e3);
  55008. } }, { key: "setPollingInterval", value: function(e3) {
  55009. it(e3) || (et(e3) ? this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = e3 : this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = parseInt(e3, 10));
  55010. } }, { key: "setPollingIntervalPlus", value: function(e3) {
  55011. it(e3) || (et(e3) ? this.DEFAULT_POLLING_INTERVAL_PLUS = e3 : this.DEFAULT_POLLING_INTERVAL_PLUS = parseInt(e3, 10));
  55012. } }, { key: "setPollingNoMessageCount", value: function(e3) {
  55013. it(e3) || (et(e3) ? this.DEFAULT_POLLING_NO_MESSAGE_COUNT = e3 : this.DEFAULT_POLLING_NO_MESSAGE_COUNT = parseInt(e3, 10));
  55014. } }, { key: "setPollingSimplifiedMessage", value: function(e3) {
  55015. it(e3) || "0" !== e3 && "1" !== e3 || (this.DEFAULT_POLLING_SIMPLIFIED_MSG = parseInt(e3, 10));
  55016. } }, { key: "getPollingInterval", value: function() {
  55017. return this._pollingInterval;
  55018. } }, { key: "onAVChatRoomMemberBanned", value: function(e3) {
  55019. var t2 = e3.payload.groupProfile.groupID;
  55020. Ve.l("".concat(this._n, ".onAVChatRoomMemberBanned groupID:").concat(t2)), this._groupModule.deleteLocalGroupAndConversation(t2), this.reset(t2);
  55021. } }, { key: "restartPolling", value: function() {
  55022. Ve.l("".concat(this._n, ".restartPolling count:").concat(this._pollingInstanceMap.size));
  55023. var e3, t2 = D(this._pollingInstanceMap.values());
  55024. try {
  55025. for (t2.s(); !(e3 = t2.n()).done; ) {
  55026. var n2 = e3.value;
  55027. n2.stop(), n2.start();
  55028. }
  55029. } catch (o2) {
  55030. t2.e(o2);
  55031. } finally {
  55032. t2.f();
  55033. }
  55034. } }, { key: "getPollingTimerID", value: function(e3) {
  55035. if (!this._pollingInstanceMap.has(e3))
  55036. return -1;
  55037. var t2 = this._pollingInstanceMap.get(e3).getPollingTimerID();
  55038. return Ve.l("".concat(this._n, ".getPollingTimerID groupID:").concat(e3, " timerID:").concat(t2)), t2;
  55039. } }, { key: "reset", value: function(e3) {
  55040. if (e3) {
  55041. Ve.l("".concat(this._n, ".reset groupID:").concat(e3));
  55042. var t2 = this._pollingInstanceMap.get(e3);
  55043. t2 && t2.stop(), this._pollingInstanceMap.delete(e3), this._joinedGroupMap.delete(e3), this._pollingRequestInfoMap.delete(e3), this._onlineMemberCountMap.delete(e3);
  55044. } else {
  55045. Ve.l("".concat(this._n, ".reset all"));
  55046. var n2, o2 = D(this._pollingInstanceMap.values());
  55047. try {
  55048. for (o2.s(); !(n2 = o2.n()).done; ) {
  55049. n2.value.stop();
  55050. }
  55051. } catch (s2) {
  55052. o2.e(s2);
  55053. } finally {
  55054. o2.f();
  55055. }
  55056. this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this._pollingRequestInfoMap.clear(), this._onlineMemberCountMap.clear(), this._broadcastMessageIDMap.clear();
  55057. }
  55058. this.sequencesLinkedList.reset(), this.messageIDLinkedList.reset(), this.receivedMessageCount = 0, this._reportMessageStackedCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = 300, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0;
  55059. } }]), e2;
  55060. }(), Pi = 1, bi = 15, wi = function() {
  55061. function e2(t2) {
  55062. o(this, e2), this._groupModule = t2, this._n = "GroupSystemNoticeHandler", this.pendencyMap = /* @__PURE__ */ new Map();
  55063. }
  55064. return a(e2, [{ key: "onNewGroupSystemNotice", value: function(e3) {
  55065. var t2 = e3.dataList, n2 = e3.isSyncingEnded, o2 = e3.isInstantMessage;
  55066. Ve.d("".concat(this._n, ".onReceiveSystemNotice count:").concat(t2.length));
  55067. var s2 = this.newSystemNoticeStoredAndSummary({ notifiesList: t2, isInstantMessage: o2 }), a2 = s2.eventDataList, i2 = s2.result;
  55068. a2.length > 0 && (this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: a2, isInstantMessage: o2 }), this._onReceivedGroupSystemNotice({ result: i2, isInstantMessage: o2 }));
  55069. o2 ? i2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, i2) : true === n2 && this._clearGroupSystemNotice();
  55070. } }, { key: "newSystemNoticeStoredAndSummary", value: function(e3) {
  55071. var n2 = e3.notifiesList, o2 = e3.isInstantMessage, s2 = null, a2 = n2.length, i2 = 0, r2 = [], u2 = { conversationID: E.CONV_SYSTEM, unreadCount: 0, type: E.CONV_SYSTEM, subType: null, lastMessage: null };
  55072. for (i2 = 0; i2 < a2; i2++) {
  55073. var c2 = n2[i2], l2 = c2.groupProfile, d2 = l2.communityType, p2 = void 0 === d2 ? 0 : d2, g2 = l2.topicID, h2 = void 0 === g2 ? void 0 : g2, _2 = c2.elements, f2 = _2.topicIDList, v2 = void 0 === f2 ? void 0 : f2, m2 = _2.operationType;
  55074. if (!(2 !== p2 || zt(h2) && zt(v2))) {
  55075. if ([17, 18, 20].includes(m2)) {
  55076. this._handleTopicSystemNotice(c2);
  55077. continue;
  55078. }
  55079. zt(h2) || (c2.to = h2);
  55080. }
  55081. if (c2.elements.operationType !== bi)
  55082. c2.currentUser = this._groupModule.getMyUserID(), c2.conversationType = E.CONV_SYSTEM, c2.conversationID = E.CONV_SYSTEM, (s2 = new Wa(c2)).setElement({ type: E.MSG_GRP_SYS_NOTICE, content: t(t({}, c2.elements), {}, { groupProfile: t({}, c2.groupProfile) }) }), s2.isSystemMessage = true, (1 === s2.sequence && 1 === s2.random || 2 === s2.sequence && 2 === s2.random) && (s2.sequence = _t(), s2.random = _t(), s2.generateMessageID(), Ve.l("".concat(this._n, ".newSystemNoticeStoredAndSummary sequence and random maybe duplicated, regenerate. ID:").concat(s2.ID))), this._groupModule.getModule(qn).pushIntoNoticeResult(r2, s2) && (o2 ? u2.unreadCount++ : s2.setIsRead(true), u2.subType = s2.conversationSubType);
  55083. }
  55084. return u2.lastMessage = r2[r2.length - 1], { eventDataList: r2.length > 0 ? [u2] : [], result: r2 };
  55085. } }, { key: "_clearGroupSystemNotice", value: function() {
  55086. var e3 = this;
  55087. this._getPendencyList().then(function(t2) {
  55088. t2.forEach(function(t3) {
  55089. e3.pendencyMap.set("".concat(t3.from, "_").concat(t3.groupID, "_").concat(t3.to), t3);
  55090. });
  55091. var n2 = e3._groupModule.getModule(qn).getLocalMessageList(E.CONV_SYSTEM), o2 = [];
  55092. n2.forEach(function(t3) {
  55093. var n3 = t3.payload, s2 = n3.operatorID, a2 = n3.operationType, i2 = n3.groupProfile;
  55094. if (a2 === Pi) {
  55095. var r2 = "".concat(s2, "_").concat(i2.groupID, "_").concat(i2.to), u2 = e3.pendencyMap.get(r2);
  55096. u2 && et(u2.handled) && 0 !== u2.handled && o2.push(t3);
  55097. }
  55098. }), e3.deleteGroupSystemNotice({ messageList: o2 });
  55099. });
  55100. } }, { key: "deleteGroupSystemNotice", value: function(e3) {
  55101. var t2 = this, n2 = "".concat(this._n, ".deleteGroupSystemNotice");
  55102. return at(e3.messageList) && 0 !== e3.messageList.length ? (Ve.l("".concat(n2, " ") + e3.messageList.map(function(e4) {
  55103. return e4.ID;
  55104. })), this._groupModule.request({ protocolName: _s, requestData: { messageListToDelete: e3.messageList.map(function(e4) {
  55105. return { from: E.CONV_SYSTEM, messageSeq: e4.clientSequence, messageRandom: e4.random };
  55106. }) } }).then(function() {
  55107. Ve.l("".concat(n2, " ok"));
  55108. var o2 = t2._groupModule.getModule(qn);
  55109. return e3.messageList.forEach(function(e4) {
  55110. o2.deleteLocalMessage(e4);
  55111. }), Ya();
  55112. }).catch(function(e4) {
  55113. return Ve.e("".concat(n2, " error:"), e4), Za(e4);
  55114. })) : Xa();
  55115. } }, { key: "_getPendencyList", value: function() {
  55116. var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n2 = t2.type, o2 = void 0 === n2 ? void 0 : n2, s2 = t2.startTime, a2 = void 0 === s2 ? 0 : s2, i2 = t2.limit, r2 = void 0 === i2 ? 20 : i2;
  55117. return this._groupModule.request({ protocolName: hs, requestData: { type: o2, startTime: a2, limit: r2, handleAccount: this._groupModule.getMyUserID() } }).then(function(t3) {
  55118. var n3 = t3.data.pendencyList;
  55119. return 0 !== t3.data.nextStartTime ? e3._getPendencyList({ startTime: t3.data.nextStartTime }).then(function(e4) {
  55120. return [].concat(m(n3), m(e4));
  55121. }) : n3;
  55122. });
  55123. } }, { key: "getGroupApplicationList", value: function() {
  55124. var e3 = this;
  55125. return this._getPendencyList().then(function(t2) {
  55126. return e3._getPendencyList({ type: E.GRP_COMMUNITY }).then(function(n2) {
  55127. return t2.push.apply(t2, m(n2)), e3._handlePendencyResult(t2);
  55128. }).catch(function(n2) {
  55129. return e3._handlePendencyResult(t2);
  55130. });
  55131. });
  55132. } }, { key: "_handlePendencyResult", value: function(e3) {
  55133. var t2 = this, n2 = [];
  55134. return e3.forEach(function(e4) {
  55135. t2.pendencyMap.set("".concat(e4.from, "_").concat(e4.groupID, "_").concat(e4.to), e4), 0 === e4.handled && n2.push({ applicant: e4.from, applicantNick: e4.fromUserNickName, groupName: e4.groupName, groupID: e4.groupID, authentication: e4.authentication, messageKey: e4.time, applicationType: e4.applicationType, userID: e4.userID });
  55136. }), Xa({ applicationList: n2 });
  55137. } }, { key: "_onReceivedGroupSystemNotice", value: function(e3) {
  55138. var t2 = this, n2 = e3.result;
  55139. e3.isInstantMessage && n2.forEach(function(e4) {
  55140. switch (e4.payload.operationType) {
  55141. case 1:
  55142. break;
  55143. case 2:
  55144. t2._onApplyGroupRequestAgreed(e4);
  55145. break;
  55146. case 3:
  55147. break;
  55148. case 4:
  55149. t2._onMemberKicked(e4);
  55150. break;
  55151. case 5:
  55152. t2._onGroupDismissed(e4);
  55153. break;
  55154. case 6:
  55155. break;
  55156. case 7:
  55157. t2._onInviteGroup(e4);
  55158. break;
  55159. case 8:
  55160. t2._onQuitGroup(e4);
  55161. break;
  55162. case 9:
  55163. t2._onSetManager(e4);
  55164. break;
  55165. case 10:
  55166. t2._onDeleteManager(e4);
  55167. break;
  55168. case 11:
  55169. case 12:
  55170. case 15:
  55171. break;
  55172. case 20:
  55173. t2._onMessageRemindTypeSynced(e4);
  55174. break;
  55175. case 21:
  55176. t2._groupModule.onAVChatRoomMemberBanned(e4);
  55177. }
  55178. });
  55179. } }, { key: "_onApplyGroupRequestAgreed", value: function(e3) {
  55180. var t2 = this, n2 = e3.payload.groupProfile.groupID;
  55181. this._groupModule.hasLocalGroup(n2) || this._groupModule.getGroupProfile({ groupID: n2 }).then(function(e4) {
  55182. var n3 = e4.data.group;
  55183. if (n3) {
  55184. t2._groupModule.updateGroupMap([n3]);
  55185. var o2 = !n3.isSupportTopic;
  55186. t2._groupModule.emitGroupListUpdate(true, o2);
  55187. }
  55188. });
  55189. } }, { key: "_onMemberKicked", value: function(e3) {
  55190. var t2 = e3.payload.groupProfile.groupID;
  55191. this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2);
  55192. } }, { key: "_onGroupDismissed", value: function(e3) {
  55193. var t2 = e3.payload.groupProfile.groupID;
  55194. this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2);
  55195. var n2 = this._groupModule._AVChatRoomHandler;
  55196. n2 && n2.checkJoinedAVChatRoomByID(t2) && n2.reset(t2);
  55197. } }, { key: "_onInviteGroup", value: function(e3) {
  55198. var t2 = this, n2 = e3.payload.groupProfile.groupID;
  55199. this._groupModule.hasLocalGroup(n2) || this._groupModule.getGroupProfile({ groupID: n2 }).then(function(e4) {
  55200. var n3 = e4.data.group;
  55201. n3 && (t2._groupModule.updateGroupMap([n3]), t2._groupModule.emitGroupListUpdate());
  55202. });
  55203. } }, { key: "_onQuitGroup", value: function(e3) {
  55204. var t2 = e3.payload.groupProfile.groupID;
  55205. this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2);
  55206. } }, { key: "_onSetManager", value: function(e3) {
  55207. var t2 = e3.payload.groupProfile, n2 = t2.to, o2 = t2.groupID, s2 = this._groupModule.getModule(wn).getLocalGroupMemberInfo(o2, n2);
  55208. s2 && s2.updateRole(E.GRP_MBR_ROLE_ADMIN);
  55209. } }, { key: "_onDeleteManager", value: function(e3) {
  55210. var t2 = e3.payload.groupProfile, n2 = t2.to, o2 = t2.groupID, s2 = this._groupModule.getModule(wn).getLocalGroupMemberInfo(o2, n2);
  55211. s2 && s2.updateRole(E.GRP_MBR_ROLE_MEMBER);
  55212. } }, { key: "_onMessageRemindTypeSynced", value: function(e3) {
  55213. var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.messageRemindType;
  55214. this._groupModule.getModule(qn).onGroupMessageRemindTypeSynced({ groupID: t2, messageRemindType: n2 });
  55215. } }, { key: "_handleTopicSystemNotice", value: function(e3) {
  55216. var t2 = e3.groupProfile, n2 = t2.groupID, o2 = t2.topicID, s2 = e3.elements, a2 = s2.operationType, i2 = s2.topicIDList, r2 = s2.messageRemindType, u2 = this._groupModule.getModule(Fn);
  55217. 17 === a2 ? u2.onTopicCreated({ groupID: n2, topicID: o2 }) : 18 === a2 ? u2.onTopicDeleted({ groupID: n2, topicIDList: i2 }) : 20 === a2 && u2.onTopicMessageRemindTypeUpdated({ groupID: n2, topicID: o2, messageRemindType: r2 });
  55218. } }, { key: "reset", value: function() {
  55219. this.pendencyMap.clear();
  55220. } }]), e2;
  55221. }(), Fi = ["relayFlag"], qi = function(e2) {
  55222. r(s2, e2);
  55223. var n2 = f(s2);
  55224. function s2(e3) {
  55225. var t2;
  55226. return o(this, s2), (t2 = n2.call(this, e3))._n = "GroupModule", t2._commonGroupHandler = null, t2._AVChatRoomHandler = null, t2._groupSystemNoticeHandler = null, t2._commonGroupHandler = new Ii(h(t2)), t2._groupAttributesHandler = new Si(h(t2)), t2._groupCountersHandler = new Ni(h(t2)), t2._AVChatRoomHandler = new Ui(h(t2)), t2._groupTipsHandler = new yi(h(t2)), t2._groupSystemNoticeHandler = new wi(h(t2)), t2.groupMap = /* @__PURE__ */ new Map(), t2._unjoinedAVChatRoomList = /* @__PURE__ */ new Map(), t2._receiptDetailCompleteMap = /* @__PURE__ */ new Map(), t2.getInnerEmitterInstance().on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
  55227. }
  55228. return a(s2, [{ key: "_onCloudConfigUpdated", value: function() {
  55229. var e3 = this.getCloudConfig("polling_interval"), t2 = this.getCloudConfig("polling_interval_plus"), n3 = this.getCloudConfig("polling_no_msg_count"), o2 = this.getCloudConfig("polling_simplified_msg");
  55230. this._AVChatRoomHandler && (Ve.l("".concat(this._n, "._onCloudConfigUpdated pollingInterval:").concat(e3) + " pollingIntervalPlus:".concat(t2, " pollingNoMessageCount:").concat(n3) + " pollingSimplifiedMessage:".concat(o2)), this._AVChatRoomHandler.setPollingInterval(e3), this._AVChatRoomHandler.setPollingIntervalPlus(t2), this._AVChatRoomHandler.setPollingNoMessageCount(n3), this._AVChatRoomHandler.setPollingSimplifiedMessage(o2));
  55231. } }, { key: "onCheckTimer", value: function(e3) {
  55232. this.isLoggedIn() && (this._commonGroupHandler.onCheckTimer(e3), this._groupTipsHandler.onCheckTimer(e3));
  55233. } }, { key: "guardForAVChatRoom", value: function(e3) {
  55234. var t2 = this;
  55235. if (e3.conversationType === E.CONV_GROUP) {
  55236. var n3 = kt(e3.to) ? xt(e3.to) : e3.to;
  55237. return this.hasLocalGroup(n3) ? Xa() : this.getGroupProfile({ groupID: n3 }).then(function(o2) {
  55238. var s3 = o2.data.group.type;
  55239. if (Ve.l("".concat(t2._n, ".guardForAVChatRoom. groupID:").concat(n3, " type:").concat(s3)), s3 === E.GRP_AVCHATROOM) {
  55240. var a2 = ha.MESSAGE_SEND_FAIL_NOT_IN_AVCHATROOM;
  55241. return Za(new ja({ code: a2, message: t2.getErrorMessage(a2, e3.from, n3), data: { message: e3 } }));
  55242. }
  55243. return Xa();
  55244. });
  55245. }
  55246. return Xa();
  55247. } }, { key: "checkJoinedAVChatRoomByID", value: function(e3) {
  55248. return !!this._AVChatRoomHandler && this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3);
  55249. } }, { key: "onNewGroupMessage", value: function(e3) {
  55250. this._commonGroupHandler && this._commonGroupHandler.onNewGroupMessage(e3);
  55251. } }, { key: "updateNextMessageSeq", value: function(e3) {
  55252. var t2 = this;
  55253. if (at(e3)) {
  55254. var n3 = this.getModule(Fn);
  55255. e3.forEach(function(e4) {
  55256. var o2 = e4.conversationID.replace(E.CONV_GROUP, "");
  55257. kt(o2) && n3.updateLastMessage(o2, e4.lastMessage), t2.groupMap.has(o2) && (t2.groupMap.get(o2).nextMessageSeq = e4.lastMessage.sequence + 1);
  55258. });
  55259. }
  55260. } }, { key: "onNewGroupTips", value: function(e3) {
  55261. this._groupTipsHandler && this._groupTipsHandler.onNewGroupTips(e3);
  55262. } }, { key: "onGroupMessageRevoked", value: function(e3) {
  55263. this._commonGroupHandler && this._commonGroupHandler.onGroupMessageRevoked(e3);
  55264. } }, { key: "onNewGroupSystemNotice", value: function(e3) {
  55265. this._groupSystemNoticeHandler && this._groupSystemNoticeHandler.onNewGroupSystemNotice(e3);
  55266. } }, { key: "onGroupMessageReadNotice", value: function(e3) {
  55267. var t2 = this;
  55268. e3.dataList.forEach(function(e4) {
  55269. var n3 = e4.elements.groupMessageReadNotice;
  55270. if (!it(n3)) {
  55271. var o2 = t2.getModule(qn);
  55272. n3.forEach(function(e5) {
  55273. var n4 = e5.groupID, s3 = e5.topicID, a2 = void 0 === s3 ? void 0 : s3, i2 = e5.lastMessageSeq;
  55274. Ve.d("".concat(t2._n, ".onGroupMessageReadNotice groupID:").concat(n4, " lastMessageSeq:").concat(i2));
  55275. var r2 = "".concat(E.CONV_GROUP).concat(n4), u2 = true;
  55276. zt(a2) || (r2 = "".concat(E.CONV_GROUP).concat(a2), u2 = false), o2.updateIsReadAfterReadReport({ conversationID: r2, lastMessageSeq: i2 }), o2.updateUnreadCount(r2, u2), o2.clearGroupAtInfoList(r2, u2);
  55277. });
  55278. }
  55279. });
  55280. } }, { key: "onReadReceiptList", value: function(e3) {
  55281. var t2 = this;
  55282. Ve.d("".concat(this._n, ".onReadReceiptList options:"), JSON.stringify(e3)), e3.dataList.forEach(function(e4) {
  55283. var n3 = e4.groupProfile, o2 = e4.elements, s3 = n3.groupID, a2 = t2.getModule(qn), i2 = o2.readReceiptList;
  55284. a2.updateReadReceiptInfo({ groupID: s3, readReceiptList: i2 });
  55285. });
  55286. } }, { key: "onGroupMessageModified", value: function(e3) {
  55287. Ve.d("".concat(this._n, ".onGroupMessageModified options:"), JSON.stringify(e3));
  55288. var n3 = this.getModule(qn);
  55289. e3.dataList.forEach(function(e4) {
  55290. n3.onMessageModified(t(t({}, e4), {}, { conversationType: E.CONV_GROUP, to: e4.topicID ? e4.topicID : e4.groupID }));
  55291. });
  55292. } }, { key: "deleteGroupSystemNotice", value: function(e3) {
  55293. this._groupSystemNoticeHandler && this._groupSystemNoticeHandler.deleteGroupSystemNotice(e3);
  55294. } }, { key: "initGroupMap", value: function(e3) {
  55295. this.groupMap.set(e3.groupID, new hi(e3));
  55296. } }, { key: "deleteGroup", value: function(e3) {
  55297. this.groupMap.delete(e3);
  55298. } }, { key: "updateGroupMap", value: function(e3) {
  55299. var t2, n3 = this, o2 = this.getModule(qn);
  55300. e3.forEach(function(e4) {
  55301. t2 = e4.groupID, n3.groupMap.has(t2) ? n3.groupMap.get(t2).updateGroup(e4) : (n3.groupMap.set(t2, new hi(e4)), o2.deleteGroupRomaingMessageInfo(t2));
  55302. });
  55303. var s3, a2 = this.getMyUserID(), i2 = D(this.groupMap);
  55304. try {
  55305. for (i2.s(); !(s3 = i2.n()).done; ) {
  55306. var r2 = v(s3.value, 2)[1];
  55307. r2.selfInfo.userID = a2, "Owner" === r2.selfInfo.role && (r2.ownerID = a2);
  55308. }
  55309. } catch (u2) {
  55310. i2.e(u2);
  55311. } finally {
  55312. i2.f();
  55313. }
  55314. this._setStorageGroupList();
  55315. } }, { key: "getStorageGroupList", value: function() {
  55316. return this.getModule(Vn).getItem("groupMap");
  55317. } }, { key: "_setStorageGroupList", value: function() {
  55318. var e3 = this.getLocalGroupList().filter(function(e4) {
  55319. var t2 = e4.type;
  55320. return !Tt(t2);
  55321. }).filter(function(e4) {
  55322. return !e4.isSupportTopic;
  55323. }).slice(0, 20).map(function(e4) {
  55324. return { groupID: e4.groupID, name: e4.name, avatar: e4.avatar, type: e4.type };
  55325. });
  55326. this.getModule(Vn).setItem("groupMap", e3);
  55327. } }, { key: "getGroupMap", value: function() {
  55328. return this.groupMap;
  55329. } }, { key: "getLocalGroupList", value: function() {
  55330. return m(this.groupMap.values());
  55331. } }, { key: "getLocalGroupProfile", value: function(e3) {
  55332. return this.groupMap.get(e3);
  55333. } }, { key: "sortLocalGroupList", value: function() {
  55334. var e3 = m(this.groupMap).filter(function(e4) {
  55335. var t2 = v(e4, 2);
  55336. return t2[0], !zt(t2[1].lastMessage);
  55337. });
  55338. e3.sort(function(e4, t2) {
  55339. return t2[1].lastMessage.lastTime - e4[1].lastMessage.lastTime;
  55340. }), this.groupMap = new Map(m(e3));
  55341. } }, { key: "updateGroupLastMessage", value: function(e3) {
  55342. this._commonGroupHandler && this._commonGroupHandler.handleUpdateGroupLastMessage(e3);
  55343. } }, { key: "emitGroupListUpdate", value: function() {
  55344. var e3 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalGroupList();
  55345. if (e3 && this.emitOuterEvent(k.GROUP_LIST_UPDATED), t2) {
  55346. var o2 = JSON.parse(JSON.stringify(n3)), s3 = this.getModule(qn);
  55347. s3.updateConversationGroupProfile(o2);
  55348. }
  55349. } }, { key: "patchGroupMessageRemindType", value: function() {
  55350. var e3 = this.getLocalGroupList(), t2 = this.getModule(qn), n3 = 0;
  55351. e3.forEach(function(e4) {
  55352. true === t2.patchMessageRemindType({ ID: e4.groupID, isC2CConversation: false, messageRemindType: e4.selfInfo.messageRemindType }) && (n3 += 1);
  55353. }), Ve.l("".concat(this._n, ".patchGroupMessageRemindType count:").concat(n3));
  55354. } }, { key: "recomputeUnreadCount", value: function() {
  55355. var e3 = this.getLocalGroupList(), t2 = this.getModule(qn);
  55356. e3.forEach(function(e4) {
  55357. var n3 = e4.groupID, o2 = e4.selfInfo, s3 = o2.excludedUnreadSequenceList, a2 = o2.readedSequence;
  55358. if (at(s3)) {
  55359. var i2 = 0;
  55360. s3.forEach(function(t3) {
  55361. t3 >= a2 && t3 <= e4.nextMessageSeq - 1 && (i2 += 1);
  55362. }), i2 >= 1 && t2.recomputeGroupUnreadCount({ conversationID: "".concat(E.CONV_GROUP).concat(n3), count: i2 });
  55363. }
  55364. });
  55365. } }, { key: "getMyNameCardByGroupID", value: function(e3) {
  55366. var t2 = this.getLocalGroupProfile(e3);
  55367. return t2 ? t2.selfInfo.nameCard : "";
  55368. } }, { key: "isPagingGetCompleted", value: function() {
  55369. return !!this._commonGroupHandler && this._commonGroupHandler.isPagingGetCompleted();
  55370. } }, { key: "getGroupList", value: function(e3) {
  55371. return this._commonGroupHandler ? this._commonGroupHandler.getGroupList(e3) : Xa();
  55372. } }, { key: "getGroupProfile", value: function(e3) {
  55373. var t2 = this, n3 = "".concat(this._n, ".").concat("getGroupProfile"), o2 = new Aa("getGroupProfile"), s3 = e3.groupID, a2 = e3.groupCustomFieldFilter;
  55374. Ve.l("".concat(n3, " groupID:").concat(s3));
  55375. var i2 = { groupIDList: [s3], responseFilter: { groupBaseInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember", "InviteJoinOption"], groupCustomFieldFilter: a2, memberInfoFilter: ["Role", "JoinTime", "MsgSeq", "MsgFlag", "NameCard"] } };
  55376. return this.getGroupProfileAdvance(i2).then(function(e4) {
  55377. var a3, i3 = e4.data, r2 = i3.successGroupList, u2 = i3.failureGroupList;
  55378. if (Ve.l("".concat(n3, " ok")), u2.length > 0)
  55379. return Za(u2[0]);
  55380. (Tt(r2[0].type) && !t2.hasLocalGroup(s3) ? a3 = new hi(r2[0]) : (t2.updateGroupMap(r2), a3 = t2.getLocalGroupProfile(s3)), a3.isSupportTopic) || t2.getModule(qn).updateConversationGroupProfile([a3]);
  55381. return o2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(s3, " type:").concat(a3.type, " muteAllMembers:").concat(a3.muteAllMembers, " ownerID:").concat(a3.ownerID)).end(), Ya({ group: a3 });
  55382. }).catch(function(s4) {
  55383. return t2.probeNetwork().then(function(t3) {
  55384. var n4 = v(t3, 2), a3 = n4[0], i3 = n4[1];
  55385. o2.setError(s4, a3, i3).setMessage("groupID:".concat(e3.groupID)).end();
  55386. }), Ve.e("".concat(n3, " failed. error:"), s4), Za(s4);
  55387. });
  55388. } }, { key: "getGroupProfileAdvance", value: function(e3) {
  55389. var n3 = "".concat(this._n, ".getGroupProfileAdvance"), o2 = e3.groupIDList;
  55390. at(o2) && o2.length > 50 && (this.outputWarning("GetGroupProfileLimit"), o2.length = 50);
  55391. var s3 = [], a2 = [];
  55392. o2.forEach(function(e4) {
  55393. Dt({ groupID: e4 }) ? a2.push(e4) : s3.push(e4);
  55394. });
  55395. var i2 = [];
  55396. if (s3.length > 0) {
  55397. var r2 = this._getGroupProfileAdvance(t(t({}, e3), {}, { groupIDList: s3 }));
  55398. i2.push(r2);
  55399. }
  55400. if (a2.length > 0) {
  55401. var u2 = this._getGroupProfileAdvance(t(t({}, e3), {}, { groupIDList: a2, relayFlag: s3.length > 0 }));
  55402. i2.push(u2);
  55403. }
  55404. return Promise.all(i2).then(function(e4) {
  55405. var t2 = [], n4 = [];
  55406. return e4.forEach(function(e5) {
  55407. t2.push.apply(t2, m(e5.successGroupList)), n4.push.apply(n4, m(e5.failureGroupList));
  55408. }), Ya({ successGroupList: t2, failureGroupList: n4 });
  55409. }).catch(function(e4) {
  55410. return Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  55411. });
  55412. } }, { key: "_getGroupProfileAdvance", value: function(e3) {
  55413. var t2 = this, n3 = e3.relayFlag, o2 = void 0 !== n3 && n3, s3 = g(e3, Fi);
  55414. return this.request({ protocolName: zo, requestData: s3 }).then(function(e4) {
  55415. Ve.l("".concat(t2._n, "._getGroupProfileAdvance ok."));
  55416. var n4 = e4.data.groups;
  55417. return { successGroupList: n4.filter(function(e5) {
  55418. return it(e5.errorCode) || 0 === e5.errorCode;
  55419. }), failureGroupList: n4.filter(function(e5) {
  55420. return e5.errorCode && 0 !== e5.errorCode;
  55421. }).map(function(e5) {
  55422. return new ja({ code: e5.errorCode, message: e5.errorInfo, data: { groupID: e5.groupID } });
  55423. }) };
  55424. }).catch(function(t3) {
  55425. return o2 && Dt({ groupID: e3.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : Za(t3);
  55426. });
  55427. } }, { key: "createGroup", value: function(e3) {
  55428. var n3 = this, o2 = "".concat(this._n, ".").concat("createGroup"), s3 = e3.type, a2 = e3.groupID;
  55429. if (e3.name && false === this._filterProfanity("name", e3))
  55430. return Za({ code: ha.PROFANITY_FOUND });
  55431. if (e3.introduction && false === this._filterProfanity("introduction", e3))
  55432. return Za({ code: ha.PROFANITY_FOUND });
  55433. if (e3.notification && false === this._filterProfanity("notification", e3))
  55434. return Za({ code: ha.PROFANITY_FOUND });
  55435. if (!["Public", "Private", "ChatRoom", "AVChatRoom", "Community"].includes(s3))
  55436. return Za({ code: ha.ILLEGAL_GROUP_TYPE });
  55437. if (!Dt({ type: s3 })) {
  55438. if (!zt(a2) && Dt({ groupID: a2 }))
  55439. return Za({ code: ha.ILLEGAL_GROUP_ID });
  55440. e3.isSupportTopic = void 0;
  55441. }
  55442. if (Tt(s3) && !it(e3.memberList) && e3.memberList.length > 0 && (e3.memberList = void 0), this._canIUseJoinOption(s3) || it(e3.joinOption) || (e3.joinOption = void 0), Dt({ type: s3 })) {
  55443. if (!zt(a2) && !Dt({ groupID: a2 }))
  55444. return Za({ code: ha.ILLEGAL_GROUP_ID });
  55445. e3.isSupportTopic = true === e3.isSupportTopic ? 1 : 0;
  55446. }
  55447. var i2 = new Aa("createGroup");
  55448. Ve.l("".concat(o2, " options:"), e3);
  55449. var r2 = null, u2 = [];
  55450. return this.request({ protocolName: Jo, requestData: t(t({}, e3), {}, { ownerID: this.getMyUserID(), webPushFlag: 1 }) }).then(function(s4) {
  55451. var a3 = s4.data, c2 = a3.groupID, l2 = a3.overLimitUserIDList, d2 = void 0 === l2 ? [] : l2;
  55452. if (r2 = c2, u2 = d2, i2.setNetworkType(n3.getNetworkType()).setMessage("groupType:".concat(e3.type, " groupID:").concat(c2, " overLimitUserIDList=").concat(d2)).end(), Ve.l("".concat(o2, " ok groupID:").concat(c2, " overLimitUserIDList:"), d2), e3.type === E.GRP_AVCHATROOM)
  55453. return n3.getGroupProfile({ groupID: c2 });
  55454. if (e3.type === E.GRP_COMMUNITY && 1 === e3.isSupportTopic)
  55455. return n3.getGroupProfile({ groupID: c2 });
  55456. zt(e3.memberList) || zt(d2) || (e3.memberList = e3.memberList.filter(function(e4) {
  55457. return -1 === d2.indexOf(e4.userID);
  55458. })), n3.updateGroupMap([t(t({}, e3), {}, { groupID: c2 })]);
  55459. var p2 = n3.getModule(Nn), g2 = p2.createCustomMessage({ to: c2, conversationType: E.CONV_GROUP, payload: { data: "group_create", extension: n3.isIntl() ? "".concat(n3.getMyUserID(), " created a group") : "".concat(n3.getMyUserID(), "创建群组") } });
  55460. return p2.sendMessageInstance(g2), n3.emitGroupListUpdate(), n3.getGroupProfile({ groupID: c2 });
  55461. }).then(function(e4) {
  55462. var t2 = e4.data.group, n4 = t2.selfInfo, o3 = n4.nameCard, s4 = n4.joinTime;
  55463. return t2.updateSelfInfo({ nameCard: o3, joinTime: s4, messageRemindType: E.MSG_REMIND_ACPT_AND_NOTE, role: E.GRP_MBR_ROLE_OWNER }), Ya({ group: t2, overLimitUserIDList: u2 });
  55464. }).catch(function(s4) {
  55465. if (i2.setMessage("groupType:".concat(e3.type)), n3.probeNetwork().then(function(e4) {
  55466. var t2 = v(e4, 2), n4 = t2[0], o3 = t2[1];
  55467. i2.setError(s4, n4, o3).end();
  55468. }), 10010 === s4.code || 10007 === s4.code) {
  55469. n3.updateGroupMap([t(t({}, e3), {}, { groupID: r2 })]);
  55470. var a3 = n3.getLocalGroupProfile(r2);
  55471. return Ve.l("".concat(o2, " success, but failed to get group profile.")), Ya({ group: a3, overLimitUserIDList: u2 });
  55472. }
  55473. return Ve.e("".concat(o2, " failed. error:"), s4), Za(s4);
  55474. });
  55475. } }, { key: "dismissGroup", value: function(e3) {
  55476. var t2 = this, n3 = "".concat(this._n, ".").concat("dismissGroup");
  55477. if (this.hasLocalGroup(e3) && this.getLocalGroupProfile(e3).type === E.GRP_WORK)
  55478. return Za(new ja({ code: ha.CANNOT_DISMISS_WORK }));
  55479. var o2 = new Aa("dismissGroup");
  55480. return o2.setMessage("groupID:".concat(e3)), Ve.l("".concat(n3, " groupID:").concat(e3)), this.request({ protocolName: Xo, requestData: { groupID: e3 } }).then(function() {
  55481. return o2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupAndConversation(e3), t2.checkJoinedAVChatRoomByID(e3) && t2._AVChatRoomHandler.reset(e3), t2._groupAttributesHandler.deleteLocalGroupAttributes(e3), Ya({ groupID: e3 });
  55482. }).catch(function(e4) {
  55483. return t2.probeNetwork().then(function(t3) {
  55484. var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1];
  55485. o2.setError(e4, s3, a2).end();
  55486. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  55487. });
  55488. } }, { key: "updateGroupProfile", value: function(e3) {
  55489. var t2 = this, n3 = "".concat(this._n, ".").concat("updateGroupProfile");
  55490. if (this.hasLocalGroup(e3.groupID)) {
  55491. var o2 = this.getLocalGroupProfile(e3.groupID).type;
  55492. this._canIUseJoinOption(o2) || it(e3.joinOption) || (Ve.w("".concat(n3, " joinOption is unavailable for Work/Meeting/AVChatRoom")), e3.joinOption = void 0);
  55493. }
  55494. if (it(e3.muteAllMembers) || (e3.muteAllMembers ? e3.muteAllMembers = "On" : e3.muteAllMembers = "Off"), e3.name && false === this._filterProfanity("name", e3))
  55495. return Za({ code: ha.PROFANITY_FOUND });
  55496. if (e3.introduction && false === this._filterProfanity("introduction", e3))
  55497. return Za({ code: ha.PROFANITY_FOUND });
  55498. if (e3.notification && false === this._filterProfanity("notification", e3))
  55499. return Za({ code: ha.PROFANITY_FOUND });
  55500. var s3 = new Aa("updateGroupProfile");
  55501. return s3.setMessage(JSON.stringify(e3)), Ve.l("".concat(n3, " groupID:").concat(e3.groupID)), this.request({ protocolName: Zo, requestData: e3 }).then(function() {
  55502. (s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.hasLocalGroup(e3.groupID)) && (t2.groupMap.get(e3.groupID).updateGroup(e3), t2._setStorageGroupList());
  55503. return Ya({ group: t2.groupMap.get(e3.groupID) });
  55504. }).catch(function(e4) {
  55505. return t2.probeNetwork().then(function(t3) {
  55506. var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1];
  55507. s3.setError(e4, o3, a2).end();
  55508. }), Ve.l("".concat(n3, " failed. error:"), e4), Za(e4);
  55509. });
  55510. } }, { key: "_filterProfanity", value: function(e3, t2) {
  55511. var n3 = this.getModule(oo);
  55512. if (!n3)
  55513. return true;
  55514. var o2 = n3.filterText(t2[e3], z), s3 = o2.isAllowedToSend, a2 = o2.modifiedText;
  55515. return true === s3 && (t2[e3] = a2, true);
  55516. } }, { key: "joinGroup", value: function(e3) {
  55517. var t2 = this, n3 = e3.groupID, o2 = e3.type, s3 = "".concat(this._n, ".joinGroup");
  55518. if (o2 === E.GRP_WORK)
  55519. return Za({ code: ha.CANNOT_JOIN_WORK });
  55520. if (this.deleteUnjoinedAVChatRoom(n3), this.hasLocalGroup(n3)) {
  55521. if (!this.isLoggedIn())
  55522. return Xa({ status: E.JOIN_STATUS_ALREADY_IN_GROUP });
  55523. var a2 = new Aa("applyJoinGroup");
  55524. return this.getGroupProfile({ groupID: n3 }).then(function() {
  55525. return a2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(n3, " joinedStatus:").concat(E.JOIN_STATUS_ALREADY_IN_GROUP)).end(), Xa({ status: E.JOIN_STATUS_ALREADY_IN_GROUP });
  55526. }).catch(function(o3) {
  55527. return a2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(n3, " unjoined")).end(), Ve.w("".concat(s3, " ").concat(n3, " was unjoined, now join!")), t2.groupMap.delete(n3), t2.applyJoinGroup(e3);
  55528. });
  55529. }
  55530. return Ve.l("".concat(s3, " groupID:").concat(n3)), this.isLoggedIn() ? this.applyJoinGroup(e3) : this._AVChatRoomHandler.joinWithoutAuth(e3);
  55531. } }, { key: "applyJoinGroup", value: function(e3) {
  55532. var n3 = this, o2 = "".concat(this._n, ".").concat("applyJoinGroup"), s3 = e3.groupID;
  55533. if (!zt(e3.applyMessage) && false === this._filterProfanity("applyMessage", e3))
  55534. return Za({ code: ha.PROFANITY_FOUND });
  55535. var a2 = new Aa("applyJoinGroup"), i2 = t({}, e3), r2 = this.canIUse(B.AVCHATROOM_HISTORY_MSG);
  55536. return r2 && (i2.historyMessageFlag = 1), this.getModule(qn).deleteTopicRoamingMessageInfo(s3), this.request({ protocolName: Qo, requestData: i2 }).then(function(e4) {
  55537. var t2 = e4.data, i3 = t2.joinedStatus, u2 = t2.longPollingKey, c2 = t2.startSeq, l2 = t2.avChatRoomFlag, d2 = t2.avChatRoomKey, p2 = t2.messageList, g2 = "groupID:".concat(s3, " joinedStatus:").concat(i3, " longPollingKey:").concat(u2, " startSeq:").concat(c2) + " avChatRoomFlag:".concat(l2, " canGetAVChatRoomHistoryMessage:").concat(r2, ",") + " history message count:".concat(zt(p2) ? 0 : p2.length);
  55538. switch (a2.setNetworkType(n3.getNetworkType()).setMessage("".concat(g2)).end(), Ve.l("".concat(o2, " ok. ").concat(g2)), i3) {
  55539. case ze:
  55540. return Ya({ status: ze });
  55541. case je:
  55542. return n3.getGroupProfile({ groupID: s3 }).then(function(e5) {
  55543. var t3 = e5.data.group;
  55544. return n3._handleJoinResult({ group: t3, avChatRoomFlag: l2, longPollingKey: u2, startSeq: c2, avChatRoomKey: d2, messageList: p2 });
  55545. }).catch(function() {
  55546. var e5 = new hi({ groupID: s3 });
  55547. return n3._handleJoinResult({ group: e5, avChatRoomFlag: l2, longPollingKey: u2, startSeq: c2, avChatRoomKey: d2, messageList: p2 });
  55548. });
  55549. default:
  55550. var h2 = new ja({ code: ha.JOIN_GROUP_FAIL });
  55551. return Ve.e("".concat(o2, " failed. error:"), h2), Za(h2);
  55552. }
  55553. }).catch(function(e4) {
  55554. return a2.setMessage("groupID:".concat(s3)), n3.probeNetwork().then(function(t2) {
  55555. var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
  55556. a2.setError(e4, o3, s4).end();
  55557. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  55558. });
  55559. } }, { key: "_handleJoinResult", value: function(e3) {
  55560. var t2, n3 = this, o2 = e3.group, s3 = e3.avChatRoomFlag, a2 = e3.longPollingKey, i2 = e3.startSeq, r2 = e3.avChatRoomKey, u2 = e3.messageList, c2 = o2.groupID;
  55561. return 1 === s3 ? (this.getModule(qn).setCompleted("".concat(E.CONV_GROUP).concat(c2)), this._groupAttributesHandler.initGroupAttributesCache({ groupID: c2, avChatRoomKey: r2 }), this._groupCountersHandler.initGroupCountersCache({ groupID: c2, avChatRoomKey: r2 }), (t2 = it(a2) ? this._AVChatRoomHandler.handleJoinResult({ group: o2 }) : this._AVChatRoomHandler.startRunLoop({ group: o2, longPollingKey: a2, startSeq: i2 })).then(function() {
  55562. n3._onAVChatRoomHistoryMessage(u2);
  55563. }), t2) : (this.emitGroupListUpdate(true, false), Ya({ status: je, group: o2 }));
  55564. } }, { key: "quitGroup", value: function(e3) {
  55565. var t2 = this, n3 = "".concat(this._n, ".").concat("quitGroup");
  55566. Ve.l("".concat(n3, " groupID:").concat(e3));
  55567. var o2 = this.checkJoinedAVChatRoomByID(e3);
  55568. if (!o2 && !this.hasLocalGroup(e3))
  55569. return Za({ code: ha.MEMBER_NOT_IN_GROUP });
  55570. if (o2 && !this.isLoggedIn())
  55571. return Ve.l("".concat(n3, " anonymously ok. groupID:").concat(e3)), this.deleteLocalGroupAndConversation(e3), this._AVChatRoomHandler.reset(e3), Xa({ groupID: e3 });
  55572. var s3 = new Aa("quitGroup");
  55573. return s3.setMessage("groupID:".concat(e3)), this.request({ protocolName: es, requestData: { groupID: e3 } }).then(function() {
  55574. return s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupAndConversation(e3), o2 && t2._AVChatRoomHandler.reset(e3), t2._groupAttributesHandler.deleteLocalGroupAttributes(e3), Ya({ groupID: e3 });
  55575. }).catch(function(e4) {
  55576. return t2.probeNetwork().then(function(t3) {
  55577. var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1];
  55578. s3.setError(e4, o3, a2).end();
  55579. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  55580. });
  55581. } }, { key: "searchGroupByID", value: function(e3) {
  55582. var t2 = this, n3 = "".concat(this._n, ".").concat("searchGroupByID"), o2 = { groupIDList: [e3] }, s3 = new Aa("searchGroupByID");
  55583. return s3.setMessage("groupID:".concat(e3)), Ve.l("".concat(n3, " groupID:").concat(e3)), this.request({ protocolName: ts, requestData: o2 }).then(function(e4) {
  55584. var o3 = e4.data.groupProfile;
  55585. if (0 !== o3[0].errorCode)
  55586. throw new ja({ code: o3[0].errorCode, message: o3[0].errorInfo });
  55587. return s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), Ya({ group: new hi(o3[0]) });
  55588. }).catch(function(e4) {
  55589. return t2.probeNetwork().then(function(t3) {
  55590. var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1];
  55591. s3.setError(e4, o3, a2).end();
  55592. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  55593. });
  55594. } }, { key: "changeGroupOwner", value: function(e3) {
  55595. var t2 = this, n3 = "".concat(this._n, ".").concat("changeGroupOwner");
  55596. if (this.hasLocalGroup(e3.groupID) && this.getLocalGroupProfile(e3.groupID).type === E.GRP_AVCHATROOM)
  55597. return Za({ code: ha.CANNOT_CHANGE_OWNER_IN_AVCHATROOM });
  55598. if (e3.newOwnerID === this.getMyUserID())
  55599. return Za({ code: ha.CANNOT_CHANGE_OWNER_TO_SELF });
  55600. var o2 = new Aa("changeGroupOwner");
  55601. return o2.setMessage("groupID:".concat(e3.groupID, " newOwnerID:").concat(e3.newOwnerID)), Ve.l("".concat(n3, " groupID:").concat(e3.groupID)), this.request({ protocolName: ns, requestData: e3 }).then(function() {
  55602. o2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok"));
  55603. var s3 = e3.groupID, a2 = e3.newOwnerID;
  55604. t2.groupMap.get(s3).ownerID = a2;
  55605. var i2 = t2.getModule(wn).getLocalGroupMemberList(s3);
  55606. if (i2 instanceof Map) {
  55607. var r2 = i2.get(t2.getMyUserID());
  55608. it(r2) || (r2.updateRole("Member"), t2.groupMap.get(s3).selfInfo.role = "Member");
  55609. var u2 = i2.get(a2);
  55610. it(u2) || u2.updateRole("Owner");
  55611. }
  55612. return t2.emitGroupListUpdate(true, false), Ya({ group: t2.groupMap.get(s3) });
  55613. }).catch(function(e4) {
  55614. return t2.probeNetwork().then(function(t3) {
  55615. var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1];
  55616. o2.setError(e4, s3, a2).end();
  55617. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  55618. });
  55619. } }, { key: "getGroupApplicationList", value: function() {
  55620. return this._groupSystemNoticeHandler.getGroupApplicationList();
  55621. } }, { key: "handleGroupApplication", value: function(e3) {
  55622. var t2, n3, o2, s3, a2, i2 = this, r2 = "".concat(this._n, ".").concat("handleGroupApplication"), u2 = e3.handleAction, c2 = e3.handleMessage, l2 = e3.message, d2 = e3.application;
  55623. l2 ? (t2 = l2.payload.operatorID, n3 = l2.payload.groupProfile.groupID, o2 = l2.payload.authentication, s3 = l2.payload.messageKey) : d2 && (t2 = d2.applicant, n3 = d2.groupID, o2 = d2.authentication, s3 = d2.messageKey);
  55624. var p2 = os2;
  55625. d2 && 2 === d2.applicationType && (p2 = ss, a2 = d2.userID);
  55626. var g2 = new Aa("handleGroupApplication");
  55627. return g2.setMessage("groupID:".concat(n3)), Ve.l("".concat(r2, " groupID:").concat(n3)), this.request({ protocolName: p2, requestData: { handleAction: u2, handleMessage: c2, applicant: t2, invitee: a2, groupID: n3, authentication: o2, messageKey: s3 } }).then(function() {
  55628. return g2.setNetworkType(i2.getNetworkType()).end(), Ve.l("".concat(r2, " ok")), l2 && i2._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), Ya({ group: i2.getLocalGroupProfile(n3) });
  55629. }).catch(function(e4) {
  55630. return i2.probeNetwork().then(function(t3) {
  55631. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  55632. g2.setError(e4, o3, s4).end();
  55633. }), Ve.e("".concat(r2, " failed. error"), e4), Za(e4);
  55634. });
  55635. } }, { key: "handleGroupInvitation", value: function(e3) {
  55636. var n3 = this, o2 = "".concat(this._n, ".").concat("handleGroupInvitation"), s3 = e3.message.payload, a2 = s3.groupProfile.groupID, i2 = s3.authentication, r2 = s3.messageKey, u2 = s3.operatorID, c2 = e3.handleAction, l2 = new Aa("handleGroupInvitation");
  55637. return l2.setMessage("groupID:".concat(a2, " inviter:").concat(u2, " handleAction:").concat(c2)), Ve.l("".concat(o2, " groupID:").concat(a2, " inviter:").concat(u2, " handleAction:").concat(c2)), this.request({ protocolName: as, requestData: t(t({}, e3), {}, { inviter: u2, groupID: a2, authentication: i2, messageKey: r2 }) }).then(function() {
  55638. return l2.setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), Ya({ group: n3.getLocalGroupProfile(a2) });
  55639. }).catch(function(e4) {
  55640. return n3.probeNetwork().then(function(t2) {
  55641. var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
  55642. l2.setError(e4, o3, s4).end();
  55643. }), Ve.e("".concat(o2, " failed. error"), e4), Za(e4);
  55644. });
  55645. } }, { key: "getGroupOnlineMemberCount", value: function(e3) {
  55646. return this._AVChatRoomHandler ? this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3) ? this._AVChatRoomHandler.getGroupOnlineMemberCount(e3) : Xa({ memberCount: 0 }) : Za({ code: ha.CANNOT_FIND_MODULE });
  55647. } }, { key: "hasLocalGroup", value: function(e3) {
  55648. return this.groupMap.has(e3);
  55649. } }, { key: "deleteLocalGroupAndConversation", value: function(e3) {
  55650. var t2 = this.checkJoinedAVChatRoomByID(e3);
  55651. (Ve.l("".concat(this._n, ".deleteLocalGroupAndConversation isJoinedAVChatRoom:").concat(t2)), t2) && this.getModule(qn).deleteLocalConversation("".concat(E.CONV_GROUP).concat(e3));
  55652. if (Dt({ groupID: e3 })) {
  55653. var n3 = this.getLocalGroupProfile(e3);
  55654. if (n3 && true === n3.isSupportTopic)
  55655. this.getModule(Fn).deleteTopicListInCommunity(e3);
  55656. }
  55657. this._deleteLocalGroup(e3), this.emitGroupListUpdate(true, false);
  55658. } }, { key: "_deleteLocalGroup", value: function(e3) {
  55659. this.groupMap.delete(e3), this.getModule(wn).deleteGroupMemberList(e3), this._setStorageGroupList();
  55660. } }, { key: "sendMessage", value: function(e3, t2) {
  55661. if (at(e3._receiverList) && e3._receiverList.length > 0 && !this.canIUse(B.MSG_TO_SPECIFIED_GRP_MBR))
  55662. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  55663. var n3 = this.createGroupMessagePack(e3, t2);
  55664. return this.request(n3);
  55665. } }, { key: "createGroupMessagePack", value: function(e3, t2) {
  55666. var n3 = null;
  55667. t2 && t2.offlinePushInfo && (n3 = t2.offlinePushInfo);
  55668. var o2 = "";
  55669. nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (o2 = e3.cloudCustomData);
  55670. var s3 = [];
  55671. if (st(t2) && st(t2.messageControlInfo)) {
  55672. var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
  55673. true === i2 && s3.push("NoUnread"), true === r2 && s3.push("NoLastMsg"), true === u2 && s3.push("NoMsgCheck");
  55674. }
  55675. var c2 = void 0;
  55676. at(e3._receiverList) && e3._receiverList.length > 0 && (c2 = e3._receiverList, e3._receiverList.length > 50 && (c2 = e3._receiverList.slice(0, 50), this.outputWarning("ReceiverListLimit")));
  55677. var l2 = this.isOnlineMessage(e3, t2) ? 1 : 0, d2 = e3.getGroupAtInfoList(), p2 = { fromAccount: this.getMyUserID(), groupID: e3.to, msgBody: e3.getElements(), cloudCustomData: o2, random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: e3.type !== E.MSG_TEXT || zt(d2) ? void 0 : d2, onlineOnlyFlag: l2, clientTime: e3.clientTime, offlinePushInfo: n3 ? { pushFlag: true === n3.disablePush ? 1 : 0, title: n3.title || "", desc: n3.description || "", ext: n3.extension || "", apnsInfo: { badgeMode: true === n3.ignoreIOSBadge ? 1 : 0, isVoipPush: this._isVoipPush(n3) }, androidInfo: { OPPOChannelID: n3.androidOPPOChannelID || "" } } : void 0, messageControlInfo: 0 === l2 ? s3 : void 0, needReadReceipt: true !== e3.needReadReceipt || this.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, receiverList: c2, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 };
  55678. return kt(e3.to) && (p2.groupID = xt(e3.to), p2.topicID = e3.to), { protocolName: vo, tjgID: this.generateTjgID(e3), requestData: p2 };
  55679. } }, { key: "_isVoipPush", value: function(e3) {
  55680. var t2 = void 0;
  55681. return it(e3.disableVoipPush) || (t2 = false === e3.disableVoipPush ? 1 : 0), t2;
  55682. } }, { key: "revokeMessage", value: function(e3) {
  55683. var t2 = { groupID: e3.to, msgSeqList: [{ msgSeq: e3.sequence }] };
  55684. return kt(e3.to) && (t2.groupID = xt(e3.to), t2.topicID = e3.to), this.request({ protocolName: is, requestData: t2 });
  55685. } }, { key: "deleteMessage", value: function(e3) {
  55686. var t2 = e3.to, n3 = e3.keyList;
  55687. Ve.l("".concat(this._n, ".deleteMessage groupID:").concat(t2, " count:").concat(n3.length));
  55688. var o2 = { groupID: t2, deleter: this.getMyUserID(), keyList: n3 };
  55689. return kt(t2) && (o2.groupID = xt(t2), o2.topicID = t2), this.request({ protocolName: Ms, requestData: o2 });
  55690. } }, { key: "modifyRemoteMessage", value: function(e3) {
  55691. var t2 = e3.to, n3 = e3.sequence, o2 = e3.payload, s3 = e3.type, a2 = e3.version, i2 = void 0 === a2 ? 0 : a2, r2 = e3.cloudCustomData, u2 = t2, c2 = void 0;
  55692. kt(t2) && (u2 = xt(t2), c2 = t2);
  55693. var l2 = void 0;
  55694. return Bt(s3) && (l2 = []).push({ type: s3, content: o2 }), this.request({ protocolName: ys, requestData: { groupID: u2, topicID: c2, sequence: n3, version: i2, elements: l2, cloudCustomData: r2 } });
  55695. } }, { key: "getRoamingMessage", value: function(e3) {
  55696. var t2 = this, n3 = "".concat(this._n, ".getRoamingMessage"), o2 = e3.conversationID, s3 = e3.groupID, a2 = e3.sequence, i2 = new Aa("getGroupRoamingMessages"), r2 = 0, u2 = void 0;
  55697. return kt(s3) && (s3 = xt(u2 = s3)), this._computeLastSequence({ groupID: s3, topicID: u2, sequence: a2 }).then(function(e4) {
  55698. return r2 = e4, Ve.l("".concat(n3, " groupID:").concat(s3, " startSequence:").concat(r2)), t2.request({ protocolName: cs, requestData: { groupID: s3, count: 21, sequence: r2, topicID: u2 } });
  55699. }).then(function(e4) {
  55700. var a3 = e4.data, c2 = a3.messageList, l2 = a3.complete, d2 = a3.invisibleSequenceList, p2 = void 0 === d2 ? [] : d2;
  55701. it(c2) ? Ve.l("".concat(n3, " ok. complete:").concat(l2, " but messageList is undefined!")) : Ve.l("".concat(n3, " ok. complete:").concat(l2, " count:").concat(c2.length));
  55702. var g2 = t2._getMinSequence(p2, c2) - 1;
  55703. i2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(s3, " topicID:").concat(u2, " startSequence:").concat(r2, " complete:").concat(l2, " nextSequence:").concat(g2)).end();
  55704. var h2 = t2.getModule(qn), _2 = [];
  55705. return zt(c2) || (h2.updateRoamingMessageSequence(o2, g2), _2 = h2.onRoamingMessage(c2, o2), h2.updateIsRead(o2), h2.patchConversationLastMessage(o2)), (2 === l2 || g2 <= 1) && (h2.setCompleted(o2), g2 = ""), Ve.l("".concat(n3, " nextReqID:").concat(g2, ", stored message count:").concat(_2.length, ", invisible sequence count:").concat(p2.length)), { nextReqID: g2 + "", storedMessageList: _2 };
  55706. }).catch(function(e4) {
  55707. return t2.probeNetwork().then(function(t3) {
  55708. var n4 = v(t3, 2), o3 = n4[0], a3 = n4[1];
  55709. i2.setError(e4, o3, a3).setMessage("groupID:".concat(s3, " topicID:").concat(u2, " startSequence:").concat(r2)).end();
  55710. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  55711. });
  55712. } }, { key: "_getGroupIDOfMessage", value: function(e3) {
  55713. return e3.conversationID.replace(E.CONV_GROUP, "");
  55714. } }, { key: "_getMinSequence", value: function(e3, t2) {
  55715. var n3 = 0;
  55716. zt(t2) || (n3 = t2[t2.length - 1].sequence);
  55717. var o2 = 0;
  55718. zt(e3) || (o2 = e3[e3.length - 1]);
  55719. return Ve.l("".concat(this._n, "._getMinSequence minVisibleSequence:").concat(n3, " minInvisibleSequence:").concat(o2)), o2 > 0 && o2 < n3 ? o2 : n3;
  55720. } }, { key: "getReadReceiptList", value: function(e3) {
  55721. var t2 = this, n3 = "".concat(this._n, ".").concat("getReadReceiptList"), o2 = this._getGroupIDOfMessage(e3[0]), s3 = this.getMyUserID(), a2 = e3.filter(function(e4) {
  55722. return e4.from === s3 && true === e4.needReadReceipt;
  55723. }).map(function(e4) {
  55724. return { sequence: e4.sequence };
  55725. });
  55726. if (Ve.l("".concat(n3, " groupID:").concat(o2, " sequenceList:").concat(JSON.stringify(a2))), 0 === a2.length)
  55727. return Xa({ messageList: e3 });
  55728. var i2 = new Aa("getReadReceiptList");
  55729. return i2.setMessage("groupID:".concat(o2)), this.request({ protocolName: ls, requestData: { groupID: o2, sequenceList: a2 } }).then(function(t3) {
  55730. i2.end(), Ve.l("".concat(n3, " ok"));
  55731. var o3 = t3.data.readReceiptList;
  55732. return at(o3) && o3.forEach(function(t4) {
  55733. e3.forEach(function(e4) {
  55734. 0 === t4.code && t4.sequence === e4.sequence && (e4.readReceiptInfo.readCount = t4.readCount, e4.readReceiptInfo.unreadCount = t4.unreadCount);
  55735. });
  55736. }), Ya({ messageList: e3 });
  55737. }).catch(function(e4) {
  55738. return t2.probeNetwork().then(function(t3) {
  55739. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  55740. i2.setError(e4, o3, s4).end();
  55741. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  55742. });
  55743. } }, { key: "sendReadReceipt", value: function(e3) {
  55744. var t2 = this, n3 = "".concat(this._n, ".").concat("sendReadReceipt"), o2 = this._getGroupIDOfMessage(e3[0]), s3 = new Aa("sendReadReceipt");
  55745. s3.setMessage("groupID:".concat(o2));
  55746. var a2 = this.getMyUserID(), i2 = e3.filter(function(e4) {
  55747. return e4.from !== a2 && true === e4.needReadReceipt;
  55748. }).map(function(e4) {
  55749. return { sequence: e4.sequence };
  55750. });
  55751. return 0 === i2.length ? Za({ code: ha.READ_RECEIPT_MESSAGE_LIST_EMPTY }) : (Ve.l("".concat(n3, ". sequenceList:").concat(JSON.stringify(i2))), this.request({ protocolName: ds, requestData: { groupID: o2, sequenceList: i2 } }).then(function(e4) {
  55752. return s3.end(), Ve.l("".concat(n3, " ok")), Ya();
  55753. }).catch(function(e4) {
  55754. return t2.probeNetwork().then(function(t3) {
  55755. var n4 = v(t3, 2), o3 = n4[0], a3 = n4[1];
  55756. s3.setError(e4, o3, a3).end();
  55757. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  55758. }));
  55759. } }, { key: "getReadReceiptDetail", value: function(e3) {
  55760. var t2 = this, n3 = e3.message, o2 = e3.filter, s3 = e3.cursor, a2 = e3.count, i2 = this._getGroupIDOfMessage(n3), r2 = n3.ID, u2 = n3.sequence, c2 = "".concat(this._n, ".").concat("getReadReceiptDetail"), l2 = this._receiptDetailCompleteMap.get(r2) || false, d2 = 0 !== o2 && 1 !== o2 ? 0 : o2, p2 = nt(s3) ? s3 : "", g2 = !et(a2) || a2 <= 0 || a2 >= 100 ? 100 : a2, h2 = "groupID:".concat(i2, " sequence:").concat(u2, " cursor:").concat(p2, " filter:").concat(d2, " completeFlag:").concat(l2);
  55761. Ve.l("".concat(c2, " ").concat(h2));
  55762. var _2 = { cursor: "", isCompleted: false, messageID: r2, unreadUserIDList: [], readUserIDList: [] }, f2 = new Aa("getReadReceiptDetail");
  55763. return f2.setMessage(h2), this.request({ protocolName: gs, requestData: { groupID: i2, sequence: u2, flag: d2, cursor: p2, count: g2 } }).then(function(e4) {
  55764. f2.end();
  55765. var n4 = e4.data, o3 = n4.cursor, s4 = n4.isCompleted, a3 = n4.unreadUserIDList, i3 = n4.readUserIDList;
  55766. return _2.cursor = o3, 1 === s4 && (_2.isCompleted = true, t2._receiptDetailCompleteMap.set(r2, true)), 0 === d2 ? _2.readUserIDList = i3.map(function(e5) {
  55767. return e5.userID;
  55768. }) : 1 === d2 && (_2.unreadUserIDList = a3.map(function(e5) {
  55769. return e5.userID;
  55770. })), Ve.l("".concat(c2, " ok")), Ya(_2);
  55771. }).catch(function(e4) {
  55772. return t2.probeNetwork().then(function(t3) {
  55773. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  55774. f2.setError(e4, o3, s4).end();
  55775. }), Ve.w("".concat(c2, " failed. error:"), e4), Za(e4);
  55776. });
  55777. } }, { key: "getRoamingMessagesHopping", value: function(e3) {
  55778. var t2 = this, n3 = "".concat(this._n, ".getRoamingMessagesHopping"), o2 = new Aa("getGroupRoamingMessagesHopping"), s3 = e3.groupID, a2 = e3.count, i2 = e3.sequence, r2 = e3.direction, u2 = i2;
  55779. 1 === r2 && (u2 = i2 + a2 - 1);
  55780. var c2 = void 0;
  55781. kt(s3) && (s3 = xt(c2 = s3));
  55782. var l2 = "".concat(c2 ? "topicID:".concat(c2) : "groupID:".concat(s3), " sequence:").concat(i2, " direction:").concat(r2);
  55783. return Ve.l("".concat(n3, " ").concat(l2)), this.request({ protocolName: cs, requestData: { groupID: s3, topicID: c2, count: a2, sequence: u2 } }).then(function(s4) {
  55784. var a3 = s4.data, u3 = a3.messageList, c3 = a3.complete, d2 = "complete:".concat(c3, " count:").concat(u3 ? u3.length : 0);
  55785. if (Ve.l("".concat(n3, " ok. ").concat(d2)), o2.setNetworkType(t2.getNetworkType()).setMessage("".concat(l2, " ").concat(d2)).end(), 2 === c3 || zt(u3)) {
  55786. var p2 = t2._computeResult();
  55787. return Ya(p2);
  55788. }
  55789. var g2 = "".concat(E.CONV_GROUP).concat(e3.groupID), h2 = t2.getModule(qn).onRoamingMessage(u3, g2, false), _2 = t2._computeResult({ direction: r2, sequence: i2, remoteMessageList: u3, processedMessageList: h2 });
  55790. return Ya(_2);
  55791. }).catch(function(e4) {
  55792. return t2.probeNetwork().then(function(t3) {
  55793. var n4 = v(t3, 2), r3 = n4[0], u3 = n4[1];
  55794. o2.setError(e4, r3, u3).setMessage("groupID:".concat(s3, " sequence:").concat(i2, " count:").concat(a2)).end();
  55795. }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
  55796. });
  55797. } }, { key: "_computeResult", value: function(e3) {
  55798. var t2 = { messageList: [], isCompleted: false, nextMessageSeq: "" };
  55799. if (it(e3))
  55800. return t2.isCompleted = true, t2;
  55801. var n3 = e3.direction, o2 = e3.sequence, s3 = e3.remoteMessageList, a2 = void 0 === s3 ? [] : s3, i2 = e3.processedMessageList, r2 = void 0 === i2 ? [] : i2, u2 = a2.length;
  55802. return 1 === n3 ? (t2.nextMessageSeq = a2[0].sequence + 1, r2.forEach(function(e4) {
  55803. e4.sequence >= o2 && t2.messageList.push(e4);
  55804. }), 0 === t2.messageList.length && a2[0].sequence < o2 && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2) : (t2.nextMessageSeq = a2[u2 - 1].sequence - 1, t2.messageList = m(r2), 0 === t2.nextMessageSeq && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2);
  55805. } }, { key: "setMessageRead", value: function(e3) {
  55806. var t2 = this, n3 = e3.conversationID, o2 = e3.lastMessageSeq, s3 = "".concat(this._n, ".setMessageRead");
  55807. Ve.l("".concat(s3, " conversationID:").concat(n3, " lastMessageSeq:").concat(o2)), et(o2) || this.outputWarning("DoNotModifyLastSeq");
  55808. var a2 = new Aa("setGroupMessageRead");
  55809. a2.setMessage("".concat(n3, "-").concat(o2));
  55810. var i2 = n3.replace(E.CONV_GROUP, ""), r2 = void 0;
  55811. return kt(i2) && (i2 = xt(r2 = i2)), this.request({ protocolName: rs, requestData: { groupID: i2, topicID: r2, messageReadSeq: o2 } }).then(function() {
  55812. a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok."));
  55813. var e4 = t2.getModule(qn);
  55814. e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageSeq: o2 });
  55815. var u2 = true;
  55816. if (!it(r2)) {
  55817. u2 = false;
  55818. var c2 = t2.getModule(Fn).getLocalTopic(i2, r2);
  55819. c2 && c2.updateSelfInfo({ readedSequence: o2 });
  55820. }
  55821. return e4.updateUnreadCount(n3, u2), Ya();
  55822. }).catch(function(e4) {
  55823. return t2.probeNetwork().then(function(t3) {
  55824. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  55825. a2.setError(e4, o3, s4).end();
  55826. }), Ve.l("".concat(s3, " failed. error:"), e4), Za(e4);
  55827. });
  55828. } }, { key: "_computeLastSequence", value: function(e3) {
  55829. var t2 = e3.groupID, n3 = e3.topicID, o2 = void 0 === n3 ? void 0 : n3, s3 = e3.sequence;
  55830. return s3 > 0 ? Promise.resolve(s3) : it(o2) || this.hasLocalGroup(t2) ? it(o2) ? this.getGroupLastSequence(t2) : this.getTopicLastSequence({ groupID: t2, topicID: o2 }) : Promise.resolve(0);
  55831. } }, { key: "getGroupLastSequence", value: function(e3) {
  55832. var t2 = this, n3 = "".concat(this._n, ".").concat("getGroupLastSequence"), o2 = new Aa("getGroupLastSequence"), s3 = 0, a2 = "";
  55833. if (this.hasLocalGroup(e3)) {
  55834. var i2 = this.getLocalGroupProfile(e3), r2 = i2.lastMessage;
  55835. if (r2.lastSequence > 0 && false === r2.onlineOnlyFlag)
  55836. return s3 = r2.lastSequence, a2 = "got lastSequence:".concat(s3, " from local group profile[lastMessage.lastSequence]. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2)), o2.setNetworkType(this.getNetworkType()).setMessage("".concat(a2)).end(), Promise.resolve(s3);
  55837. if (i2.nextMessageSeq > 1)
  55838. return s3 = i2.nextMessageSeq - 1, a2 = "got lastSequence:".concat(s3, " from local group profile[nextMessageSeq]. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2)), o2.setNetworkType(this.getNetworkType()).setMessage("".concat(a2)).end(), Promise.resolve(s3);
  55839. }
  55840. var u2 = "GROUP".concat(e3), c2 = this.getModule(qn).getLocalConversation(u2);
  55841. if (c2 && c2.lastMessage.lastSequence && false === c2.lastMessage.onlineOnlyFlag)
  55842. return s3 = c2.lastMessage.lastSequence, a2 = "got lastSequence:".concat(s3, " from local conversation profile[lastMessage.lastSequence]. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2)), o2.setNetworkType(this.getNetworkType()).setMessage("".concat(a2)).end(), Promise.resolve(s3);
  55843. var l2 = { groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } };
  55844. return this.getGroupProfileAdvance(l2).then(function(i3) {
  55845. var r3 = i3.data.successGroupList;
  55846. return zt(r3) ? Ve.l("".concat(n3, " successGroupList is empty. groupID:").concat(e3)) : (s3 = r3[0].nextMessageSeq - 1, a2 = "got lastSequence:".concat(s3, " from getGroupProfileAdvance. groupID:").concat(e3), Ve.l("".concat(n3, " ").concat(a2))), o2.setNetworkType(t2.getNetworkType()).setMessage("".concat(a2)).end(), s3;
  55847. }).catch(function(s4) {
  55848. return t2.probeNetwork().then(function(t3) {
  55849. var n4 = v(t3, 2), a3 = n4[0], i3 = n4[1];
  55850. o2.setError(s4, a3, i3).setMessage("get lastSequence failed from getGroupProfileAdvance. groupID:".concat(e3)).end();
  55851. }), Ve.w("".concat(n3, " failed. error:"), s4), Za(s4);
  55852. });
  55853. } }, { key: "getTopicLastSequence", value: function(e3) {
  55854. var t2 = this, n3 = e3.groupID, o2 = e3.topicID, s3 = "".concat(this._n, ".").concat("getTopicLastSequence"), a2 = new Aa("getTopicLastSequence"), i2 = 0, r2 = "", u2 = this.getModule(Fn);
  55855. return u2.hasLocalTopic(n3, o2) ? (i2 = u2.getLocalTopic(n3, o2).nextMessageSeq - 1, r2 = "get lastSequence:".concat(i2, " from local topic info[nextMessageSeq]. topicID:").concat(o2), Ve.l("".concat(s3, " ").concat(r2)), a2.setNetworkType(this.getNetworkType()).setMessage("".concat(r2)).end(), Promise.resolve(i2)) : u2.getTopicList({ groupID: n3, topicIDList: [o2] }).then(function(e4) {
  55856. var n4 = e4.data.successTopicList;
  55857. return zt(n4) ? Ve.l("".concat(s3, " successTopicList is empty. topicID:").concat(o2)) : (i2 = n4[0].nextMessageSeq - 1, r2 = "get lastSequence:".concat(i2, " from getTopicList. topicID:").concat(o2), Ve.l("".concat(s3, " ").concat(r2))), a2.setNetworkType(t2.getNetworkType()).setMessage("".concat(r2)).end(), i2;
  55858. }).catch(function(e4) {
  55859. return t2.probeNetwork().then(function(t3) {
  55860. var n4 = v(t3, 2), s4 = n4[0], i3 = n4[1];
  55861. a2.setError(e4, s4, i3).setMessage("get lastSequence failed from getTopicList. topicID:".concat(o2)).end();
  55862. }), Ve.w("".concat(s3, " failed. error:"), e4), Za(e4);
  55863. });
  55864. } }, { key: "isMessageFromOrToAVChatroom", value: function(e3) {
  55865. return !!this._AVChatRoomHandler && this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3);
  55866. } }, { key: "hasJoinedAVChatRoom", value: function() {
  55867. return this._AVChatRoomHandler ? this._AVChatRoomHandler.hasJoinedAVChatRoom() : 0;
  55868. } }, { key: "getJoinedAVChatRoom", value: function() {
  55869. return this._AVChatRoomHandler ? this._AVChatRoomHandler.getJoinedAVChatRoom() : [];
  55870. } }, { key: "isOnlineMessage", value: function(e3, t2) {
  55871. return !(!this._canIUseOnlineOnlyFlag(e3) || !t2 || true !== t2.onlineUserOnly);
  55872. } }, { key: "_canIUseOnlineOnlyFlag", value: function(e3) {
  55873. var t2 = this.getJoinedAVChatRoom();
  55874. return !t2 || !t2.includes(e3.to) || e3.conversationType !== E.CONV_GROUP;
  55875. } }, { key: "_onAVChatRoomHistoryMessage", value: function(e3) {
  55876. if (!zt(e3)) {
  55877. Ve.l("".concat(this._n, "._onAVChatRoomHistoryMessage count:").concat(e3.length));
  55878. var n3 = [];
  55879. e3.forEach(function(e4) {
  55880. n3.push(t(t({}, e4), {}, { isHistoryMessage: 1 }));
  55881. }), this.onAVChatRoomMessage(n3);
  55882. }
  55883. } }, { key: "onAVChatRoomMessage", value: function(e3) {
  55884. this._AVChatRoomHandler && this._AVChatRoomHandler.onMessage(e3);
  55885. } }, { key: "onAVChatRoomMemberBanned", value: function(e3) {
  55886. this._AVChatRoomHandler && this._AVChatRoomHandler.onAVChatRoomMemberBanned(e3);
  55887. } }, { key: "getGroupSimplifiedInfo", value: function(e3) {
  55888. var t2 = this, n3 = new Aa("getGroupSimplifiedInfo"), o2 = { groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["Type", "Name"] } };
  55889. return this.getGroupProfileAdvance(o2).then(function(o3) {
  55890. var s3 = o3.data.successGroupList;
  55891. return n3.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(e3, " type:").concat(s3[0].type)).end(), s3[0];
  55892. }).catch(function(o3) {
  55893. t2.probeNetwork().then(function(t3) {
  55894. var s3 = v(t3, 2), a2 = s3[0], i2 = s3[1];
  55895. n3.setError(o3, a2, i2).setMessage("groupID:".concat(e3)).end();
  55896. });
  55897. });
  55898. } }, { key: "setUnjoinedAVChatRoom", value: function(e3) {
  55899. this._unjoinedAVChatRoomList.set(e3, 1);
  55900. } }, { key: "deleteUnjoinedAVChatRoom", value: function(e3) {
  55901. this._unjoinedAVChatRoomList.has(e3) && this._unjoinedAVChatRoomList.delete(e3);
  55902. } }, { key: "isUnjoinedAVChatRoom", value: function(e3) {
  55903. return this._unjoinedAVChatRoomList.has(e3);
  55904. } }, { key: "isGroupAttributesUpdatedNotice", value: function(e3) {
  55905. return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e3);
  55906. } }, { key: "updateLocalMainSequenceOnReconnected", value: function() {
  55907. this._groupAttributesHandler.updateLocalMainSequenceOnReconnected();
  55908. } }, { key: "initGroupAttributes", value: function(e3) {
  55909. return this._groupAttributesHandler.initGroupAttributes(e3);
  55910. } }, { key: "setGroupAttributes", value: function(e3) {
  55911. return this._groupAttributesHandler.setGroupAttributes(e3);
  55912. } }, { key: "deleteGroupAttributes", value: function(e3) {
  55913. return this._groupAttributesHandler.deleteGroupAttributes(e3);
  55914. } }, { key: "getGroupAttributes", value: function(e3) {
  55915. return this._groupAttributesHandler.getGroupAttributes(e3);
  55916. } }, { key: "isMessageFromTopic", value: function(e3, t2) {
  55917. return 2 === e3 && !zt(t2);
  55918. } }, { key: "isMessageFromCommunityOfTopic", value: function(e3, t2) {
  55919. return 2 === e3 && zt(t2);
  55920. } }, { key: "getMessageExtensions", value: function(e3, t2) {
  55921. return Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.request({ protocolName: Ss, requestData: { groupID: e3.to, messageSequence: e3.sequence, startSequence: t2 } });
  55922. } }, { key: "modifyMessageExtensions", value: function(e3, t2) {
  55923. var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
  55924. return Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3)), this.request({ protocolName: Es, requestData: { groupID: e3.to, messageSequence: e3.sequence, extensionList: t2, operateType: n3 } });
  55925. } }, { key: "getGroupNotify", value: function(e3) {
  55926. var n3 = this;
  55927. if (this.hasLocalGroup(e3)) {
  55928. var o2 = this.getLocalGroupProfile(e3), s3 = o2.type, a2 = o2.isSupportTopic;
  55929. if (!Tt(s3) && !a2) {
  55930. var i2 = "".concat(this._n, ".getGroupNotify"), r2 = this._getGroupLastRevokedTime(e3), u2 = 1e3 * Pe();
  55931. Ve.l("".concat(i2, " groupID:").concat(e3, " type:").concat(s3, " beginTime:").concat(r2, " endTime:").concat(u2)), this.request({ protocolName: Ls, requestData: { type: Dt({ type: s3, groupID: e3 }) ? E.GRP_COMMUNITY : void 0, groupID: e3, beginTime: r2, endTime: u2 } }).then(function(o3) {
  55932. var s4 = o3.data, a3 = s4.nextRevokedTime, r3 = s4.notifyList;
  55933. Ve.l("".concat(i2, " ok. groupID:").concat(e3, " nextRevokedTime:").concat(a3));
  55934. var u3 = { dataList: [{ elements: { revokedInfos: [] } }] };
  55935. at(r3) && r3.forEach(function(n4) {
  55936. u3.dataList[0].elements.revokedInfos.push({ groupID: e3, sequence: n4.sequence, random: n4.random, revokerInfo: t({}, n4.revokerInfo) });
  55937. }), n3.onGroupMessageRevoked(u3), 0 !== a3 ? (n3._setGroupLastRevokedTime(e3, a3), n3.getGroupNotify(e3)) : n3._setGroupLastRevokedTime(e3, 1e3 * Pe());
  55938. }).catch(function(e4) {
  55939. Ve.e("".concat(i2, " failed. error:"), e4);
  55940. });
  55941. }
  55942. }
  55943. } }, { key: "_getGroupLastRevokedTime", value: function(e3) {
  55944. return this.hasLocalGroup(e3) ? this.getLocalGroupProfile(e3)._lastRevokedTime : 0;
  55945. } }, { key: "_setGroupLastRevokedTime", value: function(e3, t2) {
  55946. this.hasLocalGroup(e3) && (this.getLocalGroupProfile(e3)._lastRevokedTime = t2);
  55947. } }, { key: "isGroupCountersNotice", value: function(e3) {
  55948. return this._groupCountersHandler.isGroupCountersNotice(e3);
  55949. } }, { key: "setGroupCounters", value: function(e3) {
  55950. return this._groupCountersHandler.setGroupCounters(e3);
  55951. } }, { key: "increaseGroupCounter", value: function(e3) {
  55952. return this._groupCountersHandler.increaseGroupCounter(e3);
  55953. } }, { key: "decreaseGroupCounter", value: function(e3) {
  55954. return this._groupCountersHandler.decreaseGroupCounter(e3);
  55955. } }, { key: "getGroupCounters", value: function(e3) {
  55956. return this._groupCountersHandler.getGroupCounters(e3);
  55957. } }, { key: "restartPolling", value: function() {
  55958. this._AVChatRoomHandler && this._AVChatRoomHandler.restartPolling();
  55959. } }, { key: "getPollingTimerID", value: function(e3) {
  55960. if (!e3)
  55961. return -1;
  55962. var t2 = this.getLocalGroupProfile(e3);
  55963. return t2 && Tt(t2.type) ? this._AVChatRoomHandler.getPollingTimerID(e3) : -1;
  55964. } }, { key: "_canIUseJoinOption", value: function(e3) {
  55965. return function(e4) {
  55966. return e4 === E.GRP_PUBLIC;
  55967. }(e3) || Dt({ type: e3 });
  55968. } }, { key: "reset", value: function() {
  55969. this.groupMap.clear(), this._unjoinedAVChatRoomList.clear(), this._receiptDetailCompleteMap.clear(), this._commonGroupHandler.reset(), this._groupSystemNoticeHandler.reset(), this._groupTipsHandler.reset(), this._groupAttributesHandler.reset(), this._groupCountersHandler.reset(), this._AVChatRoomHandler && this._AVChatRoomHandler.reset();
  55970. } }]), s2;
  55971. }(uo), xi = function() {
  55972. function e2(t2) {
  55973. o(this, e2), this.userID = "", this.avatar = "", this.nick = "", this.role = "", this.joinTime = "", this.lastSendMsgTime = "", this.nameCard = "", this.muteUntil = 0, this.memberCustomField = [], this._initMember(t2);
  55974. }
  55975. return a(e2, [{ key: "_initMember", value: function(e3) {
  55976. this.updateMember(e3);
  55977. } }, { key: "updateMember", value: function(e3) {
  55978. var t2 = [null, void 0, "", 0, NaN];
  55979. e3.memberCustomField && Ct(this.memberCustomField, e3.memberCustomField), pt(this, e3, ["memberCustomField", "marks"], t2);
  55980. } }, { key: "updateRole", value: function(e3) {
  55981. ["Owner", "Admin", "Member"].indexOf(e3) < 0 || (this.role = e3);
  55982. } }, { key: "updateMuteUntil", value: function(e3) {
  55983. it(e3) || (this.muteUntil = Math.floor((Date.now() + 1e3 * e3) / 1e3));
  55984. } }, { key: "updateNameCard", value: function(e3) {
  55985. it(e3) || (this.nameCard = e3);
  55986. } }, { key: "updateMemberCustomField", value: function(e3) {
  55987. e3 && Ct(this.memberCustomField, e3);
  55988. } }]), e2;
  55989. }(), Vi = function(e2) {
  55990. r(s2, e2);
  55991. var n2 = f(s2);
  55992. function s2(e3) {
  55993. var t2;
  55994. return o(this, s2), (t2 = n2.call(this, e3))._n = "GroupMemberModule", t2.groupMemberListMap = /* @__PURE__ */ new Map(), t2.getInnerEmitterInstance().on(ni, t2._onProfileUpdated, h(t2)), t2;
  55995. }
  55996. return a(s2, [{ key: "_onProfileUpdated", value: function(e3) {
  55997. for (var t2 = this, n3 = e3.data, o2 = function(e4) {
  55998. var o3 = n3[e4];
  55999. t2.groupMemberListMap.forEach(function(e5) {
  56000. e5.has(o3.userID) && e5.get(o3.userID).updateMember({ nick: o3.nick, avatar: o3.avatar });
  56001. });
  56002. }, s3 = 0; s3 < n3.length; s3++)
  56003. o2(s3);
  56004. } }, { key: "deleteGroupMemberList", value: function(e3) {
  56005. this.groupMemberListMap.delete(e3);
  56006. } }, { key: "getGroupMemberList", value: function(e3) {
  56007. var t2 = this, n3 = e3.groupID, o2 = e3.offset, s3 = void 0 === o2 ? 0 : o2, a2 = e3.count, i2 = void 0 === a2 ? 15 : a2, r2 = e3.filter, u2 = void 0 === r2 ? void 0 : r2, c2 = "".concat(this._n, ".").concat("getGroupMemberList"), l2 = this.getModule(Pn), d2 = l2.hasLocalGroup(n3);
  56008. if (Ve.l("".concat(c2, " groupID:").concat(n3, " offset:").concat(s3, " count:").concat(i2, " hasLocalGroup:").concat(d2)), !d2)
  56009. return Xa({ memberList: [], offset: 0 });
  56010. if (l2.getLocalGroupProfile(n3).type === E.GRP_AVCHATROOM) {
  56011. if (this.canIUse(B.AVCHATROOM_MBR_LIST))
  56012. return this._getAVChatRoomMemberList({ groupID: n3, offset: s3, filter: u2 });
  56013. this.outputWarning("LiveOnlineMember");
  56014. }
  56015. var p2 = new Aa("getGroupMemberList"), g2 = 0, h2 = { groupID: n3, limit: i2 > 100 ? 100 : i2 };
  56016. Dt({ groupID: n3 }) ? h2.next = "".concat(s3) : (h2.offset = s3, g2 = s3 + i2);
  56017. var _2 = [];
  56018. return this.request({ protocolName: Ns, requestData: h2 }).then(function(e4) {
  56019. var o3 = e4.data, s4 = o3.members, a3 = o3.memberNum, i3 = o3.next, r3 = void 0 === i3 ? void 0 : i3;
  56020. if (it(r3) || (g2 = zt(r3) ? 0 : r3), !at(s4) || 0 === s4.length)
  56021. return g2 = 0, Promise.resolve([]);
  56022. var u3 = t2.getModule(Pn);
  56023. return u3.hasLocalGroup(n3) && (u3.getLocalGroupProfile(n3).memberNum = a3), _2 = t2._updateLocalGroupMemberMap(n3, s4), t2.getModule(Gn).getUserProfile({ userIDList: s4.map(function(e5) {
  56024. return e5.userID;
  56025. }), tagList: [He.NICK, He.AVATAR] });
  56026. }).then(function(e4) {
  56027. var o3 = e4.data;
  56028. if (!at(o3) || 0 === o3.length)
  56029. return Xa({ memberList: [], offset: g2 });
  56030. var a3 = o3.map(function(e5) {
  56031. return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar };
  56032. });
  56033. return t2._updateLocalGroupMemberMap(n3, a3), _2.length < i2 && (g2 = 0), p2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(n3, " offset:").concat(s3, " count:").concat(i2)).end(), Ve.l("".concat(c2, " ok.")), Ya({ memberList: _2, offset: g2 });
  56034. }).catch(function(e4) {
  56035. return t2.probeNetwork().then(function(t3) {
  56036. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56037. p2.setError(e4, o3, s4).end();
  56038. }), Ve.e("".concat(c2, " failed. error:"), e4), Za(e4);
  56039. });
  56040. } }, { key: "_getAVChatRoomMemberList", value: function(e3) {
  56041. var t2 = this, n3 = e3.groupID, o2 = e3.offset, s3 = e3.filter, a2 = "".concat(this._n, ".").concat("_getAVChatRoomMemberList"), i2 = new Aa("_getAVChatRoomMemberList");
  56042. return i2.setMessage("groupID:".concat(n3, " offset:").concat(o2, " filter:").concat(s3)), this.request({ protocolName: Os, requestData: { groupID: n3, offset: o2, filter: s3 } }).then(function(e4) {
  56043. var o3 = e4.data, s4 = o3.memberList, r2 = void 0 === s4 ? [] : s4, u2 = o3.offset, c2 = void 0 === u2 ? 0 : u2;
  56044. i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok. member count:").concat(r2.length, ", next request timestamp:").concat(c2));
  56045. var l2 = t2._updateLocalGroupMemberMap(n3, r2);
  56046. return Ya({ memberList: l2, offset: c2 });
  56047. }).catch(function(e4) {
  56048. return t2.probeNetwork().then(function(t3) {
  56049. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56050. i2.setError(e4, o3, s4).end();
  56051. }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4);
  56052. });
  56053. } }, { key: "getGroupMemberProfile", value: function(e3) {
  56054. var n3 = this, o2 = "".concat(this._n, ".").concat("getGroupMemberProfile"), s3 = new Aa("getGroupMemberProfile");
  56055. s3.setMessage(e3.userIDList.length > 5 ? "userIDList.length:".concat(e3.userIDList.length) : "userIDList:".concat(e3.userIDList)), Ve.l("".concat(o2, " groupID:").concat(e3.groupID, " userIDList:").concat(e3.userIDList.join(","))), e3.userIDList.length > 50 && (e3.userIDList = e3.userIDList.slice(0, 50));
  56056. var a2 = e3.groupID, i2 = e3.userIDList;
  56057. return this._getGroupMemberProfileAdvance(t(t({}, e3), {}, { userIDList: i2 })).then(function(e4) {
  56058. var t2 = e4.data.members;
  56059. return at(t2) && 0 !== t2.length ? (n3._updateLocalGroupMemberMap(a2, t2), n3.getModule(Gn).getUserProfile({ userIDList: t2.map(function(e5) {
  56060. return e5.userID;
  56061. }), tagList: [He.NICK, He.AVATAR] })) : Xa([]);
  56062. }).then(function(e4) {
  56063. var t2 = e4.data.map(function(e5) {
  56064. return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar };
  56065. });
  56066. n3._updateLocalGroupMemberMap(a2, t2);
  56067. var o3 = i2.filter(function(e5) {
  56068. return n3.hasLocalGroupMember(a2, e5);
  56069. }).map(function(e5) {
  56070. return n3.getLocalGroupMemberInfo(a2, e5);
  56071. });
  56072. return s3.setNetworkType(n3.getNetworkType()).end(), Ya({ memberList: o3 });
  56073. });
  56074. } }, { key: "addGroupMember", value: function(e3) {
  56075. var t2 = this, n3 = "".concat(this._n, ".").concat("addGroupMember"), o2 = e3.groupID, s3 = this.getModule(Pn).getLocalGroupProfile(o2), a2 = s3.type, i2 = new Aa("addGroupMember");
  56076. if (i2.setMessage("groupID:".concat(o2, " groupType:").concat(a2)), Tt(a2)) {
  56077. var r2 = new ja({ code: ha.CANNOT_ADD_MEMBER_IN_AVCHATROOM });
  56078. return i2.setError(r2, true, this.getNetworkType()).end(), Za(r2);
  56079. }
  56080. return e3.userIDList = e3.userIDList.map(function(e4) {
  56081. return { userID: e4 };
  56082. }), Ve.l("".concat(n3, " groupID:").concat(o2)), this.request({ protocolName: Us, requestData: e3 }).then(function(o3) {
  56083. var a3 = o3.data.members;
  56084. Ve.l("".concat(n3, " ok"));
  56085. var r3 = a3.filter(function(e4) {
  56086. return 1 === e4.result;
  56087. }).map(function(e4) {
  56088. return e4.userID;
  56089. }), u2 = a3.filter(function(e4) {
  56090. return 0 === e4.result;
  56091. }).map(function(e4) {
  56092. return e4.userID;
  56093. }), c2 = a3.filter(function(e4) {
  56094. return 2 === e4.result;
  56095. }).map(function(e4) {
  56096. return e4.userID;
  56097. }), l2 = a3.filter(function(e4) {
  56098. return 4 === e4.result;
  56099. }).map(function(e4) {
  56100. return e4.userID;
  56101. }), d2 = "groupID:".concat(e3.groupID, ", ") + "successUserIDList:".concat(r3, ", ") + "failureUserIDList:".concat(u2, ", ") + "existedUserIDList:".concat(c2, ", ") + "overLimitUserIDList:".concat(l2);
  56102. return i2.setNetworkType(t2.getNetworkType()).setMoreMessage(d2).end(), 0 === r3.length ? Ya({ successUserIDList: r3, failureUserIDList: u2, existedUserIDList: c2, overLimitUserIDList: l2 }) : (s3.memberCount += r3.length, t2._updateConversationGroupProfile(s3), Ya({ successUserIDList: r3, failureUserIDList: u2, existedUserIDList: c2, overLimitUserIDList: l2, group: s3 }));
  56103. }).catch(function(e4) {
  56104. return t2.probeNetwork().then(function(t3) {
  56105. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56106. i2.setError(e4, o3, s4).end();
  56107. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56108. });
  56109. } }, { key: "deleteGroupMember", value: function(e3) {
  56110. var t2 = this, n3 = "".concat(this._n, ".").concat("deleteGroupMember"), o2 = e3.groupID, s3 = e3.userIDList, a2 = this.getModule(Pn).getLocalGroupProfile(o2);
  56111. if (it(a2))
  56112. return Za({ code: ha.CANNOT_FIND_GROUP });
  56113. if (Tt(a2.type))
  56114. return this.canIUse(B.AVCHATROOM_BAN_MBR) ? this._banAVChatRoomMember(e3) : Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  56115. var i2 = new Aa("deleteGroupMember"), r2 = "groupID:".concat(o2, " ").concat(s3.length > 5 ? "userIDList.length:".concat(s3.length) : "userIDList:".concat(s3));
  56116. return i2.setMessage(r2), Ve.l("".concat(n3, " groupID:").concat(o2, " userIDList:"), s3), this.request({ protocolName: Ps, requestData: e3 }).then(function() {
  56117. return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), a2.memberCount -= 1, t2._updateConversationGroupProfile(a2), t2.deleteLocalGroupMembers(o2, s3), Ya({ group: a2, userIDList: s3 });
  56118. }).catch(function(e4) {
  56119. return t2.probeNetwork().then(function(t3) {
  56120. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56121. i2.setError(e4, o3, s4).end();
  56122. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56123. });
  56124. } }, { key: "_updateConversationGroupProfile", value: function(e3) {
  56125. this.getModule(qn).updateConversationGroupProfile([e3]);
  56126. } }, { key: "_banAVChatRoomMember", value: function(e3) {
  56127. var t2 = this, n3 = "".concat(this._n, ".").concat("deleteGroupMember"), o2 = e3.groupID, s3 = e3.userIDList, a2 = "groupID:".concat(o2, " ").concat(s3.length > 5 ? "userIDList.length:".concat(s3.length) : "userIDList:".concat(s3)), i2 = new Aa("deleteGroupMember");
  56128. i2.setMessage(a2), Ve.l("".concat(n3, " groupID:").concat(o2, " userIDList:"), s3);
  56129. var r2 = this.getModule(Pn).getLocalGroupProfile(o2);
  56130. return it(e3.duration) || 0 === e3.duration ? Za({ code: ha.BAN_DURATION_INVALID }) : this.request({ protocolName: bs, requestData: e3 }).then(function() {
  56131. return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupMembers(o2, s3), Ya({ group: r2, userIDList: s3 });
  56132. }).catch(function(e4) {
  56133. return t2.probeNetwork().then(function(t3) {
  56134. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56135. i2.setError(e4, o3, s4).end();
  56136. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56137. });
  56138. } }, { key: "setGroupMemberMuteTime", value: function(e3) {
  56139. var t2 = this, n3 = e3.groupID, o2 = e3.userID, s3 = e3.muteTime, a2 = "".concat(this._n, ".").concat("setGroupMemberMuteTime");
  56140. if (o2 === this.getMyUserID())
  56141. return Za(new ja({ code: ha.CANNOT_MUTE_SELF }));
  56142. Ve.l("".concat(a2, " groupID:").concat(n3, " userID:").concat(o2));
  56143. var i2 = new Aa("setGroupMemberMuteTime");
  56144. return i2.setMessage("groupID:".concat(n3, " userID:").concat(o2, " muteTime:").concat(s3)), this.modifyGroupMemberInfo({ groupID: n3, userID: o2, muteTime: s3 }).then(function(e4) {
  56145. i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok"));
  56146. var o3 = t2.getModule(Pn);
  56147. return Ya({ group: o3.getLocalGroupProfile(n3), member: e4 });
  56148. }).catch(function(e4) {
  56149. return t2.probeNetwork().then(function(t3) {
  56150. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56151. i2.setError(e4, o3, s4).end();
  56152. }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4);
  56153. });
  56154. } }, { key: "setGroupMemberRole", value: function(e3) {
  56155. var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberRole"), o2 = e3.groupID, s3 = e3.userID, a2 = e3.role, i2 = this.getModule(Pn).getLocalGroupProfile(o2);
  56156. if (i2.selfInfo.role !== E.GRP_MBR_ROLE_OWNER)
  56157. return Za({ code: ha.NOT_OWNER });
  56158. if ([E.GRP_WORK, E.GRP_AVCHATROOM].includes(i2.type))
  56159. return Za({ code: ha.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM });
  56160. var r2 = [E.GRP_MBR_ROLE_ADMIN, E.GRP_MBR_ROLE_MEMBER];
  56161. if (Dt({ groupID: o2 }) && r2.push(E.GRP_MBR_ROLE_CUSTOM), r2.indexOf(a2) < 0)
  56162. return Za({ code: ha.INVALID_MEMBER_ROLE });
  56163. if (s3 === this.getMyUserID())
  56164. return Za({ code: ha.CANNOT_SET_SELF_MEMBER_ROLE });
  56165. var u2 = new Aa("setGroupMemberRole");
  56166. return u2.setMessage("groupID:".concat(o2, " userID:").concat(s3, " role:").concat(a2)), Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(s3)), this.modifyGroupMemberInfo({ groupID: o2, userID: s3, role: a2 }).then(function(e4) {
  56167. return u2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), Ya({ group: i2, member: e4 });
  56168. }).catch(function(e4) {
  56169. return t2.probeNetwork().then(function(t3) {
  56170. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56171. u2.setError(e4, o3, s4).end();
  56172. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56173. });
  56174. } }, { key: "_filterProfanity", value: function(e3, t2) {
  56175. var n3 = this.getModule(oo);
  56176. if (!n3)
  56177. return true;
  56178. var o2 = n3.filterText(t2[e3], J), s3 = o2.isAllowedToSend, a2 = o2.modifiedText;
  56179. return true === s3 && (t2[e3] = a2, true);
  56180. } }, { key: "setGroupMemberNameCard", value: function(e3) {
  56181. var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberNameCard");
  56182. if (e3.nameCard && false === this._filterProfanity("nameCard", e3))
  56183. return Za({ code: ha.PROFANITY_FOUND });
  56184. var o2 = e3.groupID, s3 = e3.userID, a2 = void 0 === s3 ? this.getMyUserID() : s3, i2 = e3.nameCard;
  56185. Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(a2));
  56186. var r2 = new Aa("setGroupMemberNameCard");
  56187. return r2.setMessage("groupID:".concat(o2, " userID:").concat(a2, " nameCard:").concat(i2)), this.modifyGroupMemberInfo({ groupID: o2, userID: a2, nameCard: i2 }).then(function(e4) {
  56188. Ve.l("".concat(n3, " ok")), r2.setNetworkType(t2.getNetworkType()).end();
  56189. var s4 = t2.getModule(Pn).getLocalGroupProfile(o2);
  56190. return a2 === t2.getMyUserID() && s4 && s4.setSelfNameCard(i2), Ya({ group: s4, member: e4 });
  56191. }).catch(function(e4) {
  56192. return t2.probeNetwork().then(function(t3) {
  56193. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56194. r2.setError(e4, o3, s4).end();
  56195. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56196. });
  56197. } }, { key: "setGroupMemberCustomField", value: function(e3) {
  56198. var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberCustomField"), o2 = e3.groupID, s3 = e3.userID, a2 = void 0 === s3 ? this.getMyUserID() : s3, i2 = e3.memberCustomField;
  56199. Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(a2));
  56200. var r2 = new Aa("setGroupMemberCustomField");
  56201. return r2.setMessage("groupID:".concat(o2, " userID:").concat(a2, " memberCustomField:").concat(JSON.stringify(i2))), this.modifyGroupMemberInfo({ groupID: o2, userID: a2, memberCustomField: i2 }).then(function(e4) {
  56202. r2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok"));
  56203. var s4 = t2.getModule(Pn).getLocalGroupProfile(o2);
  56204. return Ya({ group: s4, member: e4 });
  56205. }).catch(function(e4) {
  56206. return t2.probeNetwork().then(function(t3) {
  56207. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56208. r2.setError(e4, o3, s4).end();
  56209. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56210. });
  56211. } }, { key: "modifyGroupMemberInfo", value: function(e3) {
  56212. var n3 = this, o2 = e3.groupID, s3 = e3.userID, a2 = void 0;
  56213. return kt(o2) && (o2 = xt(a2 = o2)), this.request({ protocolName: ws, requestData: t(t({}, e3), {}, { groupID: o2, topicID: a2 }) }).then(function() {
  56214. if (n3.hasLocalGroupMember(o2, s3)) {
  56215. var t2 = n3.getLocalGroupMemberInfo(o2, s3);
  56216. return it(e3.muteTime) || t2.updateMuteUntil(e3.muteTime), it(e3.role) || t2.updateRole(e3.role), it(e3.nameCard) || t2.updateNameCard(e3.nameCard), it(e3.memberCustomField) || t2.updateMemberCustomField(e3.memberCustomField), t2;
  56217. }
  56218. return n3.getGroupMemberProfile({ groupID: o2, userIDList: [s3] }).then(function(e4) {
  56219. return v(e4.data.memberList, 1)[0];
  56220. });
  56221. });
  56222. } }, { key: "markGroupMemberList", value: function(e3) {
  56223. var t2 = this, n3 = "".concat(this._n, ".").concat("markGroupMemberList"), o2 = e3.groupID, s3 = e3.markType, a2 = e3.enableMark, i2 = e3.userIDList, r2 = void 0 === i2 ? [] : i2, u2 = "groupID:".concat(o2, " markType:").concat(s3, " enableMark:").concat(a2, " userIDList count: ").concat(r2.length);
  56224. Ve.l("".concat(n3, " ").concat(u2));
  56225. var c2 = 2, l2 = [];
  56226. true === a2 && (c2 = 1);
  56227. var d2 = m(r2);
  56228. r2.length > 500 && (d2 = r2.slice(0, 500), Ve.w("".concat(n3, " ").concat(Wt(500)))), d2.forEach(function(e4) {
  56229. l2.push({ userID: e4, markType: [s3] });
  56230. }), d2 = null;
  56231. var p2 = new Aa("markGroupMemberList");
  56232. return p2.setMessage("".concat(u2)), this.request({ protocolName: Fs, requestData: { groupID: o2, operationType: c2, memberList: l2 } }).then(function(e4) {
  56233. var o3 = e4.data.memberList, s4 = void 0 === o3 ? [] : o3, a3 = [], i3 = [];
  56234. s4.length === r2.length ? a3.push.apply(a3, m(r2)) : (s4.forEach(function(e5) {
  56235. a3.push(e5.userID);
  56236. }), r2.forEach(function(e5) {
  56237. a3.includes(e5) || i3.push(e5);
  56238. }));
  56239. var u3 = "success count:".concat(a3.length, " fail count:").concat(i3.length);
  56240. return p2.setNetworkType(t2.getNetworkType()).setMessage(u3).end(), Ve.l("".concat(n3, " ok. ").concat(u3)), Ya({ successUserIDList: a3, failureUserIDList: i3 });
  56241. }).catch(function(e4) {
  56242. return t2.probeNetwork().then(function(t3) {
  56243. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56244. p2.setError(e4, o3, s4).end();
  56245. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56246. });
  56247. } }, { key: "_getGroupMemberProfileAdvance", value: function(e3) {
  56248. return this.request({ protocolName: Gs, requestData: t(t({}, e3), {}, { memberInfoFilter: e3.memberInfoFilter ? e3.memberInfoFilter : ["Role", "JoinTime", "NameCard", "ShutUpUntil"] }) });
  56249. } }, { key: "_updateLocalGroupMemberMap", value: function(e3, t2) {
  56250. var n3 = this;
  56251. return at(t2) && 0 !== t2.length ? t2.map(function(t3) {
  56252. return n3.hasLocalGroupMember(e3, t3.userID) ? n3.getLocalGroupMemberInfo(e3, t3.userID).updateMember(t3) : n3.setLocalGroupMember(e3, new xi(t3)), n3.getLocalGroupMemberInfo(e3, t3.userID);
  56253. }) : [];
  56254. } }, { key: "deleteLocalGroupMembers", value: function(e3, t2) {
  56255. var n3 = this.groupMemberListMap.get(e3);
  56256. n3 && t2.forEach(function(e4) {
  56257. n3.delete(e4);
  56258. });
  56259. } }, { key: "getLocalGroupMemberInfo", value: function(e3, t2) {
  56260. return this.groupMemberListMap.has(e3) ? this.groupMemberListMap.get(e3).get(t2) : null;
  56261. } }, { key: "setLocalGroupMember", value: function(e3, t2) {
  56262. if (this.groupMemberListMap.has(e3))
  56263. this.groupMemberListMap.get(e3).set(t2.userID, t2);
  56264. else {
  56265. var n3 = (/* @__PURE__ */ new Map()).set(t2.userID, t2);
  56266. this.groupMemberListMap.set(e3, n3);
  56267. }
  56268. } }, { key: "getLocalGroupMemberList", value: function(e3) {
  56269. return this.groupMemberListMap.get(e3);
  56270. } }, { key: "hasLocalGroupMember", value: function(e3, t2) {
  56271. return this.groupMemberListMap.has(e3) && this.groupMemberListMap.get(e3).has(t2);
  56272. } }, { key: "hasLocalGroupMemberMap", value: function(e3) {
  56273. return this.groupMemberListMap.has(e3);
  56274. } }, { key: "reset", value: function() {
  56275. this.groupMemberListMap.clear();
  56276. } }]), s2;
  56277. }(uo), Bi = ["topicID", "topicName", "avatar", "introduction", "notification", "unreadCount", "muteAllMembers", "customData", "groupAtInfoList", "nextMessageSeq", "selfInfo"], Hi = function(e2, t2) {
  56278. return zt(e2) ? { lastTime: 0, lastSequence: 0, fromAccount: "", payload: null, type: "", messageForShow: "", nick: "", version: 0, cloudCustomData: "", isRevoked: false, revoker: null } : { lastTime: e2.time || 0, lastSequence: e2.sequence || 0, fromAccount: e2.from || "", payload: e2.payload || null, type: e2.type || "", messageForShow: Vt(e2.type, e2.payload, t2), nick: e2.nick || "", version: e2.version || 0, cloudCustomData: e2.cloudCustomData || "", isRevoked: e2.isRevoked || false, revoker: e2.revoker || null };
  56279. }, Ki = function() {
  56280. function e2(t2, n2) {
  56281. o(this, e2), this.topicID = "", this.topicName = "", this.avatar = "", this.introduction = "", this.notification = "", this.unreadCount = 0, this.muteAllMembers = false, this.customData = "", this.groupAtInfoList = [], this.nextMessageSeq = 0, this.lastMessage = Hi(t2.lastMessage, n2), this.selfInfo = { muteTime: 0, readedSequence: 0, messageRemindType: "", excludedUnreadSequenceList: void 0 }, this._initTopic(t2);
  56282. }
  56283. return a(e2, [{ key: "_initTopic", value: function(e3) {
  56284. for (var t2 in e3)
  56285. Bi.indexOf(t2) < 0 || ("selfInfo" === t2 ? this.updateSelfInfo(e3[t2]) : this[t2] = "muteAllMembers" === t2 ? 1 === e3[t2] : e3[t2]);
  56286. } }, { key: "updateUnreadCount", value: function() {
  56287. var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
  56288. this.unreadCount = e3;
  56289. } }, { key: "updateNextMessageSeq", value: function(e3) {
  56290. this.nextMessageSeq = e3;
  56291. } }, { key: "updateLastMessage", value: function(e3) {
  56292. this.lastMessage = Hi(e3);
  56293. } }, { key: "updateGroupAtInfoList", value: function(e3) {
  56294. this.groupAtInfoList = JSON.parse(JSON.stringify(e3));
  56295. } }, { key: "updateTopic", value: function(e3) {
  56296. it(e3.selfInfo) || this.updateSelfInfo(e3.selfInfo), it(e3.muteAllMembers) || (this.muteAllMembers = 1 === e3.muteAllMembers), pt(this, e3, ["groupID", "lastMessageTime", "selfInfo", "muteAllMembers", "lastMsg"]);
  56297. } }, { key: "updateSelfInfo", value: function(e3) {
  56298. return 0 !== pt(this.selfInfo, e3, [], [""]);
  56299. } }, { key: "reduceUnreadCount", value: function() {
  56300. return this.unreadCount >= 1 && (this.unreadCount -= 1, true);
  56301. } }, { key: "isLastMessageRevoked", value: function(e3) {
  56302. return e3.sequence === this.lastMessage.lastSequence;
  56303. } }, { key: "setLastMessageRevoked", value: function(e3) {
  56304. this.lastMessage.isRevoked = e3;
  56305. } }, { key: "setLastMessageRevoker", value: function(e3) {
  56306. this.lastMessage.revoker = e3;
  56307. } }]), e2;
  56308. }(), Wi = function(e2) {
  56309. r(s2, e2);
  56310. var n2 = f(s2);
  56311. function s2(e3) {
  56312. var t2;
  56313. return o(this, s2), (t2 = n2.call(this, e3))._n = "TopicModule", t2._topicMap = /* @__PURE__ */ new Map(), t2._getTopicTimeMap = /* @__PURE__ */ new Map(), t2.TOPIC_CACHE_TIME = 300, t2.TOPIC_LAST_ACTIVE_TIME = 3600, t2.getInnerEmitterInstance().on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
  56314. }
  56315. return a(s2, [{ key: "_onCloudConfigUpdated", value: function() {
  56316. var e3 = this.getCloudConfig("topic_cache_time"), t2 = this.getCloudConfig("topic_last_active_time");
  56317. it(e3) || (this.TOPIC_CACHE_TIME = Number(e3)), it(t2) || (this.TOPIC_LAST_ACTIVE_TIME = Number(t2));
  56318. } }, { key: "onTopicCreated", value: function(e3) {
  56319. var t2 = e3.groupID;
  56320. this.resetGetTopicTime(t2), this.emitOuterEvent(k.TOPIC_CREATED, e3);
  56321. } }, { key: "onTopicDeleted", value: function(e3) {
  56322. var t2 = this, n3 = e3.groupID, o2 = e3.topicIDList;
  56323. (void 0 === o2 ? [] : o2).forEach(function(e4) {
  56324. t2._deleteLocalTopic(n3, e4);
  56325. }), this.emitOuterEvent(k.TOPIC_DELETED, e3);
  56326. } }, { key: "onTopicMessageRemindTypeUpdated", value: function(e3) {
  56327. var t2 = e3.groupID, n3 = e3.topicID, o2 = e3.messageRemindType, s3 = this.getLocalTopic(t2, n3);
  56328. if (s3) {
  56329. var a2 = s3.updateSelfInfo({ messageRemindType: o2 });
  56330. a2 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: s3 }), Ve.d("".concat(this._n, ".onTopicMessageRemindTypeUpdated topicID:").concat(n3) + " messageRemindType:".concat(o2, " isTopicUpdated:").concat(a2));
  56331. }
  56332. } }, { key: "onTopicProfileUpdated", value: function(e3) {
  56333. var t2 = e3.groupID, n3 = e3.topicID, o2 = this.getLocalTopic(t2, n3);
  56334. o2 && (o2.updateTopic(e3), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: o2 }));
  56335. } }, { key: "onConversationProxy", value: function(e3) {
  56336. var t2 = e3.topicID, n3 = e3.unreadCount, o2 = e3.groupAtInfoList, s3 = xt(t2), a2 = this.getLocalTopic(s3, t2), i2 = false;
  56337. a2 && (it(n3) || a2.unreadCount === n3 || (a2.updateUnreadCount(n3), i2 = true), it(o2) || (a2.updateGroupAtInfoList(o2), i2 = true)), i2 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: s3, topic: a2 });
  56338. } }, { key: "onMessageSent", value: function(e3) {
  56339. var t2 = e3.groupID, n3 = e3.topicID, o2 = e3.lastMessage, s3 = this.getLocalTopic(t2, n3);
  56340. s3 && (s3.nextMessageSeq += 1, s3.updateLastMessage(o2), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: s3 }));
  56341. } }, { key: "onMessageModified", value: function(e3) {
  56342. var t2 = e3.to, n3 = e3.time, o2 = e3.sequence, s3 = e3.elements, a2 = e3.cloudCustomData, i2 = e3.messageVersion, r2 = xt(t2), u2 = this.getLocalTopic(r2, t2);
  56343. if (u2) {
  56344. var c2 = u2.lastMessage;
  56345. Ve.d("".concat(this._n, ".onMessageModified topicID:").concat(t2, " lastMessage:"), JSON.stringify(c2), "options:", JSON.stringify(e3)), c2 && (null === c2.payload || c2.lastTime === n3 && c2.lastSequence === o2 && c2.version !== i2) && (c2.type = s3[0].type, c2.payload = s3[0].content, c2.messageForShow = Vt(c2.type, c2.payload, this.isIntl()), c2.cloudCustomData = a2, c2.version = i2, c2.lastSequence = o2, c2.lastTime = n3, this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: r2, topic: u2 }));
  56346. }
  56347. } }, { key: "onMessageRevoked", value: function(e3) {
  56348. var t2 = this;
  56349. if (0 !== e3.length) {
  56350. var n3 = null, o2 = null, s3 = false;
  56351. e3.forEach(function(e4) {
  56352. var a2 = e4.to;
  56353. o2 = xt(a2), (n3 = t2.getLocalTopic(o2, a2)) && (n3.reduceUnreadCount() && (s3 = true), n3.isLastMessageRevoked(e4) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), s3 = true));
  56354. }), s3 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: o2, topic: n3 });
  56355. }
  56356. } }, { key: "isLastMessageRevoked", value: function(e3) {
  56357. var t2 = e3.topicID, n3 = e3.sequence, o2 = xt(t2), s3 = this.getLocalTopic(o2, t2), a2 = false;
  56358. return s3 && (a2 = s3.isLastMessageRevoked({ sequence: n3 })), a2;
  56359. } }, { key: "getJoinedCommunityList", value: function() {
  56360. return this.getModule(Pn).getGroupList({ isGroupWithTopicOnly: true }).then(function(e3) {
  56361. var t2 = e3.data.groupList;
  56362. return Ya({ groupList: void 0 === t2 ? [] : t2 });
  56363. }).catch(function(e3) {
  56364. return Za(e3);
  56365. });
  56366. } }, { key: "createTopicInCommunity", value: function(e3) {
  56367. var n3 = this, o2 = "".concat(this._n, ".").concat("createTopicInCommunity"), s3 = e3.topicID;
  56368. if (!it(s3) && !kt(s3))
  56369. return Za({ code: ha.ILLEGAL_TOPIC_ID });
  56370. if (e3.topicName && false === this._filterProfanity("topicName", e3))
  56371. return Za({ code: ha.PROFANITY_FOUND });
  56372. if (e3.introduction && false === this._filterProfanity("introduction", e3))
  56373. return Za({ code: ha.PROFANITY_FOUND });
  56374. if (e3.notification && false === this._filterProfanity("notification", e3))
  56375. return Za({ code: ha.PROFANITY_FOUND });
  56376. var a2 = new Aa("createTopicInCommunity");
  56377. return this.request({ protocolName: ta, requestData: t({}, e3) }).then(function(s4) {
  56378. var i2 = s4.data.topicID;
  56379. return a2.setMessage("topicID:".concat(i2)).setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._updateTopicMap([t(t({}, e3), {}, { topicID: i2 })]), Ya({ topicID: i2 });
  56380. }).catch(function(e4) {
  56381. return n3.probeNetwork().then(function(t2) {
  56382. var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
  56383. a2.setError(e4, o3, s4).end();
  56384. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  56385. });
  56386. } }, { key: "deleteTopicFromCommunity", value: function(e3) {
  56387. var t2 = this, n3 = "".concat(this._n, ".").concat("deleteTopicFromCommunity"), o2 = e3.groupID, s3 = e3.topicIDList, a2 = void 0 === s3 ? [] : s3, i2 = new Aa("deleteTopicFromCommunity");
  56388. return i2.setMessage("groupID:".concat(o2, " topicIDList:").concat(a2)), this.request({ protocolName: na, requestData: { groupID: o2, topicIDList: a2 } }).then(function(e4) {
  56389. var n4 = e4.data.resultList, s4 = [], a3 = [];
  56390. (void 0 === n4 ? [] : n4).forEach(function(e5) {
  56391. var t3 = e5.topicID, n5 = e5.errorCode, o3 = e5.errorInfo;
  56392. 0 === n5 ? s4.push({ topicID: t3 }) : a3.push({ topicID: t3, code: n5, message: o3 });
  56393. });
  56394. var r2 = "success count:".concat(s4.length, ", fail count:").concat(a3.length);
  56395. return i2.setMoreMessage("".concat(r2)).setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(r2)), s4.forEach(function(e5) {
  56396. t2._deleteLocalTopic(o2, e5.topicID);
  56397. }), Ya({ successTopicList: s4, failureTopicList: a3 });
  56398. }).catch(function(e4) {
  56399. return t2.probeNetwork().then(function(t3) {
  56400. var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
  56401. i2.setError(e4, o3, s4).end();
  56402. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  56403. });
  56404. } }, { key: "updateTopicProfile", value: function(e3) {
  56405. var n3 = this, o2 = "".concat(this._n, ".").concat("updateTopicProfile");
  56406. if (Ve.l("".concat(o2, " options:"), e3), e3.topicName && false === this._filterProfanity("topicName", e3))
  56407. return Za({ code: ha.PROFANITY_FOUND });
  56408. if (e3.introduction && false === this._filterProfanity("introduction", e3))
  56409. return Za({ code: ha.PROFANITY_FOUND });
  56410. if (e3.notification && false === this._filterProfanity("notification", e3))
  56411. return Za({ code: ha.PROFANITY_FOUND });
  56412. var s3 = new Aa("updateTopicProfile");
  56413. return s3.setMessage("groupID:".concat(e3.groupID, " topicID:").concat(e3.topicID)), it(e3.muteAllMembers) || (e3.muteAllMembers = true === e3.muteAllMembers ? "On" : "Off"), this.request({ protocolName: oa, requestData: t({}, e3) }).then(function() {
  56414. return s3.setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._updateTopicMap([e3]), Ya({ topic: n3.getLocalTopic(e3.groupID, e3.topicID) });
  56415. }).catch(function(e4) {
  56416. return n3.probeNetwork().then(function(t2) {
  56417. var n4 = v(t2, 2), o3 = n4[0], a2 = n4[1];
  56418. s3.setError(e4, o3, a2).end();
  56419. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  56420. });
  56421. } }, { key: "getTopicList", value: function(e3) {
  56422. var n3 = this, o2 = "".concat(this._n, ".").concat("getTopicList"), s3 = e3.groupID, a2 = e3.topicIDList, i2 = void 0 === a2 ? [] : a2, r2 = 0 === i2.length, u2 = new Aa("getTopicList");
  56423. if (u2.setMessage("groupID:".concat(s3)), this._getTopicTimeMap.has(s3)) {
  56424. var c2 = this._getTopicTimeMap.get(s3), l2 = c2.isGetAll, d2 = c2.time;
  56425. if ((l2 || !l2 && !r2) && Date.now() - d2 < 1e3 * this.TOPIC_CACHE_TIME) {
  56426. var p2 = this._getLocalTopicList(s3, i2);
  56427. if (r2 || p2.length === i2.length)
  56428. return u2.setNetworkType(this.getNetworkType()).setMoreMessage("from cache, topic count:".concat(p2.length)).end(), Ve.l("".concat(o2, " groupID:").concat(s3, " from cache, topic count:").concat(p2.length)), Xa({ successTopicList: p2, failureTopicList: [] });
  56429. }
  56430. }
  56431. return this.request({ protocolName: sa, requestData: { groupID: s3, topicIDList: i2 } }).then(function(e4) {
  56432. var a3 = e4.data.topicInfoList, i3 = [], c3 = [], l3 = [];
  56433. (void 0 === a3 ? [] : a3).forEach(function(e5) {
  56434. var n4 = e5.topic, o3 = e5.selfInfo, s4 = e5.errorCode, a4 = e5.errorInfo, r3 = n4.topicID;
  56435. 0 === s4 ? (i3.push(t(t({}, n4), {}, { selfInfo: o3 })), c3.push(r3)) : l3.push({ topicID: r3, code: s4, message: a4 });
  56436. }), n3._updateTopicMap(i3), n3._handleTopicAtInfo(i3);
  56437. var d3 = "success count:".concat(c3.length, ", fail count:").concat(l3.length);
  56438. u2.setNetworkType(n3.getNetworkType()).setMoreMessage("".concat(d3)).end(), Ve.l("".concat(o2, " groupID:").concat(s3, " from remote, ").concat(d3));
  56439. var p3 = [];
  56440. return zt(c3) || (n3._getTopicTimeMap.set(s3, { time: Date.now(), isGetAll: r2 }), p3 = n3._getLocalTopicList(s3, c3)), Ya({ successTopicList: p3, failureTopicList: l3 });
  56441. }).catch(function(e4) {
  56442. return n3.probeNetwork(e4).then(function(t2) {
  56443. var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
  56444. u2.setError(e4, o3, s4).end();
  56445. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  56446. });
  56447. } }, { key: "hasLocalTopic", value: function(e3, t2) {
  56448. return !!this._topicMap.has(e3) && this._topicMap.get(e3).has(t2);
  56449. } }, { key: "getLocalTopic", value: function(e3, t2) {
  56450. var n3 = null;
  56451. return this._topicMap.has(e3) && (n3 = this._topicMap.get(e3).get(t2)), n3;
  56452. } }, { key: "_getLocalTopicList", value: function(e3) {
  56453. var t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n3 = this._topicMap.get(e3), o2 = [];
  56454. return n3 && (o2 = m(n3.values())), 0 === t2.length ? o2 : o2.filter(function(e4) {
  56455. return t2.includes(e4.topicID);
  56456. });
  56457. } }, { key: "_deleteLocalTopic", value: function(e3, t2) {
  56458. this._topicMap.has(e3) && (this._topicMap.get(e3).delete(t2), Ve.l("".concat(this._n, "._deleteLocalTopic groupID:").concat(e3, " topicID:").concat(t2)));
  56459. } }, { key: "_updateTopicMap", value: function(e3) {
  56460. var t2 = this, n3 = [];
  56461. (e3.forEach(function(e4) {
  56462. var o2 = e4.groupID, s3 = e4.topicID, a2 = null;
  56463. t2._topicMap.has(o2) || t2._topicMap.set(o2, /* @__PURE__ */ new Map()), t2._topicMap.get(o2).has(s3) ? (a2 = t2._topicMap.get(o2).get(s3)).updateTopic(e4) : (t2._getTopicLastMessage(e4), a2 = new Ki(e4, t2.isIntl()), t2._topicMap.get(o2).set(s3, a2));
  56464. var i2 = t2._computeUnreadCount(a2);
  56465. a2.updateUnreadCount(i2), n3.push({ conversationID: "".concat(E.CONV_GROUP).concat(s3), type: E.CONV_TOPIC, unreadCount: i2 });
  56466. }), n3.length > 0) && this.getModule(qn).updateTopicConversation(n3);
  56467. } }, { key: "resetGetTopicTime", value: function(e3) {
  56468. var t2 = this;
  56469. it(e3) ? m(this._getTopicTimeMap.keys()).forEach(function(e4) {
  56470. t2._getTopicTimeMap.set(e4, 0);
  56471. }) : this._getTopicTimeMap.set(e3, 0);
  56472. } }, { key: "getTopicListOnReconnected", value: function() {
  56473. var e3 = this, t2 = m(this._topicMap.keys()), n3 = [];
  56474. t2.forEach(function(t3) {
  56475. var o2 = [];
  56476. e3._getLocalTopicList(t3).forEach(function(t4) {
  56477. var n4 = t4.lastMessage.lastTime, s3 = void 0 === n4 ? 0 : n4;
  56478. Date.now() - 1e3 * s3 < 1e3 * e3.TOPIC_LAST_ACTIVE_TIME && o2.push(t4.topicID);
  56479. }), o2.length > 0 && n3.push({ groupID: t3, topicIDList: o2 });
  56480. }), Ve.l("".concat(this._n, ".getTopicListOnReconnected. active community count:").concat(n3.length)), this._relayGetTopicList(n3);
  56481. } }, { key: "_relayGetTopicList", value: function(e3) {
  56482. var t2 = this;
  56483. if (0 !== e3.length) {
  56484. var n3 = e3.shift(), o2 = n3.topicIDList.length > 5 ? "topicIDList.length:".concat(n3.topicIDList.length) : "topicIDList:".concat(n3.topicIDList), s3 = new Aa("relayGetTopicList");
  56485. s3.setMessage(o2), Ve.l("".concat(this._n, "._relayGetTopicList. ").concat(o2)), this.getTopicList(n3).then(function() {
  56486. s3.setNetworkType(t2.getNetworkType()).end(), t2._relayGetTopicList(e3);
  56487. }).catch(function(n4) {
  56488. t2.probeNetwork().then(function(e4) {
  56489. var t3 = v(e4, 2), o3 = t3[0], a2 = t3[1];
  56490. s3.setError(n4, o3, a2).end();
  56491. }), t2._relayGetTopicList(e3);
  56492. });
  56493. }
  56494. } }, { key: "_handleTopicAtInfo", value: function(e3) {
  56495. var n3 = this;
  56496. 0 !== e3.length && e3.forEach(function(e4) {
  56497. var o2 = e4.groupID, s3 = e4.topicID, a2 = e4.groupAtInfoList, i2 = [];
  56498. it(a2) || (a2.forEach(function(e5) {
  56499. i2.push(t(t({}, e5), {}, { groupID: o2, topicID: s3 }));
  56500. }), n3.getModule(qn).onNewGroupAtTips({ dataList: i2 }));
  56501. });
  56502. } }, { key: "_getTopicLastMessage", value: function(e3) {
  56503. if (!it(e3.lastMsg)) {
  56504. var t2 = { time: e3.lastMsg.time, sequence: e3.lastMsg.sequence, from: e3.lastMsg.from, payload: e3.lastMsg.elements[0] ? e3.lastMsg.elements[0].content : null, type: e3.lastMsg.elements[0] ? e3.lastMsg.elements[0].type : "", nick: e3.lastMsg.nick, version: e3.lastMsg.messageVersion, cloudCustomData: e3.lastMsg.cloudCustomData, isRevoked: 2 === e3.lastMsg.isPlaceMessage, revoker: zt(e3.lastMsg.revokerInfo) ? null : e3.lastMsg.revokerInfo.revoker };
  56505. e3.lastMessage = t2;
  56506. }
  56507. } }, { key: "deleteTopicListInCommunity", value: function(e3) {
  56508. var t2 = this, n3 = this._getLocalTopicList(e3), o2 = this.getModule(qn);
  56509. n3.forEach(function(n4) {
  56510. var s3 = n4.topicID;
  56511. t2._deleteLocalTopic(e3, s3), t2._getTopicTimeMap.delete(e3), o2.deleteLocalConversation("".concat(E.CONV_GROUP).concat(s3));
  56512. });
  56513. } }, { key: "_computeUnreadCount", value: function(e3) {
  56514. var t2 = e3.selfInfo, n3 = t2.excludedUnreadSequenceList, o2 = t2.readedSequence, s3 = e3.nextMessageSeq - e3.selfInfo.readedSequence - 1;
  56515. if (at(n3)) {
  56516. var a2 = 0;
  56517. n3.forEach(function(t3) {
  56518. t3 >= o2 && t3 <= e3.nextMessageSeq - 1 && (a2 += 1);
  56519. }), a2 >= 1 && (s3 -= a2);
  56520. }
  56521. return s3 < 0 ? 0 : s3;
  56522. } }, { key: "_filterProfanity", value: function(e3, t2) {
  56523. var n3 = this.getModule(oo);
  56524. if (!n3)
  56525. return true;
  56526. var o2 = n3.filterText(t2[e3], z), s3 = o2.isAllowedToSend, a2 = o2.modifiedText;
  56527. return true === s3 && (t2[e3] = a2, true);
  56528. } }, { key: "updateLastMessage", value: function(e3, t2) {
  56529. var n3 = xt(e3), o2 = this.getLocalTopic(n3, e3);
  56530. if (o2) {
  56531. var s3 = t2.sequence + 1;
  56532. o2.updateNextMessageSeq(s3), o2.updateLastMessage(t2), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: n3, topic: o2 });
  56533. }
  56534. } }, { key: "getMessageExtensions", value: function(e3, t2) {
  56535. Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2));
  56536. var n3 = xt(e3.to);
  56537. return this.request({ protocolName: Ss, requestData: { groupID: n3, topicID: e3.to, messageSequence: e3.sequence, startSequence: t2 } });
  56538. } }, { key: "modifyMessageExtensions", value: function(e3, t2) {
  56539. var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
  56540. Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3));
  56541. var o2 = xt(e3.to);
  56542. return this.request({ protocolName: Es, requestData: { groupID: o2, topicID: e3.to, messageSequence: e3.sequence, extensionList: t2, operateType: n3 } });
  56543. } }, { key: "reset", value: function() {
  56544. Ve.l("".concat(this._n, ".reset")), this._topicMap.clear(), this._getTopicTimeMap.clear(), this.TOPIC_CACHE_TIME = 300, this.TOPIC_LAST_ACTIVE_TIME = 3600;
  56545. } }]), s2;
  56546. }(uo), Yi = function() {
  56547. function e2(t2) {
  56548. o(this, e2), this._userModule = t2, this._n = "ProfileHandler", this.TAG = "profile", this.accountProfileMap = /* @__PURE__ */ new Map(), this.expirationTime = 864e5;
  56549. }
  56550. return a(e2, [{ key: "setExpirationTime", value: function(e3) {
  56551. this.expirationTime = e3;
  56552. } }, { key: "getUserProfile", value: function(e3) {
  56553. var t2 = this, n2 = "".concat(this._n, ".").concat("getUserProfile"), o2 = e3.userIDList;
  56554. e3.fromAccount = this._userModule.getMyAccount(), o2.length > 100 && (Ve.w("".concat(n2, " ").concat(Wt(100))), o2.length = 100);
  56555. for (var s2, a2 = [], i2 = [], r2 = 0, u2 = o2.length; r2 < u2; r2++)
  56556. s2 = o2[r2], this._userModule.isMyFriend(s2) && this._contains(s2) ? i2.push(this._getProfileFromMap(s2)) : a2.push(s2);
  56557. if (0 === a2.length)
  56558. return Xa(i2);
  56559. e3.toAccount = a2;
  56560. var c2 = e3.bFromGetMyProfile || false, l2 = [];
  56561. e3.toAccount.forEach(function(e4) {
  56562. l2.push({ toAccount: e4, standardSequence: 0, customSequence: 0 });
  56563. }), e3.userItem = l2;
  56564. var d2 = new Aa("getUserProfile");
  56565. return d2.setMessage(o2.length > 5 ? "userIDList.length:".concat(o2.length) : "userIDList:".concat(o2)), this._userModule.request({ protocolName: mo, requestData: e3 }).then(function(e4) {
  56566. d2.setNetworkType(t2._userModule.getNetworkType()).end(), Ve.i("".concat(n2, " ok"));
  56567. var o3 = t2._handleResponse(e4).concat(i2);
  56568. return Ya(c2 ? o3[0] : o3);
  56569. }).catch(function(e4) {
  56570. return t2._userModule.probeNetwork().then(function(t3) {
  56571. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  56572. d2.setError(e4, o3, s3).end();
  56573. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56574. });
  56575. } }, { key: "getMyProfile", value: function() {
  56576. var e3 = this._userModule.getMyAccount(), t2 = "".concat(this._n, ".getMyProfile");
  56577. if (Ve.l("".concat(t2, " myAccount:").concat(e3)), this._fill(), this._contains(e3)) {
  56578. var n2 = this._getProfileFromMap(e3);
  56579. return Ve.d("".concat(t2, " from cache, myProfile:").concat(JSON.stringify(n2))), Xa(n2);
  56580. }
  56581. return this.getUserProfile({ fromAccount: e3, userIDList: [e3], bFromGetMyProfile: true });
  56582. } }, { key: "_handleResponse", value: function(e3) {
  56583. var t2 = e3.data.userProfileItem;
  56584. if (!at(t2))
  56585. return [];
  56586. for (var n2 = [], o2 = Date.now(), s2 = 0, a2 = t2.length; s2 < a2; s2++) {
  56587. var i2 = t2[s2], r2 = i2.to, u2 = i2.profileItem;
  56588. if ("@TLS#NOT_FOUND" !== r2 && "" !== r2) {
  56589. var c2 = this._update(r2, this._getLatestProfileFromResponse(r2, u2)).latestProfile;
  56590. n2.push(c2);
  56591. }
  56592. }
  56593. return Ve.l("".concat(this._n, "._handleResponse cost ").concat(Date.now() - o2, " ms")), n2;
  56594. } }, { key: "_getLatestProfileFromResponse", value: function(e3, t2) {
  56595. var n2 = { userID: e3, profileCustomField: [] };
  56596. if (!zt(t2))
  56597. for (var o2 = 0, s2 = t2.length; o2 < s2; o2++)
  56598. if (t2[o2].tag.indexOf("Tag_Profile_Custom") > -1)
  56599. n2.profileCustomField.push({ key: t2[o2].tag, value: t2[o2].value });
  56600. else
  56601. switch (t2[o2].tag) {
  56602. case He.NICK:
  56603. n2.nick = t2[o2].value;
  56604. break;
  56605. case He.GENDER:
  56606. n2.gender = t2[o2].value;
  56607. break;
  56608. case He.BIRTHDAY:
  56609. n2.birthday = t2[o2].value;
  56610. break;
  56611. case He.LOCATION:
  56612. n2.location = t2[o2].value;
  56613. break;
  56614. case He.SELFSIGNATURE:
  56615. n2.selfSignature = t2[o2].value;
  56616. break;
  56617. case He.ALLOWTYPE:
  56618. n2.allowType = t2[o2].value;
  56619. break;
  56620. case He.LANGUAGE:
  56621. n2.language = t2[o2].value;
  56622. break;
  56623. case He.AVATAR:
  56624. n2.avatar = t2[o2].value;
  56625. break;
  56626. case He.MESSAGESETTINGS:
  56627. n2.messageSettings = t2[o2].value;
  56628. break;
  56629. case He.ADMINFORBIDTYPE:
  56630. n2.adminForbidType = t2[o2].value;
  56631. break;
  56632. case He.LEVEL:
  56633. n2.level = t2[o2].value;
  56634. break;
  56635. case He.ROLE:
  56636. n2.role = t2[o2].value;
  56637. break;
  56638. default:
  56639. Ve.w("".concat(this._n, "._getLatestProfileFromResponse unknown tag:"), t2[o2].tag, t2[o2].value);
  56640. }
  56641. return n2;
  56642. } }, { key: "updateMyProfile", value: function(e3) {
  56643. var t2 = this, n2 = "".concat(this._n, ".").concat("updateMyProfile");
  56644. if (e3.nick && false === this._userModule.filterProfanity("nick", e3))
  56645. return Za({ code: ha.PROFANITY_FOUND });
  56646. if (e3.selfSignature && false === this._userModule.filterProfanity("selfSignature", e3))
  56647. return Za({ code: ha.PROFANITY_FOUND });
  56648. var o2 = new Aa("updateMyProfile");
  56649. o2.setMessage(JSON.stringify(e3));
  56650. var s2 = new li().validate(e3);
  56651. if (!s2.valid)
  56652. return o2.setCode(ha.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(s2.tips)).setNetworkType(this._userModule.getNetworkType()).end(), Ve.e("".concat(n2, " info:").concat(s2.tips)), Za({ code: ha.UPDATE_PROFILE_INVALID_PARAM });
  56653. var a2 = [];
  56654. for (var i2 in e3)
  56655. Object.prototype.hasOwnProperty.call(e3, i2) && ("profileCustomField" === i2 ? e3.profileCustomField.forEach(function(e4) {
  56656. a2.push({ tag: e4.key, value: e4.value });
  56657. }) : a2.push({ tag: He[i2.toUpperCase()], value: e3[i2] }));
  56658. if (0 === a2.length) {
  56659. var r2 = new ja({ code: ha.UPDATE_PROFILE_NO_KEY });
  56660. return o2.setError(r2, true, this._userModule.getNetworkType()).end(), Ve.e("".concat(n2, " failed. error:"), r2), Za(r2);
  56661. }
  56662. var u2 = this._userModule.getMyAccount();
  56663. return this._userModule.request({ protocolName: Mo, requestData: { fromAccount: u2, profileItem: a2 } }).then(function(s3) {
  56664. o2.setNetworkType(t2._userModule.getNetworkType()).end(), Ve.i("".concat(n2, " ok"));
  56665. var a3 = t2._update(u2, e3), i3 = a3.isProfileUpdated, r3 = a3.latestProfile;
  56666. return true === i3 && t2._userModule.emitOuterEvent(k.PROFILE_UPDATED, [r3]), Xa(r3);
  56667. }).catch(function(e4) {
  56668. return t2._userModule.probeNetwork().then(function(t3) {
  56669. var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
  56670. o2.setError(e4, s3, a3).end();
  56671. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56672. });
  56673. } }, { key: "onProfileModified", value: function(e3) {
  56674. var t2 = e3.dataList;
  56675. if (!zt(t2)) {
  56676. var n2, o2 = t2.length;
  56677. Ve.d("".concat(this._n, ".onProfileModified count:").concat(o2, " dataList:"), e3.dataList);
  56678. for (var s2 = [], a2 = 0; a2 < o2; a2++) {
  56679. n2 = t2[a2].userID;
  56680. var i2 = this._update(n2, this._getLatestProfileFromResponse(n2, t2[a2].profileList)), r2 = i2.isProfileUpdated, u2 = i2.latestProfile;
  56681. true === r2 && s2.push(u2);
  56682. }
  56683. s2.length > 0 && (this._userModule.emitInnerEvent(ni, s2), this._userModule.emitOuterEvent(k.PROFILE_UPDATED, s2));
  56684. }
  56685. } }, { key: "_fill", value: function() {
  56686. if (0 === this.accountProfileMap.size) {
  56687. for (var e3 = this._getCachedProfiles(), t2 = Date.now(), n2 = 0, o2 = e3.length; n2 < o2; n2++)
  56688. t2 - e3[n2].lastUpdatedTime < this.expirationTime && this.accountProfileMap.set(e3[n2].userID, e3[n2]);
  56689. Ve.l("".concat(this._n, "._fill from cache, size:").concat(this.accountProfileMap.size));
  56690. }
  56691. } }, { key: "_update", value: function(e3, t2) {
  56692. var n2, o2 = false, s2 = Date.now();
  56693. this._contains(e3) ? (n2 = this._getProfileFromMap(e3), t2.profileCustomField && true === Ct(n2.profileCustomField, t2.profileCustomField) && (n2.lastUpdatedTime = s2, o2 = true), pt(n2, t2, ["profileCustomField"]) > 0 && (n2.lastUpdatedTime = s2, o2 = true)) : (n2 = new li(t2), (this._userModule.isMyFriend(e3) || e3 === this._userModule.getMyAccount()) && (n2.lastUpdatedTime = s2, o2 = true, this.accountProfileMap.set(e3, n2)));
  56694. return this._flush(e3 === this._userModule.getMyAccount()), Ve.l("".concat(this._n, "._update account:").concat(e3, " isProfileUpdated:").concat(o2)), { isProfileUpdated: o2, latestProfile: n2 };
  56695. } }, { key: "_flush", value: function(e3) {
  56696. var t2 = m(this.accountProfileMap.values()), n2 = this._userModule.getStorageModule();
  56697. Ve.d("".concat(this._n, "._flush length:").concat(t2.length, " flushAtOnce:").concat(e3)), n2.setItem(this.TAG, t2, e3);
  56698. } }, { key: "_contains", value: function(e3) {
  56699. return this.accountProfileMap.has(e3);
  56700. } }, { key: "_getProfileFromMap", value: function(e3) {
  56701. return this.accountProfileMap.get(e3);
  56702. } }, { key: "_getCachedProfiles", value: function() {
  56703. var e3 = this._userModule.getStorageModule().getItem(this.TAG);
  56704. return zt(e3) ? [] : e3;
  56705. } }, { key: "onConversationsProfileUpdated", value: function(e3) {
  56706. for (var t2, n2, o2, s2 = [], a2 = 0, i2 = e3.length; a2 < i2; a2++)
  56707. n2 = (t2 = e3[a2]).userID, this._userModule.isMyFriend(n2) && (this._contains(n2) ? (o2 = this._getProfileFromMap(n2), pt(o2, t2) > 0 && s2.push(n2)) : s2.push(t2.userID));
  56708. 0 !== s2.length && (Ve.i("".concat(this._n, ".onConversationsProfileUpdated toAccountList:").concat(s2)), this.getUserProfile({ userIDList: s2 }));
  56709. } }, { key: "getNickAndAvatarByUserID", value: function(e3) {
  56710. if (this._contains(e3)) {
  56711. var t2 = this._getProfileFromMap(e3);
  56712. return { nick: t2.nick, avatar: t2.avatar };
  56713. }
  56714. return { nick: "", avatar: "" };
  56715. } }, { key: "reset", value: function() {
  56716. this._flush(true), this.accountProfileMap.clear();
  56717. } }]), e2;
  56718. }(), ji = a(function e2(t2) {
  56719. o(this, e2), zt || (this.userID = t2.userID || "", this.timeStamp = t2.timeStamp || 0);
  56720. }), zi = function() {
  56721. function e2(t2) {
  56722. o(this, e2), this._userModule = t2, this._n = "BlacklistHandler", this._blacklistMap = /* @__PURE__ */ new Map(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0;
  56723. }
  56724. return a(e2, [{ key: "getLocalBlacklist", value: function() {
  56725. return m(this._blacklistMap.keys());
  56726. } }, { key: "getBlacklist", value: function() {
  56727. var e3 = this, t2 = "".concat(this._n, ".getBlacklist"), n2 = { fromAccount: this._userModule.getMyAccount(), maxLimited: this.maxLimited, startIndex: 0, lastSequence: this.currentSequence }, o2 = new Aa("getBlacklist");
  56728. return this._userModule.request({ protocolName: yo, requestData: n2 }).then(function(n3) {
  56729. var s2 = n3.data, a2 = s2.blackListItem, i2 = s2.currentSequence, r2 = zt(a2) ? 0 : a2.length;
  56730. o2.setNetworkType(e3._userModule.getNetworkType()).setMessage("count:".concat(r2)).end(), Ve.i("".concat(t2, " ok")), e3.currentSequence = i2, e3._handleResponse(a2, true), e3._userModule.emitOuterEvent(k.BLACKLIST_UPDATED, m(e3._blacklistMap.keys()));
  56731. }).catch(function(n3) {
  56732. return e3._userModule.probeNetwork().then(function(e4) {
  56733. var t3 = v(e4, 2), s2 = t3[0], a2 = t3[1];
  56734. o2.setError(n3, s2, a2).end();
  56735. }), Ve.e("".concat(t2, " failed. error:"), n3), Za(n3);
  56736. });
  56737. } }, { key: "addBlacklist", value: function(e3) {
  56738. var t2 = this, n2 = new Aa("addToBlacklist"), o2 = "".concat(this._n, ".addBlacklist"), s2 = this._userModule.getMyAccount();
  56739. if (1 === e3.userIDList.length && e3.userIDList[0] === s2) {
  56740. var a2 = ha.CANNOT_ADD_SELF_TO_BLACKLIST, i2 = this._userModule.getErrorMessage(a2);
  56741. n2.setCode(a2).setMessage(i2).setNetworkType(this._userModule.getNetworkType()).end();
  56742. var r2 = new ja({ code: a2 });
  56743. return Ve.e("".concat(o2, " failed. error:"), r2), Za(r2);
  56744. }
  56745. return e3.userIDList.includes(s2) && (e3.userIDList = e3.userIDList.filter(function(e4) {
  56746. return e4 !== s2;
  56747. })), e3.fromAccount = this._userModule.getMyAccount(), e3.toAccount = e3.userIDList, this._userModule.request({ protocolName: Io, requestData: e3 }).then(function(s3) {
  56748. return n2.setNetworkType(t2._userModule.getNetworkType()).setMessage(e3.userIDList.length > 5 ? "userIDList.length:".concat(e3.userIDList.length) : "userIDList:".concat(e3.userIDList)).end(), Ve.i("".concat(o2, " ok")), t2._handleResponse(s3.resultItem, true), Ya(m(t2._blacklistMap.keys()));
  56749. }).catch(function(e4) {
  56750. return t2._userModule.probeNetwork().then(function(t3) {
  56751. var o3 = v(t3, 2), s3 = o3[0], a3 = o3[1];
  56752. n2.setError(e4, s3, a3).end();
  56753. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  56754. });
  56755. } }, { key: "_handleResponse", value: function(e3, t2) {
  56756. if (!zt(e3))
  56757. for (var n2, o2, s2, a2 = 0, i2 = e3.length; a2 < i2; a2++)
  56758. o2 = e3[a2].to, s2 = e3[a2].resultCode, (it(s2) || 0 === s2) && (t2 ? ((n2 = this._blacklistMap.has(o2) ? this._blacklistMap.get(o2) : new ji()).userID = o2, !zt(e3[a2].addBlackTimeStamp) && (n2.timeStamp = e3[a2].addBlackTimeStamp), this._blacklistMap.set(o2, n2)) : this._blacklistMap.has(o2) && (n2 = this._blacklistMap.get(o2), this._blacklistMap.delete(o2)));
  56759. Ve.l("".concat(this._n, "._handleResponse total:").concat(this._blacklistMap.size, " bAdd:").concat(t2));
  56760. } }, { key: "deleteBlacklist", value: function(e3) {
  56761. var t2 = this, n2 = "".concat(this._n, ".deleteBlacklist"), o2 = new Aa("removeFromBlacklist");
  56762. return e3.fromAccount = this._userModule.getMyAccount(), e3.toAccount = e3.userIDList, this._userModule.request({ protocolName: Co, requestData: e3 }).then(function(s2) {
  56763. return o2.setNetworkType(t2._userModule.getNetworkType()).setMessage(e3.userIDList.length > 5 ? "userIDList.length:".concat(e3.userIDList.length) : "userIDList:".concat(e3.userIDList)).end(), Ve.i("".concat(n2, " ok")), t2._handleResponse(s2.data.resultItem, false), Ya(m(t2._blacklistMap.keys()));
  56764. }).catch(function(e4) {
  56765. return t2._userModule.probeNetwork().then(function(t3) {
  56766. var n3 = v(t3, 2), s2 = n3[0], a2 = n3[1];
  56767. o2.setError(e4, s2, a2).end();
  56768. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56769. });
  56770. } }, { key: "onAccountDeleted", value: function(e3) {
  56771. for (var t2, n2 = [], o2 = 0, s2 = e3.length; o2 < s2; o2++)
  56772. t2 = e3[o2], this._blacklistMap.has(t2) && (this._blacklistMap.delete(t2), n2.push(t2));
  56773. n2.length > 0 && (Ve.l("".concat(this._n, ".onAccountDeleted count:").concat(n2.length, " userIDList:"), n2), this._userModule.emitOuterEvent(k.BLACKLIST_UPDATED, m(this._blacklistMap.keys())));
  56774. } }, { key: "onAccountAdded", value: function(e3) {
  56775. for (var t2, n2 = [], o2 = 0, s2 = e3.length; o2 < s2; o2++)
  56776. t2 = e3[o2], this._blacklistMap.has(t2) || (this._blacklistMap.set(t2, new ji({ userID: t2 })), n2.push(t2));
  56777. n2.length > 0 && (Ve.l("".concat(this._n, ".onAccountAdded count:").concat(n2.length, " userIDList:"), n2), this._userModule.emitOuterEvent(k.BLACKLIST_UPDATED, m(this._blacklistMap.keys())));
  56778. } }, { key: "reset", value: function() {
  56779. this._blacklistMap.clear(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0;
  56780. } }]), e2;
  56781. }(), Ji = function(e2) {
  56782. var t2 = String(e2).replace(/[=]+$/, ""), n2 = "";
  56783. if (t2.length % 4 == 1)
  56784. return "";
  56785. for (var o2, s2, a2 = 0, i2 = 0; s2 = t2.charAt(i2++); ~s2 && (o2 = a2 % 4 ? 64 * o2 + s2 : s2, a2++ % 4) ? n2 += String.fromCharCode(255 & o2 >> (-2 * a2 & 6)) : 0)
  56786. s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s2);
  56787. try {
  56788. return decodeURIComponent(escape(n2));
  56789. } catch (r2) {
  56790. return "";
  56791. }
  56792. }, Xi = function() {
  56793. function e2(t2) {
  56794. o(this, e2), this._userModule = t2, this._n = "UserStatusHandler", this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100, this._userModule.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this);
  56795. }
  56796. return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
  56797. var e3 = this._userModule.getCloudConfig("status_query_count"), t2 = this._userModule.getCloudConfig("status_sub_count"), n2 = this._userModule.getCloudConfig("status_unsub_count");
  56798. Ve.l("".concat(this._n, "._onCloudConfigUpdated statusQueryCount:").concat(e3, " statusSubscribeCount:").concat(t2) + " statusUnsubscribeCount:".concat(n2)), it(e3) || (this.MAX_QUERY_USER_COUNT = parseInt(e3, 10)), it(e3) || (this.MAX_SUBSCRIBE_USER_COUNT = parseInt(t2, 10)), it(e3) || (this.MAX_UNSUBSCRIBE_USER_COUNT = parseInt(n2, 10));
  56799. } }, { key: "onUserStatusUpdated", value: function(e3) {
  56800. var t2 = e3.dataList, n2 = this._userModule.getMyUserID(), o2 = this._userModule.getModule(xn), s2 = t2.map(function(e4) {
  56801. var t3 = e4.to, s3 = e4.statusType, a2 = e4.customStatus, i2 = Ji(a2);
  56802. return t3 === n2 && o2.setCustomStatus(i2), { userID: t3, statusType: s3, customStatus: i2 };
  56803. });
  56804. this._userModule.emitOuterEvent(k.USER_STATUS_UPDATED, s2);
  56805. } }, { key: "setSelfStatus", value: function(e3) {
  56806. var t2 = this, n2 = "".concat(this._n, ".setSelfStatus");
  56807. if (false === this._userModule.filterProfanity("customStatus", e3))
  56808. return Za({ code: ha.PROFANITY_FOUND });
  56809. var o2 = new Aa("setSelfStatus"), s2 = e3.customStatus;
  56810. return this._userModule.request({ protocolName: aa, requestData: { customStatus: s2 } }).then(function(e4) {
  56811. return o2.setNetworkType(t2._userModule.getNetworkType()).setMessage("customStatus:".concat(s2)).end(), Ve.l("".concat(n2, " ok. customStatus:").concat(s2)), t2._userModule.getModule(xn).setCustomStatus(s2), Ya({ userID: t2._userModule.getMyUserID(), statusType: 1, customStatus: s2 });
  56812. }).catch(function(e4) {
  56813. return t2._userModule.probeNetwork().then(function(t3) {
  56814. var n3 = v(t3, 2), s3 = n3[0], a2 = n3[1];
  56815. o2.setError(e4, s3, a2).end();
  56816. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56817. });
  56818. } }, { key: "getUserStatus", value: function(e3) {
  56819. var t2 = this, n2 = "".concat(this._n, ".getUserStatus"), o2 = e3.userIDList, s2 = void 0 === o2 ? [] : o2, a2 = this._userModule.getMyUserID(), i2 = m(s2), r2 = void 0, u2 = i2.indexOf(a2);
  56820. if (u2 > -1) {
  56821. i2.splice(u2, 1);
  56822. var c2 = this._userModule.getModule(xn).getCustomStatus();
  56823. r2 = { userID: a2, statusType: 1, customStatus: c2 };
  56824. }
  56825. if (0 === i2.length)
  56826. return Xa({ successUserList: [r2], failureUserList: [] });
  56827. if (!this._userModule.canIUse(B.USER_STATUS))
  56828. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  56829. i2.length > this.MAX_QUERY_USER_COUNT && (Ve.w("".concat(n2, " ").concat(Wt(this.MAX_QUERY_USER_COUNT))), i2 = s2.slice(0, this.MAX_QUERY_USER_COUNT));
  56830. var l2 = new Aa("getUserStatus");
  56831. return this._userModule.request({ protocolName: ia, requestData: { userIDList: i2 } }).then(function(e4) {
  56832. var o3 = e4.data, a3 = o3.successUserList, i3 = void 0 === a3 ? [] : a3, u3 = o3.failureUserList, c3 = void 0 === u3 ? [] : u3, d2 = i3.map(function(e5) {
  56833. var t3 = e5.userID, n3 = e5.statusType, o4 = e5.customStatus;
  56834. return { userID: t3, statusType: n3, customStatus: Ji(o4) };
  56835. }), p2 = c3.map(function(e5) {
  56836. var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s3 = e5.errorInfo;
  56837. return { userID: zt(n3) ? t3 : n3, code: o4, message: s3 };
  56838. });
  56839. it(r2) || d2.unshift(r2);
  56840. var g2 = "userID count:".concat(s2.length, ", success count:").concat(d2.length, ", fail count:").concat(p2.length);
  56841. return l2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(g2)).end(), Ve.l("".concat(n2, " ok. ").concat(g2, ".")), Ya({ successUserList: d2, failureUserList: p2 });
  56842. }).catch(function(e4) {
  56843. return t2._userModule.probeNetwork().then(function(t3) {
  56844. var n3 = v(t3, 2), o3 = n3[0], a3 = n3[1];
  56845. l2.setMessage("userID count:".concat(s2.length)).setError(e4, o3, a3).end();
  56846. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56847. });
  56848. } }, { key: "subscribeUserStatus", value: function(e3) {
  56849. var t2 = this;
  56850. if (!this._userModule.canIUse(B.USER_STATUS))
  56851. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  56852. var n2 = "".concat(this._n, ".subscribeUserStatus"), o2 = e3.userIDList, s2 = void 0 === o2 ? [] : o2, a2 = m(s2);
  56853. a2.length > this.MAX_SUBSCRIBE_USER_COUNT && (Ve.w("".concat(n2, " ").concat(Wt(this.MAX_SUBSCRIBE_USER_COUNT))), a2 = s2.slice(0, this.MAX_SUBSCRIBE_USER_COUNT));
  56854. var i2 = new Aa("subscribeUserStatus"), r2 = "userID count:".concat(s2.length);
  56855. return Ve.l("".concat(n2, " ").concat(r2)), this._userModule.request({ protocolName: ra, requestData: { userIDList: a2 } }).then(function(e4) {
  56856. var o3 = e4.data.failureUserList, s3 = (void 0 === o3 ? [] : o3).map(function(e5) {
  56857. var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s4 = e5.errorInfo;
  56858. return { userID: zt(n3) ? t3 : n3, code: o4, message: s4 };
  56859. });
  56860. return i2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(r2, " fail count:").concat(s3.length)).end(), Ve.l("".concat(n2, " ok. fail count:").concat(s3.length, ".")), Ya({ failureUserList: s3 });
  56861. }).catch(function(e4) {
  56862. return t2._userModule.probeNetwork().then(function(t3) {
  56863. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  56864. i2.setMessage("".concat(r2)).setError(e4, o3, s3).end();
  56865. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56866. });
  56867. } }, { key: "unsubscribeUserStatus", value: function(e3) {
  56868. var t2 = this;
  56869. if (!this._userModule.canIUse(B.USER_STATUS))
  56870. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  56871. var n2 = "".concat(this._n, ".unsubscribeUserStatus"), o2 = (e3 || {}).userIDList, s2 = void 0 === o2 ? [] : o2, a2 = m(s2);
  56872. s2.length > this.MAX_UNSUBSCRIBE_USER_COUNT && (Ve.w("".concat(n2, " ").concat(Wt(this.MAX_UNSUBSCRIBE_USER_COUNT))), a2 = s2.slice(0, this.MAX_UNSUBSCRIBE_USER_COUNT));
  56873. var i2 = new Aa("unsubscribeUserStatus"), r2 = "userID count:".concat(s2.length);
  56874. Ve.l("".concat(n2, " ").concat(r2));
  56875. var u2 = { userIDList: a2 };
  56876. return 0 === a2.length && (u2.userIDList = void 0, u2.unsubscribeAll = 1), this._userModule.request({ protocolName: ua, requestData: u2 }).then(function(e4) {
  56877. var o3 = e4.data.failureUserList, s3 = (void 0 === o3 ? [] : o3).map(function(e5) {
  56878. var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s4 = e5.errorInfo;
  56879. return { userID: zt(n3) ? t3 : n3, code: o4, message: s4 };
  56880. });
  56881. return i2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(r2, " fail count:").concat(s3.length)).end(), Ve.l("".concat(n2, " ok. fail count:").concat(s3.length, ".")), Ya({ failureUserList: s3 });
  56882. }).catch(function(e4) {
  56883. return t2._userModule.probeNetwork().then(function(t3) {
  56884. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  56885. i2.setMessage("".concat(r2)).setError(e4, o3, s3).end();
  56886. }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
  56887. });
  56888. } }, { key: "reset", value: function() {
  56889. this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100;
  56890. } }]), e2;
  56891. }(), Zi = function(e2) {
  56892. r(n2, e2);
  56893. var t2 = f(n2);
  56894. function n2(e3) {
  56895. var s2;
  56896. return o(this, n2), (s2 = t2.call(this, e3))._n = "UserModule", s2._profileHandler = new Yi(h(s2)), s2._blacklistHandler = new zi(h(s2)), s2._userStatusHandler = new Xi(h(s2)), s2.getInnerEmitterInstance().on(ei, s2.onContextUpdated, h(s2)), s2;
  56897. }
  56898. return a(n2, [{ key: "onContextUpdated", value: function(e3) {
  56899. this._profileHandler.getMyProfile(), this._blacklistHandler.getBlacklist();
  56900. } }, { key: "onProfileModified", value: function(e3) {
  56901. this._profileHandler.onProfileModified(e3);
  56902. } }, { key: "onRelationChainModified", value: function(e3) {
  56903. var t3 = e3.dataList;
  56904. if (!zt(t3)) {
  56905. var n3 = [];
  56906. t3.forEach(function(e4) {
  56907. e4.blackListDelAccount && n3.push.apply(n3, m(e4.blackListDelAccount));
  56908. }), n3.length > 0 && this._blacklistHandler.onAccountDeleted(n3);
  56909. var o2 = [];
  56910. t3.forEach(function(e4) {
  56911. e4.blackListAddAccount && o2.push.apply(o2, m(e4.blackListAddAccount));
  56912. }), o2.length > 0 && this._blacklistHandler.onAccountAdded(o2);
  56913. }
  56914. } }, { key: "onConversationsProfileUpdated", value: function(e3) {
  56915. this._profileHandler.onConversationsProfileUpdated(e3);
  56916. } }, { key: "getMyAccount", value: function() {
  56917. return this.getMyUserID();
  56918. } }, { key: "getMyProfile", value: function() {
  56919. return this._profileHandler.getMyProfile();
  56920. } }, { key: "getStorageModule", value: function() {
  56921. return this.getModule(Vn);
  56922. } }, { key: "filterProfanity", value: function(e3, t3) {
  56923. var n3 = this.getModule(oo);
  56924. if (!n3)
  56925. return true;
  56926. var o2 = n3.filterText(t3[e3], j), s2 = o2.isAllowedToSend, a2 = o2.modifiedText;
  56927. return true === s2 && (t3[e3] = a2, true);
  56928. } }, { key: "isMyFriend", value: function(e3) {
  56929. var t3 = this.getModule(bn);
  56930. return !!t3 && t3.isMyFriend(e3);
  56931. } }, { key: "getUserProfile", value: function(e3) {
  56932. return this._profileHandler.getUserProfile(e3);
  56933. } }, { key: "updateMyProfile", value: function(e3) {
  56934. return this._profileHandler.updateMyProfile(e3);
  56935. } }, { key: "getNickAndAvatarByUserID", value: function(e3) {
  56936. return this._profileHandler.getNickAndAvatarByUserID(e3);
  56937. } }, { key: "getLocalBlacklist", value: function() {
  56938. var e3 = this._blacklistHandler.getLocalBlacklist();
  56939. return Xa(e3);
  56940. } }, { key: "addBlacklist", value: function(e3) {
  56941. return this._blacklistHandler.addBlacklist(e3);
  56942. } }, { key: "deleteBlacklist", value: function(e3) {
  56943. return this._blacklistHandler.deleteBlacklist(e3);
  56944. } }, { key: "onUserStatusUpdated", value: function(e3) {
  56945. this._userStatusHandler.onUserStatusUpdated(e3);
  56946. } }, { key: "setSelfStatus", value: function(e3) {
  56947. return this._userStatusHandler.setSelfStatus(e3);
  56948. } }, { key: "getUserStatus", value: function(e3) {
  56949. return this._userStatusHandler.getUserStatus(e3);
  56950. } }, { key: "subscribeUserStatus", value: function(e3) {
  56951. return this._userStatusHandler.subscribeUserStatus(e3);
  56952. } }, { key: "unsubscribeUserStatus", value: function(e3) {
  56953. return this._userStatusHandler.unsubscribeUserStatus(e3);
  56954. } }, { key: "reset", value: function() {
  56955. Ve.l("".concat(this._n, ".reset")), this._profileHandler.reset(), this._blacklistHandler.reset(), this._userStatusHandler.reset();
  56956. } }]), n2;
  56957. }(uo), Qi = function() {
  56958. function e2(t2, n2) {
  56959. o(this, e2), this._m = t2, this._isLoggedIn = false, this._SDKAppID = n2.SDKAppID, this._userID = n2.userID || "", this._userSig = n2.userSig || "", this._version = "2.27.6", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._contentType = "json", this._unlimitedAVChatRoom = n2.unlimitedAVChatRoom, this._scene = n2.scene || "", this._oversea = n2.oversea, this._instanceID = n2.instanceID, this._statusInstanceID = 0, this._isDevMode = n2.devMode, this._proxyServer = n2.proxyServer, this._fileUploadProxy = n2.fileUploadProxy, this._fileDownloadProxy = n2.fileDownloadProxy;
  56960. }
  56961. return a(e2, [{ key: "isLoggedIn", value: function() {
  56962. return this._isLoggedIn;
  56963. } }, { key: "isOversea", value: function() {
  56964. return this._oversea;
  56965. } }, { key: "isPrivateNetWork", value: function() {
  56966. return this._proxyServer;
  56967. } }, { key: "isDevMode", value: function() {
  56968. return this._isDevMode;
  56969. } }, { key: "isSingaporeSite", value: function() {
  56970. return this._SDKAppID >= 2e7 && this._SDKAppID < 3e7 || this._SDKAppID >= 172e7 && this._SDKAppID < 173e7;
  56971. } }, { key: "isKoreaSite", value: function() {
  56972. return this._SDKAppID >= 3e7 && this._SDKAppID < 4e7 || this._SDKAppID >= 173e7 && this._SDKAppID < 174e7;
  56973. } }, { key: "isGermanySite", value: function() {
  56974. return this._SDKAppID >= 4e7 && this._SDKAppID < 5e7 || this._SDKAppID >= 174e7 && this._SDKAppID < 175e7;
  56975. } }, { key: "isIndiaSite", value: function() {
  56976. return this._SDKAppID >= 5e7 && this._SDKAppID < 6e7 || this._SDKAppID >= 175e7 && this._SDKAppID < 176e7;
  56977. } }, { key: "isJapanSite", value: function() {
  56978. return this._SDKAppID >= 6e7 && this._SDKAppID < 7e7 || this._SDKAppID >= 176e7 && this._SDKAppID < 177e7;
  56979. } }, { key: "isUSASite", value: function() {
  56980. return this._SDKAppID >= 7e7 && this._SDKAppID < 8e7 || this._SDKAppID >= 177e7 && this._SDKAppID < 178e7;
  56981. } }, { key: "isIntl", value: function() {
  56982. return 0 === (e3 = this._SDKAppID) || e3 >= 2e7 && e3 < 8e7 || e3 >= 172e7 && e3 < 178e7;
  56983. var e3;
  56984. } }, { key: "isUnlimitedAVChatRoom", value: function() {
  56985. return this._unlimitedAVChatRoom;
  56986. } }, { key: "setUserID", value: function(e3) {
  56987. this._userID = e3;
  56988. } }, { key: "getUserID", value: function() {
  56989. return this._userID;
  56990. } }, { key: "setUserSig", value: function(e3) {
  56991. this._userSig = e3;
  56992. } }, { key: "getUserSig", value: function() {
  56993. return this._userSig;
  56994. } }, { key: "getSDKAppID", value: function() {
  56995. return this._SDKAppID;
  56996. } }, { key: "setTinyID", value: function(e3) {
  56997. this._tinyID = e3, this._isLoggedIn = true;
  56998. } }, { key: "getTinyID", value: function() {
  56999. return this._tinyID;
  57000. } }, { key: "setCustomStatus", value: function(e3) {
  57001. this._customStatus = e3;
  57002. } }, { key: "getCustomStatus", value: function() {
  57003. return this._customStatus;
  57004. } }, { key: "getScene", value: function() {
  57005. return Ae ? window.tencent_cloud_im_csig_flutter_for_web_25F_cy : this._isTUIKit() ? "tuikit" : this._scene;
  57006. } }, { key: "getInstanceID", value: function() {
  57007. return this._instanceID;
  57008. } }, { key: "getStatusInstanceID", value: function() {
  57009. return this._statusInstanceID;
  57010. } }, { key: "setStatusInstanceID", value: function(e3) {
  57011. this._statusInstanceID = e3;
  57012. } }, { key: "getVersion", value: function() {
  57013. return this._version;
  57014. } }, { key: "getA2Key", value: function() {
  57015. return this._a2Key;
  57016. } }, { key: "setA2Key", value: function(e3) {
  57017. this._a2Key = e3;
  57018. } }, { key: "getContentType", value: function() {
  57019. return this._contentType;
  57020. } }, { key: "getProxyServer", value: function() {
  57021. return this._proxyServer;
  57022. } }, { key: "getFileUploadProxy", value: function() {
  57023. return this._fileUploadProxy;
  57024. } }, { key: "getFileDownloadProxy", value: function() {
  57025. return this._fileDownloadProxy;
  57026. } }, { key: "_isTUIKit", value: function() {
  57027. var e3 = false, t2 = false, n2 = false, o2 = false, s2 = [];
  57028. ae && (s2 = Object.keys(re)), ie && (s2 = se ? Object.keys(uni) : Object.keys(window));
  57029. for (var a2 = 0, i2 = s2.length; a2 < i2; a2++)
  57030. if (s2[a2].toLowerCase().includes("uikit")) {
  57031. e3 = true;
  57032. break;
  57033. }
  57034. if (s2 = null, ae && !ut(re.createGamePortal) && ut(getApp) && !it(getApp())) {
  57035. var r2 = getApp().globalData;
  57036. st(r2) && true === r2.isTUIKit && (t2 = true);
  57037. }
  57038. true === this._m.getModule(Vn).getStorageSync("TIM_".concat(this._SDKAppID, "_isTUIKit")) && (n2 = true);
  57039. var u2 = null;
  57040. if (X && !$ && "undefined" == typeof uni && __wxConfig && (u2 = __wxConfig.pages), Q && "undefined" == typeof uni && __qqConfig && (u2 = __qqConfig.pages), at(u2) && u2.length > 0) {
  57041. for (var c2 = 0, l2 = u2.length; c2 < l2; c2++)
  57042. if (u2[c2].toLowerCase().includes("tui")) {
  57043. o2 = true;
  57044. break;
  57045. }
  57046. u2 = null;
  57047. }
  57048. return e3 || t2 || n2 || o2;
  57049. } }, { key: "reset", value: function() {
  57050. this._isLoggedIn = false, this._userSig = "", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._statusInstanceID = 0;
  57051. } }]), e2;
  57052. }(), $i = function(e2) {
  57053. r(n2, e2);
  57054. var t2 = f(n2);
  57055. function n2(e3) {
  57056. var s2;
  57057. return o(this, n2), (s2 = t2.call(this, e3))._n = "SignModule", s2._helloInterval = 120, s2._lastLoginTs = 0, s2._lastWsHelloTs = 0, s2._isWebUniapp = 0, oi.mixin(h(s2)), s2;
  57058. }
  57059. return a(n2, [{ key: "onCheckTimer", value: function(e3) {
  57060. this.isLoggedIn() && e3 % this._helloInterval == 0 && this._hello();
  57061. } }, { key: "login", value: function(e3) {
  57062. var t3 = "";
  57063. if (this.isLoggedIn()) {
  57064. var n3 = this.getMyUserID();
  57065. return (t3 = this.getErrorMessage("RepeatLogin", n3)) && Ve.w(t3), Xa({ actionStatus: "OK", errorCode: 0, errorInfo: t3, repeatLogin: true });
  57066. }
  57067. if (Date.now() - this._lastLoginTs <= 15e3)
  57068. return this.outputWarning("LoggingIn", e3.userID), Za({ code: ha.REPEAT_LOGIN });
  57069. Ve.l("".concat(this._n, ".login userID:").concat(e3.userID));
  57070. var o2 = this._checkLoginInfo(e3);
  57071. if (0 !== o2.code)
  57072. return Za(o2);
  57073. var s2 = this.getModule(xn), a2 = e3.userID, i2 = e3.userSig;
  57074. return s2.setUserID(a2), s2.setUserSig(i2), this.getModule(zn).updateProtocolConfig(), this._login();
  57075. } }, { key: "_login", value: function() {
  57076. var e3 = this, t3 = this.getModule(xn), n3 = t3.getScene(), o2 = 0, s2 = new Aa("login");
  57077. s2.setMessage("".concat(n3)).setMoreMessage("identifier:".concat(this.getMyUserID())), se ? "tuikit" === n3 ? s2.setUIPlatform(4) : s2.setUIPlatform(3) : ae ? "tuikit" === n3 ? s2.setUIPlatform(12) : s2.setUIPlatform(11) : ie && (Ae ? "flutter_web_uikit" === n3 ? s2.setUIPlatform(21) : s2.setUIPlatform(20) : this._isReactUIKit() ? Le ? s2.setUIPlatform(25) : s2.setUIPlatform(24) : Le ? "tuikit" === n3 ? s2.setUIPlatform(17) : s2.setUIPlatform(16) : "tuikit" === n3 ? s2.setUIPlatform(14) : s2.setUIPlatform(13));
  57078. var a2 = this.getModule(no);
  57079. if (a2.canIUseOfflinePush()) {
  57080. this._isWebUniapp = a2.getUniAppPlatform();
  57081. var i2 = this._getStatusInstanceID();
  57082. t3.setStatusInstanceID(i2), this.getModule(zn).updateProtocolConfig(), o2 = a2.getDeviceBrand();
  57083. }
  57084. var r2 = "".concat(this._n, "._login");
  57085. return this._lastLoginTs = Date.now(), this.request({ protocolName: co, requestData: { deviceBrand: o2, isWebUniapp: this._isWebUniapp } }).then(function(o3) {
  57086. e3._lastLoginTs = 0;
  57087. var a3 = Date.now(), i3 = null, u2 = o3.data, c2 = u2.a2Key, l2 = u2.tinyID, d2 = u2.helloInterval, p2 = u2.instanceID, g2 = u2.timeStamp, h2 = u2.customStatus, _2 = void 0 === h2 ? "" : h2, f2 = u2.purchaseBits;
  57088. Ve.l("".concat(r2, " ok. scene:").concat(n3, " helloInterval:").concat(d2, " instanceID:").concat(p2, " timeStamp:").concat(g2));
  57089. var v2 = 1e3 * g2, m2 = a3 - s2.getStartTs(), M2 = v2 + parseInt(m2 / 2) - a3, y2 = s2.getStartTs() + M2;
  57090. if (s2.start(y2), function(e4, t4) {
  57091. Ue = t4;
  57092. var n4 = /* @__PURE__ */ new Date();
  57093. n4.setTime(e4), Ve.i("baseTime from server:".concat(n4, " offset:").concat(Ue));
  57094. }(v2, M2), !l2)
  57095. throw i3 = new ja({ code: ha.NO_TINYID }), s2.setError(i3, true, e3.getNetworkType()).end(), i3;
  57096. if (!c2)
  57097. throw i3 = new ja({ code: ha.NO_A2KEY }), s2.setError(i3, true, e3.getNetworkType()).end(), i3;
  57098. var I2 = Ji(_2);
  57099. (s2.setNetworkType(e3.getNetworkType()).setMoreMessage("helloInterval:".concat(d2, " instanceID:").concat(p2, " offset:").concat(M2, " customStatus:").concat(I2)).end(), t3.setA2Key(c2), t3.setTinyID(l2), t3.setStatusInstanceID(p2), t3.setCustomStatus(I2), f2) && e3.getModule(to).onPushedConfig({ errorCode: 0, expiredTime: 0, purchaseBits: f2 });
  57100. e3.getModule(zn).updateProtocolConfig(), e3.emitInnerEvent(ei), e3._helloInterval = d2, e3.triggerReady();
  57101. var C2 = e3.getModule(no);
  57102. return C2.canIUseOfflinePush() && (uni.setStorageSync("timUniAppInstanceID", p2), C2.init()), e3._fetchCloudControlConfig(), e3.getModule(oo).init(), o3;
  57103. }).catch(function(t4) {
  57104. return e3.probeNetwork().then(function(e4) {
  57105. var n4 = v(e4, 2), o3 = n4[0], a3 = n4[1];
  57106. s2.setError(t4, o3, a3).end(true);
  57107. }), e3._m.setNotReadyReason(ha.LOGIN_FAILED), Ve.e("".concat(r2, " failed. error:"), t4), e3._lastLoginTs = 0, e3._m.onLoginFailed(), Za(t4);
  57108. });
  57109. } }, { key: "logout", value: function() {
  57110. var e3 = this, t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
  57111. if (!this.isLoggedIn())
  57112. return Za({ code: ha.USER_NOT_LOGGED_IN });
  57113. var n3 = new Aa("logout");
  57114. n3.setNetworkType(this.getNetworkType()).setMessage("identifier:".concat(this.getMyUserID())).end(true);
  57115. var o2 = "".concat(this._n, ".logout");
  57116. return Ve.i("".concat(o2, " type:").concat(t3)), 0 === t3 && this._m.setNotReadyReason(ha.LOGGED_OUT), this.request({ protocolName: lo, requestData: { type: t3 } }).then(function() {
  57117. return e3.resetReady(), Xa({});
  57118. }).catch(function(t4) {
  57119. return Ve.e("".concat(o2, " error:"), t4), e3.resetReady(), Xa({});
  57120. });
  57121. } }, { key: "_fetchCloudControlConfig", value: function() {
  57122. this.getModule(Zn).fetchConfig();
  57123. } }, { key: "_getStatusInstanceID", value: function() {
  57124. return uni.getStorageSync("timUniAppInstanceID");
  57125. } }, { key: "_hello", value: function() {
  57126. var e3 = this;
  57127. this._lastWsHelloTs = Date.now(), this.request({ protocolName: po, requestData: { isWebUniapp: this._isWebUniapp } }).catch(function(t3) {
  57128. Ve.w("".concat(e3._n, "._hello error:"), t3);
  57129. });
  57130. } }, { key: "getLastWsHelloTs", value: function() {
  57131. return this._lastWsHelloTs;
  57132. } }, { key: "_checkLoginInfo", value: function(e3) {
  57133. var t3 = 0;
  57134. return zt(this.getModule(xn).getSDKAppID()) ? t3 = ha.NO_SDKAPPID : zt(e3.userID) ? t3 = ha.NO_IDENTIFIER : zt(e3.userSig) && (t3 = ha.NO_USERSIG), { code: t3 };
  57135. } }, { key: "_isReactUIKit", value: function() {
  57136. return ie && void 0 !== window.tencent_cloud_im_csig_react_uikit_23F_xa;
  57137. } }, { key: "onMultipleAccountKickedOut", value: function(e3) {
  57138. var t3 = this;
  57139. new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(E.KICKED_OUT_MULT_ACCOUNT, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), Ve.w("".concat(this._n, ".onMultipleAccountKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), this.logout(1).then(function() {
  57140. t3.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_MULT_ACCOUNT }), t3._m.setNotReadyReason(ha.KICKED_OUT_MULT_ACCOUNT), t3._m.reset();
  57141. });
  57142. } }, { key: "onMultipleDeviceKickedOut", value: function(e3) {
  57143. var t3 = this;
  57144. new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(E.KICKED_OUT_MULT_DEVICE, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), Ve.w("".concat(this._n, ".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), this.logout(1).then(function() {
  57145. t3.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_MULT_DEVICE }), t3._m.setNotReadyReason(ha.KICKED_OUT_MULT_DEVICE), t3._m.reset();
  57146. });
  57147. } }, { key: "onUserSigExpired", value: function() {
  57148. new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage(E.KICKED_OUT_USERSIG_EXPIRED).end(true), Ve.w("".concat(this._n, ".onUserSigExpired: userSig expired")), 0 !== this.getModule(xn).getStatusInstanceID() && (this.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_USERSIG_EXPIRED }), this._m.setNotReadyReason(ha.KICKED_OUT_USERSIG_EXPIRED), this._m.reset());
  57149. } }, { key: "onRestApiKickedOut", value: function(e3) {
  57150. (new Aa("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(E.KICKED_OUT_REST_API, " newInstanceInfo:").concat(JSON.stringify(e3))).end(true), Ve.w("".concat(this._n, ".onRestApiKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e3), 0 !== this.getModule(xn).getStatusInstanceID()) && (this.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_REST_API }), this._m.setNotReadyReason(ha.KICKED_OUT_REST_API), this._m.reset(), this.getModule(Jn).onRestApiKickedOut());
  57151. } }, { key: "reset", value: function() {
  57152. Ve.l("".concat(this._n, ".reset")), this.resetReady(), this._helloInterval = 120, this._lastLoginTs = 0, this._lastWsHelloTs = 0, this._isWebUniapp = 0;
  57153. } }]), n2;
  57154. }(uo);
  57155. function er() {
  57156. return null;
  57157. }
  57158. var tr = function() {
  57159. function e2(t2) {
  57160. o(this, e2), this._m = t2, this._n = "StorageModule", this._storageQueue = /* @__PURE__ */ new Map(), this._errorTolerantHandle();
  57161. }
  57162. return a(e2, [{ key: "_errorTolerantHandle", value: function() {
  57163. ae || !it(window) && this._canIUseCookies() || (this.getItem = er, this.setItem = er, this.removeItem = er, this.clear = er);
  57164. } }, { key: "onCheckTimer", value: function(e3) {
  57165. if (e3 % 20 == 0) {
  57166. if (0 === this._storageQueue.size)
  57167. return;
  57168. this._doFlush();
  57169. }
  57170. } }, { key: "_doFlush", value: function() {
  57171. try {
  57172. var e3, t2 = D(this._storageQueue);
  57173. try {
  57174. for (t2.s(); !(e3 = t2.n()).done; ) {
  57175. var n2 = v(e3.value, 2), o2 = n2[0], s2 = n2[1];
  57176. this._setStorageSync(this._getKey(o2), s2);
  57177. }
  57178. } catch (a2) {
  57179. t2.e(a2);
  57180. } finally {
  57181. t2.f();
  57182. }
  57183. this._storageQueue.clear();
  57184. } catch (i2) {
  57185. Ve.w("".concat(this._n, "._doFlush error:"), i2);
  57186. }
  57187. } }, { key: "_getPrefix", value: function() {
  57188. var e3 = this._m.getModule(xn);
  57189. return "TIM_".concat(e3.getSDKAppID(), "_").concat(e3.getUserID(), "_");
  57190. } }, { key: "_getKey", value: function(e3) {
  57191. return "".concat(this._getPrefix()).concat(e3);
  57192. } }, { key: "getItem", value: function(e3) {
  57193. var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
  57194. try {
  57195. var n2 = t2 ? this._getKey(e3) : e3;
  57196. return this.getStorageSync(n2);
  57197. } catch (o2) {
  57198. return Ve.w("".concat(this._n, ".getItem error:"), o2), {};
  57199. }
  57200. } }, { key: "setItem", value: function(e3, t2) {
  57201. var n2 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], o2 = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3];
  57202. if (n2) {
  57203. var s2 = o2 ? this._getKey(e3) : e3;
  57204. this._setStorageSync(s2, t2);
  57205. } else
  57206. this._storageQueue.set(e3, t2);
  57207. } }, { key: "clear", value: function() {
  57208. try {
  57209. ae ? re.clearStorageSync() : this._canIUseCookies() && localStorage.clear();
  57210. } catch (e3) {
  57211. Ve.w("".concat(this._n, ".clear error:"), e3);
  57212. }
  57213. } }, { key: "removeItem", value: function(e3) {
  57214. var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
  57215. try {
  57216. var n2 = t2 ? this._getKey(e3) : e3;
  57217. this._removeStorageSync(n2);
  57218. } catch (o2) {
  57219. Ve.w("".concat(this._n, ".removeItem error:"), o2);
  57220. }
  57221. } }, { key: "getSize", value: function(e3) {
  57222. var t2 = this, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "b";
  57223. try {
  57224. var o2 = { size: 0, limitSize: 5242880, unit: n2 };
  57225. if (Object.defineProperty(o2, "leftSize", { enumerable: true, get: function() {
  57226. return o2.limitSize - o2.size;
  57227. } }), ae && (o2.limitSize = 1024 * re.getStorageInfoSync().limitSize), e3)
  57228. o2.size = JSON.stringify(this.getItem(e3)).length + this._getKey(e3).length;
  57229. else if (ae) {
  57230. var s2 = re.getStorageInfoSync(), a2 = s2.keys;
  57231. a2.forEach(function(e4) {
  57232. o2.size += JSON.stringify(t2.getStorageSync(e4)).length + t2._getKey(e4).length;
  57233. });
  57234. } else if (this._canIUseCookies())
  57235. for (var i2 in localStorage)
  57236. localStorage.hasOwnProperty(i2) && (o2.size += localStorage.getItem(i2).length + i2.length);
  57237. return this._convertUnit(o2);
  57238. } catch (r2) {
  57239. Ve.w("".concat(this._n, " error:"), r2);
  57240. }
  57241. } }, { key: "_convertUnit", value: function(e3) {
  57242. var t2 = {}, n2 = e3.unit;
  57243. for (var o2 in t2.unit = n2, e3)
  57244. "number" == typeof e3[o2] && ("kb" === n2.toLowerCase() ? t2[o2] = Math.round(e3[o2] / 1024) : "mb" === n2.toLowerCase() ? t2[o2] = Math.round(e3[o2] / 1024 / 1024) : t2[o2] = e3[o2]);
  57245. return t2;
  57246. } }, { key: "_setStorageSync", value: function(e3, t2) {
  57247. ae ? te ? my.setStorageSync({ key: e3, data: t2 }) : re.setStorageSync(e3, t2) : this._canIUseCookies() && localStorage.setItem(e3, JSON.stringify(t2));
  57248. } }, { key: "getStorageSync", value: function(e3) {
  57249. return ae ? te ? my.getStorageSync({ key: e3 }).data : re.getStorageSync(e3) : this._canIUseCookies() ? JSON.parse(localStorage.getItem(e3)) : {};
  57250. } }, { key: "_removeStorageSync", value: function(e3) {
  57251. ae ? te ? my.removeStorageSync({ key: e3 }) : re.removeStorageSync(e3) : this._canIUseCookies() && localStorage.removeItem(e3);
  57252. } }, { key: "_canIUseCookies", value: function() {
  57253. return navigator && navigator.cookieEnabled && localStorage;
  57254. } }, { key: "reset", value: function() {
  57255. Ve.l("".concat(this._n, ".reset")), this._doFlush();
  57256. } }]), e2;
  57257. }(), nr = function() {
  57258. function e2(t2) {
  57259. o(this, e2), this._n = "SSOLogBody", this._report = [];
  57260. }
  57261. return a(e2, [{ key: "pushIn", value: function(e3) {
  57262. Ve.d("".concat(this._n, ".pushIn"), this._report.length, e3), this._report.push(e3);
  57263. } }, { key: "backfill", value: function(e3) {
  57264. var t2;
  57265. at(e3) && 0 !== e3.length && (Ve.d("".concat(this._n, ".backfill"), this._report.length, e3.length), (t2 = this._report).unshift.apply(t2, m(e3)));
  57266. } }, { key: "getLogsNumInMemory", value: function() {
  57267. return this._report.length;
  57268. } }, { key: "isEmpty", value: function() {
  57269. return 0 === this._report.length;
  57270. } }, { key: "_reset", value: function() {
  57271. this._report.length = 0, this._report = [];
  57272. } }, { key: "getLogsInMemory", value: function() {
  57273. var e3 = this._report.slice();
  57274. return this._reset(), e3;
  57275. } }]), e2;
  57276. }(), or = function(e2) {
  57277. var t2 = e2.getModule(xn);
  57278. return { SDKType: 10, SDKAppID: t2.getSDKAppID(), SDKVersion: t2.getVersion(), tinyID: Number(t2.getTinyID()), userID: t2.getUserID(), platform: e2.getPlatform(), instanceID: t2.getInstanceID(), traceID: Pe() };
  57279. }, sr = function(e2) {
  57280. r(s2, e2);
  57281. var n2 = f(s2);
  57282. function s2(e3) {
  57283. var t2;
  57284. o(this, s2), (t2 = n2.call(this, e3))._n = "EventStatModule", t2.TAG = "im-ssolog-event", t2._reportBody = new nr(), t2.MIN_THRESHOLD = 20, t2.MAX_THRESHOLD = 100, t2.WAITING_TIME = 6e4, t2.REPORT_LEVEL = [4, 5, 6], t2.REPORT_SDKAPPID_BLACKLIST = [], t2.REPORT_TINYID_WHITELIST = [], t2._lastReportTime = Date.now();
  57285. var a2 = t2.getInnerEmitterInstance();
  57286. return a2.on(ei, t2._onLoginSuccess, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
  57287. }
  57288. return a(s2, [{ key: "reportAtOnce", value: function() {
  57289. Ve.d("".concat(this._n, ".reportAtOnce")), this._report();
  57290. } }, { key: "_onLoginSuccess", value: function() {
  57291. var e3 = this, t2 = this.getModule(Vn), n3 = t2.getItem(this.TAG, false);
  57292. !zt(n3) && ut(n3.forEach) && (Ve.l("".concat(this._n, "._onLoginSuccess get ssolog in storage, count:").concat(n3.length)), n3.forEach(function(t3) {
  57293. e3._reportBody.pushIn(t3);
  57294. }), t2.removeItem(this.TAG, false));
  57295. } }, { key: "_onCloudConfigUpdated", value: function() {
  57296. var e3 = this.getCloudConfig("evt_rpt_threshold"), t2 = this.getCloudConfig("evt_rpt_waiting"), n3 = this.getCloudConfig("evt_rpt_level"), o2 = this.getCloudConfig("evt_rpt_sdkappid_bl"), s3 = this.getCloudConfig("evt_rpt_tinyid_wl");
  57297. it(e3) || (this.MIN_THRESHOLD = Number(e3)), it(t2) || (this.WAITING_TIME = Number(t2)), it(n3) || (this.REPORT_LEVEL = n3.split(",").map(function(e4) {
  57298. return Number(e4);
  57299. })), it(o2) || (this.REPORT_SDKAPPID_BLACKLIST = o2.split(",").map(function(e4) {
  57300. return Number(e4);
  57301. })), it(s3) || (this.REPORT_TINYID_WHITELIST = s3.split(","));
  57302. } }, { key: "pushIn", value: function(e3) {
  57303. e3 instanceof Aa && (e3.updateTimeStamp(), this._reportBody.pushIn(e3), this._reportBody.getLogsNumInMemory() >= this.MIN_THRESHOLD && this._report());
  57304. } }, { key: "onCheckTimer", value: function() {
  57305. Date.now() < this._lastReportTime + this.WAITING_TIME || this._reportBody.isEmpty() || this._report();
  57306. } }, { key: "_filterLogs", value: function(e3) {
  57307. var t2 = this, n3 = this.getModule(xn), o2 = n3.getSDKAppID(), s3 = n3.getTinyID();
  57308. return Ft(this.REPORT_SDKAPPID_BLACKLIST, o2) && !qt(this.REPORT_TINYID_WHITELIST, s3) ? [] : e3.filter(function(e4) {
  57309. return t2.REPORT_LEVEL.includes(e4.level);
  57310. });
  57311. } }, { key: "_report", value: function() {
  57312. var e3 = this;
  57313. if (!this._reportBody.isEmpty()) {
  57314. var n3 = this._reportBody.getLogsInMemory(), o2 = this._filterLogs(n3);
  57315. if (0 !== o2.length) {
  57316. var s3 = { header: or(this), event: o2 };
  57317. this.request({ protocolName: Bs, requestData: t({}, s3) }).then(function() {
  57318. e3._lastReportTime = Date.now();
  57319. }).catch(function(t2) {
  57320. Ve.w("".concat(e3._n, ".report failed. networkType:").concat(e3.getNetworkType(), " error:"), t2), e3._reportBody.backfill(n3), e3._reportBody.getLogsNumInMemory() > e3.MAX_THRESHOLD && e3._flushAtOnce();
  57321. });
  57322. } else
  57323. this._lastReportTime = Date.now();
  57324. }
  57325. } }, { key: "_flushAtOnce", value: function() {
  57326. var e3 = this.getModule(Vn), t2 = e3.getItem(this.TAG, false), n3 = this._reportBody.getLogsInMemory(), o2 = "".concat(this._n, "._flushAtOnce");
  57327. if (zt(t2))
  57328. Ve.l("".concat(o2, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false);
  57329. else {
  57330. var s3 = n3.concat(t2);
  57331. s3.length > this.MAX_THRESHOLD && (s3 = s3.slice(0, this.MAX_THRESHOLD)), Ve.l("".concat(o2, " count:").concat(s3.length)), e3.setItem(this.TAG, s3, true, false);
  57332. }
  57333. } }, { key: "reset", value: function() {
  57334. Ve.l("".concat(this._n, ".reset")), this._lastReportTime = 0, this._report(), this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [];
  57335. } }]), s2;
  57336. }(uo), ar = "none", ir = "online", rr = [ha.OVER_FREQUENCY_LIMIT, ha.OPEN_SERVICE_OVERLOAD_ERROR], ur = function() {
  57337. function e2(t2) {
  57338. o(this, e2), this._m = t2, this._networkType = "", this._n = "NetMonitorModule", this.MAX_WAIT_TIME = 3e3, this._mpNetworkStatusCallback = null, this._webOnlineCallback = null, this._webOfflineCallback = null;
  57339. }
  57340. return a(e2, [{ key: "start", value: function() {
  57341. var e3 = this;
  57342. ae ? (re.getNetworkType({ success: function(t2) {
  57343. e3._networkType = t2.networkType || t2.subtype || "", t2.networkType === ar ? Ve.w("".concat(e3._n, ".start no network, please check!")) : Ve.i("".concat(e3._n, ".start networkType:").concat(t2.networkType));
  57344. } }), this._mpNetworkStatusCallback = this._onNetworkStatusChange.bind(this), re.onNetworkStatusChange(this._mpNetworkStatusCallback)) : (this._networkType = ir, this._webOnlineCallback = this._onWebOnline.bind(this), this._webOfflineCallback = this._onWebOffline.bind(this), window && (window.addEventListener("online", this._webOnlineCallback), window.addEventListener("offline", this._webOfflineCallback)));
  57345. } }, { key: "_onWebOnline", value: function() {
  57346. this._onNetworkStatusChange({ isConnected: true, networkType: ir });
  57347. } }, { key: "_onWebOffline", value: function() {
  57348. this._onNetworkStatusChange({ isConnected: false, networkType: ar });
  57349. } }, { key: "_onNetworkStatusChange", value: function(e3) {
  57350. var t2 = e3.isConnected, n2 = e3.networkType, o2 = "".concat(this._n, "._onNetworkStatusChange"), s2 = false;
  57351. t2 ? (Ve.i("".concat(o2, " previous:").concat(this._networkType, " current:").concat(n2)), this._networkType !== n2 && (s2 = true, this._m.getModule(Jn).reConnect(true))) : this._networkType !== n2 && (s2 = true, Ve.w("".concat(o2, " no network, please check!")), this._m.getModule(Jn).offline());
  57352. s2 && (new Aa("networkChange").setMessage("isConnected:".concat(t2, " previousNetworkType:").concat(this._networkType, " networkType:").concat(n2)).end(), this._networkType = n2);
  57353. } }, { key: "probe", value: function(e3) {
  57354. var t2 = this;
  57355. if (!it(e3) && rr.includes(e3.code))
  57356. return Promise.resolve([true, this._networkType]);
  57357. var n2 = "".concat(this._n, ".probe");
  57358. return new Promise(function(e4, o2) {
  57359. ae ? re.getNetworkType({ success: function(o3) {
  57360. t2._networkType = o3.networkType, o3.networkType === ar ? (Ve.w("".concat(n2, " no network, please check!")), e4([false, o3.networkType])) : (Ve.i("".concat(n2, " networkType:").concat(o3.networkType)), e4([true, o3.networkType]));
  57361. } }) : t2._networkType === ar ? e4([false, ar]) : e4([true, ir]);
  57362. });
  57363. } }, { key: "getNetworkType", value: function() {
  57364. return this._networkType;
  57365. } }, { key: "reset", value: function() {
  57366. Ve.l("".concat(this._n, ".reset")), ae ? null !== this._mpNetworkStatusCallback && (re.offNetworkStatusChange && (oe || $ ? re.offNetworkStatusChange(this._mpNetworkStatusCallback) : re.offNetworkStatusChange()), this._mpNetworkStatusCallback = null) : window && (null !== this._webOnlineCallback && (window.removeEventListener("online", this._webOnlineCallback), this._webOnlineCallback = null), null !== this._onWebOffline && (window.removeEventListener("offline", this._webOfflineCallback), this._webOfflineCallback = null));
  57367. } }]), e2;
  57368. }();
  57369. function cr(e2, t2) {
  57370. return e2(t2 = { exports: {} }, t2.exports), t2.exports;
  57371. }
  57372. var lr = cr(function(e2) {
  57373. var t2 = Object.prototype.hasOwnProperty, n2 = "~";
  57374. function o2() {
  57375. }
  57376. function s2(e3, t3, n3) {
  57377. this.fn = e3, this.context = t3, this.once = n3 || false;
  57378. }
  57379. function a2(e3, t3, o3, a3, i3) {
  57380. if ("function" != typeof o3)
  57381. throw new TypeError("The listener must be a function");
  57382. var r3 = new s2(o3, a3 || e3, i3), u2 = n2 ? n2 + t3 : t3;
  57383. return e3._events[u2] ? e3._events[u2].fn ? e3._events[u2] = [e3._events[u2], r3] : e3._events[u2].push(r3) : (e3._events[u2] = r3, e3._eventsCount++), e3;
  57384. }
  57385. function i2(e3, t3) {
  57386. 0 == --e3._eventsCount ? e3._events = new o2() : delete e3._events[t3];
  57387. }
  57388. function r2() {
  57389. this._events = new o2(), this._eventsCount = 0;
  57390. }
  57391. Object.create && (o2.prototype = /* @__PURE__ */ Object.create(null), new o2().__proto__ || (n2 = false)), r2.prototype.eventNames = function() {
  57392. var e3, o3, s3 = [];
  57393. if (0 === this._eventsCount)
  57394. return s3;
  57395. for (o3 in e3 = this._events)
  57396. t2.call(e3, o3) && s3.push(n2 ? o3.slice(1) : o3);
  57397. return Object.getOwnPropertySymbols ? s3.concat(Object.getOwnPropertySymbols(e3)) : s3;
  57398. }, r2.prototype.listeners = function(e3) {
  57399. var t3 = n2 ? n2 + e3 : e3, o3 = this._events[t3];
  57400. if (!o3)
  57401. return [];
  57402. if (o3.fn)
  57403. return [o3.fn];
  57404. for (var s3 = 0, a3 = o3.length, i3 = new Array(a3); s3 < a3; s3++)
  57405. i3[s3] = o3[s3].fn;
  57406. return i3;
  57407. }, r2.prototype.listenerCount = function(e3) {
  57408. var t3 = n2 ? n2 + e3 : e3, o3 = this._events[t3];
  57409. return o3 ? o3.fn ? 1 : o3.length : 0;
  57410. }, r2.prototype.emit = function(e3, t3, o3, s3, a3, i3) {
  57411. var r3 = n2 ? n2 + e3 : e3;
  57412. if (!this._events[r3])
  57413. return false;
  57414. var u2, c2, l2 = this._events[r3], d2 = arguments.length;
  57415. if (l2.fn) {
  57416. switch (l2.once && this.removeListener(e3, l2.fn, void 0, true), d2) {
  57417. case 1:
  57418. return l2.fn.call(l2.context), true;
  57419. case 2:
  57420. return l2.fn.call(l2.context, t3), true;
  57421. case 3:
  57422. return l2.fn.call(l2.context, t3, o3), true;
  57423. case 4:
  57424. return l2.fn.call(l2.context, t3, o3, s3), true;
  57425. case 5:
  57426. return l2.fn.call(l2.context, t3, o3, s3, a3), true;
  57427. case 6:
  57428. return l2.fn.call(l2.context, t3, o3, s3, a3, i3), true;
  57429. }
  57430. for (c2 = 1, u2 = new Array(d2 - 1); c2 < d2; c2++)
  57431. u2[c2 - 1] = arguments[c2];
  57432. l2.fn.apply(l2.context, u2);
  57433. } else {
  57434. var p2, g2 = l2.length;
  57435. for (c2 = 0; c2 < g2; c2++)
  57436. switch (l2[c2].once && this.removeListener(e3, l2[c2].fn, void 0, true), d2) {
  57437. case 1:
  57438. l2[c2].fn.call(l2[c2].context);
  57439. break;
  57440. case 2:
  57441. l2[c2].fn.call(l2[c2].context, t3);
  57442. break;
  57443. case 3:
  57444. l2[c2].fn.call(l2[c2].context, t3, o3);
  57445. break;
  57446. case 4:
  57447. l2[c2].fn.call(l2[c2].context, t3, o3, s3);
  57448. break;
  57449. default:
  57450. if (!u2)
  57451. for (p2 = 1, u2 = new Array(d2 - 1); p2 < d2; p2++)
  57452. u2[p2 - 1] = arguments[p2];
  57453. l2[c2].fn.apply(l2[c2].context, u2);
  57454. }
  57455. }
  57456. return true;
  57457. }, r2.prototype.on = function(e3, t3, n3) {
  57458. return a2(this, e3, t3, n3, false);
  57459. }, r2.prototype.once = function(e3, t3, n3) {
  57460. return a2(this, e3, t3, n3, true);
  57461. }, r2.prototype.removeListener = function(e3, t3, o3, s3) {
  57462. var a3 = n2 ? n2 + e3 : e3;
  57463. if (!this._events[a3])
  57464. return this;
  57465. if (!t3)
  57466. return i2(this, a3), this;
  57467. var r3 = this._events[a3];
  57468. if (r3.fn)
  57469. r3.fn !== t3 || s3 && !r3.once || o3 && r3.context !== o3 || i2(this, a3);
  57470. else {
  57471. for (var u2 = 0, c2 = [], l2 = r3.length; u2 < l2; u2++)
  57472. (r3[u2].fn !== t3 || s3 && !r3[u2].once || o3 && r3[u2].context !== o3) && c2.push(r3[u2]);
  57473. c2.length ? this._events[a3] = 1 === c2.length ? c2[0] : c2 : i2(this, a3);
  57474. }
  57475. return this;
  57476. }, r2.prototype.removeAllListeners = function(e3) {
  57477. var t3;
  57478. return e3 ? (t3 = n2 ? n2 + e3 : e3, this._events[t3] && i2(this, t3)) : (this._events = new o2(), this._eventsCount = 0), this;
  57479. }, r2.prototype.off = r2.prototype.removeListener, r2.prototype.addListener = r2.prototype.on, r2.prefixed = n2, r2.EventEmitter = r2, e2.exports = r2;
  57480. }), dr = function(e2) {
  57481. r(n2, e2);
  57482. var t2 = f(n2);
  57483. function n2(e3) {
  57484. var s2;
  57485. return o(this, n2), (s2 = t2.call(this, e3))._n = "BigDataChannelModule", s2.FILETYPE = { SOUND: 2106, FILE: 2107, VIDEO: 2113 }, s2._bdh_download_server = "grouptalk.c2c.qq.com", s2._BDHBizID = 10001, s2._authKey = "", s2._expireTime = 0, s2.getInnerEmitterInstance().on(ei, s2._getAuthKey, h(s2)), s2;
  57486. }
  57487. return a(n2, [{ key: "_getAuthKey", value: function() {
  57488. var e3 = this;
  57489. this.isIntl() || this.request({ protocolName: _o }).then(function(t3) {
  57490. t3.data.authKey && (e3._authKey = t3.data.authKey, e3._expireTime = parseInt(t3.data.expireTime));
  57491. });
  57492. } }, { key: "_isFromOlderVersion", value: function(e3) {
  57493. return !(!e3.content || 2 === e3.content.downloadFlag);
  57494. } }, { key: "parseElements", value: function(e3, t3) {
  57495. if (!at(e3) || !t3)
  57496. return [];
  57497. for (var n3 = [], o2 = null, s2 = 0; s2 < e3.length; s2++)
  57498. o2 = e3[s2], this._needParse(o2) ? n3.push(this._parseElement(o2, t3)) : n3.push(e3[s2]);
  57499. return n3;
  57500. } }, { key: "_needParse", value: function(e3) {
  57501. return !e3.cloudCustomData && !(!this._isFromOlderVersion(e3) || e3.type !== E.MSG_AUDIO && e3.type !== E.MSG_FILE && e3.type !== E.MSG_VIDEO);
  57502. } }, { key: "_parseElement", value: function(e3, t3) {
  57503. switch (e3.type) {
  57504. case E.MSG_AUDIO:
  57505. return this._parseAudioElement(e3, t3);
  57506. case E.MSG_FILE:
  57507. return this._parseFileElement(e3, t3);
  57508. case E.MSG_VIDEO:
  57509. return this._parseVideoElement(e3, t3);
  57510. }
  57511. } }, { key: "_parseAudioElement", value: function(e3, t3) {
  57512. return e3.content.url = this._genAudioUrl(e3.content.uuid, t3), e3;
  57513. } }, { key: "_parseFileElement", value: function(e3, t3) {
  57514. return e3.content.url = this._genFileUrl(e3.content.uuid, t3, e3.content.fileName), e3;
  57515. } }, { key: "_parseVideoElement", value: function(e3, t3) {
  57516. return e3.content.url = this._genVideoUrl(e3.content.uuid, t3), e3;
  57517. } }, { key: "_genAudioUrl", value: function(e3, t3) {
  57518. if ("" === this._authKey)
  57519. return "";
  57520. var n3 = this.getModule(xn).getSDKAppID();
  57521. return "https://".concat(this._bdh_download_server, "/asn.com/stddownload_common_file?authkey=").concat(this._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(n3, "&fileid=").concat(e3, "&filetype=").concat(this.FILETYPE.SOUND, "&openid=").concat(t3, "&ver=0");
  57522. } }, { key: "_genFileUrl", value: function(e3, t3, n3) {
  57523. if ("" === this._authKey)
  57524. return "";
  57525. n3 || (n3 = "".concat(Math.floor(1e5 * Math.random()), "-").concat(Date.now()));
  57526. var o2 = this.getModule(xn).getSDKAppID();
  57527. return "https://".concat(this._bdh_download_server, "/asn.com/stddownload_common_file?authkey=").concat(this._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(o2, "&fileid=").concat(e3, "&filetype=").concat(this.FILETYPE.FILE, "&openid=").concat(t3, "&ver=0&filename=").concat(encodeURIComponent(n3));
  57528. } }, { key: "_genVideoUrl", value: function(e3, t3) {
  57529. if ("" === this._authKey)
  57530. return "";
  57531. var n3 = this.getModule(xn).getSDKAppID();
  57532. return "https://".concat(this._bdh_download_server, "/asn.com/stddownload_common_file?authkey=").concat(this._authKey, "&bid=").concat(this._BDHBizID, "&subbid=").concat(n3, "&fileid=").concat(e3, "&filetype=").concat(this.FILETYPE.VIDEO, "&openid=").concat(t3, "&ver=0");
  57533. } }, { key: "reset", value: function() {
  57534. this._authKey = "", this.expireTime = 0;
  57535. } }]), n2;
  57536. }(uo), pr = ["requestSnapshotUrl"], gr = function(e2) {
  57537. r(s2, e2);
  57538. var n2 = f(s2);
  57539. function s2(e3) {
  57540. var t2;
  57541. o(this, s2), (t2 = n2.call(this, e3))._n = "UploadModule", t2.TIMUploadPlugin = null, t2.timUploadPlugin = null, t2.COSSDK = null, t2._cosUploadMethod = null, t2.expiredTimeLimit = 600, t2.appid = 0, t2.bucketName = "", t2.ciUrl = "", t2.directory = "", t2.downloadUrl = "", t2.uploadUrl = "", t2.region = "ap-shanghai", t2.cos = null, t2.cosOptions = { secretId: "", secretKey: "", sessionToken: "", expiredTime: 0 }, t2.uploadFileType = "", t2.duration = 900, t2.tryCount = 0, t2.UPLOAD_SIZE_LIMIT = { AUDIO: 20971520, FILE: 104857600, IMAGE: 20971520, VIDEO: 104857600 };
  57542. var a2 = t2.getInnerEmitterInstance();
  57543. return a2.on(ei, t2._init, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
  57544. }
  57545. return a(s2, [{ key: "_init", value: function() {
  57546. var e3 = this.getModule(Yn);
  57547. if (this.TIMUploadPlugin = e3.getPlugin("tim-upload-plugin"), this.TIMUploadPlugin)
  57548. this._initUploaderMethod();
  57549. else {
  57550. var t2 = ae ? "cos-wx-sdk" : "cos-js-sdk";
  57551. this.COSSDK = e3.getPlugin(t2), this.COSSDK ? (this._getAuthorizationKey(), this.outputWarning("CosReplacement", t2)) : this.outputWarning("PluginUndetected");
  57552. }
  57553. } }, { key: "_onCloudConfigUpdated", value: function() {
  57554. var e3 = "".concat(this._n, "._onCloudConfigUpdated"), t2 = this.getCloudConfig("upload_size_limit");
  57555. if (Ve.l("".concat(e3, " uploadSizeLimit:").concat(t2)), !it(t2))
  57556. try {
  57557. var n3 = JSON.parse(t2);
  57558. this.UPLOAD_SIZE_LIMIT = { AUDIO: n3.a ? 1048576 * parseInt(n3.a) : this.UPLOAD_SIZE_LIMIT.AUDIO, FILE: n3.f ? 1048576 * parseInt(n3.f) : this.UPLOAD_SIZE_LIMIT.FILE, IMAGE: n3.i ? 1048576 * parseInt(n3.i) : this.UPLOAD_SIZE_LIMIT.IMAGE, VIDEO: n3.v ? 1048576 * parseInt(n3.v) : this.UPLOAD_SIZE_LIMIT.VIDEO };
  57559. } catch (o2) {
  57560. Ve.e("".concat(e3, " JSON parse error. uploadSizeLimit:"), t2);
  57561. }
  57562. } }, { key: "_getAuthorizationKey", value: function() {
  57563. var e3 = this, t2 = "".concat(this._n, ".").concat("_getAuthorizationKey"), n3 = new Aa("_getAuthorizationKey"), o2 = Math.ceil(Date.now() / 1e3);
  57564. this.request({ protocolName: qs, requestData: { duration: this.expiredTimeLimit } }).then(function(s3) {
  57565. var a2 = s3.data;
  57566. Ve.l("".concat(t2, " ok. data:"), a2);
  57567. var i2 = a2.expiredTime - o2;
  57568. n3.setMessage("requestId:".concat(a2.requestId, " requestTime:").concat(o2, " expiredTime:").concat(a2.expiredTime, " diff:").concat(i2, "s")).setNetworkType(e3.getNetworkType()).end(), !ae && a2.region && (e3.region = a2.region), e3.appid = a2.appid, e3.bucketName = a2.bucketName, e3.ciUrl = a2.ciUrl, e3.directory = a2.directory, e3.downloadUrl = a2.downloadUrl, e3.uploadUrl = a2.uploadUrl, e3.cosOptions = { secretId: a2.secretId, secretKey: a2.secretKey, sessionToken: a2.sessionToken, expiredTime: a2.expiredTime }, Ve.l("".concat(t2, " ok. region:").concat(e3.region, " bucketName:").concat(e3.bucketName)), e3._initUploaderMethod();
  57569. }).catch(function(o3) {
  57570. e3.probeNetwork().then(function(e4) {
  57571. var t3 = v(e4, 2), s3 = t3[0], a2 = t3[1];
  57572. n3.setError(o3, s3, a2).end();
  57573. }), Ve.w("".concat(t2, " failed. error:"), o3);
  57574. });
  57575. } }, { key: "_getCosPreSigUrl", value: function(e3) {
  57576. var t2 = this, n3 = "".concat(this._n, ".").concat("_getCosPreSigUrl"), o2 = Math.ceil(Date.now() / 1e3), s3 = new Aa("_getCosPreSigUrl");
  57577. return this.request({ protocolName: xs, requestData: { fileType: e3.fileType, fileName: e3.fileName, uploadMethod: e3.uploadMethod, duration: e3.duration } }).then(function(e4) {
  57578. t2.tryCount = 0;
  57579. var a2 = e4.data || {}, i2 = a2.expiredTime - o2;
  57580. return Ve.l("".concat(n3, " ok. data:"), a2), s3.setMessage("requestId:".concat(a2.requestId, " expiredTime:").concat(a2.expiredTime, " diff:").concat(i2, "s")).setNetworkType(t2.getNetworkType()).end(), a2;
  57581. }).catch(function(o3) {
  57582. return -1 === o3.code && (o3.code = ha.COS_GET_SIG_FAIL), t2.probeNetwork().then(function(e4) {
  57583. var t3 = v(e4, 2), n4 = t3[0], a2 = t3[1];
  57584. s3.setError(o3, n4, a2).end();
  57585. }), Ve.w("".concat(n3, " failed. error:"), o3), t2.tryCount < 1 ? (t2.tryCount++, t2._getCosPreSigUrl(e3)) : (t2.tryCount = 0, Za({ code: ha.COS_GET_SIG_FAIL }));
  57586. });
  57587. } }, { key: "_initUploaderMethod", value: function() {
  57588. var e3 = this;
  57589. if (this.TIMUploadPlugin)
  57590. return this.timUploadPlugin = new this.TIMUploadPlugin(), void (this._cosUploadMethod = function(t2, n3) {
  57591. e3.timUploadPlugin.uploadFile(t2, n3);
  57592. });
  57593. this.appid && (this.cos = ae ? new this.COSSDK({ ForcePathStyle: true, getAuthorization: this._getAuthorization.bind(this) }) : new this.COSSDK({ getAuthorization: this._getAuthorization.bind(this) }), this._cosUploadMethod = ae ? function(t2, n3) {
  57594. e3.cos.postObject(t2, n3);
  57595. } : function(t2, n3) {
  57596. e3.cos.uploadFiles(t2, n3);
  57597. });
  57598. } }, { key: "onCheckTimer", value: function(e3) {
  57599. this.COSSDK && (this.TIMUploadPlugin || this.isLoggedIn() && e3 % 60 == 0 && Math.ceil(Date.now() / 1e3) >= this.cosOptions.expiredTime - 120 && this._getAuthorizationKey());
  57600. } }, { key: "_getAuthorization", value: function(e3, t2) {
  57601. t2({ TmpSecretId: this.cosOptions.secretId, TmpSecretKey: this.cosOptions.secretKey, XCosSecurityToken: this.cosOptions.sessionToken, ExpiredTime: this.cosOptions.expiredTime });
  57602. } }, { key: "upload", value: function(e3) {
  57603. if (true === e3.getRelayFlag())
  57604. return Promise.resolve();
  57605. var t2 = this.getModule(eo);
  57606. switch (e3.type) {
  57607. case E.MSG_IMAGE:
  57608. return t2.addTotalCount(Ia), this._uploadImage(e3);
  57609. case E.MSG_FILE:
  57610. return t2.addTotalCount(Ia), this._uploadFile(e3);
  57611. case E.MSG_AUDIO:
  57612. return t2.addTotalCount(Ia), this._uploadAudio(e3);
  57613. case E.MSG_VIDEO:
  57614. return t2.addTotalCount(Ia), this._uploadVideo(e3);
  57615. default:
  57616. return Promise.resolve();
  57617. }
  57618. } }, { key: "_uploadImage", value: function(e3) {
  57619. var n3 = this, o2 = this.getModule(Nn), s3 = e3.getElements()[0], a2 = o2.getMessageOption(e3.clientSequence);
  57620. return this.doUploadImage({ file: a2.payload.file, to: a2.to, onProgress: function(e4) {
  57621. if (s3.updatePercent(e4), ut(a2.onProgress))
  57622. try {
  57623. a2.onProgress(e4);
  57624. } catch (t2) {
  57625. return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
  57626. }
  57627. } }).then(function(o3) {
  57628. var a3, i2, r2 = o3.location, u2 = o3.fileType, c2 = o3.fileSize, l2 = o3.width, d2 = o3.height, p2 = o3.smallImageUrl, g2 = o3.smallImageWidth, h2 = o3.smallImageHeight, _2 = o3.largeImageUrl, f2 = o3.largeImageWidth, v2 = o3.largeImageHeight, m2 = n3.isPrivateNetWork() ? r2 : yt(r2);
  57629. return s3.updateImageFormat(u2), p2 && _2 ? (a3 = { url: p2, width: g2, height: h2 }, i2 = { url: _2, width: f2, height: v2 }) : (a3 = Ut({ originUrl: m2, originWidth: l2, originHeight: d2, min: 198 }), i2 = Ut({ originUrl: m2, originWidth: l2, originHeight: d2, min: 720 })), s3.updateImageInfoArray([{ size: c2, url: m2, width: l2, height: d2 }, t({}, i2), t({}, a3)]), e3;
  57630. });
  57631. } }, { key: "_uploadFile", value: function(e3) {
  57632. var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence);
  57633. return this.doUploadFile({ file: s3.payload.file, to: s3.to, onProgress: function(e4) {
  57634. if (o2.updatePercent(e4), ut(s3.onProgress))
  57635. try {
  57636. s3.onProgress(e4);
  57637. } catch (t3) {
  57638. return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
  57639. }
  57640. } }).then(function(n4) {
  57641. var s4 = n4.location, a2 = t2.isPrivateNetWork() ? s4 : yt(s4);
  57642. return o2.updateFileUrl(a2), e3;
  57643. });
  57644. } }, { key: "_uploadAudio", value: function(e3) {
  57645. var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence);
  57646. return this.doUploadAudio({ file: s3.payload.file, to: s3.to, onProgress: function(e4) {
  57647. if (o2.updatePercent(e4), ut(s3.onProgress))
  57648. try {
  57649. s3.onProgress(e4);
  57650. } catch (t3) {
  57651. return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
  57652. }
  57653. } }).then(function(n4) {
  57654. var s4 = n4.location, a2 = t2.isPrivateNetWork() ? s4 : yt(s4);
  57655. return o2.updateAudioUrl(a2), e3;
  57656. });
  57657. } }, { key: "_uploadVideo", value: function(e3) {
  57658. var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence);
  57659. return this.doUploadVideo({ file: s3.payload.file, to: s3.to, onProgress: function(e4) {
  57660. if (o2.updatePercent(e4), ut(s3.onProgress))
  57661. try {
  57662. s3.onProgress(e4);
  57663. } catch (t3) {
  57664. return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
  57665. }
  57666. } }).then(function(n4) {
  57667. var s4 = n4.location, a2 = n4.snapshotInfo, i2 = t2.isPrivateNetWork() ? s4 : yt(s4);
  57668. return o2.updateVideoUrl(i2), zt(a2) || o2.updateSnapshotInfo(a2), e3;
  57669. });
  57670. } }, { key: "_checkSizeError", value: function(e3) {
  57671. return Za({ code: ha["MESSAGE_".concat(e3, "_SIZE_LIMIT")], message: this.getErrorMessage("UploadSizeLimit", e3.toLowerCase(), "".concat(this.UPLOAD_SIZE_LIMIT[e3] / 1048576, " MB")) });
  57672. } }, { key: "doUploadImage", value: function(e3) {
  57673. var t2 = this;
  57674. if (!e3.file)
  57675. return Za({ code: ha.MESSAGE_IMAGE_SELECT_FILE_FIRST });
  57676. var n3 = this._checkImageType(e3.file);
  57677. if (true !== n3)
  57678. return n3;
  57679. var o2 = this._checkImageSize(e3.file);
  57680. if (true !== o2)
  57681. return o2;
  57682. var s3 = null;
  57683. return this._setUploadFileType(ii), this.uploadByCOS(e3).then(function(e4) {
  57684. return s3 = e4, t2.isPrivateNetWork() ? Rt(e4.location) : Rt("https://".concat(e4.location));
  57685. }).then(function(e4) {
  57686. return s3.width = e4.width, s3.height = e4.height, Promise.resolve(s3);
  57687. });
  57688. } }, { key: "_checkImageType", value: function(e3) {
  57689. var t2 = "";
  57690. return t2 = ae ? e3.url.slice(e3.url.lastIndexOf(".") + 1) : e3.files[0].name.slice(e3.files[0].name.lastIndexOf(".") + 1), si.indexOf(t2.toLowerCase()) >= 0 || Za({ code: ha.MESSAGE_IMAGE_TYPES_LIMIT });
  57691. } }, { key: "_checkImageSize", value: function(e3) {
  57692. var t2 = 0;
  57693. return 0 === (t2 = ae ? e3.size : e3.files[0].size) ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : t2 < this.UPLOAD_SIZE_LIMIT.IMAGE || this._checkSizeError("IMAGE");
  57694. } }, { key: "doUploadFile", value: function(e3) {
  57695. return e3.file ? e3.file.files[0].size > this.UPLOAD_SIZE_LIMIT.FILE ? this._checkSizeError("FILE") : 0 === e3.file.files[0].size ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : (this._setUploadFileType(ci), this.uploadByCOS(e3)) : Za({ code: ha.MESSAGE_FILE_SELECT_FILE_FIRST });
  57696. } }, { key: "doUploadVideo", value: function(e3) {
  57697. return e3.file.videoFile.size > this.UPLOAD_SIZE_LIMIT.VIDEO ? this._checkSizeError("VIDEO") : 0 === e3.file.videoFile.size ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : -1 === ai.indexOf(e3.file.videoFile.type) ? Za({ code: ha.MESSAGE_VIDEO_TYPES_LIMIT }) : (this._setUploadFileType(ri), ae ? this.handleVideoUpload({ file: e3.file.videoFile, onProgress: e3.onProgress }) : ie ? this.handleVideoUpload(e3) : void 0);
  57698. } }, { key: "handleVideoUpload", value: function(e3) {
  57699. var t2 = this;
  57700. return new Promise(function(n3, o2) {
  57701. t2.uploadByCOS(e3).then(function(e4) {
  57702. n3(e4);
  57703. }).catch(function() {
  57704. t2.uploadByCOS(e3).then(function(e4) {
  57705. n3(e4);
  57706. }).catch(function() {
  57707. o2(new ja({ code: ha.MESSAGE_VIDEO_UPLOAD_FAIL }));
  57708. });
  57709. });
  57710. });
  57711. } }, { key: "doUploadAudio", value: function(e3) {
  57712. return e3.file ? e3.file.size > this.UPLOAD_SIZE_LIMIT.AUDIO ? this._checkSizeError("AUDIO") : 0 === e3.file.size ? Za({ code: ha.MESSAGE_FILE_IS_EMPTY }) : (this._setUploadFileType(ui), this.uploadByCOS(e3)) : Za({ code: ha.MESSAGE_AUDIO_UPLOAD_FAIL });
  57713. } }, { key: "uploadByCOS", value: function(e3) {
  57714. var t2 = this;
  57715. if (!ut(this._cosUploadMethod))
  57716. return this.outputWarning("PluginUndetected"), Za({ code: ha.COS_UNDETECTED });
  57717. if (this.timUploadPlugin)
  57718. return this._uploadWithPreSigUrl(e3);
  57719. var n3 = new Aa("upload"), o2 = "".concat(this._n, ".uploadByCOS"), s3 = Date.now(), a2 = this._getFile(e3);
  57720. return new Promise(function(i2, r2) {
  57721. var u2 = ae ? t2._createCosOptionsWXMiniApp(e3) : t2._createCosOptionsWeb(e3), c2 = t2;
  57722. t2._cosUploadMethod(u2, function(e4, u3) {
  57723. var l2 = /* @__PURE__ */ Object.create(null);
  57724. if (u3) {
  57725. if (e4 || at(u3.files) && u3.files[0].error) {
  57726. var d2 = new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL });
  57727. return n3.setError(d2, true, t2.getNetworkType()).end(), Ve.l("".concat(o2, " failed. error:"), u3.files[0].error), 403 === u3.files[0].error.statusCode && (Ve.w("".concat(o2, " failed. cos AccessKeyId was invalid, regain auth key!")), t2._getAuthorizationKey()), void r2(d2);
  57728. }
  57729. l2.fileName = a2.name, l2.fileSize = a2.size, l2.fileType = a2.type.slice(a2.type.indexOf("/") + 1).toLowerCase(), l2.location = ae ? u3.Location : u3.files[0].data.Location;
  57730. var p2 = Date.now() - s3, g2 = c2._formatFileSize(a2.size), h2 = c2._formatSpeed(1e3 * a2.size / p2), _2 = "size:".concat(g2, " time:").concat(p2, "ms speed:").concat(h2);
  57731. Ve.l("".concat(o2, " success. name:").concat(a2.name, " ").concat(_2)), i2(l2);
  57732. var f2 = t2.getModule(eo);
  57733. return f2.addCost(Ia, p2), f2.addFileSize(Ia, a2.size), void n3.setNetworkType(t2.getNetworkType()).setMessage(_2).end();
  57734. }
  57735. var v2 = new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL });
  57736. n3.setError(v2, true, c2.getNetworkType()).end(), Ve.w("".concat(o2, " failed. error:"), e4), 403 === e4.statusCode && (Ve.w("".concat(o2, " failed. cos AccessKeyId was invalid, regain auth key!")), t2._getAuthorizationKey()), r2(v2);
  57737. });
  57738. });
  57739. } }, { key: "_uploadWithPreSigUrl", value: function(e3) {
  57740. var t2 = this, n3 = "".concat(this._n, "._uploadWithPreSigUrl"), o2 = this._getFile(e3);
  57741. return this._createCosOptionsPreSigUrl(e3).then(function(e4) {
  57742. return new Promise(function(s3, a2) {
  57743. var i2 = new Aa("upload"), r2 = e4.requestSnapshotUrl, u2 = void 0 === r2 ? void 0 : r2, c2 = g(e4, pr), l2 = Date.now();
  57744. t2._cosUploadMethod(c2, function(e5, r3) {
  57745. if (e5 || 403 === r3.statusCode)
  57746. return i2.setError(new ja(e5), true, t2.getNetworkType()).end(), Ve.l("".concat(n3, " failed, error:"), e5), void a2(new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL }));
  57747. var d2 = /* @__PURE__ */ Object.create(null), p2 = r3.data.location || "";
  57748. t2.isPrivateNetWork() || 0 !== p2.indexOf("https://") && 0 !== p2.indexOf("http://") || (p2 = p2.split("//")[1]), d2.fileName = o2.name, d2.fileSize = o2.size, d2.fileType = o2.type.slice(o2.type.indexOf("/") + 1).toLowerCase(), d2.location = p2;
  57749. var g2 = Date.now() - l2, h2 = t2._formatFileSize(o2.size), _2 = t2._formatSpeed(1e3 * o2.size / g2), f2 = "size:".concat(h2, ",time:").concat(g2, "ms,speed:").concat(_2, " res:").concat(JSON.stringify(r3.data));
  57750. Ve.l("".concat(n3, " success name:").concat(o2.name, ",").concat(f2)), i2.setNetworkType(t2.getNetworkType()).setMessage(f2).end();
  57751. var v2 = t2.getModule(eo);
  57752. v2.addCost(Ia, g2), v2.addFileSize(Ia, o2.size);
  57753. var m2 = [];
  57754. if (c2.thumbUrl && c2.largeUrl && (m2 = [t2._getSmallImageInfoByUrl(c2.thumbUrl, d2), t2._getLargeImageInfoByUrl(c2.largeUrl, d2)]), u2 && m2.push(t2._getSnapshotInfoByUrl(u2, d2)), m2.length > 0)
  57755. return Promise.all(m2).then(function() {
  57756. s3(d2);
  57757. });
  57758. s3(d2);
  57759. });
  57760. });
  57761. });
  57762. } }, { key: "_getRawOrUploadProxyUrl", value: function(e3) {
  57763. var t2 = this.getModule(xn).getFileUploadProxy(), n3 = e3;
  57764. return t2 && (n3 = e3.replace(/^https:\/\/[^/]+/, t2)), n3;
  57765. } }, { key: "_getFile", value: function(e3) {
  57766. var t2;
  57767. return at(e3.file.files) || (t2 = e3.file.files, "filelist" === lt(t2)) ? e3.file.files[0] : e3.file;
  57768. } }, { key: "_formatFileSize", value: function(e3) {
  57769. return e3 < 1024 ? e3 + "B" : e3 < 1048576 ? Math.floor(e3 / 1024) + "KB" : Math.floor(e3 / 1048576) + "MB";
  57770. } }, { key: "_formatSpeed", value: function(e3) {
  57771. return e3 <= 1048576 ? wt(e3 / 1024, 1) + "KB/s" : wt(e3 / 1048576, 1) + "MB/s";
  57772. } }, { key: "_createCosOptionsWeb", value: function(e3) {
  57773. var t2 = this._getFile(e3), n3 = t2.name, o2 = n3.slice(n3.lastIndexOf(".")), s3 = this._genFileName("".concat(_t(999999)).concat(o2));
  57774. return { files: [{ Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(s3), Body: t2 }], SliceSize: 1048576, onProgress: function(t3) {
  57775. if ("function" == typeof e3.onProgress)
  57776. try {
  57777. e3.onProgress(t3.percent);
  57778. } catch (n4) {
  57779. Ve.w("onProgress callback error:", n4);
  57780. }
  57781. }, onFileFinish: function(e4, t3, n4) {
  57782. } };
  57783. } }, { key: "_createCosOptionsWXMiniApp", value: function(e3) {
  57784. var t2 = this._getFile(e3), n3 = this._genFileName(t2.name), o2 = t2.url;
  57785. return { Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(n3), FilePath: o2, onProgress: function(t3) {
  57786. if (Ve.l(JSON.stringify(t3)), "function" == typeof e3.onProgress)
  57787. try {
  57788. e3.onProgress(t3.percent);
  57789. } catch (n4) {
  57790. Ve.w("onProgress callback error:", n4);
  57791. }
  57792. } };
  57793. } }, { key: "_createCosOptionsPreSigUrl", value: function(e3) {
  57794. var t2 = this, n3 = "", o2 = "", s3 = 0, a2 = this._getFile(e3);
  57795. if (ae)
  57796. n3 = this._genFileName(a2.name), o2 = a2.url, s3 = 1;
  57797. else {
  57798. var i2 = a2.name, r2 = i2.slice(i2.lastIndexOf("."));
  57799. n3 = this._genFileName("".concat(_t(999999)).concat(r2)), o2 = a2, s3 = 0;
  57800. }
  57801. return this._getCosPreSigUrl({ fileType: this.uploadFileType, fileName: n3, uploadMethod: s3, duration: this.duration }).then(function(s4) {
  57802. var a3 = s4.uploadUrl, i3 = s4.downloadUrl, r3 = s4.requestSnapshotUrl, u2 = void 0 === r3 ? void 0 : r3, c2 = s4.thumbUrl, l2 = s4.largeUrl;
  57803. return { url: t2._getRawOrUploadProxyUrl(a3), fileType: t2.uploadFileType, fileName: n3, resources: o2, downloadUrl: i3, requestSnapshotUrl: u2, thumbUrl: c2, largeUrl: l2, onProgress: function(t3) {
  57804. if ("function" == typeof e3.onProgress)
  57805. try {
  57806. e3.onProgress(t3.percent);
  57807. } catch (n4) {
  57808. Ve.w("onProgress callback error:", n4), Ve.e(n4);
  57809. }
  57810. } };
  57811. });
  57812. } }, { key: "_genFileName", value: function(e3) {
  57813. return "".concat(Nt(), "-").concat(e3);
  57814. } }, { key: "_setUploadFileType", value: function(e3) {
  57815. this.uploadFileType = e3;
  57816. } }, { key: "_getSnapshotInfoByUrl", value: function(e3, t2) {
  57817. var n3 = this, o2 = new Aa("getSnapshotInfo");
  57818. return this.request({ protocolName: Vs, requestData: { platform: this.getPlatform(), coverName: this._genFileName(_t(99999)), requestSnapshotUrl: e3 } }).then(function(e4) {
  57819. var n4 = (e4.data || {}).snapshotUrl;
  57820. return o2.setMessage("snapshotUrl:".concat(n4)).end(), zt(n4) ? {} : Rt(n4).then(function(e5) {
  57821. t2.snapshotInfo = { snapshotUrl: n4, snapshotWidth: e5.width, snapshotHeight: e5.height };
  57822. });
  57823. }).catch(function(e4) {
  57824. return Ve.w("".concat(n3._n, "._getSnapshotInfoByUrl failed. error:"), e4), o2.setCode(e4.errorCode).setMessage(e4.errorInfo).end(), {};
  57825. });
  57826. } }, { key: "_getSmallImageInfoByUrl", value: function(e3, t2) {
  57827. return Rt(e3).then(function(n3) {
  57828. t2.smallImageUrl = e3, t2.smallImageWidth = n3.width, t2.smallImageHeight = n3.height;
  57829. });
  57830. } }, { key: "_getLargeImageInfoByUrl", value: function(e3, t2) {
  57831. return Rt(e3).then(function(n3) {
  57832. t2.largeImageUrl = e3, t2.largeImageWidth = n3.width, t2.largeImageHeight = n3.height;
  57833. });
  57834. } }, { key: "reset", value: function() {
  57835. Ve.l("".concat(this._n, ".reset"));
  57836. } }]), s2;
  57837. }(uo), hr = ["downloadKey", "pbDownloadKey", "messageList"], _r = function() {
  57838. function e2(t2) {
  57839. o(this, e2), this._n = "MergerMessageHandler", this._messageModule = t2;
  57840. }
  57841. return a(e2, [{ key: "uploadMergerMessage", value: function(e3, t2) {
  57842. var n2 = this, o2 = "".concat(this._n, ".").concat("uploadMergerMessage");
  57843. Ve.d("".concat(o2, " message:"), e3, "messageBytes:".concat(t2));
  57844. var s2 = e3.payload.messageList, a2 = s2.length, i2 = new Aa("uploadMergerMessage");
  57845. return this._messageModule.request({ protocolName: zs, requestData: { messageList: s2 } }).then(function(e4) {
  57846. Ve.d("".concat(o2, " ok. response:"), e4.data);
  57847. var s3 = e4.data, r2 = s3.pbDownloadKey, u2 = s3.downloadKey, c2 = { pbDownloadKey: r2, downloadKey: u2, messageNumber: a2 };
  57848. return i2.setNetworkType(n2._messageModule.getNetworkType()).setMessage("".concat(a2, "-").concat(t2, "-").concat(u2)).end(), c2;
  57849. }).catch(function(e4) {
  57850. throw Ve.w("".concat(o2, " failed. error:"), e4), n2._messageModule.probeNetwork().then(function(t3) {
  57851. var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
  57852. i2.setError(e4, o3, s3).end();
  57853. }), e4;
  57854. });
  57855. } }, { key: "downloadMergerMessage", value: function(e3) {
  57856. var n2 = this, o2 = "".concat(this._n, ".").concat("downloadMergerMessage");
  57857. Ve.d("".concat(o2, " message:"), e3);
  57858. var s2 = e3.payload.downloadKey, a2 = this._messageModule.getFileDownloadProxy(), i2 = new Aa("downloadMergerMessage");
  57859. return i2.setMessage("downloadKey:".concat(s2)), this._messageModule.request({ protocolName: Js, requestData: { downloadKey: s2 } }).then(function(s3) {
  57860. if (Ve.d("".concat(o2, " ok. response:"), s3.data), ut(e3.clearElement)) {
  57861. var r2 = e3.payload;
  57862. r2.downloadKey, r2.pbDownloadKey, r2.messageList;
  57863. var u2 = g(r2, hr);
  57864. e3.clearElement(), e3.setElement({ type: e3.type, content: t({ messageList: s3.data.messageList }, u2) }, a2);
  57865. } else {
  57866. var c2 = [];
  57867. s3.data.messageList.forEach(function(e4) {
  57868. if (!zt(e4)) {
  57869. var t2 = new Ba(e4, a2);
  57870. c2.push(t2);
  57871. }
  57872. }), e3.payload.messageList = c2, e3.payload.downloadKey = "", e3.payload.pbDownloadKey = "";
  57873. }
  57874. return i2.setNetworkType(n2._messageModule.getNetworkType()).end(), e3;
  57875. }).catch(function(e4) {
  57876. throw Ve.w("".concat(o2, " failed. key:").concat(s2, " error:"), e4), n2._messageModule.probeNetwork().then(function(t2) {
  57877. var n3 = v(t2, 2), o3 = n3[0], s3 = n3[1];
  57878. i2.setError(e4, o3, s3).end();
  57879. }), e4;
  57880. });
  57881. } }, { key: "createMergerMessagePack", value: function(e3, t2, n2) {
  57882. return e3.conversationType === E.CONV_C2C ? this._createC2CMergerMessagePack(e3, t2, n2) : this._createGroupMergerMessagePack(e3, t2, n2);
  57883. } }, { key: "_createC2CMergerMessagePack", value: function(e3, t2, n2) {
  57884. var o2 = null;
  57885. t2 && (t2.offlinePushInfo && (o2 = t2.offlinePushInfo), true === t2.onlineUserOnly && (o2 ? o2.disablePush = true : o2 = { disablePush: true }));
  57886. var s2 = [];
  57887. if (st(t2) && st(t2.messageControlInfo)) {
  57888. var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
  57889. true === i2 && s2.push("NoUnread"), true === r2 && s2.push("NoLastMsg"), true === u2 && s2.push("NoMsgCheck");
  57890. }
  57891. var c2 = "";
  57892. nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (c2 = e3.cloudCustomData);
  57893. var l2 = n2.pbDownloadKey, d2 = n2.downloadKey, p2 = n2.messageNumber, g2 = e3.payload, h2 = g2.title, _2 = g2.abstractList, f2 = g2.compatibleText, v2 = this._messageModule.getModule(Un), m2 = v2 && v2.isOnlineMessage(e3, t2) ? 0 : void 0;
  57894. return { protocolName: fo, tjgID: this._messageModule.generateTjgID(e3), requestData: { fromAccount: this._messageModule.getMyUserID(), toAccount: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: l2, downloadKey: d2, title: h2, abstractList: _2, compatibleText: f2, messageNumber: p2 } }], cloudCustomData: c2, clientTime: e3.clientTime, msgSeq: e3.sequence, msgRandom: e3.random, msgLifeTime: m2, offlinePushInfo: o2 ? { pushFlag: true === o2.disablePush ? 1 : 0, title: o2.title || "", desc: o2.description || "", ext: o2.extension || "", apnsInfo: { badgeMode: true === o2.ignoreIOSBadge ? 1 : 0 }, androidInfo: { OPPOChannelID: o2.androidOPPOChannelID || "" } } : void 0, messageControlInfo: 0 !== m2 ? s2 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 } };
  57895. } }, { key: "_createGroupMergerMessagePack", value: function(e3, t2, n2) {
  57896. var o2 = null;
  57897. t2 && t2.offlinePushInfo && (o2 = t2.offlinePushInfo);
  57898. var s2 = [];
  57899. if (st(t2) && st(t2.messageControlInfo)) {
  57900. var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
  57901. true === i2 && s2.push("NoUnread"), true === r2 && s2.push("NoLastMsg"), true === u2 && s2.push("NoMsgCheck");
  57902. }
  57903. var c2 = "";
  57904. nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (c2 = e3.cloudCustomData);
  57905. var l2 = n2.pbDownloadKey, d2 = n2.downloadKey, p2 = n2.messageNumber, g2 = e3.payload, h2 = g2.title, _2 = g2.abstractList, f2 = g2.compatibleText, v2 = this._messageModule.getModule(Pn), m2 = v2 && v2.isOnlineMessage(e3, t2) ? 1 : 0;
  57906. return { protocolName: vo, tjgID: this._messageModule.generateTjgID(e3), requestData: { fromAccount: this._messageModule.getMyUserID(), groupID: e3.to, msgBody: [{ msgType: e3.type, msgContent: { pbDownloadKey: l2, downloadKey: d2, title: h2, abstractList: _2, compatibleText: f2, messageNumber: p2 } }], random: e3.random, priority: e3.priority, clientSequence: e3.clientSequence, groupAtInfo: void 0, cloudCustomData: c2, onlineOnlyFlag: m2, offlinePushInfo: o2 ? { pushFlag: true === o2.disablePush ? 1 : 0, title: o2.title || "", desc: o2.description || "", ext: o2.extension || "", apnsInfo: { badgeMode: true === o2.ignoreIOSBadge ? 1 : 0 }, androidInfo: { OPPOChannelID: o2.androidOPPOChannelID || "" } } : void 0, clientTime: e3.clientTime, needReadReceipt: true !== e3.needReadReceipt || v2.isMessageFromOrToAVChatroom(e3.to) ? 0 : 1, messageControlInfo: 0 === m2 ? s2 : void 0, isSupportExtension: true === e3.isSupportExtension ? 1 : 0 } };
  57907. } }]), e2;
  57908. }(), fr = { ERR_SVR_COMM_SENSITIVE_TEXT: 80001, ERR_SVR_COMM_BODY_SIZE_LIMIT: 80002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, ERR_SVR_MSG_PKG_PARSE_FAILED: 20001, ERR_SVR_MSG_INTERNAL_AUTH_FAILED: 20002, ERR_SVR_MSG_INVALID_ID: 20003, ERR_SVR_MSG_PUSH_DENY: 20006, ERR_SVR_MSG_IN_PEER_BLACKLIST: 20007, ERR_SVR_MSG_BOTH_NOT_FRIEND: 20009, ERR_SVR_MSG_NOT_PEER_FRIEND: 20010, ERR_SVR_MSG_NOT_SELF_FRIEND: 20011, ERR_SVR_MSG_SHUTUP_DENY: 20012, ERR_SVR_GROUP_INVALID_PARAMETERS: 10004, ERR_SVR_GROUP_PERMISSION_DENY: 10007, ERR_SVR_GROUP_NOT_FOUND: 10010, ERR_SVR_GROUP_INVALID_GROUPID: 10015, ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY: 10016, ERR_SVR_GROUP_SHUTUP_DENY: 10017, MESSAGE_SEND_FAIL: 2100, OVER_FREQUENCY_LIMIT: 2996 }, vr = [ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR, ha.MESSAGE_IMAGE_SELECT_FILE_FIRST, ha.MESSAGE_IMAGE_TYPES_LIMIT, ha.MESSAGE_FILE_IS_EMPTY, ha.MESSAGE_IMAGE_SIZE_LIMIT, ha.MESSAGE_FILE_SELECT_FILE_FIRST, ha.MESSAGE_FILE_SIZE_LIMIT, ha.MESSAGE_VIDEO_SIZE_LIMIT, ha.MESSAGE_VIDEO_TYPES_LIMIT, ha.MESSAGE_AUDIO_UPLOAD_FAIL, ha.MESSAGE_AUDIO_SIZE_LIMIT, ha.COS_UNDETECTED];
  57909. function mr(e2) {
  57910. var t2 = false;
  57911. return Object.values(fr).includes(e2) && (t2 = true), (e2 >= 120001 && e2 <= 13e4 || e2 >= 10100 && e2 <= 10200) && (t2 = true), t2;
  57912. }
  57913. var Mr = function(e2) {
  57914. r(s2, e2);
  57915. var n2 = f(s2);
  57916. function s2(e3) {
  57917. var t2;
  57918. return o(this, s2), (t2 = n2.call(this, e3))._n = "MessageModule", t2._messageOptionsMap = /* @__PURE__ */ new Map(), t2._mergerMessageHandler = new _r(h(t2)), t2;
  57919. }
  57920. return a(s2, [{ key: "createTextMessage", value: function(e3) {
  57921. var t2 = this.getMyUserID();
  57922. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
  57923. var n3 = new Wa(e3), o2 = "string" == typeof e3.payload ? e3.payload : e3.payload.text, s3 = new Ra({ text: o2 }), a2 = this._getNickAndAvatarByUserID(t2);
  57924. return n3.setElement(s3), n3.setNickAndAvatar(a2), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
  57925. } }, { key: "createImageMessage", value: function(e3) {
  57926. var t2 = this.getMyUserID();
  57927. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
  57928. var n3 = new Wa(e3);
  57929. if (ae) {
  57930. var o2 = e3.payload.file;
  57931. if ($e(o2))
  57932. return void this.outputWarning("FileUnsupportedInMP", "createImageMessage");
  57933. var s3 = o2.tempFiles[0].path || o2.tempFiles[0].tempFilePath, a2 = { url: s3, name: s3.slice(s3.lastIndexOf("/") + 1), size: o2.tempFiles && o2.tempFiles[0].size || 1, type: s3.slice(s3.lastIndexOf(".") + 1).toLowerCase() };
  57934. e3.payload.file = a2;
  57935. } else if (ie) {
  57936. if ($e(e3.payload.file)) {
  57937. var i2 = e3.payload.file;
  57938. e3.payload.file = { files: [i2] };
  57939. } else if (st(e3.payload.file) && "undefined" != typeof uni) {
  57940. var r2 = e3.payload.file.tempFiles[0];
  57941. e3.payload.file = { files: [r2] };
  57942. }
  57943. }
  57944. var u2 = new Na({ imageFormat: Be.UNKNOWN, uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), c2 = this._getNickAndAvatarByUserID(t2);
  57945. return n3.setElement(u2), n3.setNickAndAvatar(c2), n3.setNameCard(this._getNameCardByGroupID(n3)), this._messageOptionsMap.set(n3.clientSequence, e3), n3;
  57946. } }, { key: "createAudioMessage", value: function(e3) {
  57947. var t2 = e3.payload.file;
  57948. if (ae) {
  57949. var n3 = { url: t2.tempFilePath, name: t2.tempFilePath.slice(t2.tempFilePath.lastIndexOf("/") + 1), size: t2.fileSize, second: parseInt(t2.duration) / 1e3, type: t2.tempFilePath.slice(t2.tempFilePath.lastIndexOf(".") + 1).toLowerCase() };
  57950. e3.payload.file = n3;
  57951. }
  57952. var o2 = this.getMyUserID();
  57953. e3.currentUser = o2, e3.senderTinyID = this.getMyTinyID();
  57954. var s3 = new Wa(e3), a2 = new Ga({ second: Math.floor(t2.duration / 1e3), size: t2.fileSize || t2.size, url: t2.tempFilePath, uuid: this._generateUUID(e3.payload.file) }), i2 = this._getNickAndAvatarByUserID(o2);
  57955. return s3.setElement(a2), s3.setNickAndAvatar(i2), s3.setNameCard(this._getNameCardByGroupID(s3)), this._messageOptionsMap.set(s3.clientSequence, e3), s3;
  57956. } }, { key: "createVideoMessage", value: function(e3) {
  57957. var t2 = this.getMyUserID();
  57958. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(), e3.payload.file.thumbUrl = "", e3.payload.file.thumbSize = 0;
  57959. var n3 = {};
  57960. if (ae) {
  57961. if (te)
  57962. return void this.outputWarning("VideoUnsupportedInAlipay");
  57963. if ($e(e3.payload.file))
  57964. return void this.outputWarning("FileUnsupportedInMP", "createVideoMessage");
  57965. var o2 = e3.payload.file;
  57966. at(o2.tempFiles) && (o2 = o2.tempFiles[0]), n3.url = o2.tempFilePath, n3.name = o2.tempFilePath.slice(o2.tempFilePath.lastIndexOf("/") + 1), n3.size = o2.size || 1, n3.second = o2.duration || 0, n3.type = o2.tempFilePath.slice(o2.tempFilePath.lastIndexOf(".") + 1).toLowerCase();
  57967. } else if (ie) {
  57968. if ($e(e3.payload.file)) {
  57969. var s3 = e3.payload.file;
  57970. e3.payload.file.files = [s3];
  57971. } else if (st(e3.payload.file) && "undefined" != typeof uni) {
  57972. var a2 = e3.payload.file.tempFile;
  57973. e3.payload.file.files = [a2];
  57974. }
  57975. var i2 = e3.payload.file;
  57976. n3.url = window.URL.createObjectURL(i2.files[0]), n3.name = i2.files[0].name, n3.size = i2.files[0].size || 1, n3.second = i2.files[0].duration || 0, n3.type = i2.files[0].type.split("/")[1];
  57977. }
  57978. e3.payload.file.videoFile = n3;
  57979. var r2 = new Wa(e3), u2 = new xa({ videoFormat: n3.type, videoSecond: wt(n3.second, 0), videoSize: n3.size, remoteVideoUrl: "", videoUrl: n3.url, videoUUID: this._generateUUID(e3.payload.file.videoFile), thumbUUID: this._generateUUID(e3.payload.file.videoFile), thumbWidth: e3.payload.file.width || 200, thumbHeight: e3.payload.file.height || 200, thumbUrl: e3.payload.file.thumbUrl, thumbSize: e3.payload.file.thumbSize, thumbFormat: e3.payload.file.thumbUrl.slice(e3.payload.file.thumbUrl.lastIndexOf(".") + 1).toLowerCase() }), c2 = this._getNickAndAvatarByUserID(t2);
  57980. return r2.setElement(u2), r2.setNickAndAvatar(c2), r2.setNameCard(this._getNameCardByGroupID(r2)), this._messageOptionsMap.set(r2.clientSequence, e3), r2;
  57981. } }, { key: "createCustomMessage", value: function(e3) {
  57982. var t2 = this.getMyUserID();
  57983. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
  57984. var n3 = new Wa(e3), o2 = new qa({ data: e3.payload.data, description: e3.payload.description, extension: e3.payload.extension }), s3 = this._getNickAndAvatarByUserID(t2);
  57985. return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
  57986. } }, { key: "createFaceMessage", value: function(e3) {
  57987. var t2 = this.getMyUserID();
  57988. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
  57989. var n3 = new Wa(e3), o2 = new Oa(e3.payload), s3 = this._getNickAndAvatarByUserID(t2);
  57990. return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
  57991. } }, { key: "createMergerMessage", value: function(e3) {
  57992. var t2 = this.getMyUserID();
  57993. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
  57994. var n3 = this._getNickAndAvatarByUserID(t2), o2 = new Wa(e3), s3 = new Ha(e3.payload);
  57995. return o2.setElement(s3), o2.setNickAndAvatar(n3), o2.setNameCard(this._getNameCardByGroupID(o2)), o2.setRelayFlag(true), o2;
  57996. } }, { key: "createForwardMessage", value: function(e3) {
  57997. var t2 = e3.to, n3 = e3.conversationType, o2 = e3.priority, s3 = e3.payload, a2 = e3.needReadReceipt, i2 = e3.receiverList, r2 = this.getMyUserID(), u2 = this._getNickAndAvatarByUserID(r2);
  57998. if (s3.type === E.MSG_GRP_TIP)
  57999. return Za({ code: ha.MESSAGE_FORWARD_TYPE_INVALID });
  58000. var c2 = { to: t2, conversationType: n3, conversationID: "".concat(n3).concat(t2), priority: o2, isPlaceMessage: 0, status: Qt.UNSEND, currentUser: r2, senderTinyID: this.getMyTinyID(), cloudCustomData: e3.cloudCustomData || s3.cloudCustomData || "", needReadReceipt: a2, receiverList: i2, isSupportExtension: e3.isSupportExtension || false }, l2 = new Wa(c2);
  58001. return l2.setElement(s3.getElements()[0]), l2.setNickAndAvatar(u2), l2.setNameCard(this._getNameCardByGroupID(s3)), l2.setRelayFlag(true), l2;
  58002. } }, { key: "downloadMergerMessage", value: function(e3) {
  58003. return this._mergerMessageHandler.downloadMergerMessage(e3);
  58004. } }, { key: "createFileMessage", value: function(e3) {
  58005. if (ae) {
  58006. if (!X && !Q && !oe)
  58007. return;
  58008. var n3 = re.getSystemInfoSync().SDKVersion;
  58009. if (X && Gt(n3, "2.5.0") < 0)
  58010. return void this.outputWarning("WXChooseMessageFile");
  58011. if (Q && Gt(n3, "1.18.0") < 0)
  58012. return void this.outputWarning("QQChooseMessageFile");
  58013. }
  58014. if (ie || oe) {
  58015. if ($e(e3.payload.file)) {
  58016. var o2 = e3.payload.file;
  58017. e3.payload.file = { files: [o2] };
  58018. } else if (st(e3.payload.file) && "undefined" != typeof uni) {
  58019. var s3 = e3.payload.file, a2 = s3.tempFiles, i2 = s3.files, r2 = null;
  58020. at(a2) ? r2 = a2[0] : at(i2) && (r2 = i2[0]), e3.payload.file = { files: [r2] };
  58021. }
  58022. } else if (X || Q) {
  58023. var u2 = e3.payload.file.tempFiles, c2 = t(t({}, u2[0]), {}, { url: u2[0].path });
  58024. e3.payload.file = { files: [c2] };
  58025. }
  58026. var l2 = this.getMyUserID();
  58027. e3.currentUser = l2, e3.senderTinyID = this.getMyTinyID();
  58028. var d2 = new Wa(e3), p2 = new Fa({ uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), g2 = this._getNickAndAvatarByUserID(l2);
  58029. return d2.setElement(p2), d2.setNickAndAvatar(g2), d2.setNameCard(this._getNameCardByGroupID(d2)), this._messageOptionsMap.set(d2.clientSequence, e3), d2;
  58030. } }, { key: "createLocationMessage", value: function(e3) {
  58031. var t2 = this.getMyUserID();
  58032. e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
  58033. var n3 = new Wa(e3), o2 = new Va(e3.payload), s3 = this._getNickAndAvatarByUserID(t2);
  58034. return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
  58035. } }, { key: "_onCannotFindModule", value: function() {
  58036. return Za({ code: ha.CANNOT_FIND_MODULE });
  58037. } }, { key: "sendMessageInstance", value: function(e3, t2) {
  58038. var n3 = this;
  58039. if (false === this.getModule(oo).filterMessage(e3, t2))
  58040. return this._onSendMessageFailed(e3, new ja({ code: ha.PROFANITY_FOUND }));
  58041. var o2, s3 = null;
  58042. switch (e3.conversationType) {
  58043. case E.CONV_C2C:
  58044. if (!(s3 = this.getModule(Un)))
  58045. return this._onCannotFindModule();
  58046. break;
  58047. case E.CONV_GROUP:
  58048. if (!(s3 = this.getModule(Pn)))
  58049. return this._onCannotFindModule();
  58050. if (Dt({ groupID: e3.to })) {
  58051. var a2 = s3.getLocalGroupProfile(e3.to);
  58052. if (a2 && a2.isSupportTopic)
  58053. return Za({ code: ha.MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL });
  58054. }
  58055. break;
  58056. default:
  58057. return Za({ code: ha.MESSAGE_SEND_INVALID_CONVERSATION_TYPE });
  58058. }
  58059. var i2 = this.getModule(Wn), r2 = this.getModule(Pn);
  58060. return i2.upload(e3).then(function() {
  58061. n3._getSendMessageSpecifiedKey(e3) === ya && n3.getModule(eo).addSuccessCount(Ia);
  58062. return r2.guardForAVChatRoom(e3).then(function() {
  58063. if (!e3.isSendable())
  58064. return Za({ code: ha.MESSAGE_FILE_URL_IS_EMPTY });
  58065. n3._addSendMessageTotalCount(e3), o2 = Date.now();
  58066. var a3 = function(e4) {
  58067. var t3 = "utf-8";
  58068. ie && document && (t3 = document.charset.toLowerCase());
  58069. var n4, o3, s4 = 0;
  58070. if (o3 = e4.length, "utf-8" === t3 || "utf8" === t3)
  58071. for (var a4 = 0; a4 < o3; a4++)
  58072. (n4 = e4.codePointAt(a4)) <= 127 ? s4 += 1 : n4 <= 2047 ? s4 += 2 : n4 <= 65535 ? s4 += 3 : (s4 += 4, a4++);
  58073. else if ("utf-16" === t3 || "utf16" === t3)
  58074. for (var i3 = 0; i3 < o3; i3++)
  58075. (n4 = e4.codePointAt(i3)) <= 65535 ? s4 += 2 : (s4 += 4, i3++);
  58076. else
  58077. s4 = e4.replace(/[^\x00-\xff]/g, "aa").length;
  58078. return s4;
  58079. }(JSON.stringify(e3));
  58080. return e3.type === E.MSG_MERGER && a3 > 11264 ? n3._mergerMessageHandler.uploadMergerMessage(e3, a3).then(function(o3) {
  58081. var s4 = n3._mergerMessageHandler.createMergerMessagePack(e3, t2, o3);
  58082. return n3.request(s4);
  58083. }) : (n3.getModule(qn).setMessageRandom(e3), e3.conversationType === E.CONV_C2C || e3.conversationType === E.CONV_GROUP ? s3.sendMessage(e3, t2) : void 0);
  58084. }).then(function(a3) {
  58085. var i3 = a3.data, r3 = i3.time, u2 = i3.sequence, c2 = i3.readReceiptCode;
  58086. et(c2) && 0 !== c2 && (new Aa("sendMessageWithReceipt").setMessage("from:".concat(e3.from, " to:").concat(e3.to, " sequence:").concat(u2, " readReceiptCode:").concat(c2)).end(), Ve.w("".concat(n3._n, ".sendMessageInstance readReceiptCode:").concat(c2, " message:").concat(n3.getErrorMessage(c2))));
  58087. n3._addSendMessageSuccessCount(e3, o2), n3._messageOptionsMap.delete(e3.clientSequence);
  58088. var l2 = n3.getModule(qn);
  58089. e3.status = Qt.SUCCESS, e3.time = r3;
  58090. var d2 = false;
  58091. if (e3.conversationType === E.CONV_GROUP)
  58092. e3.sequence = u2;
  58093. else if (e3.conversationType === E.CONV_C2C) {
  58094. var p2 = l2.getLatestMessageSentByMe(e3.conversationID);
  58095. if (p2) {
  58096. var g2 = p2.nick, h2 = p2.avatar;
  58097. g2 === e3.nick && h2 === e3.avatar || (d2 = true);
  58098. }
  58099. }
  58100. if (d2 && l2.modifyMessageSentByMe({ conversationID: e3.conversationID, latestNick: e3.nick, latestAvatar: e3.avatar }), s3.isOnlineMessage(e3, t2))
  58101. e3._onlineOnlyFlag = true;
  58102. else {
  58103. l2.appendToMessageList(e3);
  58104. var _2 = e3;
  58105. st(t2) && st(t2.messageControlInfo) && (true === t2.messageControlInfo.excludedFromLastMessage && (e3._isExcludedFromLastMessage = true, _2 = ""), true === t2.messageControlInfo.excludedFromUnreadCount && (e3._isExcludedFromUnreadCount = true));
  58106. var f2 = e3.conversationType;
  58107. if (kt(e3.to))
  58108. f2 = E.CONV_TOPIC, n3.getModule(Fn).onMessageSent({ groupID: xt(e3.to), topicID: e3.to, lastMessage: _2 });
  58109. l2.onMessageSent({ conversationOptionsList: [{ conversationID: e3.conversationID, unreadCount: 0, type: f2, subType: e3.conversationSubType, lastMessage: _2 }] });
  58110. }
  58111. return e3.getRelayFlag() || "TIMImageElem" !== e3.type || Pt(e3.payload.imageInfoArray), Ya({ message: e3 });
  58112. });
  58113. }).catch(function(t3) {
  58114. return n3._onSendMessageFailed(e3, t3);
  58115. });
  58116. } }, { key: "_onSendMessageFailed", value: function(e3, t2) {
  58117. e3.status = Qt.FAIL, this.getModule(qn).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t2);
  58118. var n3 = new Aa("sendMessage");
  58119. return n3.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to)), this.probeNetwork().then(function(e4) {
  58120. var o2 = v(e4, 2), s3 = o2[0], a2 = o2[1];
  58121. n3.setError(t2, s3, a2).end();
  58122. }), Ve.e("".concat(this._n, "._onSendMessageFailed error:"), t2), Za(new ja({ code: t2 && t2.code ? t2.code : ha.MESSAGE_SEND_FAIL, message: t2 && t2.message ? t2.message : void 0, data: { message: e3 } }));
  58123. } }, { key: "_getSendMessageSpecifiedKey", value: function(e3) {
  58124. if ([E.MSG_IMAGE, E.MSG_AUDIO, E.MSG_VIDEO, E.MSG_FILE].includes(e3.type))
  58125. return ya;
  58126. if (e3.conversationType === E.CONV_C2C)
  58127. return va;
  58128. if (e3.conversationType === E.CONV_GROUP) {
  58129. var t2 = this.getModule(Pn).getLocalGroupProfile(e3.to);
  58130. if (!t2)
  58131. return;
  58132. var n3 = t2.type;
  58133. return Tt(n3) ? Ma : ma;
  58134. }
  58135. } }, { key: "_addSendMessageTotalCount", value: function(e3) {
  58136. var t2 = this._getSendMessageSpecifiedKey(e3);
  58137. t2 && this.getModule(eo).addTotalCount(t2);
  58138. } }, { key: "_addSendMessageSuccessCount", value: function(e3, t2) {
  58139. var n3 = Math.abs(Date.now() - t2), o2 = this._getSendMessageSpecifiedKey(e3);
  58140. if (o2) {
  58141. var s3 = this.getModule(eo);
  58142. s3.addSuccessCount(o2), s3.addCost(o2, n3);
  58143. }
  58144. } }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t2) {
  58145. var n3, o2, s3 = t2.code, a2 = void 0 === s3 ? -1 : s3, i2 = this.getModule(eo), r2 = this._getSendMessageSpecifiedKey(e3);
  58146. r2 === ya && (n3 = a2, o2 = false, vr.includes(n3) && (o2 = true), o2) ? i2.addFailedCountOfUserSide(Ia) : mr(a2) && r2 && i2.addFailedCountOfUserSide(r2);
  58147. } }, { key: "resendMessage", value: function(e3) {
  58148. return e3.isResend = true, e3.status = Qt.UNSEND, this.sendMessageInstance(e3);
  58149. } }, { key: "revokeMessage", value: function(e3) {
  58150. var t2 = this, n3 = null;
  58151. if (e3.conversationType === E.CONV_C2C ? n3 = this.getModule(Un) : e3.conversationType === E.CONV_GROUP && (n3 = this.getModule(Pn)), !n3)
  58152. return this._onCannotFindModule();
  58153. var o2 = new Aa("revokeMessage");
  58154. o2.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to));
  58155. var s3 = "".concat(this._n, ".").concat("revokeMessage");
  58156. return n3.revokeMessage(e3).then(function(n4) {
  58157. var a2 = n4.data.recallRetList;
  58158. if (!zt(a2) && 0 !== a2[0].retCode) {
  58159. var i2 = new ja({ code: a2[0].retCode, data: { message: e3 } });
  58160. return o2.setCode(i2.code).setMoreMessage(i2.message).end(), Za(i2);
  58161. }
  58162. return Ve.i("".concat(s3, " ok. ID:").concat(e3.ID)), e3.isRevoked = true, o2.end(), t2.getModule(qn).onMessageRevoked([e3]), Ya({ message: e3 });
  58163. }).catch(function(n4) {
  58164. t2.probeNetwork().then(function(e4) {
  58165. var t3 = v(e4, 2), s4 = t3[0], a3 = t3[1];
  58166. o2.setError(n4, s4, a3).end();
  58167. });
  58168. var a2 = new ja({ code: n4 && n4.code ? n4.code : ha.MESSAGE_REVOKE_FAIL, message: n4 && n4.message ? n4.message : void 0, data: { message: e3 } });
  58169. return Ve.w("".concat(s3, " failed. error:"), n4), Za(a2);
  58170. });
  58171. } }, { key: "deleteMessage", value: function(e3) {
  58172. var t2 = this, n3 = null, o2 = e3[0], s3 = o2.conversationID, a2 = "", i2 = [], r2 = [];
  58173. if (o2.conversationType === E.CONV_C2C)
  58174. n3 = this.getModule(Un), a2 = s3.replace(E.CONV_C2C, ""), e3.forEach(function(e4) {
  58175. e4 && e4.status === Qt.SUCCESS && e4.conversationID === s3 && (e4._onlineOnlyFlag || i2.push("".concat(e4.sequence, "_").concat(e4.random, "_").concat(e4.time)), r2.push(e4));
  58176. });
  58177. else if (o2.conversationType === E.CONV_GROUP)
  58178. n3 = this.getModule(Pn), a2 = s3.replace(E.CONV_GROUP, ""), e3.forEach(function(e4) {
  58179. e4 && e4.status === Qt.SUCCESS && e4.conversationID === s3 && (e4._onlineOnlyFlag || i2.push("".concat(e4.sequence)), r2.push(e4));
  58180. });
  58181. else if (o2.conversationType === E.CONV_SYSTEM)
  58182. return Za({ code: ha.CANNOT_DELETE_GROUP_SYSTEM_NOTICE });
  58183. if (!n3)
  58184. return this._onCannotFindModule();
  58185. if (0 === i2.length)
  58186. return this._onMessageDeleted(r2);
  58187. i2.length > 30 && (i2 = i2.slice(0, 30), r2 = r2.slice(0, 30));
  58188. var u2 = new Aa("deleteMessage");
  58189. u2.setMessage("to:".concat(a2, " count:").concat(i2.length));
  58190. var c2 = "".concat(this._n, ".").concat("deleteMessage");
  58191. return n3.deleteMessage({ to: a2, keyList: i2 }).then(function(e4) {
  58192. return u2.end(), Ve.i("".concat(c2, " ok")), t2._onMessageDeleted(r2);
  58193. }).catch(function(e4) {
  58194. t2.probeNetwork().then(function(t3) {
  58195. var n5 = v(t3, 2), o3 = n5[0], s4 = n5[1];
  58196. u2.setError(e4, o3, s4).end();
  58197. }), Ve.w("".concat(c2, " failed. error:"), e4);
  58198. var n4 = new ja({ code: e4 && e4.code ? e4.code : ha.MESSAGE_DELETE_FAIL, message: e4 && e4.message ? e4.message : void 0 });
  58199. return Za(n4);
  58200. });
  58201. } }, { key: "_onMessageDeleted", value: function(e3) {
  58202. return this.getModule(qn).onMessageDeleted(e3), Xa({ messageList: e3 });
  58203. } }, { key: "translateText", value: function(e3) {
  58204. var n3 = "".concat(this._n, ".").concat("translateText"), o2 = e3.sourceTextList, s3 = e3.sourceLanguage, a2 = e3.targetLanguage, i2 = new Aa("translateText");
  58205. return i2.setMessage("sourceLanguage:".concat(s3, " targetLanguage:").concat(a2)), this.request({ protocolName: ga, requestData: { sourceTextList: o2, source: s3 || "auto", target: a2, from: this.getMyTinyID(), SDKAppID: this.getSDKAppID() } }).then(function(e4) {
  58206. var o3 = e4.data, s4 = o3.error, a3 = o3.requestID, r2 = o3.translatedTextList;
  58207. if (0 === s4.code)
  58208. return i2.end(), Ve.i("".concat(n3, " ok. requestID:").concat(a3)), Ya({ translatedTextList: r2 });
  58209. throw t(t({}, s4), {}, { requestID: a3 });
  58210. }).catch(function(e4) {
  58211. return i2.setCode(e4.code).setMoreMessage(e4.requestID).end(), Ve.w("".concat(n3, " failed. error:"), e4), Za({ code: ha.TRANSLATE_TEXT_FAIL });
  58212. });
  58213. } }, { key: "modifyRemoteMessage", value: function(e3) {
  58214. var t2 = this, n3 = null, o2 = e3.conversationType, s3 = e3.to;
  58215. if (this.getModule(Pn).isMessageFromOrToAVChatroom(s3))
  58216. return Za({ code: ha.MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM, data: { message: e3 } });
  58217. if (false === this.getModule(oo).filterMessage(e3))
  58218. return Za({ code: ha.PROFANITY_FOUND, data: { message: e3 } });
  58219. o2 === E.CONV_C2C ? n3 = this.getModule(Un) : o2 === E.CONV_GROUP && (n3 = this.getModule(Pn));
  58220. var a2 = new Aa("modifyMessage");
  58221. a2.setMessage("to:".concat(s3));
  58222. var i2 = "".concat(this._n, ".modifyRemoteMessage");
  58223. return n3.modifyRemoteMessage(e3).then(function(n4) {
  58224. a2.end(), Ve.i("".concat(i2, " ok"));
  58225. var o3 = t2._onModifyRemoteMessageResp(e3, n4.data);
  58226. return Ya({ message: o3 });
  58227. }).catch(function(n4) {
  58228. if (a2.setCode(n4.code).setMoreMessage(n4.message).end(), Ve.w("".concat(i2, " failed. error:"), n4), 20027 === n4.code) {
  58229. var o3 = t2._onModifyRemoteMessageResp(e3, n4.data);
  58230. return Za({ code: ha.MESSAGE_MODIFY_CONFLICT, data: { message: o3 } });
  58231. }
  58232. return Za({ code: n4.code, message: n4.message, data: { message: e3 } });
  58233. });
  58234. } }, { key: "_onModifyRemoteMessageResp", value: function(e3, t2) {
  58235. Ve.d("".concat(this._n, "._onModifyRemoteMessageResp options:"), t2);
  58236. var n3 = e3.conversationType, o2 = e3.from, s3 = e3.to, a2 = e3.random, i2 = e3.sequence, r2 = e3.time, u2 = t2.elements, c2 = t2.messageVersion, l2 = t2.cloudCustomData, d2 = void 0 === l2 ? "" : l2;
  58237. return this.getModule(qn).onMessageModified({ conversationType: n3, from: o2, to: s3, time: r2, random: a2, sequence: i2, elements: u2, cloudCustomData: d2, messageVersion: c2 });
  58238. } }, { key: "_generateUUID", value: function(e3) {
  58239. var t2 = this.getModule(xn), n3 = "".concat(t2.getSDKAppID(), "-").concat(t2.getUserID(), "-").concat(function() {
  58240. for (var e4 = "", t3 = 32; t3 > 0; --t3)
  58241. e4 += ft[Math.floor(Math.random() * vt)];
  58242. return e4;
  58243. }()), o2 = e3.name || e3.value || e3.url || e3.tempFilePath, s3 = o2 && o2.slice(o2.lastIndexOf(".") + 1);
  58244. return s3 && (n3 = "".concat(n3, ".").concat(s3)), n3;
  58245. } }, { key: "getMessageOption", value: function(e3) {
  58246. return this._messageOptionsMap.get(e3);
  58247. } }, { key: "_getNickAndAvatarByUserID", value: function(e3) {
  58248. return this.getModule(Gn).getNickAndAvatarByUserID(e3);
  58249. } }, { key: "_getNameCardByGroupID", value: function(e3) {
  58250. if (e3.conversationType === E.CONV_GROUP) {
  58251. var t2 = this.getModule(Pn);
  58252. if (t2)
  58253. return t2.getMyNameCardByGroupID(e3.to);
  58254. }
  58255. return "";
  58256. } }, { key: "reset", value: function() {
  58257. Ve.l("".concat(this._n, ".reset")), this._messageOptionsMap.clear();
  58258. } }]), s2;
  58259. }(uo), yr = function(e2) {
  58260. r(n2, e2);
  58261. var t2 = f(n2);
  58262. function n2(e3) {
  58263. var s2;
  58264. return o(this, n2), (s2 = t2.call(this, e3))._n = "MessageExtensionModule", s2.messageExtensionMap = /* @__PURE__ */ new Map(), s2.globalSeqMap = /* @__PURE__ */ new Map(), s2.getMessageExtensionsMap = /* @__PURE__ */ new Map(), s2;
  58265. }
  58266. return a(n2, [{ key: "onMessageExtensionNotify", value: function(e3) {
  58267. var t3 = this, n3 = e3.dataList, o2 = n3.messageInfo, s2 = n3.operateType, a2 = n3.operateResultList, i2 = n3.tinyID, r2 = n3.globalSequence, u2 = o2.clientTime, c2 = o2.random, l2 = "".concat(i2, "-").concat(u2, "-").concat(c2), d2 = [], p2 = [];
  58268. Ve.l("".concat(this._n, ".onMessageExtensionNotify messageID:").concat(l2, " operateType:").concat(s2, " globalSequence:").concat(r2)), this._updateGlobalSequence(l2, r2);
  58269. var g2 = false, h2 = false;
  58270. a2.forEach(function(e4) {
  58271. var n4 = e4.extensions, o3 = void 0 === n4 ? [] : n4, a3 = e4.clearSequence;
  58272. if (1 === s2)
  58273. g2 = true, o3.forEach(function(e5) {
  58274. d2.push({ key: e5.key, value: e5.value });
  58275. }), t3._updateLocalExtension(l2, o3);
  58276. else if (2 === s2)
  58277. h2 = true, o3.forEach(function(e5) {
  58278. p2.push(e5.key);
  58279. }), t3._updateLocalExtension(l2, o3);
  58280. else if (3 === s2) {
  58281. if (h2 = true, t3._hasLocalExtension(l2))
  58282. t3._getLocalExtension(l2).forEach(function(e5, t4) {
  58283. e5.seq <= a3 && !zt(e5.value) && p2.push(t4);
  58284. });
  58285. t3._clearLocalExtension(l2, a3);
  58286. }
  58287. }), g2 && this.emitOuterEvent(k.MESSAGE_EXTENSIONS_UPDATED, { messageID: l2, extensions: d2 }), h2 && this.emitOuterEvent(k.MESSAGE_EXTENSIONS_DELETED, { messageID: l2, keyList: p2 });
  58288. } }, { key: "setMessageExtensions", value: function(e3, t3) {
  58289. var n3 = this;
  58290. if (!this.canIUse(B.MSG_EXT))
  58291. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  58292. var o2 = "".concat(this._n, ".").concat("setMessageExtensions"), s2 = e3.ID, a2 = e3.conversationID, i2 = e3.sequence, r2 = e3.time, u2 = m(t3);
  58293. t3.length > 20 && (u2 = t3.slice(0, 20), Ve.w("".concat(o2, ". the length of extensions cannot exceed 20.")));
  58294. var c2 = "conversationID:".concat(a2, " messageID:").concat(s2, " sequence:").concat(i2, " time:").concat(r2, " count:").concat(u2.length), l2 = new Aa("setMessageExtensions");
  58295. return l2.setMessage(c2), Ve.l("".concat(o2, " ").concat(c2)), this._modifyMessageExtensions(e3, u2).then(function(e4) {
  58296. var t4 = e4.resultList, n4 = e4.successCount, s3 = e4.failureCount, a3 = "success count:".concat(n4, " fail count:").concat(s3);
  58297. return l2.setMoreMessage(a3).end(), Ve.l("".concat(o2, " ok. ").concat(a3)), Ya({ extensions: t4 });
  58298. }).catch(function(e4) {
  58299. return n3.probeNetwork().then(function(t4) {
  58300. var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
  58301. l2.setError(e4, o3, s3).end();
  58302. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  58303. });
  58304. } }, { key: "getMessageExtensions", value: function(e3) {
  58305. var t3 = this;
  58306. if (!this.canIUse(B.MSG_EXT))
  58307. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  58308. var n3 = "".concat(this._n, ".").concat("getMessageExtensions"), o2 = e3.ID, s2 = e3.conversationID, a2 = e3.sequence, i2 = e3.time, r2 = "conversationID:".concat(s2, " messageID:").concat(o2, " sequence:").concat(a2, " time:").concat(i2), u2 = new Aa("getMessageExtensions");
  58309. u2.setMessage(r2), Ve.l("".concat(n3, " ").concat(r2));
  58310. var c2 = void 0;
  58311. return this.getMessageExtensionsMap.has(o2) && (c2 = this._getGlobalSequence(o2)), this._getMessageExtensions(e3, c2).then(function(e4) {
  58312. return u2.end(), Ve.l("".concat(n3, " ok. total count:").concat(e4.length)), it(c2) && e4.length > 0 && t3.getMessageExtensionsMap.set(o2, 1), Ya({ extensions: e4 });
  58313. }).catch(function(e4) {
  58314. return t3.probeNetwork().then(function(t4) {
  58315. var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
  58316. u2.setError(e4, o3, s3).end();
  58317. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  58318. });
  58319. } }, { key: "deleteMessageExtensions", value: function(e3, t3) {
  58320. var n3 = this;
  58321. if (!this.canIUse(B.MSG_EXT))
  58322. return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
  58323. var o2 = "".concat(this._n, ".").concat("deleteMessageExtensions"), s2 = [], a2 = 3;
  58324. zt(t3) || (a2 = 2, t3.forEach(function(e4) {
  58325. s2.push({ key: e4, value: "", seq: 0 });
  58326. }));
  58327. var i2 = e3.ID, r2 = e3.conversationID, u2 = e3.sequence, c2 = e3.time, l2 = "conversationID:".concat(r2, " messageID:").concat(i2, " sequence:").concat(u2, " time:").concat(c2, " operateType:").concat(a2), d2 = new Aa("deleteMessageExtensions");
  58328. return d2.setMessage(l2), Ve.l("".concat(o2, " ").concat(l2)), this._modifyMessageExtensions(e3, s2, a2).then(function(e4) {
  58329. var t4 = e4.resultList, n4 = e4.successCount, s3 = e4.failureCount, i3 = "";
  58330. return 2 === a2 && (i3 = "success count:".concat(n4, " fail count:").concat(s3)), d2.setMoreMessage("".concat(i3)).end(), Ve.l("".concat(o2, " ok. ").concat(i3)), Ya({ extensions: t4 });
  58331. }).catch(function(e4) {
  58332. return n3.probeNetwork().then(function(t4) {
  58333. var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
  58334. d2.setError(e4, o3, s3).end();
  58335. }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
  58336. });
  58337. } }, { key: "_modifyMessageExtensions", value: function(e3, t3) {
  58338. var n3 = this, o2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1, s2 = kt(e3.to) ? E.CONV_TOPIC : e3.conversationType, a2 = void 0;
  58339. 3 !== o2 && (a2 = this._getRequestExtensions(e3, t3));
  58340. var i2 = null;
  58341. switch (s2) {
  58342. case E.CONV_C2C:
  58343. i2 = this.getModule(Un);
  58344. break;
  58345. case E.CONV_GROUP:
  58346. i2 = this.getModule(Pn);
  58347. break;
  58348. case E.CONV_TOPIC:
  58349. i2 = this.getModule(Fn);
  58350. break;
  58351. default:
  58352. return Za({ code: ha.CANNOT_FIND_MODULE });
  58353. }
  58354. return i2.modifyMessageExtensions(e3, a2, o2).then(function(t4) {
  58355. var o3 = t4.data, s3 = o3.extensions, a3 = o3.seq, i3 = [], r2 = 0, u2 = 0, c2 = [];
  58356. return (s3 = zt(s3) ? [] : s3).forEach(function(e4) {
  58357. var t5 = e4.errorCode, n4 = e4.extension, o4 = n4.key, s4 = n4.value, a4 = n4.seq;
  58358. i3.push({ code: t5, key: o4, value: s4 }), 0 === t5 ? r2++ : u2++, c2.push({ key: o4, value: s4, seq: a4 });
  58359. }), n3._updateGlobalSequence(e3.ID, a3), c2.length > 0 && (n3._updateLocalExtension(e3.ID, c2), c2 = null), { resultList: i3, successCount: r2, failureCount: u2 };
  58360. }).catch(function(e4) {
  58361. return Za(e4);
  58362. });
  58363. } }, { key: "_getRequestExtensions", value: function(e3, t3) {
  58364. var n3 = [];
  58365. if (this._hasLocalExtension(e3.ID)) {
  58366. var o2 = this._getLocalExtension(e3.ID);
  58367. return t3.forEach(function(e4) {
  58368. var t4 = e4.key, s2 = e4.value, a2 = 0;
  58369. o2.has(t4) && (a2 = o2.get(t4).seq), n3.push({ key: t4, value: s2, seq: a2 });
  58370. }), n3;
  58371. }
  58372. return t3.forEach(function(e4) {
  58373. var t4 = e4.key, o3 = e4.value;
  58374. n3.push({ key: t4, value: o3, seq: 0 });
  58375. }), n3;
  58376. } }, { key: "_getMessageExtensions", value: function(e3, t3) {
  58377. var n3 = this, o2 = "".concat(this._n, "._getMessageExtensions"), s2 = e3.ID, a2 = e3.to, i2 = null;
  58378. switch (kt(a2) ? E.CONV_TOPIC : e3.conversationType) {
  58379. case E.CONV_C2C:
  58380. i2 = this.getModule(Un);
  58381. break;
  58382. case E.CONV_GROUP:
  58383. i2 = this.getModule(Pn);
  58384. break;
  58385. case E.CONV_TOPIC:
  58386. i2 = this.getModule(Fn);
  58387. break;
  58388. default:
  58389. return Za({ code: ha.CANNOT_FIND_MODULE });
  58390. }
  58391. return i2.getMessageExtensions(e3, t3).then(function(t4) {
  58392. var a3 = t4.data, i3 = a3.extensions, r2 = a3.completeFlag, u2 = a3.globalSequence, c2 = a3.clearSequence;
  58393. if (i3 = zt(i3) ? [] : i3, Ve.l("".concat(o2, " ok. completeFlag:").concat(r2, " globalSequence:").concat(u2, " clearSequence:").concat(c2, " count:").concat(i3.length)), n3._updateLocalExtension(s2, i3), n3._clearLocalExtension(s2, c2), n3._updateGlobalSequence(s2, u2), 1 !== r2) {
  58394. var l2 = i3.slice(-1)[0].seq + 1;
  58395. return n3._getMessageExtensions(e3, l2);
  58396. }
  58397. return n3._getLocalExtensions(s2);
  58398. }).catch(function(e4) {
  58399. return Za(e4);
  58400. });
  58401. } }, { key: "_hasLocalExtension", value: function(e3) {
  58402. return this.messageExtensionMap.has(e3);
  58403. } }, { key: "_getLocalExtension", value: function(e3) {
  58404. return this.messageExtensionMap.get(e3);
  58405. } }, { key: "_updateLocalExtension", value: function(e3, t3) {
  58406. this._hasLocalExtension(e3) || this.messageExtensionMap.set(e3, /* @__PURE__ */ new Map());
  58407. var n3 = this._getLocalExtension(e3);
  58408. t3.forEach(function(e4) {
  58409. var t4 = e4.key, o2 = e4.value, s2 = void 0 === o2 ? "" : o2, a2 = e4.seq;
  58410. n3.set(t4, { value: s2, seq: a2 });
  58411. });
  58412. } }, { key: "_clearLocalExtension", value: function(e3, t3) {
  58413. if (!(t3 <= 0) && this._hasLocalExtension(e3)) {
  58414. var n3 = this._getLocalExtension(e3);
  58415. n3.forEach(function(e4, o2) {
  58416. e4.seq <= t3 && n3.delete(o2);
  58417. });
  58418. }
  58419. } }, { key: "_getLocalExtensions", value: function(e3) {
  58420. var t3 = [];
  58421. this._hasLocalExtension(e3) && this._getLocalExtension(e3).forEach(function(e4, n3) {
  58422. var o2 = e4.value;
  58423. zt(o2) || t3.push({ key: n3, value: o2 });
  58424. });
  58425. return t3;
  58426. } }, { key: "_getGlobalSequence", value: function(e3) {
  58427. return this.globalSeqMap.get(e3);
  58428. } }, { key: "_updateGlobalSequence", value: function(e3, t3) {
  58429. this.globalSeqMap.set(e3, t3);
  58430. } }, { key: "reset", value: function() {
  58431. Ve.l("".concat(this._n, ".reset")), this.messageExtensionMap.clear(), this.globalSeqMap.clear(), this.getMessageExtensionsMap.clear();
  58432. } }]), n2;
  58433. }(uo), Ir = function(e2) {
  58434. r(n2, e2);
  58435. var t2 = f(n2);
  58436. function n2(e3) {
  58437. var s2;
  58438. return o(this, n2), (s2 = t2.call(this, e3))._n = "ComboMessageModule", s2;
  58439. }
  58440. return a(n2, [{ key: "sendMessage", value: function(e3) {
  58441. var t3 = this, n3 = this._constructMessageInstance(e3);
  58442. if (null === n3)
  58443. return Za({ code: ha.MESSAGE_SEND_FAIL });
  58444. this._addSendMessageTotalCount(n3);
  58445. var o2 = Date.now();
  58446. return this.getModule(qn).setMessageRandom(n3), this._sendComboMessage(n3, e3).then(function(e4) {
  58447. var s2 = e4.data, a2 = s2.time, i2 = s2.sequence, r2 = s2.readReceiptCode;
  58448. et(r2) && 0 !== r2 && (new Aa("sendMessageWithReceipt").setMessage("from:".concat(n3.from, " to:").concat(n3.to, " sequence:").concat(i2, " readReceiptCode:").concat(r2)).end(), Ve.w("".concat(t3._n, ".sendMessage readReceiptCode:").concat(r2, " message:").concat(t3.getErrorMessage(r2))));
  58449. t3._addSendMessageSuccessCount(n3, o2);
  58450. var u2 = t3.getModule(qn);
  58451. n3.status = Qt.SUCCESS, n3.time = a2, n3.conversationType === E.CONV_GROUP && (n3.sequence = i2), u2.appendToMessageList(n3);
  58452. var c2 = n3;
  58453. return true === n3._isExcludedFromLastMessage && (c2 = ""), u2.onMessageSent({ conversationOptionsList: [{ conversationID: n3.conversationID, unreadCount: 0, type: n3.conversationType, subType: n3.conversationSubType, lastMessage: c2 }] }), Ya({ message: n3 });
  58454. }).catch(function(e4) {
  58455. return t3._onSendMessageFailed(n3, e4);
  58456. });
  58457. } }, { key: "_sendComboMessage", value: function(e3, t3) {
  58458. var n3 = this._m.getModule(zn), o2 = "";
  58459. return e3.conversationType === E.CONV_C2C && (o2 = "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SEND_MESSAGE)), e3.conversationType === E.CONV_GROUP && (o2 = "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEND_GROUP_MESSAGE)), n3.sendComboMessage({ servcmd: o2, data: t3 });
  58460. } }, { key: "_constructMessageInstance", value: function(e3) {
  58461. var t3 = "".concat(this._n, "._constructMessageInstance"), n3 = null;
  58462. try {
  58463. var o2 = this.getMyUserID(), s2 = {};
  58464. if (s2.senderTinyID = this.getMyTinyID(), s2.currentUser = o2, s2.from = e3.From_Account || o2, e3.GroupId ? (s2.conversationID = "".concat(E.CONV_GROUP).concat(e3.GroupId), s2.conversationType = E.CONV_GROUP, s2.to = e3.GroupId) : e3.To_Account && (s2.conversationID = "".concat(E.CONV_C2C).concat(e3.To_Account), s2.conversationType = E.CONV_C2C, s2.to = e3.To_Account), s2.time = e3.MsgTimeStamp || 0, s2.random = e3.Random || e3.MsgRandom || 0, s2.priority = e3.MsgPriority, nt(e3.CloudCustomData) && e3.CloudCustomData.length > 0 && (s2.cloudCustomData = e3.CloudCustomData), at(e3.SendMsgControl) && (s2.messageControlInfo = {}, e3.SendMsgControl.includes("NoUnread") && (s2.messageControlInfo.excludedFromUnreadCount = 1), e3.SendMsgControl.includes("NoLastMsg") && (s2.messageControlInfo.excludedFromLastMessage = 1)), s2.conversationType === E.CONV_GROUP && at(e3.To_Account) && e3.To_Account.length > 0) {
  58465. var a2 = e3.To_Account;
  58466. e3.To_Account.length > 50 && (a2 = e3.To_Account.slice(0, 50), Ve.w("".concat(t3, " To_Account must be less than or equal to 50."))), s2.receiverList = m(a2), e3.To_Account = m(a2);
  58467. }
  58468. 1 !== e3.IsNeedReadReceipt && 1 !== e3.NeedReadReceipt || (s2.needReadReceipt = true), 1 === e3.SupportMessageExtension && (s2.isSupportExtension = true), (n3 = new Wa(s2)).status = Qt.UNSEND, e3.MsgClientTime = n3.clientTime, n3.conversationType === E.CONV_C2C && (e3.MsgSeq = n3.sequence);
  58469. for (var i2, r2 = e3.MsgBody.length, u2 = 0; u2 < r2; u2++)
  58470. "TIMTextElem" === (i2 = e3.MsgBody[u2]).MsgType ? n3.setTextElement(i2.MsgContent.Text) : "TIMCustomElem" === i2.MsgType ? n3.setCustomElement({ data: i2.MsgContent.Data || "", description: i2.MsgContent.Desc || "", extension: i2.MsgContent.Ext || "" }) : "TIMFaceElem" === i2.MsgType && n3.setFaceElement({ index: i2.MsgContent.Index, data: i2.MsgContent.Data });
  58471. var c2 = n3.getElements();
  58472. n3.payload = c2[0].content, n3.type = c2[0].type;
  58473. } catch (l2) {
  58474. n3 = null, Ve.e("".concat(t3, " failed. error:"), l2);
  58475. }
  58476. return n3;
  58477. } }, { key: "_onSendMessageFailed", value: function(e3, t3) {
  58478. e3.status = Qt.FAIL, this.getModule(qn).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t3);
  58479. var n3 = new Aa("sendMessage");
  58480. return n3.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to)), this.probeNetwork().then(function(e4) {
  58481. var o2 = v(e4, 2), s2 = o2[0], a2 = o2[1];
  58482. n3.setError(t3, s2, a2).end();
  58483. }), Ve.e("".concat(this._n, "._onSendMessageFailed error:"), t3), Za(new ja({ code: t3 && t3.code ? t3.code : ha.MESSAGE_SEND_FAIL, message: t3 && t3.message ? t3.message : void 0, data: { message: e3 } }));
  58484. } }, { key: "_getSendMessageSpecifiedKey", value: function(e3) {
  58485. if (e3.conversationType === E.CONV_C2C)
  58486. return va;
  58487. if (e3.conversationType === E.CONV_GROUP) {
  58488. var t3 = this.getModule(Pn).getLocalGroupProfile(e3.to);
  58489. if (!t3)
  58490. return;
  58491. var n3 = t3.type;
  58492. return Tt(n3) ? Ma : ma;
  58493. }
  58494. } }, { key: "_addSendMessageTotalCount", value: function(e3) {
  58495. var t3 = this._getSendMessageSpecifiedKey(e3);
  58496. t3 && this.getModule(eo).addTotalCount(t3);
  58497. } }, { key: "_addSendMessageSuccessCount", value: function(e3, t3) {
  58498. var n3 = Math.abs(Date.now() - t3), o2 = this._getSendMessageSpecifiedKey(e3);
  58499. if (o2) {
  58500. var s2 = this.getModule(eo);
  58501. s2.addSuccessCount(o2), s2.addCost(o2, n3);
  58502. }
  58503. } }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t3) {
  58504. var n3 = t3.code, o2 = void 0 === n3 ? -1 : n3, s2 = this.getModule(eo), a2 = this._getSendMessageSpecifiedKey(e3);
  58505. mr(o2) && a2 && s2.addFailedCountOfUserSide(a2);
  58506. } }]), n2;
  58507. }(uo), Cr = function(e2) {
  58508. r(n2, e2);
  58509. var t2 = f(n2);
  58510. function n2(e3) {
  58511. var s2;
  58512. return o(this, n2), (s2 = t2.call(this, e3))._n = "PluginModule", s2.plugins = {}, s2;
  58513. }
  58514. return a(n2, [{ key: "registerPlugin", value: function(e3) {
  58515. var t3 = this;
  58516. Object.keys(e3).forEach(function(n3) {
  58517. t3.plugins[n3] = e3[n3];
  58518. }), new Aa("registerPlugin").setMessage("".concat(Object.keys(e3))).end();
  58519. } }, { key: "getPlugin", value: function(e3) {
  58520. return this.plugins[e3];
  58521. } }, { key: "reset", value: function() {
  58522. } }]), n2;
  58523. }(uo), Tr = function(e2) {
  58524. r(s2, e2);
  58525. var n2 = f(s2);
  58526. function s2(e3) {
  58527. var t2;
  58528. return o(this, s2), (t2 = n2.call(this, e3))._n = "SyncUnreadMessageModule", t2._cookie = "", t2._onlineSyncFlag = false, t2.getInnerEmitterInstance().on(ei, t2._onLoginSuccess, h(t2)), t2;
  58529. }
  58530. return a(s2, [{ key: "_onLoginSuccess", value: function(e3) {
  58531. this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 });
  58532. } }, { key: "_startSync", value: function(e3) {
  58533. var n3 = this, o2 = e3.cookie, s3 = e3.syncFlag, a2 = e3.isOnlineSync, i2 = "".concat(this._n, "._startSync");
  58534. Ve.l("".concat(i2, " cookie:").concat(o2, " syncFlag:").concat(s3, " isOnlineSync:").concat(a2)), this.request({ protocolName: ho, requestData: { cookie: o2, syncFlag: s3, isOnlineSync: a2 } }).then(function(e4) {
  58535. var o3 = e4.data, s4 = o3.cookie, a3 = o3.syncFlag;
  58536. n3._cookie = s4, zt(s4) || (0 === a3 || 1 === a3 ? (n3._dispatchUnreadMessage(t(t({}, e4.data), {}, { isSyncingEnded: false })), n3._startSync({ cookie: s4, syncFlag: a3, isOnlineSync: 0 })) : 2 === a3 && n3._dispatchUnreadMessage(t(t({}, e4.data), {}, { isSyncingEnded: true })));
  58537. }).catch(function(e4) {
  58538. Ve.e("".concat(i2, " failed. error:"), e4);
  58539. });
  58540. } }, { key: "_dispatchUnreadMessage", value: function(e3) {
  58541. e3.eventArray && this.getModule(zn).onMessage({ head: {}, body: { eventArray: e3.eventArray, isInstantMessage: this._onlineSyncFlag, isSyncingEnded: e3.isSyncingEnded } });
  58542. this.getModule(Un).onNewC2CMessage({ dataList: e3.messageList, isInstantMessage: !!e3.isSyncingEnded && this._onlineSyncFlag, C2CRemainingUnreadList: e3.C2CRemainingUnreadList, C2CPairUnreadList: e3.C2CPairUnreadList });
  58543. } }, { key: "startOnlineSync", value: function() {
  58544. Ve.l("".concat(this._n, ".startOnlineSync")), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 1 });
  58545. } }, { key: "startSyncOnReconnected", value: function() {
  58546. Ve.l("".concat(this._n, ".startSyncOnReconnected.")), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 });
  58547. } }, { key: "reset", value: function() {
  58548. Ve.l("".concat(this._n, ".reset")), this._onlineSyncFlag = false, this._cookie = "";
  58549. } }]), s2;
  58550. }(uo), Dr = { request: { toAccount: "To_Account", fromAccount: "From_Account", to: "To_Account", from: "From_Account", groupID: "GroupId", groupAtUserID: "GroupAt_Account", extension: "Ext", data: "Data", description: "Desc", elements: "MsgBody", sizeType: "Type", downloadFlag: "Download_Flag", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", videoUrl: "", imageUrl: "URL", fileUrl: "Url", uuid: "UUID", priority: "MsgPriority", receiverUserID: "To_Account", receiverGroupID: "GroupId", messageSender: "SenderId", messageReceiver: "ReceiverId", nick: "From_AccountNick", avatar: "From_AccountHeadurl", messageNumber: "MsgNum", pbDownloadKey: "PbMsgKey", downloadKey: "JsonMsgKey", applicationType: "PendencyType", userIDList: "To_Account", groupNameList: "GroupName", userID: "To_Account", groupAttributeList: "GroupAttr", mainSequence: "AttrMainSeq", avChatRoomKey: "BytesKey", attributeControl: "AttrControl", sequence: "seq", messageControlInfo: "SendMsgControl", updateSequence: "UpdateSeq", clientTime: "MsgClientTime", sequenceList: "MsgSeqList", topicID: "TopicId", customData: "CustomString", isSupportTopic: "SupportTopic", isWebUniapp: "is_web_uniapp", isSupportExtension: "SupportMessageExtension", messageSequence: "MsgSeq", messageKey: "MsgKey", startSequence: "startSeq", simplifiedMessage: "DownsizeFlag" }, response: { MsgPriority: "priority", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", Download_Flag: "downloadFlag", GroupId: "groupID", Member_Account: "userID", MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", MsgSeq: "sequence", MsgRandom: "random", MsgTime: "time", MsgTimeStamp: "time", MsgContent: "content", MsgBody: "elements", From_AccountNick: "nick", From_AccountHeadurl: "avatar", GroupWithdrawInfoArray: "revokedInfos", GroupReadInfoArray: "groupMessageReadNotice", LastReadMsgSeq: "lastMessageSeq", WithdrawC2cMsgNotify: "c2cMessageRevokedNotify", C2cWithdrawInfoArray: "revokedInfos", C2cReadedReceipt: "c2cMessageReadReceipt", ReadC2cMsgNotify: "c2cMessageReadNotice", LastReadTime: "peerReadTime", MsgRand: "random", MsgType: "type", MsgShow: "messageShow", NextMsgSeq: "nextMessageSeq", FaceUrl: "avatar", ProfileDataMod: "profileModify", Profile_Account: "userID", ValueBytes: "value", ValueNum: "value", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgFrom_AccountExtraInfo: "messageFromAccountExtraInformation", Operator_Account: "operatorID", OpType: "operationType", ReportType: "operationType", UserId: "userID", User_Account: "userID", List_Account: "userIDList", MsgOperatorMemberExtraInfo: "operatorInfo", MsgMemberExtraInfo: "memberInfoList", ImageUrl: "avatar", NickName: "nick", MsgGroupNewInfo: "newGroupProfile", MsgAppDefinedData: "groupCustomField", Owner_Account: "ownerID", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupNotification: "notification", GroupApplyJoinOption: "joinOption", MsgKey: "messageKey", GroupInfo: "groupProfile", ShutupTime: "muteTime", Desc: "description", Ext: "extension", GroupAt_Account: "groupAtUserID", MsgNum: "messageNumber", PbMsgKey: "pbDownloadKey", JsonMsgKey: "downloadKey", MsgModifiedFlag: "isModified", PendencyItem: "applicationItem", PendencyType: "applicationType", AddTime: "time", AddSource: "source", AddWording: "wording", ProfileImImage: "avatar", PendencyAdd: "friendApplicationAdded", FrienPencydDel_Account: "friendApplicationDeletedUserIDList", Peer_Account: "userID", GroupAttr: "groupAttributeList", GroupAttrAry: "groupAttributeList", AttrMainSeq: "mainSequence", seq: "sequence", GroupAttrOption: "groupAttributeOption", BytesChangedKeys: "changedKeyList", GroupAttrInfo: "groupAttributeList", GroupAttrSeq: "mainSequence", PushChangedAttrValFlag: "isWithChangedAttributeInfo", SubKeySeq: "sequence", Val: "value", MsgGroupFromCardName: "senderNameCard", MsgGroupFromNickName: "senderNick", C2cNick: "peerNick", C2cImage: "peerAvatar", SendMsgControl: "messageControlInfo", NoLastMsg: "excludedFromLastMessage", NoUnread: "excludedFromUnreadCount", UpdateSeq: "updateSequence", MuteNotifications: "muteFlag", MsgClientTime: "clientTime", TinyId: "tinyID", GroupMsgReceiptList: "readReceiptList", ReadNum: "readCount", UnreadNum: "unreadCount", TopicId: "topicID", MillionGroupFlag: "communityType", SupportTopic: "isSupportTopic", MsgTopicNewInfo: "newTopicInfo", ShutupAll: "muteAllMembers", CustomString: "customData", TopicFaceUrl: "avatar", TopicIntroduction: "introduction", TopicNotification: "notification", TopicIdArray: "topicIDList", MsgVersion: "messageVersion", C2cMsgModNotifys: "c2cMessageModified", GroupMsgModNotifys: "groupMessageModified", ApplyJoinOption: "joinOption", MsgFlag: "messageRemindType", AtInfoList: "groupAtInfoList", AtFlagList: "groupAtType", AtMsgSeq: "sequence", BanDuration: "duration", BanDescription: "reason", NotVisible: "invisible", BytesTag: "tag", BytesValue: "value", RptBytesValue: "value", LatestSeq: "globalSequence", ClearSeq: "clearSequence", SupportMessageExtension: "isSupportExtension", ExtensionList: "extensions", GroupCounter: "counterList", Revoker_Account: "revoker", MsgExtensionNotify: "messageExtensionNotify", ExtensionC2cMsgInfo: "messageInfo", ExtensionGroupMsgInfo: "messageInfo", MsgOptType: "operateType", SetKVInfo: "operateResultList", DeleteKVInfo: "operateResultList", ClearKVInfo: "operateResultList", MsgKeyValue: "extensions", ClearMsgSeq: "clearSequence", MsgLastSeq: "globalSequence", InviteJoinOption: "inviteOption", MemberList_Account: "inviteeList", MsgMemberExtraInfoList: "inviteeInfoList", E: "event", GInf: "groupProfile", MCT: "clientTime", MR: "random", MP: "priority", MTS: "time", GId: "groupID", MS: "sequence", CCD: "cloudCustomData", F_Account: "from", F_Hd: "avatar", F_NN: "nick", GN: "groupName", GT: "groupType", IsSys: "isSystemMessage", OpInf: "operatorInfo", Img: "avatar", NN: "nick", OnlineInf: "onlineMemberInfo", ET: "expireTime", Num: "onlineMemberNum", Opt: "operationType", O_Account: "operatorID", RT: "operationType", UDF: "userDefinedField", L_Account: "userIDList" }, ignoreKeyWord: ["C2C", "ID", "USP"] };
  58551. function kr(e2, t2) {
  58552. if ("string" != typeof e2 && !Array.isArray(e2))
  58553. throw new TypeError("Expected the input to be `string | string[]`");
  58554. t2 = Object.assign({ pascalCase: false }, t2);
  58555. var n2;
  58556. return 0 === (e2 = Array.isArray(e2) ? e2.map(function(e3) {
  58557. return e3.trim();
  58558. }).filter(function(e3) {
  58559. return e3.length;
  58560. }).join("-") : e2.trim()).length ? "" : 1 === e2.length ? t2.pascalCase ? e2.toUpperCase() : e2.toLowerCase() : (e2 !== e2.toLowerCase() && (e2 = Er(e2)), e2 = e2.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, function(e3, t3) {
  58561. return t3.toUpperCase();
  58562. }).replace(/\d+(\w|$)/g, function(e3) {
  58563. return e3.toUpperCase();
  58564. }), n2 = e2, t2.pascalCase ? n2.charAt(0).toUpperCase() + n2.slice(1) : n2);
  58565. }
  58566. var Er = function(e2) {
  58567. for (var t2 = false, n2 = false, o2 = false, s2 = 0; s2 < e2.length; s2++) {
  58568. var a2 = e2[s2];
  58569. t2 && /[a-zA-Z]/.test(a2) && a2.toUpperCase() === a2 ? (e2 = e2.slice(0, s2) + "-" + e2.slice(s2), t2 = false, o2 = n2, n2 = true, s2++) : n2 && o2 && /[a-zA-Z]/.test(a2) && a2.toLowerCase() === a2 ? (e2 = e2.slice(0, s2 - 1) + "-" + e2.slice(s2 - 1), o2 = n2, n2 = false, t2 = true) : (t2 = a2.toLowerCase() === a2 && a2.toUpperCase() !== a2, o2 = n2, n2 = a2.toUpperCase() === a2 && a2.toLowerCase() !== a2);
  58570. }
  58571. return e2;
  58572. };
  58573. function Sr(e2, t2) {
  58574. var n2 = 0;
  58575. return function e3(t3, o2) {
  58576. if (++n2 > 100)
  58577. return n2--, t3;
  58578. if (at(t3)) {
  58579. var s2 = t3.map(function(t4) {
  58580. return ot(t4) ? e3(t4, o2) : t4;
  58581. });
  58582. return n2--, s2;
  58583. }
  58584. if (ot(t3)) {
  58585. var a2 = (i2 = t3, r2 = function(e4, t4) {
  58586. if (!dt(t4))
  58587. return false;
  58588. if ((s3 = t4) !== kr(s3))
  58589. for (var n3 = 0; n3 < Dr.ignoreKeyWord.length && !t4.includes(Dr.ignoreKeyWord[n3]); n3++)
  58590. ;
  58591. var s3;
  58592. return it(o2[t4]) ? function(e5) {
  58593. return "OPPOChannelID" === e5 ? e5 : e5[0].toUpperCase() + kr(e5).slice(1);
  58594. }(t4) : o2[t4];
  58595. }, u2 = /* @__PURE__ */ Object.create(null), Object.keys(i2).forEach(function(e4) {
  58596. var t4 = r2(i2[e4], e4);
  58597. t4 && (u2[t4] = i2[e4]);
  58598. }), u2);
  58599. return a2 = At(a2, function(t4, n3) {
  58600. return at(t4) || ot(t4) ? e3(t4, o2) : t4;
  58601. }), n2--, a2;
  58602. }
  58603. var i2, r2, u2;
  58604. }(e2, t2);
  58605. }
  58606. function Lr(e2, t2) {
  58607. if (at(e2))
  58608. return e2.map(function(e3) {
  58609. return ot(e3) ? Lr(e3, t2) : e3;
  58610. });
  58611. if (ot(e2)) {
  58612. var n2 = (o2 = e2, s2 = function(e3, n3) {
  58613. return it(t2[n3]) ? kr(n3) : t2[n3];
  58614. }, a2 = {}, Object.keys(o2).forEach(function(e3) {
  58615. a2[s2(o2[e3], e3)] = o2[e3];
  58616. }), a2);
  58617. return n2 = At(n2, function(e3) {
  58618. return at(e3) || ot(e3) ? Lr(e3, t2) : e3;
  58619. });
  58620. }
  58621. var o2, s2, a2;
  58622. }
  58623. var Ar = String.fromCharCode, Rr = function(e2) {
  58624. var t2 = 0 | e2.charCodeAt(0);
  58625. if (55296 <= t2)
  58626. if (t2 < 56320) {
  58627. var n2 = 0 | e2.charCodeAt(1);
  58628. if (56320 <= n2 && n2 <= 57343) {
  58629. if ((t2 = (t2 << 10) + n2 - 56613888 | 0) > 65535)
  58630. return Ar(240 | t2 >>> 18, 128 | t2 >>> 12 & 63, 128 | t2 >>> 6 & 63, 128 | 63 & t2);
  58631. } else
  58632. t2 = 65533;
  58633. } else
  58634. t2 <= 57343 && (t2 = 65533);
  58635. return t2 <= 2047 ? Ar(192 | t2 >>> 6, 128 | 63 & t2) : Ar(224 | t2 >>> 12, 128 | t2 >>> 6 & 63, 128 | 63 & t2);
  58636. }, Nr = function(e2) {
  58637. for (var t2 = void 0 === e2 ? "" : ("" + e2).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, Rr), n2 = 0 | t2.length, o2 = new Uint8Array(n2), s2 = 0; s2 < n2; s2 = s2 + 1 | 0)
  58638. o2[s2] = 0 | t2.charCodeAt(s2);
  58639. return o2;
  58640. }, Or = function() {
  58641. function e2(t2) {
  58642. o(this, e2), this._handler = t2;
  58643. var n2 = t2.getURL();
  58644. if (this._socket = null, this._workerSocket = null, this._id = _t(), this._handler.getIsWorkerEnabled()) {
  58645. var s2 = URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'], { type: "application/javascript; charset=utf-8" }));
  58646. this._workerSocket = new Worker(s2);
  58647. var a2 = this;
  58648. this._workerSocket.onmessage = function(e3) {
  58649. var t3 = e3.data, n3 = t3.callback, o2 = t3.e, s3 = t3.extensions;
  58650. "onOpen" === n3 ? a2._onOpen(s3) : "onClose" === n3 ? a2._onClose(o2) : "onError" === n3 ? a2._onError(o2) : "onMessage" === n3 && a2._onMessage(e3.data);
  58651. }, this._workerSocket.postMessage({ cmd: "start", id: this._id, url: n2 });
  58652. } else
  58653. ae ? te ? (re.connectSocket({ url: n2, header: { "content-type": "application/json" } }), re.onSocketClose(this._onClose.bind(this)), re.onSocketOpen(this._onOpen.bind(this)), re.onSocketMessage(this._onMessage.bind(this)), re.onSocketError(this._onError.bind(this))) : (this._socket = re.connectSocket({ url: n2, header: { "content-type": "application/json" }, complete: function() {
  58654. } }), this._socket.onClose(this._onClose.bind(this)), this._socket.onOpen(this._onOpen.bind(this)), this._socket.onMessage(this._onMessage.bind(this)), this._socket.onError(this._onError.bind(this))) : ie && (this._socket = new WebSocket(n2), this._socket.binaryType = "arraybuffer", this._socket.onopen = this._onOpen.bind(this, this._socket.extensions), this._socket.onmessage = this._onMessage.bind(this), this._socket.onclose = this._onClose.bind(this), this._socket.onerror = this._onError.bind(this));
  58655. this._canIUseBinaryFrame = t2.canIUseBinaryFrame();
  58656. }
  58657. return a(e2, [{ key: "getID", value: function() {
  58658. return this._id;
  58659. } }, { key: "_onOpen", value: function(e3) {
  58660. this._handler.onOpen({ id: this._id, res: JSON.stringify(e3) });
  58661. } }, { key: "_onClose", value: function(e3) {
  58662. this._handler.onClose({ id: this._id, e: e3 });
  58663. } }, { key: "_onMessage", value: function(e3) {
  58664. var t2;
  58665. t2 = this._canIUseBinaryFrame ? this._isAppCompressedData(e3.data) ? this._handler.inflate(e3.data) : function(e4) {
  58666. for (var t3 = new Uint8Array(e4), n2 = "", o2 = 0, s2 = t3.length; o2 < s2; ) {
  58667. var a2 = t3[o2], i2 = 0, r2 = 0;
  58668. if (a2 <= 127 ? (i2 = 0, r2 = 255 & a2) : a2 <= 223 ? (i2 = 1, r2 = 31 & a2) : a2 <= 239 ? (i2 = 2, r2 = 15 & a2) : a2 <= 244 && (i2 = 3, r2 = 7 & a2), s2 - o2 - i2 > 0)
  58669. for (var u2 = 0; u2 < i2; )
  58670. r2 = r2 << 6 | 63 & (a2 = t3[o2 + u2 + 1]), u2 += 1;
  58671. else
  58672. r2 = 65533, i2 = s2 - o2;
  58673. n2 += String.fromCodePoint(r2), o2 += i2 + 1;
  58674. }
  58675. return n2;
  58676. }(e3.data) : e3.data, this._handler.onMessage({ data: t2 });
  58677. } }, { key: "_isAppCompressedData", value: function(e3) {
  58678. var t2 = new Uint8Array(e3);
  58679. return 67 === t2[0] && 79 === t2[1] && 77 === t2[2] && 80 === t2[3];
  58680. } }, { key: "_onError", value: function(e3) {
  58681. this._handler.onError({ id: this._id, e: e3 });
  58682. } }, { key: "setIsWorkerEnabled", value: function(e3) {
  58683. this._isWorkerEnabled = true;
  58684. } }, { key: "close", value: function(e3) {
  58685. if (this._workerSocket && (this._workerSocket.postMessage({ cmd: "stop", code: e3 }), this._workerSocket.terminate(), this._workerSocket = null), te)
  58686. return re.offSocketClose(), re.offSocketMessage(), re.offSocketOpen(), re.offSocketError(), void re.closeSocket();
  58687. this._socket && (ae ? (this._socket.onClose(function() {
  58688. }), this._socket.onOpen(function() {
  58689. }), this._socket.onMessage(function() {
  58690. }), this._socket.onError(function() {
  58691. })) : ie && (this._socket.onopen = null, this._socket.onmessage = null, this._socket.onclose = null, this._socket.onerror = null), ee ? this._socket.close({ code: e3 }) : this._socket.close(e3), this._socket = null);
  58692. } }, { key: "send", value: function(e3) {
  58693. if (this._workerSocket)
  58694. this._workerSocket.postMessage({ cmd: "sendMessage", data: this._canIUseBinaryFrame ? Nr(e3.data).buffer : e3.data });
  58695. else {
  58696. if (te)
  58697. return void re.sendSocketMessage({ data: e3.data, fail: function() {
  58698. e3.fail && e3.requestID && e3.fail(e3.requestID);
  58699. } });
  58700. this._socket && (ae ? this._socket.send({ data: this._canIUseBinaryFrame ? Nr(e3.data).buffer : e3.data, fail: function() {
  58701. e3.fail && e3.requestID && e3.fail(e3.requestID);
  58702. } }) : ie && this._socket.send(this._canIUseBinaryFrame ? Nr(e3.data) : e3.data));
  58703. }
  58704. } }]), e2;
  58705. }(), Gr = 4e3, Ur = 4001, Pr = ["keyMap"], br = ["keyMap"], wr = "connected", Fr = "connecting", qr = "disconnected", xr = function() {
  58706. function e2(t2) {
  58707. o(this, e2), this._channelModule = t2, this._n = "SocketHandler", this._promiseMap = /* @__PURE__ */ new Map(), this._readyState = qr, this._simpleRequestMap = /* @__PURE__ */ new Map(), this.MAX_SIZE = 100, this._startSequence = _t(), this._startTs = 0, this._reConnectFlag = false, this._nextPingTs = 0, this._reConnectCount = 0, this.MAX_RECONNECT_COUNT = 3, this._socketID = -1, this._random = 0, this._socket = null, this._url = "", this._onOpenTs = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true, this._setWebsocketHost(), this._initConnection();
  58708. }
  58709. return a(e2, [{ key: "_setWebsocketHost", value: function() {
  58710. var e3 = this._channelModule.getModule(xn), t2 = G;
  58711. this._channelModule.isOversea() && (t2 = U), e3.isSingaporeSite() ? t2 = P : e3.isKoreaSite() ? t2 = b : e3.isGermanySite() ? t2 = w : e3.isIndiaSite() ? t2 = F : e3.isJapanSite() ? t2 = q : e3.isUSASite() && (t2 = x), V.HOST.setCurrent(t2);
  58712. } }, { key: "_initConnection", value: function() {
  58713. it(V.HOST.CURRENT.BACKUP) || "" === this._url ? this._url = V.HOST.CURRENT.DEFAULT : this._url === V.HOST.CURRENT.DEFAULT ? this._url = V.HOST.CURRENT.BACKUP : this._url === V.HOST.CURRENT.BACKUP ? this._url = this._canIUseAnyCast() ? V.HOST.CURRENT.ANYCAST : V.HOST.CURRENT.DEFAULT : this._url === V.HOST.CURRENT.ANYCAST && (V.HOST.CURRENT.ANYCAST = "", this._url = V.HOST.CURRENT.DEFAULT);
  58714. var e3 = this._channelModule.getModule(xn).getProxyServer();
  58715. zt(e3) || (this._url = e3), this._connect(), this._nextPingTs = 0;
  58716. } }, { key: "_canIUseAnyCast", value: function() {
  58717. return ie && V.HOST.CURRENT.ANYCAST;
  58718. } }, { key: "onCheckTimer", value: function(e3) {
  58719. e3 % 1 == 0 && this._checkPromiseMap();
  58720. } }, { key: "_checkPromiseMap", value: function() {
  58721. var e3 = this;
  58722. 0 !== this._promiseMap.size && this._promiseMap.forEach(function(t2, n2) {
  58723. var o2 = t2.reject, s2 = t2.timestamp, a2 = 15e3;
  58724. -1 !== n2.indexOf(co) ? a2 = 9e4 : -1 !== n2.indexOf(Hs) && (a2 = 3e3), Date.now() - s2 >= a2 && (Ve.l("".concat(e3._n, "._checkPromiseMap request timeout, delete requestID:").concat(n2)), e3._promiseMap.delete(n2), o2(new ja({ code: ha.NETWORK_TIMEOUT })), e3._channelModule.onRequestTimeout(n2));
  58725. });
  58726. } }, { key: "onOpen", value: function(e3) {
  58727. if ("" !== this._readyState) {
  58728. this._onOpenTs = Date.now();
  58729. var t2 = e3.id, n2 = e3.res;
  58730. this._socketID = t2;
  58731. var o2 = Date.now() - this._startTs, s2 = "socketID:".concat(t2, " res:").concat(n2);
  58732. Ve.l("".concat(this._n, "._onOpen cost:").concat(o2, " ms. ").concat(s2)), new Aa("wsOnOpen").setMessage(o2).setCostTime(o2).setMoreMessage(s2).end(), e3.id === this._socketID && (this._readyState = wr, this._reConnectCount = 0, this._resend(), true === this._reConnectFlag && (this._channelModule.onReconnected(), this._reConnectFlag = false), this._channelModule.onOpen());
  58733. }
  58734. } }, { key: "onClose", value: function(e3) {
  58735. var t2 = new Aa("wsOnClose"), n2 = e3.id, o2 = e3.e, s2 = "sourceSocketID:".concat(n2, " currentSocketID:").concat(this._socketID, " code:").concat(o2.code, " reason:").concat(o2.reason), a2 = 0;
  58736. 0 !== this._onOpenTs && (a2 = Date.now() - this._onOpenTs), t2.setMessage(a2).setCostTime(a2).setMoreMessage(s2).setCode(o2.code).end(), Ve.l("".concat(this._n, "._onClose ").concat(s2, " onlineTime:").concat(a2)), n2 === this._socketID && (this._readyState = qr, a2 < 1e3 ? this._channelModule.onReconnectFailed() : this._channelModule.onClose());
  58737. } }, { key: "onError", value: function(e3) {
  58738. var t2 = e3.id, n2 = e3.e, o2 = "sourceSocketID:".concat(t2, " currentSocketID:").concat(this._socketID);
  58739. new Aa("wsOnError").setMessage(n2.errMsg || gt(n2)).setMoreMessage(o2).setLevel("error").end(), Ve.w("".concat(this._n, "._onError"), n2, o2), t2 === this._socketID && (this._readyState = "", this._channelModule.onError());
  58740. } }, { key: "onMessage", value: function(e3) {
  58741. var t2;
  58742. try {
  58743. t2 = JSON.parse(e3.data);
  58744. } catch (c2) {
  58745. new Aa("jsonParseError").setMessage(e3.data).end();
  58746. }
  58747. if (t2 && t2.head) {
  58748. var n2 = this._getRequestIDFromHead(t2.head), o2 = t2.body;
  58749. if (!this._isTRTCCommand(n2)) {
  58750. var s2 = bt(t2.head);
  58751. o2 = Lr(t2.body, this._getResponseKeyMap(s2));
  58752. }
  58753. if (Ve.d("".concat(this._n, ".onMessage ret:").concat(JSON.stringify(o2), " requestID:").concat(n2, " has:").concat(this._promiseMap.has(n2))), this._setNextPingTs(), this._promiseMap.has(n2)) {
  58754. var a2 = this._promiseMap.get(n2), i2 = a2.resolve, r2 = a2.reject, u2 = a2.timestamp;
  58755. return this._promiseMap.delete(n2), this._calcRTT(u2), void (o2.errorCode && 0 !== o2.errorCode ? (this._channelModule.onErrorCodeNotZero(o2), r2(new ja({ code: o2.errorCode, message: o2.errorInfo || "", data: n2.includes(Ro) || n2.includes(ys) ? { elements: o2.elements, messageVersion: o2.messageVersion, cloudCustomData: o2.cloudCustomData } : void 0 }))) : i2(Ya(o2)));
  58756. }
  58757. this._channelModule.onMessage({ head: t2.head, body: o2 });
  58758. }
  58759. } }, { key: "_isTRTCCommand", value: function(e3) {
  58760. for (var t2 = this._channelModule.getModule(so).getCommandList(), n2 = false, o2 = 0; o2 < t2.length; o2++)
  58761. if (e3.startsWith(t2[o2])) {
  58762. n2 = true;
  58763. break;
  58764. }
  58765. return n2;
  58766. } }, { key: "_calcRTT", value: function(e3) {
  58767. var t2 = Date.now() - e3;
  58768. this._channelModule.getModule(eo).addRTT(t2);
  58769. } }, { key: "_connect", value: function() {
  58770. this._startTs = Date.now(), this._onOpenTs = 0, this._socket = new Or(this), this._socketID = this._socket.getID(), this._readyState = Fr, Ve.l("".concat(this._n, "._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled(), " socketID:").concat(this._socketID, " url:").concat(this.getURL())), new Aa("wsConnect").setMessage("socketID:".concat(this._socketID, " url:").concat(this.getURL())).end();
  58771. } }, { key: "getURL", value: function() {
  58772. this._channelModule.isDevMode() && (this._canIUseBinaryFrame = false);
  58773. var e3 = Ot();
  58774. (te || X && "windows" === e3 || oe) && (this._canIUseBinaryFrame = false);
  58775. var t2 = -1;
  58776. "ios" === e3 ? t2 = me || -1 : "android" === e3 && (t2 = ye || -1);
  58777. var n2 = this._channelModule.getModule(xn), o2 = this._channelModule.getPlatform(), s2 = n2.getSDKAppID(), a2 = n2.getInstanceID(), i2 = "sdkappid=".concat(s2, "&instanceid=").concat(a2, "&random=").concat(this._getRandom(), "&platform=").concat(o2, "&host=").concat(e3) + "&version=".concat(t2, "&sdkversion=").concat("2.27.6");
  58778. return Z && (i2 += "&isminigame=1"), this._channelModule.canIUseInflate() && (i2 += "&compress=gzip"), this._canIUseBinaryFrame ? "".concat(this._url, "/binfo?").concat(i2) : "".concat(this._url, "/info?").concat(i2);
  58779. } }, { key: "_closeConnection", value: function(e3) {
  58780. Ve.l("".concat(this._n, "._closeConnection socketID:").concat(this._socketID)), this._socket && (this._socket.close(e3), this._socketID = -1, this._socket = null, this._readyState = qr);
  58781. } }, { key: "_resend", value: function() {
  58782. var e3 = this;
  58783. if (Ve.l("".concat(this._n, "._resend reConnectFlag:").concat(this._reConnectFlag), "promiseMap.size:".concat(this._promiseMap.size, " simpleRequestMap.size:").concat(this._simpleRequestMap.size)), this._promiseMap.size > 0 && this._promiseMap.forEach(function(t3, n3) {
  58784. var o3 = t3.uplinkData, s3 = t3.resolve, a3 = t3.reject;
  58785. e3._promiseMap.set(n3, { resolve: s3, reject: a3, timestamp: Date.now(), uplinkData: o3 }), e3._execute(n3, o3);
  58786. }), this._simpleRequestMap.size > 0) {
  58787. var t2, n2 = D(this._simpleRequestMap);
  58788. try {
  58789. for (n2.s(); !(t2 = n2.n()).done; ) {
  58790. var o2 = v(t2.value, 2), s2 = o2[0], a2 = o2[1];
  58791. this._execute(s2, a2);
  58792. }
  58793. } catch (i2) {
  58794. n2.e(i2);
  58795. } finally {
  58796. n2.f();
  58797. }
  58798. this._simpleRequestMap.clear();
  58799. }
  58800. } }, { key: "send", value: function(e3) {
  58801. var t2 = this;
  58802. e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap;
  58803. var n2 = g(e3, Pr), o2 = this._getRequestIDFromHead(e3.head), s2 = JSON.stringify(n2);
  58804. return new Promise(function(e4, a2) {
  58805. (t2._promiseMap.set(o2, { resolve: e4, reject: a2, timestamp: Date.now(), uplinkData: s2 }), Ve.d("".concat(t2._n, ".send uplinkData:").concat(JSON.stringify(n2), " requestID:").concat(o2, " readyState:").concat(t2._readyState)), t2._readyState !== wr) ? t2._reConnect() : (t2._execute(o2, s2), t2._channelModule.getModule(eo).addRequestCount());
  58806. });
  58807. } }, { key: "simplySend", value: function(e3) {
  58808. e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap;
  58809. var t2 = g(e3, br), n2 = this._getRequestIDFromHead(e3.head), o2 = JSON.stringify(t2);
  58810. this._readyState !== wr ? (this._simpleRequestMap.size < this.MAX_SIZE ? this._simpleRequestMap.set(n2, o2) : Ve.l("".concat(this._n, ".simplySend. simpleRequestMap is full, drop request!")), this._reConnect()) : this._execute(n2, o2);
  58811. } }, { key: "_execute", value: function(e3, t2) {
  58812. this._socket.send({ data: t2, fail: ae ? this._onSendFail.bind(this) : void 0, requestID: e3 });
  58813. } }, { key: "_onSendFail", value: function(e3) {
  58814. Ve.l("".concat(this._n, "._onSendFail requestID:").concat(e3));
  58815. } }, { key: "_getSequence", value: function() {
  58816. var e3;
  58817. if (this._startSequence < 2415919103)
  58818. return e3 = this._startSequence, this._startSequence += 1, 2415919103 === this._startSequence && (this._startSequence = _t()), e3;
  58819. } }, { key: "_getRequestIDFromHead", value: function(e3) {
  58820. return e3.servcmd + e3.seq;
  58821. } }, { key: "_getResponseKeyMap", value: function(e3) {
  58822. var n2 = this._channelModule.getKeyMap(e3);
  58823. return t(t({}, Dr.response), n2.response);
  58824. } }, { key: "_reConnect", value: function() {
  58825. this._readyState !== wr && this._readyState !== Fr && this.forcedReconnect();
  58826. } }, { key: "forcedReconnect", value: function() {
  58827. var e3 = this, t2 = "".concat(this._n, ".forcedReconnect");
  58828. Ve.l("".concat(t2, " count:").concat(this._reConnectCount, " readyState:").concat(this._readyState)), this._reConnectFlag = true, this._resetRandom(), this._reConnectCount < this.MAX_RECONNECT_COUNT ? (this._reConnectCount += 1, this._closeConnection(Ur), this._initConnection()) : (this._reConnectCount = 0, this._channelModule.probeNetwork().then(function(n2) {
  58829. var o2 = v(n2, 2), s2 = o2[0];
  58830. o2[1], s2 ? (Ve.w("".concat(t2, " disconnected from wsserver but network is ok, continue...")), e3._closeConnection(Ur), e3._initConnection()) : e3._channelModule.onReconnectFailed();
  58831. }));
  58832. } }, { key: "getReconnectFlag", value: function() {
  58833. return this._reConnectFlag;
  58834. } }, { key: "_setNextPingTs", value: function() {
  58835. this._nextPingTs = Date.now() + 1e4;
  58836. } }, { key: "getNextPingTs", value: function() {
  58837. return this._nextPingTs;
  58838. } }, { key: "isConnected", value: function() {
  58839. return this._readyState === wr;
  58840. } }, { key: "canIUseBinaryFrame", value: function() {
  58841. return this._canIUseBinaryFrame;
  58842. } }, { key: "inflate", value: function(e3) {
  58843. if (this._channelModule.canIUseInflate())
  58844. return this._channelModule.getModule(ro).inflate(e3);
  58845. } }, { key: "setIsWorkerEnabled", value: function(e3) {
  58846. Ve.l("".concat(this._n, ".setIsWorkerEnabled flag:").concat(e3)), this._isWorkerEnabled = e3;
  58847. } }, { key: "getIsWorkerEnabled", value: function() {
  58848. return this._isWorkerEnabled && Se;
  58849. } }, { key: "_getRandom", value: function() {
  58850. return 0 === this._random && (this._random = Math.random()), this._random;
  58851. } }, { key: "_resetRandom", value: function() {
  58852. this._random = 0;
  58853. } }, { key: "close", value: function() {
  58854. Ve.l("".concat(this._n, ".close")), this._closeConnection(Gr), this._promiseMap.clear(), this._startSequence = _t(), this._readyState = qr, this._simpleRequestMap.clear(), this._reConnectFlag = false, this._reConnectCount = 0, this._onOpenTs = 0, this._url = "", this._random = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true;
  58855. } }]), e2;
  58856. }(), Vr = function(e2) {
  58857. r(n2, e2);
  58858. var t2 = f(n2);
  58859. function n2(e3) {
  58860. var s2;
  58861. if (o(this, n2), (s2 = t2.call(this, e3))._n = "ChannelModule", s2._socketHandler = new xr(h(s2)), s2._probing = false, s2._isAppShowing = true, s2._previousState = E.NET_STATE_CONNECTED, ae && "function" == typeof re.onAppShow && "function" == typeof re.onAppHide) {
  58862. var a2 = s2._onAppHide.bind(h(s2)), i2 = s2._onAppShow.bind(h(s2));
  58863. "function" == typeof re.offAppHide && re.offAppHide(a2), "function" == typeof re.offAppShow && re.offAppShow(i2), re.onAppHide(a2), re.onAppShow(i2);
  58864. }
  58865. return s2._timerForNotLoggedIn = -1, s2._timerForNotLoggedIn = setInterval(s2.onCheckTimer.bind(h(s2)), 1e3), s2._fatalErrorFlag = false, s2;
  58866. }
  58867. return a(n2, [{ key: "onCheckTimer", value: function(e3) {
  58868. this._socketHandler && (this.isLoggedIn() ? (this._timerForNotLoggedIn > 0 && (clearInterval(this._timerForNotLoggedIn), this._timerForNotLoggedIn = -1), this._socketHandler.onCheckTimer(e3)) : this._socketHandler.onCheckTimer(1), this._checkNextPing());
  58869. } }, { key: "onErrorCodeNotZero", value: function(e3) {
  58870. this.getModule(zn).onErrorCodeNotZero(e3);
  58871. } }, { key: "onMessage", value: function(e3) {
  58872. this.getModule(zn).onMessage(e3);
  58873. } }, { key: "send", value: function(e3) {
  58874. return this._socketHandler ? this._previousState !== E.NET_STATE_CONNECTED && e3.head.servcmd.includes(Bs) ? (this.reConnect(), this._sendLogViaHTTP(e3)) : this._socketHandler.send(e3) : Promise.reject();
  58875. } }, { key: "_sendLogViaHTTP", value: function(e3) {
  58876. var t3 = V.HOST.CURRENT.STAT;
  58877. return new Promise(function(n3, o2) {
  58878. var s2 = "".concat(t3, "/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e3.head.sdkappid, "&reqtime=").concat(Date.now()), a2 = JSON.stringify(e3.body), i2 = "application/x-www-form-urlencoded;charset=UTF-8";
  58879. if (ae)
  58880. re.request({ url: s2, data: a2, method: "POST", timeout: 3e3, header: { "content-type": i2 }, success: function() {
  58881. n3();
  58882. }, fail: function() {
  58883. o2(new ja({ code: ha.NETWORK_ERROR }));
  58884. } });
  58885. else {
  58886. var r2 = new XMLHttpRequest(), u2 = setTimeout(function() {
  58887. r2.abort(), o2(new ja({ code: ha.NETWORK_TIMEOUT }));
  58888. }, 3e3);
  58889. r2.onreadystatechange = function() {
  58890. 4 === r2.readyState && (clearTimeout(u2), 200 === r2.status || 304 === r2.status ? n3() : o2(new ja({ code: ha.NETWORK_ERROR })));
  58891. }, r2.open("POST", s2, true), r2.setRequestHeader("Content-type", i2), r2.send(a2);
  58892. }
  58893. });
  58894. } }, { key: "simplySend", value: function(e3) {
  58895. return this._socketHandler ? this._socketHandler.simplySend(e3) : Promise.reject();
  58896. } }, { key: "onOpen", value: function() {
  58897. this._ping();
  58898. } }, { key: "onClose", value: function() {
  58899. this._socketHandler && (this._socketHandler.getReconnectFlag() && this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED));
  58900. this.reConnect();
  58901. } }, { key: "onError", value: function() {
  58902. ae && !oe && this.outputWarning("DomainNameInMP"), this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
  58903. } }, { key: "getKeyMap", value: function(e3) {
  58904. return this.getModule(zn).getKeyMap(e3);
  58905. } }, { key: "_onAppHide", value: function() {
  58906. this._isAppShowing = false;
  58907. } }, { key: "_onAppShow", value: function() {
  58908. this._isAppShowing = true;
  58909. } }, { key: "onRequestTimeout", value: function(e3) {
  58910. } }, { key: "onReconnected", value: function() {
  58911. Ve.l("".concat(this._n, ".onReconnected")), this._m.restartTimer(), this.getModule(zn).onReconnected(), this._emitNetStateChangeEvent(E.NET_STATE_CONNECTED);
  58912. } }, { key: "onReconnectFailed", value: function() {
  58913. Ve.l("".concat(this._n, ".onReconnectFailed")), this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
  58914. } }, { key: "setIsWorkerEnabled", value: function(e3) {
  58915. this._socketHandler && this._socketHandler.setIsWorkerEnabled(false);
  58916. } }, { key: "offline", value: function() {
  58917. this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
  58918. } }, { key: "reConnect", value: function() {
  58919. var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], t3 = false;
  58920. this._socketHandler && (t3 = this._socketHandler.getReconnectFlag());
  58921. var n3 = "forcedFlag:".concat(e3, " fatalErrorFlag:").concat(this._fatalErrorFlag, " previousState:").concat(this._previousState, " reconnectFlag:").concat(t3);
  58922. if (Ve.l("".concat(this._n, ".reConnect ").concat(n3)), !this._fatalErrorFlag && this._socketHandler) {
  58923. if (true === e3)
  58924. this._socketHandler.forcedReconnect();
  58925. else {
  58926. if (this._previousState === E.NET_STATE_CONNECTING && t3)
  58927. return;
  58928. this._socketHandler.forcedReconnect();
  58929. }
  58930. this._emitNetStateChangeEvent(E.NET_STATE_CONNECTING);
  58931. }
  58932. } }, { key: "_emitNetStateChangeEvent", value: function(e3) {
  58933. this._previousState !== e3 && (Ve.l("".concat(this._n, "._emitNetStateChangeEvent from ").concat(this._previousState, " to ").concat(e3)), this._previousState = e3, this.emitOuterEvent(k.NET_STATE_CHANGE, { state: e3 }));
  58934. } }, { key: "_ping", value: function() {
  58935. var e3 = this;
  58936. if (true !== this._probing) {
  58937. this._probing = true;
  58938. var t3 = this.getModule(zn).getProtocolData({ protocolName: Hs });
  58939. this.send(t3).then(function() {
  58940. e3._probing = false;
  58941. }).catch(function(t4) {
  58942. if (Ve.w("".concat(e3._n, "._ping failed. error:"), t4), e3._probing = false, t4 && 60002 === t4.code)
  58943. return new Aa("error").setMessage("code:".concat(t4.code, " message:").concat(t4.message)).setNetworkType(e3.getModule(Hn).getNetworkType()).end(), e3._fatalErrorFlag = true, void e3._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
  58944. e3.probeNetwork().then(function(t5) {
  58945. var n3 = v(t5, 2), o2 = n3[0], s2 = n3[1];
  58946. Ve.l("".concat(e3._n, "._ping failed. probe network, isAppShowing:").concat(e3._isAppShowing, " online:").concat(o2, " networkType:").concat(s2)), o2 ? e3.reConnect() : e3._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
  58947. });
  58948. });
  58949. }
  58950. } }, { key: "_checkNextPing", value: function() {
  58951. this._socketHandler && (this._socketHandler.isConnected() && Date.now() >= this._socketHandler.getNextPingTs() && this._ping());
  58952. } }, { key: "canIUseInflate", value: function() {
  58953. return this._m.canIUseInflate();
  58954. } }, { key: "dealloc", value: function() {
  58955. this._socketHandler && (this._socketHandler.close(), this._socketHandler = null), this._timerForNotLoggedIn > -1 && clearInterval(this._timerForNotLoggedIn);
  58956. } }, { key: "onRestApiKickedOut", value: function() {
  58957. this._socketHandler && (this._socketHandler.close(), this.reConnect(true));
  58958. } }, { key: "reset", value: function() {
  58959. Ve.l("".concat(this._n, ".reset")), this._previousState = E.NET_STATE_CONNECTED, this._probing = false, this._fatalErrorFlag = false, this._timerForNotLoggedIn = setInterval(this.onCheckTimer.bind(this), 1e3);
  58960. } }]), n2;
  58961. }(uo), Br = ["a2", "tinyid"], Hr = ["a2", "tinyid"], Kr = function() {
  58962. function e2(t2) {
  58963. o(this, e2), this._n = "ProtocolHandler", this._sessionModule = t2, this._configMap = /* @__PURE__ */ new Map(), this._fillConfigMap();
  58964. }
  58965. return a(e2, [{ key: "_fillConfigMap", value: function() {
  58966. this._configMap.clear();
  58967. var e3 = this._sessionModule.genCommonHead(), n2 = this._sessionModule.genCosSpecifiedHead(), o2 = this._sessionModule.genSSOReportHead(), s2 = this._sessionModule.isIntl();
  58968. this._configMap.set(co, function(e4) {
  58969. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.LOGIN) }), body: { state: "Online", isWebUniapp: 0, deviceBrand: 0 }, keyMap: { request: { deviceBrand: "InstType" }, response: { InstId: "instanceID", HelloInterval: "helloInterval" } } };
  58970. }(e3)), this._configMap.set(lo, function(e4) {
  58971. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.LOGOUT) }), body: { type: 0 }, keyMap: { request: { type: "wslogout_type" } } };
  58972. }(e3)), this._configMap.set(po, function(e4) {
  58973. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.HELLO) }), body: { isWebUniapp: 0 }, keyMap: { response: { NewInstInfo: "newInstanceInfo" } } };
  58974. }(e3)), this._configMap.set(go, function(e4) {
  58975. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.STAT_SERVICE, ".").concat(V.CMD.KICK_OTHER) }), body: {} };
  58976. }(e3)), this._configMap.set(qs, function(e4) {
  58977. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_COS_SIGN, ".").concat(V.CMD.COS_SIGN) }), body: { cmd: "open_im_cos_svc", subCmd: "get_cos_token", duration: 300, version: 2 }, keyMap: { request: { userSig: "usersig", subCmd: "sub_cmd", cmd: "cmd", duration: "duration", version: "version" }, response: { expired_time: "expiredTime", bucket_name: "bucketName", session_token: "sessionToken", tmp_secret_id: "secretId", tmp_secret_key: "secretKey" } } };
  58978. }(n2)), this._configMap.set(xs, function(e4) {
  58979. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.CUSTOM_UPLOAD, ".").concat(V.CMD.COS_PRE_SIG) }), body: { fileType: void 0, fileName: void 0, uploadMethod: 0, duration: 900 }, keyMap: { request: { userSig: "usersig", fileType: "file_type", fileName: "file_name", uploadMethod: "upload_method" }, response: { expired_time: "expiredTime", request_id: "requestId", head_url: "headUrl", upload_url: "uploadUrl", download_url: "downloadUrl", ci_url: "ciUrl", snapshot_url: "requestSnapshotUrl" } } };
  58980. }(n2)), this._configMap.set(Vs, function(e4) {
  58981. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.CUSTOM_UPLOAD, ".").concat(V.CMD.VIDEO_COVER) }), body: { version: 1, platform: void 0, coverName: void 0, requestSnapshotUrl: void 0 }, keyMap: { request: { version: "version", platform: "platform", coverName: "cover_name", requestSnapshotUrl: "snapshot_url" }, response: { error_code: "errorCode", error_msg: "errorInfo", download_url: "snapshotUrl" } } };
  58982. }(n2)), this._configMap.set(Qs, function(e4) {
  58983. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.FETCH_COMMERCIAL_CONFIG) }), body: { SDKAppID: 0 }, keyMap: { request: { SDKAppID: "uint32_sdkappid" }, response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } };
  58984. }(e3)), this._configMap.set($s, function(e4) {
  58985. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.PUSHED_COMMERCIAL_CONFIG) }), body: {}, keyMap: { response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } };
  58986. }(e3)), this._configMap.set(Xs, function(e4) {
  58987. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.FETCH_CLOUD_CONTROL_CONFIG) }), body: { SDKAppID: 0, version: 0 }, keyMap: { request: { SDKAppID: "uint32_sdkappid", version: "uint64_version" }, response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } };
  58988. }(e3)), this._configMap.set(Zs, function(e4) {
  58989. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_CONFIG_MANAGER, ".").concat(V.CMD.PUSHED_CLOUD_CONTROL_CONFIG) }), body: {}, keyMap: { response: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } };
  58990. }(e3)), this._configMap.set(ea, function(e4) {
  58991. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OVERLOAD_PUSH, ".").concat(V.CMD.OVERLOAD_NOTIFY) }), body: {}, keyMap: { response: { OverLoadServCmd: "overloadCommand", DelaySecs: "waitingTime" } } };
  58992. }(e3)), this._configMap.set(ho, function(e4) {
  58993. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_MESSAGES) }), body: { cookie: "", syncFlag: 0, needAbstract: 1, isOnlineSync: 0, needSignaling: 1 }, keyMap: { request: { fromAccount: "From_Account", toAccount: "To_Account", from: "From_Account", to: "To_Account", time: "MsgTimeStamp", sequence: "MsgSeq", random: "MsgRandom", elements: "MsgBody" }, response: { MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", ClientSeq: "clientSequence", MsgSeq: "sequence", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgRandom: "random", MsgTimeStamp: "time", MsgContent: "content", ToGroupId: "to", MsgKey: "messageKey", GroupTips: "groupTips", MsgBody: "elements", MsgType: "type", C2CRemainingUnreadCount: "C2CRemainingUnreadList", C2CPairUnreadCount: "C2CPairUnreadList" } } };
  58994. }(e3)), s2 || (this._configMap.set(_o, function(e4) {
  58995. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.BIG_DATA_HALLWAY_AUTH_KEY) }), body: {} };
  58996. }(e3)), this._configMap.set(pa, function(e4) {
  58997. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_MSG_AUDIT_MGR, ".").concat(V.CMD.GET_RPOFANITY_LIST) }), body: { version: 0, deviceID: "", startIndex: void 0 }, keyMap: { request: { version: "uint64_version", deviceID: "str_device_id", startIndex: "uint64_start_index" }, response: { msg_cmd_error_code: "errorInfo", str_err_msg: "errorMessage", uint32_code: "errorCode", msg_scene_ctl_config: "filterConfig", uint64_c2c_custom_msg_flag: "c2c_custom_message", uint64_c2c_text_msg_flag: "c2c_text_message", uint64_group_custom_msg_flag: "group_custom_message", uint64_group_text_msg_flag: "group_text_message", uint64_group_info_flag: "group_profile", uint64_group_member_info_flag: "group_member_profile", uint64_relation_chain_flag: "sns", uint64_user_info_flag: "user_profile", rpt_msg_dirty_word: "lexicon", str_dirty_word: "profanity", str_replaced_content: "replacement", uint64_filter_type: "filterType", uint64_id: "id", uint64_word_type: "profanityType", uint64_complete_flag: "completeFlag", uint64_next_start_index: "nextStartIndex", uint64_version: "version", uint64_expired_time: "expiredTime" } } };
  58998. }(e3))), this._configMap.set(fo, function(e4) {
  58999. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SEND_MESSAGE) }), body: { fromAccount: "", toAccount: "", msgSeq: 0, msgRandom: 0, msgBody: [], cloudCustomData: void 0, nick: "", avatar: "", msgLifeTime: void 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { badgeMode: 0, isVoipPush: void 0 }, androidInfo: { OPPOChannelID: "" } }, messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, isSupportExtension: 0 }, keyMap: { request: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", count: "MaxCnt", lastMessageTime: "LastMsgTime", messageKey: "MsgKey", peerAccount: "Peer_Account", data: "Data", description: "Desc", extension: "Ext", type: "MsgType", content: "MsgContent", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", nick: "From_AccountNick", avatar: "From_AccountHeadurl", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "IsNeedReadReceipt" } } };
  59000. }(e3)), this._configMap.set(vo, function(e4) {
  59001. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEND_GROUP_MESSAGE) }), body: { fromAccount: "", groupID: "", random: 0, clientSequence: 0, priority: "", msgBody: [], cloudCustomData: void 0, onlineOnlyFlag: 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { badgeMode: 0, isVoipPush: void 0 }, androidInfo: { OPPOChannelID: "" } }, groupAtInfo: [], messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, topicID: void 0, receiverList: void 0, isSupportExtension: 0 }, keyMap: { request: { to: "GroupId", extension: "Ext", data: "Data", description: "Desc", random: "Random", sequence: "ReqMsgSeq", count: "ReqMsgNumber", type: "MsgType", priority: "MsgPriority", content: "MsgContent", elements: "MsgBody", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", clientSequence: "ClientSeq", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "NeedReadReceipt", receiverList: "To_Account" }, response: { MsgTime: "time", MsgSeq: "sequence" } } };
  59002. }(e3)), this._configMap.set(To, function(e4) {
  59003. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.REVOKE_C2C_MESSAGE) }), body: { msgInfo: { fromAccount: "", toAccount: "", msgTimeStamp: 0, msgSeq: 0, msgRandom: 0 } }, keyMap: { request: { msgInfo: "MsgInfo", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom" } } };
  59004. }(e3)), this._configMap.set(is, function(e4) {
  59005. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.REVOKE_GROUP_MESSAGE) }), body: { groupID: "", msgSeqList: void 0, topicID: "" }, keyMap: { request: { msgSeqList: "MsgSeqList", msgSeq: "MsgSeq" } } };
  59006. }(e3)), this._configMap.set(So, function(e4) {
  59007. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_C2C_ROAM_MESSAGES) }), body: { peerAccount: "", count: 15, lastMessageTime: 0, messageKey: "", withRecalledMessage: 1, direction: 0 }, keyMap: { request: { messageKey: "MsgKey", peerAccount: "Peer_Account", count: "MaxCnt", lastMessageTime: "LastMsgTime", withRecalledMessage: "WithRecalledMsg", direction: "GetDirection" }, response: { LastMsgTime: "lastMessageTime", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer" } } };
  59008. }(e3)), this._configMap.set(Ro, function(e4) {
  59009. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.MODIFY_C2C_MESSAGE) }), body: { from: "", to: "", sequence: 0, random: 0, time: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { request: { sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } };
  59010. }(e3)), this._configMap.set(cs, function(e4) {
  59011. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_ROAM_MESSAGES) }), body: { withRecalledMsg: 1, groupID: "", count: 15, sequence: "", topicID: void 0 }, keyMap: { request: { sequence: "ReqMsgSeq", count: "ReqMsgNumber", withRecalledMessage: "WithRecalledMsg" }, response: { Random: "random", MsgTime: "time", MsgSeq: "sequence", ReqMsgSeq: "sequence", RspMsgList: "messageList", IsPlaceMsg: "isPlaceMessage", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgPriority: "priority", MsgBody: "elements", MsgType: "type", MsgContent: "content", IsFinished: "complete", Download_Flag: "downloadFlag", ClientSeq: "clientSequence", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList" } } };
  59012. }(e3)), this._configMap.set(Do, function(e4) {
  59013. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SET_C2C_MESSAGE_READ) }), body: { C2CMsgReaded: void 0 }, keyMap: { request: { lastMessageTime: "LastedMsgTime" } } };
  59014. }(e3)), this._configMap.set(ko, function(e4) {
  59015. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { userIDList: void 0, muteFlag: 0 }, keyMap: { request: { userIDList: "Peer_Account", muteFlag: "Mute_Notifications" } } };
  59016. }(e3)), this._configMap.set(Eo, function(e4) {
  59017. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { updateSequence: 0 }, keyMap: { response: { MuteNotificationsList: "muteFlagList" } } };
  59018. }(e3)), this._configMap.set(rs, function(e4) {
  59019. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SET_GROUP_MESSAGE_READ) }), body: { groupID: void 0, messageReadSeq: void 0, topicID: void 0 }, keyMap: { request: { messageReadSeq: "MsgReadedSeq" } } };
  59020. }(e3)), this._configMap.set(us, function(e4) {
  59021. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SET_ALL_MESSAGE_READ) }), body: { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, keyMap: { request: { readAllC2CMessage: "C2CReadAllMsg", groupMessageReadInfoList: "GroupReadInfo", messageSequence: "MsgSeq" }, response: { C2CReadAllMsg: "readAllC2CMessage", GroupReadInfoArray: "groupMessageReadInfoList" } } };
  59022. }(e3)), this._configMap.set(Ao, function(e4) {
  59023. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.DELETE_C2C_MESSAGE) }), body: { fromAccount: "", to: "", keyList: void 0 }, keyMap: { request: { keyList: "MsgKeyList" } } };
  59024. }(e3)), this._configMap.set(Ms, function(e4) {
  59025. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DELETE_GROUP_MESSAGE) }), body: { groupID: "", deleter: "", keyList: void 0, topicID: void 0 }, keyMap: { request: { deleter: "Deleter_Account", keyList: "Seqs" } } };
  59026. }(e3)), this._configMap.set(ga, function(e4) {
  59027. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_TRANSLATE, ".").concat(V.CMD.TRANSLATE_TEXT) }), body: { sourceTextList: void 0, SDKAppID: 0, from: 0, source: "", target: "" }, keyMap: { request: { sourceTextList: "SourceText", SDKAppID: "SdkAppId", from: "FromAccount" }, response: { TargetText: "translatedTextList", RequestId: "requestID", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } };
  59028. }(e3)), this._configMap.set(ys, function(e4) {
  59029. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.MODIFY_GROUP_MESSAGE) }), body: { groupID: "", topicID: void 0, sequence: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { request: { sequence: "MsgSeq", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } };
  59030. }(e3)), this._configMap.set(ls, function(e4) {
  59031. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { request: { sequence: "MsgSeq" } } };
  59032. }(e3)), this._configMap.set(ps, function(e4) {
  59033. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.SEND_C2C_READ_RECEIPT) }), body: { peerAccount: "", messageInfoList: void 0 }, keyMap: { request: { peerAccount: "Peer_Account", messageInfoList: "C2CMsgInfo", fromAccount: "From_Account", toAccount: "To_Account", sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", clientTime: "MsgClientTime" } } };
  59034. }(e3)), this._configMap.set(ds, function(e4) {
  59035. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEND_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { request: { sequenceList: "MsgSeqList", sequence: "MsgSeq" } } };
  59036. }(e3)), this._configMap.set(gs, function(e4) {
  59037. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_READ_RECEIPT_DETAIL) }), body: { groupID: "", sequence: void 0, flag: 0, cursor: 0, count: 0 }, keyMap: { request: { sequence: "MsgSeq", count: "Num" }, response: { ReadList: "readUserIDList", Read_Account: "userID", UnreadList: "unreadUserIDList", Unread_Account: "userID", IsFinish: "isCompleted" } } };
  59038. }(e3)), this._configMap.set(No, function(e4) {
  59039. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.MODIFY_C2C_MESSAGE_EXTENSIONS) }), body: { from: void 0, to: void 0, messageKey: void 0, operateType: void 0, extensionList: void 0 } };
  59040. }(e3)), this._configMap.set(Oo, function(e4) {
  59041. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.GET_C2C_MESSAGE_EXTENSIONS) }), body: { from: void 0, to: void 0, messageKey: void 0, startSequence: void 0 } };
  59042. }(e3)), this._configMap.set(Es, function(e4) {
  59043. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.MODIFY_GROUP_MESSAGE_EXTENSIONS) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, operateType: void 0, extensionList: void 0 } };
  59044. }(e3)), this._configMap.set(Ss, function(e4) {
  59045. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM_MSG_EXT, ".").concat(V.CMD.GET_GROUP_MESSAGE_EXTENSIONS) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, startSequence: void 0 } };
  59046. }(e3)), this._configMap.set(Lo, function(e4) {
  59047. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.GET_PEER_READ_TIME) }), body: { userIDList: void 0 }, keyMap: { request: { userIDList: "To_Account" }, response: { ReadTime: "peerReadTimeList" } } };
  59048. }(e3)), this._configMap.set(Uo, function(e4) {
  59049. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.GET_CONVERSATION_LIST) }), body: { fromAccount: void 0, count: 0 }, keyMap: { request: {}, response: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime" } } };
  59050. }(e3)), this._configMap.set(Go, function(e4) {
  59051. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.PAGING_GET_CONVERSATION_LIST) }), body: { fromAccount: void 0, timeStamp: void 0, startIndex: void 0, pinnedTimeStamp: void 0, pinnedStartIndex: void 0, orderType: void 0, messageAssistFlag: 4, assistFlag: 15 }, keyMap: { request: { messageAssistFlag: "MsgAssistFlags", assistFlag: "AssistFlags", pinnedTimeStamp: "TopTimeStamp", pinnedStartIndex: "TopStartIndex" }, response: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime", LastMsgFlags: "lastMessageFlag", TopFlags: "isPinned", TopTimeStamp: "pinnedTimeStamp", TopStartIndex: "pinnedStartIndex", GroupId: "convGroupID" } } };
  59052. }(e3)), this._configMap.set(Po, function(e4) {
  59053. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.DELETE_CONVERSATION) }), body: { fromAccount: "", conversationList: void 0, clearHistoryMessage: void 0 }, keyMap: { request: { toGroupID: "ToGroupid", clearHistoryMessage: "ClearRamble", conversationList: "ContactItem" }, response: { ResultItem: "resultList", ToGroupid: "groupID", ResultCode: "code", ResultInfo: "info" } } };
  59054. }(e3)), this._configMap.set(bo, function(e4) {
  59055. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.CLEAR_HISTORY_MESSAGE) }), body: { fromAccount: "", toAccount: void 0, type: 1, toGroupID: void 0 }, keyMap: { request: { toGroupID: "ToGroupid" } } };
  59056. }(e3)), this._configMap.set(wo, function(e4) {
  59057. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.PIN_CONVERSATION) }), body: { fromAccount: "", operationType: 1, itemList: void 0 }, keyMap: { request: { itemList: "RecentContactItem" } } };
  59058. }(e3)), this._configMap.set(Fo, function(e4) {
  59059. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.DELETE_GROUP_AT_TIPS) }), body: { messageListToDelete: void 0 }, keyMap: { request: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } };
  59060. }(e3)), this._configMap.set(qo, function(e4) {
  59061. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.MARK_CONVERSATION) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { request: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, response: { ToGroupId: "groupID", OptType: "operationType" } } };
  59062. }(e3)), this._configMap.set(xo, function(e4) {
  59063. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.MARK_CONVERSATION) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { request: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, response: { ToGroupId: "groupID", OptType: "operationType" } } };
  59064. }(e3)), this._configMap.set(Vo, function(e4) {
  59065. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.CREATE_CONVERSATION_GROUP) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { request: { itemList: "GroupContactItem", groupID: "ToGroupId" }, response: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType" } } };
  59066. }(e3)), this._configMap.set(Bo, function(e4) {
  59067. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.DELETE_CONVERSATION_GROUP) }), body: { fromAccount: "", groupName: void 0 }, keyMap: { request: {}, response: { GroupId: "convGroupID" } } };
  59068. }(e3)), this._configMap.set(Ho, function(e4) {
  59069. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.UPDATE_CONVERSATION_GROUP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { request: { oldName: "OldGroupName", newName: "NewGroupName", groupID: "ToGroupId", operationType: "ContactOptType", groupName: "OldGroupName", updateItem: "ContactUpdateItem" }, response: { ContactOptType: "operationType", ToGroupId: "groupID", GroupId: "convGroupID" } } };
  59070. }(e3)), this._configMap.set(Ko, function(e4) {
  59071. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.UPDATE_CONVERSATION_GROUP) }), body: { fromAccount: "", updateType: void 0, updateGroup: { groupName: void 0, updateGroupType: void 0, updateItem: void 0 } }, keyMap: { request: {}, response: {} } };
  59072. }(e3)), this._configMap.set(Wo, function(e4) {
  59073. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.UPDATE_CONVERSATION_GROUP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { request: {}, response: {} } };
  59074. }(e3)), this._configMap.set(Yo, function(e4) {
  59075. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.RECENT_CONTACT, ".").concat(V.CMD.GET_CONVERSATION_GROUP_LIST) }), body: { fromAccount: "", startTime: void 0, startIndex: void 0 }, keyMap: { request: {}, response: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList" } } };
  59076. }(e3)), this._configMap.set(mo, function(e4) {
  59077. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.PROFILE, ".").concat(V.CMD.PORTRAIT_GET) }), body: { fromAccount: "", userItem: [] }, keyMap: { request: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } };
  59078. }(e3)), this._configMap.set(Mo, function(e4) {
  59079. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.PROFILE, ".").concat(V.CMD.PORTRAIT_SET) }), body: { fromAccount: "", profileItem: [{ tag: He.NICK, value: "" }, { tag: He.GENDER, value: "" }, { tag: He.ALLOWTYPE, value: "" }, { tag: He.AVATAR, value: "" }] }, keyMap: { request: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } };
  59080. }(e3)), this._configMap.set(yo, function(e4) {
  59081. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.GET_BLACKLIST) }), body: { fromAccount: "", startIndex: 0, maxLimited: 30, lastSequence: 0 }, keyMap: { response: { CurruentSequence: "currentSequence" } } };
  59082. }(e3)), this._configMap.set(Io, function(e4) {
  59083. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.ADD_BLACKLIST) }), body: { fromAccount: "", toAccount: [] } };
  59084. }(e3)), this._configMap.set(Co, function(e4) {
  59085. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.DELETE_BLACKLIST) }), body: { fromAccount: "", toAccount: [] } };
  59086. }(e3)), this._configMap.set(aa, function(e4) {
  59087. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SET_SELF_STATUS) }), body: { customStatus: "" }, keyMap: {} };
  59088. }(e3)), this._configMap.set(ia, function(e4) {
  59089. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.GET_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { response: { UserStatusList: "successUserList", ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID", Status: "statusType" } } };
  59090. }(e3)), this._configMap.set(ra, function(e4) {
  59091. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SUBSCRIBE_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { response: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } };
  59092. }(e3)), this._configMap.set(ua, function(e4) {
  59093. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.UNSUBSCRIBE_USER_STATUS) }), body: { userIDList: void 0, unsubscribeAll: void 0 }, keyMap: { response: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } };
  59094. }(e3)), this._configMap.set(jo, function(e4) {
  59095. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_JOINED_GROUPS) }), body: { memberAccount: "", limit: void 0, offset: void 0, groupType: void 0, responseFilter: { groupBaseInfoFilter: void 0, selfInfoFilter: void 0 }, isSupportTopic: 0 }, keyMap: { request: { memberAccount: "Member_Account" }, response: { GroupIdList: "groups", NoUnreadSeqList: "excludedUnreadSequenceList", MsgSeq: "readedSequence", LastRecallTime: "_lastRevokedTime" } } };
  59096. }(e3)), this._configMap.set(zo, function(e4) {
  59097. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_INFO) }), body: { groupIDList: void 0, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember"], groupCustomFieldFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 } }, keyMap: { request: { groupIDList: "GroupIdList", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", groupCustomFieldFilter: "AppDefinedDataFilter_Group", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, response: { GroupIdList: "groups", AppDefinedData: "groupCustomField", AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_Group: "groupCustomFieldFilter", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", InfoSeq: "infoSequence", MemberList: "members", GroupInfo: "groups", ShutUpUntil: "muteUntil", ShutUpAllMember: "muteAllMembers" } } };
  59098. }(e3)), this._configMap.set(Jo, function(e4) {
  59099. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.CREATE_GROUP) }), body: { type: void 0, name: void 0, groupID: void 0, ownerID: void 0, introduction: void 0, notification: void 0, maxMemberNum: void 0, joinOption: void 0, memberList: void 0, groupCustomField: void 0, memberCustomField: void 0, webPushFlag: 1, avatar: "", isSupportTopic: void 0, inviteOption: void 0 }, keyMap: { request: { ownerID: "Owner_Account", userID: "Member_Account", avatar: "FaceUrl", maxMemberNum: "MaxMemberCount", joinOption: "ApplyJoinOption", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", inviteOption: "InviteJoinOption" }, response: { HugeGroupFlag: "avChatRoomFlag", OverJoinedGroupLimit_Account: "overLimitUserIDList" } } };
  59100. }(e3)), this._configMap.set(Xo, function(e4) {
  59101. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DESTROY_GROUP) }), body: { groupID: void 0 } };
  59102. }(e3)), this._configMap.set(Zo, function(e4) {
  59103. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.MODIFY_GROUP_INFO) }), body: { groupID: void 0, name: void 0, introduction: void 0, notification: void 0, avatar: void 0, joinOption: void 0, groupCustomField: void 0, muteAllMembers: void 0, inviteOption: void 0 }, keyMap: { request: { groupCustomField: "AppDefinedData", muteAllMembers: "ShutUpAllMember", joinOption: "ApplyJoinOption", avatar: "FaceUrl", inviteOption: "InviteJoinOption" }, response: { AppDefinedData: "groupCustomField", ShutUpAllMember: "muteAllMembers" } } };
  59104. }(e3)), this._configMap.set(Qo, function(e4) {
  59105. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.APPLY_JOIN_GROUP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1, historyMessageFlag: void 0 }, keyMap: { request: { applyMessage: "ApplyMsg", historyMessageFlag: "HugeGroupHistoryMsgFlag" }, response: { HugeGroupFlag: "avChatRoomFlag", AVChatRoomKey: "avChatRoomKey", RspMsgList: "messageList", ToGroupId: "to" } } };
  59106. }(e3)), this._configMap.set($o, function(e4) {
  59107. return e4.a2, e4.tinyid, { head: t(t({}, g(e4, Br)), {}, { servcmd: "".concat(V.NAME.BIG_GROUP_NO_AUTH, ".").concat(V.CMD.APPLY_JOIN_GROUP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1 }, keyMap: { request: { applyMessage: "ApplyMsg" }, response: { HugeGroupFlag: "avChatRoomFlag" } } };
  59108. }(e3)), this._configMap.set(es, function(e4) {
  59109. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.QUIT_GROUP) }), body: { groupID: void 0 } };
  59110. }(e3)), this._configMap.set(ts, function(e4) {
  59111. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SEARCH_GROUP_BY_ID) }), body: { groupIDList: void 0, responseFilter: { groupBasePublicInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "CreateTime", "Owner_Account", "LastInfoTime", "LastMsgTime", "NextMsgSeq", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "InviteJoinOption"] } }, keyMap: { response: {} } };
  59112. }(e3)), this._configMap.set(ns, function(e4) {
  59113. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.CHANGE_GROUP_OWNER) }), body: { groupID: void 0, newOwnerID: void 0 }, keyMap: { request: { newOwnerID: "NewOwner_Account" } } };
  59114. }(e3)), this._configMap.set(os2, function(e4) {
  59115. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.HANDLE_APPLY_JOIN_GROUP) }), body: { groupID: void 0, applicant: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { request: { applicant: "Applicant_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } };
  59116. }(e3)), this._configMap.set(ss, function(e4) {
  59117. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.HANDLE_INVITE_JOIN_GROUP) }), body: { groupID: void 0, applicant: void 0, invitee: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, userDefinedField: void 0 }, keyMap: { request: { applicant: "Applicant_Account", invitee: "Invited_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg" } } };
  59118. }(e3)), this._configMap.set(as, function(e4) {
  59119. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.HANDLE_GROUP_INVITATION) }), body: { groupID: void 0, inviter: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { request: { inviter: "Inviter_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } };
  59120. }(e3)), this._configMap.set(hs, function(e4) {
  59121. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_APPLICATION) }), body: { startTime: void 0, limit: void 0, handleAccount: void 0 }, keyMap: { request: { handleAccount: "Handle_Account" }, response: { To_Account: "userID" } } };
  59122. }(e3)), this._configMap.set(_s, function(e4) {
  59123. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.DELETE_GROUP_SYSTEM_MESSAGE) }), body: { messageListToDelete: void 0 }, keyMap: { request: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } };
  59124. }(e3)), this._configMap.set(fs, function(e4) {
  59125. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.BIG_GROUP_LONG_POLLING, ".").concat(V.CMD.AVCHATROOM_LONG_POLL) }), body: { USP: 1, startSeq: 1, startBroadcastSeq: void 0, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { request: { USP: "USP" }, response: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } };
  59126. }(e3)), this._configMap.set(vs, function(e4) {
  59127. return e4.a2, e4.tinyid, { head: t(t({}, g(e4, Hr)), {}, { servcmd: "".concat(V.NAME.BIG_GROUP_LONG_POLLING_NO_AUTH, ".").concat(V.CMD.AVCHATROOM_LONG_POLL) }), body: { USP: 1, startSeq: 1, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { request: { USP: "USP" }, response: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } };
  59128. }(e3)), this._configMap.set(ms, function(e4) {
  59129. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_ONLINE_MEMBER_NUM) }), body: { groupID: void 0 } };
  59130. }(e3)), this._configMap.set(Is, function(e4) {
  59131. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.SET_GROUP_ATTRIBUTES) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { request: { key: "key", value: "value" } } };
  59132. }(e3)), this._configMap.set(Cs, function(e4) {
  59133. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.MODIFY_GROUP_ATTRIBUTES) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { request: { key: "key", value: "value" } } };
  59134. }(e3)), this._configMap.set(Ts, function(e4) {
  59135. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DELETE_GROUP_ATTRIBUTES) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { request: { key: "key" } } };
  59136. }(e3)), this._configMap.set(Ds, function(e4) {
  59137. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.CLEAR_GROUP_ATTRIBUTES) }), body: { groupID: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] } };
  59138. }(e3)), this._configMap.set(ks, function(e4) {
  59139. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_ATTR, ".").concat(V.CMD.GET_GROUP_ATTRIBUTES) }), body: { groupID: void 0, avChatRoomKey: void 0, groupType: 1 }, keyMap: { request: { avChatRoomKey: "Key", groupType: "GroupType" } } };
  59140. }(e3)), this._configMap.set(Ls, function(e4) {
  59141. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_NOTIFY) }), body: { notifyType: 1, groupID: "", beginTime: 0, endTime: 0, limit: 20 }, keyMap: { request: {}, response: { NextMsgTime: "nextRevokedTime", NotifyMsgList: "notifyList" } } };
  59142. }(e3)), this._configMap.set(As, function(e4) {
  59143. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.UPDATE_GROUP_COUNTER) }), body: { groupID: void 0, counterList: void 0, avChatRoomKey: void 0, mode: void 0 }, keyMap: { request: { counterList: "GroupCounter" } } };
  59144. }(e3)), this._configMap.set(Rs, function(e4) {
  59145. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_COUNTER) }), body: { groupID: void 0, keyList: [], avChatRoomKey: void 0 }, keyMap: { request: { keyList: "GroupCounterKeys" } } };
  59146. }(e3)), this._configMap.set(ta, function(e4) {
  59147. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.CREATE_TOPIC) }), body: { groupID: void 0, topicName: void 0, avatar: void 0, customData: void 0, topicID: void 0, notification: void 0, introduction: void 0 }, keyMap: { request: { avatar: "FaceUrl" } } };
  59148. }(e3)), this._configMap.set(na, function(e4) {
  59149. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.DELETE_TOPIC) }), body: { groupID: void 0, topicIDList: void 0 }, keyMap: { request: { topicIDList: "TopicIdList" }, response: { DestroyResultItem: "resultList" } } };
  59150. }(e3)), this._configMap.set(oa, function(e4) {
  59151. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.UPDATE_TOPIC_PROFILE) }), body: { groupID: void 0, topicID: void 0, avatar: void 0, customData: void 0, notification: void 0, introduction: void 0, muteAllMembers: void 0, topicName: void 0 }, keyMap: { request: { avatar: "FaceUrl", muteAllMembers: "ShutUpAllMember" } } };
  59152. }(e3)), this._configMap.set(sa, function(e4) {
  59153. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(V.CMD.GET_TOPIC_LIST) }), body: { groupID: void 0, topicIDList: void 0, MemberInfoFilter: ["NoUnreadSeqList"] }, keyMap: { request: { topicIDList: "TopicIdList" }, response: { TopicAndSelfInfo: "topicInfoList", TopicInfo: "topic", GroupID: "groupID", ShutUpTime: "muteTime", ShutUpAllFlag: "muteAllMembers", LastMsgTime: "lastMessageTime", MsgSeq: "readedSequence", LastMsgSeq: "sequence", NoUnreadSeqList: "excludedUnreadSequenceList" } } };
  59154. }(e3)), this._configMap.set(Ns, function(e4) {
  59155. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_MEMBER_LIST) }), body: { groupID: void 0, limit: 0, offset: void 0, next: void 0, memberRoleFilter: void 0, memberInfoFilter: ["Role", "NameCard", "ShutUpUntil", "JoinTime"], memberCustomFieldFilter: void 0 }, keyMap: { request: { memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, response: { AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", MemberList: "members", ShutUpUntil: "muteUntil" } } };
  59156. }(e3)), this._configMap.set(Os, function(e4) {
  59157. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_AVCHATROOM, ".").concat(V.CMD.GET_AVCHATROOM_MEMBER_LIST) }), body: { groupID: void 0, offset: void 0, filter: void 0 }, keyMap: { request: { offset: "Timestamp", filter: "Mark" }, response: { NextTimestamp: "offset" } } };
  59158. }(e3)), this._configMap.set(Gs, function(e4) {
  59159. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_GROUP_MEMBER_INFO) }), body: { groupID: void 0, userIDList: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { request: { userIDList: "Member_List_Account", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, response: { MemberList: "members", ShutUpUntil: "muteUntil", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", AppMemberDefinedData: "memberCustomField" } } };
  59160. }(e3)), this._configMap.set(Us, function(e4) {
  59161. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.ADD_GROUP_MEMBER) }), body: { groupID: void 0, silence: void 0, userIDList: void 0 }, keyMap: { request: { userID: "Member_Account", userIDList: "MemberList" }, response: { MemberList: "members" } } };
  59162. }(e3)), this._configMap.set(Ps, function(e4) {
  59163. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DELETE_GROUP_MEMBER) }), body: { groupID: void 0, userIDList: void 0, reason: void 0 }, keyMap: { request: { userIDList: "MemberToDel_Account" } } };
  59164. }(e3)), this._configMap.set(bs, function(e4) {
  59165. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.BAN_AVCHATROOM_MEMBER) }), body: { groupID: void 0, userIDList: void 0, duration: void 0, reason: "" }, keyMap: { request: { userIDList: "Members_Account", duration: "Duration", reason: "Description" } } };
  59166. }(e3)), this._configMap.set(ws, function(e4) {
  59167. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.MODIFY_GROUP_MEMBER_INFO) }), body: { groupID: void 0, topicID: void 0, userID: void 0, messageRemindType: void 0, nameCard: void 0, role: void 0, memberCustomField: void 0, muteTime: void 0 }, keyMap: { request: { userID: "Member_Account", memberCustomField: "AppMemberDefinedData", muteTime: "ShutUpTime", messageRemindType: "MsgFlag" } } };
  59168. }(e3)), this._configMap.set(Fs, function(e4) {
  59169. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP_AVCHATROOM, ".").concat(V.CMD.MARK_AVCHATROOM_MEMBER_INFO) }), body: { groupID: void 0, operationType: 1, memberList: [] }, keyMap: { request: { operationType: "CommandType", memberList: "MemberList", markType: "Marks", userID: "Member_Account" }, response: { CommandType: "operationType", Marks: "markType", Member_Account: "userID" } } };
  59170. }(e3)), this._configMap.set(Bs, function(e4) {
  59171. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STAT, ".").concat(V.CMD.TIM_WEB_REPORT_V2) }), body: { header: {}, event: [], quality: [] }, keyMap: { request: { SDKType: "sdk_type", SDKVersion: "sdk_version", deviceType: "device_type", platform: "platform", instanceID: "instance_id", traceID: "trace_id", SDKAppID: "sdk_app_id", userID: "user_id", tinyID: "tiny_id", extension: "extension", timestamp: "timestamp", networkType: "network_type", eventType: "event_type", code: "error_code", message: "error_message", moreMessage: "more_message", duplicate: "duplicate", costTime: "cost_time", level: "level", qualityType: "quality_type", reportIndex: "report_index", wholePeriod: "whole_period", totalCount: "total_count", rttCount: "success_count_business", successRateOfRequest: "percent_business", countLessThan1Second: "success_count_business", percentOfCountLessThan1Second: "percent_business", countLessThan3Second: "success_count_platform", percentOfCountLessThan3Second: "percent_platform", successCountOfBusiness: "success_count_business", successRateOfBusiness: "percent_business", successCountOfPlatform: "success_count_platform", successRateOfPlatform: "percent_platform", successCountOfMessageReceived: "success_count_business", successRateOfMessageReceived: "percent_business", avgRTT: "average_value", avgDelay: "average_value", avgValue: "average_value", uiPlatform: "ui_platform" } } };
  59172. }(o2)), this._configMap.set(Hs, function(e4) {
  59173. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.HEARTBEAT, ".").concat(V.CMD.ALIVE) }), body: {} };
  59174. }(e3)), this._configMap.set(Ks, function(e4) {
  59175. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_PUSH, ".").concat(V.CMD.MESSAGE_PUSH) }), body: {}, keyMap: { response: { C2cMsgArray: "C2CMessageArray", GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", C2cNotifyMsgArray: "C2CNotifyMessageArray", C2cMsgInfo: "C2CReadReceiptArray", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyAdd_Account: "userID", ProfileImNick: "nick", PendencyType: "applicationType", C2CReadAllMsg: "readAllC2CMessage", IsNeedReadReceipt: "needReadReceipt", Status: "statusType" } } };
  59176. }(e3)), this._configMap.set(Ws, function(e4) {
  59177. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_PUSH, ".").concat(V.CMD.MULTI_MESSAGE_PUSH) }), body: {}, keyMap: { response: { GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyType: "applicationType" } } };
  59178. }(e3)), this._configMap.set(Ys, function(e4) {
  59179. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.MESSAGE_PUSH_ACK) }), body: { sessionData: void 0 }, keyMap: { request: { sessionData: "SessionData" } } };
  59180. }(e3)), this._configMap.set(js, function(e4) {
  59181. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STATUS_FORCE_OFFLINE) }), body: {}, keyMap: { response: { C2cNotifyMsgArray: "C2CNotifyMessageArray", NoticeSeq: "noticeSequence", KickoutMsgNotify: "kickoutMsgNotify", NewInstInfo: "newInstanceInfo" } } };
  59182. }(e3)), this._configMap.set(Js, function(e4) {
  59183. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_LONG_MESSAGE, ".").concat(V.CMD.DOWNLOAD_MERGER_MESSAGE) }), body: { downloadKey: "" }, keyMap: { response: { Data: "data", Desc: "description", Ext: "extension", Download_Flag: "downloadFlag", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID" } } };
  59184. }(e3)), this._configMap.set(zs, function(e4) {
  59185. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_LONG_MESSAGE, ".").concat(V.CMD.UPLOAD_MERGER_MESSAGE) }), body: { messageList: [] }, keyMap: { request: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", type: "MsgType", content: "MsgContent", data: "Data", description: "Desc", extension: "Ext", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody" } } };
  59186. }(e3)), this._configMap.set(da, function(e4) {
  59187. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SET_TOKEN) }), body: { tokenID: "", pushMsg: 0, sdkAppID: 0, businessID: "", deviceBrand: "", deviceToken: "", isTpns: 0, isWebUniapp: 0 }, keyMap: { request: { tokenID: "TokenID", pushMsg: "PushMsg", sdkAppID: "EnterVersion", businessID: "BusiID", deviceBrand: "InstType", deviceToken: "VarToken", isTpns: "IsTpns" } } };
  59188. }(e3)), this._configMap.set(la, function(e4) {
  59189. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STAT_FOREGROUND) }), body: { isWebUniapp: 0 } };
  59190. }(e3)), this._configMap.set(ca, function(e4) {
  59191. return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STAT_BACKGROUND) }), body: { C2CUnread: 0, GroupUnread: 0, isWebUniapp: 0 }, keyMap: { request: { c2cUnreadCount: "C2cUnread", groupUnreadCount: "GrpUnread" } } };
  59192. }(e3));
  59193. } }, { key: "has", value: function(e3) {
  59194. return this._configMap.has(e3);
  59195. } }, { key: "get", value: function(e3) {
  59196. return this._configMap.get(e3);
  59197. } }, { key: "update", value: function() {
  59198. this._fillConfigMap();
  59199. } }, { key: "getKeyMap", value: function(e3) {
  59200. return this.has(e3) ? this.get(e3).keyMap || {} : (Ve.w("".concat(this._n, ".getKeyMap unknown protocolName:").concat(e3)), {});
  59201. } }, { key: "getProtocolData", value: function(e3) {
  59202. var t2 = e3.protocolName, n2 = e3.requestData, o2 = this.get(t2), s2 = null;
  59203. if (n2) {
  59204. var a2 = this._simpleDeepCopy(o2), i2 = this._updateService(n2, a2), r2 = i2.body, u2 = /* @__PURE__ */ Object.create(null);
  59205. for (var c2 in r2)
  59206. if (Object.prototype.hasOwnProperty.call(r2, c2)) {
  59207. if (u2[c2] = r2[c2], void 0 === n2[c2])
  59208. continue;
  59209. u2[c2] = n2[c2];
  59210. }
  59211. i2.body = u2, s2 = this._getUplinkData(i2);
  59212. } else
  59213. s2 = this._getUplinkData(o2);
  59214. return s2;
  59215. } }, { key: "_getUplinkData", value: function(e3) {
  59216. var t2 = this._requestDataCleaner(e3), n2 = bt(t2.head), o2 = Sr(t2.body, this._getRequestKeyMap(n2));
  59217. return t2.body = o2, t2;
  59218. } }, { key: "_updateService", value: function(e3, t2) {
  59219. var n2 = bt(t2.head);
  59220. if (this._isFromGroupRequest(t2)) {
  59221. var o2 = e3.type, s2 = e3.groupID, a2 = void 0 === s2 ? void 0 : s2, i2 = e3.groupIDList, r2 = void 0 === i2 ? [] : i2;
  59222. it(a2) && (a2 = r2[0] || ""), Dt({ type: o2, groupID: a2 }) && (t2.head.servcmd = "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(n2));
  59223. }
  59224. return t2;
  59225. } }, { key: "_isFromGroupRequest", value: function(e3) {
  59226. return e3.head.servcmd.includes(V.NAME.GROUP) || e3.head.servcmd.includes(V.NAME.GROUP_ATTR);
  59227. } }, { key: "_getRequestKeyMap", value: function(e3) {
  59228. var n2 = this.getKeyMap(e3);
  59229. return t(t({}, Dr.request), n2.request);
  59230. } }, { key: "_requestDataCleaner", value: function(e3) {
  59231. var t2 = Array.isArray(e3) ? [] : /* @__PURE__ */ Object.create(null);
  59232. for (var o2 in e3)
  59233. Object.prototype.hasOwnProperty.call(e3, o2) && dt(o2) && null !== e3[o2] && void 0 !== e3[o2] && ("object" !== n(e3[o2]) ? t2[o2] = e3[o2] : t2[o2] = this._requestDataCleaner.bind(this)(e3[o2]));
  59234. return t2;
  59235. } }, { key: "_simpleDeepCopy", value: function(e3) {
  59236. for (var t2, n2 = Object.keys(e3), o2 = {}, s2 = 0, a2 = n2.length; s2 < a2; s2++)
  59237. t2 = n2[s2], at(e3[t2]) ? o2[t2] = Array.from(e3[t2]) : ot(e3[t2]) ? o2[t2] = this._simpleDeepCopy(e3[t2]) : o2[t2] = e3[t2];
  59238. return o2;
  59239. } }]), e2;
  59240. }(), Wr = [Ys], Yr = function() {
  59241. function e2(t2) {
  59242. o(this, e2), this._sessionModule = t2, this._n = "DownlinkHandler", this._eventHandlerMap = /* @__PURE__ */ new Map(), this._eventHandlerMap.set("C2CMessageArray", this._c2cMessageArrayHandler.bind(this)), this._eventHandlerMap.set("groupMessageArray", this._groupMessageArrayHandler.bind(this)), this._eventHandlerMap.set("groupTips", this._groupTipsHandler.bind(this)), this._eventHandlerMap.set("C2CNotifyMessageArray", this._C2CNotifyMessageArrayHandler.bind(this)), this._eventHandlerMap.set("C2CReadReceiptArray", this._C2CReadReceiptArrayHandler.bind(this)), this._eventHandlerMap.set("profileModify", this._profileHandler.bind(this)), this._eventHandlerMap.set("friendListMod", this._relationChainHandler.bind(this)), this._eventHandlerMap.set("recentContactMod", this._recentContactHandler.bind(this)), this._eventHandlerMap.set("readAllC2CMessage", this._allMessageReadHandler.bind(this)), this._eventHandlerMap.set("c2cMessageModified", this._c2cMessageModifiedHandler.bind(this)), this._eventHandlerMap.set("groupMessageModified", this._groupMessageModifiedHandler.bind(this)), this._eventHandlerMap.set("userStatusList", this._userStatusListHandler.bind(this)), this._eventHandlerMap.set("messageExtensionNotify", this._messageExtensionNotifyHandler.bind(this)), this._keys = m(this._eventHandlerMap.keys());
  59243. }
  59244. return a(e2, [{ key: "_c2cMessageArrayHandler", value: function(e3) {
  59245. var t2 = this._sessionModule.getModule(Un);
  59246. if (t2) {
  59247. if (e3.dataList.forEach(function(e4) {
  59248. if (1 === e4.isSyncMessage) {
  59249. var t3 = e4.from;
  59250. e4.from = e4.to, e4.to = t3;
  59251. }
  59252. }), 1 === e3.needSync)
  59253. this._sessionModule.getModule(jn).startOnlineSync();
  59254. t2.onNewC2CMessage({ dataList: e3.dataList, isInstantMessage: true });
  59255. }
  59256. } }, { key: "_c2cMessageModifiedHandler", value: function(e3) {
  59257. var t2 = this._sessionModule.getModule(Un);
  59258. t2 && t2.onC2CMessageModified(e3);
  59259. } }, { key: "_groupMessageArrayHandler", value: function(e3) {
  59260. var t2 = this._sessionModule.getModule(Pn);
  59261. t2 && t2.onNewGroupMessage({ event: e3.event, dataList: e3.dataList, isInstantMessage: true });
  59262. } }, { key: "_groupMessageModifiedHandler", value: function(e3) {
  59263. var t2 = this._sessionModule.getModule(Pn);
  59264. t2 && t2.onGroupMessageModified(e3);
  59265. } }, { key: "_groupTipsHandler", value: function(e3) {
  59266. var t2 = this._sessionModule.getModule(Pn);
  59267. if (t2) {
  59268. var n2 = e3.event, o2 = e3.dataList, s2 = e3.isInstantMessage, a2 = void 0 === s2 || s2, i2 = e3.isSyncingEnded;
  59269. switch (n2) {
  59270. case 4:
  59271. case 6:
  59272. t2.onNewGroupTips({ event: n2, dataList: o2 });
  59273. break;
  59274. case 5:
  59275. for (var r2 = 0; r2 < o2.length; r2++)
  59276. if (at(o2[r2].elements.revokedInfos))
  59277. t2.onGroupMessageRevoked({ dataList: o2 });
  59278. else if (at(o2[r2].elements.groupMessageReadNotice))
  59279. t2.onGroupMessageReadNotice({ dataList: o2 });
  59280. else {
  59281. if (!at(o2[r2].elements.readReceiptList)) {
  59282. t2.onNewGroupSystemNotice({ dataList: o2, isInstantMessage: a2, isSyncingEnded: i2 });
  59283. break;
  59284. }
  59285. t2.onReadReceiptList({ dataList: o2 });
  59286. }
  59287. break;
  59288. case 12:
  59289. this._sessionModule.getModule(qn).onNewGroupAtTips({ dataList: o2 });
  59290. break;
  59291. default:
  59292. Ve.l("".concat(this._n, "._groupTipsHandler unknown event:").concat(n2, " dataList:"), o2);
  59293. }
  59294. }
  59295. } }, { key: "_C2CNotifyMessageArrayHandler", value: function(e3) {
  59296. var t2 = this, n2 = e3.dataList;
  59297. if (at(n2)) {
  59298. var o2 = this._sessionModule.getModule(Un);
  59299. n2.forEach(function(e4) {
  59300. if (st(e4)) {
  59301. if (e4.hasOwnProperty("kickoutMsgNotify")) {
  59302. var s2 = e4.kickoutMsgNotify, a2 = s2.kickType, i2 = s2.newInstanceInfo, r2 = void 0 === i2 ? {} : i2;
  59303. 1 === a2 ? t2._sessionModule.onMultipleAccountKickedOut(r2) : 2 === a2 ? t2._sessionModule.onMultipleDeviceKickedOut(r2) : 3 === a2 && t2._sessionModule.onRestApiKickedOut(r2);
  59304. } else if (e4.hasOwnProperty("c2cMessageRevokedNotify"))
  59305. o2 && o2.onC2CMessageRevoked({ dataList: n2 });
  59306. else if (e4.hasOwnProperty("c2cMessageReadReceipt"))
  59307. o2 && o2.onC2CMessageReadReceipt({ dataList: n2 });
  59308. else if (e4.hasOwnProperty("c2cMessageReadNotice"))
  59309. o2 && o2.onC2CMessageReadNotice({ dataList: n2 });
  59310. else if (e4.hasOwnProperty("muteNotificationsSync")) {
  59311. t2._sessionModule.getModule(qn).onC2CMessageRemindTypeSynced({ dataList: n2 });
  59312. }
  59313. }
  59314. });
  59315. }
  59316. } }, { key: "_C2CReadReceiptArrayHandler", value: function(e3) {
  59317. this._sessionModule.getModule(Un).onReadReceiptList(e3);
  59318. } }, { key: "_profileHandler", value: function(e3) {
  59319. this._sessionModule.getModule(Gn).onProfileModified({ dataList: e3.dataList });
  59320. var t2 = this._sessionModule.getModule(bn);
  59321. t2 && t2.onFriendProfileModified({ dataList: e3.dataList });
  59322. } }, { key: "_relationChainHandler", value: function(e3) {
  59323. this._sessionModule.getModule(Gn).onRelationChainModified({ dataList: e3.dataList });
  59324. var t2 = this._sessionModule.getModule(bn);
  59325. t2 && t2.onRelationChainModified({ dataList: e3.dataList });
  59326. } }, { key: "_recentContactHandler", value: function(e3) {
  59327. var t2 = e3.dataList;
  59328. if (at(t2)) {
  59329. var n2 = this._sessionModule.getModule(qn);
  59330. n2 && t2.forEach(function(e4) {
  59331. var t3 = e4.pushType;
  59332. if (1 === t3) {
  59333. var o2 = e4.recentContactDeleteItem;
  59334. n2.onConversationDeleted(o2.recentContactList);
  59335. } else if (2 === t3) {
  59336. var s2 = e4.recentContactTopItem;
  59337. n2.onConversationPinned(s2.recentContactList);
  59338. } else if (3 === t3) {
  59339. var a2 = e4.recentContactTopItem;
  59340. n2.onConversationUnpinned(a2.recentContactList);
  59341. } else if (4 === t3) {
  59342. var i2 = e4.recentContactMarkContact;
  59343. n2.onConversationMarkUpdated(i2.recentContactMarkContactItem);
  59344. } else if (5 === t3) {
  59345. var r2 = e4.recentContactCreateContactGroup;
  59346. n2.onConversationGroupCreated(r2.msgContactGroupContactItem);
  59347. } else if (6 === t3) {
  59348. var u2 = e4.recentContactDelContactGroup;
  59349. n2.onConversationGroupDeleted(u2.msgGroupItem);
  59350. } else if (7 === t3) {
  59351. var c2 = e4.recentContactUpdateContactGroup, l2 = c2.updateType, d2 = c2.msgUpdateGroup, p2 = c2.msgUpdateContact;
  59352. if (1 === l2) {
  59353. var g2 = d2.updateGroupType;
  59354. 1 === g2 ? n2.onConversationGroupNameUpdated(d2) : 2 === g2 && n2.onConversationInGroupUpdated(d2);
  59355. } else
  59356. 2 === l2 && n2.onConversationAddedToOrDeletedFromGroup(p2);
  59357. }
  59358. });
  59359. }
  59360. } }, { key: "_allMessageReadHandler", value: function(e3) {
  59361. var t2 = e3.dataList, n2 = this._sessionModule.getModule(qn);
  59362. n2 && n2.onPushedAllMessageRead(t2);
  59363. } }, { key: "_userStatusListHandler", value: function(e3) {
  59364. this._sessionModule.getModule(Gn).onUserStatusUpdated(e3);
  59365. } }, { key: "_messageExtensionNotifyHandler", value: function(e3) {
  59366. this._sessionModule.getModule(On).onMessageExtensionNotify(e3);
  59367. } }, { key: "onMessage", value: function(e3) {
  59368. var t2 = this, n2 = e3.body;
  59369. if (this._filterMessageFromIMOpenPush(e3)) {
  59370. var o2 = n2.eventArray, s2 = n2.isInstantMessage, a2 = n2.isSyncingEnded, i2 = n2.needSync;
  59371. if (at(o2))
  59372. for (var r2 = null, u2 = null, c2 = 0, l2 = 0, d2 = o2.length; l2 < d2; l2++) {
  59373. c2 = (r2 = o2[l2]).event;
  59374. var p2 = Object.keys(r2).find(function(e4) {
  59375. return -1 !== t2._keys.indexOf(e4);
  59376. });
  59377. p2 ? (u2 = 14 === c2 ? { readAllC2CMessage: r2[p2], groupMessageReadInfoList: r2.groupMessageReadNotice || [] } : 16 === c2 ? { userID: r2.userID, readReceiptList: r2[p2] } : r2[p2], this._eventHandlerMap.get(p2)({ event: c2, dataList: u2, isInstantMessage: s2, isSyncingEnded: a2, needSync: i2 })) : Ve.l("".concat(this._n, ".onMessage unknown eventItem:").concat(r2));
  59378. }
  59379. }
  59380. } }, { key: "_filterMessageFromIMOpenPush", value: function(e3) {
  59381. var t2 = e3.head, n2 = e3.body, o2 = t2.servcmd, s2 = false;
  59382. if (it(o2) || (s2 = o2.includes(V.NAME.IM_CONFIG_MANAGER) || o2.includes(V.NAME.OVERLOAD_PUSH) || o2.includes(V.NAME.STAT_SERVICE)), !s2)
  59383. return true;
  59384. if (o2.includes(V.CMD.PUSHED_CLOUD_CONTROL_CONFIG))
  59385. this._sessionModule.getModule(Zn).onPushedCloudControlConfig(n2);
  59386. else if (o2.includes(V.CMD.PUSHED_COMMERCIAL_CONFIG)) {
  59387. this._sessionModule.getModule(to).onPushedConfig(n2);
  59388. } else if (o2.includes(V.CMD.OVERLOAD_NOTIFY))
  59389. this._sessionModule.onPushedServerOverload(n2);
  59390. else if (o2.includes(V.CMD.KICK_OTHER)) {
  59391. var a2 = Date.now();
  59392. this._sessionModule.reLoginOnKickOther();
  59393. var i2 = new Aa("kickOther"), r2 = this._sessionModule.getModule(Rn).getLastWsHelloTs(), u2 = a2 - r2;
  59394. i2.setMessage("last wshello time:".concat(r2, " diff:").concat(u2, "ms")).setNetworkType(this._sessionModule.getNetworkType()).end();
  59395. }
  59396. return false;
  59397. } }]), e2;
  59398. }(), jr = [{ cmd: V.CMD.GET_GROUP_INFO, interval: 1, count: 20 }, { cmd: V.CMD.GET_AVCHATROOM_MEMBER_LIST, interval: 3, count: 1 }, { cmd: V.CMD.GET_GROUP_APPLICATION, interval: 1, count: 15 }, { cmd: V.CMD.GET_TOPIC_LIST, interval: 1, count: 10 }, { cmd: V.CMD.SET_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.MODIFY_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.DELETE_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.CLEAR_GROUP_ATTRIBUTES, interval: 5, count: 10 }, { cmd: V.CMD.GET_GROUP_ATTRIBUTES, interval: 5, count: 20 }, { cmd: V.CMD.UPDATE_GROUP_COUNTER, interval: 5, count: 20 }, { cmd: V.CMD.GET_GROUP_COUNTER, interval: 5, count: 20 }, { cmd: V.CMD.SET_ALL_MESSAGE_READ, interval: 1, count: 1 }, { cmd: V.CMD.GET_USER_STATUS, interval: 5, count: 20 }, { cmd: V.CMD.SUBSCRIBE_USER_STATUS, interval: 5, count: 20 }, { cmd: V.CMD.UNSUBSCRIBE_USER_STATUS, interval: 5, count: 20 }], zr = function(e2) {
  59399. r(s2, e2);
  59400. var n2 = f(s2);
  59401. function s2(e3) {
  59402. var t2;
  59403. return o(this, s2), (t2 = n2.call(this, e3))._n = "SessionModule", t2._platform = t2.getPlatform(), t2._protocolHandler = new Kr(h(t2)), t2._messageDispatcher = new Yr(h(t2)), t2._commandFrequencyLimitMap = /* @__PURE__ */ new Map(), t2._commandRequestInfoMap = /* @__PURE__ */ new Map(), t2._serverOverloadInfoMap = /* @__PURE__ */ new Map(), t2._init(), t2.getInnerEmitterInstance().on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
  59404. }
  59405. return a(s2, [{ key: "_init", value: function() {
  59406. this._updateCommandFrequencyLimitMap(jr);
  59407. } }, { key: "_onCloudConfigUpdated", value: function() {
  59408. var e3 = this.getCloudConfig("cmd_frequency_limit");
  59409. it(e3) || (e3 = JSON.parse(e3), this._updateCommandFrequencyLimitMap(e3));
  59410. } }, { key: "_updateCommandFrequencyLimitMap", value: function(e3) {
  59411. var t2 = this;
  59412. e3.forEach(function(e4) {
  59413. t2._commandFrequencyLimitMap.set(e4.cmd, { interval: e4.interval, count: e4.count });
  59414. });
  59415. } }, { key: "updateProtocolConfig", value: function() {
  59416. this._protocolHandler.update();
  59417. } }, { key: "request", value: function(e3) {
  59418. Ve.d("".concat(this._n, ".request options:"), e3);
  59419. var t2 = e3.protocolName, n3 = e3.tjgID;
  59420. if (!this._protocolHandler.has(t2))
  59421. return Ve.w("".concat(this._n, ".request unknown protocol:").concat(t2)), Za({ code: ha.CANNOT_FIND_PROTOCOL });
  59422. var o2 = this.getProtocolData(e3), s3 = o2.head.servcmd;
  59423. if (this._isFrequencyOverLimit(s3))
  59424. return Za({ code: ha.OVER_FREQUENCY_LIMIT });
  59425. if (this._isServerOverload(s3))
  59426. return Za({ code: ha.OPEN_SERVICE_OVERLOAD_ERROR });
  59427. zt(n3) || (o2.head.tjgID = n3);
  59428. var a2 = this.getModule(Jn);
  59429. return Wr.includes(t2) ? a2.simplySend(o2) : a2.send(o2);
  59430. } }, { key: "getKeyMap", value: function(e3) {
  59431. return this._protocolHandler.getKeyMap(e3);
  59432. } }, { key: "genCommonHead", value: function() {
  59433. var e3 = this.getModule(xn);
  59434. return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, a2: e3.getA2Key() || void 0, tinyid: e3.getTinyID() || void 0, status_instid: e3.getStatusInstanceID(), sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getA2Key() ? void 0 : e3.getUserID(), usersig: e3.getA2Key() ? void 0 : e3.getUserSig(), sdkability: 192371, tjgID: "" };
  59435. } }, { key: "genCosSpecifiedHead", value: function() {
  59436. var e3 = this.getModule(xn);
  59437. return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, sdkappid: e3.getSDKAppID(), contenttype: e3.getContentType(), reqtime: 0, identifier: e3.getUserID(), usersig: e3.getUserSig(), status_instid: e3.getStatusInstanceID(), sdkability: 192371 };
  59438. } }, { key: "genSSOReportHead", value: function() {
  59439. var e3 = this.getModule(xn);
  59440. return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, sdkappid: e3.getSDKAppID(), contenttype: "", reqtime: 0, identifier: "", usersig: "", status_instid: e3.getStatusInstanceID(), sdkability: 192371 };
  59441. } }, { key: "getProtocolData", value: function(e3) {
  59442. return this._protocolHandler.getProtocolData(e3);
  59443. } }, { key: "trans", value: function(e3) {
  59444. var n3 = e3.servcmd, o2 = e3.data, s3 = { head: t(t({}, this.genCommonHead()), {}, { servcmd: n3 }), body: o2 };
  59445. return this.getModule(Jn).send(s3);
  59446. } }, { key: "sendComboMessage", value: function(e3) {
  59447. var n3 = e3.servcmd, o2 = e3.data, s3 = { head: t(t({}, this.genCommonHead()), {}, { servcmd: n3 }), body: o2 };
  59448. return this.getModule(Jn).send(s3);
  59449. } }, { key: "onErrorCodeNotZero", value: function(e3) {
  59450. var t2 = e3.errorCode;
  59451. if (t2 === ha.HELLO_ANSWER_KICKED_OUT) {
  59452. var n3 = e3.kickType, o2 = e3.newInstanceInfo, s3 = void 0 === o2 ? {} : o2;
  59453. 1 === n3 ? this.onMultipleAccountKickedOut(s3) : 2 === n3 ? this.onMultipleDeviceKickedOut(s3) : 3 === n3 && this.onRestApiKickedOut(s3);
  59454. }
  59455. t2 !== ha.MESSAGE_A2KEY_EXPIRED && t2 !== ha.ACCOUNT_A2KEY_EXPIRED || (this._onUserSigExpired(), this.getModule(Jn).reConnect());
  59456. } }, { key: "onMessage", value: function(e3) {
  59457. var t2 = e3.body, n3 = t2.needAck, o2 = void 0 === n3 ? 0 : n3, s3 = t2.sessionData;
  59458. 1 === o2 && this._sendACK(s3), this._messageDispatcher.onMessage(e3);
  59459. } }, { key: "onReconnected", value: function() {
  59460. this._reLoginOnReconnected();
  59461. } }, { key: "reLoginOnKickOther", value: function() {
  59462. Ve.l("".concat(this._n, ".reLoginOnKickOther")), this._reLogin();
  59463. } }, { key: "_reLoginOnReconnected", value: function() {
  59464. Ve.l("".concat(this._n, "._reLoginOnReconnected")), this._reLogin();
  59465. } }, { key: "_reLogin", value: function() {
  59466. var e3 = this;
  59467. if (this.isLoggedIn()) {
  59468. var t2 = 0, n3 = this.getModule(no);
  59469. n3.canIUseOfflinePush() && (t2 = n3.getUniAppPlatform()), this.request({ protocolName: co, requestData: { isWebUniapp: t2 } }).then(function(t3) {
  59470. var n4 = t3.data.instanceID;
  59471. e3.getModule(xn).setStatusInstanceID(n4), Ve.l("".concat(e3._n, "._reLogin ok.")), e3.getModule(qn).syncConversationList().then(function() {
  59472. Ve.l("".concat(e3._n, "._reLogin, sync conversation list ok.")), e3.getModule($n).start();
  59473. }), e3.getModule(Pn).updateLocalMainSequenceOnReconnected();
  59474. var o2 = e3.getModule(Fn);
  59475. o2.resetGetTopicTime(), o2.getTopicListOnReconnected();
  59476. });
  59477. }
  59478. } }, { key: "onMultipleAccountKickedOut", value: function(e3) {
  59479. this.getModule(Rn).onMultipleAccountKickedOut(e3);
  59480. } }, { key: "onMultipleDeviceKickedOut", value: function(e3) {
  59481. this.getModule(Rn).onMultipleDeviceKickedOut(e3);
  59482. } }, { key: "_onUserSigExpired", value: function() {
  59483. this.getModule(Rn).onUserSigExpired();
  59484. } }, { key: "onRestApiKickedOut", value: function(e3) {
  59485. this.getModule(Rn).onRestApiKickedOut(e3);
  59486. } }, { key: "_sendACK", value: function(e3) {
  59487. this.request({ protocolName: Ys, requestData: { sessionData: e3 } });
  59488. } }, { key: "_isFrequencyOverLimit", value: function(e3) {
  59489. var t2 = e3.split(".")[1];
  59490. if (!this._commandFrequencyLimitMap.has(t2))
  59491. return false;
  59492. if (!this._commandRequestInfoMap.has(t2))
  59493. return this._commandRequestInfoMap.set(t2, { startTime: Date.now(), requestCount: 1 }), false;
  59494. var n3 = this._commandFrequencyLimitMap.get(t2), o2 = n3.count, s3 = n3.interval, a2 = this._commandRequestInfoMap.get(t2), i2 = a2.startTime, r2 = a2.requestCount;
  59495. if (Date.now() - i2 > 1e3 * s3)
  59496. return this._commandRequestInfoMap.set(t2, { startTime: Date.now(), requestCount: 1 }), false;
  59497. r2 += 1, this._commandRequestInfoMap.set(t2, { startTime: i2, requestCount: r2 });
  59498. var u2 = false;
  59499. return r2 > o2 && (u2 = true), u2;
  59500. } }, { key: "_isServerOverload", value: function(e3) {
  59501. if (!this._serverOverloadInfoMap.has(e3))
  59502. return false;
  59503. var t2 = this._serverOverloadInfoMap.get(e3), n3 = t2.overloadTime, o2 = t2.waitingTime, s3 = false;
  59504. return Date.now() - n3 <= 1e3 * o2 ? s3 = true : (this._serverOverloadInfoMap.delete(e3), s3 = false), s3;
  59505. } }, { key: "onPushedServerOverload", value: function(e3) {
  59506. var t2 = e3.overloadCommand, n3 = e3.waitingTime;
  59507. this._serverOverloadInfoMap.set(t2, { overloadTime: Date.now(), waitingTime: n3 }), Ve.w("".concat(this._n, ".onPushedServerOverload waitingTime:").concat(n3, "s"));
  59508. } }, { key: "reset", value: function() {
  59509. Ve.l("".concat(this._n, ".reset")), this._updateCommandFrequencyLimitMap(jr), this._commandRequestInfoMap.clear(), this._serverOverloadInfoMap.clear();
  59510. } }]), s2;
  59511. }(uo), Jr = function(e2) {
  59512. r(n2, e2);
  59513. var t2 = f(n2);
  59514. function n2(e3) {
  59515. var s2;
  59516. return o(this, n2), (s2 = t2.call(this, e3))._n = "MessageLossDetectionModule", s2._maybeLostSequencesMap = /* @__PURE__ */ new Map(), s2._firstRoundRet = [], s2;
  59517. }
  59518. return a(n2, [{ key: "onMessageMaybeLost", value: function(e3, t3, n3) {
  59519. this._maybeLostSequencesMap.has(e3) || this._maybeLostSequencesMap.set(e3, []);
  59520. for (var o2 = this._maybeLostSequencesMap.get(e3), s2 = 0; s2 < n3; s2++)
  59521. -1 === o2.indexOf(t3 + s2) && o2.push(t3 + s2);
  59522. } }, { key: "detectFirstRound", value: function(e3, t3) {
  59523. var n3 = this._maybeLostSequencesMap.get(e3);
  59524. if (!zt(n3) && !zt(t3)) {
  59525. var o2 = n3.filter(function(e4) {
  59526. return -1 === t3.indexOf(e4);
  59527. });
  59528. 0 === o2.length ? Ve.i("".concat(this._n, ".detectFirstRound no message loss. conversationID:").concat(e3)) : this._firstRoundRet = this._firstRoundRet.concat(o2), n3.length = 0;
  59529. }
  59530. } }, { key: "detectSecondRound", value: function(e3, t3) {
  59531. if (!zt(this._firstRoundRet) && !zt(t3)) {
  59532. var n3 = this._firstRoundRet.filter(function(e4) {
  59533. return -1 === t3.indexOf(e4);
  59534. });
  59535. this._firstRoundRet.length = 0;
  59536. var o2, s2 = n3.length;
  59537. if (0 !== s2)
  59538. s2 <= 5 ? o2 = e3 + "-" + n3.join("-") : (n3.sort(function(e4, t4) {
  59539. return e4 - t4;
  59540. }), o2 = e3 + " start:" + n3[0] + " end:" + n3[s2 - 1] + " count:" + s2), new Aa("messageLoss").setMessage(o2).setNetworkType(this.getNetworkType()).setLevel("warning").end(), Ve.i("".concat(this._n, ".detectSecondRound message loss detected. conversationID:").concat(e3, " lostSequences:").concat(n3));
  59541. }
  59542. } }, { key: "reset", value: function() {
  59543. Ve.l("".concat(this._n, ".reset")), this._maybeLostSequencesMap.clear(), this._firstRoundRet.length = 0;
  59544. } }]), n2;
  59545. }(uo), Xr = function(e2) {
  59546. r(n2, e2);
  59547. var t2 = f(n2);
  59548. function n2(e3) {
  59549. var s2;
  59550. return o(this, n2), (s2 = t2.call(this, e3))._n = "CloudControlModule", s2._cloudConfig = /* @__PURE__ */ new Map(), s2._expiredTime = 0, s2._version = 0, s2._isFetching = false, s2;
  59551. }
  59552. return a(n2, [{ key: "getCloudConfig", value: function(e3) {
  59553. return it(e3) ? this._cloudConfig : this._cloudConfig.has(e3) ? this._cloudConfig.get(e3) : void 0;
  59554. } }, { key: "_canFetchConfig", value: function() {
  59555. return this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime;
  59556. } }, { key: "fetchConfig", value: function() {
  59557. var e3 = this, t3 = this._canFetchConfig();
  59558. if (Ve.l("".concat(this._n, ".fetchConfig canFetchConfig:").concat(t3)), t3) {
  59559. var n3 = new Aa("fetchCloudControlConfig"), o2 = this.getModule(xn).getSDKAppID();
  59560. this._isFetching = true, this.request({ protocolName: Xs, requestData: { SDKAppID: o2, version: this._version } }).then(function(t4) {
  59561. e3._isFetching = false, n3.setMessage("version:".concat(e3._version, " newVersion:").concat(t4.data.version, " config:").concat(t4.data.cloudControlConfig)).setNetworkType(e3.getNetworkType()).end(), Ve.l("".concat(e3._n, ".fetchConfig ok")), e3._parseCloudControlConfig(t4.data);
  59562. }).catch(function(t4) {
  59563. e3._isFetching = false, e3.probeNetwork().then(function(e4) {
  59564. var o3 = v(e4, 2), s2 = o3[0], a2 = o3[1];
  59565. n3.setError(t4, s2, a2).end();
  59566. }), Ve.l("".concat(e3._n, ".fetchConfig failed. error:"), t4), e3._setExpiredTimeOnResponseError(12e4);
  59567. });
  59568. }
  59569. } }, { key: "onPushedCloudControlConfig", value: function(e3) {
  59570. Ve.l("".concat(this._n, ".onPushedCloudControlConfig")), new Aa("pushedCloudControlConfig").setNetworkType(this.getNetworkType()).setMessage("newVersion:".concat(e3.version, " config:").concat(e3.cloudControlConfig)).end(), this._parseCloudControlConfig(e3);
  59571. } }, { key: "onCheckTimer", value: function(e3) {
  59572. this._canFetchConfig() && this.fetchConfig();
  59573. } }, { key: "_parseCloudControlConfig", value: function(e3) {
  59574. var t3 = this, n3 = "".concat(this._n, "._parseCloudControlConfig"), o2 = e3.errorCode, s2 = e3.errorMessage, a2 = e3.cloudControlConfig, i2 = e3.version, r2 = e3.expiredTime;
  59575. if (0 === o2) {
  59576. if (this._version !== i2) {
  59577. var u2 = null;
  59578. try {
  59579. u2 = JSON.parse(a2);
  59580. } catch (c2) {
  59581. this.isPrivateNetWork() || Ve.e("".concat(n3, " JSON parse error. cloudControlConfig:"), a2);
  59582. }
  59583. u2 && (this._cloudConfig.clear(), Object.keys(u2).forEach(function(e4) {
  59584. t3._cloudConfig.set(e4, u2[e4]);
  59585. }), this._version = i2, this.emitInnerEvent(ti));
  59586. }
  59587. this._expiredTime = Date.now() + 1e3 * r2;
  59588. } else
  59589. it(o2) ? (Ve.l("".concat(n3, " failed. Invalid message format:"), e3), this._setExpiredTimeOnResponseError(36e5)) : (Ve.e("".concat(n3, " errorCode:").concat(o2, " errorMessage:").concat(s2)), this._setExpiredTimeOnResponseError(12e4));
  59590. } }, { key: "_setExpiredTimeOnResponseError", value: function(e3) {
  59591. this._expiredTime = Date.now() + e3;
  59592. } }, { key: "reset", value: function() {
  59593. Ve.l("".concat(this._n, ".reset")), this._cloudConfig.clear(), this._expiredTime = 0, this._version = 0, this._isFetching = false;
  59594. } }]), n2;
  59595. }(uo), Zr = function(e2) {
  59596. r(n2, e2);
  59597. var t2 = f(n2);
  59598. function n2(e3) {
  59599. var s2;
  59600. return o(this, n2), (s2 = t2.call(this, e3))._n = "RecoverMessageModule", s2.PULL_LIMIT_COUNT = 15, s2;
  59601. }
  59602. return a(n2, [{ key: "start", value: function() {
  59603. this._recoverGroupChat(), this._recoverC2CChat();
  59604. } }, { key: "_recoverGroupChat", value: function() {
  59605. var e3, t3, n3 = this, o2 = this._getLocalConversationList().filter(function(e4) {
  59606. return e4.type === E.CONV_GROUP && e4.groupProfile.type !== E.GRP_AVCHATROOM;
  59607. }), s2 = this.getModule(qn), a2 = 0, i2 = 0, r2 = 0;
  59608. o2.forEach(function(o3) {
  59609. var u2 = o3.conversationID, c2 = o3.lastMessage;
  59610. t3 = u2.replace(E.CONV_GROUP, ""), e3 = s2.getLocalLastMessage(u2), c2 && 0 !== c2.lastSequence && e3 ? (i2 = c2.lastSequence, a2 = e3.sequence, r2 = i2 - a2, a2 > 0 && r2 >= 1 && r2 < 300 ? n3._recoverGroupMessage({ groupID: t3, localLastMessageSequence: a2, remoteLastMessageSequence: i2 }) : n3._getGroupNotify(t3)) : n3._getGroupNotify(t3);
  59611. });
  59612. } }, { key: "_recoverC2CChat", value: function() {
  59613. var e3, t3 = this, n3 = this._getLocalConversationList().filter(function(e4) {
  59614. return e4.type === E.CONV_C2C;
  59615. }), o2 = this.getModule(qn), s2 = 0, a2 = 0, i2 = 0, r2 = [Promise.resolve()];
  59616. n3.forEach(function(n4) {
  59617. var u2 = n4.conversationID, c2 = n4.lastMessage;
  59618. e3 = o2.getLocalLastMessage(u2), c2 && 0 !== c2.lastTime && e3 && (a2 = c2.lastTime, s2 = e3.time, i2 = a2 - s2, s2 > 0 && i2 >= 1 && i2 <= 600 && r2.push(t3._recoverC2CMessage({ conversationID: u2, localLastMessageTime: s2, remoteLastMessageTime: a2 })));
  59619. }), Promise.all(r2).then(function() {
  59620. Ve.l("".concat(t3._n, "._recoverC2CChat all promise fulfilled, start to sync unread messages")), t3.getModule(jn).startSyncOnReconnected();
  59621. });
  59622. } }, { key: "_getLocalConversationList", value: function() {
  59623. return this.getModule(qn).getLocalConversationList();
  59624. } }, { key: "_recoverGroupMessage", value: function(e3) {
  59625. var t3 = this, n3 = "".concat(this._n, "._recoverGroupMessage");
  59626. Ve.l("".concat(n3, " options:"), e3);
  59627. var o2 = e3.groupID, s2 = e3.localLastMessageSequence, a2 = e3.remoteLastMessageSequence;
  59628. this._getGroupRomaingMessage({ groupID: o2, sequence: s2 }).then(function(e4) {
  59629. var s3 = e4.data, i2 = s3.complete, r2 = s3.messageList;
  59630. if (!it(r2)) {
  59631. var u2 = r2[0].sequence;
  59632. Ve.l("".concat(n3, " pkgLastMessageSequence:").concat(u2, " complete:").concat(i2)), u2 < a2 && 2 !== i2 && t3._recoverGroupMessage({ groupID: o2, localLastMessageSequence: u2, remoteLastMessageSequence: a2 }), new Aa("recoverMessage").setNetworkType(t3.getNetworkType()).setMessage("groupID:".concat(o2, " complete:").concat(i2, " messageList length:").concat(r2.length)).end();
  59633. var c2 = t3.getModule(Pn);
  59634. r2.length > 1 && r2.sort(function(e5, t4) {
  59635. return e5.sequence - t4.sequence;
  59636. });
  59637. for (var l2 = 0; l2 < r2.length; l2++) {
  59638. var d2 = r2[l2];
  59639. d2.from !== E.CONV_SYSTEM ? c2.onNewGroupMessage({ dataList: [d2], isInstantMessage: false, updateUnreadCount: false }) : c2.onNewGroupTips({ event: d2.event, dataList: [d2] });
  59640. }
  59641. t3._getGroupNotify(o2);
  59642. }
  59643. });
  59644. } }, { key: "_getGroupNotify", value: function(e3) {
  59645. this.getModule(Pn).getGroupNotify(e3);
  59646. } }, { key: "_getGroupRomaingMessage", value: function(e3) {
  59647. var t3 = e3.groupID, n3 = e3.sequence;
  59648. return this.request({ protocolName: cs, requestData: { groupID: t3, count: this.PULL_LIMIT_COUNT, sequence: n3 + this.PULL_LIMIT_COUNT - 1 } });
  59649. } }, { key: "_recoverC2CMessage", value: function(e3) {
  59650. var t3 = this, n3 = "".concat(this._n, "._recoverC2CMessage");
  59651. Ve.l("".concat(this._n, "._recoverC2CMessage options:"), e3);
  59652. var o2 = e3.conversationID, s2 = e3.localLastMessageTime, a2 = e3.remoteLastMessageTime;
  59653. return this._getC2CRoamingMessage({ conversationID: o2, time: s2 }).then(function(e4) {
  59654. var s3 = e4.data, i2 = s3.complete, r2 = s3.messageList;
  59655. if (!it(r2)) {
  59656. var u2 = r2.length;
  59657. new Aa("recoverMessage").setNetworkType(t3.getNetworkType()).setMessage("".concat(o2, " complete:").concat(i2, " messageList length:").concat(u2)).end(), t3.getModule(Un).onNewC2CMessage({ dataList: r2, isInstantMessage: true });
  59658. var c2 = r2[u2 - 1].time;
  59659. if (Ve.l("".concat(n3, " pkgLastMessageTime:").concat(c2, " complete:").concat(i2)), c2 < a2 && 1 !== i2)
  59660. return t3._recoverC2CMessage({ conversationID: o2, localLastMessageTime: c2, remoteLastMessageTime: a2 });
  59661. }
  59662. });
  59663. } }, { key: "_getC2CRoamingMessage", value: function(e3) {
  59664. var t3 = e3.conversationID, n3 = e3.time;
  59665. return this.request({ protocolName: So, requestData: { peerAccount: t3.replace(E.CONV_C2C, ""), count: this.PULL_LIMIT_COUNT + 1, lastMessageTime: n3, direction: 1 } });
  59666. } }, { key: "reset", value: function() {
  59667. Ve.l("".concat(this._n, ".reset"));
  59668. } }]), n2;
  59669. }(uo), Qr = function() {
  59670. function e2() {
  59671. o(this, e2), this._n = "AvgE2EDelay", this._e2eDelayArray = [];
  59672. }
  59673. return a(e2, [{ key: "addMessageDelay", value: function(e3) {
  59674. var t2 = we() - e3;
  59675. t2 >= 0 && this._e2eDelayArray.push(t2);
  59676. } }, { key: "_calcAvg", value: function(e3, t2) {
  59677. if (0 === t2)
  59678. return 0;
  59679. var n2 = 0;
  59680. return e3.forEach(function(e4) {
  59681. n2 += e4;
  59682. }), wt(n2 / t2, 1);
  59683. } }, { key: "_calcCountWithLimit", value: function(e3) {
  59684. var t2 = e3.e2eDelayArray, n2 = e3.min, o2 = e3.max;
  59685. return t2.filter(function(e4) {
  59686. return n2 <= e4 && e4 < o2;
  59687. }).length;
  59688. } }, { key: "_calcPercent", value: function(e3, t2) {
  59689. var n2 = wt(e3 / t2 * 100, 2);
  59690. return n2 > 100 && (n2 = 100), n2;
  59691. } }, { key: "_checkE2EDelayException", value: function(e3, t2) {
  59692. var n2 = e3.filter(function(e4) {
  59693. return e4 > t2;
  59694. });
  59695. if (n2.length > 0) {
  59696. var o2 = n2.length, s2 = Math.min.apply(Math, m(n2)), a2 = Math.max.apply(Math, m(n2)), i2 = this._calcAvg(n2, o2), r2 = wt(o2 / e3.length * 100, 2);
  59697. if (r2 > 50)
  59698. new Aa("messageE2EDelayException").setMessage("count:".concat(o2, " min:").concat(s2, " max:").concat(a2, " avg:").concat(i2, " percent:").concat(r2)).setLevel("warning").end();
  59699. }
  59700. } }, { key: "getStatResult", value: function() {
  59701. var e3 = this._e2eDelayArray.length;
  59702. if (0 === e3)
  59703. return null;
  59704. var t2 = m(this._e2eDelayArray), n2 = this._calcCountWithLimit({ e2eDelayArray: t2, min: 0, max: 1 }), o2 = this._calcCountWithLimit({ e2eDelayArray: t2, min: 1, max: 3 }), s2 = this._calcPercent(n2, e3), a2 = this._calcPercent(o2, e3), i2 = this._calcAvg(t2, e3);
  59705. return this._checkE2EDelayException(t2, 3), t2.length = 0, this.reset(), { totalCount: e3, countLessThan1Second: n2, percentOfCountLessThan1Second: s2, countLessThan3Second: o2, percentOfCountLessThan3Second: a2, avgDelay: i2 };
  59706. } }, { key: "reset", value: function() {
  59707. this._e2eDelayArray.length = 0;
  59708. } }]), e2;
  59709. }(), $r = function() {
  59710. function e2() {
  59711. o(this, e2), this._n = "AvgRTT", this._requestCount = 0, this._rttArray = [];
  59712. }
  59713. return a(e2, [{ key: "addRequestCount", value: function() {
  59714. this._requestCount += 1;
  59715. } }, { key: "addRTT", value: function(e3) {
  59716. this._rttArray.push(e3);
  59717. } }, { key: "_calcTotalCount", value: function() {
  59718. return this._requestCount;
  59719. } }, { key: "_calcRTTCount", value: function(e3) {
  59720. return e3.length;
  59721. } }, { key: "_calcSuccessRateOfRequest", value: function(e3, t2) {
  59722. if (0 === t2)
  59723. return 0;
  59724. var n2 = wt(e3 / t2 * 100, 2);
  59725. return n2 > 100 && (n2 = 100), n2;
  59726. } }, { key: "_calcAvg", value: function(e3, t2) {
  59727. if (0 === t2)
  59728. return 0;
  59729. var n2 = 0;
  59730. return e3.forEach(function(e4) {
  59731. n2 += e4;
  59732. }), parseInt(n2 / t2);
  59733. } }, { key: "_calcMax", value: function() {
  59734. return Math.max.apply(Math, m(this._rttArray));
  59735. } }, { key: "_calcMin", value: function() {
  59736. return Math.min.apply(Math, m(this._rttArray));
  59737. } }, { key: "getStatResult", value: function() {
  59738. var e3 = this._calcTotalCount(), t2 = m(this._rttArray);
  59739. if (0 === e3)
  59740. return null;
  59741. var n2 = this._calcRTTCount(t2), o2 = this._calcSuccessRateOfRequest(n2, e3), s2 = this._calcAvg(t2, n2);
  59742. return Ve.l("".concat(this._n, ".getStatResult max:").concat(this._calcMax(), " min:").concat(this._calcMin(), " avg:").concat(s2)), this.reset(), { totalCount: e3, rttCount: n2, successRateOfRequest: o2, avgRTT: s2 };
  59743. } }, { key: "reset", value: function() {
  59744. this._requestCount = 0, this._rttArray.length = 0;
  59745. } }]), e2;
  59746. }(), eu = function() {
  59747. function e2() {
  59748. o(this, e2), this._map = /* @__PURE__ */ new Map();
  59749. }
  59750. return a(e2, [{ key: "initMap", value: function(e3) {
  59751. var t2 = this;
  59752. e3.forEach(function(e4) {
  59753. t2._map.set(e4, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] });
  59754. });
  59755. } }, { key: "addTotalCount", value: function(e3) {
  59756. return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).totalCount += 1, true);
  59757. } }, { key: "addSuccessCount", value: function(e3) {
  59758. return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).successCount += 1, true);
  59759. } }, { key: "addFailedCountOfUserSide", value: function(e3) {
  59760. return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).failedCountOfUserSide += 1, true);
  59761. } }, { key: "addCost", value: function(e3, t2) {
  59762. return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).costArray.push(t2), true);
  59763. } }, { key: "addFileSize", value: function(e3, t2) {
  59764. return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).fileSizeArray.push(t2), true);
  59765. } }, { key: "_calcSuccessRateOfBusiness", value: function(e3) {
  59766. if (it(e3) || !this._map.has(e3))
  59767. return -1;
  59768. var t2 = this._map.get(e3), n2 = wt(t2.successCount / t2.totalCount * 100, 2);
  59769. return n2 > 100 && (n2 = 100), n2;
  59770. } }, { key: "_calcSuccessRateOfPlatform", value: function(e3) {
  59771. if (it(e3) || !this._map.has(e3))
  59772. return -1;
  59773. var t2 = this._map.get(e3), n2 = this._calcSuccessCountOfPlatform(e3) / t2.totalCount * 100;
  59774. return (n2 = wt(n2, 2)) > 100 && (n2 = 100), n2;
  59775. } }, { key: "_calcTotalCount", value: function(e3) {
  59776. return it(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).totalCount;
  59777. } }, { key: "_calcSuccessCountOfBusiness", value: function(e3) {
  59778. return it(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).successCount;
  59779. } }, { key: "_calcSuccessCountOfPlatform", value: function(e3) {
  59780. if (it(e3) || !this._map.has(e3))
  59781. return -1;
  59782. var t2 = this._map.get(e3);
  59783. return t2.successCount + t2.failedCountOfUserSide;
  59784. } }, { key: "_calcAvg", value: function(e3) {
  59785. return it(e3) || !this._map.has(e3) ? -1 : e3 === Ia ? this._calcAvgSpeed(e3) : this._calcAvgCost(e3);
  59786. } }, { key: "_calcAvgCost", value: function(e3) {
  59787. var t2 = this._map.get(e3).costArray.length;
  59788. if (0 === t2)
  59789. return 0;
  59790. var n2 = 0;
  59791. return this._map.get(e3).costArray.forEach(function(e4) {
  59792. n2 += e4;
  59793. }), parseInt(n2 / t2);
  59794. } }, { key: "_calcAvgSpeed", value: function(e3) {
  59795. var t2 = 0, n2 = 0;
  59796. return this._map.get(e3).costArray.forEach(function(e4) {
  59797. t2 += e4;
  59798. }), this._map.get(e3).fileSizeArray.forEach(function(e4) {
  59799. n2 += e4;
  59800. }), parseInt(1e3 * n2 / t2);
  59801. } }, { key: "getStatResult", value: function(e3) {
  59802. var t2 = this._calcTotalCount(e3);
  59803. if (0 === t2)
  59804. return null;
  59805. var n2 = this._calcSuccessCountOfBusiness(e3), o2 = this._calcSuccessRateOfBusiness(e3), s2 = this._calcSuccessCountOfPlatform(e3), a2 = this._calcSuccessRateOfPlatform(e3), i2 = this._calcAvg(e3);
  59806. return this.reset(e3), { totalCount: t2, successCountOfBusiness: n2, successRateOfBusiness: o2, successCountOfPlatform: s2, successRateOfPlatform: a2, avgValue: i2 };
  59807. } }, { key: "reset", value: function(e3) {
  59808. it(e3) ? this._map.clear() : this._map.set(e3, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] });
  59809. } }]), e2;
  59810. }(), tu = function() {
  59811. function e2() {
  59812. o(this, e2), this._lastMap = /* @__PURE__ */ new Map(), this._currentMap = /* @__PURE__ */ new Map();
  59813. }
  59814. return a(e2, [{ key: "initMap", value: function(e3) {
  59815. var t2 = this;
  59816. e3.forEach(function(e4) {
  59817. t2._lastMap.set(e4, /* @__PURE__ */ new Map()), t2._currentMap.set(e4, /* @__PURE__ */ new Map());
  59818. });
  59819. } }, { key: "addMessageSequence", value: function(e3) {
  59820. var t2 = e3.key, n2 = e3.message;
  59821. if (it(t2) || !this._lastMap.has(t2) || !this._currentMap.has(t2))
  59822. return false;
  59823. var o2 = n2.conversationID, s2 = n2.sequence, a2 = o2.replace(E.CONV_GROUP, "");
  59824. if (0 === this._lastMap.get(t2).size)
  59825. this._addCurrentMap(e3);
  59826. else if (this._lastMap.get(t2).has(a2)) {
  59827. var i2 = this._lastMap.get(t2).get(a2), r2 = i2.length - 1;
  59828. s2 > i2[0] && s2 < i2[r2] ? (i2.push(s2), i2.sort(), this._lastMap.get(t2).set(a2, i2)) : this._addCurrentMap(e3);
  59829. } else
  59830. this._addCurrentMap(e3);
  59831. return true;
  59832. } }, { key: "_addCurrentMap", value: function(e3) {
  59833. var t2 = e3.key, n2 = e3.message, o2 = n2.conversationID, s2 = n2.sequence, a2 = o2.replace(E.CONV_GROUP, "");
  59834. this._currentMap.get(t2).has(a2) || this._currentMap.get(t2).set(a2, []), this._currentMap.get(t2).get(a2).push(s2);
  59835. } }, { key: "_copyData", value: function(e3) {
  59836. if (!it(e3)) {
  59837. this._lastMap.set(e3, /* @__PURE__ */ new Map());
  59838. var t2, n2 = this._lastMap.get(e3), o2 = D(this._currentMap.get(e3));
  59839. try {
  59840. for (o2.s(); !(t2 = o2.n()).done; ) {
  59841. var s2 = v(t2.value, 2), a2 = s2[0], i2 = s2[1];
  59842. n2.set(a2, i2);
  59843. }
  59844. } catch (r2) {
  59845. o2.e(r2);
  59846. } finally {
  59847. o2.f();
  59848. }
  59849. n2 = null, this._currentMap.set(e3, /* @__PURE__ */ new Map());
  59850. }
  59851. } }, { key: "getStatResult", value: function(e3) {
  59852. if (it(this._currentMap.get(e3)) || it(this._lastMap.get(e3)))
  59853. return null;
  59854. if (0 === this._lastMap.get(e3).size)
  59855. return this._copyData(e3), null;
  59856. var t2 = 0, n2 = 0;
  59857. if (this._lastMap.get(e3).forEach(function(e4, o3) {
  59858. var s2 = m(e4.values()), a2 = s2.length, i2 = s2[a2 - 1] - s2[0] + 1;
  59859. t2 += i2, n2 += a2;
  59860. }), 0 === t2)
  59861. return null;
  59862. var o2 = wt(n2 / t2 * 100, 2);
  59863. return o2 > 100 && (o2 = 100), this._copyData(e3), { totalCount: t2, successCountOfMessageReceived: n2, successRateOfMessageReceived: o2 };
  59864. } }, { key: "reset", value: function() {
  59865. this._currentMap.clear(), this._lastMap.clear();
  59866. } }]), e2;
  59867. }(), nu = function(e2) {
  59868. r(s2, e2);
  59869. var n2 = f(s2);
  59870. function s2(e3) {
  59871. var t2;
  59872. o(this, s2), (t2 = n2.call(this, e3))._n = "QualityStatModule", t2.TAG = "im-ssolog-quality-stat", t2.reportIndex = 0, t2.wholePeriod = false, t2._qualityItems = [_a, fa, va, ma, Ma, ya, Ia, Ca, Ta, Da], t2._messageSentItems = [va, ma, Ma, ya, Ia], t2._messageReceivedItems = [Ca, Ta, Da], t2.REPORT_INTERVAL = 120, t2.REPORT_SDKAPPID_BLACKLIST = [], t2.REPORT_TINYID_WHITELIST = [], t2._statInfoArr = [], t2._avgRTT = new $r(), t2._avgE2EDelay = new Qr(), t2._rateMessageSent = new eu(), t2._rateMessageReceived = new tu();
  59873. var a2 = t2.getInnerEmitterInstance();
  59874. return a2.on(ei, t2._onLoginSuccess, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
  59875. }
  59876. return a(s2, [{ key: "_onLoginSuccess", value: function() {
  59877. var e3 = this;
  59878. this._rateMessageSent.initMap(this._messageSentItems), this._rateMessageReceived.initMap(this._messageReceivedItems);
  59879. var t2 = this.getModule(Vn), n3 = t2.getItem(this.TAG, false);
  59880. !zt(n3) && ut(n3.forEach) && (Ve.l("".concat(this._n, "._onLoginSuccess get quality stat logs from local storage, count:").concat(n3.length)), n3.forEach(function(t3) {
  59881. e3._statInfoArr.push(t3);
  59882. }), t2.removeItem(this.TAG, false));
  59883. } }, { key: "_onCloudConfigUpdated", value: function() {
  59884. var e3 = this.getCloudConfig("q_rpt_interval"), t2 = this.getCloudConfig("q_rpt_sdkappid_bl"), n3 = this.getCloudConfig("q_rpt_tinyid_wl");
  59885. it(e3) || (this.REPORT_INTERVAL = Number(e3)), it(t2) || (this.REPORT_SDKAPPID_BLACKLIST = t2.split(",").map(function(e4) {
  59886. return Number(e4);
  59887. })), it(n3) || (this.REPORT_TINYID_WHITELIST = n3.split(","));
  59888. } }, { key: "onCheckTimer", value: function(e3) {
  59889. this.isLoggedIn() && e3 % this.REPORT_INTERVAL == 0 && (this.wholePeriod = true, this._report());
  59890. } }, { key: "addRequestCount", value: function() {
  59891. this._avgRTT.addRequestCount();
  59892. } }, { key: "addRTT", value: function(e3) {
  59893. this._avgRTT.addRTT(e3);
  59894. } }, { key: "addMessageDelay", value: function(e3) {
  59895. this._avgE2EDelay.addMessageDelay(e3);
  59896. } }, { key: "addTotalCount", value: function(e3) {
  59897. this._rateMessageSent.addTotalCount(e3) || Ve.w("".concat(this._n, ".addTotalCount invalid key:"), e3);
  59898. } }, { key: "addSuccessCount", value: function(e3) {
  59899. this._rateMessageSent.addSuccessCount(e3) || Ve.w("".concat(this._n, ".addSuccessCount invalid key:"), e3);
  59900. } }, { key: "addFailedCountOfUserSide", value: function(e3) {
  59901. this._rateMessageSent.addFailedCountOfUserSide(e3) || Ve.w("".concat(this._n, ".addFailedCountOfUserSide invalid key:"), e3);
  59902. } }, { key: "addCost", value: function(e3, t2) {
  59903. this._rateMessageSent.addCost(e3, t2) || Ve.w("".concat(this._n, ".addCost invalid key or cost:"), e3, t2);
  59904. } }, { key: "addFileSize", value: function(e3, t2) {
  59905. this._rateMessageSent.addFileSize(e3, t2) || Ve.w("".concat(this._n, ".addFileSize invalid key or size:"), e3, t2);
  59906. } }, { key: "addMessageSequence", value: function(e3) {
  59907. this._rateMessageReceived.addMessageSequence(e3) || Ve.w("".concat(this._n, ".addMessageSequence invalid key:"), e3.key);
  59908. } }, { key: "_getQualityItem", value: function(e3) {
  59909. var n3 = {}, o2 = Sa[this.getNetworkType()];
  59910. it(o2) && (o2 = 8);
  59911. var s3 = { qualityType: ka[e3], timestamp: Pe(), networkType: o2, extension: "" };
  59912. switch (e3) {
  59913. case _a:
  59914. n3 = this._avgRTT.getStatResult();
  59915. break;
  59916. case fa:
  59917. n3 = this._avgE2EDelay.getStatResult();
  59918. break;
  59919. case va:
  59920. case ma:
  59921. case Ma:
  59922. case ya:
  59923. case Ia:
  59924. n3 = this._rateMessageSent.getStatResult(e3);
  59925. break;
  59926. case Ca:
  59927. case Ta:
  59928. case Da:
  59929. n3 = this._rateMessageReceived.getStatResult(e3);
  59930. }
  59931. return null === n3 ? null : t(t({}, s3), n3);
  59932. } }, { key: "_report", value: function(e3) {
  59933. var t2 = this, n3 = [], o2 = null;
  59934. it(e3) ? this._qualityItems.forEach(function(e4) {
  59935. null !== (o2 = t2._getQualityItem(e4)) && (o2.reportIndex = t2.reportIndex, o2.wholePeriod = t2.wholePeriod, n3.push(o2));
  59936. }) : null !== (o2 = this._getQualityItem(e3)) && (o2.reportIndex = this.reportIndex, o2.wholePeriod = this.wholePeriod, n3.push(o2)), Ve.d("".concat(this._n, "._report"), n3), this._statInfoArr.length > 0 && (n3 = n3.concat(this._statInfoArr), this._statInfoArr = []);
  59937. var s3 = this.getModule(xn), a2 = s3.getSDKAppID(), i2 = s3.getTinyID();
  59938. Ft(this.REPORT_SDKAPPID_BLACKLIST, a2) && !qt(this.REPORT_TINYID_WHITELIST, i2) && (n3 = []), n3.length > 0 && this._doReport(n3);
  59939. } }, { key: "_doReport", value: function(e3) {
  59940. var n3 = this, o2 = { header: or(this), quality: e3 };
  59941. this.request({ protocolName: Bs, requestData: t({}, o2) }).then(function() {
  59942. n3.reportIndex++, n3.wholePeriod = false;
  59943. }).catch(function(t2) {
  59944. Ve.w("".concat(n3._n, "._doReport, online:").concat(n3.getNetworkType(), " error:"), t2), n3._statInfoArr = n3._statInfoArr.concat(e3), n3._flushAtOnce();
  59945. });
  59946. } }, { key: "_flushAtOnce", value: function() {
  59947. var e3 = this.getModule(Vn), t2 = e3.getItem(this.TAG, false), n3 = this._statInfoArr, o2 = "".concat(this._n, "._flushAtOnce");
  59948. if (zt(t2))
  59949. Ve.l("".concat(o2, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false);
  59950. else {
  59951. var s3 = n3.concat(t2);
  59952. s3.length > 10 && (s3 = s3.slice(0, 10)), Ve.l("".concat(o2, " count:").concat(s3.length)), e3.setItem(this.TAG, s3, true, false);
  59953. }
  59954. this._statInfoArr = [];
  59955. } }, { key: "reset", value: function() {
  59956. Ve.l("".concat(this._n, ".reset")), this._report(), this.reportIndex = 0, this.wholePeriod = false, this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [], this._avgRTT.reset(), this._avgE2EDelay.reset(), this._rateMessageSent.reset(), this._rateMessageReceived.reset();
  59957. } }]), s2;
  59958. }(uo), ou = function(e2) {
  59959. r(n2, e2);
  59960. var t2 = f(n2);
  59961. function n2(e3) {
  59962. var s2;
  59963. return o(this, n2), (s2 = t2.call(this, e3))._n = "WorkerTimerModule", s2._isWorkerEnabled = true, s2._workerTimer = null, s2._timerID = -1, s2._init(), s2.getInnerEmitterInstance().on(ti, s2._onCloudConfigUpdated, h(s2)), s2;
  59964. }
  59965. return a(n2, [{ key: "isWorkerEnabled", value: function() {
  59966. return this._isWorkerEnabled && Se;
  59967. } }, { key: "startWorkerTimer", value: function() {
  59968. Ve.l("".concat(this._n, ".startWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("start");
  59969. } }, { key: "stopWorkerTimer", value: function() {
  59970. Ve.l("".concat(this._n, ".stopWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("stop");
  59971. } }, { key: "_init", value: function() {
  59972. if (Se) {
  59973. var e3 = URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'], { type: "application/javascript; charset=utf-8" }));
  59974. this._workerTimer = new Worker(e3);
  59975. var t3 = this;
  59976. this._workerTimer.onmessage = function(e4) {
  59977. e4.data ? (t3._timerID = e4.data, Ve.l("".concat(t3._n, "._init seed:").concat(t3._timerID))) : t3._m.onCheckTimer();
  59978. };
  59979. }
  59980. } }, { key: "_onCloudConfigUpdated", value: function() {
  59981. var e3 = this.getCloudConfig("enable_worker");
  59982. Ve.l("".concat(this._n, "._onCloudConfigUpdated enableWorker:").concat(e3)), it(e3) || "1" === e3 ? !this._isWorkerEnabled && Se && (this._isWorkerEnabled = true, this.startWorkerTimer(), this._m.onWorkerTimerEnabled()) : this._isWorkerEnabled && Se && (this._isWorkerEnabled = false, this.stopWorkerTimer(), this._m.onWorkerTimerDisabled());
  59983. } }, { key: "terminate", value: function() {
  59984. Ve.l("".concat(this._n, ".terminate")), this._workerTimer && (this._workerTimer.terminate(), this._workerTimer = null, this._timerID = -1);
  59985. } }, { key: "getTimerID", value: function() {
  59986. return this._timerID;
  59987. } }, { key: "reset", value: function() {
  59988. Ve.l("".concat(this._n, ".reset"));
  59989. } }]), n2;
  59990. }(uo), su = function() {
  59991. function e2() {
  59992. o(this, e2), this._n = "PurchasedFeatureHandler", this._purchasedFeatureMap = /* @__PURE__ */ new Map();
  59993. }
  59994. return a(e2, [{ key: "isValidPurchaseBits", value: function(e3) {
  59995. return e3 && "string" == typeof e3 && e3.length >= 1 && e3.length <= 64 && /[01]{1,64}/.test(e3);
  59996. } }, { key: "parsePurchaseBits", value: function(e3) {
  59997. if (this.isValidPurchaseBits(e3)) {
  59998. this._purchasedFeatureMap.clear();
  59999. for (var t2 = null, n2 = e3.length - 1, o2 = 0; n2 >= 0; n2--, o2++)
  60000. t2 = o2 < 32 ? new L(0, Math.pow(2, o2)).toString() : new L(Math.pow(2, o2 - 32), 0).toString(), "1" === e3[n2] ? this._purchasedFeatureMap.set(t2, true) : this._purchasedFeatureMap.set(t2, false);
  60001. } else
  60002. Ve.w("".concat(this._n, ".parsePurchaseBits invalid purchasebits:").concat(e3));
  60003. } }, { key: "hasPurchasedFeature", value: function(e3) {
  60004. return !!this._purchasedFeatureMap.get(e3);
  60005. } }, { key: "isFeatureEnabled", value: function(e3) {
  60006. for (var t2 = parseInt(e3).toString(2), n2 = void 0, o2 = true, s2 = t2.length - 1, a2 = 0; s2 >= 0; s2--, a2++)
  60007. if ("1" === t2.charAt(s2) && (n2 = a2 < 32 ? new L(0, Math.pow(2, a2)).toString() : new L(Math.pow(2, a2 - 32), 0).toString(), !this._purchasedFeatureMap.get(n2))) {
  60008. o2 = false;
  60009. break;
  60010. }
  60011. return Ve.l("".concat(this._n, ".isFeatureEnabled decimalNumber:").concat(e3, " binaryString:").concat(t2, " ret:").concat(o2)), Xa({ enabled: o2 });
  60012. } }, { key: "clear", value: function() {
  60013. this._purchasedFeatureMap.clear();
  60014. } }]), e2;
  60015. }(), au = function() {
  60016. function e2(t2) {
  60017. o(this, e2), this._m = t2, this._n = "CommercialConfigModule", this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler = new su();
  60018. }
  60019. return a(e2, [{ key: "_canFetch", value: function() {
  60020. return this._getModule(xn).isLoggedIn() ? !this._isFetching && Date.now() >= this._expiredTime : (this._expiredTime = Date.now() + 2e3, false);
  60021. } }, { key: "onCheckTimer", value: function(e3) {
  60022. this._canFetch() && this.fetchConfig();
  60023. } }, { key: "fetchConfig", value: function() {
  60024. var e3 = this, t2 = this._canFetch(), n2 = "".concat(this._n, ".fetchConfig");
  60025. if (Ve.l("".concat(n2, " canFetch:").concat(t2)), t2) {
  60026. var o2 = this._getModule(Hn), s2 = new Aa("fetchCommercialConfig");
  60027. s2.setNetworkType(o2.getNetworkType());
  60028. var a2 = this._getModule(xn).getSDKAppID(), i2 = this._getModule(zn);
  60029. this._isFetching = true, i2.request({ protocolName: Qs, requestData: { SDKAppID: a2 } }).then(function(t3) {
  60030. s2.setMessage("purchaseBits:".concat(t3.data.purchaseBits)).end(), Ve.l("".concat(n2, " ok.")), e3._parseConfig(t3.data), e3._isFetching = false;
  60031. }).catch(function(t3) {
  60032. o2.probe().then(function(e4) {
  60033. var n3 = v(e4, 2), o3 = n3[0], a3 = n3[1];
  60034. s2.setError(t3, o3, a3).end();
  60035. }), e3._isFetching = false;
  60036. });
  60037. }
  60038. } }, { key: "onPushedConfig", value: function(e3) {
  60039. var t2 = "".concat(this._n, ".onPushedConfig data:").concat(JSON.stringify(e3));
  60040. Ve.l("".concat(t2)), new Aa("pushedCommercialConfig").setNetworkType(this._getModule(Hn).getNetworkType()).setMessage("purchaseBits:".concat(e3.purchaseBits)).end(), this._parseConfig(e3);
  60041. } }, { key: "_parseConfig", value: function(e3) {
  60042. var t2 = "".concat(this._n, "._parseConfig"), n2 = e3.errorCode, o2 = e3.errorMessage, s2 = e3.purchaseBits, a2 = e3.expiredTime;
  60043. 0 === n2 ? (this._purchasedFeatureHandler.parsePurchaseBits(s2), this._expiredTime = Date.now() + 1e3 * a2) : it(n2) ? (Ve.l("".concat(t2, " failed. Invalid message format:"), e3), this._setExpiredTimeOnResponseError(36e5)) : (Ve.e("".concat(t2, " errorCode:").concat(n2, " errorMessage:").concat(o2)), this._setExpiredTimeOnResponseError(12e4));
  60044. } }, { key: "_setExpiredTimeOnResponseError", value: function(e3) {
  60045. this._expiredTime = Date.now() + e3;
  60046. } }, { key: "canIUse", value: function(e3) {
  60047. return this._purchasedFeatureHandler.hasPurchasedFeature(e3);
  60048. } }, { key: "isFeatureEnabled", value: function(e3) {
  60049. return this._purchasedFeatureHandler.isFeatureEnabled(e3);
  60050. } }, { key: "_getModule", value: function(e3) {
  60051. return this._m.getModule(e3);
  60052. } }, { key: "reset", value: function() {
  60053. Ve.l("".concat(this._n, ".reset")), this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler.clear();
  60054. } }]), e2;
  60055. }(), iu = function(e2) {
  60056. r(n2, e2);
  60057. var t2 = f(n2);
  60058. function n2(e3) {
  60059. var s2;
  60060. return o(this, n2), (s2 = t2.call(this, e3))._m = e3, s2._n = "OfflinePushModule", s2._offlinePushPlugin = void 0, s2._androidPushConfig = { huaweiPushBussinessId: "", xiaomiPushBussinessId: "", xiaomiPushAppId: "", xiaomiPushAppKey: "", meizuPushBussinessId: "", meizuPushAppId: "", meizuPushAppKey: "", vivoPushBussinessId: "", fcmPushBussinessId: "", oppoPushBussinessId: "", oppoPushAppKey: "", oppoPushAppSecret: "", honorPushBussinessId: "" }, s2._deviceToken = "", s2._businessID = 0, s2._iosBusinessID = 0, s2._c2cUnreadCount = 0, s2._groupUnreadCount = 0, s2._isWebUniapp = 0, s2;
  60061. }
  60062. return a(n2, [{ key: "registerPlugin", value: function(e3) {
  60063. if (oe) {
  60064. this._offlinePushPlugin = e3["tim-offline-push-plugin"];
  60065. var t3 = e3.offlinePushConfig || {}, n3 = t3.huaweiBusinessID, o2 = t3.xiaomiBusinessID, s2 = t3.xiaomiAppID, a2 = t3.xiaomiAppKey, i2 = t3.meizuBusinessID, r2 = t3.meizuAppID, u2 = t3.meizuAppKey, c2 = t3.vivoBusinessID, l2 = t3.oppoBusinessID, d2 = t3.oppoAppKey, p2 = t3.oppoAppSecret, g2 = t3.honorBusinessID, h2 = t3.iosBusinessID;
  60066. this._androidPushConfig.huaweiPushBussinessId = n3, this._androidPushConfig.xiaomiPushBussinessId = o2, this._androidPushConfig.xiaomiPushAppId = s2, this._androidPushConfig.xiaomiPushAppKey = a2, this._androidPushConfig.meizuPushBussinessId = i2, this._androidPushConfig.meizuPushAppId = r2, this._androidPushConfig.meizuPushAppKey = u2, this._androidPushConfig.vivoPushBussinessId = c2, this._androidPushConfig.oppoPushBussinessId = l2, this._androidPushConfig.oppoPushAppKey = d2, this._androidPushConfig.oppoPushAppSecret = p2, this._androidPushConfig.honorPushBussinessId = g2, new Aa("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!it(this._offlinePushPlugin))).end(true), Ve.l("".concat(this._n, ".").concat("registerPlugin", " ok. offlinePushConfig:").concat(JSON.stringify(e3.offlinePushConfig))), this._iosBusinessID = h2, this._setAppShowListener();
  60067. } else
  60068. this.outputWarning("OfflinePushInUniapp");
  60069. } }, { key: "init", value: function() {
  60070. this._isWebUniapp = this.getUniAppPlatform(), this._getDeviceToken();
  60071. } }, { key: "_getDeviceToken", value: function() {
  60072. var e3 = this, t3 = "".concat(this._n, ".").concat("_getDeviceToken");
  60073. if (ut(this._offlinePushPlugin.getDeviceToken)) {
  60074. var n3 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), ", iosBusinessID:").concat(this._iosBusinessID);
  60075. Ve.l("".concat(t3, " start. ").concat(n3)), new Aa("_getDeviceToken").setMessage("".concat(n3)).end(true), this._offlinePushPlugin.getDeviceToken(this._androidPushConfig, function(o2) {
  60076. var s2 = new Aa("getDeviceTokenRes"), a2 = o2.code, i2 = o2.msg;
  60077. if (0 === a2) {
  60078. var r2 = o2.data, u2 = r2.deviceToken, c2 = r2.deviceBrand, l2 = r2.deviceType, d2 = r2.bussinessId;
  60079. e3._deviceToken = u2, e3._businessID = d2 || e3._iosBusinessID, n3 = "deviceToken:".concat(u2, ", deviceBrand:").concat(c2 || l2, ", businessID:").concat(e3._businessID), Ve.l("".concat(t3, " ok. ").concat(n3)), s2.setMessage(n3).end(true), e3._setToken();
  60080. } else
  60081. s2.setMessage("code:".concat(a2, ", msg:").concat(i2)).end(true), Ve.e("".concat(t3, " failed. error:"), o2);
  60082. });
  60083. } else
  60084. Ve.e("".concat(t3, " getDeviceToken is not a function"));
  60085. } }, { key: "canIUseOfflinePush", value: function() {
  60086. return oe && !it(this._offlinePushPlugin);
  60087. } }, { key: "_setAppShowListener", value: function() {
  60088. var e3 = this, t3 = "".concat(this._n, ".").concat("_setAppShowListener");
  60089. it(this._offlinePushPlugin) ? Ve.e("".concat(t3, " offlinePushPlugin is undefined")) : ut(this._offlinePushPlugin.setAppShowListener) ? (new Aa("_setAppShowListener").end(true), Ve.l("".concat(t3, " start")), this._offlinePushPlugin.setAppShowListener(function(n3) {
  60090. var o2 = (n3 || {}).appShow;
  60091. new Aa("setAppShowListenerRes").setMessage("appShow:".concat(o2)).end(true), Ve.l("".concat(t3, " ok. appShow:").concat(o2)), e3._m.isReady() && (0 === o2 ? (e3._getConvUnreadCount(), e3._onBackground()) : 1 === o2 && e3._onForeground());
  60092. })) : Ve.e("".concat(t3, " setAppShowListener is not a function"));
  60093. } }, { key: "getDeviceBrand", value: function() {
  60094. if (!it(this._offlinePushPlugin) && ut(this._offlinePushPlugin.getDeviceType)) {
  60095. var e3 = (this._offlinePushPlugin.getDeviceType() || {}).deviceType;
  60096. return Ve.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e3)), e3;
  60097. }
  60098. } }, { key: "_setToken", value: function() {
  60099. var e3, t3 = this, n3 = "".concat(this._n, "._setToken"), o2 = this.getModule(xn), s2 = 1, a2 = "", i2 = "";
  60100. zt(this._deviceToken) && (s2 = 0);
  60101. var r2 = this.getUniAppPlatform(), u2 = this.getDeviceBrand();
  60102. r2 === R.IOS || r2 === R.IPAD || r2 === R.MAC ? i2 = this._deviceToken : r2 === R.ANDROID && (a2 = this._deviceToken);
  60103. var c2 = new Aa("offlinePushSetToken");
  60104. return e3 = "deviceToken:".concat(i2 || a2, ", businessID:").concat(this._businessID, ", ") + "deviceBrand:".concat(u2, ", isWebUniapp:").concat(this._isWebUniapp, ", pushMsg:").concat(s2, ", platform:").concat(r2), c2.setMessage("".concat(e3)), Ve.l("".concat(n3, " ").concat(e3)), this.request({ protocolName: da, requestData: { tokenID: a2, pushMsg: s2, sdkAppID: o2.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: u2, deviceToken: i2, isWebUniapp: this._isWebUniapp } }).then(function(e4) {
  60105. return c2.end(), Ve.l("".concat(n3, " ok")), e4;
  60106. }).catch(function(e4) {
  60107. return t3.probeNetwork().then(function(t4) {
  60108. var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
  60109. c2.setError(e4, o3, s3).end();
  60110. }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
  60111. });
  60112. } }, { key: "_getConvUnreadCount", value: function() {
  60113. var e3 = this;
  60114. this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this.getModule(qn).getLocalConversationList().forEach(function(t3) {
  60115. t3.type === E.CONV_C2C && (e3._c2cUnreadCount += t3.unreadCount), t3.type === E.CONV_GROUP && (e3._groupUnreadCount += t3.unreadCount);
  60116. });
  60117. } }, { key: "_onBackground", value: function() {
  60118. var e3 = this, t3 = "".concat(this._n, ".").concat("_onBackground"), n3 = new Aa("_onBackground");
  60119. this.request({ protocolName: ca, requestData: { c2cUnreadCount: this._c2cUnreadCount, groupUnreadCount: this._groupUnreadCount, isWebUniapp: this._isWebUniapp } }).then(function(o2) {
  60120. return n3.setMessage("c2cUnreadCount: ".concat(e3._c2cUnreadCount, ", groupUnreadCount: ").concat(e3._groupUnreadCount)).end(), Ve.l("".concat(t3, " ok")), o2;
  60121. }).catch(function(o2) {
  60122. e3.probeNetwork().then(function(e4) {
  60123. var t4 = v(e4, 2), s2 = t4[0], a2 = t4[1];
  60124. n3.setError(o2, s2, a2).end();
  60125. }), Ve.e("".concat(t3, " failed. error:"), o2);
  60126. });
  60127. } }, { key: "_onForeground", value: function() {
  60128. var e3 = this, t3 = "".concat(this._n, ".").concat("_onForeground"), n3 = new Aa("_onForeground");
  60129. this.request({ protocolName: la, requestData: { isWebUniapp: this._isWebUniapp } }).then(function(e4) {
  60130. return n3.end(), Ve.l("".concat(t3, " ok")), e4;
  60131. }).catch(function(o2) {
  60132. e3.probeNetwork().then(function(e4) {
  60133. var t4 = v(e4, 2), s2 = t4[0], a2 = t4[1];
  60134. n3.setError(o2, s2, a2).end();
  60135. }), Ve.e("".concat(t3, " failed. error:"), o2);
  60136. });
  60137. } }, { key: "getUniAppPlatform", value: function() {
  60138. var e3 = uni.getSystemInfoSync().platform, t3 = this.getDeviceBrand();
  60139. return "ios" === e3 ? R.IOS : "android" === e3 ? R.ANDROID : 1002 === t3 ? R.IPAD : 1001 === t3 ? R.MAC : void 0;
  60140. } }, { key: "reset", value: function() {
  60141. this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, Ve.l("".concat(this._n, ".reset"));
  60142. } }]), n2;
  60143. }(uo), ru = function(e2) {
  60144. r(n2, e2);
  60145. var t2 = f(n2);
  60146. function n2(e3) {
  60147. var s2;
  60148. return o(this, n2), (s2 = t2.call(this, e3))._n = "ProfanityFilterModule", s2._plugin = null, s2._filterConfigMap = /* @__PURE__ */ new Map(), s2._startIndex = 0, s2._version = 0, s2._canIUseLexicon = false, s2._isFetching = false, s2._expiredTime = 0, s2;
  60149. }
  60150. return a(n2, [{ key: "init", value: function() {
  60151. var e3 = this.getModule(Yn).getPlugin("tim-profanity-filter-plugin");
  60152. e3 ? (this._plugin = new e3({ logger: Ve, isArray: at, isMap: Qe, isDevMode: this.isDevMode() }), this._getLexicon()) : this.outputWarning("ProfanityPluginNotFound");
  60153. } }, { key: "onCheckTimer", value: function() {
  60154. this._plugin && this._canIUseLexicon && this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime && this._getLexicon();
  60155. } }, { key: "filterMessage", value: function(e3, t3) {
  60156. var n3 = true;
  60157. if (!this._plugin || !this._canIUseLexicon)
  60158. return n3;
  60159. if (t3 && t3.messageControlInfo && true === t3.messageControlInfo.excludedFromContentModeration)
  60160. return n3;
  60161. var o2 = e3.type, s2 = e3.conversationType;
  60162. if (o2 !== E.MSG_TEXT && o2 !== E.MSG_CUSTOM)
  60163. return n3;
  60164. var a2, i2 = "".concat(this._n, ".filterMessage");
  60165. if (Ve.l("".concat(i2)), o2 === E.MSG_TEXT) {
  60166. if (s2 === E.CONV_C2C ? a2 = H : s2 === E.CONV_GROUP && (a2 = W), !this._isConfigOn(a2))
  60167. return n3;
  60168. var r2 = this._plugin.filter(e3.payload.text), u2 = r2.type, c2 = r2.modifiedText;
  60169. 1 === u2 ? n3 = false : 2 === u2 && (e3.payload.text = c2);
  60170. } else if (o2 === E.MSG_CUSTOM) {
  60171. if (s2 === E.CONV_C2C ? a2 = K : s2 === E.CONV_GROUP && (a2 = Y), !this._isConfigOn(a2))
  60172. return n3;
  60173. var l2 = this._plugin.filter(e3.payload.data), d2 = this._plugin.filter(e3.payload.description), p2 = this._plugin.filter(e3.payload.extension);
  60174. 1 === l2.type || 1 === d2.type || 1 === p2.type ? n3 = false : (2 === l2.type && (e3.payload.data = l2.modifiedText), 2 === d2.type && (e3.payload.description = d2.modifiedText), 2 === p2.type && (e3.payload.extension = p2.modifiedText));
  60175. }
  60176. return Ve.l("".concat(i2, " done. isAllowedToSend:").concat(n3)), n3;
  60177. } }, { key: "filterText", value: function(e3, t3) {
  60178. var n3 = "".concat(this._n, ".filterText"), o2 = { isAllowedToSend: true, modifiedText: e3 };
  60179. if (!this._plugin || !this._canIUseLexicon)
  60180. return o2;
  60181. if (!this._isConfigOn(t3))
  60182. return o2;
  60183. Ve.l("".concat(n3));
  60184. var s2 = this._plugin.filter(e3), a2 = s2.type, i2 = s2.modifiedText;
  60185. return 1 === a2 ? o2.isAllowedToSend = false : 2 === a2 && (o2.modifiedText = i2), Ve.l("".concat(n3, " done. ret:"), o2), o2;
  60186. } }, { key: "_getLexicon", value: function() {
  60187. var e3 = this, t3 = new Aa("profanityFilter"), n3 = "".concat(this._n, "._getLexicon");
  60188. this._isFetching = true, this.request({ protocolName: pa, requestData: { startIndex: this._startIndex, version: this._version } }).then(function(o2) {
  60189. var s2 = o2.data, a2 = s2.errorInfo, i2 = s2.filterConfig, r2 = s2.lexicon, u2 = s2.strToken, c2 = s2.completeFlag, l2 = s2.nextStartIndex, d2 = s2.version, p2 = s2.expiredTime, g2 = a2.errorCode, h2 = a2.errorMessage;
  60190. return 0 !== g2 ? (e3._isFetching = false, Ve.w("".concat(n3, " failed. error:"), a2), void t3.setCode(g2).setMessage(h2).end()) : (e3._onFilterConfig(i2), e3._getToken(u2), 1 === c2 ? (Ve.l("".concat(n3, " done. version:").concat(d2, " expiredTime:").concat(p2)), e3._version = d2, e3._canIUseLexicon = true, e3._isFetching = false, e3._expiredTime = Date.now() + 1e3 * p2, void e3._plugin.onLexiconCompleted(r2)) : (e3._startIndex = l2, e3._plugin.onLexiconSliced(r2), void e3._getLexicon()));
  60191. }).catch(function(o2) {
  60192. e3.probeNetwork().then(function(e4) {
  60193. var n4 = v(e4, 2), s2 = n4[0], a2 = n4[1];
  60194. t3.setError(o2, s2, a2).end();
  60195. }), e3._isFetching = false, Ve.l("".concat(n3, " failed. error:"), o2);
  60196. });
  60197. } }, { key: "_onFilterConfig", value: function(e3) {
  60198. var t3 = this;
  60199. zt(e3) || (this._filterConfigMap.clear(), Object.keys(e3).forEach(function(n3) {
  60200. t3._filterConfigMap.set(n3, e3[n3]);
  60201. }), Ve.l("".concat(this._n, "._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys()), " values:").concat(Array.from(this._filterConfigMap.values()))));
  60202. } }, { key: "_isConfigOn", value: function(e3) {
  60203. return 1 === this._filterConfigMap.get(e3);
  60204. } }, { key: "_getToken", value: function(e3) {
  60205. if (nt(e3)) {
  60206. var t3 = e3.length, n3 = "";
  60207. if (t3 % 2 == 0)
  60208. for (var o2 = 0; o2 <= t3 - 1; o2 += 2)
  60209. n3 += e3[o2 + 1], n3 += e3[o2];
  60210. else {
  60211. for (var s2 = 0; s2 < t3 - 1; s2 += 2)
  60212. n3 += e3[s2 + 1], n3 += e3[s2];
  60213. n3 += e3[t3 - 1];
  60214. }
  60215. this._plugin.onToken(n3);
  60216. }
  60217. } }, { key: "reset", value: function() {
  60218. Ve.l("".concat(this._n, ".reset")), this._plugin && (this._plugin.reset(), this._plugin = null), this._filterConfigMap.clear(), this._startIndex = 0, this._version = 0, this._canIUseLexicon = false, this._isFetching = false, this._expiredTime = 0;
  60219. } }]), n2;
  60220. }(uo), uu = function() {
  60221. function e2(t2) {
  60222. o(this, e2), this._m = t2, this._n = "TransCmdModule", this._TRTCCommandList = ["tui_room_svr.*"], this._m.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this);
  60223. }
  60224. return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
  60225. var e3 = this, t2 = this._m.getModule(Zn).getCloudConfig("rtc_cmd");
  60226. it(t2) || (t2 = JSON.parse(t2)).forEach(function(t3) {
  60227. e3._TRTCCommandList.includes(t3) || e3._TRTCCommandList.push(t3);
  60228. });
  60229. } }, { key: "sendTRTCCustomData", value: function(e3) {
  60230. var t2 = e3.serviceCommand, n2 = e3.data, o2 = "".concat(V.NAME.TUIROOM_SVR, ".*");
  60231. return it(t2) || (o2 = t2), this._TRTCCommandList.includes(o2) ? this._trans({ servcmd: o2, data: n2 }) : Za({ code: ha.INVALID_TRTC_CMD });
  60232. } }, { key: "_trans", value: function(e3) {
  60233. Ve.d("".concat(this._n, "._trans. options:").concat(JSON.stringify(e3)));
  60234. var t2 = e3.servcmd, n2 = e3.data;
  60235. return this._m.getModule(zn).trans({ servcmd: t2, data: nt(n2) ? JSON.parse(n2) : n2 });
  60236. } }, { key: "getCommandList", value: function() {
  60237. return this._TRTCCommandList;
  60238. } }, { key: "reset", value: function() {
  60239. Ve.l("".concat(this._n, ".reset"));
  60240. } }]), e2;
  60241. }(), cu = function() {
  60242. function e2(t2) {
  60243. o(this, e2), this._m = t2, this._n = "ErrorMessageModule", this.TIM_ERROR_ASSISTANCE = "tim_error_assistance", this.STORAGE_EXPIRES_TIME = 6048e5, this._map = /* @__PURE__ */ new Map(), this._init();
  60244. }
  60245. return a(e2, [{ key: "_init", value: function() {
  60246. var e3 = this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE, false);
  60247. if (e3) {
  60248. var t2;
  60249. try {
  60250. t2 = JSON.parse(e3);
  60251. } catch (n2) {
  60252. this._getStorageModule().removeItem(this.TIM_ERROR_ASSISTANCE, false), Ve.w("".concat(this._n, "._init error:"), n2);
  60253. }
  60254. t2 && (this._needToUpdate(t2) ? this._fetch() : this._fillMap(t2.message));
  60255. } else
  60256. this._fetch();
  60257. } }, { key: "_needToUpdate", value: function(e3) {
  60258. var t2 = e3.localSavedTime, n2 = e3.localSavedVersion, o2 = t2 && (/* @__PURE__ */ new Date()).getTime() - t2 >= this.STORAGE_EXPIRES_TIME, s2 = !n2 || "2.27.6" !== n2;
  60259. return Ve.l("".concat(this._n, "._needToUpdate isTimeout:").concat(o2, " isDifferentVersion:").concat(s2)), o2 || s2;
  60260. } }, { key: "_fetch", value: function() {
  60261. if (!this._m.getModule(xn).isPrivateNetWork()) {
  60262. var e3 = "https://web.sdk.qcloud.com/im/download/error-message/0.0.1/tim-error-message.txt", t2 = "application/x-www-form-urlencoded;charset=UTF-8", n2 = "".concat(this._n, "._fetch ok in"), o2 = this;
  60263. if (ae)
  60264. re.request({ url: e3, method: "GET", timeout: 3e3, header: { "content-type": t2 }, dataType: "text", success: function(e4) {
  60265. o2._fillAndSave(e4.data), Ve.l("".concat(n2, " mini program"));
  60266. }, fail: function() {
  60267. } });
  60268. else {
  60269. var s2 = new XMLHttpRequest(), a2 = setTimeout(function() {
  60270. s2.abort();
  60271. }, 3e3);
  60272. s2.onreadystatechange = function() {
  60273. 4 === s2.readyState && (clearTimeout(a2), 200 !== s2.status && 304 !== s2.status || (Ve.l("".concat(n2, " browser")), o2._fillAndSave(s2.responseText)));
  60274. }, s2.open("GET", e3, true), s2.setRequestHeader("Content-type", t2), s2.send();
  60275. }
  60276. }
  60277. } }, { key: "_fillAndSave", value: function(e3) {
  60278. this._fillMap(e3), this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE, JSON.stringify({ message: e3, localSavedTime: (/* @__PURE__ */ new Date()).getTime(), localSavedVersion: "2.27.6" }), true, false);
  60279. } }, { key: "_getStorageModule", value: function() {
  60280. return this._m.getModule(Vn);
  60281. } }, { key: "_fillMap", value: function(e3) {
  60282. this._map.clear();
  60283. for (var t2, n2, o2, s2 = e3.split(";\n"), a2 = s2.length, i2 = new RegExp(/'/g), r2 = 0; r2 < a2; r2++)
  60284. if (t2 = s2[r2].indexOf(":"), n2 = s2[r2].slice(0, t2), o2 = s2[r2].slice(t2 + 1, s2[r2].length), !n2.startsWith("//")) {
  60285. if (it(o2))
  60286. continue;
  60287. this._map.set(n2, o2.replace(i2, ""));
  60288. }
  60289. } }, { key: "get", value: function(e3) {
  60290. var t2 = e3.isIntl, n2 = e3.key, o2 = e3.replacement1, s2 = e3.replacement2, a2 = "".concat(n2, t2 ? "_en" : "_cn");
  60291. !this._map.has(a2) && this._map.has(n2) && (a2 = n2);
  60292. var i2 = "";
  60293. return this._map.has(a2) ? (i2 = this._map.get(a2), it(o2) || (i2 = i2.replace("$replacement1", o2)), it(s2) || (i2 = i2.replace("$replacement2", s2)), i2) : i2;
  60294. } }, { key: "reset", value: function() {
  60295. Ve.l("".concat(this._n, ".reset"));
  60296. } }]), e2;
  60297. }(), lu = cr(function(e2, t2) {
  60298. var o2 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
  60299. function s2(e3, t3) {
  60300. return Object.prototype.hasOwnProperty.call(e3, t3);
  60301. }
  60302. t2.assign = function(e3) {
  60303. for (var t3 = Array.prototype.slice.call(arguments, 1); t3.length; ) {
  60304. var o3 = t3.shift();
  60305. if (o3) {
  60306. if ("object" !== n(o3))
  60307. throw new TypeError(o3 + "must be non-object");
  60308. for (var a3 in o3)
  60309. s2(o3, a3) && (e3[a3] = o3[a3]);
  60310. }
  60311. }
  60312. return e3;
  60313. }, t2.shrinkBuf = function(e3, t3) {
  60314. return e3.length === t3 ? e3 : e3.subarray ? e3.subarray(0, t3) : (e3.length = t3, e3);
  60315. };
  60316. var a2 = { arraySet: function(e3, t3, n2, o3, s3) {
  60317. if (t3.subarray && e3.subarray)
  60318. e3.set(t3.subarray(n2, n2 + o3), s3);
  60319. else
  60320. for (var a3 = 0; a3 < o3; a3++)
  60321. e3[s3 + a3] = t3[n2 + a3];
  60322. }, flattenChunks: function(e3) {
  60323. var t3, n2, o3, s3, a3, i3;
  60324. for (o3 = 0, t3 = 0, n2 = e3.length; t3 < n2; t3++)
  60325. o3 += e3[t3].length;
  60326. for (i3 = new Uint8Array(o3), s3 = 0, t3 = 0, n2 = e3.length; t3 < n2; t3++)
  60327. a3 = e3[t3], i3.set(a3, s3), s3 += a3.length;
  60328. return i3;
  60329. } }, i2 = { arraySet: function(e3, t3, n2, o3, s3) {
  60330. for (var a3 = 0; a3 < o3; a3++)
  60331. e3[s3 + a3] = t3[n2 + a3];
  60332. }, flattenChunks: function(e3) {
  60333. return [].concat.apply([], e3);
  60334. } };
  60335. t2.setTyped = function(e3) {
  60336. e3 ? (t2.Buf8 = Uint8Array, t2.Buf16 = Uint16Array, t2.Buf32 = Int32Array, t2.assign(t2, a2)) : (t2.Buf8 = Array, t2.Buf16 = Array, t2.Buf32 = Array, t2.assign(t2, i2));
  60337. }, t2.setTyped(o2);
  60338. });
  60339. lu.assign, lu.shrinkBuf, lu.setTyped, lu.Buf8, lu.Buf16, lu.Buf32;
  60340. var du = function(e2, t2, n2, o2) {
  60341. for (var s2 = 65535 & e2 | 0, a2 = e2 >>> 16 & 65535 | 0, i2 = 0; 0 !== n2; ) {
  60342. n2 -= i2 = n2 > 2e3 ? 2e3 : n2;
  60343. do {
  60344. a2 = a2 + (s2 = s2 + t2[o2++] | 0) | 0;
  60345. } while (--i2);
  60346. s2 %= 65521, a2 %= 65521;
  60347. }
  60348. return s2 | a2 << 16 | 0;
  60349. };
  60350. var pu = function() {
  60351. for (var e2, t2 = [], n2 = 0; n2 < 256; n2++) {
  60352. e2 = n2;
  60353. for (var o2 = 0; o2 < 8; o2++)
  60354. e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
  60355. t2[n2] = e2;
  60356. }
  60357. return t2;
  60358. }();
  60359. var gu = function(e2, t2, n2, o2) {
  60360. var s2 = pu, a2 = o2 + n2;
  60361. e2 ^= -1;
  60362. for (var i2 = o2; i2 < a2; i2++)
  60363. e2 = e2 >>> 8 ^ s2[255 & (e2 ^ t2[i2])];
  60364. return -1 ^ e2;
  60365. }, hu = function(e2, t2) {
  60366. var n2, o2, s2, a2, i2, r2, u2, c2, l2, d2, p2, g2, h2, _2, f2, v2, m2, M2, y2, I2, C2, T2, D2, k2, E2;
  60367. n2 = e2.state, o2 = e2.next_in, k2 = e2.input, s2 = o2 + (e2.avail_in - 5), a2 = e2.next_out, E2 = e2.output, i2 = a2 - (t2 - e2.avail_out), r2 = a2 + (e2.avail_out - 257), u2 = n2.dmax, c2 = n2.wsize, l2 = n2.whave, d2 = n2.wnext, p2 = n2.window, g2 = n2.hold, h2 = n2.bits, _2 = n2.lencode, f2 = n2.distcode, v2 = (1 << n2.lenbits) - 1, m2 = (1 << n2.distbits) - 1;
  60368. e:
  60369. do {
  60370. h2 < 15 && (g2 += k2[o2++] << h2, h2 += 8, g2 += k2[o2++] << h2, h2 += 8), M2 = _2[g2 & v2];
  60371. t:
  60372. for (; ; ) {
  60373. if (g2 >>>= y2 = M2 >>> 24, h2 -= y2, 0 === (y2 = M2 >>> 16 & 255))
  60374. E2[a2++] = 65535 & M2;
  60375. else {
  60376. if (!(16 & y2)) {
  60377. if (0 == (64 & y2)) {
  60378. M2 = _2[(65535 & M2) + (g2 & (1 << y2) - 1)];
  60379. continue t;
  60380. }
  60381. if (32 & y2) {
  60382. n2.mode = 12;
  60383. break e;
  60384. }
  60385. e2.msg = "invalid literal/length code", n2.mode = 30;
  60386. break e;
  60387. }
  60388. I2 = 65535 & M2, (y2 &= 15) && (h2 < y2 && (g2 += k2[o2++] << h2, h2 += 8), I2 += g2 & (1 << y2) - 1, g2 >>>= y2, h2 -= y2), h2 < 15 && (g2 += k2[o2++] << h2, h2 += 8, g2 += k2[o2++] << h2, h2 += 8), M2 = f2[g2 & m2];
  60389. n:
  60390. for (; ; ) {
  60391. if (g2 >>>= y2 = M2 >>> 24, h2 -= y2, !(16 & (y2 = M2 >>> 16 & 255))) {
  60392. if (0 == (64 & y2)) {
  60393. M2 = f2[(65535 & M2) + (g2 & (1 << y2) - 1)];
  60394. continue n;
  60395. }
  60396. e2.msg = "invalid distance code", n2.mode = 30;
  60397. break e;
  60398. }
  60399. if (C2 = 65535 & M2, h2 < (y2 &= 15) && (g2 += k2[o2++] << h2, (h2 += 8) < y2 && (g2 += k2[o2++] << h2, h2 += 8)), (C2 += g2 & (1 << y2) - 1) > u2) {
  60400. e2.msg = "invalid distance too far back", n2.mode = 30;
  60401. break e;
  60402. }
  60403. if (g2 >>>= y2, h2 -= y2, C2 > (y2 = a2 - i2)) {
  60404. if ((y2 = C2 - y2) > l2 && n2.sane) {
  60405. e2.msg = "invalid distance too far back", n2.mode = 30;
  60406. break e;
  60407. }
  60408. if (T2 = 0, D2 = p2, 0 === d2) {
  60409. if (T2 += c2 - y2, y2 < I2) {
  60410. I2 -= y2;
  60411. do {
  60412. E2[a2++] = p2[T2++];
  60413. } while (--y2);
  60414. T2 = a2 - C2, D2 = E2;
  60415. }
  60416. } else if (d2 < y2) {
  60417. if (T2 += c2 + d2 - y2, (y2 -= d2) < I2) {
  60418. I2 -= y2;
  60419. do {
  60420. E2[a2++] = p2[T2++];
  60421. } while (--y2);
  60422. if (T2 = 0, d2 < I2) {
  60423. I2 -= y2 = d2;
  60424. do {
  60425. E2[a2++] = p2[T2++];
  60426. } while (--y2);
  60427. T2 = a2 - C2, D2 = E2;
  60428. }
  60429. }
  60430. } else if (T2 += d2 - y2, y2 < I2) {
  60431. I2 -= y2;
  60432. do {
  60433. E2[a2++] = p2[T2++];
  60434. } while (--y2);
  60435. T2 = a2 - C2, D2 = E2;
  60436. }
  60437. for (; I2 > 2; )
  60438. E2[a2++] = D2[T2++], E2[a2++] = D2[T2++], E2[a2++] = D2[T2++], I2 -= 3;
  60439. I2 && (E2[a2++] = D2[T2++], I2 > 1 && (E2[a2++] = D2[T2++]));
  60440. } else {
  60441. T2 = a2 - C2;
  60442. do {
  60443. E2[a2++] = E2[T2++], E2[a2++] = E2[T2++], E2[a2++] = E2[T2++], I2 -= 3;
  60444. } while (I2 > 2);
  60445. I2 && (E2[a2++] = E2[T2++], I2 > 1 && (E2[a2++] = E2[T2++]));
  60446. }
  60447. break;
  60448. }
  60449. }
  60450. break;
  60451. }
  60452. } while (o2 < s2 && a2 < r2);
  60453. o2 -= I2 = h2 >> 3, g2 &= (1 << (h2 -= I2 << 3)) - 1, e2.next_in = o2, e2.next_out = a2, e2.avail_in = o2 < s2 ? s2 - o2 + 5 : 5 - (o2 - s2), e2.avail_out = a2 < r2 ? r2 - a2 + 257 : 257 - (a2 - r2), n2.hold = g2, n2.bits = h2;
  60454. }, _u = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], fu = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], vu = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], mu = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64], Mu = function(e2, t2, n2, o2, s2, a2, i2, r2) {
  60455. var u2, c2, l2, d2, p2, g2, h2, _2, f2, v2 = r2.bits, m2 = 0, M2 = 0, y2 = 0, I2 = 0, C2 = 0, T2 = 0, D2 = 0, k2 = 0, E2 = 0, S2 = 0, L2 = null, A2 = 0, R2 = new lu.Buf16(16), N2 = new lu.Buf16(16), O2 = null, G2 = 0;
  60456. for (m2 = 0; m2 <= 15; m2++)
  60457. R2[m2] = 0;
  60458. for (M2 = 0; M2 < o2; M2++)
  60459. R2[t2[n2 + M2]]++;
  60460. for (C2 = v2, I2 = 15; I2 >= 1 && 0 === R2[I2]; I2--)
  60461. ;
  60462. if (C2 > I2 && (C2 = I2), 0 === I2)
  60463. return s2[a2++] = 20971520, s2[a2++] = 20971520, r2.bits = 1, 0;
  60464. for (y2 = 1; y2 < I2 && 0 === R2[y2]; y2++)
  60465. ;
  60466. for (C2 < y2 && (C2 = y2), k2 = 1, m2 = 1; m2 <= 15; m2++)
  60467. if (k2 <<= 1, (k2 -= R2[m2]) < 0)
  60468. return -1;
  60469. if (k2 > 0 && (0 === e2 || 1 !== I2))
  60470. return -1;
  60471. for (N2[1] = 0, m2 = 1; m2 < 15; m2++)
  60472. N2[m2 + 1] = N2[m2] + R2[m2];
  60473. for (M2 = 0; M2 < o2; M2++)
  60474. 0 !== t2[n2 + M2] && (i2[N2[t2[n2 + M2]]++] = M2);
  60475. if (0 === e2 ? (L2 = O2 = i2, g2 = 19) : 1 === e2 ? (L2 = _u, A2 -= 257, O2 = fu, G2 -= 257, g2 = 256) : (L2 = vu, O2 = mu, g2 = -1), S2 = 0, M2 = 0, m2 = y2, p2 = a2, T2 = C2, D2 = 0, l2 = -1, d2 = (E2 = 1 << C2) - 1, 1 === e2 && E2 > 852 || 2 === e2 && E2 > 592)
  60476. return 1;
  60477. for (; ; ) {
  60478. h2 = m2 - D2, i2[M2] < g2 ? (_2 = 0, f2 = i2[M2]) : i2[M2] > g2 ? (_2 = O2[G2 + i2[M2]], f2 = L2[A2 + i2[M2]]) : (_2 = 96, f2 = 0), u2 = 1 << m2 - D2, y2 = c2 = 1 << T2;
  60479. do {
  60480. s2[p2 + (S2 >> D2) + (c2 -= u2)] = h2 << 24 | _2 << 16 | f2 | 0;
  60481. } while (0 !== c2);
  60482. for (u2 = 1 << m2 - 1; S2 & u2; )
  60483. u2 >>= 1;
  60484. if (0 !== u2 ? (S2 &= u2 - 1, S2 += u2) : S2 = 0, M2++, 0 == --R2[m2]) {
  60485. if (m2 === I2)
  60486. break;
  60487. m2 = t2[n2 + i2[M2]];
  60488. }
  60489. if (m2 > C2 && (S2 & d2) !== l2) {
  60490. for (0 === D2 && (D2 = C2), p2 += y2, k2 = 1 << (T2 = m2 - D2); T2 + D2 < I2 && !((k2 -= R2[T2 + D2]) <= 0); )
  60491. T2++, k2 <<= 1;
  60492. if (E2 += 1 << T2, 1 === e2 && E2 > 852 || 2 === e2 && E2 > 592)
  60493. return 1;
  60494. s2[l2 = S2 & d2] = C2 << 24 | T2 << 16 | p2 - a2 | 0;
  60495. }
  60496. }
  60497. return 0 !== S2 && (s2[p2 + S2] = m2 - D2 << 24 | 64 << 16 | 0), r2.bits = C2, 0;
  60498. };
  60499. function yu(e2) {
  60500. return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
  60501. }
  60502. function Iu() {
  60503. this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new lu.Buf16(320), this.work = new lu.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
  60504. }
  60505. function Cu(e2) {
  60506. var t2;
  60507. return e2 && e2.state ? (t2 = e2.state, e2.total_in = e2.total_out = t2.total = 0, e2.msg = "", t2.wrap && (e2.adler = 1 & t2.wrap), t2.mode = 1, t2.last = 0, t2.havedict = 0, t2.dmax = 32768, t2.head = null, t2.hold = 0, t2.bits = 0, t2.lencode = t2.lendyn = new lu.Buf32(852), t2.distcode = t2.distdyn = new lu.Buf32(592), t2.sane = 1, t2.back = -1, 0) : -2;
  60508. }
  60509. function Tu(e2) {
  60510. var t2;
  60511. return e2 && e2.state ? ((t2 = e2.state).wsize = 0, t2.whave = 0, t2.wnext = 0, Cu(e2)) : -2;
  60512. }
  60513. function Du(e2, t2) {
  60514. var n2, o2;
  60515. return e2 && e2.state ? (o2 = e2.state, t2 < 0 ? (n2 = 0, t2 = -t2) : (n2 = 1 + (t2 >> 4), t2 < 48 && (t2 &= 15)), t2 && (t2 < 8 || t2 > 15) ? -2 : (null !== o2.window && o2.wbits !== t2 && (o2.window = null), o2.wrap = n2, o2.wbits = t2, Tu(e2))) : -2;
  60516. }
  60517. function ku(e2, t2) {
  60518. var n2, o2;
  60519. return e2 ? (o2 = new Iu(), e2.state = o2, o2.window = null, 0 !== (n2 = Du(e2, t2)) && (e2.state = null), n2) : -2;
  60520. }
  60521. var Eu, Su, Lu = true;
  60522. function Au(e2) {
  60523. if (Lu) {
  60524. var t2;
  60525. for (Eu = new lu.Buf32(512), Su = new lu.Buf32(32), t2 = 0; t2 < 144; )
  60526. e2.lens[t2++] = 8;
  60527. for (; t2 < 256; )
  60528. e2.lens[t2++] = 9;
  60529. for (; t2 < 280; )
  60530. e2.lens[t2++] = 7;
  60531. for (; t2 < 288; )
  60532. e2.lens[t2++] = 8;
  60533. for (Mu(1, e2.lens, 0, 288, Eu, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; )
  60534. e2.lens[t2++] = 5;
  60535. Mu(2, e2.lens, 0, 32, Su, 0, e2.work, { bits: 5 }), Lu = false;
  60536. }
  60537. e2.lencode = Eu, e2.lenbits = 9, e2.distcode = Su, e2.distbits = 5;
  60538. }
  60539. function Ru(e2, t2, n2, o2) {
  60540. var s2, a2 = e2.state;
  60541. return null === a2.window && (a2.wsize = 1 << a2.wbits, a2.wnext = 0, a2.whave = 0, a2.window = new lu.Buf8(a2.wsize)), o2 >= a2.wsize ? (lu.arraySet(a2.window, t2, n2 - a2.wsize, a2.wsize, 0), a2.wnext = 0, a2.whave = a2.wsize) : ((s2 = a2.wsize - a2.wnext) > o2 && (s2 = o2), lu.arraySet(a2.window, t2, n2 - o2, s2, a2.wnext), (o2 -= s2) ? (lu.arraySet(a2.window, t2, n2 - o2, o2, 0), a2.wnext = o2, a2.whave = a2.wsize) : (a2.wnext += s2, a2.wnext === a2.wsize && (a2.wnext = 0), a2.whave < a2.wsize && (a2.whave += s2))), 0;
  60542. }
  60543. var Nu = { inflateReset: Tu, inflateReset2: Du, inflateResetKeep: Cu, inflateInit: function(e2) {
  60544. return ku(e2, 15);
  60545. }, inflateInit2: ku, inflate: function(e2, t2) {
  60546. var n2, o2, s2, a2, i2, r2, u2, c2, l2, d2, p2, g2, h2, _2, f2, v2, m2, M2, y2, I2, C2, T2, D2, k2, E2 = 0, S2 = new lu.Buf8(4), L2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
  60547. if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in)
  60548. return -2;
  60549. 12 === (n2 = e2.state).mode && (n2.mode = 13), i2 = e2.next_out, s2 = e2.output, u2 = e2.avail_out, a2 = e2.next_in, o2 = e2.input, r2 = e2.avail_in, c2 = n2.hold, l2 = n2.bits, d2 = r2, p2 = u2, T2 = 0;
  60550. e:
  60551. for (; ; )
  60552. switch (n2.mode) {
  60553. case 1:
  60554. if (0 === n2.wrap) {
  60555. n2.mode = 13;
  60556. break;
  60557. }
  60558. for (; l2 < 16; ) {
  60559. if (0 === r2)
  60560. break e;
  60561. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60562. }
  60563. if (2 & n2.wrap && 35615 === c2) {
  60564. n2.check = 0, S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0), c2 = 0, l2 = 0, n2.mode = 2;
  60565. break;
  60566. }
  60567. if (n2.flags = 0, n2.head && (n2.head.done = false), !(1 & n2.wrap) || (((255 & c2) << 8) + (c2 >> 8)) % 31) {
  60568. e2.msg = "incorrect header check", n2.mode = 30;
  60569. break;
  60570. }
  60571. if (8 != (15 & c2)) {
  60572. e2.msg = "unknown compression method", n2.mode = 30;
  60573. break;
  60574. }
  60575. if (l2 -= 4, C2 = 8 + (15 & (c2 >>>= 4)), 0 === n2.wbits)
  60576. n2.wbits = C2;
  60577. else if (C2 > n2.wbits) {
  60578. e2.msg = "invalid window size", n2.mode = 30;
  60579. break;
  60580. }
  60581. n2.dmax = 1 << C2, e2.adler = n2.check = 1, n2.mode = 512 & c2 ? 10 : 12, c2 = 0, l2 = 0;
  60582. break;
  60583. case 2:
  60584. for (; l2 < 16; ) {
  60585. if (0 === r2)
  60586. break e;
  60587. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60588. }
  60589. if (n2.flags = c2, 8 != (255 & n2.flags)) {
  60590. e2.msg = "unknown compression method", n2.mode = 30;
  60591. break;
  60592. }
  60593. if (57344 & n2.flags) {
  60594. e2.msg = "unknown header flags set", n2.mode = 30;
  60595. break;
  60596. }
  60597. n2.head && (n2.head.text = c2 >> 8 & 1), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0)), c2 = 0, l2 = 0, n2.mode = 3;
  60598. case 3:
  60599. for (; l2 < 32; ) {
  60600. if (0 === r2)
  60601. break e;
  60602. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60603. }
  60604. n2.head && (n2.head.time = c2), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, S2[2] = c2 >>> 16 & 255, S2[3] = c2 >>> 24 & 255, n2.check = gu(n2.check, S2, 4, 0)), c2 = 0, l2 = 0, n2.mode = 4;
  60605. case 4:
  60606. for (; l2 < 16; ) {
  60607. if (0 === r2)
  60608. break e;
  60609. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60610. }
  60611. n2.head && (n2.head.xflags = 255 & c2, n2.head.os = c2 >> 8), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0)), c2 = 0, l2 = 0, n2.mode = 5;
  60612. case 5:
  60613. if (1024 & n2.flags) {
  60614. for (; l2 < 16; ) {
  60615. if (0 === r2)
  60616. break e;
  60617. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60618. }
  60619. n2.length = c2, n2.head && (n2.head.extra_len = c2), 512 & n2.flags && (S2[0] = 255 & c2, S2[1] = c2 >>> 8 & 255, n2.check = gu(n2.check, S2, 2, 0)), c2 = 0, l2 = 0;
  60620. } else
  60621. n2.head && (n2.head.extra = null);
  60622. n2.mode = 6;
  60623. case 6:
  60624. if (1024 & n2.flags && ((g2 = n2.length) > r2 && (g2 = r2), g2 && (n2.head && (C2 = n2.head.extra_len - n2.length, n2.head.extra || (n2.head.extra = new Array(n2.head.extra_len)), lu.arraySet(n2.head.extra, o2, a2, g2, C2)), 512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, n2.length -= g2), n2.length))
  60625. break e;
  60626. n2.length = 0, n2.mode = 7;
  60627. case 7:
  60628. if (2048 & n2.flags) {
  60629. if (0 === r2)
  60630. break e;
  60631. g2 = 0;
  60632. do {
  60633. C2 = o2[a2 + g2++], n2.head && C2 && n2.length < 65536 && (n2.head.name += String.fromCharCode(C2));
  60634. } while (C2 && g2 < r2);
  60635. if (512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, C2)
  60636. break e;
  60637. } else
  60638. n2.head && (n2.head.name = null);
  60639. n2.length = 0, n2.mode = 8;
  60640. case 8:
  60641. if (4096 & n2.flags) {
  60642. if (0 === r2)
  60643. break e;
  60644. g2 = 0;
  60645. do {
  60646. C2 = o2[a2 + g2++], n2.head && C2 && n2.length < 65536 && (n2.head.comment += String.fromCharCode(C2));
  60647. } while (C2 && g2 < r2);
  60648. if (512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, C2)
  60649. break e;
  60650. } else
  60651. n2.head && (n2.head.comment = null);
  60652. n2.mode = 9;
  60653. case 9:
  60654. if (512 & n2.flags) {
  60655. for (; l2 < 16; ) {
  60656. if (0 === r2)
  60657. break e;
  60658. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60659. }
  60660. if (c2 !== (65535 & n2.check)) {
  60661. e2.msg = "header crc mismatch", n2.mode = 30;
  60662. break;
  60663. }
  60664. c2 = 0, l2 = 0;
  60665. }
  60666. n2.head && (n2.head.hcrc = n2.flags >> 9 & 1, n2.head.done = true), e2.adler = n2.check = 0, n2.mode = 12;
  60667. break;
  60668. case 10:
  60669. for (; l2 < 32; ) {
  60670. if (0 === r2)
  60671. break e;
  60672. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60673. }
  60674. e2.adler = n2.check = yu(c2), c2 = 0, l2 = 0, n2.mode = 11;
  60675. case 11:
  60676. if (0 === n2.havedict)
  60677. return e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, 2;
  60678. e2.adler = n2.check = 1, n2.mode = 12;
  60679. case 12:
  60680. if (5 === t2 || 6 === t2)
  60681. break e;
  60682. case 13:
  60683. if (n2.last) {
  60684. c2 >>>= 7 & l2, l2 -= 7 & l2, n2.mode = 27;
  60685. break;
  60686. }
  60687. for (; l2 < 3; ) {
  60688. if (0 === r2)
  60689. break e;
  60690. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60691. }
  60692. switch (n2.last = 1 & c2, l2 -= 1, 3 & (c2 >>>= 1)) {
  60693. case 0:
  60694. n2.mode = 14;
  60695. break;
  60696. case 1:
  60697. if (Au(n2), n2.mode = 20, 6 === t2) {
  60698. c2 >>>= 2, l2 -= 2;
  60699. break e;
  60700. }
  60701. break;
  60702. case 2:
  60703. n2.mode = 17;
  60704. break;
  60705. case 3:
  60706. e2.msg = "invalid block type", n2.mode = 30;
  60707. }
  60708. c2 >>>= 2, l2 -= 2;
  60709. break;
  60710. case 14:
  60711. for (c2 >>>= 7 & l2, l2 -= 7 & l2; l2 < 32; ) {
  60712. if (0 === r2)
  60713. break e;
  60714. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60715. }
  60716. if ((65535 & c2) != (c2 >>> 16 ^ 65535)) {
  60717. e2.msg = "invalid stored block lengths", n2.mode = 30;
  60718. break;
  60719. }
  60720. if (n2.length = 65535 & c2, c2 = 0, l2 = 0, n2.mode = 15, 6 === t2)
  60721. break e;
  60722. case 15:
  60723. n2.mode = 16;
  60724. case 16:
  60725. if (g2 = n2.length) {
  60726. if (g2 > r2 && (g2 = r2), g2 > u2 && (g2 = u2), 0 === g2)
  60727. break e;
  60728. lu.arraySet(s2, o2, a2, g2, i2), r2 -= g2, a2 += g2, u2 -= g2, i2 += g2, n2.length -= g2;
  60729. break;
  60730. }
  60731. n2.mode = 12;
  60732. break;
  60733. case 17:
  60734. for (; l2 < 14; ) {
  60735. if (0 === r2)
  60736. break e;
  60737. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60738. }
  60739. if (n2.nlen = 257 + (31 & c2), c2 >>>= 5, l2 -= 5, n2.ndist = 1 + (31 & c2), c2 >>>= 5, l2 -= 5, n2.ncode = 4 + (15 & c2), c2 >>>= 4, l2 -= 4, n2.nlen > 286 || n2.ndist > 30) {
  60740. e2.msg = "too many length or distance symbols", n2.mode = 30;
  60741. break;
  60742. }
  60743. n2.have = 0, n2.mode = 18;
  60744. case 18:
  60745. for (; n2.have < n2.ncode; ) {
  60746. for (; l2 < 3; ) {
  60747. if (0 === r2)
  60748. break e;
  60749. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60750. }
  60751. n2.lens[L2[n2.have++]] = 7 & c2, c2 >>>= 3, l2 -= 3;
  60752. }
  60753. for (; n2.have < 19; )
  60754. n2.lens[L2[n2.have++]] = 0;
  60755. if (n2.lencode = n2.lendyn, n2.lenbits = 7, D2 = { bits: n2.lenbits }, T2 = Mu(0, n2.lens, 0, 19, n2.lencode, 0, n2.work, D2), n2.lenbits = D2.bits, T2) {
  60756. e2.msg = "invalid code lengths set", n2.mode = 30;
  60757. break;
  60758. }
  60759. n2.have = 0, n2.mode = 19;
  60760. case 19:
  60761. for (; n2.have < n2.nlen + n2.ndist; ) {
  60762. for (; v2 = (E2 = n2.lencode[c2 & (1 << n2.lenbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) {
  60763. if (0 === r2)
  60764. break e;
  60765. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60766. }
  60767. if (m2 < 16)
  60768. c2 >>>= f2, l2 -= f2, n2.lens[n2.have++] = m2;
  60769. else {
  60770. if (16 === m2) {
  60771. for (k2 = f2 + 2; l2 < k2; ) {
  60772. if (0 === r2)
  60773. break e;
  60774. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60775. }
  60776. if (c2 >>>= f2, l2 -= f2, 0 === n2.have) {
  60777. e2.msg = "invalid bit length repeat", n2.mode = 30;
  60778. break;
  60779. }
  60780. C2 = n2.lens[n2.have - 1], g2 = 3 + (3 & c2), c2 >>>= 2, l2 -= 2;
  60781. } else if (17 === m2) {
  60782. for (k2 = f2 + 3; l2 < k2; ) {
  60783. if (0 === r2)
  60784. break e;
  60785. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60786. }
  60787. l2 -= f2, C2 = 0, g2 = 3 + (7 & (c2 >>>= f2)), c2 >>>= 3, l2 -= 3;
  60788. } else {
  60789. for (k2 = f2 + 7; l2 < k2; ) {
  60790. if (0 === r2)
  60791. break e;
  60792. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60793. }
  60794. l2 -= f2, C2 = 0, g2 = 11 + (127 & (c2 >>>= f2)), c2 >>>= 7, l2 -= 7;
  60795. }
  60796. if (n2.have + g2 > n2.nlen + n2.ndist) {
  60797. e2.msg = "invalid bit length repeat", n2.mode = 30;
  60798. break;
  60799. }
  60800. for (; g2--; )
  60801. n2.lens[n2.have++] = C2;
  60802. }
  60803. }
  60804. if (30 === n2.mode)
  60805. break;
  60806. if (0 === n2.lens[256]) {
  60807. e2.msg = "invalid code -- missing end-of-block", n2.mode = 30;
  60808. break;
  60809. }
  60810. if (n2.lenbits = 9, D2 = { bits: n2.lenbits }, T2 = Mu(1, n2.lens, 0, n2.nlen, n2.lencode, 0, n2.work, D2), n2.lenbits = D2.bits, T2) {
  60811. e2.msg = "invalid literal/lengths set", n2.mode = 30;
  60812. break;
  60813. }
  60814. if (n2.distbits = 6, n2.distcode = n2.distdyn, D2 = { bits: n2.distbits }, T2 = Mu(2, n2.lens, n2.nlen, n2.ndist, n2.distcode, 0, n2.work, D2), n2.distbits = D2.bits, T2) {
  60815. e2.msg = "invalid distances set", n2.mode = 30;
  60816. break;
  60817. }
  60818. if (n2.mode = 20, 6 === t2)
  60819. break e;
  60820. case 20:
  60821. n2.mode = 21;
  60822. case 21:
  60823. if (r2 >= 6 && u2 >= 258) {
  60824. e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, hu(e2, p2), i2 = e2.next_out, s2 = e2.output, u2 = e2.avail_out, a2 = e2.next_in, o2 = e2.input, r2 = e2.avail_in, c2 = n2.hold, l2 = n2.bits, 12 === n2.mode && (n2.back = -1);
  60825. break;
  60826. }
  60827. for (n2.back = 0; v2 = (E2 = n2.lencode[c2 & (1 << n2.lenbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) {
  60828. if (0 === r2)
  60829. break e;
  60830. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60831. }
  60832. if (v2 && 0 == (240 & v2)) {
  60833. for (M2 = f2, y2 = v2, I2 = m2; v2 = (E2 = n2.lencode[I2 + ((c2 & (1 << M2 + y2) - 1) >> M2)]) >>> 16 & 255, m2 = 65535 & E2, !(M2 + (f2 = E2 >>> 24) <= l2); ) {
  60834. if (0 === r2)
  60835. break e;
  60836. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60837. }
  60838. c2 >>>= M2, l2 -= M2, n2.back += M2;
  60839. }
  60840. if (c2 >>>= f2, l2 -= f2, n2.back += f2, n2.length = m2, 0 === v2) {
  60841. n2.mode = 26;
  60842. break;
  60843. }
  60844. if (32 & v2) {
  60845. n2.back = -1, n2.mode = 12;
  60846. break;
  60847. }
  60848. if (64 & v2) {
  60849. e2.msg = "invalid literal/length code", n2.mode = 30;
  60850. break;
  60851. }
  60852. n2.extra = 15 & v2, n2.mode = 22;
  60853. case 22:
  60854. if (n2.extra) {
  60855. for (k2 = n2.extra; l2 < k2; ) {
  60856. if (0 === r2)
  60857. break e;
  60858. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60859. }
  60860. n2.length += c2 & (1 << n2.extra) - 1, c2 >>>= n2.extra, l2 -= n2.extra, n2.back += n2.extra;
  60861. }
  60862. n2.was = n2.length, n2.mode = 23;
  60863. case 23:
  60864. for (; v2 = (E2 = n2.distcode[c2 & (1 << n2.distbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) {
  60865. if (0 === r2)
  60866. break e;
  60867. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60868. }
  60869. if (0 == (240 & v2)) {
  60870. for (M2 = f2, y2 = v2, I2 = m2; v2 = (E2 = n2.distcode[I2 + ((c2 & (1 << M2 + y2) - 1) >> M2)]) >>> 16 & 255, m2 = 65535 & E2, !(M2 + (f2 = E2 >>> 24) <= l2); ) {
  60871. if (0 === r2)
  60872. break e;
  60873. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60874. }
  60875. c2 >>>= M2, l2 -= M2, n2.back += M2;
  60876. }
  60877. if (c2 >>>= f2, l2 -= f2, n2.back += f2, 64 & v2) {
  60878. e2.msg = "invalid distance code", n2.mode = 30;
  60879. break;
  60880. }
  60881. n2.offset = m2, n2.extra = 15 & v2, n2.mode = 24;
  60882. case 24:
  60883. if (n2.extra) {
  60884. for (k2 = n2.extra; l2 < k2; ) {
  60885. if (0 === r2)
  60886. break e;
  60887. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60888. }
  60889. n2.offset += c2 & (1 << n2.extra) - 1, c2 >>>= n2.extra, l2 -= n2.extra, n2.back += n2.extra;
  60890. }
  60891. if (n2.offset > n2.dmax) {
  60892. e2.msg = "invalid distance too far back", n2.mode = 30;
  60893. break;
  60894. }
  60895. n2.mode = 25;
  60896. case 25:
  60897. if (0 === u2)
  60898. break e;
  60899. if (g2 = p2 - u2, n2.offset > g2) {
  60900. if ((g2 = n2.offset - g2) > n2.whave && n2.sane) {
  60901. e2.msg = "invalid distance too far back", n2.mode = 30;
  60902. break;
  60903. }
  60904. g2 > n2.wnext ? (g2 -= n2.wnext, h2 = n2.wsize - g2) : h2 = n2.wnext - g2, g2 > n2.length && (g2 = n2.length), _2 = n2.window;
  60905. } else
  60906. _2 = s2, h2 = i2 - n2.offset, g2 = n2.length;
  60907. g2 > u2 && (g2 = u2), u2 -= g2, n2.length -= g2;
  60908. do {
  60909. s2[i2++] = _2[h2++];
  60910. } while (--g2);
  60911. 0 === n2.length && (n2.mode = 21);
  60912. break;
  60913. case 26:
  60914. if (0 === u2)
  60915. break e;
  60916. s2[i2++] = n2.length, u2--, n2.mode = 21;
  60917. break;
  60918. case 27:
  60919. if (n2.wrap) {
  60920. for (; l2 < 32; ) {
  60921. if (0 === r2)
  60922. break e;
  60923. r2--, c2 |= o2[a2++] << l2, l2 += 8;
  60924. }
  60925. if (p2 -= u2, e2.total_out += p2, n2.total += p2, p2 && (e2.adler = n2.check = n2.flags ? gu(n2.check, s2, p2, i2 - p2) : du(n2.check, s2, p2, i2 - p2)), p2 = u2, (n2.flags ? c2 : yu(c2)) !== n2.check) {
  60926. e2.msg = "incorrect data check", n2.mode = 30;
  60927. break;
  60928. }
  60929. c2 = 0, l2 = 0;
  60930. }
  60931. n2.mode = 28;
  60932. case 28:
  60933. if (n2.wrap && n2.flags) {
  60934. for (; l2 < 32; ) {
  60935. if (0 === r2)
  60936. break e;
  60937. r2--, c2 += o2[a2++] << l2, l2 += 8;
  60938. }
  60939. if (c2 !== (4294967295 & n2.total)) {
  60940. e2.msg = "incorrect length check", n2.mode = 30;
  60941. break;
  60942. }
  60943. c2 = 0, l2 = 0;
  60944. }
  60945. n2.mode = 29;
  60946. case 29:
  60947. T2 = 1;
  60948. break e;
  60949. case 30:
  60950. T2 = -3;
  60951. break e;
  60952. case 31:
  60953. return -4;
  60954. case 32:
  60955. default:
  60956. return -2;
  60957. }
  60958. return e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, (n2.wsize || p2 !== e2.avail_out && n2.mode < 30 && (n2.mode < 27 || 4 !== t2)) && Ru(e2, e2.output, e2.next_out, p2 - e2.avail_out), d2 -= e2.avail_in, p2 -= e2.avail_out, e2.total_in += d2, e2.total_out += p2, n2.total += p2, n2.wrap && p2 && (e2.adler = n2.check = n2.flags ? gu(n2.check, s2, p2, e2.next_out - p2) : du(n2.check, s2, p2, e2.next_out - p2)), e2.data_type = n2.bits + (n2.last ? 64 : 0) + (12 === n2.mode ? 128 : 0) + (20 === n2.mode || 15 === n2.mode ? 256 : 0), (0 === d2 && 0 === p2 || 4 === t2) && 0 === T2 && (T2 = -5), T2;
  60959. }, inflateEnd: function(e2) {
  60960. if (!e2 || !e2.state)
  60961. return -2;
  60962. var t2 = e2.state;
  60963. return t2.window && (t2.window = null), e2.state = null, 0;
  60964. }, inflateGetHeader: function(e2, t2) {
  60965. var n2;
  60966. return e2 && e2.state ? 0 == (2 & (n2 = e2.state).wrap) ? -2 : (n2.head = t2, t2.done = false, 0) : -2;
  60967. }, inflateSetDictionary: function(e2, t2) {
  60968. var n2, o2 = t2.length;
  60969. return e2 && e2.state ? 0 !== (n2 = e2.state).wrap && 11 !== n2.mode ? -2 : 11 === n2.mode && du(1, t2, o2, 0) !== n2.check ? -3 : Ru(e2, t2, o2, o2) ? (n2.mode = 31, -4) : (n2.havedict = 1, 0) : -2;
  60970. }, inflateInfo: "pako inflate (from Nodeca project)" }, Ou = true, Gu = true;
  60971. try {
  60972. String.fromCharCode.apply(null, [0]);
  60973. } catch (ac) {
  60974. Ou = false;
  60975. }
  60976. try {
  60977. String.fromCharCode.apply(null, new Uint8Array(1));
  60978. } catch (ac) {
  60979. Gu = false;
  60980. }
  60981. for (var Uu = new lu.Buf8(256), Pu = 0; Pu < 256; Pu++)
  60982. Uu[Pu] = Pu >= 252 ? 6 : Pu >= 248 ? 5 : Pu >= 240 ? 4 : Pu >= 224 ? 3 : Pu >= 192 ? 2 : 1;
  60983. Uu[254] = Uu[254] = 1;
  60984. function bu(e2, t2) {
  60985. if (t2 < 65534 && (e2.subarray && Gu || !e2.subarray && Ou))
  60986. return String.fromCharCode.apply(null, lu.shrinkBuf(e2, t2));
  60987. for (var n2 = "", o2 = 0; o2 < t2; o2++)
  60988. n2 += String.fromCharCode(e2[o2]);
  60989. return n2;
  60990. }
  60991. var wu = function(e2) {
  60992. var t2, n2, o2, s2, a2, i2 = e2.length, r2 = 0;
  60993. for (s2 = 0; s2 < i2; s2++)
  60994. 55296 == (64512 & (n2 = e2.charCodeAt(s2))) && s2 + 1 < i2 && 56320 == (64512 & (o2 = e2.charCodeAt(s2 + 1))) && (n2 = 65536 + (n2 - 55296 << 10) + (o2 - 56320), s2++), r2 += n2 < 128 ? 1 : n2 < 2048 ? 2 : n2 < 65536 ? 3 : 4;
  60995. for (t2 = new lu.Buf8(r2), a2 = 0, s2 = 0; a2 < r2; s2++)
  60996. 55296 == (64512 & (n2 = e2.charCodeAt(s2))) && s2 + 1 < i2 && 56320 == (64512 & (o2 = e2.charCodeAt(s2 + 1))) && (n2 = 65536 + (n2 - 55296 << 10) + (o2 - 56320), s2++), n2 < 128 ? t2[a2++] = n2 : n2 < 2048 ? (t2[a2++] = 192 | n2 >>> 6, t2[a2++] = 128 | 63 & n2) : n2 < 65536 ? (t2[a2++] = 224 | n2 >>> 12, t2[a2++] = 128 | n2 >>> 6 & 63, t2[a2++] = 128 | 63 & n2) : (t2[a2++] = 240 | n2 >>> 18, t2[a2++] = 128 | n2 >>> 12 & 63, t2[a2++] = 128 | n2 >>> 6 & 63, t2[a2++] = 128 | 63 & n2);
  60997. return t2;
  60998. }, Fu = function(e2) {
  60999. for (var t2 = new lu.Buf8(e2.length), n2 = 0, o2 = t2.length; n2 < o2; n2++)
  61000. t2[n2] = e2.charCodeAt(n2);
  61001. return t2;
  61002. }, qu = function(e2, t2) {
  61003. var n2, o2, s2, a2, i2 = t2 || e2.length, r2 = new Array(2 * i2);
  61004. for (o2 = 0, n2 = 0; n2 < i2; )
  61005. if ((s2 = e2[n2++]) < 128)
  61006. r2[o2++] = s2;
  61007. else if ((a2 = Uu[s2]) > 4)
  61008. r2[o2++] = 65533, n2 += a2 - 1;
  61009. else {
  61010. for (s2 &= 2 === a2 ? 31 : 3 === a2 ? 15 : 7; a2 > 1 && n2 < i2; )
  61011. s2 = s2 << 6 | 63 & e2[n2++], a2--;
  61012. a2 > 1 ? r2[o2++] = 65533 : s2 < 65536 ? r2[o2++] = s2 : (s2 -= 65536, r2[o2++] = 55296 | s2 >> 10 & 1023, r2[o2++] = 56320 | 1023 & s2);
  61013. }
  61014. return bu(r2, o2);
  61015. }, xu = function(e2, t2) {
  61016. var n2;
  61017. for ((t2 = t2 || e2.length) > e2.length && (t2 = e2.length), n2 = t2 - 1; n2 >= 0 && 128 == (192 & e2[n2]); )
  61018. n2--;
  61019. return n2 < 0 || 0 === n2 ? t2 : n2 + Uu[e2[n2]] > t2 ? n2 : t2;
  61020. }, Vu = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 }, Bu = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
  61021. var Hu = function() {
  61022. this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
  61023. };
  61024. var Ku = function() {
  61025. this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false;
  61026. }, Wu = Object.prototype.toString;
  61027. function Yu(e2) {
  61028. if (!(this instanceof Yu))
  61029. return new Yu(e2);
  61030. this.options = lu.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e2 || {});
  61031. var t2 = this.options;
  61032. t2.raw && t2.windowBits >= 0 && t2.windowBits < 16 && (t2.windowBits = -t2.windowBits, 0 === t2.windowBits && (t2.windowBits = -15)), !(t2.windowBits >= 0 && t2.windowBits < 16) || e2 && e2.windowBits || (t2.windowBits += 32), t2.windowBits > 15 && t2.windowBits < 48 && 0 == (15 & t2.windowBits) && (t2.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new Hu(), this.strm.avail_out = 0;
  61033. var n2 = Nu.inflateInit2(this.strm, t2.windowBits);
  61034. if (n2 !== Vu.Z_OK)
  61035. throw new Error(Bu[n2]);
  61036. if (this.header = new Ku(), Nu.inflateGetHeader(this.strm, this.header), t2.dictionary && ("string" == typeof t2.dictionary ? t2.dictionary = wu(t2.dictionary) : "[object ArrayBuffer]" === Wu.call(t2.dictionary) && (t2.dictionary = new Uint8Array(t2.dictionary)), t2.raw && (n2 = Nu.inflateSetDictionary(this.strm, t2.dictionary)) !== Vu.Z_OK))
  61037. throw new Error(Bu[n2]);
  61038. }
  61039. function ju(e2, t2) {
  61040. var n2 = new Yu(t2);
  61041. if (n2.push(e2, true), n2.err)
  61042. throw n2.msg || Bu[n2.err];
  61043. return n2.result;
  61044. }
  61045. Yu.prototype.push = function(e2, t2) {
  61046. var n2, o2, s2, a2, i2, r2 = this.strm, u2 = this.options.chunkSize, c2 = this.options.dictionary, l2 = false;
  61047. if (this.ended)
  61048. return false;
  61049. o2 = t2 === ~~t2 ? t2 : true === t2 ? Vu.Z_FINISH : Vu.Z_NO_FLUSH, "string" == typeof e2 ? r2.input = Fu(e2) : "[object ArrayBuffer]" === Wu.call(e2) ? r2.input = new Uint8Array(e2) : r2.input = e2, r2.next_in = 0, r2.avail_in = r2.input.length;
  61050. do {
  61051. if (0 === r2.avail_out && (r2.output = new lu.Buf8(u2), r2.next_out = 0, r2.avail_out = u2), (n2 = Nu.inflate(r2, Vu.Z_NO_FLUSH)) === Vu.Z_NEED_DICT && c2 && (n2 = Nu.inflateSetDictionary(this.strm, c2)), n2 === Vu.Z_BUF_ERROR && true === l2 && (n2 = Vu.Z_OK, l2 = false), n2 !== Vu.Z_STREAM_END && n2 !== Vu.Z_OK)
  61052. return this.onEnd(n2), this.ended = true, false;
  61053. r2.next_out && (0 !== r2.avail_out && n2 !== Vu.Z_STREAM_END && (0 !== r2.avail_in || o2 !== Vu.Z_FINISH && o2 !== Vu.Z_SYNC_FLUSH) || ("string" === this.options.to ? (s2 = xu(r2.output, r2.next_out), a2 = r2.next_out - s2, i2 = qu(r2.output, s2), r2.next_out = a2, r2.avail_out = u2 - a2, a2 && lu.arraySet(r2.output, r2.output, s2, a2, 0), this.onData(i2)) : this.onData(lu.shrinkBuf(r2.output, r2.next_out)))), 0 === r2.avail_in && 0 === r2.avail_out && (l2 = true);
  61054. } while ((r2.avail_in > 0 || 0 === r2.avail_out) && n2 !== Vu.Z_STREAM_END);
  61055. return n2 === Vu.Z_STREAM_END && (o2 = Vu.Z_FINISH), o2 === Vu.Z_FINISH ? (n2 = Nu.inflateEnd(this.strm), this.onEnd(n2), this.ended = true, n2 === Vu.Z_OK) : o2 !== Vu.Z_SYNC_FLUSH || (this.onEnd(Vu.Z_OK), r2.avail_out = 0, true);
  61056. }, Yu.prototype.onData = function(e2) {
  61057. this.chunks.push(e2);
  61058. }, Yu.prototype.onEnd = function(e2) {
  61059. e2 === Vu.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = lu.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
  61060. };
  61061. var zu = { Inflate: Yu, inflate: ju, inflateRaw: function(e2, t2) {
  61062. return (t2 = t2 || {}).raw = true, ju(e2, t2);
  61063. }, ungzip: ju }, Ju = {};
  61064. (0, lu.assign)(Ju, zu, Vu);
  61065. var Xu = Ju, Zu = function() {
  61066. function e2(t2) {
  61067. o(this, e2), this._m = t2, this._n = "InflateModule", this._bLogForInflateOK = false, this._bLogForInflateError = false;
  61068. }
  61069. return a(e2, [{ key: "inflate", value: function(e3) {
  61070. var t2, n2 = new Uint8Array(e3).slice(4), o2 = Date.now();
  61071. try {
  61072. t2 = Xu.inflate(n2, { to: "string" }), this._bLogForInflateOK || (this._bLogForInflateOK = true, new Aa("inflateOK").end());
  61073. } catch (i2) {
  61074. if (this._bLogForInflateError)
  61075. return;
  61076. return this._bLogForInflateError = true, void new Aa("inflateError").setMessage(i2).end();
  61077. }
  61078. var s2 = n2.length + 4, a2 = t2.length;
  61079. return Ve.d("inflate ok. zipped:".concat(s2, " unzipped:").concat(a2) + " compression ratio:".concat(Math.round(100 * (a2 - s2) / a2), "% cost:").concat(Date.now() - o2)), t2;
  61080. } }, { key: "reset", value: function() {
  61081. Ve.l("".concat(this._n, ".reset")), this._bLogForInflateOK = false, this._bLogForInflateError = false;
  61082. } }]), e2;
  61083. }(), Qu = function() {
  61084. function e2(t2) {
  61085. o(this, e2);
  61086. var n2 = new Aa("sdkConstruct");
  61087. this._n = "ModuleManager", this._isReady = false, this._reason = ha.USER_NOT_LOGGED_IN, this._startLoginTs = 0, this._moduleMap = /* @__PURE__ */ new Map(), this._innerEmitter = null, this._outerEmitter = null, this._checkCount = 0, this._checkTimer = -1, this._moduleMap.set(xn, new Qi(this, t2)), this._moduleMap.set(ro, new Zu(this)), this._moduleMap.set(to, new au(this)), this._moduleMap.set(Zn, new Xr(this)), this._moduleMap.set(Qn, new ou(this)), this._moduleMap.set(eo, new nu(this)), this._moduleMap.set(Jn, new Vr(this)), this._moduleMap.set(zn, new zr(this)), this._moduleMap.set(Rn, new $i(this)), this._moduleMap.set(Nn, new Mr(this)), this._moduleMap.set(On, new yr(this)), this._moduleMap.set(ao, new Ir(this)), this._moduleMap.set(Gn, new Zi(this)), this._moduleMap.set(Un, new Qa(this)), this._moduleMap.set(qn, new Mi(this)), this._moduleMap.set(Pn, new qi(this)), this._moduleMap.set(wn, new Vi(this)), this._moduleMap.set(Fn, new Wi(this)), this._moduleMap.set(Vn, new tr(this)), this._moduleMap.set(io, new cu(this)), this._moduleMap.set(Bn, new sr(this)), this._moduleMap.set(Hn, new ur(this)), this._moduleMap.set(Kn, new dr(this)), this._moduleMap.set(Wn, new gr(this)), this._moduleMap.set(Yn, new Cr(this)), this._moduleMap.set(jn, new Tr(this)), this._moduleMap.set(Xn, new Jr(this)), this._moduleMap.set($n, new Zr(this)), this._moduleMap.set(no, new iu(this)), this._moduleMap.set(oo, new ru(this)), this._moduleMap.set(so, new uu(this)), this._eventThrottleMap = /* @__PURE__ */ new Map();
  61088. var s2 = t2.instanceID, a2 = t2.oversea, i2 = t2.SDKAppID, r2 = "instanceID:".concat(s2, " SDKAppID:").concat(i2, " host:").concat(Ot(), " oversea:").concat(a2, " inBrowser:").concat(ie, " inMiniApp:").concat(ae) + " canIUseInflate:".concat(this.canIUseInflate()) + " workerAvailable:".concat(Se, " UserAgent:").concat(ue);
  61089. Aa.bindEventStatModule(this._moduleMap.get(Bn)), n2.setMessage("".concat(r2, " ").concat(function() {
  61090. var e3 = "";
  61091. if (ae)
  61092. try {
  61093. var t3 = re.getSystemInfoSync(), n3 = t3.model, o2 = t3.version, s3 = t3.system, a3 = t3.platform, i3 = t3.SDKVersion;
  61094. e3 = "model:".concat(n3, " version:").concat(o2, " system:").concat(s3, " platform:").concat(a3, " SDKVersion:").concat(i3);
  61095. } catch (r3) {
  61096. e3 = "";
  61097. }
  61098. return e3;
  61099. }())).end(), Ve.i("SDK ".concat(r2)), ja.prototype._getErrorMessage = this.getErrorMessage.bind(this), this._readyList = void 0, this._ssoLogForReady = null, this._initReadyList();
  61100. }
  61101. return a(e2, [{ key: "_startTimer", value: function() {
  61102. var e3 = this._moduleMap.get(Qn), t2 = e3.isWorkerEnabled();
  61103. Ve.l("".concat(this._n, ".startTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e3.startWorkerTimer() : this._startMainThreadTimer();
  61104. } }, { key: "_startMainThreadTimer", value: function() {
  61105. this._checkTimer < 0 && (this._checkTimer = setInterval(this.onCheckTimer.bind(this), 1e3)), Ve.l("".concat(this._n, "._startMainThreadTimer seed:").concat(this._checkTimer));
  61106. } }, { key: "stopTimer", value: function() {
  61107. var e3 = this._moduleMap.get(Qn), t2 = e3.isWorkerEnabled();
  61108. Ve.l("".concat(this._n, ".stopTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e3.stopWorkerTimer() : this._stopMainThreadTimer();
  61109. } }, { key: "_stopMainThreadTimer", value: function() {
  61110. Ve.l("".concat(this._n, "._stopMainThreadTimer")), this._checkTimer > 0 && (clearInterval(this._checkTimer), this._checkTimer = -1, this._checkCount = 0);
  61111. } }, { key: "_stopMainThreadSocket", value: function() {
  61112. Ve.l("".concat(this._n, "._stopMainThreadSocket"));
  61113. var e3 = this._moduleMap.get(Jn);
  61114. e3.setIsWorkerEnabled(true), e3.reConnect();
  61115. } }, { key: "_startMainThreadSocket", value: function() {
  61116. Ve.l("".concat(this._n, "._startMainThreadSocket"));
  61117. var e3 = this._moduleMap.get(Jn);
  61118. e3.setIsWorkerEnabled(false), e3.reConnect();
  61119. } }, { key: "onWorkerTimerEnabled", value: function() {
  61120. Ve.l("".concat(this._n, ".onWorkerTimerEnabled, disable main thread timer and socket")), this._stopMainThreadTimer(), this._stopMainThreadSocket();
  61121. } }, { key: "onWorkerTimerDisabled", value: function() {
  61122. Ve.l("".concat(this._n, ".onWorkerTimerDisabled, enable main thread timer and socket")), this._startMainThreadTimer(), this._startMainThreadSocket();
  61123. } }, { key: "onCheckTimer", value: function() {
  61124. this._checkCount += 1;
  61125. var e3, t2 = D(this._moduleMap);
  61126. try {
  61127. for (t2.s(); !(e3 = t2.n()).done; ) {
  61128. var n2 = v(e3.value, 2)[1];
  61129. n2.onCheckTimer && n2.onCheckTimer(this._checkCount);
  61130. }
  61131. } catch (o2) {
  61132. t2.e(o2);
  61133. } finally {
  61134. t2.f();
  61135. }
  61136. } }, { key: "_initReadyList", value: function() {
  61137. var e3 = this;
  61138. this._readyList = [this._moduleMap.get(Rn), this._moduleMap.get(qn)], this._readyList.forEach(function(t2) {
  61139. t2.ready(function() {
  61140. return e3._onModuleReady();
  61141. });
  61142. });
  61143. } }, { key: "_onModuleReady", value: function() {
  61144. var e3 = true;
  61145. if (this._readyList.forEach(function(t3) {
  61146. t3.isReady() || (e3 = false);
  61147. }), e3 && !this._isReady) {
  61148. this._isReady = true, this._outerEmitter.emit(k.SDK_READY);
  61149. var t2 = Date.now() - this._startLoginTs;
  61150. Ve.w("SDK is ready. cost ".concat(t2, " ms")), this._startLoginTs = Date.now();
  61151. var n2 = this._moduleMap.get(Hn).getNetworkType(), o2 = this._ssoLogForReady.getStartTs() + Ue;
  61152. this._ssoLogForReady.setNetworkType(n2).setMessage(t2).start(o2).end();
  61153. }
  61154. } }, { key: "login", value: function() {
  61155. 0 === this._startLoginTs && (be(), this._startLoginTs = Date.now(), this._startTimer(), this._moduleMap.get(Hn).start(), this._ssoLogForReady = new Aa("sdkReady"), this._reason = ha.LOGGING_IN);
  61156. } }, { key: "onLoginFailed", value: function() {
  61157. this._startLoginTs = 0;
  61158. } }, { key: "getOuterEmitterInstance", value: function() {
  61159. return null === this._outerEmitter && (this._outerEmitter = new lr(), Ja(this._outerEmitter), this._outerEmitter._emit = this._outerEmitter.emit, this._outerEmitter.emit = (function(e3, t2) {
  61160. var n2 = this;
  61161. if (e3 === k.CONVERSATION_LIST_UPDATED || e3 === k.FRIEND_LIST_UPDATED || e3 === k.GROUP_LIST_UPDATED || e3 === k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED)
  61162. if (this._eventThrottleMap.has(e3)) {
  61163. var o2 = Date.now(), s2 = this._eventThrottleMap.get(e3);
  61164. o2 - s2.last <= 1e3 ? (s2.timeoutID && clearTimeout(s2.timeoutID), s2.timeoutID = setTimeout(function() {
  61165. s2.last = Date.now(), n2._outerEmitter._emit.apply(n2._outerEmitter, [e3, { name: e3, data: n2._getEventData(e3) }]);
  61166. }, 1e3)) : (s2.last = o2, this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: this._getEventData(e3) }]));
  61167. } else
  61168. this._eventThrottleMap.set(e3, { last: Date.now(), timeoutID: -1 }), this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: this._getEventData(e3) }]);
  61169. else
  61170. this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: arguments[1] }]);
  61171. }).bind(this)), this._outerEmitter;
  61172. } }, { key: "_getEventData", value: function(e3) {
  61173. return e3 === k.CONVERSATION_LIST_UPDATED ? this._moduleMap.get(qn).getLocalConversationList() : e3 === k.FRIEND_LIST_UPDATED ? this._moduleMap.get(bn).getLocalFriendList(false) : e3 === k.GROUP_LIST_UPDATED ? this._moduleMap.get(Pn).getLocalGroupList() : e3 === k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED ? this._moduleMap.get(qn).getTotalUnreadMessageCount() : void 0;
  61174. } }, { key: "getInnerEmitterInstance", value: function() {
  61175. return null === this._innerEmitter && (this._innerEmitter = new lr(), this._innerEmitter._emit = this._innerEmitter.emit, this._innerEmitter.emit = (function(e3, t2) {
  61176. var n2;
  61177. n2 = st(arguments[1]) && arguments[1].data ? [e3, { name: arguments[0], data: arguments[1].data }] : [e3, { name: arguments[0], data: arguments[1] }], this._innerEmitter._emit.apply(this._innerEmitter, n2);
  61178. }).bind(this)), this._innerEmitter;
  61179. } }, { key: "hasModule", value: function(e3) {
  61180. return this._moduleMap.has(e3);
  61181. } }, { key: "getModule", value: function(e3) {
  61182. return this._moduleMap.get(e3);
  61183. } }, { key: "canIUseInflate", value: function() {
  61184. return !!this._moduleMap.get(ro);
  61185. } }, { key: "isReady", value: function() {
  61186. return this._isReady;
  61187. } }, { key: "isIntl", value: function() {
  61188. return this.getModule(xn).isIntl();
  61189. } }, { key: "getNotReadyReason", value: function() {
  61190. return this._reason;
  61191. } }, { key: "setNotReadyReason", value: function(e3) {
  61192. this._reason = e3;
  61193. } }, { key: "getErrorMessage", value: function(e3, t2, n2) {
  61194. return this._moduleMap.get(io).get({ key: e3, replacement1: t2, replacement2: n2, isIntl: this.isIntl() });
  61195. } }, { key: "outputWarning", value: function(e3, t2, n2) {
  61196. var o2 = this.getErrorMessage(e3, t2, n2);
  61197. o2 && Ve.w(o2);
  61198. } }, { key: "onError", value: function(e3) {
  61199. var t2 = "code:".concat(e3.code, " message:").concat(e3.message);
  61200. Ve.w("Oops! ".concat(t2)), new Aa("error").setMessage(t2).setNetworkType(this.getModule(Hn).getNetworkType()).setLevel("error").end(), this.getOuterEmitterInstance().emit(k.ERROR, e3);
  61201. } }, { key: "restartTimer", value: function() {
  61202. Ve.l("".concat(this._n, ".restartTimer")), this.stopTimer(), this._startTimer(), this.getModule(Pn).restartPolling();
  61203. } }, { key: "getTimerID", value: function() {
  61204. var e3 = this._moduleMap.get(Qn);
  61205. return e3.isWorkerEnabled() ? e3.getTimerID() : this._checkTimer;
  61206. } }, { key: "getPollingTimerID", value: function(e3) {
  61207. return this._moduleMap.get(Pn).getPollingTimerID(e3);
  61208. } }, { key: "reset", value: function() {
  61209. Ve.l("".concat(this._n, ".reset")), be();
  61210. var e3, t2 = D(this._moduleMap);
  61211. try {
  61212. for (t2.s(); !(e3 = t2.n()).done; ) {
  61213. var n2 = v(e3.value, 2)[1];
  61214. n2.reset && n2.reset();
  61215. }
  61216. } catch (i2) {
  61217. t2.e(i2);
  61218. } finally {
  61219. t2.f();
  61220. }
  61221. this._startLoginTs = 0, this._initReadyList(), this._isReady = false, this.stopTimer(), this._outerEmitter.emit(k.SDK_NOT_READY);
  61222. var o2, s2 = D(this._eventThrottleMap);
  61223. try {
  61224. for (s2.s(); !(o2 = s2.n()).done; ) {
  61225. var a2 = v(o2.value, 2)[1];
  61226. a2.timeoutID && clearTimeout(a2.timeoutID);
  61227. }
  61228. } catch (i2) {
  61229. s2.e(i2);
  61230. } finally {
  61231. s2.f();
  61232. }
  61233. this._eventThrottleMap.clear();
  61234. } }]), e2;
  61235. }(), $u2 = function() {
  61236. function e2(t2) {
  61237. o(this, e2), this._funcMap = /* @__PURE__ */ new Map(), this._m = t2;
  61238. }
  61239. return a(e2, [{ key: "defense", value: function(e3, t2) {
  61240. var n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0;
  61241. if ("string" != typeof e3)
  61242. return null;
  61243. if (0 === e3.length)
  61244. return null;
  61245. if ("function" != typeof t2)
  61246. return null;
  61247. if (this._funcMap.has(e3) && this._funcMap.get(e3).has(t2))
  61248. return this._funcMap.get(e3).get(t2);
  61249. this._funcMap.has(e3) || this._funcMap.set(e3, /* @__PURE__ */ new Map());
  61250. var o2 = null;
  61251. return this._funcMap.get(e3).has(t2) ? o2 = this._funcMap.get(e3).get(t2) : (o2 = this._pack(e3, t2, n2), this._funcMap.get(e3).set(t2, o2)), o2;
  61252. } }, { key: "defenseOnce", value: function(e3, t2) {
  61253. var n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0;
  61254. return "function" != typeof t2 ? null : this._pack(e3, t2, n2);
  61255. } }, { key: "find", value: function(e3, t2) {
  61256. return "string" != typeof e3 || 0 === e3.length || "function" != typeof t2 ? null : this._funcMap.has(e3) && this._funcMap.get(e3).has(t2) ? this._funcMap.get(e3).get(t2) : (this._m.outputWarning("ListenerFnNotFound", e3), null);
  61257. } }, { key: "delete", value: function(e3, t2) {
  61258. return "function" == typeof t2 && (!!this._funcMap.has(e3) && (!!this._funcMap.get(e3).has(t2) && (this._funcMap.get(e3).delete(t2), 0 === this._funcMap.get(e3).size && this._funcMap.delete(e3), true)));
  61259. } }, { key: "_pack", value: function(e3, t2, n2) {
  61260. var o2 = this;
  61261. return function() {
  61262. try {
  61263. t2.apply(n2, Array.from(arguments));
  61264. } catch (u2) {
  61265. var s2 = Object.values(k).indexOf(e3), a2 = "CallbackError";
  61266. if (-1 !== s2) {
  61267. var i2 = Object.keys(k)[s2];
  61268. o2._m.outputWarning(a2, i2, u2);
  61269. }
  61270. var r2 = new Aa(a2);
  61271. r2.setMessage("eventName:".concat(e3)).setMoreMessage(u2.message).end();
  61272. }
  61273. };
  61274. } }]), e2;
  61275. }(), ec = function() {
  61276. function e2(t2) {
  61277. o(this, e2);
  61278. var n2 = { SDKAppID: t2.SDKAppID, unlimitedAVChatRoom: t2.unlimitedAVChatRoom || false, scene: t2.scene || "", oversea: t2.oversea || false, instanceID: Nt(), devMode: t2.devMode || false, proxyServer: t2.proxyServer || void 0, fileUploadProxy: t2.fileUploadProxy || void 0, fileDownloadProxy: t2.fileDownloadProxy || t2.fileUploadProxy || void 0 };
  61279. this._m = new Qu(n2), this._safetyCallbackFactory = new $u2(this._m);
  61280. }
  61281. return a(e2, [{ key: "onError", value: function(e3) {
  61282. this._m.onError(e3);
  61283. } }, { key: "login", value: function(e3) {
  61284. return this._m.login(), this._getModule(Rn).login(e3);
  61285. } }, { key: "logout", value: function() {
  61286. var e3 = this;
  61287. return this._getModule(Rn).logout().then(function(t2) {
  61288. return e3._m.reset(), t2;
  61289. });
  61290. } }, { key: "isReady", value: function() {
  61291. return this._m.isReady();
  61292. } }, { key: "isIntl", value: function() {
  61293. return this._m.isIntl();
  61294. } }, { key: "getNotReadyReason", value: function() {
  61295. return this._m.getNotReadyReason();
  61296. } }, { key: "getErrorMessage", value: function(e3, t2, n2) {
  61297. return this._m.getErrorMessage(e3, t2, n2);
  61298. } }, { key: "_getModule", value: function(e3) {
  61299. return this._m.getModule(e3);
  61300. } }, { key: "destroy", value: function() {
  61301. var e3 = this;
  61302. return this.logout().finally(function() {
  61303. e3._m.stopTimer(), e3._getModule(Qn).terminate(), e3._getModule(Jn).dealloc();
  61304. var t2 = e3._m.getOuterEmitterInstance(), n2 = e3._getModule(xn);
  61305. t2.emit(k.SDK_DESTROY, { SDKAppID: n2.getSDKAppID() });
  61306. });
  61307. } }, { key: "on", value: function(e3, t2, n2) {
  61308. Ve.d("on", "eventName:".concat(e3)), this._m.getOuterEmitterInstance().on(e3, this._safetyCallbackFactory.defense(e3, t2, n2), n2);
  61309. } }, { key: "once", value: function(e3, t2, n2) {
  61310. Ve.d("once", "eventName:".concat(e3)), this._m.getOuterEmitterInstance().once(e3, this._safetyCallbackFactory.defenseOnce(e3, t2, n2), n2 || this);
  61311. } }, { key: "off", value: function(e3, t2, n2, o2) {
  61312. Ve.d("off", "eventName:".concat(e3));
  61313. var s2 = this._safetyCallbackFactory.find(e3, t2);
  61314. null !== s2 && (this._m.getOuterEmitterInstance().off(e3, s2, n2, o2), this._safetyCallbackFactory.delete(e3, t2));
  61315. } }, { key: "registerPlugin", value: function(e3) {
  61316. it(e3["tim-offline-push-plugin"]) ? this._getModule(Yn).registerPlugin(e3) : this._getModule(no).registerPlugin(e3);
  61317. } }, { key: "setLogLevel", value: function(e3) {
  61318. if (e3 <= 0) {
  61319. var t2 = this.getErrorMessage("TIM_ASCII_ART");
  61320. t2 && formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", t2);
  61321. var n2 = this.getErrorMessage("API_REFER");
  61322. if (n2) {
  61323. Kt() ? formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "%c ".concat("IM SDK API ->", " %c"), "background:#ff9d00; padding:1px; border-radius:3px; color: #fff", "background:transparent", n2) : formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "IM SDK API ->", n2);
  61324. }
  61325. var o2 = this.getErrorMessage("DOCS_GUIDE");
  61326. o2 && formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", o2);
  61327. }
  61328. Ve.setLevel(e3);
  61329. } }, { key: "createTextMessage", value: function(e3) {
  61330. return this._getModule(Nn).createTextMessage(e3);
  61331. } }, { key: "createTextAtMessage", value: function(e3) {
  61332. return this._getModule(Nn).createTextMessage(e3);
  61333. } }, { key: "createImageMessage", value: function(e3) {
  61334. return this._getModule(Nn).createImageMessage(e3);
  61335. } }, { key: "createAudioMessage", value: function(e3) {
  61336. return this._getModule(Nn).createAudioMessage(e3);
  61337. } }, { key: "createVideoMessage", value: function(e3) {
  61338. return this._getModule(Nn).createVideoMessage(e3);
  61339. } }, { key: "createCustomMessage", value: function(e3) {
  61340. return this._getModule(Nn).createCustomMessage(e3);
  61341. } }, { key: "createFaceMessage", value: function(e3) {
  61342. return this._getModule(Nn).createFaceMessage(e3);
  61343. } }, { key: "createFileMessage", value: function(e3) {
  61344. return this._getModule(Nn).createFileMessage(e3);
  61345. } }, { key: "createLocationMessage", value: function(e3) {
  61346. return this._getModule(Nn).createLocationMessage(e3);
  61347. } }, { key: "createMergerMessage", value: function(e3) {
  61348. return this._getModule(Nn).createMergerMessage(e3);
  61349. } }, { key: "downloadMergerMessage", value: function(e3) {
  61350. return e3.type !== E.MSG_MERGER ? Za({ code: ha.MESSAGE_MERGER_TYPE_INVALID }) : zt(e3.payload.downloadKey) ? Za({ code: ha.MESSAGE_MERGER_KEY_INVALID }) : this._getModule(Nn).downloadMergerMessage(e3).catch(function(e4) {
  61351. return Za({ code: ha.MESSAGE_MERGER_DOWNLOAD_FAIL });
  61352. });
  61353. } }, { key: "createForwardMessage", value: function(e3) {
  61354. return this._getModule(Nn).createForwardMessage(e3);
  61355. } }, { key: "sendMessage", value: function(e3, t2) {
  61356. return e3 instanceof Wa ? this._getModule(Nn).sendMessageInstance(e3, t2) : Za({ code: ha.MESSAGE_SEND_NEED_MESSAGE_INSTANCE });
  61357. } }, { key: "callExperimentalAPI", value: function(e3, t2) {
  61358. return "sendComboMessage" === e3 ? this._getModule(ao).sendMessage(t2) : "handleGroupInvitation" === e3 ? this._getModule(Pn).handleGroupInvitation(t2) : "isCommercialAbilityEnabled" === e3 ? this._getModule(to).isFeatureEnabled(t2) : "isIntl" === e3 ? this.isIntl() : "sendTRTCCustomData" === e3 ? this._getModule(so).sendTRTCCustomData(t2) : "getTimerID" === e3 ? this._m.getTimerID() : "getPollingTimerID" === e3 ? this._m.getPollingTimerID(t2) : Za({ code: ha.INVALID_OPERATION });
  61359. } }, { key: "revokeMessage", value: function(e3) {
  61360. return this._getModule(Nn).revokeMessage(e3);
  61361. } }, { key: "resendMessage", value: function(e3) {
  61362. return this._getModule(Nn).resendMessage(e3);
  61363. } }, { key: "deleteMessage", value: function(e3) {
  61364. return this._getModule(Nn).deleteMessage(e3);
  61365. } }, { key: "translateText", value: function(e3) {
  61366. return this._getModule(Nn).translateText(e3);
  61367. } }, { key: "setMessageExtensions", value: function(e3, t2) {
  61368. return this._getModule(On).setMessageExtensions(e3, t2);
  61369. } }, { key: "getMessageExtensions", value: function(e3) {
  61370. return this._getModule(On).getMessageExtensions(e3);
  61371. } }, { key: "deleteMessageExtensions", value: function(e3, t2) {
  61372. return this._getModule(On).deleteMessageExtensions(e3, t2);
  61373. } }, { key: "modifyMessage", value: function(e3) {
  61374. return this._getModule(Nn).modifyRemoteMessage(e3);
  61375. } }, { key: "getMessageList", value: function(e3) {
  61376. return this._getModule(qn).getMessageList(e3);
  61377. } }, { key: "getMessageListHopping", value: function(e3) {
  61378. return this._getModule(qn).getMessageListHopping(e3);
  61379. } }, { key: "sendMessageReadReceipt", value: function(e3) {
  61380. return this._getModule(qn).sendReadReceipt(e3);
  61381. } }, { key: "getMessageReadReceiptList", value: function(e3) {
  61382. return this._getModule(qn).getReadReceiptList(e3);
  61383. } }, { key: "getGroupMessageReadMemberList", value: function(e3) {
  61384. return this._getModule(Pn).getReadReceiptDetail(e3);
  61385. } }, { key: "findMessage", value: function(e3) {
  61386. return this._getModule(qn).findMessage(e3);
  61387. } }, { key: "setMessageRead", value: function(e3) {
  61388. return this._getModule(qn).setMessageRead(e3);
  61389. } }, { key: "getConversationList", value: function(e3) {
  61390. return this._getModule(qn).getConversationList(e3);
  61391. } }, { key: "getConversationProfile", value: function(e3) {
  61392. return this._getModule(qn).getConversationProfile(e3);
  61393. } }, { key: "deleteConversation", value: function(e3) {
  61394. return this._getModule(qn).deleteConversation(e3);
  61395. } }, { key: "clearHistoryMessage", value: function(e3) {
  61396. return this._getModule(qn).clearHistoryMessage(e3);
  61397. } }, { key: "pinConversation", value: function(e3) {
  61398. return this._getModule(qn).pinConversation(e3);
  61399. } }, { key: "setAllMessageRead", value: function(e3) {
  61400. return this._getModule(qn).setAllMessageRead(e3);
  61401. } }, { key: "setMessageRemindType", value: function(e3) {
  61402. return this._getModule(qn).setMessageRemindType(e3);
  61403. } }, { key: "getTotalUnreadMessageCount", value: function() {
  61404. return this._getModule(qn).getTotalUnreadMessageCount();
  61405. } }, { key: "setConversationCustomData", value: function(e3) {
  61406. return this._getModule(qn).setConversationCustomData(e3);
  61407. } }, { key: "markConversation", value: function(e3) {
  61408. return this._getModule(qn).markConversation(e3);
  61409. } }, { key: "getConversationGroupList", value: function() {
  61410. return this._getModule(qn).getConversationGroupList();
  61411. } }, { key: "createConversationGroup", value: function(e3) {
  61412. return this._getModule(qn).createConversationGroup(e3);
  61413. } }, { key: "deleteConversationGroup", value: function(e3) {
  61414. return this._getModule(qn).deleteConversationGroup(e3);
  61415. } }, { key: "renameConversationGroup", value: function(e3) {
  61416. return this._getModule(qn).renameConversationGroup(e3);
  61417. } }, { key: "addConversationsToGroup", value: function(e3) {
  61418. return this._getModule(qn).addConversationsToGroup(e3);
  61419. } }, { key: "deleteConversationsFromGroup", value: function(e3) {
  61420. return this._getModule(qn).deleteConversationsFromGroup(e3);
  61421. } }, { key: "getMyProfile", value: function() {
  61422. return this._getModule(Gn).getMyProfile();
  61423. } }, { key: "getUserProfile", value: function(e3) {
  61424. return this._getModule(Gn).getUserProfile(e3);
  61425. } }, { key: "updateMyProfile", value: function(e3) {
  61426. return this._getModule(Gn).updateMyProfile(e3);
  61427. } }, { key: "getBlacklist", value: function() {
  61428. return this._getModule(Gn).getLocalBlacklist();
  61429. } }, { key: "addToBlacklist", value: function(e3) {
  61430. return this._getModule(Gn).addBlacklist(e3);
  61431. } }, { key: "removeFromBlacklist", value: function(e3) {
  61432. return this._getModule(Gn).deleteBlacklist(e3);
  61433. } }, { key: "setSelfStatus", value: function(e3) {
  61434. return this._getModule(Gn).setSelfStatus(e3);
  61435. } }, { key: "getUserStatus", value: function(e3) {
  61436. return this._getModule(Gn).getUserStatus(e3);
  61437. } }, { key: "subscribeUserStatus", value: function(e3) {
  61438. return this._getModule(Gn).subscribeUserStatus(e3);
  61439. } }, { key: "unsubscribeUserStatus", value: function(e3) {
  61440. return this._getModule(Gn).unsubscribeUserStatus(e3);
  61441. } }, { key: "getFriendList", value: function() {
  61442. var e3 = this._getModule(bn);
  61443. return e3 ? e3.getLocalFriendList() : Za({ code: ha.CANNOT_FIND_MODULE });
  61444. } }, { key: "addFriend", value: function(e3) {
  61445. var t2 = this._getModule(bn);
  61446. return t2 ? t2.addFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61447. } }, { key: "deleteFriend", value: function(e3) {
  61448. var t2 = this._getModule(bn);
  61449. return t2 ? t2.deleteFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61450. } }, { key: "checkFriend", value: function(e3) {
  61451. var t2 = this._getModule(bn);
  61452. return t2 ? t2.checkFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61453. } }, { key: "getFriendProfile", value: function(e3) {
  61454. var t2 = this._getModule(bn);
  61455. return t2 ? t2.getFriendProfile(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61456. } }, { key: "updateFriend", value: function(e3) {
  61457. var t2 = this._getModule(bn);
  61458. return t2 ? t2.updateFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61459. } }, { key: "getFriendApplicationList", value: function() {
  61460. var e3 = this._getModule(bn);
  61461. return e3 ? e3.getLocalFriendApplicationList() : Za({ code: ha.CANNOT_FIND_MODULE });
  61462. } }, { key: "acceptFriendApplication", value: function(e3) {
  61463. var t2 = this._getModule(bn);
  61464. return t2 ? t2.acceptFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61465. } }, { key: "refuseFriendApplication", value: function(e3) {
  61466. var t2 = this._getModule(bn);
  61467. return t2 ? t2.refuseFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61468. } }, { key: "deleteFriendApplication", value: function(e3) {
  61469. var t2 = this._getModule(bn);
  61470. return t2 ? t2.deleteFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61471. } }, { key: "setFriendApplicationRead", value: function() {
  61472. var e3 = this._getModule(bn);
  61473. return e3 ? e3.setFriendApplicationRead() : Za({ code: ha.CANNOT_FIND_MODULE });
  61474. } }, { key: "getFriendGroupList", value: function() {
  61475. var e3 = this._getModule(bn);
  61476. return e3 ? e3.getLocalFriendGroupList() : Za({ code: ha.CANNOT_FIND_MODULE });
  61477. } }, { key: "createFriendGroup", value: function(e3) {
  61478. var t2 = this._getModule(bn);
  61479. return t2 ? t2.createFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61480. } }, { key: "deleteFriendGroup", value: function(e3) {
  61481. var t2 = this._getModule(bn);
  61482. return t2 ? t2.deleteFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61483. } }, { key: "addToFriendGroup", value: function(e3) {
  61484. var t2 = this._getModule(bn);
  61485. return t2 ? t2.addToFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61486. } }, { key: "removeFromFriendGroup", value: function(e3) {
  61487. var t2 = this._getModule(bn);
  61488. return t2 ? t2.removeFromFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61489. } }, { key: "renameFriendGroup", value: function(e3) {
  61490. var t2 = this._getModule(bn);
  61491. return t2 ? t2.renameFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
  61492. } }, { key: "getGroupList", value: function(e3) {
  61493. return this._getModule(Pn).getGroupList(e3);
  61494. } }, { key: "getGroupProfile", value: function(e3) {
  61495. return this._getModule(Pn).getGroupProfile(e3);
  61496. } }, { key: "createGroup", value: function(e3) {
  61497. return this._getModule(Pn).createGroup(e3);
  61498. } }, { key: "dismissGroup", value: function(e3) {
  61499. return this._getModule(Pn).dismissGroup(e3);
  61500. } }, { key: "updateGroupProfile", value: function(e3) {
  61501. return this._getModule(Pn).updateGroupProfile(e3);
  61502. } }, { key: "joinGroup", value: function(e3) {
  61503. return this._getModule(Pn).joinGroup(e3);
  61504. } }, { key: "quitGroup", value: function(e3) {
  61505. return this._getModule(Pn).quitGroup(e3);
  61506. } }, { key: "searchGroupByID", value: function(e3) {
  61507. return this._getModule(Pn).searchGroupByID(e3);
  61508. } }, { key: "getGroupOnlineMemberCount", value: function(e3) {
  61509. return this._getModule(Pn).getGroupOnlineMemberCount(e3);
  61510. } }, { key: "changeGroupOwner", value: function(e3) {
  61511. return this._getModule(Pn).changeGroupOwner(e3);
  61512. } }, { key: "getGroupApplicationList", value: function() {
  61513. return this._getModule(Pn).getGroupApplicationList();
  61514. } }, { key: "handleGroupApplication", value: function(e3) {
  61515. return this._getModule(Pn).handleGroupApplication(e3);
  61516. } }, { key: "initGroupAttributes", value: function(e3) {
  61517. return this._getModule(Pn).initGroupAttributes(e3);
  61518. } }, { key: "setGroupAttributes", value: function(e3) {
  61519. return this._getModule(Pn).setGroupAttributes(e3);
  61520. } }, { key: "deleteGroupAttributes", value: function(e3) {
  61521. return this._getModule(Pn).deleteGroupAttributes(e3);
  61522. } }, { key: "getGroupAttributes", value: function(e3) {
  61523. return this._getModule(Pn).getGroupAttributes(e3);
  61524. } }, { key: "setGroupCounters", value: function(e3) {
  61525. return this._getModule(Pn).setGroupCounters(e3);
  61526. } }, { key: "increaseGroupCounter", value: function(e3) {
  61527. return this._getModule(Pn).increaseGroupCounter(e3);
  61528. } }, { key: "decreaseGroupCounter", value: function(e3) {
  61529. return this._getModule(Pn).decreaseGroupCounter(e3);
  61530. } }, { key: "getGroupCounters", value: function(e3) {
  61531. return this._getModule(Pn).getGroupCounters(e3);
  61532. } }, { key: "getGroupMemberList", value: function(e3) {
  61533. return this._getModule(wn).getGroupMemberList(e3);
  61534. } }, { key: "getGroupMemberProfile", value: function(e3) {
  61535. return this._getModule(wn).getGroupMemberProfile(e3);
  61536. } }, { key: "addGroupMember", value: function(e3) {
  61537. return this._getModule(wn).addGroupMember(e3);
  61538. } }, { key: "deleteGroupMember", value: function(e3) {
  61539. return this._getModule(wn).deleteGroupMember(e3);
  61540. } }, { key: "setGroupMemberMuteTime", value: function(e3) {
  61541. return this._getModule(wn).setGroupMemberMuteTime(e3);
  61542. } }, { key: "setGroupMemberRole", value: function(e3) {
  61543. return this._getModule(wn).setGroupMemberRole(e3);
  61544. } }, { key: "setGroupMemberNameCard", value: function(e3) {
  61545. return this._getModule(wn).setGroupMemberNameCard(e3);
  61546. } }, { key: "setGroupMemberCustomField", value: function(e3) {
  61547. return this._getModule(wn).setGroupMemberCustomField(e3);
  61548. } }, { key: "markGroupMemberList", value: function(e3) {
  61549. return this._getModule(wn).markGroupMemberList(e3);
  61550. } }, { key: "getJoinedCommunityList", value: function() {
  61551. return this._getModule(Fn).getJoinedCommunityList();
  61552. } }, { key: "createTopicInCommunity", value: function(e3) {
  61553. return this._getModule(Fn).createTopicInCommunity(e3);
  61554. } }, { key: "deleteTopicFromCommunity", value: function(e3) {
  61555. return this._getModule(Fn).deleteTopicFromCommunity(e3);
  61556. } }, { key: "updateTopicProfile", value: function(e3) {
  61557. return this._getModule(Fn).updateTopicProfile(e3);
  61558. } }, { key: "getTopicList", value: function(e3) {
  61559. return this._getModule(Fn).getTopicList(e3);
  61560. } }]), e2;
  61561. }(), tc = { login: 1, logout: 1, destroy: 1, on: 1, off: 1, ready: 1, setLogLevel: 1, joinGroup: 1, quitGroup: 1, registerPlugin: 1, getGroupOnlineMemberCount: 1 };
  61562. function nc(e2, t2) {
  61563. if (e2.isReady() || 1 === tc[t2])
  61564. return true;
  61565. var n2 = e2.getNotReadyReason(), o2 = { code: n2, message: "".concat(e2.getErrorMessage(n2), " | ").concat(t2, " | ").concat(e2.getErrorMessage(ha.SDK_IS_NOT_READY)) };
  61566. return e2.onError(o2), o2;
  61567. }
  61568. var oc = {}, sc = {};
  61569. return sc.create = function(e2) {
  61570. var n2 = 0, o2 = e2.SDKAppID;
  61571. if (et(o2))
  61572. n2 = o2;
  61573. else if (n2 = parseInt(o2), isNaN(o2))
  61574. return Ve.e("".concat("TIM.create", " failed. Failed to parse the SDKAppID, please check the arguments")), null;
  61575. if (n2 && oc[n2])
  61576. return oc[n2];
  61577. Ve.l("".concat("TIM.create"));
  61578. var s2 = new ec(t(t({}, e2), {}, { SDKAppID: n2 }));
  61579. s2.on(k.SDK_DESTROY, function(e3) {
  61580. oc[e3.data.SDKAppID] = null, delete oc[e3.data.SDKAppID];
  61581. });
  61582. var a2 = function(e3) {
  61583. var t2 = /* @__PURE__ */ Object.create(null);
  61584. return Object.keys(An).forEach(function(n3) {
  61585. if (e3[n3]) {
  61586. var o3 = new S();
  61587. t2[n3] = function() {
  61588. var t3 = Array.from(arguments);
  61589. return o3.use(function(t4, o4) {
  61590. var s3 = nc(e3, n3);
  61591. return true === s3 ? o4() : Za(s3);
  61592. }).use(function(e4, t4) {
  61593. if (true === Jt(e4, Ln[n3], n3))
  61594. return t4();
  61595. }).use(function(t4, o4) {
  61596. return e3[n3].apply(e3, t4);
  61597. }), o3.run(t3);
  61598. };
  61599. }
  61600. }), t2;
  61601. }(s2);
  61602. return oc[n2] = a2, Ln.hookGetAPITips(s2.getErrorMessage.bind(s2)), Ve.l("".concat("TIM.create", " ok")), a2;
  61603. }, sc.TYPES = E, sc.EVENT = k, sc.VERSION = "2.27.6", Ve.l("TIM.VERSION:".concat(sc.VERSION)), sc;
  61604. });
  61605. })(timWx);
  61606. var timWxExports = timWx.exports;
  61607. const TIM = /* @__PURE__ */ getDefaultExportFromCjs(timWxExports);
  61608. var timUploadPlugin = { exports: {} };
  61609. (function(module, exports) {
  61610. var factory;
  61611. factory = function() {
  61612. function e(e2, t2) {
  61613. var n2 = Object.keys(e2);
  61614. if (Object.getOwnPropertySymbols) {
  61615. var o2 = Object.getOwnPropertySymbols(e2);
  61616. t2 && (o2 = o2.filter(function(t3) {
  61617. return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
  61618. })), n2.push.apply(n2, o2);
  61619. }
  61620. return n2;
  61621. }
  61622. function t(t2) {
  61623. for (var n2 = 1; n2 < arguments.length; n2++) {
  61624. var o2 = null != arguments[n2] ? arguments[n2] : {};
  61625. n2 % 2 ? e(Object(o2), true).forEach(function(e2) {
  61626. s(t2, e2, o2[e2]);
  61627. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(o2)) : e(Object(o2)).forEach(function(e2) {
  61628. Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(o2, e2));
  61629. });
  61630. }
  61631. return t2;
  61632. }
  61633. function n(e2) {
  61634. return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
  61635. return typeof e3;
  61636. } : function(e3) {
  61637. return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
  61638. })(e2);
  61639. }
  61640. function o(e2, t2) {
  61641. if (!(e2 instanceof t2))
  61642. throw new TypeError("Cannot call a class as a function");
  61643. }
  61644. function r(e2, t2) {
  61645. for (var n2 = 0; n2 < t2.length; n2++) {
  61646. var o2 = t2[n2];
  61647. o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2);
  61648. }
  61649. }
  61650. function a(e2, t2, n2) {
  61651. return t2 && r(e2.prototype, t2), n2 && r(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2;
  61652. }
  61653. function s(e2, t2, n2) {
  61654. return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
  61655. }
  61656. function i(e2, t2) {
  61657. if (null == e2)
  61658. return {};
  61659. var n2, o2, r2 = function(e3, t3) {
  61660. if (null == e3)
  61661. return {};
  61662. var n3, o3, r3 = {}, a3 = Object.keys(e3);
  61663. for (o3 = 0; o3 < a3.length; o3++)
  61664. n3 = a3[o3], t3.indexOf(n3) >= 0 || (r3[n3] = e3[n3]);
  61665. return r3;
  61666. }(e2, t2);
  61667. if (Object.getOwnPropertySymbols) {
  61668. var a2 = Object.getOwnPropertySymbols(e2);
  61669. for (o2 = 0; o2 < a2.length; o2++)
  61670. n2 = a2[o2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (r2[n2] = e2[n2]);
  61671. }
  61672. return r2;
  61673. }
  61674. var f = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting), u = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), l = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), c = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), y = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), d = "undefined" != typeof uni && "undefined" == typeof window && "function" == typeof requireNativePlugin, p = d && "ios" === uni.getDeviceInfo().platform.toLocaleLowerCase(), g = (d && uni.getDeviceInfo().platform.toLocaleLowerCase(), f || u || l || c || y || d), m = u ? qq : l ? tt : c ? swan : y ? my : f ? wx : d ? uni : {}, h = function(e2) {
  61675. if ("object" !== n(e2) || null === e2)
  61676. return false;
  61677. var t2 = Object.getPrototypeOf(e2);
  61678. if (null === t2)
  61679. return true;
  61680. for (var o2 = t2; null !== Object.getPrototypeOf(o2); )
  61681. o2 = Object.getPrototypeOf(o2);
  61682. return t2 === o2;
  61683. };
  61684. function v(e2) {
  61685. if (null == e2)
  61686. return true;
  61687. if ("boolean" == typeof e2)
  61688. return false;
  61689. if ("number" == typeof e2)
  61690. return 0 === e2;
  61691. if ("string" == typeof e2)
  61692. return 0 === e2.length;
  61693. if ("function" == typeof e2)
  61694. return 0 === e2.length;
  61695. if (Array.isArray(e2))
  61696. return 0 === e2.length;
  61697. if (e2 instanceof Error)
  61698. return "" === e2.message;
  61699. if (h(e2)) {
  61700. for (var t2 in e2)
  61701. if (Object.prototype.hasOwnProperty.call(e2, t2))
  61702. return false;
  61703. return true;
  61704. }
  61705. return false;
  61706. }
  61707. var b = function() {
  61708. function e2() {
  61709. o(this, e2);
  61710. }
  61711. return a(e2, [{ key: "request", value: function(e3, t2) {
  61712. var n2 = this, o2 = e3.downloadUrl || "", r2 = (e3.method || "PUT").toUpperCase(), a2 = e3.url;
  61713. if (e3.qs) {
  61714. var s2 = function(e4) {
  61715. var t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "&", n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "=";
  61716. return v(e4) ? "" : h(e4) ? Object.keys(e4).map(function(o3) {
  61717. var r3 = encodeURIComponent(o3) + n3;
  61718. return Array.isArray(e4[o3]) ? e4[o3].map(function(e5) {
  61719. return r3 + encodeURIComponent(e5);
  61720. }).join(t3) : r3 + encodeURIComponent(e4[o3]);
  61721. }).filter(Boolean).join(t3) : void 0;
  61722. }(e3.qs);
  61723. s2 && (a2 += "".concat(-1 === a2.indexOf("?") ? "?" : "&").concat(s2));
  61724. }
  61725. var i2 = new XMLHttpRequest();
  61726. i2.open(r2, a2, true), i2.responseType = e3.dataType || "text";
  61727. var f2 = e3.headers || {};
  61728. if (!v(f2))
  61729. for (var u2 in f2)
  61730. f2.hasOwnProperty(u2) && "content-length" !== u2.toLowerCase() && "user-agent" !== u2.toLowerCase() && "origin" !== u2.toLowerCase() && "host" !== u2.toLowerCase() && i2.setRequestHeader(u2, f2[u2]);
  61731. return i2.onload = function() {
  61732. if (200 === i2.status)
  61733. t2(null, n2._xhrRes(i2, n2._xhrBody(i2, o2)));
  61734. else {
  61735. var e4 = { code: i2.status, message: JSON.stringify(i2.responseText) };
  61736. t2(e4, n2._xhrRes(i2, n2._xhrBody(i2)));
  61737. }
  61738. }, i2.onerror = function(e4) {
  61739. var o3 = n2._xhrBody(i2), r3 = { code: i2.status, message: JSON.stringify(i2.responseText) };
  61740. o3 || i2.statusText || 0 !== i2.status || (e4.message = "CORS blocked or network error"), t2(r3, n2._xhrRes(i2, o3)), r3 = null;
  61741. }, e3.onProgress && i2.upload && (i2.upload.onprogress = function(t3) {
  61742. var n3 = t3.total, o3 = t3.loaded, r3 = Math.floor(100 * o3 / n3);
  61743. e3.onProgress({ total: n3, loaded: o3, percent: (r3 >= 100 ? 100 : r3) / 100 });
  61744. }), i2.send(e3.resources), i2;
  61745. } }, { key: "_xhrRes", value: function(e3, t2) {
  61746. var n2 = {};
  61747. return e3.getAllResponseHeaders().trim().split("\n").forEach(function(e4) {
  61748. if (e4) {
  61749. var t3 = e4.indexOf(":"), o2 = e4.substr(0, t3).trim().toLowerCase(), r2 = e4.substr(t3 + 1).trim();
  61750. n2[o2] = r2;
  61751. }
  61752. }), { statusCode: e3.status, statusMessage: e3.statusText, headers: n2, data: t2 };
  61753. } }, { key: "_xhrBody", value: function(e3, t2) {
  61754. return 200 === e3.status && t2 ? { location: t2 } : { response: e3.responseText };
  61755. } }]), e2;
  61756. }(), O = ["unknown", "image", "video", "audio", "log"], w = ["name"], S = function() {
  61757. function e2() {
  61758. o(this, e2);
  61759. }
  61760. return a(e2, [{ key: "request", value: function(e3, n2) {
  61761. var o2 = this, r2 = e3.resources, a2 = void 0 === r2 ? "" : r2, s2 = e3.headers, f2 = void 0 === s2 ? {} : s2, u2 = e3.url, l2 = e3.downloadUrl, c2 = void 0 === l2 ? "" : l2, d2 = u2, g2 = null, h2 = c2.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/), v2 = decodeURIComponent(h2[3]), b2 = { key: v2.indexOf("?") > -1 ? v2.split("?")[0] : v2, success_action_status: 200, "Content-Type": "" }, S2 = {};
  61762. if (p) {
  61763. var C = u2.split("?sign=");
  61764. if (C.length > 1) {
  61765. var P = C[1];
  61766. d2 = "".concat(C[0], "?sign=").concat(encodeURIComponent("".concat(P))), S2.sign = decodeURIComponent(P), S2.signature = decodeURIComponent(P);
  61767. }
  61768. }
  61769. var j = { url: d2, header: f2, name: "file", filePath: a2, formData: t(t({}, b2), S2), timeout: e3.timeout || 3e5 };
  61770. if (y) {
  61771. var x = j;
  61772. x.name, j = t(t({}, i(x, w)), {}, { fileName: "file", fileType: O[e3.fileType] });
  61773. }
  61774. return (g2 = m.uploadFile(t(t({}, j), {}, { success: function(e4) {
  61775. o2._handleResponse({ response: e4, downloadUrl: c2, callback: n2 });
  61776. }, fail: function(e4) {
  61777. o2._handleResponse({ response: e4, downloadUrl: c2, callback: n2 });
  61778. } }))).onProgressUpdate && g2.onProgressUpdate(function(t2) {
  61779. e3.onProgress && e3.onProgress({ total: t2.totalBytesExpectedToSend, loaded: t2.totalBytesSent, percent: Math.floor(t2.progress) / 100 });
  61780. }), g2;
  61781. } }, { key: "_handleResponse", value: function(e3) {
  61782. var n2 = e3.downloadUrl, o2 = e3.response, r2 = e3.callback, a2 = o2.header, s2 = {};
  61783. if (a2)
  61784. for (var i2 in a2)
  61785. a2.hasOwnProperty(i2) && (s2[i2.toLowerCase()] = a2[i2]);
  61786. var f2 = +o2.statusCode;
  61787. 200 === f2 ? r2(null, { statusCode: f2, headers: s2, data: t(t({}, o2.data), {}, { location: n2 }) }) : r2({ code: f2, message: JSON.stringify(o2.data) }, { statusCode: f2, headers: s2, data: void 0 });
  61788. } }]), e2;
  61789. }();
  61790. return function() {
  61791. function e2() {
  61792. o(this, e2), formatAppLog("log", "at node_modules/tim-upload-plugin/index.js:1", "TIMUploadPlugin.VERSION: ".concat("1.2.0")), this.retry = 1, this.tryCount = 0, this.systemClockOffset = 0, this.httpRequest = g ? new S() : new b();
  61793. }
  61794. return a(e2, [{ key: "uploadFile", value: function(e3, t2) {
  61795. var n2 = this;
  61796. return this.httpRequest.request(e3, function(o2, r2) {
  61797. o2 && n2.tryCount < n2.retry && n2.allowRetry(o2) ? (n2.tryCount++, n2.uploadFile(e3, t2)) : (n2.tryCount = 0, t2(o2, r2));
  61798. });
  61799. } }, { key: "allowRetry", value: function(e3) {
  61800. var t2 = false, n2 = false;
  61801. if (e3) {
  61802. var o2 = e3.headers && (e3.headers.date || e3.headers.Date) || e3.error && e3.error.ServerTime;
  61803. try {
  61804. var r2 = e3.error && e3.error.Code, a2 = e3.error && e3.error.Message;
  61805. ("RequestTimeTooSkewed" === r2 || "AccessDenied" === r2 && "Request has expired" === a2) && (n2 = true);
  61806. } catch (f2) {
  61807. }
  61808. if (n2 && o2) {
  61809. var s2 = Date.now(), i2 = Date.parse(o2);
  61810. Math.abs(s2 + this.systemClockOffset - i2) >= 3e4 && (this.systemClockOffset = i2 - s2, t2 = true);
  61811. } else
  61812. 5 === Math.floor(e3.statusCode / 100) && (t2 = true);
  61813. }
  61814. return t2;
  61815. } }]), e2;
  61816. }();
  61817. }, module.exports = factory();
  61818. })(timUploadPlugin);
  61819. var timUploadPluginExports = timUploadPlugin.exports;
  61820. const TIMUploadPlugin = /* @__PURE__ */ getDefaultExportFromCjs(timUploadPluginExports);
  61821. var aegis_min = { exports: {} };
  61822. (function(module, exports) {
  61823. !function(e, t) {
  61824. module.exports = t();
  61825. }(commonjsGlobal, function() {
  61826. var n = function(e2, t2) {
  61827. return (n = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? function(e3, t3) {
  61828. e3.__proto__ = t3;
  61829. } : function(e3, t3) {
  61830. for (var n2 in t3)
  61831. Object.prototype.hasOwnProperty.call(t3, n2) && (e3[n2] = t3[n2]);
  61832. }))(e2, t2);
  61833. }, u = function() {
  61834. return (u = Object.assign || function(e2) {
  61835. for (var t2, n2 = 1, o2 = arguments.length; n2 < o2; n2++)
  61836. for (var i2 in t2 = arguments[n2])
  61837. Object.prototype.hasOwnProperty.call(t2, i2) && (e2[i2] = t2[i2]);
  61838. return e2;
  61839. }).apply(this, arguments);
  61840. };
  61841. function s(e2, s2, l2, a2) {
  61842. return new (l2 = l2 || Promise)(function(n2, t2) {
  61843. function o2(e3) {
  61844. try {
  61845. r2(a2.next(e3));
  61846. } catch (e4) {
  61847. t2(e4);
  61848. }
  61849. }
  61850. function i2(e3) {
  61851. try {
  61852. r2(a2.throw(e3));
  61853. } catch (e4) {
  61854. t2(e4);
  61855. }
  61856. }
  61857. function r2(e3) {
  61858. var t3;
  61859. e3.done ? n2(e3.value) : ((t3 = e3.value) instanceof l2 ? t3 : new l2(function(e4) {
  61860. e4(t3);
  61861. })).then(o2, i2);
  61862. }
  61863. r2((a2 = a2.apply(e2, s2 || [])).next());
  61864. });
  61865. }
  61866. function f(o2, i2) {
  61867. var r2, s2, l2, a2 = { label: 0, sent: function() {
  61868. if (1 & l2[0])
  61869. throw l2[1];
  61870. return l2[1];
  61871. }, trys: [], ops: [] }, e2 = { next: t2(0), throw: t2(1), return: t2(2) };
  61872. return "function" == typeof Symbol && (e2[Symbol.iterator] = function() {
  61873. return this;
  61874. }), e2;
  61875. function t2(n2) {
  61876. return function(e3) {
  61877. var t3 = [n2, e3];
  61878. if (r2)
  61879. throw new TypeError("Generator is already executing.");
  61880. for (; a2; )
  61881. try {
  61882. if (r2 = 1, s2 && (l2 = 2 & t3[0] ? s2.return : t3[0] ? s2.throw || ((l2 = s2.return) && l2.call(s2), 0) : s2.next) && !(l2 = l2.call(s2, t3[1])).done)
  61883. return l2;
  61884. switch (s2 = 0, (t3 = l2 ? [2 & t3[0], l2.value] : t3)[0]) {
  61885. case 0:
  61886. case 1:
  61887. l2 = t3;
  61888. break;
  61889. case 4:
  61890. return a2.label++, { value: t3[1], done: false };
  61891. case 5:
  61892. a2.label++, s2 = t3[1], t3 = [0];
  61893. continue;
  61894. case 7:
  61895. t3 = a2.ops.pop(), a2.trys.pop();
  61896. continue;
  61897. default:
  61898. if (!((l2 = 0 < (l2 = a2.trys).length && l2[l2.length - 1]) || 6 !== t3[0] && 2 !== t3[0])) {
  61899. a2 = 0;
  61900. continue;
  61901. }
  61902. if (3 === t3[0] && (!l2 || t3[1] > l2[0] && t3[1] < l2[3]))
  61903. a2.label = t3[1];
  61904. else if (6 === t3[0] && a2.label < l2[1])
  61905. a2.label = l2[1], l2 = t3;
  61906. else {
  61907. if (!(l2 && a2.label < l2[2])) {
  61908. l2[2] && a2.ops.pop(), a2.trys.pop();
  61909. continue;
  61910. }
  61911. a2.label = l2[2], a2.ops.push(t3);
  61912. }
  61913. }
  61914. t3 = i2.call(o2, a2);
  61915. } catch (e4) {
  61916. t3 = [6, e4], s2 = 0;
  61917. } finally {
  61918. r2 = l2 = 0;
  61919. }
  61920. if (5 & t3[0])
  61921. throw t3[1];
  61922. return { value: t3[0] ? t3[1] : void 0, done: true };
  61923. };
  61924. }
  61925. }
  61926. function l() {
  61927. for (var e2 = 0, t2 = 0, n2 = arguments.length; t2 < n2; t2++)
  61928. e2 += arguments[t2].length;
  61929. for (var o2 = Array(e2), i2 = 0, t2 = 0; t2 < n2; t2++)
  61930. for (var r2 = arguments[t2], s2 = 0, l2 = r2.length; s2 < l2; s2++, i2++)
  61931. o2[i2] = r2[s2];
  61932. return o2;
  61933. }
  61934. Object.assign || Object.defineProperty(Object, "assign", { enumerable: false, configurable: true, writable: true, value: function(e2) {
  61935. if (null == e2)
  61936. throw new TypeError("Cannot convert first argument to object");
  61937. for (var t2 = Object(e2), n2 = 1; n2 < arguments.length; n2++)
  61938. if (null != (o2 = arguments[n2]))
  61939. for (var o2 = Object(o2), i2 = Object.keys(Object(o2)), r2 = 0, s2 = i2.length; r2 < s2; r2++) {
  61940. var l2 = i2[r2], a2 = Object.getOwnPropertyDescriptor(o2, l2);
  61941. null != a2 && a2.enumerable && (t2[l2] = o2[l2]);
  61942. }
  61943. return t2;
  61944. } });
  61945. var o, q = ["/collect/offlineAuto", "/aegis-sdk", "/flog.core.min.js", "pingfore.qq.com/pingd", "h.trace.qq.com/kv", "beacon.qq.com", "dmplog.qq.com", "qq.com/report", "report.qqweb.qq.com", "tpstelemetry.tencent.com", "insight.cloud.tencent.com", "www.googletagmanager.com", "report.idqqimg.com", "google-analytics.com", "arms-retcode.aliyuncs.com", "px.effirst.com", "sentry", "hot-update.json", "u.c.b.r.o.w.s.e.r", "report.url.cn", "sockjs-node"], p = ["ext1", "ext2", "ext3", "level", "trace", "tag", "seq", "code"], D = ["static", "fetch"], k = (e.prototype.indexOf = function(e2, t2) {
  61946. for (var n2 = 0; n2 < e2.length; n2++)
  61947. if (e2[n2].callback === t2)
  61948. return n2;
  61949. return -1;
  61950. }, e.prototype.on = function(e2, t2, n2) {
  61951. var o2;
  61952. if (void 0 === n2 && (n2 = 0), this)
  61953. return (o2 = this.eventsList[e2]) || (this.eventsList[e2] = [], o2 = this.eventsList[e2]), -1 === this.indexOf(o2, t2) && o2.push({ name: e2, type: n2 || 0, callback: t2 }), this;
  61954. }, e.prototype.one = function(e2, t2) {
  61955. this.on(e2, t2, 1);
  61956. }, e.prototype.remove = function(e2, t2) {
  61957. if (this) {
  61958. var n2 = this.eventsList[e2];
  61959. if (n2) {
  61960. if (t2)
  61961. return n2.length && (t2 = this.indexOf(n2, t2), n2.splice(t2, 1)), this;
  61962. try {
  61963. delete this.eventsList[e2];
  61964. } catch (e3) {
  61965. }
  61966. }
  61967. return null;
  61968. }
  61969. }, e.prototype.clear = function() {
  61970. this.eventsList = {};
  61971. }, e), F = function(e2) {
  61972. if (!e2 || 0 === e2.length)
  61973. return "{}";
  61974. e2 = Array.isArray(e2) ? e2 : [e2];
  61975. var t2 = Object.keys(e2[0]), n2 = {}, o2 = (t2.forEach(function(t3) {
  61976. n2[t3] = e2.map(function(e3) {
  61977. return e3[t3];
  61978. });
  61979. }), n2.count = e2.length, n2);
  61980. if ("string" == typeof o2)
  61981. return o2;
  61982. try {
  61983. return JSON.stringify(o2, i()) || "undefined";
  61984. } catch (o3) {
  61985. return "error happen when aegis stringify: \n " + o3.message + " \n " + o3.stack;
  61986. }
  61987. };
  61988. function e() {
  61989. var s2 = this;
  61990. this.emit = function(e2, t2) {
  61991. if (s2) {
  61992. var n2;
  61993. if (null != (o2 = s2.eventsList[e2]) && o2.length)
  61994. for (var o2 = o2.slice(), i2 = 0; i2 < o2.length; i2++) {
  61995. n2 = o2[i2];
  61996. try {
  61997. var r2 = n2.callback.apply(s2, [t2]);
  61998. if (1 === n2.type && s2.remove(e2, n2.callback), false === r2)
  61999. break;
  62000. } catch (e3) {
  62001. throw e3;
  62002. }
  62003. }
  62004. return s2;
  62005. }
  62006. }, this.eventsList = {};
  62007. }
  62008. (r = o = o || {})[r.number = -1] = "number", r.string = "";
  62009. function d(e2) {
  62010. return "string" == typeof e2 && /^\//.test(e2) ? "https:" === (null === location || void 0 === location ? void 0 : location.protocol) : /^https/.test(e2);
  62011. }
  62012. function h(e2, t2, n2) {
  62013. try {
  62014. var o2 = "function" == typeof t2 ? t2(e2, null == n2 ? void 0 : n2.url) || "" : e2;
  62015. return x(o2).slice(0, 102400);
  62016. } catch (e3) {
  62017. return "";
  62018. }
  62019. }
  62020. function g(t2, e2) {
  62021. return "string" != typeof t2 || !t2 || e2 && -1 < t2.indexOf(e2) || X.test(t2) || q.some(function(e3) {
  62022. return -1 < t2.indexOf(e3);
  62023. });
  62024. }
  62025. function m(n2, o2) {
  62026. var i2, r2 = [], s2 = n2.config;
  62027. return n2.lifeCycle.on("destroy", function() {
  62028. r2.length = 0;
  62029. }), function(e2, t2) {
  62030. Array.isArray(e2) ? r2 = r2.concat(e2) : r2.push(e2), o2 && r2.length >= o2 || n2.sendNow && 0 < r2.length ? (r2 = z(r2), t2(r2.splice(0, r2.length)), i2 && clearTimeout(i2)) : (i2 && clearTimeout(i2), i2 = setTimeout(function() {
  62031. i2 = null, 0 < (r2 = z(r2)).length && t2(r2.splice(0, r2.length));
  62032. }, s2.delay));
  62033. };
  62034. }
  62035. function B(e2, t2) {
  62036. return Array.isArray(e2) ? t2(e2.map(function(e3) {
  62037. return t3 = u(u({}, e3), { msg: "string" == typeof e3.msg ? e3.msg : [].concat(e3.msg).map(w).join(" ") }), p.forEach(function(e4) {
  62038. t3[e4] || delete t3[e4];
  62039. }), t3;
  62040. var t3;
  62041. })) : t2([u(u({}, e2), { msg: "string" == typeof e2.msg ? e2.msg : w(e2.msg) })]);
  62042. }
  62043. function H(a2, c2) {
  62044. return function(e2, t2) {
  62045. var n2, o2, i2, r2 = Array.isArray(e2), s2 = r2 ? e2 : [e2], l2 = (a2.lifeCycle.emit("beforeRequest", e2), a2.config.beforeRequest);
  62046. (s2 = "function" == typeof l2 ? s2.map(function(e3) {
  62047. try {
  62048. var t3 = l2({ logs: e3, logType: c2 });
  62049. return (null == t3 ? void 0 : t3.logType) === c2 && null != t3 && t3.logs ? t3.logs : false !== t3 && e3;
  62050. } catch (t4) {
  62051. return e3;
  62052. }
  62053. }).filter(function(e3) {
  62054. return false !== e3;
  62055. }) : s2).length && (n2 = s2, e2 = p, !Array.isArray(n2) || n2.length <= 1 || (o2 = [], i2 = [], !(i2 = "string" == typeof e2 ? [e2] : e2)) || i2.length <= 0 || (i2.forEach(function(t3) {
  62056. n2.forEach(function(e3) {
  62057. null != e3 && e3[t3] && o2.push(t3);
  62058. });
  62059. }), 0 < o2.length && (n2 = n2.map(function(e3) {
  62060. var t3 = {};
  62061. return o2.forEach(function(e4) {
  62062. t3[e4] = "";
  62063. }), u(u({}, t3), e3);
  62064. }))), s2 = n2, t2(r2 ? s2 : s2[0]));
  62065. };
  62066. }
  62067. function a(i2) {
  62068. return function(e2, t2) {
  62069. i2.lifeCycle.emit("modifyRequest", e2);
  62070. var n2 = i2.config.modifyRequest;
  62071. if ("function" == typeof n2)
  62072. try {
  62073. var o2 = n2(e2);
  62074. "object" == typeof o2 && "url" in o2 && (e2 = o2);
  62075. } catch (e3) {
  62076. formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e3);
  62077. }
  62078. t2(e2);
  62079. };
  62080. }
  62081. function c(o2) {
  62082. return function(e2, t2) {
  62083. null != (n2 = o2.lifeCycle) && n2.emit("afterRequest", e2);
  62084. var n2 = (o2.config || {}).afterRequest;
  62085. "function" == typeof n2 && false === n2(e2) || t2(e2);
  62086. };
  62087. }
  62088. function y(n2) {
  62089. if (n2 && n2.reduce && n2.length)
  62090. return 1 === n2.length ? function(e2, t2) {
  62091. n2[0](e2, t2 || ee);
  62092. } : n2.reduce(function(n3, o2) {
  62093. return function(e2, t2) {
  62094. return void 0 === t2 && (t2 = ee), n3(e2, function(e3) {
  62095. return null == o2 ? void 0 : o2(e3, t2);
  62096. });
  62097. };
  62098. });
  62099. throw new TypeError("createPipeline need at least one function param");
  62100. }
  62101. function v(t2, n2) {
  62102. Object.getOwnPropertyNames(t2).forEach(function(e2) {
  62103. "function" == typeof t2[e2] && "constructor" !== e2 && (n2 ? n2[e2] = "sendPipeline" === e2 ? function() {
  62104. return function() {
  62105. };
  62106. } : function() {
  62107. } : t2[e2] = function() {
  62108. });
  62109. });
  62110. }
  62111. function M(n2) {
  62112. var t2, e2 = this, o2 = (r2 = n2.config).uin, i2 = r2.id, r2 = r2.offlineLogLimit;
  62113. o2 && i2 && (t2 = new G({ limit: void 0 === r2 ? 2e4 : r2 }), n2.lifeCycle.on("beforeWrite", function(e3) {
  62114. t2.save2Offline(e3 = void 0 === e3 ? [] : e3, n2.config);
  62115. }), n2.getOfflineLog = function() {
  62116. var e3 = t2.getLogs({ uin: o2, id: i2 });
  62117. return t2.clearLogs(), e3;
  62118. }, n2.uploadOfflineLogs = function(t3) {
  62119. return s(e2, void 0, void 0, function() {
  62120. return f(this, function(e3) {
  62121. return t3 = Array.isArray(t3) ? t3 : [t3], [2, function(a2, c2) {
  62122. return s(this, void 0, void 0, function() {
  62123. var t4, n3, o3, i3, r3, s2, l2;
  62124. return f(this, function(e4) {
  62125. return t4 = a2.config, n3 = a2.bean, o3 = t4.offlineUrl, i3 = t4.id, r3 = t4.uin, s2 = (n3 || {}).aid, l2 = void 0 === s2 ? "" : s2, (r3 || l2) && i3 ? (a2.send({ url: o3 + "/offlineAuto", type: O.OFFLINE, log: O.OFFLINE }, function(e5) {
  62126. var t5 = (null == e5 ? void 0 : e5.data).secretKey;
  62127. if (t5)
  62128. try {
  62129. a2.send({ url: o3 + "/offlineLog", data: { logs: c2, secretKey: t5, id: i3, uin: r3, aid: l2 }, contentType: "application/json", method: "post", type: O.OFFLINE, log: O.OFFLINE });
  62130. } catch (e6) {
  62131. formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e6);
  62132. }
  62133. }, function(e5) {
  62134. formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e5);
  62135. }), [2]) : [2];
  62136. });
  62137. });
  62138. }(n2, t3)];
  62139. });
  62140. });
  62141. });
  62142. }
  62143. function G(e2) {
  62144. var o2 = this, e2 = void 0 === (e2 = (void 0 === e2 ? {} : e2).limit) ? 2e4 : e2;
  62145. this.offlineBuffer = [], this.clearLogs = function() {
  62146. o2.offlineBuffer = [];
  62147. }, this.save2Offline = function(e3, t2) {
  62148. e3 = (e3 = Array.isArray(e3) ? e3 : [e3]).map(function(e4) {
  62149. return "string" == typeof e4 && (e4 = { msg: e4 }), Object.assign({ id: t2.id, uin: t2.uin, time: +Date.now(), version: t2.version }, e4);
  62150. });
  62151. o2.offlineBuffer = o2.offlineBuffer.concat(e3).slice(0, o2.limitSize);
  62152. }, this.getLogs = function(t2, e3) {
  62153. var n2 = o2.offlineBuffer.filter(function(e4) {
  62154. return e4.id === t2.id && e4.uin === t2.uin;
  62155. });
  62156. return null != e3 && e3(n2), n2;
  62157. }, this.limitSize = e2;
  62158. }
  62159. function J(e2, o2) {
  62160. return void 0 === o2 && (o2 = {}), new Promise(function(t2, n2) {
  62161. C || n2(new Error("no available fetch found!"));
  62162. try {
  62163. C(u(u({}, o2), { url: e2, type: "text" }), function(e3) {
  62164. return t2(j(e3));
  62165. });
  62166. } catch (e3) {
  62167. n2(e3);
  62168. }
  62169. });
  62170. }
  62171. var b, O, R, V, t, W = ["application/xhtml+xml", "application/xml", "application/pdf", "application/pkcs12", "application/javascript", "application/x-javascript", "application/ecmascript", "application/vnd.mspowerpoint", "application/vnd.apple.mpegurl", "application/ogg", "text/css", "text/javascript", "image", "audio", "video", "video/mp2t"], K = /\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/gi, $ = ["ret", "retcode", "code", "errcode"], i = function() {
  62172. var n2 = /* @__PURE__ */ new WeakSet();
  62173. return function(e2, t2) {
  62174. if (t2 instanceof Error)
  62175. return "Error.message: " + t2.message + " \n Error.stack: " + t2.stack;
  62176. if ("object" == typeof t2 && null !== t2) {
  62177. if (n2.has(t2))
  62178. return "[Circular " + (e2 || "root") + "]";
  62179. n2.add(t2);
  62180. }
  62181. return t2;
  62182. };
  62183. }, w = function(e2) {
  62184. if ("string" == typeof e2)
  62185. return e2;
  62186. try {
  62187. return e2 instanceof Error ? (JSON.stringify(e2, i(), 4) || "undefined").replace(/"/gim, "") : JSON.stringify(e2, i(), 4) || "undefined";
  62188. } catch (e3) {
  62189. return "error happen when aegis stringify: \n " + e3.message + " \n " + e3.stack;
  62190. }
  62191. }, x = function(r2, s2) {
  62192. void 0 === s2 && (s2 = 3);
  62193. var i2, l2, a2, c2 = "";
  62194. return Array.isArray(r2) ? (c2 += "[", i2 = r2.length, r2.forEach(function(e2, t2) {
  62195. var n2, o2;
  62196. c2 = (c2 += "object" == typeof e2 && 1 < s2 ? x(e2, s2 - 1) : (o2 = "", o2 += "undefined" == (n2 = typeof (e2 = e2)) || "symbol" == n2 || "function" == n2 ? "null" : "string" == n2 || "object" == n2 ? '"' + e2 + '"' : e2)) + (t2 === i2 - 1 ? "" : ",");
  62197. }), c2 += "]") : r2 instanceof Object ? (c2 = "{", l2 = Object.keys(r2), a2 = l2.length, l2.forEach(function(e2, t2) {
  62198. var n2, o2, i3;
  62199. "object" == typeof r2[e2] && 1 < s2 ? c2 += '"' + e2 + '":' + x(r2[e2], s2 - 1) : c2 += (n2 = r2[e2 = e2], i3 = "", "string" == (o2 = typeof n2) || "object" == o2 ? i3 += '"' + e2 + '":"' + n2 + '"' : "function" == typeof n2 ? i3 += '"' + e2 + '":"function ' + n2.name + '"' : "symbol" == typeof n2 ? i3 += '"' + e2 + '":"symbol"' : "number" != typeof n2 && "boolean" != o2 || (i3 += '"' + e2 + '": ' + n2), i3), c2 += t2 === a2 - 1 || t2 < a2 - 1 && void 0 === r2[l2[t2 + 1]] ? "" : ",";
  62200. }), c2 += "}") : c2 += r2, c2;
  62201. }, X = /data:(image|text)\/.*;base64/, z = ((r = b = b || {}).INFO_ALL = "-1", r.API_RESPONSE = "1", r.INFO = "2", r.ERROR = "4", r.PROMISE_ERROR = "8", r.AJAX_ERROR = "16", r.SCRIPT_ERROR = "32", r.IMAGE_ERROR = "64", r.CSS_ERROR = "128", r.CONSOLE_ERROR = "256", r.MEDIA_ERROR = "512", r.RET_ERROR = "1024", r.REPORT = "2048", r.PV = "4096", r.EVENT = "8192", r.PAGE_NOT_FOUND_ERROR = "16384", r.WEBSOCKET_ERROR = "32768", r.BRIDGE_ERROR = "65536", (r = O = O || {}).LOG = "log", r.SPEED = "speed", r.PERFORMANCE = "performance", r.OFFLINE = "offline", r.WHITE_LIST = "whiteList", r.VITALS = "vitals", r.PV = "pv", r.CUSTOM_PV = "customPV", r.EVENT = "event", r.CUSTOM = "custom", r.SDK_ERROR = "sdkError", r.SET_DATA = "setData", r.LOAD_PACKAGE = "loadPackage", (r = R = R || {}).production = "production", r.development = "development", r.gray = "gray", r.pre = "pre", r.daily = "daily", r.local = "local", r.test = "test", r.others = "others", function(e2) {
  62202. return e2.filter(function(n2, o2) {
  62203. return "static" !== n2.type || !e2.find(function(e3, t2) {
  62204. return n2.url === e3.url && 200 === n2.status && o2 < t2;
  62205. });
  62206. });
  62207. }), Y = function(e2) {
  62208. e2.level === b.INFO_ALL && (e2.level = b.INFO);
  62209. }, E = {}, P = {}, T = function(e2) {
  62210. return E[e2] || (E[e2] = setTimeout(function() {
  62211. P[e2] = {}, E[e2] = null;
  62212. }, 6e4)), E[e2];
  62213. }, Q = function(e2) {
  62214. return (Array.isArray(e2) ? e2 : [e2]).map(function(n2) {
  62215. return Object.getOwnPropertyNames(n2).reduce(function(e3, t2) {
  62216. return "ctx" !== t2 && (e3[t2] = n2[t2]), e3;
  62217. }, { level: b.INFO, msg: "" });
  62218. });
  62219. }, Z = function(o2) {
  62220. return function(e2) {
  62221. return o2.sendPipeline([function(e3, n2) {
  62222. return n2({ url: o2.config.url || "", data: F(Q(e3)), method: "post", contentType: "application/json", type: O.LOG, log: e3, requestConfig: { timeout: 5e3 }, success: function() {
  62223. var t2 = o2.config.onReport;
  62224. "function" == typeof t2 && e3.forEach(function(e4) {
  62225. t2(e4);
  62226. }), "function" == typeof n2 && n2([]);
  62227. } });
  62228. }], O.LOG)(e2);
  62229. };
  62230. }, ee = function() {
  62231. }, r = (Object.defineProperty(N.prototype, "__version__", { get: function() {
  62232. return formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "__version__ has discard, please use version"), "1.36.4";
  62233. }, enumerable: false, configurable: true }), Object.defineProperty(N.prototype, "LogType", { get: function() {
  62234. return formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "LogType has discard, please use logType"), b;
  62235. }, enumerable: false, configurable: true }), N.prototype.init = function(e2) {
  62236. this.setConfig(e2);
  62237. for (var t2 = 0; t2 < N.installedPlugins.length; t2++)
  62238. try {
  62239. N.installedPlugins[t2].patch(this);
  62240. } catch (e3) {
  62241. this.sendSDKError(e3);
  62242. }
  62243. this.lifeCycle.emit("onInited");
  62244. }, N.prototype.setConfig = function(e2) {
  62245. Object.assign(this.config, e2);
  62246. var e2 = this.config, t2 = e2.id, n2 = e2.uin, o2 = e2.version, i2 = e2.ext1, r2 = e2.ext2, s2 = e2.ext3, l2 = e2.aid, a2 = e2.env, c2 = void 0 === a2 ? "production" : a2, a2 = e2.pageUrl, e2 = this.bean.id !== t2 || this.bean.uin !== n2 || this.bean.aid !== l2;
  62247. return this.bean.id = t2 || "", this.bean.uin = n2 || "", this.bean.version = o2 || "1.36.4", this.bean.aid = l2 || "", this.bean.env = function() {
  62248. switch (c2) {
  62249. case R.production:
  62250. case R.development:
  62251. case R.gray:
  62252. case R.pre:
  62253. case R.daily:
  62254. case R.local:
  62255. case R.test:
  62256. case R.others:
  62257. return 1;
  62258. default:
  62259. return;
  62260. }
  62261. }() ? c2 : R.others, a2 && this.extendBean("from", encodeURIComponent(a2.slice(0, 2048))), i2 && this.extendBean("ext1", encodeURIComponent(i2)), r2 && this.extendBean("ext2", encodeURIComponent(r2)), s2 && this.extendBean("ext3", encodeURIComponent(s2)), e2 && this.lifeCycle.emit("onConfigChange", this.config), this.config;
  62262. }, N.use = function(e2) {
  62263. -1 === N.installedPlugins.indexOf(e2) && e2.aegisPlugin && N.installedPlugins.push(e2);
  62264. }, N.unuse = function(e2) {
  62265. e2 = N.installedPlugins.indexOf(e2);
  62266. -1 !== e2 && N.installedPlugins.splice(e2, 1);
  62267. }, N.prototype.info = function() {
  62268. for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
  62269. e2[t2] = arguments[t2];
  62270. var n2 = { level: b.INFO, msg: e2 };
  62271. 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.INFO }), this.normalLogPipeline(n2);
  62272. }, N.prototype.infoAll = function() {
  62273. for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
  62274. e2[t2] = arguments[t2];
  62275. var n2 = { level: b.INFO_ALL, msg: e2 };
  62276. 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.INFO_ALL }), this.normalLogPipeline(n2);
  62277. }, N.prototype.report = function() {
  62278. for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
  62279. e2[t2] = arguments[t2];
  62280. var n2 = { level: b.REPORT, msg: e2 };
  62281. 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0])), this.normalLogPipeline(n2);
  62282. }, N.prototype.error = function() {
  62283. for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
  62284. e2[t2] = arguments[t2];
  62285. var n2 = { level: b.ERROR, msg: e2 };
  62286. 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.ERROR }), this.normalLogPipeline(n2);
  62287. }, N.prototype.speedLogPipeline = function(e2) {
  62288. throw new Error('You need to override "speedLogPipeline" method');
  62289. }, N.prototype.reportPv = function(n2) {
  62290. var o2, i2 = this;
  62291. n2 && (formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportPv is deprecated, please use reportEvent"), o2 = "" + Object.getOwnPropertyNames(this.bean).filter(function(e2) {
  62292. return "id" !== e2;
  62293. }).map(function(e2) {
  62294. return e2 + "=" + i2.bean[e2];
  62295. }).join("&"), this.sendPipeline([function(e2, t2) {
  62296. t2({ url: i2.config.url + "/" + n2 + "?" + o2, addBean: false, type: O.CUSTOM_PV });
  62297. }], O.CUSTOM_PV)(null));
  62298. }, N.prototype.reportEvent = function(e2) {
  62299. e2 && ((e2 = "string" == typeof e2 ? { name: e2, ext1: this.config.ext1 || "", ext2: this.config.ext2 || "", ext3: this.config.ext3 || "" } : e2).name ? this.eventPipeline(e2) : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportEvent params error"));
  62300. }, N.prototype.reportTime = function(e2, t2) {
  62301. if ("object" == typeof e2)
  62302. return this.reportT(e2);
  62303. "string" == typeof e2 ? "number" == typeof t2 ? t2 < 0 || 6e4 < t2 ? formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: duration must between 0 and 60000") : this.submitCustomTime(e2, t2) : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: second param must be number") : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: first param must be a string");
  62304. }, N.prototype.reportT = function(e2) {
  62305. var t2 = e2.name, n2 = e2.duration, o2 = e2.ext1, o2 = void 0 === o2 ? "" : o2, i2 = e2.ext2, i2 = void 0 === i2 ? "" : i2, r2 = e2.ext3, r2 = void 0 === r2 ? "" : r2, e2 = e2.from;
  62306. if ("string" == typeof t2 && "number" == typeof n2 && "string" == typeof o2 && "string" == typeof i2 && "string" == typeof r2) {
  62307. if (!(n2 < 0 || 6e4 < n2))
  62308. return this.submitCustomTime(t2, n2, o2, i2, r2, void 0 === e2 ? "" : e2);
  62309. formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: duration must between 0 and 60000");
  62310. } else
  62311. formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: params error");
  62312. }, N.prototype.time = function(e2) {
  62313. "string" == typeof e2 ? this.timeMap[e2] ? formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "Timer " + e2 + " already exists") : this.timeMap[e2] = Date.now() : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "time: first param must be a string");
  62314. }, N.prototype.timeEnd = function(e2) {
  62315. "string" == typeof e2 ? this.timeMap[e2] ? (this.submitCustomTime(e2, Date.now() - this.timeMap[e2]), delete this.timeMap[e2]) : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "Timer " + e2 + " does not exist") : formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "timeEnd: first param must be a string");
  62316. }, N.prototype.submitCustomTime = function(e2, t2, n2, o2, i2, r2) {
  62317. this.customTimePipeline({ name: e2, duration: t2, ext1: n2 || this.config.ext1, ext2: o2 || this.config.ext2, ext3: i2 || this.config.ext3, from: r2 || void 0 });
  62318. }, N.prototype.extendBean = function(e2, t2) {
  62319. this.bean[e2] = t2;
  62320. }, N.prototype.sendPipeline = function(e2, t2) {
  62321. var n2, r2 = this;
  62322. return y(l([function(e3, t3) {
  62323. if ("number" != typeof n2.config.random && (formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "random must in [0, 1], default is 1."), n2.config.random = 1), !n2.isHidden || !n2.isGetSample)
  62324. if (n2.isGetSample)
  62325. n2.isHidden || t3(e3);
  62326. else {
  62327. if (n2.isGetSample = true, Math.random() < n2.config.random)
  62328. return n2.isHidden = false, t3(e3);
  62329. n2.isHidden = true;
  62330. }
  62331. }, H(n2 = this, t2)], e2, [a(this), function(o2, i2) {
  62332. r2.request(o2, function() {
  62333. for (var e3, t3 = [], n3 = 0; n3 < arguments.length; n3++)
  62334. t3[n3] = arguments[n3];
  62335. r2.failRequestCount = 0, i2({ isErr: false, result: t3, logType: null == o2 ? void 0 : o2.type, logs: null == o2 ? void 0 : o2.log }), null != (e3 = null == o2 ? void 0 : o2.success) && e3.call.apply(e3, l([o2], t3));
  62336. }, function() {
  62337. for (var e3, t3 = [], n3 = 0; n3 < arguments.length; n3++)
  62338. t3[n3] = arguments[n3];
  62339. 60 <= ++r2.failRequestCount && r2.destroy(), -1 < ("" + t3[0]).indexOf("403 forbidden") && r2.destroy(), i2({ isErr: true, result: t3, logType: null == o2 ? void 0 : o2.type, logs: null == o2 ? void 0 : o2.log }), null != (e3 = null == o2 ? void 0 : o2.fail) && e3.call.apply(e3, l([o2], t3));
  62340. });
  62341. }, c(this)]));
  62342. }, N.prototype.send = function(e2, i2, r2) {
  62343. var t2 = this;
  62344. return y([a(this), function(n2, o2) {
  62345. t2.request(n2, function() {
  62346. for (var e3 = [], t3 = 0; t3 < arguments.length; t3++)
  62347. e3[t3] = arguments[t3];
  62348. o2({ isErr: false, result: e3, logType: n2.type, logs: n2.log }), null != i2 && i2.apply(void 0, e3);
  62349. }, function() {
  62350. for (var e3 = [], t3 = 0; t3 < arguments.length; t3++)
  62351. e3[t3] = arguments[t3];
  62352. o2({ isErr: true, result: e3, logType: n2.type, logs: n2.log }), null != r2 && r2.apply(void 0, e3);
  62353. });
  62354. }, c(this)])(e2);
  62355. }, N.prototype.ready = function(e2, t2, n2) {
  62356. throw new Error('You need to override "ready" method');
  62357. }, N.prototype.request = function(e2, t2, n2) {
  62358. throw new Error('You need to override "request" method');
  62359. }, N.prototype.sendSDKError = function(e2) {
  62360. var n2 = this;
  62361. this.sendPipeline([function(e3, t2) {
  62362. t2({ url: n2.config.url + "?id=1085&msg[0]=" + encodeURIComponent(w(e3)) + "&level[0]=2&from=" + n2.config.id + "&count=1&version=" + n2.config.id + "(1.36.4)", addBean: false, method: "get", type: O.SDK_ERROR, log: e3 });
  62363. }], O.SDK_ERROR)(e2);
  62364. }, N.prototype.destroy = function(e2) {
  62365. void 0 === e2 && (e2 = false);
  62366. var t2, n2, o2 = N.instances.indexOf(this);
  62367. -1 !== o2 && N.instances.splice(o2, 1);
  62368. for (var i2 = N.installedPlugins.length - 1; 0 <= i2; i2--)
  62369. try {
  62370. N.installedPlugins[i2].unpatch(this);
  62371. } catch (e3) {
  62372. this.sendSDKError(e3);
  62373. }
  62374. if (this.lifeCycle.emit("destroy"), this.lifeCycle.clear(), e2)
  62375. t2 = this, n2 = Object.getOwnPropertyDescriptors(t2), Object.keys(n2).forEach(function(e3) {
  62376. n2[e3].writable && (t2[e3] = null);
  62377. }), Object.setPrototypeOf(this, null);
  62378. else {
  62379. for (var r2 = this; r2.constructor !== Object && v(r2, this), r2 = Object.getPrototypeOf(r2); )
  62380. ;
  62381. 0 === N.instances.length && (o2 = Object.getPrototypeOf(this).constructor, v(o2), v(N));
  62382. }
  62383. }, N.version = "1.36.4", N.instances = [], N.logType = b, N.environment = R, N.installedPlugins = [], N), L = (I.prototype.patch = function(e2) {
  62384. this.canUse(e2) && this.exist(e2) && (this.instances.push(e2), this.triggerInit(e2), this.triggerOnNewAegis(e2));
  62385. }, I.prototype.unpatch = function(e2) {
  62386. var t2 = this.instances.indexOf(e2);
  62387. -1 !== t2 && (this.instances.splice(t2, 1), 0 === this.instances.length) && this.uninstall(e2);
  62388. }, I.prototype.countInstance = function() {
  62389. return this.instances.length;
  62390. }, I.prototype.uninstall = function(e2) {
  62391. var t2;
  62392. null != (t2 = null == (t2 = this.option) ? void 0 : t2.destroy) && t2.apply(this, [e2]);
  62393. }, I.prototype.walk = function(n2) {
  62394. var o2 = this;
  62395. this.instances.forEach(function(e2) {
  62396. var t2 = o2.canUse(e2);
  62397. t2 && n2(e2, t2);
  62398. });
  62399. }, I.prototype.canUse = function(e2) {
  62400. e2 = this.getConfig(e2);
  62401. return !(!e2 || "object" != typeof e2) || !!e2;
  62402. }, I.prototype.getConfig = function(e2) {
  62403. return null == (e2 = e2.config) ? void 0 : e2[this.name];
  62404. }, I.prototype.exist = function(e2) {
  62405. return -1 === this.instances.indexOf(e2);
  62406. }, I.prototype.triggerInit = function(e2) {
  62407. var t2;
  62408. this.inited || (this.inited = true, null == (t2 = null == (t2 = this.option) ? void 0 : t2.init)) || t2.call(this.option, this.getConfig(e2));
  62409. }, I.prototype.triggerOnNewAegis = function(e2) {
  62410. var t2;
  62411. null != (t2 = null == (t2 = this.option) ? void 0 : t2.onNewAegis) && t2.call(this.option, e2, this.getConfig(e2));
  62412. }, I), te = new L({ name: "offlineLog", onNewAegis: function(t2) {
  62413. M(t2), t2.lifeCycle.on("onConfigChange", function(e2) {
  62414. M(t2);
  62415. });
  62416. } }), S = "undefined" != typeof weex && (null === weex || void 0 === weex ? void 0 : weex.requireModule("stream")), C = null == S ? void 0 : S.fetch, j = function(e2) {
  62417. var t2 = e2.ok, n2 = e2.status, o2 = e2.statusText, i2 = e2.data, r2 = e2.headers;
  62418. return { ok: t2, status: n2, statusText: o2, body: i2, headers: r2, clone: function() {
  62419. return j(e2);
  62420. }, text: function() {
  62421. return new Promise(function(e3) {
  62422. return e3(i2);
  62423. });
  62424. }, json: function() {
  62425. return new Promise(function(e3, t3) {
  62426. try {
  62427. e3(JSON.parse(i2));
  62428. } catch (e4) {
  62429. t3(new Error("response body is not JSON"));
  62430. }
  62431. });
  62432. } };
  62433. }, A = [], _ = {}, ne = weex, r = (n(t = U, S = V = r), t.prototype = null === S ? Object.create(S) : (ie.prototype = S.prototype, new ie()), U.prototype.getPlatform = function() {
  62434. var e2 = ((null == (e2 = null == (e2 = null == (e2 = this.weex) ? void 0 : e2.config) ? void 0 : e2.env) ? void 0 : e2.osName) || "").toLowerCase();
  62435. return "android" === e2 ? 1 : "ios" === e2 ? 2 : 100;
  62436. }, U.prototype.initOfflineLog = function() {
  62437. U.use(te);
  62438. }, Object.defineProperty(U.prototype, "getBean", { get: function() {
  62439. var t2 = this;
  62440. return Object.getOwnPropertyNames(this.bean).map(function(e2) {
  62441. return e2 + "=" + t2.bean[e2];
  62442. }).join("&");
  62443. }, enumerable: false, configurable: true }), U.prototype.reportSpeed = function(e2) {
  62444. var t2, n2, o2, i2, r2;
  62445. this.send({ url: "" + this.config.speedUrl, method: "post", data: (t2 = e2, n2 = this.bean, i2 = { fetch: [], static: [], bridge: [] }, r2 = {}, Array.isArray(t2) ? t2.forEach(function(e3) {
  62446. var t3;
  62447. null != (t3 = i2[e3.type]) && t3.push(e3);
  62448. }) : null != (o2 = i2[t2.type]) && o2.push(t2), r2.payload = JSON.stringify(u({ duration: i2 }, n2)), r2), contentType: "application/json", type: O.SPEED, log: e2 });
  62449. }, U.prototype.retcode = function(e2) {
  62450. var t2 = this;
  62451. "object" == typeof e2 ? e2.url ? 400 <= Object.keys(_).length || (_[e2.url] || (_[e2.url] = 0), _[e2.url] += 1, 3 < _[e2.url]) || (e2 = Object.assign({}, { url: "", isHttps: true, method: "GET", type: "fetch", duration: 0, ret: 0, status: 200 }, e2), A.push(e2), 1 === A.length && setTimeout(function() {
  62452. t2.reportSpeed(A), A = [];
  62453. }, 1e3)) : formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "param url can not be empty!") : formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "retcode params should be an object");
  62454. }, U.prototype.uploadLogs = function(e2, t2) {
  62455. this.lifeCycle.emit("uploadLogs", e2 = void 0 === e2 ? {} : e2, t2 = void 0 === t2 ? {} : t2);
  62456. }, U.prototype.getOfflineLog = function() {
  62457. }, U.prototype.uploadOfflineLogs = function(e2) {
  62458. }, U.prototype.getCurrentPageUrl = function(e2) {
  62459. e2 = e2.pageUrl || (null == (e2 = null == (e2 = this.weex) ? void 0 : e2.config) ? void 0 : e2.bundleUrl) || "";
  62460. return encodeURIComponent(e2.slice(0, 2048));
  62461. }, U.sessionID = "session-" + Date.now(), U), S = new L({ name: "aid", onNewAegis: function(t2) {
  62462. var e2, n2 = this;
  62463. this.aid && true !== this.aid ? (t2.bean.aid = this.aid, t2.config.aid = this.aid) : e2 = setTimeout(function() {
  62464. n2.getAid(function(e3) {
  62465. n2.aid = e3, t2.bean.aid = n2.aid, t2.config.aid = n2.aid;
  62466. }), clearTimeout(e2);
  62467. }, 0);
  62468. }, getAid: function(n2) {
  62469. return s(this, void 0, void 0, function() {
  62470. var t2;
  62471. return f(this, function(e2) {
  62472. switch (e2.label) {
  62473. case 0:
  62474. return e2.trys.push([0, 2, , 3]), [4, localStorage.getItem("AEGIS_ID")];
  62475. case 1:
  62476. return (t2 = e2.sent()) || (t2 = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) {
  62477. var t3 = 16 * Math.random() | 0;
  62478. return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16);
  62479. }), localStorage.setItem("AEGIS_ID", t2)), null != n2 && n2(t2 || ""), [3, 3];
  62480. case 2:
  62481. return e2.sent(), null != n2 && n2(""), [3, 3];
  62482. case 3:
  62483. return [2];
  62484. }
  62485. });
  62486. });
  62487. } }), oe = new L({ name: "onError", listening: false, init: function() {
  62488. this.startListen();
  62489. }, startListen: function() {
  62490. var t2 = this;
  62491. if (!this.listening) {
  62492. this.listening = true;
  62493. try {
  62494. var n2, e2 = Vue;
  62495. void 0 !== e2 && e2 && (n2 = e2.config.errorHandler, e2.config.errorHandler = function(e3) {
  62496. e3 && t2.publishErrorLog({ msg: e3, level: b.ERROR }), "function" == typeof n2 && n2(e3);
  62497. });
  62498. } catch (t3) {
  62499. this.publishErrorLog({ msg: t3, level: b.ERROR });
  62500. }
  62501. }
  62502. }, publishErrorLog: function(t2) {
  62503. this.$walk(function(e2) {
  62504. e2.normalLogPipeline(t2);
  62505. });
  62506. } }), L = new L({ name: "reportApiSpeed", override: false, fetch: null, weexFetch: null, onNewAegis: function(e2) {
  62507. var t2, n2;
  62508. this.override || (this.override = true, this.fetch = e2.fetch, this.weexFetch = e2.weexFetch, t2 = (n2 = this.overrideFetch(e2.config)).fetch, n2 = n2.weexFetch, e2.fetch = t2, e2.weexFetch = n2);
  62509. }, publishSpeed: function(t2) {
  62510. this.$walk(function(e2) {
  62511. e2.speedLogPipeline(t2);
  62512. });
  62513. }, publishNormalLog: function(t2) {
  62514. this.$walk(function(e2) {
  62515. e2.normalLogPipeline(t2);
  62516. });
  62517. }, overrideFetch: function(u2) {
  62518. var e2, t2, l2, n2, f2 = this;
  62519. if ("function" == typeof this.fetch)
  62520. return e2 = this.fetch, t2 = this.weexFetch, l2 = function(r2, s2, l3, a2) {
  62521. var c2, e3, t3, n3;
  62522. g(l3, u2.hostUrl) || (c2 = { url: l3, isHttps: d(l3), method: (null == a2 ? void 0 : a2.method) || "get", duration: s2, nextHopProtocol: "", type: "fetch", status: r2.status }, "function" == typeof (null == (n3 = u2.api) ? void 0 : n3.resourceTypeHandler) && (e3 = null == (n3 = u2.api) ? void 0 : n3.resourceTypeHandler(r2.url)), -1 === D.indexOf(e3) && (n3 = r2.headers && r2.headers.get("content-type") || "", e3 = r2.ok && (void 0 === (t3 = n3) && (t3 = ""), n3 = (void 0 === l3 ? "" : l3).split("?")[0], K.test(n3) || W.some(function(e4) {
  62523. return -1 !== String(t3).indexOf(e4);
  62524. })) ? "static" : "fetch"), "fetch" === e3 ? r2.clone().text().then(function(e4) {
  62525. var t4 = function(e5, t5, n5) {
  62526. var o3, i3;
  62527. try {
  62528. if ("function" == typeof (null == t5 ? void 0 : t5.retCodeHandler))
  62529. return { code: void 0 === (r3 = (i3 = t5.retCodeHandler(e5, null == n5 ? void 0 : n5.url, null == n5 ? void 0 : n5.ctx, null == n5 ? void 0 : n5.payload) || {}).code) ? "unknown" : r3, isErr: i3.isErr };
  62530. "string" == typeof e5 && (e5 = JSON.parse(e5)), "function" == typeof (null == (o3 = null == t5 ? void 0 : t5.ret) ? void 0 : o3.join) && ($ = [].concat(t5.ret.map(function(e6) {
  62531. return e6.toLowerCase();
  62532. })));
  62533. var r3, s3 = Object.getOwnPropertyNames(e5).filter(function(e6) {
  62534. return -1 !== $.indexOf(e6.toLowerCase());
  62535. });
  62536. return s3.length ? { code: "" + (r3 = e5[s3[0]]), isErr: 0 !== r3 && "0" !== r3 } : { code: "unknown", isErr: false };
  62537. } catch (e6) {
  62538. return { code: "unknown", isErr: false };
  62539. }
  62540. }(e4, u2.api, { url: r2.url, ctx: r2, payload: null == a2 ? void 0 : a2.body }) || {}, n4 = t4.code, t4 = t4.isErr, o2 = null == (o2 = u2.api) ? void 0 : o2.apiDetail, i2 = o2 ? h(null == a2 ? void 0 : a2.body, null == (i2 = u2.api) ? void 0 : i2.reqParamHandler, { url: l3 }) : "", e4 = o2 ? h(e4, null == (o2 = u2.api) ? void 0 : o2.resBodyHandler, { url: l3 }) : "", o2 = "req url: " + l3 + " \n \nres status: " + (r2.status || 0) + "\n \nres duration: " + s2 + "ms \n \nreq method: " + ((null == a2 ? void 0 : a2.method) || "get") + " \n \nreq param: " + i2 + " \n \nres retcode: " + n4 + "\n \nres data: " + e4;
  62541. f2.publishNormalLog({ msg: o2, level: b.API_RESPONSE }), c2.payload = null == a2 ? void 0 : a2.body, c2.ret = n4, c2.isErr = +t4, t4 && f2.publishNormalLog({ msg: o2, level: b.RET_ERROR });
  62542. }) : Object.assign(c2, { type: "static", urlQuery: (n3 = r2.url, e3 = true, "string" == typeof n3 ? n3.split("?")[e3 ? 1 : 0] || "" : n3), domainLookup: o.number, connectTime: o.number }), f2.publishSpeed(c2));
  62543. }, n2 = function(e3, t3, n3, o2) {
  62544. var i2;
  62545. throw g(n3, u2.hostUrl) || (i2 = { url: n3, isHttps: d(n3), method: (null == o2 ? void 0 : o2.method) || "get", duration: t3, nextHopProtocol: "", type: "fetch", status: 0 }, f2.publishSpeed(i2), i2 = null != (i2 = u2.api) && i2.apiDetail ? h(null == o2 ? void 0 : o2.body, null == (i2 = u2.api) ? void 0 : i2.reqParamHandler, { url: n3 }) : "", n3 = "AJAX_ERROR: " + e3 + "\n \nreq url: " + n3 + "\n \nres status: 0\n \nres duration: " + t3 + "ms\n \nreq method: " + ((null == o2 ? void 0 : o2.method) || "get") + "\n \nreq param: " + i2, f2.publishNormalLog({ msg: n3, level: b.AJAX_ERROR })), e3;
  62546. }, { fetch: function(o2, i2) {
  62547. var r2 = Date.now();
  62548. return e2(o2, i2).then(function(e3) {
  62549. var t3 = Date.now() - r2, n3 = e3;
  62550. try {
  62551. l2(n3, t3, o2, i2);
  62552. } catch (e4) {
  62553. }
  62554. return e3;
  62555. }).catch(function(e3) {
  62556. var t3 = Date.now() - r2;
  62557. try {
  62558. n2(e3, t3, o2, i2);
  62559. } catch (e4) {
  62560. }
  62561. throw e3;
  62562. });
  62563. }, weexFetch: function(o2, i2, e3) {
  62564. var r2 = o2.url, s2 = Date.now();
  62565. try {
  62566. t2(o2, function(e4) {
  62567. var t3 = Date.now() - s2, n3 = j(e4);
  62568. try {
  62569. l2(n3, t3, r2, o2);
  62570. } catch (e5) {
  62571. }
  62572. "function" == typeof i2 && i2(e4);
  62573. }, e3);
  62574. } catch (i3) {
  62575. e3 = Date.now() - s2;
  62576. try {
  62577. n2(i3, e3, r2, o2);
  62578. } catch (o3) {
  62579. }
  62580. throw i3;
  62581. }
  62582. } };
  62583. } });
  62584. function U(e2) {
  62585. var s2, l2 = V.call(this, e2) || this;
  62586. l2.weex = ne, l2.originRequest = J, l2.fetch = J, l2.weexFetch = C, l2.speedLogPipeline = y([(s2 = l2.config, function(e3, t2) {
  62587. var n2, o2, i2, r2 = "number" == typeof s2.repeat ? s2.repeat : 60;
  62588. !s2.speedSample || r2 <= 0 ? t2(e3) : (n2 = (null == s2 ? void 0 : s2.id) || "0", o2 = P[n2] || {}, Array.isArray(e3) ? (i2 = e3.filter(function(e4) {
  62589. var t3 = !o2[e4.url] || o2[e4.url] < r2;
  62590. return t3 ? (o2[e4.url] = 1 + ~~o2[e4.url], P[n2] = o2) : E[n2] || T(n2), t3;
  62591. })).length && t2(i2) : !o2[e3.url] || o2[e3.url] < r2 ? (o2[e3.url] = 1 + ~~o2[e3.url], P[n2] = o2, t2(e3)) : E[n2] || T(n2));
  62592. }), m(l2), function(e3, t2) {
  62593. l2.lifeCycle.emit("beforeReportSpeed", e3);
  62594. var n2 = l2.config.beforeReportSpeed;
  62595. if ((e3 = "function" == typeof n2 ? e3.filter(function(e4) {
  62596. return false !== n2(e4);
  62597. }) : e3).length)
  62598. return t2(e3);
  62599. }, function(e3) {
  62600. l2.reportSpeed(e3);
  62601. }]), l2.request = function(o2, i2, r2) {
  62602. var e3, t2, n2, s3;
  62603. o2 && "string" == typeof o2.url && "" !== o2.url && l2.bean.id && (e3 = o2.url, false !== o2.addBean && (e3 = e3 + (-1 === e3.indexOf("?") ? "?" : "&") + l2.getBean), ("get" === (o2.method || "get").toLocaleLowerCase() ? l2.originRequest((t2 = e3, n2 = o2.data, "string" != typeof t2 ? "" : "object" == typeof n2 && n2 ? (s3 = Object.getOwnPropertyNames(n2).map(function(e4) {
  62604. var t3 = n2[e4];
  62605. return e4 + "=" + ("string" == typeof t3 ? encodeURIComponent(t3) : encodeURIComponent(JSON.stringify(t3)));
  62606. }).join("&").replace(/eval/gi, "evaI"), t2 + (-1 === t2.indexOf("?") ? "?" : "&") + s3) : t2), u({ method: "GET", headers: {} }, o2.requestConfig)) : ("string" == typeof o2.data ? o2.data = o2.data.replace(/eval/gi, "evaI") : o2.data = JSON.stringify(o2.data), l2.originRequest(e3, u({ method: "POST", body: o2.data, headers: o2.contentType ? { "Content-Type": o2.contentType } : {} }, o2.requestConfig)))).then(function(e4) {
  62607. var t3, n3;
  62608. String(e4.status).match(/^20\d+/g) ? null != i2 && i2(e4) : null != r2 && r2(e4), null != (n3 = (t3 = l2.config).reqCallback) && n3.call(t3, e4, o2);
  62609. }).catch(function(e4) {
  62610. null != r2 && r2(e4);
  62611. }));
  62612. };
  62613. try {
  62614. e2.offlineLog && l2.initOfflineLog(), l2.init(e2), l2.extendBean("sessionId", U.sessionID), l2.extendBean("platform", l2.getPlatform()), l2.extendBean("from", l2.getCurrentPageUrl(e2)), l2.extendBean("referer", encodeURIComponent(e2.referrer || ""));
  62615. } catch (e3) {
  62616. formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e3), formatAppLog("log", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "%cThe above error occurred in the process of initializing Aegis, which will affect your normal use of Aegis.\nIt is recommended that you contact aegis-helper for feedback and thank you for your support.", "color: red"), l2.sendSDKError(e3);
  62617. }
  62618. return l2;
  62619. }
  62620. function ie() {
  62621. this.constructor = t;
  62622. }
  62623. function I(e2) {
  62624. this.aegisPlugin = true, this.name = "", this.instances = [], this.inited = false, e2.$walk = this.walk.bind(this), e2.$getConfig = this.getConfig.bind(this), this.option = e2, this.name = e2.name;
  62625. }
  62626. function N(e2) {
  62627. var n2, t2, o2, i2, s2, r2, l2, a2, c2, u2, f2, p2, d2, h2, g2 = this;
  62628. this.isGetSample = false, this.isHidden = false, this.config = { version: 0, delay: 1e3, onError: true, repeat: 60, random: 1, aid: true, device: true, pagePerformance: true, webVitals: true, speedSample: true, onClose: true, reportLoadPackageSpeed: true, hostUrl: "https://aegis.qq.com", env: "production", url: "", offlineUrl: "", whiteListUrl: "", pvUrl: "", speedUrl: "", customTimeUrl: "", performanceUrl: "", webVitalsUrl: "", eventUrl: "", setDataReportUrl: "", reportImmediately: true }, this.isWhiteList = false, this.lifeCycle = new k(), this.bean = {}, this.originFireUrl = "", this.normalLogPipeline = y([m(this, 5), B, function(e3, t3) {
  62629. var o3 = n2.config;
  62630. t3(e3 = e3.map(function(e4) {
  62631. var t4, n3 = o3.maxLength || 102400;
  62632. try {
  62633. if (!e4.msg || e4.msg.length <= n3)
  62634. return e4;
  62635. e4.msg = null == (t4 = e4.msg) ? void 0 : t4.substring(0, n3);
  62636. } catch (t5) {
  62637. e4.msg = w(e4.msg).substring(0, o3.maxLength);
  62638. }
  62639. return e4;
  62640. }));
  62641. }, (h2 = (n2 = this).config, function(e3, t3) {
  62642. var n3 = "number" == typeof h2.repeat ? h2.repeat : 60;
  62643. if (n3 <= 0)
  62644. return t3(e3);
  62645. var o3 = (null == h2 ? void 0 : h2.id) + "_error", i3 = P[o3] || {};
  62646. t3(e3.filter(function(e4) {
  62647. if (e4.level === b.ERROR || e4.level === b.PROMISE_ERROR || e4.level === b.AJAX_ERROR || e4.level === b.SCRIPT_ERROR || e4.level === b.IMAGE_ERROR || e4.level === b.CSS_ERROR || e4.level === b.MEDIA_ERROR || e4.level === b.RET_ERROR || e4.level === b.BRIDGE_ERROR || e4.level === b.PAGE_NOT_FOUND_ERROR || e4.level === b.WEBSOCKET_ERROR) {
  62648. e4 = e4.msg.slice(0, 200);
  62649. if (i3[e4] > n3)
  62650. return E[o3] || T(o3), false;
  62651. i3[e4] = 1 + ~~i3[e4], P[o3] = i3;
  62652. }
  62653. return true;
  62654. }));
  62655. }), (p2 = this.lifeCycle.emit, d2 = this.config, function(e3, t3) {
  62656. var n3, o3 = d2.logCreated;
  62657. return "function" == typeof o3 ? (n3 = e3.filter(function(e4) {
  62658. return false !== o3(e4);
  62659. }), p2("beforeWrite", n3), t3(n3)) : (p2("beforeWrite", e3), t3(e3));
  62660. }), (f2 = this, setTimeout(function() {
  62661. var e3 = f2.config.pvUrl, n3 = void 0 === e3 ? "" : e3, e3 = "undefined" != typeof location ? (null === location || void 0 === location ? void 0 : location.pathname) + (null === location || void 0 === location ? void 0 : location.hash) : void 0;
  62662. n3 && e3 !== f2.originFireUrl && (f2.sendPipeline([function(e4, t3) {
  62663. t3({ url: n3, type: O.PV });
  62664. }], O.PV)(null), e3) && location && (f2.originFireUrl = e3);
  62665. }, 100), function(e3, t3) {
  62666. t3(e3);
  62667. }), (c2 = a2 = l2 = false, u2 = [], (s2 = this).lifeCycle.on("onConfigChange", function() {
  62668. r2 && clearTimeout(r2), r2 = setTimeout(function() {
  62669. var e3, n3;
  62670. !c2 && s2.config && (c2 = true, e3 = s2.config.whiteListUrl, (n3 = void 0 === e3 ? "" : e3) && s2.sendPipeline([function(e4, t3) {
  62671. t3({ url: n3, type: O.WHITE_LIST, success: function(e5) {
  62672. a2 = true;
  62673. try {
  62674. var t4 = e5.data || JSON.parse(e5), n4 = t4.retcode, o3 = t4.result, i3 = void 0 === o3 ? {} : o3, r3 = (0 === n4 && (l2 = i3.is_in_white_list, s2.isWhiteList = l2, 0 <= i3.rate) && i3.rate <= 1 && (s2.config.random = i3.rate, s2.isGetSample = false), s2.isWhiteList && u2.length ? Z(s2)(u2.splice(0), function() {
  62675. }) : !s2.isWhiteList && u2.length && (u2.length = 0), s2.config.onWhitelist);
  62676. "function" == typeof r3 && r3(l2);
  62677. } catch (e6) {
  62678. }
  62679. }, fail: function() {
  62680. a2 = true;
  62681. } });
  62682. }], O.WHITE_LIST)(null), c2 = false);
  62683. }, s2.config.uin ? 50 : 500);
  62684. }), s2.lifeCycle.on("destroy", function() {
  62685. u2.length = 0;
  62686. }), function(e3, t3) {
  62687. var n3;
  62688. l2 || null != (n3 = null == (n3 = s2.config) ? void 0 : n3.api) && n3.reportRequest ? t3(e3.concat(u2.splice(0)).map(function(e4) {
  62689. return Y(e4), e4;
  62690. })) : (n3 = e3.filter(function(e4) {
  62691. return e4.level !== b.INFO && e4.level !== b.API_RESPONSE ? (Y(e4), true) : (a2 || (u2.push(e4), 200 <= u2.length && (u2.length = 200)), false);
  62692. })).length && t3(n3);
  62693. }), function(e3, t3) {
  62694. try {
  62695. var n3 = JSON.parse(JSON.stringify(e3)), o3 = (g2.lifeCycle.emit("beforeReport", n3), g2.config.beforeReport);
  62696. (e3 = "function" == typeof o3 ? e3.filter(function(e4) {
  62697. return false !== o3(e4);
  62698. }) : e3).length && t3(e3);
  62699. } catch (e4) {
  62700. }
  62701. }, Z(this)]), this.eventPipeline = y([m(this, 10), (i2 = this, function(e3) {
  62702. i2.sendPipeline([function(e4, t3) {
  62703. var n3 = e4.map(function(e5) {
  62704. return { name: e5.name, ext1: e5.ext1 || i2.config.ext1 || "", ext2: e5.ext2 || i2.config.ext2 || "", ext3: e5.ext3 || i2.config.ext3 || "" };
  62705. });
  62706. t3({ url: i2.config.eventUrl + "?payload=" + encodeURIComponent(JSON.stringify(n3)), type: O.EVENT, log: e4 });
  62707. }], O.EVENT)(e3);
  62708. })]), this.timeMap = {}, this.failRequestCount = 0, this.customTimePipeline = y([m(this, 10), (o2 = this, function(e3) {
  62709. return o2.sendPipeline([function(e4, t3) {
  62710. t3({ url: o2.config.customTimeUrl + "?payload=" + encodeURIComponent(JSON.stringify({ custom: e4 })), type: O.CUSTOM, log: e4 });
  62711. }], O.CUSTOM)(e3);
  62712. })]), this.config = (t2 = this.config, void 0 === (e2 = e2.hostUrl) && (e2 = "https://aegis.qq.com"), t2.url = t2.url || e2 + "/collect", t2.offlineUrl = t2.offlineUrl || e2 + "/offline", t2.whiteListUrl = t2.whiteListUrl || e2 + "/collect/whitelist", t2.pvUrl = t2.pvUrl || e2 + "/collect/pv", t2.eventUrl = t2.eventUrl || e2 + "/collect/events", t2.speedUrl = t2.speedUrl || e2 + "/speed", t2.customTimeUrl = t2.customTimeUrl || e2 + "/speed/custom", t2.performanceUrl = t2.performanceUrl || e2 + "/speed/performance", t2.webVitalsUrl = t2.webVitalsUrl || e2 + "/speed/webvitals", t2.setDataReportUrl = t2.SetDataReportUrl || e2 + "/speed/miniProgramData", t2), N.instances.push(this);
  62713. }
  62714. return r.use(oe), r.use(L), r.use(S), r;
  62715. });
  62716. })(aegis_min);
  62717. var appId = 1400825410;
  62718. uni.$TUIKit = TIM.create({
  62719. SDKAppID: appId
  62720. });
  62721. uni.$TIM = TIM;
  62722. uni.$TUIKit.registerPlugin({
  62723. "tim-upload-plugin": TIMUploadPlugin
  62724. });
  62725. uni.$TUIKit.TUIConversationServer = new TUIConversationServer();
  62726. uni.$TUIKit.TUIProfileServer = new TUIProfileServer();
  62727. require("./wxcomponents/TUICallKit/TUICallKit/serve/callManager");
  62728. const _sfc_main = {
  62729. onLaunch: function() {
  62730. this.bindTIMEvent();
  62731. uni.$on("refreshIM", () => {
  62732. this.checkLogin();
  62733. });
  62734. },
  62735. onUnload() {
  62736. },
  62737. onShow() {
  62738. uni.getSystemInfo({
  62739. success: (result) => {
  62740. result.statusBarHeight + "px";
  62741. },
  62742. fail: (error2) => {
  62743. formatAppLog("log", "at App.vue:93", error2);
  62744. }
  62745. });
  62746. },
  62747. methods: {
  62748. checkLogin() {
  62749. checkLogin().then(
  62750. (res) => {
  62751. if (res.code == 200) {
  62752. this.imLogin(res.userId);
  62753. }
  62754. },
  62755. (rej) => {
  62756. }
  62757. );
  62758. },
  62759. imLogin(userId) {
  62760. var uid = "U-" + userId;
  62761. var data = { userId: uid };
  62762. getTlsSig(data).then(
  62763. (res) => {
  62764. formatAppLog("log", "at App.vue:127", data);
  62765. if (res.code == 200) {
  62766. var sign = res.data;
  62767. uni.setStorageSync("sign", sign);
  62768. uni.$chat_SDKAppID = appId;
  62769. uni.$chat_userID = uid;
  62770. uni.$chat_userSig = sign;
  62771. uni.$TUIKit.login({ userID: uid, userSig: sign }).then((res2) => {
  62772. formatAppLog("log", "at App.vue:137", "im登录成功");
  62773. });
  62774. } else {
  62775. uni.showToast({
  62776. icon: "none",
  62777. title: "请求失败"
  62778. });
  62779. }
  62780. },
  62781. (rej) => {
  62782. }
  62783. );
  62784. },
  62785. bindTIMEvent() {
  62786. uni.$TUIKit.on(uni.$TIM.EVENT.SDK_READY, this.handleSDKReady);
  62787. uni.$TUIKit.on(uni.$TIM.EVENT.SDK_NOT_READY, this.handleSDKNotReady);
  62788. uni.$TUIKit.on(uni.$TIM.EVENT.KICKED_OUT, this.handleKickedOut);
  62789. },
  62790. // sdk ready 以后可调用 API
  62791. handleSDKReady(event) {
  62792. uni.$chat_isSDKReady = true;
  62793. uni.getStorageSync("userId");
  62794. var avatar = uni.getStorageSync("avatar");
  62795. var nickName = uni.getStorageSync("nickName");
  62796. formatAppLog("log", "at App.vue:162", avatar);
  62797. uni.$TUIKit.updateMyProfile({
  62798. nick: nickName,
  62799. avatar,
  62800. gender: TIM.TYPES.GENDER_MALE,
  62801. selfSignature: "我的个性签名",
  62802. allowType: TIM.TYPES.ALLOW_TYPE_ALLOW_ANY
  62803. }).then((res) => {
  62804. formatAppLog("log", "at App.vue:171", "个人信息修改成功");
  62805. });
  62806. uni.$emit("refreshMsgCount");
  62807. },
  62808. handleSDKNotReady(event) {
  62809. formatAppLog("log", "at App.vue:185", "SDK没有准备" + event);
  62810. },
  62811. handleKickedOut(event) {
  62812. uni.clearStorageSync();
  62813. uni.showToast({
  62814. title: `${this.kickedOutReason(event.data.type)}被踢出。`,
  62815. icon: "none"
  62816. });
  62817. },
  62818. kickedOutReason(type2) {
  62819. switch (type2) {
  62820. case uni.$TIM.TYPES.KICKED_OUT_MULT_ACCOUNT:
  62821. return "多实例登录";
  62822. case uni.$TIM.TYPES.KICKED_OUT_MULT_DEVICE:
  62823. return "多设备登录";
  62824. case uni.$TIM.TYPES.KICKED_OUT_USERSIG_EXPIRED:
  62825. return "userSig 过期";
  62826. case uni.$TIM.TIM.TYPES.KICKED_OUT_REST_API:
  62827. return "REST API kick 接口踢出";
  62828. default:
  62829. return "";
  62830. }
  62831. }
  62832. }
  62833. };
  62834. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/Project/2023/问诊平台/his_user_app/App.vue"]]);
  62835. const { toString } = Object.prototype;
  62836. function isArray(val) {
  62837. return toString.call(val) === "[object Array]";
  62838. }
  62839. function isObject(val) {
  62840. return val !== null && typeof val === "object";
  62841. }
  62842. function isDate(val) {
  62843. return toString.call(val) === "[object Date]";
  62844. }
  62845. function isURLSearchParams(val) {
  62846. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  62847. }
  62848. function forEach(obj, fn) {
  62849. if (obj === null || typeof obj === "undefined") {
  62850. return;
  62851. }
  62852. if (typeof obj !== "object") {
  62853. obj = [obj];
  62854. }
  62855. if (isArray(obj)) {
  62856. for (let i = 0, l = obj.length; i < l; i++) {
  62857. fn.call(null, obj[i], i, obj);
  62858. }
  62859. } else {
  62860. for (const key in obj) {
  62861. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  62862. fn.call(null, obj[key], key, obj);
  62863. }
  62864. }
  62865. }
  62866. }
  62867. function isPlainObject(obj) {
  62868. return Object.prototype.toString.call(obj) === "[object Object]";
  62869. }
  62870. function deepMerge$1() {
  62871. const result = {};
  62872. function assignValue(val, key) {
  62873. if (typeof result[key] === "object" && typeof val === "object") {
  62874. result[key] = deepMerge$1(result[key], val);
  62875. } else if (typeof val === "object") {
  62876. result[key] = deepMerge$1({}, val);
  62877. } else {
  62878. result[key] = val;
  62879. }
  62880. }
  62881. for (let i = 0, l = arguments.length; i < l; i++) {
  62882. forEach(arguments[i], assignValue);
  62883. }
  62884. return result;
  62885. }
  62886. function isUndefined(val) {
  62887. return typeof val === "undefined";
  62888. }
  62889. function encode(val) {
  62890. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  62891. }
  62892. function buildURL(url2, params) {
  62893. if (!params) {
  62894. return url2;
  62895. }
  62896. let serializedParams;
  62897. if (isURLSearchParams(params)) {
  62898. serializedParams = params.toString();
  62899. } else {
  62900. const parts = [];
  62901. forEach(params, (val, key) => {
  62902. if (val === null || typeof val === "undefined") {
  62903. return;
  62904. }
  62905. if (isArray(val)) {
  62906. key = `${key}[]`;
  62907. } else {
  62908. val = [val];
  62909. }
  62910. forEach(val, (v) => {
  62911. if (isDate(v)) {
  62912. v = v.toISOString();
  62913. } else if (isObject(v)) {
  62914. v = JSON.stringify(v);
  62915. }
  62916. parts.push(`${encode(key)}=${encode(v)}`);
  62917. });
  62918. });
  62919. serializedParams = parts.join("&");
  62920. }
  62921. if (serializedParams) {
  62922. const hashmarkIndex = url2.indexOf("#");
  62923. if (hashmarkIndex !== -1) {
  62924. url2 = url2.slice(0, hashmarkIndex);
  62925. }
  62926. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  62927. }
  62928. return url2;
  62929. }
  62930. function isAbsoluteURL(url2) {
  62931. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  62932. }
  62933. function combineURLs(baseURL, relativeURL) {
  62934. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  62935. }
  62936. function buildFullPath(baseURL, requestedURL) {
  62937. if (baseURL && !isAbsoluteURL(requestedURL)) {
  62938. return combineURLs(baseURL, requestedURL);
  62939. }
  62940. return requestedURL;
  62941. }
  62942. function settle(resolve, reject2, response) {
  62943. const { validateStatus } = response.config;
  62944. const status = response.statusCode;
  62945. if (status && (!validateStatus || validateStatus(status))) {
  62946. resolve(response);
  62947. } else {
  62948. reject2(response);
  62949. }
  62950. }
  62951. const mergeKeys$1 = (keys, config2) => {
  62952. const config3 = {};
  62953. keys.forEach((prop) => {
  62954. if (!isUndefined(config2[prop])) {
  62955. config3[prop] = config2[prop];
  62956. }
  62957. });
  62958. return config3;
  62959. };
  62960. const adapter = (config2) => new Promise((resolve, reject2) => {
  62961. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  62962. const _config = {
  62963. url: fullPath,
  62964. header: config2.header,
  62965. complete: (response) => {
  62966. config2.fullPath = fullPath;
  62967. response.config = config2;
  62968. try {
  62969. if (typeof response.data === "string") {
  62970. response.data = JSON.parse(response.data);
  62971. }
  62972. } catch (e) {
  62973. }
  62974. settle(resolve, reject2, response);
  62975. }
  62976. };
  62977. let requestTask;
  62978. if (config2.method === "UPLOAD") {
  62979. delete _config.header["content-type"];
  62980. delete _config.header["Content-Type"];
  62981. const otherConfig = {
  62982. filePath: config2.filePath,
  62983. name: config2.name
  62984. };
  62985. const optionalKeys = [
  62986. "files",
  62987. "timeout",
  62988. "formData"
  62989. ];
  62990. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  62991. } else if (config2.method === "DOWNLOAD") {
  62992. if (!isUndefined(config2.timeout)) {
  62993. _config.timeout = config2.timeout;
  62994. }
  62995. requestTask = uni.downloadFile(_config);
  62996. } else {
  62997. const optionalKeys = [
  62998. "data",
  62999. "method",
  63000. "timeout",
  63001. "dataType",
  63002. "responseType",
  63003. "sslVerify",
  63004. "firstIpv4"
  63005. ];
  63006. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  63007. }
  63008. if (config2.getTask) {
  63009. config2.getTask(requestTask, config2);
  63010. }
  63011. });
  63012. const dispatchRequest = (config2) => adapter(config2);
  63013. function InterceptorManager() {
  63014. this.handlers = [];
  63015. }
  63016. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  63017. this.handlers.push({
  63018. fulfilled,
  63019. rejected
  63020. });
  63021. return this.handlers.length - 1;
  63022. };
  63023. InterceptorManager.prototype.eject = function eject(id) {
  63024. if (this.handlers[id]) {
  63025. this.handlers[id] = null;
  63026. }
  63027. };
  63028. InterceptorManager.prototype.forEach = function forEach2(fn) {
  63029. this.handlers.forEach((h) => {
  63030. if (h !== null) {
  63031. fn(h);
  63032. }
  63033. });
  63034. };
  63035. const mergeKeys = (keys, globalsConfig, config2) => {
  63036. const config3 = {};
  63037. keys.forEach((prop) => {
  63038. if (!isUndefined(config2[prop])) {
  63039. config3[prop] = config2[prop];
  63040. } else if (!isUndefined(globalsConfig[prop])) {
  63041. config3[prop] = globalsConfig[prop];
  63042. }
  63043. });
  63044. return config3;
  63045. };
  63046. const mergeConfig = (globalsConfig, config2 = {}) => {
  63047. const method = config2.method || globalsConfig.method || "GET";
  63048. let config3 = {
  63049. baseURL: globalsConfig.baseURL || "",
  63050. method,
  63051. url: config2.url || "",
  63052. params: config2.params || {},
  63053. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  63054. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  63055. };
  63056. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  63057. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  63058. if (method === "DOWNLOAD") {
  63059. if (!isUndefined(config2.timeout)) {
  63060. config3.timeout = config2.timeout;
  63061. } else if (!isUndefined(globalsConfig.timeout)) {
  63062. config3.timeout = globalsConfig.timeout;
  63063. }
  63064. } else if (method === "UPLOAD") {
  63065. delete config3.header["content-type"];
  63066. delete config3.header["Content-Type"];
  63067. const uploadKeys = [
  63068. "files",
  63069. "filePath",
  63070. "name",
  63071. "timeout",
  63072. "formData"
  63073. ];
  63074. uploadKeys.forEach((prop) => {
  63075. if (!isUndefined(config2[prop])) {
  63076. config3[prop] = config2[prop];
  63077. }
  63078. });
  63079. if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
  63080. config3.timeout = globalsConfig.timeout;
  63081. }
  63082. } else {
  63083. const defaultsKeys = [
  63084. "data",
  63085. "timeout",
  63086. "dataType",
  63087. "responseType",
  63088. "sslVerify",
  63089. "firstIpv4"
  63090. ];
  63091. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  63092. }
  63093. return config3;
  63094. };
  63095. const defaults = {
  63096. baseURL: "",
  63097. header: {},
  63098. method: "GET",
  63099. dataType: "json",
  63100. responseType: "text",
  63101. custom: {},
  63102. timeout: 6e4,
  63103. sslVerify: true,
  63104. firstIpv4: false,
  63105. validateStatus: function validateStatus(status) {
  63106. return status >= 200 && status < 300;
  63107. }
  63108. };
  63109. var clone = function() {
  63110. function _instanceof(obj, type2) {
  63111. return type2 != null && obj instanceof type2;
  63112. }
  63113. var nativeMap;
  63114. try {
  63115. nativeMap = Map;
  63116. } catch (_) {
  63117. nativeMap = function() {
  63118. };
  63119. }
  63120. var nativeSet;
  63121. try {
  63122. nativeSet = Set;
  63123. } catch (_) {
  63124. nativeSet = function() {
  63125. };
  63126. }
  63127. var nativePromise;
  63128. try {
  63129. nativePromise = Promise;
  63130. } catch (_) {
  63131. nativePromise = function() {
  63132. };
  63133. }
  63134. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  63135. if (typeof circular === "object") {
  63136. depth = circular.depth;
  63137. prototype = circular.prototype;
  63138. includeNonEnumerable = circular.includeNonEnumerable;
  63139. circular = circular.circular;
  63140. }
  63141. var allParents = [];
  63142. var allChildren = [];
  63143. var useBuffer = typeof Buffer != "undefined";
  63144. if (typeof circular == "undefined")
  63145. circular = true;
  63146. if (typeof depth == "undefined")
  63147. depth = Infinity;
  63148. function _clone(parent2, depth2) {
  63149. if (parent2 === null)
  63150. return null;
  63151. if (depth2 === 0)
  63152. return parent2;
  63153. var child;
  63154. var proto;
  63155. if (typeof parent2 != "object") {
  63156. return parent2;
  63157. }
  63158. if (_instanceof(parent2, nativeMap)) {
  63159. child = new nativeMap();
  63160. } else if (_instanceof(parent2, nativeSet)) {
  63161. child = new nativeSet();
  63162. } else if (_instanceof(parent2, nativePromise)) {
  63163. child = new nativePromise(function(resolve, reject2) {
  63164. parent2.then(function(value2) {
  63165. resolve(_clone(value2, depth2 - 1));
  63166. }, function(err) {
  63167. reject2(_clone(err, depth2 - 1));
  63168. });
  63169. });
  63170. } else if (clone2.__isArray(parent2)) {
  63171. child = [];
  63172. } else if (clone2.__isRegExp(parent2)) {
  63173. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  63174. if (parent2.lastIndex)
  63175. child.lastIndex = parent2.lastIndex;
  63176. } else if (clone2.__isDate(parent2)) {
  63177. child = new Date(parent2.getTime());
  63178. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  63179. if (Buffer.from) {
  63180. child = Buffer.from(parent2);
  63181. } else {
  63182. child = new Buffer(parent2.length);
  63183. parent2.copy(child);
  63184. }
  63185. return child;
  63186. } else if (_instanceof(parent2, Error)) {
  63187. child = Object.create(parent2);
  63188. } else {
  63189. if (typeof prototype == "undefined") {
  63190. proto = Object.getPrototypeOf(parent2);
  63191. child = Object.create(proto);
  63192. } else {
  63193. child = Object.create(prototype);
  63194. proto = prototype;
  63195. }
  63196. }
  63197. if (circular) {
  63198. var index2 = allParents.indexOf(parent2);
  63199. if (index2 != -1) {
  63200. return allChildren[index2];
  63201. }
  63202. allParents.push(parent2);
  63203. allChildren.push(child);
  63204. }
  63205. if (_instanceof(parent2, nativeMap)) {
  63206. parent2.forEach(function(value2, key) {
  63207. var keyChild = _clone(key, depth2 - 1);
  63208. var valueChild = _clone(value2, depth2 - 1);
  63209. child.set(keyChild, valueChild);
  63210. });
  63211. }
  63212. if (_instanceof(parent2, nativeSet)) {
  63213. parent2.forEach(function(value2) {
  63214. var entryChild = _clone(value2, depth2 - 1);
  63215. child.add(entryChild);
  63216. });
  63217. }
  63218. for (var i in parent2) {
  63219. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  63220. if (attrs) {
  63221. child[i] = _clone(parent2[i], depth2 - 1);
  63222. }
  63223. try {
  63224. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  63225. if (objProperty.set === "undefined") {
  63226. continue;
  63227. }
  63228. child[i] = _clone(parent2[i], depth2 - 1);
  63229. } catch (e) {
  63230. if (e instanceof TypeError) {
  63231. continue;
  63232. } else if (e instanceof ReferenceError) {
  63233. continue;
  63234. }
  63235. }
  63236. }
  63237. if (Object.getOwnPropertySymbols) {
  63238. var symbols = Object.getOwnPropertySymbols(parent2);
  63239. for (var i = 0; i < symbols.length; i++) {
  63240. var symbol = symbols[i];
  63241. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  63242. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  63243. continue;
  63244. }
  63245. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  63246. Object.defineProperty(child, symbol, descriptor);
  63247. }
  63248. }
  63249. if (includeNonEnumerable) {
  63250. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  63251. for (var i = 0; i < allPropertyNames.length; i++) {
  63252. var propertyName = allPropertyNames[i];
  63253. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  63254. if (descriptor && descriptor.enumerable) {
  63255. continue;
  63256. }
  63257. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  63258. Object.defineProperty(child, propertyName, descriptor);
  63259. }
  63260. }
  63261. return child;
  63262. }
  63263. return _clone(parent, depth);
  63264. }
  63265. clone2.clonePrototype = function clonePrototype(parent) {
  63266. if (parent === null)
  63267. return null;
  63268. var c = function() {
  63269. };
  63270. c.prototype = parent;
  63271. return new c();
  63272. };
  63273. function __objToStr(o) {
  63274. return Object.prototype.toString.call(o);
  63275. }
  63276. clone2.__objToStr = __objToStr;
  63277. function __isDate(o) {
  63278. return typeof o === "object" && __objToStr(o) === "[object Date]";
  63279. }
  63280. clone2.__isDate = __isDate;
  63281. function __isArray(o) {
  63282. return typeof o === "object" && __objToStr(o) === "[object Array]";
  63283. }
  63284. clone2.__isArray = __isArray;
  63285. function __isRegExp(o) {
  63286. return typeof o === "object" && __objToStr(o) === "[object RegExp]";
  63287. }
  63288. clone2.__isRegExp = __isRegExp;
  63289. function __getRegExpFlags(re) {
  63290. var flags = "";
  63291. if (re.global)
  63292. flags += "g";
  63293. if (re.ignoreCase)
  63294. flags += "i";
  63295. if (re.multiline)
  63296. flags += "m";
  63297. return flags;
  63298. }
  63299. clone2.__getRegExpFlags = __getRegExpFlags;
  63300. return clone2;
  63301. }();
  63302. class Request {
  63303. /**
  63304. * @param {Object} arg - 全局配置
  63305. * @param {String} arg.baseURL - 全局根路径
  63306. * @param {Object} arg.header - 全局header
  63307. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  63308. * @param {String} arg.dataType = [json] - 全局默认的dataType
  63309. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  63310. * @param {Object} arg.custom - 全局默认的自定义参数
  63311. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  63312. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  63313. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  63314. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  63315. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  63316. */
  63317. constructor(arg = {}) {
  63318. if (!isPlainObject(arg)) {
  63319. arg = {};
  63320. formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
  63321. }
  63322. this.config = clone({ ...defaults, ...arg });
  63323. this.interceptors = {
  63324. request: new InterceptorManager(),
  63325. response: new InterceptorManager()
  63326. };
  63327. }
  63328. /**
  63329. * @Function
  63330. * @param {Request~setConfigCallback} f - 设置全局默认配置
  63331. */
  63332. setConfig(f) {
  63333. this.config = f(this.config);
  63334. }
  63335. middleware(config2) {
  63336. config2 = mergeConfig(this.config, config2);
  63337. const chain = [dispatchRequest, void 0];
  63338. let promise2 = Promise.resolve(config2);
  63339. this.interceptors.request.forEach((interceptor) => {
  63340. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  63341. });
  63342. this.interceptors.response.forEach((interceptor) => {
  63343. chain.push(interceptor.fulfilled, interceptor.rejected);
  63344. });
  63345. while (chain.length) {
  63346. promise2 = promise2.then(chain.shift(), chain.shift());
  63347. }
  63348. return promise2;
  63349. }
  63350. /**
  63351. * @Function
  63352. * @param {Object} config - 请求配置项
  63353. * @prop {String} options.url - 请求路径
  63354. * @prop {Object} options.data - 请求参数
  63355. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  63356. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  63357. * @prop {Object} [options.header = config.header] - 请求header
  63358. * @prop {Object} [options.method = config.method] - 请求方法
  63359. * @returns {Promise<unknown>}
  63360. */
  63361. request(config2 = {}) {
  63362. return this.middleware(config2);
  63363. }
  63364. get(url2, options = {}) {
  63365. return this.middleware({
  63366. url: url2,
  63367. method: "GET",
  63368. ...options
  63369. });
  63370. }
  63371. post(url2, data, options = {}) {
  63372. return this.middleware({
  63373. url: url2,
  63374. data,
  63375. method: "POST",
  63376. ...options
  63377. });
  63378. }
  63379. put(url2, data, options = {}) {
  63380. return this.middleware({
  63381. url: url2,
  63382. data,
  63383. method: "PUT",
  63384. ...options
  63385. });
  63386. }
  63387. delete(url2, data, options = {}) {
  63388. return this.middleware({
  63389. url: url2,
  63390. data,
  63391. method: "DELETE",
  63392. ...options
  63393. });
  63394. }
  63395. options(url2, data, options = {}) {
  63396. return this.middleware({
  63397. url: url2,
  63398. data,
  63399. method: "OPTIONS",
  63400. ...options
  63401. });
  63402. }
  63403. upload(url2, config2 = {}) {
  63404. config2.url = url2;
  63405. config2.method = "UPLOAD";
  63406. return this.middleware(config2);
  63407. }
  63408. download(url2, config2 = {}) {
  63409. config2.url = url2;
  63410. config2.method = "DOWNLOAD";
  63411. return this.middleware(config2);
  63412. }
  63413. }
  63414. class Router {
  63415. constructor() {
  63416. this.config = {
  63417. type: "navigateTo",
  63418. url: "",
  63419. delta: 1,
  63420. // navigateBack页面后退时,回退的层数
  63421. params: {},
  63422. // 传递的参数
  63423. animationType: "pop-in",
  63424. // 窗口动画,只在APP有效
  63425. animationDuration: 300,
  63426. // 窗口动画持续时间,单位毫秒,只在APP有效
  63427. intercept: false
  63428. // 是否需要拦截
  63429. };
  63430. this.route = this.route.bind(this);
  63431. }
  63432. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  63433. addRootPath(url2) {
  63434. return url2[0] === "/" ? url2 : `/${url2}`;
  63435. }
  63436. // 整合路由参数
  63437. mixinParam(url2, params) {
  63438. url2 = url2 && this.addRootPath(url2);
  63439. let query = "";
  63440. if (/.*\/.*\?.*=.*/.test(url2)) {
  63441. query = uni.$u.queryParams(params, false);
  63442. return url2 += `&${query}`;
  63443. }
  63444. query = uni.$u.queryParams(params);
  63445. return url2 += query;
  63446. }
  63447. // 对外的方法名称
  63448. async route(options = {}, params = {}) {
  63449. let mergeConfig2 = {};
  63450. if (typeof options === "string") {
  63451. mergeConfig2.url = this.mixinParam(options, params);
  63452. mergeConfig2.type = "navigateTo";
  63453. } else {
  63454. mergeConfig2 = uni.$u.deepMerge(this.config, options);
  63455. mergeConfig2.url = this.mixinParam(options.url, options.params);
  63456. }
  63457. if (mergeConfig2.url === uni.$u.page())
  63458. return;
  63459. if (params.intercept) {
  63460. this.config.intercept = params.intercept;
  63461. }
  63462. mergeConfig2.params = params;
  63463. mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
  63464. if (typeof uni.$u.routeIntercept === "function") {
  63465. const isNext = await new Promise((resolve, reject2) => {
  63466. uni.$u.routeIntercept(mergeConfig2, resolve);
  63467. });
  63468. isNext && this.openPage(mergeConfig2);
  63469. } else {
  63470. this.openPage(mergeConfig2);
  63471. }
  63472. }
  63473. // 执行路由跳转
  63474. openPage(config2) {
  63475. const {
  63476. url: url2,
  63477. type: type2,
  63478. delta,
  63479. animationType,
  63480. animationDuration
  63481. } = config2;
  63482. if (config2.type == "navigateTo" || config2.type == "to") {
  63483. uni.navigateTo({
  63484. url: url2,
  63485. animationType,
  63486. animationDuration
  63487. });
  63488. }
  63489. if (config2.type == "redirectTo" || config2.type == "redirect") {
  63490. uni.redirectTo({
  63491. url: url2
  63492. });
  63493. }
  63494. if (config2.type == "switchTab" || config2.type == "tab") {
  63495. uni.switchTab({
  63496. url: url2
  63497. });
  63498. }
  63499. if (config2.type == "reLaunch" || config2.type == "launch") {
  63500. uni.reLaunch({
  63501. url: url2
  63502. });
  63503. }
  63504. if (config2.type == "navigateBack" || config2.type == "back") {
  63505. uni.navigateBack({
  63506. delta
  63507. });
  63508. }
  63509. }
  63510. }
  63511. const route = new Router().route;
  63512. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  63513. const startRGB = hexToRgb(startColor, false);
  63514. const startR = startRGB[0];
  63515. const startG = startRGB[1];
  63516. const startB = startRGB[2];
  63517. const endRGB = hexToRgb(endColor, false);
  63518. const endR = endRGB[0];
  63519. const endG = endRGB[1];
  63520. const endB = endRGB[2];
  63521. const sR = (endR - startR) / step;
  63522. const sG = (endG - startG) / step;
  63523. const sB = (endB - startB) / step;
  63524. const colorArr = [];
  63525. for (let i = 0; i < step; i++) {
  63526. let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  63527. if (i === 0)
  63528. hex = rgbToHex(startColor);
  63529. if (i === step - 1)
  63530. hex = rgbToHex(endColor);
  63531. colorArr.push(hex);
  63532. }
  63533. return colorArr;
  63534. }
  63535. function hexToRgb(sColor, str = true) {
  63536. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  63537. sColor = String(sColor).toLowerCase();
  63538. if (sColor && reg.test(sColor)) {
  63539. if (sColor.length === 4) {
  63540. let sColorNew = "#";
  63541. for (let i = 1; i < 4; i += 1) {
  63542. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  63543. }
  63544. sColor = sColorNew;
  63545. }
  63546. const sColorChange = [];
  63547. for (let i = 1; i < 7; i += 2) {
  63548. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  63549. }
  63550. if (!str) {
  63551. return sColorChange;
  63552. }
  63553. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  63554. }
  63555. if (/^(rgb|RGB)/.test(sColor)) {
  63556. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  63557. return arr.map((val) => Number(val));
  63558. }
  63559. return sColor;
  63560. }
  63561. function rgbToHex(rgb) {
  63562. const _this = rgb;
  63563. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  63564. if (/^(rgb|RGB)/.test(_this)) {
  63565. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  63566. let strHex = "#";
  63567. for (let i = 0; i < aColor.length; i++) {
  63568. let hex = Number(aColor[i]).toString(16);
  63569. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  63570. if (hex === "0") {
  63571. hex += hex;
  63572. }
  63573. strHex += hex;
  63574. }
  63575. if (strHex.length !== 7) {
  63576. strHex = _this;
  63577. }
  63578. return strHex;
  63579. }
  63580. if (reg.test(_this)) {
  63581. const aNum = _this.replace(/#/, "").split("");
  63582. if (aNum.length === 6) {
  63583. return _this;
  63584. }
  63585. if (aNum.length === 3) {
  63586. let numHex = "#";
  63587. for (let i = 0; i < aNum.length; i += 1) {
  63588. numHex += aNum[i] + aNum[i];
  63589. }
  63590. return numHex;
  63591. }
  63592. } else {
  63593. return _this;
  63594. }
  63595. }
  63596. function colorToRgba(color2, alpha) {
  63597. color2 = rgbToHex(color2);
  63598. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  63599. let sColor = String(color2).toLowerCase();
  63600. if (sColor && reg.test(sColor)) {
  63601. if (sColor.length === 4) {
  63602. let sColorNew = "#";
  63603. for (let i = 1; i < 4; i += 1) {
  63604. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  63605. }
  63606. sColor = sColorNew;
  63607. }
  63608. const sColorChange = [];
  63609. for (let i = 1; i < 7; i += 2) {
  63610. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  63611. }
  63612. return `rgba(${sColorChange.join(",")},${alpha})`;
  63613. }
  63614. return sColor;
  63615. }
  63616. const colorGradient$1 = {
  63617. colorGradient,
  63618. hexToRgb,
  63619. rgbToHex,
  63620. colorToRgba
  63621. };
  63622. function email(value2) {
  63623. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  63624. }
  63625. function mobile(value2) {
  63626. return /^1[23456789]\d{9}$/.test(value2);
  63627. }
  63628. function url(value2) {
  63629. 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);
  63630. }
  63631. function date(value2) {
  63632. if (!value2)
  63633. return false;
  63634. if (number(value2))
  63635. value2 = +value2;
  63636. return !/Invalid|NaN/.test(new Date(value2).toString());
  63637. }
  63638. function dateISO(value2) {
  63639. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  63640. }
  63641. function number(value2) {
  63642. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  63643. }
  63644. function string(value2) {
  63645. return typeof value2 === "string";
  63646. }
  63647. function digits(value2) {
  63648. return /^\d+$/.test(value2);
  63649. }
  63650. function idCard(value2) {
  63651. 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(
  63652. value2
  63653. );
  63654. }
  63655. function carNo(value2) {
  63656. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  63657. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  63658. if (value2.length === 7) {
  63659. return creg.test(value2);
  63660. }
  63661. if (value2.length === 8) {
  63662. return xreg.test(value2);
  63663. }
  63664. return false;
  63665. }
  63666. function amount(value2) {
  63667. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  63668. }
  63669. function chinese(value2) {
  63670. const reg = /^[\u4e00-\u9fa5]+$/gi;
  63671. return reg.test(value2);
  63672. }
  63673. function letter(value2) {
  63674. return /^[a-zA-Z]*$/.test(value2);
  63675. }
  63676. function enOrNum(value2) {
  63677. const reg = /^[0-9a-zA-Z]*$/g;
  63678. return reg.test(value2);
  63679. }
  63680. function contains(value2, param) {
  63681. return value2.indexOf(param) >= 0;
  63682. }
  63683. function range$1(value2, param) {
  63684. return value2 >= param[0] && value2 <= param[1];
  63685. }
  63686. function rangeLength(value2, param) {
  63687. return value2.length >= param[0] && value2.length <= param[1];
  63688. }
  63689. function landline(value2) {
  63690. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  63691. return reg.test(value2);
  63692. }
  63693. function empty(value2) {
  63694. switch (typeof value2) {
  63695. case "undefined":
  63696. return true;
  63697. case "string":
  63698. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  63699. return true;
  63700. break;
  63701. case "boolean":
  63702. if (!value2)
  63703. return true;
  63704. break;
  63705. case "number":
  63706. if (value2 === 0 || isNaN(value2))
  63707. return true;
  63708. break;
  63709. case "object":
  63710. if (value2 === null || value2.length === 0)
  63711. return true;
  63712. for (const i in value2) {
  63713. return false;
  63714. }
  63715. return true;
  63716. }
  63717. return false;
  63718. }
  63719. function jsonString(value2) {
  63720. if (typeof value2 === "string") {
  63721. try {
  63722. const obj = JSON.parse(value2);
  63723. if (typeof obj === "object" && obj) {
  63724. return true;
  63725. }
  63726. return false;
  63727. } catch (e) {
  63728. return false;
  63729. }
  63730. }
  63731. return false;
  63732. }
  63733. function array(value2) {
  63734. if (typeof Array.isArray === "function") {
  63735. return Array.isArray(value2);
  63736. }
  63737. return Object.prototype.toString.call(value2) === "[object Array]";
  63738. }
  63739. function object(value2) {
  63740. return Object.prototype.toString.call(value2) === "[object Object]";
  63741. }
  63742. function code(value2, len = 6) {
  63743. return new RegExp(`^\\d{${len}}$`).test(value2);
  63744. }
  63745. function func(value2) {
  63746. return typeof value2 === "function";
  63747. }
  63748. function promise(value2) {
  63749. return object(value2) && func(value2.then) && func(value2.catch);
  63750. }
  63751. function image(value2) {
  63752. const newValue = value2.split("?")[0];
  63753. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  63754. return IMAGE_REGEXP.test(newValue);
  63755. }
  63756. function video(value2) {
  63757. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  63758. return VIDEO_REGEXP.test(value2);
  63759. }
  63760. function regExp(o) {
  63761. return o && Object.prototype.toString.call(o) === "[object RegExp]";
  63762. }
  63763. const test = {
  63764. email,
  63765. mobile,
  63766. url,
  63767. date,
  63768. dateISO,
  63769. number,
  63770. digits,
  63771. idCard,
  63772. carNo,
  63773. amount,
  63774. chinese,
  63775. letter,
  63776. enOrNum,
  63777. contains,
  63778. range: range$1,
  63779. rangeLength,
  63780. empty,
  63781. isEmpty: empty,
  63782. jsonString,
  63783. landline,
  63784. object,
  63785. array,
  63786. code,
  63787. func,
  63788. promise,
  63789. video,
  63790. image,
  63791. regExp,
  63792. string
  63793. };
  63794. let timeout = null;
  63795. function debounce(func2, wait = 500, immediate = false) {
  63796. if (timeout !== null)
  63797. clearTimeout(timeout);
  63798. if (immediate) {
  63799. const callNow = !timeout;
  63800. timeout = setTimeout(() => {
  63801. timeout = null;
  63802. }, wait);
  63803. if (callNow)
  63804. typeof func2 === "function" && func2();
  63805. } else {
  63806. timeout = setTimeout(() => {
  63807. typeof func2 === "function" && func2();
  63808. }, wait);
  63809. }
  63810. }
  63811. let flag;
  63812. function throttle(func2, wait = 500, immediate = true) {
  63813. if (immediate) {
  63814. if (!flag) {
  63815. flag = true;
  63816. typeof func2 === "function" && func2();
  63817. setTimeout(() => {
  63818. flag = false;
  63819. }, wait);
  63820. }
  63821. } else if (!flag) {
  63822. flag = true;
  63823. setTimeout(() => {
  63824. flag = false;
  63825. typeof func2 === "function" && func2();
  63826. }, wait);
  63827. }
  63828. }
  63829. function strip(num, precision = 15) {
  63830. return +parseFloat(Number(num).toPrecision(precision));
  63831. }
  63832. function digitLength(num) {
  63833. const eSplit = num.toString().split(/[eE]/);
  63834. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  63835. return len > 0 ? len : 0;
  63836. }
  63837. function float2Fixed(num) {
  63838. if (num.toString().indexOf("e") === -1) {
  63839. return Number(num.toString().replace(".", ""));
  63840. }
  63841. const dLen = digitLength(num);
  63842. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  63843. }
  63844. function checkBoundary(num) {
  63845. {
  63846. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  63847. formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  63848. }
  63849. }
  63850. }
  63851. function iteratorOperation(arr, operation) {
  63852. const [num1, num2, ...others] = arr;
  63853. let res = operation(num1, num2);
  63854. others.forEach((num) => {
  63855. res = operation(res, num);
  63856. });
  63857. return res;
  63858. }
  63859. function times(...nums) {
  63860. if (nums.length > 2) {
  63861. return iteratorOperation(nums, times);
  63862. }
  63863. const [num1, num2] = nums;
  63864. const num1Changed = float2Fixed(num1);
  63865. const num2Changed = float2Fixed(num2);
  63866. const baseNum = digitLength(num1) + digitLength(num2);
  63867. const leftValue = num1Changed * num2Changed;
  63868. checkBoundary(leftValue);
  63869. return leftValue / Math.pow(10, baseNum);
  63870. }
  63871. function divide(...nums) {
  63872. if (nums.length > 2) {
  63873. return iteratorOperation(nums, divide);
  63874. }
  63875. const [num1, num2] = nums;
  63876. const num1Changed = float2Fixed(num1);
  63877. const num2Changed = float2Fixed(num2);
  63878. checkBoundary(num1Changed);
  63879. checkBoundary(num2Changed);
  63880. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  63881. }
  63882. function round(num, ratio) {
  63883. const base = Math.pow(10, ratio);
  63884. let result = divide(Math.round(Math.abs(times(num, base))), base);
  63885. if (num < 0 && result !== 0) {
  63886. result = times(result, -1);
  63887. }
  63888. return result;
  63889. }
  63890. function range(min = 0, max = 0, value2 = 0) {
  63891. return Math.max(min, Math.min(max, Number(value2)));
  63892. }
  63893. function getPx(value2, unit = false) {
  63894. if (test.number(value2)) {
  63895. return unit ? `${value2}px` : Number(value2);
  63896. }
  63897. if (/(rpx|upx)$/.test(value2)) {
  63898. return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
  63899. }
  63900. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  63901. }
  63902. function sleep(value2 = 30) {
  63903. return new Promise((resolve) => {
  63904. setTimeout(() => {
  63905. resolve();
  63906. }, value2);
  63907. });
  63908. }
  63909. function os() {
  63910. return uni.getSystemInfoSync().platform.toLowerCase();
  63911. }
  63912. function sys() {
  63913. return uni.getSystemInfoSync();
  63914. }
  63915. function random(min, max) {
  63916. if (min >= 0 && max > 0 && max >= min) {
  63917. const gab = max - min + 1;
  63918. return Math.floor(Math.random() * gab + min);
  63919. }
  63920. return 0;
  63921. }
  63922. function guid(len = 32, firstU = true, radix = null) {
  63923. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  63924. const uuid = [];
  63925. radix = radix || chars.length;
  63926. if (len) {
  63927. for (let i = 0; i < len; i++)
  63928. uuid[i] = chars[0 | Math.random() * radix];
  63929. } else {
  63930. let r;
  63931. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  63932. uuid[14] = "4";
  63933. for (let i = 0; i < 36; i++) {
  63934. if (!uuid[i]) {
  63935. r = 0 | Math.random() * 16;
  63936. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  63937. }
  63938. }
  63939. }
  63940. if (firstU) {
  63941. uuid.shift();
  63942. return `u${uuid.join("")}`;
  63943. }
  63944. return uuid.join("");
  63945. }
  63946. function $parent(name = void 0) {
  63947. let parent = this.$parent;
  63948. while (parent) {
  63949. if (parent.$options && parent.$options.name !== name) {
  63950. parent = parent.$parent;
  63951. } else {
  63952. return parent;
  63953. }
  63954. }
  63955. return false;
  63956. }
  63957. function addStyle(customStyle, target = "object") {
  63958. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  63959. return customStyle;
  63960. }
  63961. if (target === "object") {
  63962. customStyle = trim(customStyle);
  63963. const styleArray = customStyle.split(";");
  63964. const style = {};
  63965. for (let i = 0; i < styleArray.length; i++) {
  63966. if (styleArray[i]) {
  63967. const item = styleArray[i].split(":");
  63968. style[trim(item[0])] = trim(item[1]);
  63969. }
  63970. }
  63971. return style;
  63972. }
  63973. let string2 = "";
  63974. for (const i in customStyle) {
  63975. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  63976. string2 += `${key}:${customStyle[i]};`;
  63977. }
  63978. return trim(string2);
  63979. }
  63980. function addUnit(value2 = "auto", unit = "") {
  63981. if (!unit) {
  63982. unit = uni.$u.config.unit || "px";
  63983. }
  63984. value2 = String(value2);
  63985. return test.number(value2) ? `${value2}${unit}` : value2;
  63986. }
  63987. function deepClone(obj) {
  63988. if ([null, void 0, NaN, false].includes(obj))
  63989. return obj;
  63990. if (typeof obj !== "object" && typeof obj !== "function") {
  63991. return obj;
  63992. }
  63993. const o = test.array(obj) ? [] : {};
  63994. for (const i in obj) {
  63995. if (obj.hasOwnProperty(i)) {
  63996. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  63997. }
  63998. }
  63999. return o;
  64000. }
  64001. function deepMerge(target = {}, source = {}) {
  64002. target = deepClone(target);
  64003. if (typeof target !== "object" || typeof source !== "object")
  64004. return false;
  64005. for (const prop in source) {
  64006. if (!source.hasOwnProperty(prop))
  64007. continue;
  64008. if (prop in target) {
  64009. if (typeof target[prop] !== "object") {
  64010. target[prop] = source[prop];
  64011. } else if (typeof source[prop] !== "object") {
  64012. target[prop] = source[prop];
  64013. } else if (target[prop].concat && source[prop].concat) {
  64014. target[prop] = target[prop].concat(source[prop]);
  64015. } else {
  64016. target[prop] = deepMerge(target[prop], source[prop]);
  64017. }
  64018. } else {
  64019. target[prop] = source[prop];
  64020. }
  64021. }
  64022. return target;
  64023. }
  64024. function error(err) {
  64025. {
  64026. formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
  64027. }
  64028. }
  64029. function randomArray(array3 = []) {
  64030. return array3.sort(() => Math.random() - 0.5);
  64031. }
  64032. if (!String.prototype.padStart) {
  64033. String.prototype.padStart = function(maxLength, fillString = " ") {
  64034. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  64035. throw new TypeError(
  64036. "fillString must be String"
  64037. );
  64038. }
  64039. const str = this;
  64040. if (str.length >= maxLength)
  64041. return String(str);
  64042. const fillLength = maxLength - str.length;
  64043. let times2 = Math.ceil(fillLength / fillString.length);
  64044. while (times2 >>= 1) {
  64045. fillString += fillString;
  64046. if (times2 === 1) {
  64047. fillString += fillString;
  64048. }
  64049. }
  64050. return fillString.slice(0, fillLength) + str;
  64051. };
  64052. }
  64053. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  64054. let date3;
  64055. if (!dateTime) {
  64056. date3 = /* @__PURE__ */ new Date();
  64057. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  64058. date3 = new Date(dateTime * 1e3);
  64059. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  64060. date3 = new Date(Number(dateTime));
  64061. } else {
  64062. date3 = new Date(
  64063. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  64064. );
  64065. }
  64066. const timeSource = {
  64067. "y": date3.getFullYear().toString(),
  64068. // 年
  64069. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  64070. // 月
  64071. "d": date3.getDate().toString().padStart(2, "0"),
  64072. // 日
  64073. "h": date3.getHours().toString().padStart(2, "0"),
  64074. // 时
  64075. "M": date3.getMinutes().toString().padStart(2, "0"),
  64076. // 分
  64077. "s": date3.getSeconds().toString().padStart(2, "0")
  64078. // 秒
  64079. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  64080. };
  64081. for (const key in timeSource) {
  64082. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  64083. if (ret) {
  64084. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  64085. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  64086. }
  64087. }
  64088. return formatStr;
  64089. }
  64090. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  64091. if (timestamp == null)
  64092. timestamp = Number(/* @__PURE__ */ new Date());
  64093. timestamp = parseInt(timestamp);
  64094. if (timestamp.toString().length == 10)
  64095. timestamp *= 1e3;
  64096. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  64097. timer = parseInt(timer / 1e3);
  64098. let tips = "";
  64099. switch (true) {
  64100. case timer < 300:
  64101. tips = "刚刚";
  64102. break;
  64103. case (timer >= 300 && timer < 3600):
  64104. tips = `${parseInt(timer / 60)}分钟前`;
  64105. break;
  64106. case (timer >= 3600 && timer < 86400):
  64107. tips = `${parseInt(timer / 3600)}小时前`;
  64108. break;
  64109. case (timer >= 86400 && timer < 2592e3):
  64110. tips = `${parseInt(timer / 86400)}天前`;
  64111. break;
  64112. default:
  64113. if (format2 === false) {
  64114. if (timer >= 2592e3 && timer < 365 * 86400) {
  64115. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  64116. } else {
  64117. tips = `${parseInt(timer / (86400 * 365))}年前`;
  64118. }
  64119. } else {
  64120. tips = timeFormat(timestamp, format2);
  64121. }
  64122. }
  64123. return tips;
  64124. }
  64125. function trim(str, pos = "both") {
  64126. str = String(str);
  64127. if (pos == "both") {
  64128. return str.replace(/^\s+|\s+$/g, "");
  64129. }
  64130. if (pos == "left") {
  64131. return str.replace(/^\s*/, "");
  64132. }
  64133. if (pos == "right") {
  64134. return str.replace(/(\s*$)/g, "");
  64135. }
  64136. if (pos == "all") {
  64137. return str.replace(/\s+/g, "");
  64138. }
  64139. return str;
  64140. }
  64141. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  64142. const prefix = isPrefix ? "?" : "";
  64143. const _result = [];
  64144. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  64145. arrayFormat = "brackets";
  64146. for (const key in data) {
  64147. const value2 = data[key];
  64148. if (["", void 0, null].indexOf(value2) >= 0) {
  64149. continue;
  64150. }
  64151. if (value2.constructor === Array) {
  64152. switch (arrayFormat) {
  64153. case "indices":
  64154. for (let i = 0; i < value2.length; i++) {
  64155. _result.push(`${key}[${i}]=${value2[i]}`);
  64156. }
  64157. break;
  64158. case "brackets":
  64159. value2.forEach((_value) => {
  64160. _result.push(`${key}[]=${_value}`);
  64161. });
  64162. break;
  64163. case "repeat":
  64164. value2.forEach((_value) => {
  64165. _result.push(`${key}=${_value}`);
  64166. });
  64167. break;
  64168. case "comma":
  64169. let commaStr = "";
  64170. value2.forEach((_value) => {
  64171. commaStr += (commaStr ? "," : "") + _value;
  64172. });
  64173. _result.push(`${key}=${commaStr}`);
  64174. break;
  64175. default:
  64176. value2.forEach((_value) => {
  64177. _result.push(`${key}[]=${_value}`);
  64178. });
  64179. }
  64180. } else {
  64181. _result.push(`${key}=${value2}`);
  64182. }
  64183. }
  64184. return _result.length ? prefix + _result.join("&") : "";
  64185. }
  64186. function toast(title, duration = 2e3) {
  64187. uni.showToast({
  64188. title: String(title),
  64189. icon: "none",
  64190. duration
  64191. });
  64192. }
  64193. function type2icon(type2 = "success", fill = false) {
  64194. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  64195. type2 = "success";
  64196. let iconName = "";
  64197. switch (type2) {
  64198. case "primary":
  64199. iconName = "info-circle";
  64200. break;
  64201. case "info":
  64202. iconName = "info-circle";
  64203. break;
  64204. case "error":
  64205. iconName = "close-circle";
  64206. break;
  64207. case "warning":
  64208. iconName = "error-circle";
  64209. break;
  64210. case "success":
  64211. iconName = "checkmark-circle";
  64212. break;
  64213. default:
  64214. iconName = "checkmark-circle";
  64215. }
  64216. if (fill)
  64217. iconName += "-fill";
  64218. return iconName;
  64219. }
  64220. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  64221. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  64222. const n = !isFinite(+number3) ? 0 : +number3;
  64223. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  64224. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  64225. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  64226. let s = "";
  64227. s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
  64228. const re = /(-?\d+)(\d{3})/;
  64229. while (re.test(s[0])) {
  64230. s[0] = s[0].replace(re, `$1${sep}$2`);
  64231. }
  64232. if ((s[1] || "").length < prec) {
  64233. s[1] = s[1] || "";
  64234. s[1] += new Array(prec - s[1].length + 1).join("0");
  64235. }
  64236. return s.join(dec);
  64237. }
  64238. function getDuration(value2, unit = true) {
  64239. const valueNum = parseInt(value2);
  64240. if (unit) {
  64241. if (/s$/.test(value2))
  64242. return value2;
  64243. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  64244. }
  64245. if (/ms$/.test(value2))
  64246. return valueNum;
  64247. if (/s$/.test(value2))
  64248. return valueNum > 30 ? valueNum : valueNum * 1e3;
  64249. return valueNum;
  64250. }
  64251. function padZero(value2) {
  64252. return `00${value2}`.slice(-2);
  64253. }
  64254. function formValidate(instance, event) {
  64255. const formItem = uni.$u.$parent.call(instance, "u-form-item");
  64256. const form = uni.$u.$parent.call(instance, "u-form");
  64257. if (formItem && form) {
  64258. form.validateField(formItem.prop, () => {
  64259. }, event);
  64260. }
  64261. }
  64262. function getProperty(obj, key) {
  64263. if (!obj) {
  64264. return;
  64265. }
  64266. if (typeof key !== "string" || key === "") {
  64267. return "";
  64268. }
  64269. if (key.indexOf(".") !== -1) {
  64270. const keys = key.split(".");
  64271. let firstObj = obj[keys[0]] || {};
  64272. for (let i = 1; i < keys.length; i++) {
  64273. if (firstObj) {
  64274. firstObj = firstObj[keys[i]];
  64275. }
  64276. }
  64277. return firstObj;
  64278. }
  64279. return obj[key];
  64280. }
  64281. function setProperty(obj, key, value2) {
  64282. if (!obj) {
  64283. return;
  64284. }
  64285. const inFn = function(_obj, keys, v) {
  64286. if (keys.length === 1) {
  64287. _obj[keys[0]] = v;
  64288. return;
  64289. }
  64290. while (keys.length > 1) {
  64291. const k = keys[0];
  64292. if (!_obj[k] || typeof _obj[k] !== "object") {
  64293. _obj[k] = {};
  64294. }
  64295. keys.shift();
  64296. inFn(_obj[k], keys, v);
  64297. }
  64298. };
  64299. if (typeof key !== "string" || key === "")
  64300. ;
  64301. else if (key.indexOf(".") !== -1) {
  64302. const keys = key.split(".");
  64303. inFn(obj, keys, value2);
  64304. } else {
  64305. obj[key] = value2;
  64306. }
  64307. }
  64308. function page() {
  64309. const pages2 = getCurrentPages();
  64310. return `/${pages2[pages2.length - 1].route || ""}`;
  64311. }
  64312. function pages() {
  64313. const pages2 = getCurrentPages();
  64314. return pages2;
  64315. }
  64316. function setConfig({
  64317. props: props2 = {},
  64318. config: config2 = {},
  64319. color: color2 = {},
  64320. zIndex: zIndex2 = {}
  64321. }) {
  64322. const {
  64323. deepMerge: deepMerge2
  64324. } = uni.$u;
  64325. uni.$u.config = deepMerge2(uni.$u.config, config2);
  64326. uni.$u.props = deepMerge2(uni.$u.props, props2);
  64327. uni.$u.color = deepMerge2(uni.$u.color, color2);
  64328. uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
  64329. }
  64330. const index = {
  64331. range,
  64332. getPx,
  64333. sleep,
  64334. os,
  64335. sys,
  64336. random,
  64337. guid,
  64338. $parent,
  64339. addStyle,
  64340. addUnit,
  64341. deepClone,
  64342. deepMerge,
  64343. error,
  64344. randomArray,
  64345. timeFormat,
  64346. timeFrom,
  64347. trim,
  64348. queryParams,
  64349. toast,
  64350. type2icon,
  64351. priceFormat,
  64352. getDuration,
  64353. padZero,
  64354. formValidate,
  64355. getProperty,
  64356. setProperty,
  64357. page,
  64358. pages,
  64359. setConfig
  64360. };
  64361. const zIndex = {
  64362. toast: 10090,
  64363. noNetwork: 10080,
  64364. // popup包含popup,actionsheet,keyboard,picker的值
  64365. popup: 10075,
  64366. mask: 10070,
  64367. navbar: 980,
  64368. topTips: 975,
  64369. sticky: 970,
  64370. indexListSticky: 965
  64371. };
  64372. let platform = "none";
  64373. platform = "vue3";
  64374. platform = "plus";
  64375. const platform$1 = platform;
  64376. const $u = {
  64377. route,
  64378. date: index.timeFormat,
  64379. // 另名date
  64380. colorGradient: colorGradient$1.colorGradient,
  64381. hexToRgb: colorGradient$1.hexToRgb,
  64382. rgbToHex: colorGradient$1.rgbToHex,
  64383. colorToRgba: colorGradient$1.colorToRgba,
  64384. test,
  64385. type: ["primary", "success", "error", "warning", "info"],
  64386. http: new Request(),
  64387. config: config$2,
  64388. // uView配置信息相关,比如版本号
  64389. zIndex,
  64390. debounce,
  64391. throttle,
  64392. mixin,
  64393. mpMixin,
  64394. props: props$y,
  64395. ...index,
  64396. color,
  64397. platform: platform$1
  64398. };
  64399. uni.$u = $u;
  64400. const install = (Vue2) => {
  64401. Vue2.config.globalProperties.$u = $u;
  64402. Vue2.config.globalProperties.$nextTick = (cb) => {
  64403. cb();
  64404. };
  64405. Vue2.mixin(mixin);
  64406. };
  64407. const uviewPlus = {
  64408. install
  64409. };
  64410. function isEmpty(obj) {
  64411. if (obj == "undefined" || obj == null || obj == "") {
  64412. return true;
  64413. } else {
  64414. return false;
  64415. }
  64416. }
  64417. function isLogin() {
  64418. return new Promise((resolve, reject2) => {
  64419. checkLogin().then(
  64420. (res) => {
  64421. if (res.code == 200) {
  64422. resolve(true);
  64423. } else {
  64424. resolve(false);
  64425. }
  64426. },
  64427. (rej) => {
  64428. }
  64429. );
  64430. });
  64431. }
  64432. function getDictLabelName(dicts, dictValue) {
  64433. if (dictValue == null) {
  64434. return "";
  64435. }
  64436. var name = "";
  64437. dicts.forEach(function(item, index2, array3) {
  64438. if (dictValue.toString() == item.dictValue.toString()) {
  64439. name = item.dictLabel;
  64440. }
  64441. });
  64442. return name;
  64443. }
  64444. function parseText(txt, len) {
  64445. if (txt.length > len) {
  64446. var text = txt.substr(0, len) + "...";
  64447. return text;
  64448. }
  64449. return txt;
  64450. }
  64451. function parseIDCardInfo(idCard2) {
  64452. var reg = /^\d{17}[\dXx]$/;
  64453. if (reg.test(idCard2)) {
  64454. var birthday = idCard2.substring(6, 14);
  64455. var year = birthday.substring(0, 4);
  64456. var month = birthday.substring(4, 6);
  64457. var day = birthday.substring(6, 8);
  64458. var currentYear = (/* @__PURE__ */ new Date()).getFullYear();
  64459. var age = currentYear - parseInt(year);
  64460. var genderCode = parseInt(idCard2.charAt(16));
  64461. var gender = genderCode % 2 === 0 ? "女" : "男";
  64462. return {
  64463. birthday: year + "-" + month + "-" + day,
  64464. age,
  64465. gender
  64466. };
  64467. }
  64468. return null;
  64469. }
  64470. function getProvider(service) {
  64471. return new Promise((resolve, reject2) => {
  64472. uni.getProvider({
  64473. service: service || "oauth",
  64474. success: function(res) {
  64475. if (res.provider) {
  64476. resolve(res.provider[0]);
  64477. }
  64478. },
  64479. fail() {
  64480. reject2("获取环境服务商失败");
  64481. }
  64482. });
  64483. }).catch((error2) => {
  64484. formatAppLog("log", "at utils/common.js:149", "167", error2);
  64485. });
  64486. }
  64487. function parsePhone(mobile2) {
  64488. formatAppLog("log", "at utils/common.js:154", mobile2);
  64489. if (mobile2 != null) {
  64490. var str = mobile2.substr(0, 3) + "****" + mobile2.substr(7);
  64491. return str;
  64492. }
  64493. }
  64494. function getAge(strBirthday) {
  64495. var returnAge, strBirthdayArr = strBirthday.split("-"), birthYear = strBirthdayArr[0], birthMonth = strBirthdayArr[1], birthDay = strBirthdayArr[2], d = /* @__PURE__ */ new Date(), nowYear = d.getFullYear(), nowMonth = d.getMonth() + 1, nowDay = d.getDate();
  64496. if (nowYear == birthYear) {
  64497. returnAge = 0;
  64498. } else {
  64499. var ageDiff = nowYear - birthYear;
  64500. if (ageDiff > 0) {
  64501. if (nowMonth == birthMonth) {
  64502. var dayDiff = nowDay - birthDay;
  64503. if (dayDiff < 0) {
  64504. returnAge = ageDiff - 1;
  64505. } else {
  64506. returnAge = ageDiff;
  64507. }
  64508. } else {
  64509. var monthDiff = nowMonth - birthMonth;
  64510. if (monthDiff < 0) {
  64511. returnAge = ageDiff - 1;
  64512. } else {
  64513. returnAge = ageDiff;
  64514. }
  64515. }
  64516. } else {
  64517. returnAge = -1;
  64518. }
  64519. }
  64520. return returnAge;
  64521. }
  64522. function parseIdCard(idCard2) {
  64523. var str = idCard2.substr(0, 4) + "****" + idCard2.substr(8);
  64524. return str;
  64525. }
  64526. function urlToObj(url2) {
  64527. let obj = {};
  64528. let str = url2.slice(url2.indexOf("?") + 1);
  64529. let arr = str.split("&");
  64530. for (let j = arr.length, i = 0; i < j; i++) {
  64531. let arr_temp = arr[i].split("=");
  64532. obj[arr_temp[0]] = arr_temp[1];
  64533. }
  64534. return obj;
  64535. }
  64536. function logout() {
  64537. uni.setStorageSync("AppToken", null);
  64538. }
  64539. function clearHisSearch() {
  64540. var searchList = [];
  64541. uni.setStorageSync("hisSearch", JSON.stringify(searchList));
  64542. }
  64543. function getHisSearch() {
  64544. var search = uni.getStorageSync("hisSearch");
  64545. if (search != null && search != void 0 && search != "") {
  64546. var search = JSON.parse(search);
  64547. return search;
  64548. } else {
  64549. var data = [];
  64550. return data;
  64551. }
  64552. }
  64553. function addHisSearch(searchVal) {
  64554. var search = uni.getStorageSync("hisSearch");
  64555. var searchList = [];
  64556. formatAppLog("log", "at utils/common.js:240", searchList);
  64557. if (search != null && search != void 0 && search != "") {
  64558. searchList = JSON.parse(search);
  64559. }
  64560. searchList.push(searchVal);
  64561. const uniqueArr = [...new Set(searchList)];
  64562. uni.setStorageSync("hisSearch", JSON.stringify(uniqueArr));
  64563. }
  64564. function createApp() {
  64565. const app = vue.createVueApp(App);
  64566. app.config.globalProperties.$getProvider = getProvider;
  64567. app.config.globalProperties.$parsePhone = parsePhone;
  64568. app.config.globalProperties.$isLogin = isLogin;
  64569. app.config.globalProperties.$isEmpty = isEmpty;
  64570. app.config.globalProperties.$getAge = getAge;
  64571. app.config.globalProperties.$parseIdCard = parseIdCard;
  64572. app.config.globalProperties.$getDictLabelName = getDictLabelName;
  64573. app.config.globalProperties.$logout = logout;
  64574. app.config.globalProperties.$clearHisSearch = clearHisSearch;
  64575. app.config.globalProperties.$getHisSearch = getHisSearch;
  64576. app.config.globalProperties.$addHisSearch = addHisSearch;
  64577. app.config.globalProperties.$urlToObj = urlToObj;
  64578. app.config.globalProperties.$parseText = parseText;
  64579. app.config.globalProperties.$parseIDCardInfo = parseIDCardInfo;
  64580. app.use(uviewPlus);
  64581. return {
  64582. app
  64583. };
  64584. }
  64585. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  64586. uni.Vuex = __Vuex__;
  64587. uni.Pinia = __Pinia__;
  64588. __app__.provide("__globalStyles", __uniConfig.styles);
  64589. __app__._component.mpType = "app";
  64590. __app__._component.render = () => {
  64591. };
  64592. __app__.mount("#app");
  64593. })(Vue);