12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665626666266762668626696267062671626726267362674626756267662677626786267962680626816268262683626846268562686626876268862689626906269162692626936269462695626966269762698626996270062701627026270362704627056270662707627086270962710627116271262713627146271562716627176271862719627206272162722627236272462725627266272762728627296273062731627326273362734627356273662737627386273962740627416274262743627446274562746627476274862749627506275162752627536275462755627566275762758627596276062761627626276362764627656276662767627686276962770627716277262773627746277562776627776277862779627806278162782627836278462785627866278762788627896279062791627926279362794627956279662797627986279962800628016280262803628046280562806628076280862809628106281162812628136281462815628166281762818628196282062821628226282362824628256282662827628286282962830628316283262833628346283562836628376283862839628406284162842628436284462845628466284762848628496285062851628526285362854628556285662857628586285962860628616286262863628646286562866628676286862869628706287162872628736287462875628766287762878628796288062881628826288362884628856288662887628886288962890628916289262893628946289562896628976289862899629006290162902629036290462905629066290762908629096291062911629126291362914629156291662917629186291962920629216292262923629246292562926629276292862929629306293162932629336293462935629366293762938629396294062941629426294362944629456294662947629486294962950629516295262953629546295562956629576295862959629606296162962629636296462965629666296762968629696297062971629726297362974629756297662977629786297962980629816298262983629846298562986629876298862989629906299162992629936299462995629966299762998629996300063001630026300363004630056300663007630086300963010630116301263013630146301563016630176301863019630206302163022630236302463025630266302763028630296303063031630326303363034630356303663037630386303963040630416304263043630446304563046630476304863049630506305163052630536305463055630566305763058630596306063061630626306363064630656306663067630686306963070630716307263073630746307563076630776307863079630806308163082630836308463085630866308763088630896309063091630926309363094630956309663097630986309963100631016310263103631046310563106631076310863109631106311163112631136311463115631166311763118631196312063121631226312363124631256312663127631286312963130631316313263133631346313563136631376313863139631406314163142631436314463145631466314763148631496315063151631526315363154631556315663157631586315963160631616316263163631646316563166631676316863169631706317163172631736317463175631766317763178631796318063181631826318363184631856318663187631886318963190631916319263193631946319563196631976319863199632006320163202632036320463205632066320763208632096321063211632126321363214632156321663217632186321963220632216322263223632246322563226632276322863229632306323163232632336323463235632366323763238632396324063241632426324363244632456324663247632486324963250632516325263253632546325563256632576325863259632606326163262632636326463265632666326763268632696327063271632726327363274632756327663277632786327963280632816328263283632846328563286632876328863289632906329163292632936329463295632966329763298632996330063301633026330363304633056330663307633086330963310633116331263313633146331563316633176331863319633206332163322633236332463325633266332763328633296333063331633326333363334633356333663337633386333963340633416334263343633446334563346633476334863349633506335163352633536335463355633566335763358633596336063361633626336363364633656336663367633686336963370633716337263373633746337563376633776337863379633806338163382633836338463385633866338763388633896339063391633926339363394633956339663397633986339963400634016340263403634046340563406634076340863409634106341163412634136341463415634166341763418634196342063421634226342363424634256342663427634286342963430634316343263433634346343563436634376343863439634406344163442634436344463445634466344763448634496345063451634526345363454634556345663457634586345963460634616346263463634646346563466634676346863469634706347163472634736347463475634766347763478634796348063481634826348363484634856348663487634886348963490634916349263493634946349563496634976349863499635006350163502635036350463505635066350763508635096351063511635126351363514635156351663517635186351963520635216352263523635246352563526635276352863529635306353163532635336353463535635366353763538635396354063541635426354363544635456354663547635486354963550635516355263553635546355563556635576355863559635606356163562635636356463565635666356763568635696357063571635726357363574635756357663577635786357963580635816358263583635846358563586635876358863589635906359163592635936359463595635966359763598635996360063601636026360363604636056360663607636086360963610636116361263613636146361563616636176361863619636206362163622636236362463625636266362763628636296363063631636326363363634636356363663637636386363963640636416364263643636446364563646636476364863649636506365163652636536365463655636566365763658636596366063661636626366363664636656366663667636686366963670636716367263673636746367563676636776367863679636806368163682636836368463685636866368763688636896369063691636926369363694636956369663697636986369963700637016370263703637046370563706637076370863709637106371163712637136371463715637166371763718637196372063721637226372363724637256372663727637286372963730637316373263733637346373563736637376373863739637406374163742637436374463745637466374763748637496375063751637526375363754637556375663757637586375963760637616376263763637646376563766637676376863769637706377163772637736377463775637766377763778637796378063781637826378363784637856378663787637886378963790637916379263793637946379563796637976379863799638006380163802638036380463805638066380763808638096381063811638126381363814638156381663817638186381963820638216382263823638246382563826638276382863829638306383163832638336383463835638366383763838638396384063841638426384363844638456384663847638486384963850638516385263853638546385563856638576385863859638606386163862638636386463865638666386763868638696387063871638726387363874638756387663877638786387963880638816388263883638846388563886638876388863889638906389163892638936389463895638966389763898638996390063901639026390363904639056390663907639086390963910639116391263913639146391563916639176391863919639206392163922639236392463925639266392763928639296393063931639326393363934639356393663937639386393963940639416394263943639446394563946639476394863949639506395163952639536395463955639566395763958639596396063961639626396363964639656396663967639686396963970639716397263973639746397563976639776397863979639806398163982639836398463985639866398763988639896399063991639926399363994639956399663997639986399964000640016400264003640046400564006640076400864009640106401164012640136401464015640166401764018640196402064021640226402364024640256402664027640286402964030640316403264033640346403564036640376403864039640406404164042640436404464045640466404764048640496405064051640526405364054640556405664057640586405964060640616406264063640646406564066640676406864069640706407164072640736407464075640766407764078640796408064081640826408364084640856408664087640886408964090640916409264093640946409564096640976409864099641006410164102641036410464105641066410764108641096411064111641126411364114641156411664117641186411964120641216412264123641246412564126641276412864129641306413164132641336413464135641366413764138641396414064141641426414364144641456414664147641486414964150641516415264153641546415564156641576415864159641606416164162641636416464165641666416764168641696417064171641726417364174641756417664177641786417964180641816418264183641846418564186641876418864189641906419164192641936419464195641966419764198641996420064201642026420364204642056420664207642086420964210642116421264213642146421564216642176421864219642206422164222642236422464225642266422764228642296423064231642326423364234642356423664237642386423964240642416424264243642446424564246642476424864249642506425164252642536425464255642566425764258642596426064261642626426364264642656426664267642686426964270642716427264273642746427564276642776427864279642806428164282642836428464285642866428764288642896429064291642926429364294642956429664297642986429964300643016430264303643046430564306643076430864309643106431164312643136431464315643166431764318643196432064321643226432364324643256432664327643286432964330643316433264333643346433564336643376433864339643406434164342643436434464345643466434764348643496435064351643526435364354643556435664357643586435964360643616436264363643646436564366643676436864369643706437164372643736437464375643766437764378643796438064381643826438364384643856438664387643886438964390643916439264393643946439564396643976439864399644006440164402644036440464405644066440764408644096441064411644126441364414644156441664417644186441964420644216442264423644246442564426644276442864429644306443164432644336443464435644366443764438644396444064441644426444364444644456444664447644486444964450644516445264453644546445564456644576445864459644606446164462644636446464465644666446764468644696447064471644726447364474644756447664477644786447964480644816448264483644846448564486644876448864489644906449164492644936449464495644966449764498644996450064501645026450364504645056450664507645086450964510645116451264513645146451564516645176451864519645206452164522645236452464525645266452764528645296453064531645326453364534645356453664537645386453964540645416454264543645446454564546645476454864549645506455164552645536455464555645566455764558645596456064561645626456364564645656456664567645686456964570645716457264573645746457564576645776457864579645806458164582645836458464585645866458764588645896459064591645926459364594 |
- if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
- Promise.prototype.finally = function(callback) {
- const promise = this.constructor;
- return this.then(
- (value) => promise.resolve(callback()).then(() => value),
- (reason) => promise.resolve(callback()).then(() => {
- throw reason;
- })
- );
- };
- }
- ;
- if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
- const global2 = uni.requireGlobal();
- ArrayBuffer = global2.ArrayBuffer;
- Int8Array = global2.Int8Array;
- Uint8Array = global2.Uint8Array;
- Uint8ClampedArray = global2.Uint8ClampedArray;
- Int16Array = global2.Int16Array;
- Uint16Array = global2.Uint16Array;
- Int32Array = global2.Int32Array;
- Uint32Array = global2.Uint32Array;
- Float32Array = global2.Float32Array;
- Float64Array = global2.Float64Array;
- BigInt64Array = global2.BigInt64Array;
- BigUint64Array = global2.BigUint64Array;
- }
- ;
- if (uni.restoreGlobal) {
- uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
- }
- (function(vue) {
- "use strict";
- const _export_sfc = (sfc, props2) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props2) {
- target[key] = val;
- }
- return target;
- };
- const _sfc_main$2y = {
- data() {
- return {};
- },
- onLoad() {
- this.navigatHandler();
- },
- methods: {
- navigatHandler: function() {
- uni.reLaunch({
- url: "/pages/index/index",
- animationType: "pop-in",
- animationDuration: 100
- });
- }
- }
- };
- function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view")
- ]);
- }
- const PagesCommonLaunch = /* @__PURE__ */ _export_sfc(_sfc_main$2y, [["render", _sfc_render$2L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/common/launch.vue"]]);
- const ON_SHOW = "onShow";
- const ON_LOAD = "onLoad";
- const ON_READY = "onReady";
- const ON_UNLOAD = "onUnload";
- const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";
- function requireNativePlugin(name) {
- return weex.requireModule(name);
- }
- function formatAppLog(type2, filename, ...args) {
- if (uni.__log__) {
- uni.__log__(type2, filename, ...args);
- } else {
- console[type2].apply(console, [...args, filename]);
- }
- }
- function resolveEasycom(component, easycom) {
- return typeof component === "string" ? easycom : component;
- }
- const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
- !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
- };
- const onShow = /* @__PURE__ */ createHook(ON_SHOW);
- const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
- const onReady = /* @__PURE__ */ createHook(ON_READY);
- const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
- const onNavigationBarButtonTap = /* @__PURE__ */ createHook(ON_NAVIGATION_BAR_BUTTON_TAP);
- let Request$1 = class Request {
- http(router, data = {}, method, contentType) {
- let path = "https://userapp.his.cdwjyyh.com";
- uni.setStorageSync("requestPath", path);
- return new Promise((resolve, reject2) => {
- let token = uni.getStorageSync("AppToken");
- let CompanyUserToken = uni.getStorageSync("CompanyUserToken");
- var httpContentType = "application/x-www-form-urlencoded";
- if (contentType != void 0) {
- httpContentType = contentType;
- }
- uni.request({
- header: {
- // 'Content-Type': 'application/x-www-form-urlencoded',
- "Content-Type": httpContentType,
- "AppToken": token,
- "CompanyUserToken": CompanyUserToken
- },
- url: `${path}${router}`,
- data,
- method,
- success: (res) => {
- if (res.data.code == 401) {
- let pages2 = getCurrentPages();
- let url2 = pages2[pages2.length - 1];
- formatAppLog("log", "at common/request.js:37", url2);
- if (url2 != void 0 && url2.route == "pages/auth/login") {
- resolve(res.data);
- return;
- }
- uni.navigateTo({
- url: "/pages/auth/login",
- success: () => {
- },
- fail: () => {
- }
- });
- return;
- }
- if (res.data.token) {
- uni.setStorageSync("AppToken", res.data.token);
- }
- resolve(res.data);
- },
- fail: (res) => {
- },
- complete: (res) => {
- if (res.data.code == 401) {
- return false;
- }
- }
- });
- });
- }
- };
- let request$n = new Request$1().http;
- function wxLogin(data) {
- return request$n("/app/wx/login", data, "POST", "application/json;charset=UTF-8");
- }
- function loginByMiniApp(data) {
- return request$n("/app/wx/loginByMiniApp", data, "POST", "application/json;charset=UTF-8");
- }
- function getUserInfo$1() {
- return request$n("/app/user/getUserInfo", null, "GET");
- }
- function checkLogin() {
- return request$n("/app/user/checkLogin", null, "GET");
- }
- function editUser(data) {
- return request$n("/app/user/editUser", data, "POST", "application/json;charset=UTF-8");
- }
- function registerDoctor(data) {
- return request$n("/app/user/registerDoctor", data, "POST", "application/json;charset=UTF-8");
- }
- function getMyCouponList(data) {
- return request$n("/app/user/getMyCouponList", data, "GET");
- }
- function getMyEnableCouponList(data) {
- return request$n("/app/user/getMyEnableCouponList", data, "GET");
- }
- const _sfc_main$2x = {
- data() {
- return {
- isAgreement: false,
- code: null
- };
- },
- computed: {},
- onLoad(option) {
- uni.$on("refreshLogin", () => {
- uni.navigateBack({
- delta: 1
- });
- });
- this.getCode();
- },
- onUnload() {
- },
- mounted() {
- },
- methods: {
- wxLogin() {
- var that = this;
- if (!this.isAgreement) {
- uni.showToast({
- icon: "none",
- title: "请先同意协议后再登录"
- });
- return false;
- }
- uni.showLoading({
- title: "处理中..."
- });
- that.$getProvider().then((provider) => {
- formatAppLog("log", "at pages/auth/login.vue:78", "当前的环境商", provider);
- if (!provider) {
- reject();
- }
- uni.login({
- provider,
- success: async (loginRes) => {
- formatAppLog("log", "at pages/auth/login.vue:86", loginRes);
- let code2 = loginRes.code;
- var tuiUserId = uni.getStorageSync("tuiUserId");
- loginByMiniApp({
- // encryptedData: e.mp.detail.encryptedData,
- // iv: e.mp.detail.iv,
- code: code2,
- tuiUserId
- }).then((res) => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- icon: "none",
- title: "登录成功"
- });
- uni.setStorageSync("AppToken", res.token);
- uni.setStorageSync("userId", res.user.userId);
- uni.setStorageSync("avatar", res.user.avatar);
- uni.setStorageSync("nickName", res.user.nickName);
- uni.$emit("refreshLogin");
- } else {
- uni.showToast({
- icon: "none",
- title: "授权登录失败,请重新登录"
- });
- }
- }).catch((error2) => {
- formatAppLog("log", "at pages/auth/login.vue:119", error2);
- uni.hideLoading();
- uni.showToast({
- icon: "none",
- title: "登录接口调用失败"
- });
- });
- }
- });
- }).catch((err) => {
- uni.showToast({
- icon: "none",
- title: err
- });
- });
- },
- handleAgree() {
- if (!this.isAgreement) {
- uni.showToast({
- icon: "none",
- title: "请先同意协议后再登录"
- });
- }
- },
- openContent(type2) {
- formatAppLog("log", "at pages/auth/login.vue:146", type2);
- uni.navigateTo({
- url: "/pages_user/agreement?type=" + type2
- });
- },
- handleAgreement() {
- this.isAgreement = !this.isAgreement;
- },
- getCode() {
- var that = this;
- that.$getProvider().then((provider) => {
- if (!provider) {
- reject();
- }
- uni.login({
- provider,
- success: async (loginRes) => {
- that.code = loginRes.code;
- }
- });
- }).catch((err) => {
- });
- },
- // 微信用户手机号登录
- phoneLogin(e) {
- uni.showLoading({
- title: "处理中"
- });
- formatAppLog("log", "at pages/auth/login.vue:181", e);
- if (e.detail.errMsg == "getPhoneNumber:ok") {
- this.$getProvider().then((provider) => {
- formatAppLog("log", "at pages/auth/login.vue:185", "当前的环境商", provider);
- if (!provider) {
- reject();
- }
- uni.login({
- provider,
- success: async (loginRes) => {
- formatAppLog("log", "at pages/auth/login.vue:193", loginRes);
- let code2 = loginRes.code;
- var tuiUserId = uni.getStorageSync("tuiUserId");
- wxLogin({
- encryptedData: e.detail.encryptedData,
- iv: e.detail.iv,
- code: code2,
- tuiUserId
- }).then((res) => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- icon: "none",
- title: "登录成功"
- });
- uni.setStorageSync("AppToken", res.token);
- uni.setStorageSync("userId", res.user.userId);
- uni.setStorageSync("avatar", res.user.avatar);
- uni.setStorageSync("nickName", res.user.nickName);
- uni.$emit("refreshLogin");
- uni.$emit("refreshIM");
- } else {
- uni.showToast({
- icon: "none",
- title: "授权登录失败,请重新登录"
- });
- }
- }).catch((error2) => {
- formatAppLog("log", "at pages/auth/login.vue:226", error2);
- uni.hideLoading();
- uni.showToast({
- icon: "none",
- title: "授权登录失败,请重新登录"
- });
- });
- }
- });
- }).catch((err) => {
- });
- } else {
- uni.showToast({
- title: "已拒绝授权",
- icon: "none",
- duration: 2e3
- });
- }
- },
- back() {
- uni.reLaunch({
- url: "/pages/index/index",
- animationType: "pop-in",
- animationDuration: 100
- });
- }
- }
- };
- function _sfc_render$2K(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "force-login-wrap" }, [
- vue.createElementVNode("view", { class: "force-login__content y-f" }, [
- vue.createElementVNode("view", { class: "logo" }, [
- vue.createElementVNode("view", { class: "logo-img" }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png" })
- ]),
- vue.createElementVNode("view", { class: "title" }, "芸医汇互联网医院")
- ]),
- vue.createElementVNode("view", { class: "login-notice" }, "为了提供更优质的服务,请先登录"),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode(
- "button",
- {
- class: "author-btn",
- "open-type": "getPhoneNumber",
- onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.phoneLogin && $options.phoneLogin(...args))
- },
- "一键授权手机号登录",
- 32
- /* NEED_HYDRATION */
- ),
- $data.isAgreement == false ? (vue.openBlock(), vue.createElementBlock("button", {
- key: 0,
- class: "author-btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.handleAgree())
- }, "一键授权手机号登录")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(' <button\r\n class="author-btn"\r\n @click="wxLogin()" >微信授权登录</button> '),
- vue.createElementVNode("button", {
- class: "close-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.back && $options.back(...args))
- }, "暂不登录"),
- vue.createElementVNode("view", { class: "tips" }, [
- vue.createElementVNode("checkbox", {
- checked: $data.isAgreement,
- onClick: _cache[3] || (_cache[3] = ($event) => $options.handleAgreement())
- }, null, 8, ["checked"]),
- vue.createElementVNode("view", {
- onClick: _cache[4] || (_cache[4] = ($event) => $options.handleAgreement())
- }, "您同意并接受"),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.openContent("userRegister"))
- }, "《用户协议》"),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.openContent("userPrivacy"))
- }, "《隐私保护》")
- ])
- ])
- ])
- ]);
- }
- const PagesAuthLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["render", _sfc_render$2K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages/auth/login.vue"]]);
- const version = "3";
- {
- formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", `
- %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
- `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
- }
- const config$2 = {
- v: version,
- version,
- // 主题名称
- type: [
- "primary",
- "success",
- "info",
- "error",
- "warning"
- ],
- // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
- color: {
- "u-primary": "#2979ff",
- "u-warning": "#ff9900",
- "u-success": "#19be6b",
- "u-error": "#fa3534",
- "u-info": "#909399",
- "u-main-color": "#303133",
- "u-content-color": "#606266",
- "u-tips-color": "#909399",
- "u-light-color": "#c0c4cc"
- },
- // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
- unit: "px"
- };
- const ActionSheet = {
- // action-sheet组件
- actionSheet: {
- show: false,
- title: "",
- description: "",
- actions: () => [],
- index: "",
- cancelText: "",
- closeOnClickAction: true,
- safeAreaInsetBottom: true,
- openType: "",
- closeOnClickOverlay: true,
- round: 0
- }
- };
- const Album = {
- // album 组件
- album: {
- urls: () => [],
- keyName: "",
- singleSize: 180,
- multipleSize: 70,
- space: 6,
- singleMode: "scaleToFill",
- multipleMode: "aspectFill",
- maxCount: 9,
- previewFullImage: true,
- rowCount: 3,
- showMore: true
- }
- };
- const Alert = {
- // alert警告组件
- alert: {
- title: "",
- type: "warning",
- description: "",
- closable: false,
- showIcon: false,
- effect: "light",
- center: false,
- fontSize: 14
- }
- };
- const Avatar = {
- // avatar 组件
- avatar: {
- src: "",
- shape: "circle",
- size: 40,
- mode: "scaleToFill",
- text: "",
- bgColor: "#c0c4cc",
- color: "#ffffff",
- fontSize: 18,
- icon: "",
- mpAvatar: false,
- randomBgColor: false,
- defaultUrl: "",
- colorIndex: "",
- name: ""
- }
- };
- const AvatarGroup = {
- // avatarGroup 组件
- avatarGroup: {
- urls: () => [],
- maxCount: 5,
- shape: "circle",
- mode: "scaleToFill",
- showMore: true,
- size: 40,
- keyName: "",
- gap: 0.5,
- extraValue: 0
- }
- };
- const Backtop = {
- // backtop组件
- backtop: {
- mode: "circle",
- icon: "arrow-upward",
- text: "",
- duration: 100,
- scrollTop: 0,
- top: 400,
- bottom: 100,
- right: 20,
- zIndex: 9,
- iconStyle: () => ({
- color: "#909399",
- fontSize: "19px"
- })
- }
- };
- const Badge = {
- // 徽标数组件
- badge: {
- isDot: false,
- value: "",
- show: true,
- max: 999,
- type: "error",
- showZero: false,
- bgColor: null,
- color: null,
- shape: "circle",
- numberType: "overflow",
- offset: () => [],
- inverted: false,
- absolute: false
- }
- };
- const Button = {
- // button组件
- button: {
- hairline: false,
- type: "info",
- size: "normal",
- shape: "square",
- plain: false,
- disabled: false,
- loading: false,
- loadingText: "",
- loadingMode: "spinner",
- loadingSize: 15,
- openType: "",
- formType: "",
- appParameter: "",
- hoverStopPropagation: true,
- lang: "en",
- sessionFrom: "",
- sendMessageTitle: "",
- sendMessagePath: "",
- sendMessageImg: "",
- showMessageCard: false,
- dataName: "",
- throttleTime: 0,
- hoverStartTime: 0,
- hoverStayTime: 200,
- text: "",
- icon: "",
- iconColor: "",
- color: ""
- }
- };
- const Calendar = {
- // calendar 组件
- calendar: {
- title: "日期选择",
- showTitle: true,
- showSubtitle: true,
- mode: "single",
- startText: "开始",
- endText: "结束",
- customList: () => [],
- color: "#3c9cff",
- minDate: 0,
- maxDate: 0,
- defaultDate: null,
- maxCount: Number.MAX_SAFE_INTEGER,
- // Infinity
- rowHeight: 56,
- formatter: null,
- showLunar: false,
- showMark: true,
- confirmText: "确定",
- confirmDisabledText: "确定",
- show: false,
- closeOnClickOverlay: false,
- readonly: false,
- showConfirm: true,
- maxRange: Number.MAX_SAFE_INTEGER,
- // Infinity
- rangePrompt: "",
- showRangePrompt: true,
- allowSameDay: false,
- round: 0,
- monthNum: 3
- }
- };
- const CarKeyboard = {
- // 车牌号键盘
- carKeyboard: {
- random: false
- }
- };
- const Cell = {
- // cell组件的props
- cell: {
- customClass: "",
- title: "",
- label: "",
- value: "",
- icon: "",
- disabled: false,
- border: true,
- center: false,
- url: "",
- linkType: "navigateTo",
- clickable: false,
- isLink: false,
- required: false,
- arrowDirection: "",
- iconStyle: {},
- rightIconStyle: {},
- rightIcon: "arrow-right",
- titleStyle: {},
- size: "",
- stop: true,
- name: ""
- }
- };
- const CellGroup = {
- // cell-group组件的props
- cellGroup: {
- title: "",
- border: true,
- customStyle: {}
- }
- };
- const Checkbox = {
- // checkbox组件
- checkbox: {
- name: "",
- shape: "",
- size: "",
- checkbox: false,
- disabled: "",
- activeColor: "",
- inactiveColor: "",
- iconSize: "",
- iconColor: "",
- label: "",
- labelSize: "",
- labelColor: "",
- labelDisabled: ""
- }
- };
- const CheckboxGroup = {
- // checkbox-group组件
- checkboxGroup: {
- name: "",
- value: () => [],
- shape: "square",
- disabled: false,
- activeColor: "#2979ff",
- inactiveColor: "#c8c9cc",
- size: 18,
- placement: "row",
- labelSize: 14,
- labelColor: "#303133",
- labelDisabled: false,
- iconColor: "#ffffff",
- iconSize: 12,
- iconPlacement: "left",
- borderBottom: false
- }
- };
- const CircleProgress = {
- // circleProgress 组件
- circleProgress: {
- percentage: 30
- }
- };
- const Code = {
- // code 组件
- code: {
- seconds: 60,
- startText: "获取验证码",
- changeText: "X秒重新获取",
- endText: "重新获取",
- keepRunning: false,
- uniqueKey: ""
- }
- };
- const CodeInput = {
- // codeInput 组件
- codeInput: {
- adjustPosition: true,
- maxlength: 6,
- dot: false,
- mode: "box",
- hairline: false,
- space: 10,
- value: "",
- focus: false,
- bold: false,
- color: "#606266",
- fontSize: 18,
- size: 35,
- disabledKeyboard: false,
- borderColor: "#c9cacc",
- disabledDot: true
- }
- };
- const Col = {
- // col 组件
- col: {
- span: 12,
- offset: 0,
- justify: "start",
- align: "stretch",
- textAlign: "left"
- }
- };
- const Collapse = {
- // collapse 组件
- collapse: {
- value: null,
- accordion: false,
- border: true
- }
- };
- const CollapseItem = {
- // collapseItem 组件
- collapseItem: {
- title: "",
- value: "",
- label: "",
- disabled: false,
- isLink: true,
- clickable: true,
- border: true,
- align: "left",
- name: "",
- icon: "",
- duration: 300
- }
- };
- const ColumnNotice = {
- // columnNotice 组件
- columnNotice: {
- text: "",
- icon: "volume",
- mode: "",
- color: "#f9ae3d",
- bgColor: "#fdf6ec",
- fontSize: 14,
- speed: 80,
- step: false,
- duration: 1500,
- disableTouch: true
- }
- };
- const CountDown = {
- // u-count-down 计时器组件
- countDown: {
- time: 0,
- format: "HH:mm:ss",
- autoStart: true,
- millisecond: false
- }
- };
- const CountTo = {
- // countTo 组件
- countTo: {
- startVal: 0,
- endVal: 0,
- duration: 2e3,
- autoplay: true,
- decimals: 0,
- useEasing: true,
- decimal: ".",
- color: "#606266",
- fontSize: 22,
- bold: false,
- separator: ""
- }
- };
- const DatetimePicker = {
- // datetimePicker 组件
- datetimePicker: {
- show: false,
- showToolbar: true,
- value: "",
- title: "",
- mode: "datetime",
- maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
- minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
- minHour: 0,
- maxHour: 23,
- minMinute: 0,
- maxMinute: 59,
- filter: null,
- formatter: null,
- loading: false,
- itemHeight: 44,
- cancelText: "取消",
- confirmText: "确认",
- cancelColor: "#909193",
- confirmColor: "#3c9cff",
- visibleItemCount: 5,
- closeOnClickOverlay: false,
- defaultIndex: () => []
- }
- };
- const Divider = {
- // divider组件
- divider: {
- dashed: false,
- hairline: true,
- dot: false,
- textPosition: "center",
- text: "",
- textSize: 14,
- textColor: "#909399",
- lineColor: "#dcdfe6"
- }
- };
- const Empty = {
- // empty组件
- empty: {
- icon: "",
- text: "",
- textColor: "#c0c4cc",
- textSize: 14,
- iconColor: "#c0c4cc",
- iconSize: 90,
- mode: "data",
- width: 160,
- height: 160,
- show: true,
- marginTop: 0
- }
- };
- const Form = {
- // form 组件
- form: {
- model: () => ({}),
- rules: () => ({}),
- errorType: "message",
- borderBottom: true,
- labelPosition: "left",
- labelWidth: 45,
- labelAlign: "left",
- labelStyle: () => ({})
- }
- };
- const GormItem = {
- // formItem 组件
- formItem: {
- label: "",
- prop: "",
- borderBottom: "",
- labelWidth: "",
- rightIcon: "",
- leftIcon: "",
- required: false,
- leftIconStyle: ""
- }
- };
- const Gap = {
- // gap组件
- gap: {
- bgColor: "transparent",
- height: 20,
- marginTop: 0,
- marginBottom: 0,
- customStyle: {}
- }
- };
- const Grid = {
- // grid组件
- grid: {
- col: 3,
- border: false,
- align: "left"
- }
- };
- const GridItem = {
- // grid-item组件
- gridItem: {
- name: null,
- bgColor: "transparent"
- }
- };
- const {
- color: color$3
- } = config$2;
- const Icon = {
- // icon组件
- icon: {
- name: "",
- color: color$3["u-content-color"],
- size: "16px",
- bold: false,
- index: "",
- hoverClass: "",
- customPrefix: "uicon",
- label: "",
- labelPos: "right",
- labelSize: "15px",
- labelColor: color$3["u-content-color"],
- space: "3px",
- imgMode: "",
- width: "",
- height: "",
- top: 0,
- stop: false
- }
- };
- const Image$1 = {
- // image组件
- image: {
- src: "",
- mode: "aspectFill",
- width: "300",
- height: "225",
- shape: "square",
- radius: 0,
- lazyLoad: true,
- showMenuByLongpress: true,
- loadingIcon: "photo",
- errorIcon: "error-circle",
- showLoading: true,
- showError: true,
- fade: true,
- webp: false,
- duration: 500,
- bgColor: "#f3f4f6"
- }
- };
- const IndexAnchor = {
- // indexAnchor 组件
- indexAnchor: {
- text: "",
- color: "#606266",
- size: 14,
- bgColor: "#dedede",
- height: 32
- }
- };
- const IndexList = {
- // indexList 组件
- indexList: {
- inactiveColor: "#606266",
- activeColor: "#5677fc",
- indexList: () => [],
- sticky: true,
- customNavHeight: 0
- }
- };
- const Input = {
- // index 组件
- input: {
- value: "",
- type: "text",
- fixed: false,
- disabled: false,
- disabledColor: "#f5f7fa",
- clearable: false,
- password: false,
- maxlength: -1,
- placeholder: null,
- placeholderClass: "input-placeholder",
- placeholderStyle: "color: #c0c4cc",
- showWordLimit: false,
- confirmType: "done",
- confirmHold: false,
- holdKeyboard: false,
- focus: false,
- autoBlur: false,
- disableDefaultPadding: false,
- cursor: -1,
- cursorSpacing: 30,
- selectionStart: -1,
- selectionEnd: -1,
- adjustPosition: true,
- inputAlign: "left",
- fontSize: "15px",
- color: "#303133",
- prefixIcon: "",
- prefixIconStyle: "",
- suffixIcon: "",
- suffixIconStyle: "",
- border: "surround",
- readonly: false,
- shape: "square",
- formatter: null
- }
- };
- const Keyboard = {
- // 键盘组件
- keyboard: {
- mode: "number",
- dotDisabled: false,
- tooltip: true,
- showTips: true,
- tips: "",
- showCancel: true,
- showConfirm: true,
- random: false,
- safeAreaInsetBottom: true,
- closeOnClickOverlay: true,
- show: false,
- overlay: true,
- zIndex: 10075,
- cancelText: "取消",
- confirmText: "确定",
- autoChange: false
- }
- };
- const Line = {
- // line组件
- line: {
- color: "#d6d7d9",
- length: "100%",
- direction: "row",
- hairline: true,
- margin: 0,
- dashed: false
- }
- };
- const LineProgress = {
- // lineProgress 组件
- lineProgress: {
- activeColor: "#19be6b",
- inactiveColor: "#ececec",
- percentage: 0,
- showText: true,
- height: 12
- }
- };
- const {
- color: color$2
- } = config$2;
- const Link = {
- // link超链接组件props参数
- link: {
- color: color$2["u-primary"],
- fontSize: 15,
- underLine: false,
- href: "",
- mpTips: "链接已复制,请在浏览器打开",
- lineColor: "",
- text: ""
- }
- };
- const List = {
- // list 组件
- list: {
- showScrollbar: false,
- lowerThreshold: 50,
- upperThreshold: 0,
- scrollTop: 0,
- offsetAccuracy: 10,
- enableFlex: false,
- pagingEnabled: false,
- scrollable: true,
- scrollIntoView: "",
- scrollWithAnimation: false,
- enableBackToTop: false,
- height: 0,
- width: 0,
- preLoadScreen: 1
- }
- };
- const ListItem = {
- // listItem 组件
- listItem: {
- anchor: ""
- }
- };
- const {
- color: color$1
- } = config$2;
- const LoadingIcon = {
- // loading-icon加载中图标组件
- loadingIcon: {
- show: true,
- color: color$1["u-tips-color"],
- textColor: color$1["u-tips-color"],
- vertical: false,
- mode: "spinner",
- size: 24,
- textSize: 15,
- text: "",
- timingFunction: "ease-in-out",
- duration: 1200,
- inactiveColor: ""
- }
- };
- const LoadingPage = {
- // loading-page组件
- loadingPage: {
- loadingText: "正在加载",
- image: "",
- loadingMode: "circle",
- loading: false,
- bgColor: "#ffffff",
- color: "#C8C8C8",
- fontSize: 19,
- iconSize: 28,
- loadingColor: "#C8C8C8"
- }
- };
- const Loadmore = {
- // loadmore 组件
- loadmore: {
- status: "loadmore",
- bgColor: "transparent",
- icon: true,
- fontSize: 14,
- iconSize: 17,
- color: "#606266",
- loadingIcon: "spinner",
- loadmoreText: "加载更多",
- loadingText: "正在加载...",
- nomoreText: "没有更多了",
- isDot: false,
- iconColor: "#b7b7b7",
- marginTop: 10,
- marginBottom: 10,
- height: "auto",
- line: false,
- lineColor: "#E6E8EB",
- dashed: false
- }
- };
- const Modal = {
- // modal 组件
- modal: {
- show: false,
- title: "",
- content: "",
- confirmText: "确认",
- cancelText: "取消",
- showConfirmButton: true,
- showCancelButton: false,
- confirmColor: "#2979ff",
- cancelColor: "#606266",
- buttonReverse: false,
- zoom: true,
- asyncClose: false,
- closeOnClickOverlay: false,
- negativeTop: 0,
- width: "650rpx",
- confirmButtonShape: ""
- }
- };
- const color = {
- primary: "#3c9cff",
- info: "#909399",
- default: "#909399",
- warning: "#f9ae3d",
- error: "#f56c6c",
- success: "#5ac725",
- mainColor: "#303133",
- contentColor: "#606266",
- tipsColor: "#909399",
- lightColor: "#c0c4cc",
- borderColor: "#e4e7ed"
- };
- const Navbar = {
- // navbar 组件
- navbar: {
- safeAreaInsetTop: true,
- placeholder: false,
- fixed: true,
- border: false,
- leftIcon: "arrow-left",
- leftText: "",
- rightText: "",
- rightIcon: "",
- title: "",
- bgColor: "#ffffff",
- titleWidth: "400rpx",
- height: "44px",
- leftIconSize: 20,
- leftIconColor: color.mainColor,
- autoBack: false,
- titleStyle: ""
- }
- };
- const NoNetwork = {
- // noNetwork
- noNetwork: {
- tips: "哎呀,网络信号丢失",
- zIndex: "",
- image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC"
- }
- };
- const NoticeBar = {
- // noticeBar
- noticeBar: {
- text: () => [],
- direction: "row",
- step: false,
- icon: "volume",
- mode: "",
- color: "#f9ae3d",
- bgColor: "#fdf6ec",
- speed: 80,
- fontSize: 14,
- duration: 2e3,
- disableTouch: true,
- url: "",
- linkType: "navigateTo"
- }
- };
- const Notify = {
- // notify组件
- notify: {
- top: 0,
- type: "primary",
- color: "#ffffff",
- bgColor: "",
- message: "",
- duration: 3e3,
- fontSize: 15,
- safeAreaInsetTop: false
- }
- };
- const NumberBox = {
- // 步进器组件
- numberBox: {
- name: "",
- value: 0,
- min: 1,
- max: Number.MAX_SAFE_INTEGER,
- step: 1,
- integer: false,
- disabled: false,
- disabledInput: false,
- asyncChange: false,
- inputWidth: 35,
- showMinus: true,
- showPlus: true,
- decimalLength: null,
- longPress: true,
- color: "#323233",
- buttonSize: 30,
- bgColor: "#EBECEE",
- cursorSpacing: 100,
- disableMinus: false,
- disablePlus: false,
- iconStyle: ""
- }
- };
- const NumberKeyboard = {
- // 数字键盘
- numberKeyboard: {
- mode: "number",
- dotDisabled: false,
- random: false
- }
- };
- const Overlay = {
- // overlay组件
- overlay: {
- show: false,
- zIndex: 10070,
- duration: 300,
- opacity: 0.5
- }
- };
- const Parse = {
- // parse
- parse: {
- copyLink: true,
- errorImg: "",
- lazyLoad: false,
- loadingImg: "",
- pauseVideo: true,
- previewImg: true,
- setTitle: true,
- showImgMenu: true
- }
- };
- const Picker = {
- // picker
- picker: {
- show: false,
- showToolbar: true,
- title: "",
- columns: () => [],
- loading: false,
- itemHeight: 44,
- cancelText: "取消",
- confirmText: "确定",
- cancelColor: "#909193",
- confirmColor: "#3c9cff",
- visibleItemCount: 5,
- keyName: "text",
- closeOnClickOverlay: false,
- defaultIndex: () => [],
- immediateChange: false
- }
- };
- const Popup = {
- // popup组件
- popup: {
- show: false,
- overlay: true,
- mode: "bottom",
- duration: 300,
- closeable: false,
- overlayStyle: () => {
- },
- closeOnClickOverlay: true,
- zIndex: 10075,
- safeAreaInsetBottom: true,
- safeAreaInsetTop: false,
- closeIconPos: "top-right",
- round: 0,
- zoom: true,
- bgColor: "",
- overlayOpacity: 0.5
- }
- };
- const Radio = {
- // radio组件
- radio: {
- name: "",
- shape: "",
- disabled: "",
- labelDisabled: "",
- activeColor: "",
- inactiveColor: "",
- iconSize: "",
- labelSize: "",
- label: "",
- labelColor: "",
- size: "",
- iconColor: "",
- placement: ""
- }
- };
- const RadioGroup = {
- // radio-group组件
- radioGroup: {
- value: "",
- disabled: false,
- shape: "circle",
- activeColor: "#2979ff",
- inactiveColor: "#c8c9cc",
- name: "",
- size: 18,
- placement: "row",
- label: "",
- labelColor: "#303133",
- labelSize: 14,
- labelDisabled: false,
- iconColor: "#ffffff",
- iconSize: 12,
- borderBottom: false,
- iconPlacement: "left"
- }
- };
- const Rate = {
- // rate组件
- rate: {
- value: 1,
- count: 5,
- disabled: false,
- size: 18,
- inactiveColor: "#b2b2b2",
- activeColor: "#FA3534",
- gutter: 4,
- minCount: 1,
- allowHalf: false,
- activeIcon: "star-fill",
- inactiveIcon: "star",
- touchable: true
- }
- };
- const ReadMore = {
- // readMore
- readMore: {
- showHeight: 400,
- toggle: false,
- closeText: "展开阅读全文",
- openText: "收起",
- color: "#2979ff",
- fontSize: 14,
- textIndent: "2em",
- name: ""
- }
- };
- const Row = {
- // row
- row: {
- gutter: 0,
- justify: "start",
- align: "center"
- }
- };
- const RowNotice = {
- // rowNotice
- rowNotice: {
- text: "",
- icon: "volume",
- mode: "",
- color: "#f9ae3d",
- bgColor: "#fdf6ec",
- fontSize: 14,
- speed: 80
- }
- };
- const ScrollList = {
- // scrollList
- scrollList: {
- indicatorWidth: 50,
- indicatorBarWidth: 20,
- indicator: true,
- indicatorColor: "#f2f2f2",
- indicatorActiveColor: "#3c9cff",
- indicatorStyle: ""
- }
- };
- const Search = {
- // search
- search: {
- shape: "round",
- bgColor: "#f2f2f2",
- placeholder: "请输入关键字",
- clearabled: true,
- focus: false,
- showAction: true,
- actionStyle: () => ({}),
- actionText: "搜索",
- inputAlign: "left",
- inputStyle: () => ({}),
- disabled: false,
- borderColor: "transparent",
- searchIconColor: "#909399",
- searchIconSize: 22,
- color: "#606266",
- placeholderColor: "#909399",
- searchIcon: "search",
- margin: "0",
- animation: false,
- value: "",
- maxlength: "-1",
- height: 32,
- label: null
- }
- };
- const Section = {
- // u-section组件
- section: {
- title: "",
- subTitle: "更多",
- right: true,
- fontSize: 15,
- bold: true,
- color: "#303133",
- subColor: "#909399",
- showLine: true,
- lineColor: "",
- arrow: true
- }
- };
- const Skeleton = {
- // skeleton
- skeleton: {
- loading: true,
- animate: true,
- rows: 0,
- rowsWidth: "100%",
- rowsHeight: 18,
- title: true,
- titleWidth: "50%",
- titleHeight: 18,
- avatar: false,
- avatarSize: 32,
- avatarShape: "circle"
- }
- };
- const Slider = {
- // slider组件
- slider: {
- value: 0,
- blockSize: 18,
- min: 0,
- max: 100,
- step: 1,
- activeColor: "#2979ff",
- inactiveColor: "#c0c4cc",
- blockColor: "#ffffff",
- showValue: false,
- disabled: false,
- blockStyle: () => {
- }
- }
- };
- const StatusBar = {
- // statusBar
- statusBar: {
- bgColor: "transparent"
- }
- };
- const Steps = {
- // steps组件
- steps: {
- direction: "row",
- current: 0,
- activeColor: "#3c9cff",
- inactiveColor: "#969799",
- activeIcon: "",
- inactiveIcon: "",
- dot: false
- }
- };
- const StepsItem = {
- // steps-item组件
- stepsItem: {
- title: "",
- desc: "",
- iconSize: 17,
- error: false
- }
- };
- const Sticky = {
- // sticky组件
- sticky: {
- offsetTop: 0,
- customNavHeight: 0,
- disabled: false,
- bgColor: "transparent",
- zIndex: "",
- index: ""
- }
- };
- const Subsection = {
- // subsection组件
- subsection: {
- list: [],
- current: 0,
- activeColor: "#3c9cff",
- inactiveColor: "#303133",
- mode: "button",
- fontSize: 12,
- bold: true,
- bgColor: "#eeeeef",
- keyName: "name"
- }
- };
- const SwipeAction = {
- // swipe-action组件
- swipeAction: {
- autoClose: true
- }
- };
- const SwipeActionItem = {
- // swipeActionItem 组件
- swipeActionItem: {
- show: false,
- name: "",
- disabled: false,
- threshold: 20,
- autoClose: true,
- options: [],
- duration: 300
- }
- };
- const Swiper = {
- // swiper 组件
- swiper: {
- list: () => [],
- indicator: false,
- indicatorActiveColor: "#FFFFFF",
- indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
- indicatorStyle: "",
- indicatorMode: "line",
- autoplay: true,
- current: 0,
- currentItemId: "",
- interval: 3e3,
- duration: 300,
- circular: false,
- previousMargin: 0,
- nextMargin: 0,
- acceleration: false,
- displayMultipleItems: 1,
- easingFunction: "default",
- keyName: "url",
- imgMode: "aspectFill",
- height: 130,
- bgColor: "#f3f4f6",
- radius: 4,
- loading: false,
- showTitle: false
- }
- };
- const SwipterIndicator = {
- // swiperIndicator 组件
- swiperIndicator: {
- length: 0,
- current: 0,
- indicatorActiveColor: "",
- indicatorInactiveColor: "",
- indicatorMode: "line"
- }
- };
- const Switch = {
- // switch
- switch: {
- loading: false,
- disabled: false,
- size: 25,
- activeColor: "#2979ff",
- inactiveColor: "#ffffff",
- value: false,
- activeValue: true,
- inactiveValue: false,
- asyncChange: false,
- space: 0
- }
- };
- const Tabbar = {
- // tabbar
- tabbar: {
- value: null,
- safeAreaInsetBottom: true,
- border: true,
- zIndex: 1,
- activeColor: "#1989fa",
- inactiveColor: "#7d7e80",
- fixed: true,
- placeholder: true
- }
- };
- const TabbarItem = {
- //
- tabbarItem: {
- name: null,
- icon: "",
- badge: null,
- dot: false,
- text: "",
- badgeStyle: "top: 6px;right:2px;"
- }
- };
- const Tabs = {
- //
- tabs: {
- duration: 300,
- list: () => [],
- lineColor: "#3c9cff",
- activeStyle: () => ({
- color: "#303133"
- }),
- inactiveStyle: () => ({
- color: "#606266"
- }),
- lineWidth: 20,
- lineHeight: 3,
- lineBgSize: "cover",
- itemStyle: () => ({
- height: "44px"
- }),
- scrollable: true,
- current: 0,
- keyName: "name"
- }
- };
- const Tag = {
- // tag 组件
- tag: {
- type: "primary",
- disabled: false,
- size: "medium",
- shape: "square",
- text: "",
- bgColor: "",
- color: "",
- borderColor: "",
- closeColor: "#C6C7CB",
- name: "",
- plainFill: false,
- plain: false,
- closable: false,
- show: true,
- icon: ""
- }
- };
- const Text = {
- // text 组件
- text: {
- type: "",
- show: true,
- text: "",
- prefixIcon: "",
- suffixIcon: "",
- mode: "",
- href: "",
- format: "",
- call: false,
- openType: "",
- bold: false,
- block: false,
- lines: "",
- color: "#303133",
- size: 15,
- iconStyle: () => ({
- fontSize: "15px"
- }),
- decoration: "none",
- margin: 0,
- lineHeight: "",
- align: "left",
- wordWrap: "normal"
- }
- };
- const Textarea = {
- // textarea 组件
- textarea: {
- value: "",
- placeholder: "",
- placeholderClass: "textarea-placeholder",
- placeholderStyle: "color: #c0c4cc",
- height: 70,
- confirmType: "done",
- disabled: false,
- count: false,
- focus: false,
- autoHeight: false,
- fixed: false,
- cursorSpacing: 0,
- cursor: "",
- showConfirmBar: true,
- selectionStart: -1,
- selectionEnd: -1,
- adjustPosition: true,
- disableDefaultPadding: false,
- holdKeyboard: false,
- maxlength: 140,
- border: "surround",
- formatter: null
- }
- };
- const Toast = {
- // toast组件
- toast: {
- zIndex: 10090,
- loading: false,
- text: "",
- icon: "",
- type: "",
- loadingMode: "",
- show: "",
- overlay: false,
- position: "center",
- params: () => {
- },
- duration: 2e3,
- isTab: false,
- url: "",
- callback: null,
- back: false
- }
- };
- const Toolbar = {
- // toolbar 组件
- toolbar: {
- show: true,
- cancelText: "取消",
- confirmText: "确认",
- cancelColor: "#909193",
- confirmColor: "#3c9cff",
- title: ""
- }
- };
- const Tooltip = {
- // tooltip 组件
- tooltip: {
- text: "",
- copyText: "",
- size: 14,
- color: "#606266",
- bgColor: "transparent",
- direction: "top",
- zIndex: 10071,
- showCopy: true,
- buttons: () => [],
- overlay: true,
- showToast: true
- }
- };
- const Transition = {
- // transition动画组件的props
- transition: {
- show: false,
- mode: "fade",
- duration: "300",
- timingFunction: "ease-out"
- }
- };
- const Upload = {
- // upload组件
- upload: {
- accept: "image",
- capture: () => ["album", "camera"],
- compressed: true,
- camera: "back",
- maxDuration: 60,
- uploadIcon: "camera-fill",
- uploadIconColor: "#D3D4D6",
- useBeforeRead: false,
- previewFullImage: true,
- maxCount: 52,
- disabled: false,
- imageMode: "aspectFill",
- name: "",
- sizeType: () => ["original", "compressed"],
- multiple: false,
- deletable: true,
- maxSize: Number.MAX_VALUE,
- fileList: () => [],
- uploadText: "",
- width: 80,
- height: 80,
- previewImage: true
- }
- };
- const drawer = {
- // 抽屉组件
- drawer: {
- // 是否显示
- show: false,
- // 点击遮罩是否关闭
- mask: true,
- // // 是否显示关闭按钮
- // closeBtn:true,
- // 抽屉宽度
- width: "40%",
- // 抽屉位置
- placement: "left",
- // 权重
- zIndex: 100
- }
- };
- const props$y = {
- ...ActionSheet,
- ...Album,
- ...Alert,
- ...Avatar,
- ...AvatarGroup,
- ...Backtop,
- ...Badge,
- ...Button,
- ...Calendar,
- ...CarKeyboard,
- ...Cell,
- ...CellGroup,
- ...Checkbox,
- ...CheckboxGroup,
- ...CircleProgress,
- ...Code,
- ...CodeInput,
- ...Col,
- ...Collapse,
- ...CollapseItem,
- ...ColumnNotice,
- ...CountDown,
- ...CountTo,
- ...DatetimePicker,
- ...Divider,
- ...Empty,
- ...Form,
- ...GormItem,
- ...Gap,
- ...Grid,
- ...GridItem,
- ...Icon,
- ...Image$1,
- ...IndexAnchor,
- ...IndexList,
- ...Input,
- ...Keyboard,
- ...Line,
- ...LineProgress,
- ...Link,
- ...List,
- ...ListItem,
- ...LoadingIcon,
- ...LoadingPage,
- ...Loadmore,
- ...Modal,
- ...Navbar,
- ...NoNetwork,
- ...NoticeBar,
- ...Notify,
- ...NumberBox,
- ...NumberKeyboard,
- ...Overlay,
- ...Parse,
- ...Picker,
- ...Popup,
- ...Radio,
- ...RadioGroup,
- ...Rate,
- ...ReadMore,
- ...Row,
- ...RowNotice,
- ...ScrollList,
- ...Search,
- ...Section,
- ...Skeleton,
- ...Slider,
- ...StatusBar,
- ...Steps,
- ...StepsItem,
- ...Sticky,
- ...Subsection,
- ...SwipeAction,
- ...SwipeActionItem,
- ...Swiper,
- ...SwipterIndicator,
- ...Switch,
- ...Tabbar,
- ...TabbarItem,
- ...Tabs,
- ...Tag,
- ...Text,
- ...Textarea,
- ...Toast,
- ...Toolbar,
- ...Tooltip,
- ...Transition,
- ...Upload,
- ...drawer
- };
- const props$x = {
- props: {
- // 是否显示组件
- show: {
- type: Boolean,
- default: props$y.loadingIcon.show
- },
- // 颜色
- color: {
- type: String,
- default: props$y.loadingIcon.color
- },
- // 提示文字颜色
- textColor: {
- type: String,
- default: props$y.loadingIcon.textColor
- },
- // 文字和图标是否垂直排列
- vertical: {
- type: Boolean,
- default: props$y.loadingIcon.vertical
- },
- // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
- mode: {
- type: String,
- default: props$y.loadingIcon.mode
- },
- // 图标大小,单位默认px
- size: {
- type: [String, Number],
- default: props$y.loadingIcon.size
- },
- // 文字大小
- textSize: {
- type: [String, Number],
- default: props$y.loadingIcon.textSize
- },
- // 文字内容
- text: {
- type: [String, Number],
- default: props$y.loadingIcon.text
- },
- // 动画模式
- timingFunction: {
- type: String,
- default: props$y.loadingIcon.timingFunction
- },
- // 动画执行周期时间
- duration: {
- type: [String, Number],
- default: props$y.loadingIcon.duration
- },
- // mode=circle时的暗边颜色
- inactiveColor: {
- type: String,
- default: props$y.loadingIcon.inactiveColor
- }
- }
- };
- const mpMixin = {};
- const mixin = {
- // 定义每个组件都可能需要用到的外部样式以及类名
- props: {
- // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
- customStyle: {
- type: [Object, String],
- default: () => ({})
- },
- customClass: {
- type: String,
- default: ""
- },
- // 跳转的页面路径
- url: {
- type: String,
- default: ""
- },
- // 页面跳转的类型
- linkType: {
- type: String,
- default: "navigateTo"
- }
- },
- data() {
- return {};
- },
- onLoad() {
- this.$u.getRect = this.$uGetRect;
- },
- created() {
- this.$u.getRect = this.$uGetRect;
- },
- computed: {
- // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
- // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
- // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
- $u() {
- return uni.$u.deepMerge(uni.$u, {
- props: void 0,
- http: void 0,
- mixin: void 0
- });
- },
- /**
- * 生成bem规则类名
- * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
- * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
- * @param {String} name 组件名称
- * @param {Array} fixed 一直会存在的类名
- * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
- * @returns {Array|string}
- */
- bem() {
- return function(name, fixed, change) {
- const prefix = `u-${name}--`;
- const classes = {};
- if (fixed) {
- fixed.map((item) => {
- classes[prefix + this[item]] = true;
- });
- }
- if (change) {
- change.map((item) => {
- this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
- });
- }
- return Object.keys(classes);
- };
- }
- },
- methods: {
- // 跳转某一个页面
- openPage(urlKey = "url") {
- const url2 = this[urlKey];
- if (url2) {
- this.$u.route({ type: this.linkType, url: url2 });
- }
- },
- // 查询节点信息
- // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
- // 解决办法为在组件根部再套一个没有任何作用的view元素
- $uGetRect(selector, all) {
- return new Promise((resolve) => {
- uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
- if (all && Array.isArray(rect) && rect.length) {
- resolve(rect);
- }
- if (!all && rect) {
- resolve(rect);
- }
- }).exec();
- });
- },
- getParentData(parentName = "") {
- if (!this.parent)
- this.parent = {};
- this.parent = uni.$u.$parent.call(this, parentName);
- if (this.parent.children) {
- this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
- }
- if (this.parent && this.parentData) {
- Object.keys(this.parentData).map((key) => {
- this.parentData[key] = this.parent[key];
- });
- }
- },
- // 阻止事件冒泡
- preventEvent(e) {
- e && typeof e.stopPropagation === "function" && e.stopPropagation();
- },
- // 空操作
- noop(e) {
- this.preventEvent(e);
- }
- },
- onReachBottom() {
- uni.$emit("uOnReachBottom");
- },
- beforeDestroy() {
- if (this.parent && uni.$u.test.array(this.parent.children)) {
- const childrenList = this.parent.children;
- childrenList.map((child, index2) => {
- if (child === this) {
- childrenList.splice(index2, 1);
- }
- });
- }
- }
- };
- const _sfc_main$2w = {
- name: "u-loading-icon",
- mixins: [mpMixin, mixin, props$x],
- data() {
- return {
- // Array.form可以通过一个伪数组对象创建指定长度的数组
- // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
- array12: Array.from({
- length: 12
- }),
- // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
- // 在iOS nvue上,则会一开始默认执行两个周期的动画
- aniAngel: 360,
- // 动画旋转角度
- webviewHide: false,
- // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
- loading: false
- // 是否运行中,针对nvue使用
- };
- },
- computed: {
- // 当为circle类型时,给其另外三边设置一个更轻一些的颜色
- // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
- // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
- otherBorderColor() {
- const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80];
- if (this.mode === "circle") {
- return this.inactiveColor ? this.inactiveColor : lightColor;
- } else {
- return "transparent";
- }
- }
- },
- watch: {
- show(n) {
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- setTimeout(() => {
- this.show && this.addEventListenerToWebview();
- }, 20);
- },
- // 监听webview的显示与隐藏
- addEventListenerToWebview() {
- const pages2 = getCurrentPages();
- const page2 = pages2[pages2.length - 1];
- const currentWebview = page2.$getAppWebview();
- currentWebview.addEventListener("hide", () => {
- this.webviewHide = true;
- });
- currentWebview.addEventListener("show", () => {
- this.webviewHide = false;
- });
- }
- }
- };
- function _sfc_render$2J(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]),
- ref: "ani",
- style: vue.normalizeStyle({
- color: _ctx.color,
- width: _ctx.$u.addUnit(_ctx.size),
- height: _ctx.$u.addUnit(_ctx.size),
- borderTopColor: _ctx.color,
- borderBottomColor: $options.otherBorderColor,
- borderLeftColor: $options.otherBorderColor,
- borderRightColor: $options.otherBorderColor,
- "animation-duration": `${_ctx.duration}ms`,
- "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
- })
- },
- [
- _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.array12, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "u-loading-icon__dot"
- });
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.text ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-loading-icon__text",
- style: vue.normalizeStyle({
- fontSize: _ctx.$u.addUnit(_ctx.textSize),
- color: _ctx.textColor
- })
- },
- vue.toDisplayString(_ctx.text),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_0$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"]]);
- const props$w = {
- props: {
- // 轮播的长度
- length: {
- type: [String, Number],
- default: props$y.swiperIndicator.length
- },
- // 当前处于活动状态的轮播的索引
- current: {
- type: [String, Number],
- default: props$y.swiperIndicator.current
- },
- // 指示器非激活颜色
- indicatorActiveColor: {
- type: String,
- default: props$y.swiperIndicator.indicatorActiveColor
- },
- // 指示器的激活颜色
- indicatorInactiveColor: {
- type: String,
- default: props$y.swiperIndicator.indicatorInactiveColor
- },
- // 指示器模式,line-线型,dot-点型
- indicatorMode: {
- type: String,
- default: props$y.swiperIndicator.indicatorMode
- }
- }
- };
- const _sfc_main$2v = {
- name: "u-swiper-indicator",
- mixins: [mpMixin, mixin, props$w],
- data() {
- return {
- lineWidth: 22
- };
- },
- computed: {
- // 指示器为线型的样式
- lineStyle() {
- let style = {};
- style.width = uni.$u.addUnit(this.lineWidth);
- style.transform = `translateX(${uni.$u.addUnit(this.current * this.lineWidth)})`;
- style.backgroundColor = this.indicatorActiveColor;
- return style;
- },
- // 指示器为点型的样式
- dotStyle() {
- return (index2) => {
- let style = {};
- style.backgroundColor = index2 === this.current ? this.indicatorActiveColor : this.indicatorInactiveColor;
- return style;
- };
- }
- }
- };
- function _sfc_render$2I(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-swiper-indicator" }, [
- _ctx.indicatorMode === "line" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-swiper-indicator__wrapper", [`u-swiper-indicator__wrapper--${_ctx.indicatorMode}`]]),
- style: vue.normalizeStyle({
- width: _ctx.$u.addUnit($data.lineWidth * _ctx.length),
- backgroundColor: _ctx.indicatorInactiveColor
- })
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "u-swiper-indicator__wrapper--line__bar",
- style: vue.normalizeStyle([$options.lineStyle])
- },
- null,
- 4
- /* STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.indicatorMode === "dot" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-swiper-indicator__wrapper"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.length, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-swiper-indicator__wrapper__dot", [index2 === _ctx.current && "u-swiper-indicator__wrapper__dot--active"]]),
- key: index2,
- style: vue.normalizeStyle([$options.dotStyle(index2)])
- },
- null,
- 6
- /* CLASS, STYLE */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const props$v = {
- props: {
- // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
- list: {
- type: Array,
- default: props$y.swiper.list
- },
- // 是否显示面板指示器
- indicator: {
- type: Boolean,
- default: props$y.swiper.indicator
- },
- // 指示器非激活颜色
- indicatorActiveColor: {
- type: String,
- default: props$y.swiper.indicatorActiveColor
- },
- // 指示器的激活颜色
- indicatorInactiveColor: {
- type: String,
- default: props$y.swiper.indicatorInactiveColor
- },
- // 指示器样式,可通过bottom,left,right进行定位
- indicatorStyle: {
- type: [String, Object],
- default: props$y.swiper.indicatorStyle
- },
- // 指示器模式,line-线型,dot-点型
- indicatorMode: {
- type: String,
- default: props$y.swiper.indicatorMode
- },
- // 是否自动切换
- autoplay: {
- type: Boolean,
- default: props$y.swiper.autoplay
- },
- // 当前所在滑块的 index
- current: {
- type: [String, Number],
- default: props$y.swiper.current
- },
- // 当前所在滑块的 item-id ,不能与 current 被同时指定
- currentItemId: {
- type: String,
- default: props$y.swiper.currentItemId
- },
- // 滑块自动切换时间间隔
- interval: {
- type: [String, Number],
- default: props$y.swiper.interval
- },
- // 滑块切换过程所需时间
- duration: {
- type: [String, Number],
- default: props$y.swiper.duration
- },
- // 播放到末尾后是否重新回到开头
- circular: {
- type: Boolean,
- default: props$y.swiper.circular
- },
- // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
- previousMargin: {
- type: [String, Number],
- default: props$y.swiper.previousMargin
- },
- // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
- nextMargin: {
- type: [String, Number],
- default: props$y.swiper.nextMargin
- },
- // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
- acceleration: {
- type: Boolean,
- default: props$y.swiper.acceleration
- },
- // 同时显示的滑块数量,nvue、支付宝小程序不支持
- displayMultipleItems: {
- type: Number,
- default: props$y.swiper.displayMultipleItems
- },
- // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
- // 只对微信小程序有效
- easingFunction: {
- type: String,
- default: props$y.swiper.easingFunction
- },
- // list数组中指定对象的目标属性名
- keyName: {
- type: String,
- default: props$y.swiper.keyName
- },
- // 图片的裁剪模式
- imgMode: {
- type: String,
- default: props$y.swiper.imgMode
- },
- // 组件高度
- height: {
- type: [String, Number],
- default: props$y.swiper.height
- },
- // 背景颜色
- bgColor: {
- type: String,
- default: props$y.swiper.bgColor
- },
- // 组件圆角,数值或带单位的字符串
- radius: {
- type: [String, Number],
- default: props$y.swiper.radius
- },
- // 是否加载中
- loading: {
- type: Boolean,
- default: props$y.swiper.loading
- },
- // 是否显示标题,要求数组对象中有title属性
- showTitle: {
- type: Boolean,
- default: props$y.swiper.showTitle
- }
- }
- };
- const _sfc_main$2u = {
- name: "u-swiper",
- mixins: [mpMixin, mixin, props$v],
- data() {
- return {
- currentIndex: 0
- };
- },
- watch: {
- current(val, preVal) {
- if (val === preVal)
- return;
- this.currentIndex = val;
- }
- },
- computed: {
- itemStyle() {
- return (index2) => {
- const style = {};
- if (this.nextMargin && this.previousMargin) {
- style.borderRadius = uni.$u.addUnit(this.radius);
- if (index2 !== this.currentIndex)
- style.transform = "scale(0.92)";
- }
- return style;
- };
- }
- },
- methods: {
- getItemType(item) {
- if (typeof item === "string")
- return uni.$u.test.video(this.getSource(item)) ? "video" : "image";
- if (typeof item === "object" && this.keyName) {
- if (!item.type)
- return uni.$u.test.video(this.getSource(item)) ? "video" : "image";
- if (item.type === "image")
- return "image";
- if (item.type === "video")
- return "video";
- return "image";
- }
- },
- // 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName
- getSource(item) {
- if (typeof item === "string")
- return item;
- if (typeof item === "object" && this.keyName)
- return item[this.keyName];
- else
- uni.$u.error("请按格式传递列表参数");
- return "";
- },
- // 轮播切换事件
- change(e) {
- const {
- current
- } = e.detail;
- this.pauseVideo(this.currentIndex);
- this.currentIndex = current;
- this.$emit("change", e.detail);
- },
- // 切换轮播时,暂停视频播放
- pauseVideo(index2) {
- const lastItem = this.getSource(this.list[index2]);
- if (uni.$u.test.video(lastItem)) {
- const video2 = uni.createVideoContext(`video-${index2}`, this);
- video2.pause();
- }
- },
- // 当一个轮播item为视频时,获取它的视频海报
- getPoster(item) {
- return typeof item === "object" && item.poster ? item.poster : "";
- },
- // 点击某个item
- clickHandler(index2) {
- this.$emit("click", index2);
- }
- }
- };
- function _sfc_render$2H(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
- const _component_u_swiper_indicator = resolveEasycom(vue.resolveDynamicComponent("u-swiper-indicator"), __easycom_1$7);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-swiper",
- style: vue.normalizeStyle({
- backgroundColor: _ctx.bgColor,
- height: _ctx.$u.addUnit(_ctx.height),
- borderRadius: _ctx.$u.addUnit(_ctx.radius)
- })
- },
- [
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-swiper__loading"
- }, [
- vue.createVNode(_component_u_loading_icon, { mode: "circle" })
- ])) : (vue.openBlock(), vue.createElementBlock("swiper", {
- key: 1,
- class: "u-swiper__wrapper",
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.height)
- }),
- onChange: _cache[0] || (_cache[0] = (...args) => $options.change && $options.change(...args)),
- circular: _ctx.circular,
- interval: _ctx.interval,
- duration: _ctx.duration,
- autoplay: _ctx.autoplay,
- current: _ctx.current,
- currentItemId: _ctx.currentItemId,
- previousMargin: _ctx.$u.addUnit(_ctx.previousMargin),
- nextMargin: _ctx.$u.addUnit(_ctx.nextMargin),
- acceleration: _ctx.acceleration,
- displayMultipleItems: _ctx.displayMultipleItems,
- easingFunction: _ctx.easingFunction
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.list, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", {
- class: "u-swiper__wrapper__item",
- key: index2
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-swiper__wrapper__item__wrapper",
- style: vue.normalizeStyle([$options.itemStyle(index2)])
- },
- [
- vue.createCommentVNode(" 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 "),
- $options.getItemType(item) === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "u-swiper__wrapper__item__wrapper__image",
- src: $options.getSource(item),
- mode: _ctx.imgMode,
- onClick: ($event) => $options.clickHandler(index2),
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.height),
- borderRadius: _ctx.$u.addUnit(_ctx.radius)
- })
- }, null, 12, ["src", "mode", "onClick"])) : vue.createCommentVNode("v-if", true),
- $options.getItemType(item) === "video" ? (vue.openBlock(), vue.createElementBlock("video", {
- key: 1,
- class: "u-swiper__wrapper__item__wrapper__video",
- id: `video-${index2}`,
- "enable-progress-gesture": false,
- src: $options.getSource(item),
- poster: $options.getPoster(item),
- title: _ctx.showTitle && _ctx.$u.test.object(item) && item.title ? item.title : "",
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.height)
- }),
- controls: "",
- onClick: ($event) => $options.clickHandler(index2)
- }, null, 12, ["id", "src", "poster", "title", "onClick"])) : vue.createCommentVNode("v-if", true),
- _ctx.showTitle && _ctx.$u.test.object(item) && item.title && _ctx.$u.test.image($options.getSource(item)) ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "u-swiper__wrapper__item__wrapper__title u-line-1"
- },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 44, ["circular", "interval", "duration", "autoplay", "current", "currentItemId", "previousMargin", "nextMargin", "acceleration", "displayMultipleItems", "easingFunction"])),
- vue.createElementVNode(
- "view",
- {
- class: "u-swiper__indicator",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.indicatorStyle)])
- },
- [
- vue.renderSlot(_ctx.$slots, "indicator", {}, () => [
- !_ctx.loading && _ctx.indicator && !_ctx.showTitle ? (vue.openBlock(), vue.createBlock(_component_u_swiper_indicator, {
- key: 0,
- indicatorActiveColor: _ctx.indicatorActiveColor,
- indicatorInactiveColor: _ctx.indicatorInactiveColor,
- length: _ctx.list.length,
- current: $data.currentIndex,
- indicatorMode: _ctx.indicatorMode
- }, null, 8, ["indicatorActiveColor", "indicatorInactiveColor", "length", "current", "indicatorMode"])) : vue.createCommentVNode("v-if", true)
- ], true)
- ],
- 4
- /* STYLE */
- )
- ],
- 4
- /* STYLE */
- );
- }
- 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"]]);
- let request$m = new Request$1().http;
- function getCitys(data) {
- return request$m("/app/common/getCitys", data, "GET");
- }
- function getTlsSig(data) {
- return request$m("/app/common/getTlsSig", data, "GET");
- }
- function getDictByKey(data) {
- return request$m("/app/common/getDictByKey", data, "GET");
- }
- function getConfigByKey(data) {
- return request$m("/app/common/getConfigByKey", data, "GET");
- }
- function getHospitalList$1(data) {
- return request$m("/app/common/getHospitalList", data, "GET");
- }
- function getDepartmentList$1(data) {
- return request$m("/app/common/getDepartmentList", data, "GET");
- }
- let request$l = new Request$1().http;
- function getPackagCateList(data) {
- return request$l("/app/package/getPackagCateList", data, "GET");
- }
- function getPackageList(data) {
- return request$l("/app/package/getPackageList", data, "GET");
- }
- function getPackageById(data) {
- return request$l("/app/package/getPackageById", data, "GET");
- }
- function getPackageDoctorList(data) {
- return request$l("/app/package/getPackageDoctorList", data, "GET");
- }
- let request$k = new Request$1().http;
- function getDoctorArticleCateList(data) {
- return request$k("/app/doctorArticle/getDoctorArticleCateList", data, "GET");
- }
- function getDoctorArticleList(data) {
- return request$k("/app/doctorArticle/getDoctorArticleList", data, "GET");
- }
- function getDoctorArticleById(data) {
- return request$k("/app/doctorArticle/getDoctorArticleById", data, "GET");
- }
- let request$j = new Request$1().http;
- function getMyDoctorList(data) {
- return request$j("/app/doctor/getMyDoctorList", data, "GET");
- }
- function getDoctorDetails(data) {
- return request$j("/app/doctor/getDoctorDetails", data, "GET");
- }
- function getDoctorPingList(data) {
- return request$j("/app/doctor/getDoctorPingList", data, "GET");
- }
- function getDoctorList(data) {
- return request$j("/app/doctor/getDoctorList", data, "GET");
- }
- function checkFollow(data) {
- return request$j("/app/doctor/checkFollow", data, "GET");
- }
- function doFollow$1(data) {
- return request$j("/app/doctor/doFollow", data, "POST", "application/json;charset=UTF-8");
- }
- let request$i = new Request$1().http;
- function getArticleList(data) {
- return request$i("/app/article/getArticleList", data, "GET");
- }
- function getArticleById(data) {
- return request$i("/app/article/getArticleById", data, "GET");
- }
- function getArticleCateList$1(data) {
- return request$i("/app/article/getArticleCateList", data, "GET");
- }
- let request$h = new Request$1().http;
- function getAdvList(data) {
- return request$h("/app/adv/getAdvList", data, "GET");
- }
- let request$g = new Request$1().http;
- function getDepartmentList(data) {
- return request$g("/app/department/getDepartmentList", data, "GET");
- }
- const _sfc_main$2t = {
- data() {
- return {
- layouts: [],
- yangshengs: [
- { id: "1", title: "药膳食疗", page: "/pages_index/medicatedFoodList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3cfbd47911cf4753aa9497eac500728d.png" },
- { id: "2", title: "经络穴位", page: "/pages_index/vesselList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e93536a9dc1a4f8ca09545097b12fdea.png" },
- { id: "3", title: "问答专区", page: "/pages_index/questionsList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e896972bd56f4e358188af36f2c5af42.png" },
- { id: "4", title: "疾病", page: "/pages_index/diseaseList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d6f1851cccae414b8baf2ba07782f91b.png" },
- { id: "5", title: "中药图解", page: "/pages_index/chineseMedicineList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ff43572d0d004285b5a3b0ef2663c471.png" },
- { id: "6", title: "名方今用", page: "/pages_index/famousPrescribeList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45db770e58c34963b0d2ba24a958b617.png" },
- { id: "7", title: "康复医案", page: "/pages_doctor/doctorArticleList", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/e793942797b24035b51f94d894bdfa0b.png" },
- { id: "8", title: "更多", page: "", icon: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3ee6160289914ee4a8126573fe4dc0ae.png" }
- ],
- isTop: false,
- titleColor: "#2A2B2E",
- descColor: "#626468",
- top: 0,
- // 状态栏的高度
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- advImgs: [],
- doctors: [],
- advs: [],
- articles: [],
- depts: [],
- doctocArticles: [],
- hosLevelOptions: [],
- packages: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_hospital_level");
- uni.$on("refreshMsgCount", () => {
- try {
- let totalUnreadCount = uni.$TUIKit.getTotalUnreadMessageCount();
- if (totalUnreadCount > 0) {
- try {
- uni.setTabBarBadge({
- //显示数字
- index: 1,
- //tabbar下标
- text: totalUnreadCount + ""
- //数字
- });
- } catch (e) {
- }
- } else {
- try {
- uni.hideTabBarRedDot({
- //隐藏红点
- index: 1
- //tabbar下标
- });
- } catch (e) {
- }
- }
- } catch (e) {
- }
- });
- },
- onShow() {
- this.getDoctorList();
- this.getArticleList();
- this.getAdvList();
- this.getDepartmentList();
- this.getDoctorArticleList();
- this.getPackageList();
- this.getConfigByKey("his.appShow");
- uni.$emit("refreshMsgCount");
- },
- onPageScroll(e) {
- this.top = e.scrollTop;
- },
- //发送给朋友
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: "御君方互联网医院",
- path: "/pages/index/index",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: "御君方互联网医院",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- computed: {
- bg: function() {
- var top = this.top / 120;
- formatAppLog("log", "at pages/index/index.vue:371", top);
- if (top > 0) {
- this.isTop = true;
- this.titleColor = "#fff";
- this.descColor = "#fff";
- } else {
- this.isTop = false;
- this.titleColor = "#2A2B2E";
- this.descColor = "#626468";
- }
- return "rgba(195,154,88, " + top + ")";
- }
- },
- methods: {
- dev() {
- uni.showToast({
- icon: "none",
- title: "敬请期待"
- });
- },
- getConfigByKey(key) {
- var that = this;
- var data = { key };
- getConfigByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.layouts = JSON.parse(res.data);
- this.layouts.sort((a, b) => a.sort - b.sort);
- formatAppLog("log", "at pages/index/index.vue:400", this.layouts);
- this.layouts.forEach(function(element) {
- if (element.id == "4") {
- if (!element.isShow) {
- that.yangshengs.splice(6, 1);
- }
- }
- });
- }
- },
- (rej) => {
- }
- );
- },
- yangshengClick(item) {
- if (item.page == "") {
- uni.showToast({
- icon: "none",
- title: "暂无更多"
- });
- return;
- }
- uni.navigateTo({
- url: item.page
- });
- },
- switchTab(url2) {
- uni.switchTab({
- url: url2
- });
- },
- navToMiniProgram() {
- uni.navigateToMiniProgram({
- // appid 写你要跳转的小程序的 appid
- appId: "wx45cf09091aead547",
- // 路径写 src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
- path: "/pages/common/launch",
- extraData: {
- // 'type': 'out'
- },
- // 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
- envVersion: "develop",
- success(res) {
- },
- fail(err) {
- }
- });
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_hospital_level") {
- this.hosLevelOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- getDoctorArticleList(page2) {
- var data = {
- pageNum: 1,
- pageSize: 10
- };
- getDoctorArticleList(data).then((res) => {
- if (res.code == 200) {
- this.doctocArticles = res.data.list;
- }
- });
- },
- getDepartmentList(page2) {
- var data = {
- isTui: 1
- };
- getDepartmentList(data).then((res) => {
- if (res.code == 200) {
- this.depts = res.data;
- }
- });
- },
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages/index/index.vue:498", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 1
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getArticleList() {
- var data = {
- isTui: 1,
- pageNum: 1,
- pageSize: 10
- };
- getArticleList(data).then((res) => {
- if (res.code == 200) {
- this.articles = res.data.list;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getDoctorList() {
- var data = {
- isTui: 1,
- pageNum: 1,
- pageSize: 10
- };
- getDoctorList(data).then((res) => {
- if (res.code == 200) {
- this.doctors = res.data.list;
- this.doctors.forEach(function(value2, index2, array3) {
- value2.prices = JSON.parse(value2.priceJson);
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getPackageList() {
- var data = {
- isShow: 1,
- pageNum: 1,
- pageSize: 10
- };
- getPackageList(data).then((res) => {
- if (res.code == 200) {
- this.packages = res.data.list;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- loginNavTo(url2) {
- this.$isLogin().then(
- (res) => {
- if (res) {
- formatAppLog("log", "at pages/index/index.vue:607", res);
- uni.navigateTo({
- url: url2
- });
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- },
- navTo(url2) {
- if (url2 == "dev") {
- uni.showToast({
- icon: "none",
- title: "尽情期待..."
- });
- return;
- }
- formatAppLog("log", "at pages/index/index.vue:629", url2);
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$2G(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4e7d59d18291491a81c67ed2cfd95a4c.png" })
- ]),
- vue.createElementVNode(
- "view",
- {
- class: "top-box",
- style: vue.normalizeStyle({ background: $options.bg })
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "top-title" }, [
- vue.createElementVNode(
- "view",
- {
- class: "name",
- style: vue.normalizeStyle({ color: $data.titleColor })
- },
- "芸医汇互联网医院",
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "desc-box" }, [
- !$data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "/static/images/dui.png"
- })) : vue.createCommentVNode("v-if", true),
- $data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "/static/images/dui1.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: "desc",
- style: vue.normalizeStyle({ color: $data.descColor })
- },
- "国家卫健委权威认证机构、世界各地千万用户健康选择",
- 4
- /* STYLE */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "search" }, [
- vue.createElementVNode("view", {
- class: "search-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_index/search"))
- }, [
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.createElementVNode("input", {
- disabled: "",
- type: "text",
- placeholder: "搜索医生/疾病/知识",
- "placeholder-class": "input-place"
- })
- ]),
- vue.createElementVNode("view", { class: "msg" }, [
- !$data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "msg",
- src: "/static/images/msg.png"
- })) : vue.createCommentVNode("v-if", true),
- $data.isTop ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "msg",
- src: "/static/images/msg1.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- })
- ])
- ])
- ],
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { style: { "padding-bottom": "178rpx" } }),
- $data.advImgs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "banner"
- }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", {
- class: "btn1",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_doctor/doctorList"))
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title" }, "专家问诊"),
- vue.createElementVNode("view", { class: "desc" }, "名医问诊处方")
- ]),
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/4c28bef97d714e569e672e006ee471e2.png" }),
- vue.createElementVNode("image", {
- class: "mask",
- src: "/static/images/mask.png"
- })
- ]),
- vue.createElementVNode("view", {
- class: "btn2",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_order/inquirySelectType"))
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title" }, "健康会诊"),
- vue.createElementVNode("view", { class: "desc" }, "快速会诊咨询")
- ]),
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/86e6f39efbc54d2dadf058dde269e573.png" }),
- vue.createElementVNode("image", {
- class: "mask",
- src: "/static/images/mask.png"
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "modules" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.layouts, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "module" }, [
- item.id == 1 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "menus"
- }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "menu-box" }, [
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_index/testList"))
- }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6104b270481040dd8340859c9d901c09.png" })
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.loginNavTo("/pages_user/integralGoodsList"))
- }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f9f2f6c6b4d24f1ba9a637dfed74f8c3.png" })
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_order/inquirySelect?inquiryType=3"))
- }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/76f15105ebe442398da1fe57e080bcd4.png" })
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab("/pages/store/index"))
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240509/908255a8d8134a5482f0314bfbb42c02.png" })
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- item.id == 2 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "depts"
- }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "dept-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.depts, (item2, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.navTo("/pages_doctor/doctorList?deptId=" + item2.deptId),
- class: "dept"
- }, [
- vue.createElementVNode("image", {
- class: "icon",
- src: item2.iconUrl
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item2.deptName),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", {
- onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_doctor/doctorList?deptId=0")),
- class: "dept"
- }, [
- vue.createElementVNode("image", {
- class: "icon",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/acbb520df8284c6aaff601cb06411c2a.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "更多科室")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- item.id == 3 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "depts"
- }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "dept-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.yangshengs, (item2, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.yangshengClick(item2),
- class: "dept"
- }, [
- vue.createElementVNode("image", {
- class: "icon",
- src: item2.icon
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item2.title) + vue.toDisplayString(item2.isShow),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- item.id == 4 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "doctor-articles"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "more",
- onClick: _cache[8] || (_cache[8] = ($event) => $options.navTo("/pages_doctor/doctorArticleList"))
- }, [
- vue.createElementVNode("view", { class: "text" }, "更多"),
- vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
- ])
- ]),
- vue.createElementVNode("scroll-view", {
- "scroll-x": true,
- style: { "white-space": "nowrap" }
- }, [
- vue.createElementVNode("view", { class: "article-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.doctocArticles, (item2, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "article",
- onClick: ($event) => $options.navTo("/pages_doctor/doctorArticleDetails?articleId=" + item2.articleId)
- }, [
- vue.createElementVNode("view", { class: "image-box" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: item2.imageUrl
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "views" },
- vue.toDisplayString(item2.views) + "人观看 ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doctor" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: item2.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name ellipsis" },
- vue.toDisplayString(item2.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position ellipsis" },
- vue.toDisplayString(item2.position),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "article-title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "article-title ellipsis" },
- vue.toDisplayString(item2.title),
- 1
- /* TEXT */
- )
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- item.id == 5 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "doctors"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "more",
- onClick: _cache[9] || (_cache[9] = ($event) => $options.navTo("/pages_doctor/doctorList"))
- }, [
- vue.createElementVNode("view", { class: "text" }, "更多"),
- vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
- ])
- ]),
- $data.doctors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "doctor-box"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.doctors, (item2, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item2.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "head-box" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item2.avatar
- }, null, 8, ["src"]),
- item2.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "isline"
- }, [
- vue.createElementVNode("view", { class: "img" }, [
- vue.createElementVNode("image", { src: "/static/images/isline.png" }),
- vue.createElementVNode("view", { class: "name" }, "在线")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item2.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position" },
- vue.toDisplayString(item2.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-dept" },
- vue.toDisplayString(item2.deptName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "hospital-box" }, [
- item2.hospitalLevel != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tag"
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item2.hospitalLevel)),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item2.hospitalName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-spec" }, [
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(item2.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-count" }, [
- vue.createElementVNode("view", { class: "name" }, "好评:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item2.pingStar) + "分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "接诊量:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item2.orderNumber),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "平均响应:"),
- vue.createElementVNode("view", { class: "count" })
- ]),
- vue.createElementVNode("view", { class: "doc-price" }, [
- vue.createElementVNode("view", { class: "btn" }, [
- vue.createTextVNode(" 咨询医生¥ "),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item2.prices, (price, index4) => {
- return vue.openBlock(), vue.createElementBlock("text", null, [
- vue.createTextVNode(
- vue.toDisplayString(price.price.toFixed(2)) + " ",
- 1
- /* TEXT */
- ),
- index4 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- item.id == 6 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "articles"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "more",
- onClick: _cache[10] || (_cache[10] = ($event) => $options.navTo("/pages_index/articleList"))
- }, [
- vue.createElementVNode("view", { class: "text" }, "更多"),
- vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
- ])
- ]),
- $data.articles.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "article-box"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.articles, (item2, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- onClick: ($event) => $options.navTo("/pages_index/articleDetails?articleId=" + item2.articleId)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item2.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "views" },
- " 浏览量 " + vue.toDisplayString(item2.views),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: item2.imageUrl
- }, null, 8, ["src"])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- item.id == 7 && item.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "packages"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "more",
- onClick: _cache[11] || (_cache[11] = ($event) => $options.navTo("/pages_index/packageList"))
- }, [
- vue.createElementVNode("view", { class: "text" }, "更多"),
- vue.createElementVNode("image", { src: "/static/images/arrow_gray.png" })
- ])
- ]),
- vue.createElementVNode("view", { class: "package-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.packages, (item2, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item2.packageId)
- }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- src: item2.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "bottom" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item2.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- "¥" + vue.toDisplayString(item2.price.toFixed(2)) + "元/日",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item2.sales) + "人已购",
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$2s = {
- data() {
- return {
- url: ""
- };
- },
- onLoad(val) {
- this.url = uni.getStorageSync("url");
- formatAppLog("log", "at pages/index/h5.vue:17", this.url);
- }
- };
- function _sfc_render$2F(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"])
- ]);
- }
- 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"]]);
- const _sfc_main$2r = {
- data() {
- return {
- content: ""
- };
- },
- onLoad(val) {
- uni.getStorageSync("content");
- formatAppLog("log", "at pages/index/content.vue:16", this.content);
- }
- };
- function _sfc_render$2E(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { innerHTML: $data.content }, null, 8, ["innerHTML"])
- ]);
- }
- 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"]]);
- const _sfc_main$2q = {
- data() {
- return {
- depts: [],
- doctors: []
- };
- },
- onShow() {
- this.getDepartmentList();
- this.getDoctorList();
- },
- methods: {
- getDoctorList() {
- var data = {
- isTui: 1,
- pageNum: 1,
- pageSize: 10
- };
- getDoctorList(data).then((res) => {
- if (res.code == 200) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.prices = JSON.parse(value2.priceJson);
- });
- this.doctors = res.data.list;
- formatAppLog("log", "at pages/doctor/index.vue:102", this.doctors);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getDepartmentList(page2) {
- var data = {};
- getDepartmentList(data).then((res) => {
- if (res.code == 200) {
- this.depts = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$2D(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "search" }, [
- vue.createElementVNode("view", { class: "search-box" }, [
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.createElementVNode("input", {
- disabled: "",
- type: "text",
- placeholder: "搜索医院/医生/疾病/知识",
- "placeholder-class": "input-place"
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "depts" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "全部科室")
- ]),
- vue.createElementVNode("view", { class: "dept-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.depts, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "dept",
- onClick: ($event) => $options.navTo("./doctorList?deptId=" + item.deptId)
- }, [
- vue.createElementVNode("image", {
- src: item.iconUrl
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "dept-name" },
- vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "doctors" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "专家推荐")
- ]),
- vue.createElementVNode("view", { class: "doctor-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.doctors, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => $options.navTo("./doctorDetails?doctorId=" + item.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position" },
- vue.toDisplayString(item.position),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "hospital" },
- vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-spec" }, [
- vue.createElementVNode("view", { class: "title" }, "擅长:"),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis" },
- vue.toDisplayString(item.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-ping" }, [
- vue.createElementVNode(
- "view",
- { class: "ping" },
- "好评:" + vue.toDisplayString(item.pingStar) + "分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- "咨询量:" + vue.toDisplayString(item.orderNumber),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-price" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createTextVNode("¥ "),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.prices, (price, index3) => {
- return vue.openBlock(), vue.createElementBlock("text", null, [
- vue.createTextVNode(
- vue.toDisplayString(price.price.toFixed(2)) + " ",
- 1
- /* TEXT */
- ),
- index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "btn" }, " 咨询医生 ")
- ])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ]);
- }
- 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"]]);
- const GlobalOption = {
- down: {
- // 其他down的配置参数也可以写,这里只展示了常用的配置:
- offset: 80,
- // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
- native: false
- // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
- },
- up: {
- // 其他up的配置参数也可以写,这里只展示了常用的配置:
- offset: 150,
- // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
- toTop: {
- // 回到顶部按钮,需配置src才显示
- src: "https://www.mescroll.com/img/mescroll-totop.png",
- // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
- offset: 1e3,
- // 列表滚动多少距离才显示回到顶部按钮,默认1000px
- right: 20,
- // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
- bottom: 120,
- // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
- width: 72
- // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
- },
- empty: {
- use: true,
- // 是否显示空布局
- icon: "https://www.mescroll.com/img/mescroll-empty.png"
- // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
- }
- },
- // 国际化配置
- i18n: {
- // 中文
- zh: {
- down: {
- textInOffset: "下拉刷新",
- // 下拉的距离在offset范围内的提示文本
- textOutOffset: "释放更新",
- // 下拉的距离大于offset范围的提示文本
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textSuccess: "加载成功",
- // 加载成功的文本
- textErr: "加载失败"
- // 加载失败的文本
- },
- up: {
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textNoMore: "-- END --",
- // 没有更多数据的提示文本
- empty: {
- tip: "~ 空空如也 ~"
- // 空提示
- }
- }
- },
- // 英文
- en: {
- down: {
- textInOffset: "drop down refresh",
- textOutOffset: "release updates",
- textLoading: "loading ...",
- textSuccess: "loaded successfully",
- textErr: "loading failed"
- },
- up: {
- textLoading: "loading ...",
- textNoMore: "-- END --",
- empty: {
- tip: "~ absolutely empty ~"
- }
- }
- }
- }
- };
- const mescrollI18n = {
- // 默认语言
- def: "zh",
- // 获取当前语言类型
- getType() {
- return uni.getStorageSync("mescroll-i18n") || this.def;
- },
- // 设置当前语言类型
- setType(type2) {
- uni.setStorageSync("mescroll-i18n", type2);
- }
- };
- const _sfc_main$2p = {
- props: {
- // empty的配置项: 默认为GlobalOption.up.empty
- option: {
- type: Object,
- default() {
- return {};
- }
- }
- },
- // 使用computed获取配置,用于支持option的动态配置
- computed: {
- // 图标
- icon() {
- if (this.option.icon != null) {
- return this.option.icon;
- } else {
- let i18nType = mescrollI18n.getType();
- if (this.option.i18n) {
- return this.option.i18n[i18nType].icon;
- } else {
- return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon;
- }
- }
- },
- // 文本提示
- tip() {
- if (this.option.tip != null) {
- return this.option.tip;
- } else {
- let i18nType = mescrollI18n.getType();
- if (this.option.i18n) {
- return this.option.i18n[i18nType].tip;
- } else {
- return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip;
- }
- }
- },
- // 按钮文本
- btnText() {
- if (this.option.i18n) {
- let i18nType = mescrollI18n.getType();
- return this.option.i18n[i18nType].btnText;
- } else {
- return this.option.btnText;
- }
- }
- },
- methods: {
- // 点击按钮
- emptyClick() {
- this.$emit("emptyclick");
- }
- }
- };
- function _sfc_render$2C(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["mescroll-empty", { "empty-fixed": $props.option.fixed }]),
- style: vue.normalizeStyle({ "z-index": $props.option.zIndex, top: $props.option.top })
- },
- [
- vue.createElementVNode("view", null, [
- $options.icon ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "empty-icon",
- src: $options.icon,
- mode: "widthFix"
- }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true)
- ]),
- $options.tip ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "empty-tip"
- },
- vue.toDisplayString($options.tip),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $options.btnText ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "empty-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.emptyClick && $options.emptyClick(...args))
- },
- vue.toDisplayString($options.btnText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$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"]]);
- function MeScroll(options, isScrollBody) {
- let me = this;
- me.version = "1.3.7";
- me.options = options || {};
- me.isScrollBody = isScrollBody || false;
- me.isDownScrolling = false;
- me.isUpScrolling = false;
- let hasDownCallback = me.options.down && me.options.down.callback;
- me.initDownScroll();
- me.initUpScroll();
- setTimeout(function() {
- if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
- if (me.optDown.autoShowLoading) {
- me.triggerDownScroll();
- } else {
- me.optDown.callback && me.optDown.callback(me);
- }
- }
- if (!me.isUpAutoLoad) {
- setTimeout(function() {
- me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
- }, 100);
- }
- }, 30);
- }
- MeScroll.prototype.extendDownScroll = function(optDown) {
- MeScroll.extend(optDown, {
- use: true,
- // 是否启用下拉刷新; 默认true
- auto: true,
- // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
- native: false,
- // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
- autoShowLoading: false,
- // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
- isLock: false,
- // 是否锁定下拉刷新,默认false;
- offset: 80,
- // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
- startTop: 100,
- // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
- inOffsetRate: 1,
- // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
- outOffsetRate: 0.2,
- // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
- bottomOffset: 20,
- // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
- minAngle: 45,
- // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
- textInOffset: "下拉刷新",
- // 下拉的距离在offset范围内的提示文本
- textOutOffset: "释放更新",
- // 下拉的距离大于offset范围的提示文本
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textSuccess: "加载成功",
- // 加载成功的文本
- textErr: "加载失败",
- // 加载失败的文本
- beforeEndDelay: 0,
- // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
- bgColor: "transparent",
- // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
- textColor: "gray",
- // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
- inited: null,
- // 下拉刷新初始化完毕的回调
- inOffset: null,
- // 下拉的距离进入offset范围内那一刻的回调
- outOffset: null,
- // 下拉的距离大于offset那一刻的回调
- onMoving: null,
- // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
- beforeLoading: null,
- // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
- showLoading: null,
- // 显示下拉刷新进度的回调
- afterLoading: null,
- // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
- beforeEndDownScroll: null,
- // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
- endDownScroll: null,
- // 结束下拉刷新的回调
- afterEndDownScroll: null,
- // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
- callback: function(mescroll) {
- mescroll.resetUpScroll();
- }
- });
- };
- MeScroll.prototype.extendUpScroll = function(optUp) {
- MeScroll.extend(optUp, {
- use: true,
- // 是否启用上拉加载; 默认true
- auto: true,
- // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
- isLock: false,
- // 是否锁定上拉加载,默认false;
- isBoth: true,
- // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
- callback: null,
- // 上拉加载的回调;function(page,mescroll){ }
- page: {
- num: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10,
- // 每页数据的数量
- time: null
- // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
- },
- noMoreSize: 5,
- // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
- offset: 150,
- // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
- textLoading: "加载中 ...",
- // 加载中的提示文本
- textNoMore: "-- END --",
- // 没有更多数据的提示文本
- bgColor: "transparent",
- // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
- textColor: "gray",
- // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
- inited: null,
- // 初始化完毕的回调
- showLoading: null,
- // 显示加载中的回调
- showNoMore: null,
- // 显示无更多数据的回调
- hideUpScroll: null,
- // 隐藏上拉加载的回调
- errDistance: 60,
- // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
- toTop: {
- // 回到顶部按钮,需配置src才显示
- src: null,
- // 图片路径,默认null (绝对路径或网络图)
- offset: 1e3,
- // 列表滚动多少距离才显示回到顶部按钮,默认1000
- duration: 300,
- // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
- btnClick: null,
- // 点击按钮的回调
- onShow: null,
- // 是否显示的回调
- zIndex: 9990,
- // fixed定位z-index值
- left: null,
- // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- right: 20,
- // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- bottom: 120,
- // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- safearea: false,
- // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
- width: 72,
- // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- radius: "50%"
- // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
- },
- empty: {
- use: true,
- // 是否显示空布局
- icon: null,
- // 图标路径
- tip: "~ 暂无相关数据 ~",
- // 提示
- btnText: "",
- // 按钮
- btnClick: null,
- // 点击按钮的回调
- onShow: null,
- // 是否显示的回调
- fixed: false,
- // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
- top: "100rpx",
- // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
- zIndex: 99
- // fixed定位z-index值
- },
- onScroll: false
- // 是否监听滚动事件
- });
- };
- MeScroll.extend = function(userOption, defaultOption) {
- if (!userOption)
- return defaultOption;
- for (let key in defaultOption) {
- if (userOption[key] == null) {
- let def = defaultOption[key];
- if (def != null && typeof def === "object") {
- userOption[key] = MeScroll.extend({}, def);
- } else {
- userOption[key] = def;
- }
- } else if (typeof userOption[key] === "object") {
- MeScroll.extend(userOption[key], defaultOption[key]);
- }
- }
- return userOption;
- };
- MeScroll.prototype.hasColor = function(color2) {
- if (!color2)
- return false;
- let c = color2.toLowerCase();
- return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
- };
- MeScroll.prototype.initDownScroll = function() {
- let me = this;
- me.optDown = me.options.down || {};
- if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor))
- me.optDown.textColor = "#fff";
- me.extendDownScroll(me.optDown);
- if (me.isScrollBody && me.optDown.native) {
- me.optDown.use = false;
- } else {
- me.optDown.native = false;
- }
- me.downHight = 0;
- if (me.optDown.use && me.optDown.inited) {
- setTimeout(function() {
- me.optDown.inited(me);
- }, 0);
- }
- };
- MeScroll.prototype.touchstartEvent = function(e) {
- if (!this.optDown.use)
- return;
- this.startPoint = this.getPoint(e);
- this.startTop = this.getScrollTop();
- this.startAngle = 0;
- this.lastPoint = this.startPoint;
- this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset;
- this.inTouchend = false;
- };
- MeScroll.prototype.touchmoveEvent = function(e) {
- if (!this.optDown.use)
- return;
- let me = this;
- let scrollTop = me.getScrollTop();
- let curPoint = me.getPoint(e);
- let moveY = curPoint.y - me.startPoint.y;
- if (moveY > 0 && (me.isScrollBody && scrollTop <= 0 || !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop))) {
- if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling && me.optUp.isBoth)) {
- if (!me.startAngle)
- me.startAngle = me.getAngle(me.lastPoint, curPoint);
- if (me.startAngle < me.optDown.minAngle)
- return;
- if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
- me.inTouchend = true;
- me.touchendEvent();
- return;
- }
- me.preventDefault(e);
- let diff = curPoint.y - me.lastPoint.y;
- if (me.downHight < me.optDown.offset) {
- if (me.movetype !== 1) {
- me.movetype = 1;
- me.isDownEndSuccess = null;
- me.optDown.inOffset && me.optDown.inOffset(me);
- me.isMoveDown = true;
- }
- me.downHight += diff * me.optDown.inOffsetRate;
- } else {
- if (me.movetype !== 2) {
- me.movetype = 2;
- me.optDown.outOffset && me.optDown.outOffset(me);
- me.isMoveDown = true;
- }
- if (diff > 0) {
- me.downHight += diff * me.optDown.outOffsetRate;
- } else {
- me.downHight += diff;
- }
- }
- me.downHight = Math.round(me.downHight);
- let rate = me.downHight / me.optDown.offset;
- me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight);
- }
- }
- me.lastPoint = curPoint;
- };
- MeScroll.prototype.touchendEvent = function(e) {
- if (!this.optDown.use)
- return;
- if (this.isMoveDown) {
- if (this.downHight >= this.optDown.offset) {
- this.triggerDownScroll();
- } else {
- this.downHight = 0;
- this.endDownScrollCall(this);
- }
- this.movetype = 0;
- this.isMoveDown = false;
- } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {
- let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0;
- if (isScrollUp) {
- let angle = this.getAngle(this.getPoint(e), this.startPoint);
- if (angle > 80) {
- this.triggerUpScroll(true);
- }
- }
- }
- };
- MeScroll.prototype.getPoint = function(e) {
- if (!e) {
- return {
- x: 0,
- y: 0
- };
- }
- if (e.touches && e.touches[0]) {
- return {
- x: e.touches[0].pageX,
- y: e.touches[0].pageY
- };
- } else if (e.changedTouches && e.changedTouches[0]) {
- return {
- x: e.changedTouches[0].pageX,
- y: e.changedTouches[0].pageY
- };
- } else {
- return {
- x: e.clientX,
- y: e.clientY
- };
- }
- };
- MeScroll.prototype.getAngle = function(p1, p2) {
- let x = Math.abs(p1.x - p2.x);
- let y = Math.abs(p1.y - p2.y);
- let z = Math.sqrt(x * x + y * y);
- let angle = 0;
- if (z !== 0) {
- angle = Math.asin(y / z) / Math.PI * 180;
- }
- return angle;
- };
- MeScroll.prototype.triggerDownScroll = function() {
- if (this.optDown.beforeLoading && this.optDown.beforeLoading(this))
- ;
- else {
- this.showDownScroll();
- !this.optDown.native && this.optDown.callback && this.optDown.callback(this);
- }
- };
- MeScroll.prototype.showDownScroll = function() {
- this.isDownScrolling = true;
- if (this.optDown.native) {
- uni.startPullDownRefresh();
- this.showDownLoadingCall(0);
- } else {
- this.downHight = this.optDown.offset;
- this.showDownLoadingCall(this.downHight);
- }
- };
- MeScroll.prototype.showDownLoadingCall = function(downHight) {
- this.optDown.showLoading && this.optDown.showLoading(this, downHight);
- this.optDown.afterLoading && this.optDown.afterLoading(this, downHight);
- };
- MeScroll.prototype.onPullDownRefresh = function() {
- this.isDownScrolling = true;
- this.showDownLoadingCall(0);
- this.optDown.callback && this.optDown.callback(this);
- };
- MeScroll.prototype.endDownScroll = function() {
- if (this.optDown.native) {
- this.isDownScrolling = false;
- this.endDownScrollCall(this);
- uni.stopPullDownRefresh();
- return;
- }
- let me = this;
- let endScroll = function() {
- me.downHight = 0;
- me.isDownScrolling = false;
- me.endDownScrollCall(me);
- if (!me.isScrollBody) {
- me.setScrollHeight(0);
- me.scrollTo(0, 0);
- }
- };
- let delay = 0;
- if (me.optDown.beforeEndDownScroll) {
- delay = me.optDown.beforeEndDownScroll(me);
- if (me.isDownEndSuccess == null)
- delay = 0;
- }
- if (typeof delay === "number" && delay > 0) {
- setTimeout(endScroll, delay);
- } else {
- endScroll();
- }
- };
- MeScroll.prototype.endDownScrollCall = function() {
- this.optDown.endDownScroll && this.optDown.endDownScroll(this);
- this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
- };
- MeScroll.prototype.lockDownScroll = function(isLock) {
- if (isLock == null)
- isLock = true;
- this.optDown.isLock = isLock;
- };
- MeScroll.prototype.lockUpScroll = function(isLock) {
- if (isLock == null)
- isLock = true;
- this.optUp.isLock = isLock;
- };
- MeScroll.prototype.initUpScroll = function() {
- let me = this;
- me.optUp = me.options.up || { use: false };
- if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor))
- me.optUp.textColor = "#fff";
- me.extendUpScroll(me.optUp);
- if (me.optUp.use === false)
- return;
- me.optUp.hasNext = true;
- me.startNum = me.optUp.page.num + 1;
- if (me.optUp.inited) {
- setTimeout(function() {
- me.optUp.inited(me);
- }, 0);
- }
- };
- MeScroll.prototype.onReachBottom = function() {
- if (this.isScrollBody && !this.isUpScrolling) {
- if (!this.optUp.isLock && this.optUp.hasNext) {
- this.triggerUpScroll();
- }
- }
- };
- MeScroll.prototype.onPageScroll = function(e) {
- if (!this.isScrollBody)
- return;
- this.setScrollTop(e.scrollTop);
- if (e.scrollTop >= this.optUp.toTop.offset) {
- this.showTopBtn();
- } else {
- this.hideTopBtn();
- }
- };
- MeScroll.prototype.scroll = function(e, onScroll) {
- this.setScrollTop(e.scrollTop);
- this.setScrollHeight(e.scrollHeight);
- if (this.preScrollY == null)
- this.preScrollY = 0;
- this.isScrollUp = e.scrollTop - this.preScrollY > 0;
- this.preScrollY = e.scrollTop;
- this.isScrollUp && this.triggerUpScroll(true);
- if (e.scrollTop >= this.optUp.toTop.offset) {
- this.showTopBtn();
- } else {
- this.hideTopBtn();
- }
- this.optUp.onScroll && onScroll && onScroll();
- };
- MeScroll.prototype.triggerUpScroll = function(isCheck) {
- if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
- if (isCheck === true) {
- let canUp = false;
- if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
- if (this.getScrollBottom() <= this.optUp.offset) {
- canUp = true;
- }
- }
- if (canUp === false)
- return;
- }
- this.showUpScroll();
- this.optUp.page.num++;
- this.isUpAutoLoad = true;
- this.num = this.optUp.page.num;
- this.size = this.optUp.page.size;
- this.time = this.optUp.page.time;
- this.optUp.callback(this);
- }
- };
- MeScroll.prototype.showUpScroll = function() {
- this.isUpScrolling = true;
- this.optUp.showLoading && this.optUp.showLoading(this);
- };
- MeScroll.prototype.showNoMore = function() {
- this.optUp.hasNext = false;
- this.optUp.showNoMore && this.optUp.showNoMore(this);
- };
- MeScroll.prototype.hideUpScroll = function() {
- this.optUp.hideUpScroll && this.optUp.hideUpScroll(this);
- };
- MeScroll.prototype.endUpScroll = function(isShowNoMore) {
- if (isShowNoMore != null) {
- if (isShowNoMore) {
- this.showNoMore();
- } else {
- this.hideUpScroll();
- }
- }
- this.isUpScrolling = false;
- };
- MeScroll.prototype.resetUpScroll = function(isShowLoading) {
- if (this.optUp && this.optUp.use) {
- let page2 = this.optUp.page;
- this.prePageNum = page2.num;
- this.prePageTime = page2.time;
- page2.num = this.startNum;
- page2.time = null;
- if (!this.isDownScrolling && isShowLoading !== false) {
- if (isShowLoading == null) {
- this.removeEmpty();
- this.showUpScroll();
- } else {
- this.showDownScroll();
- }
- }
- this.isUpAutoLoad = true;
- this.num = page2.num;
- this.size = page2.size;
- this.time = page2.time;
- this.optUp.callback && this.optUp.callback(this);
- }
- };
- MeScroll.prototype.setPageNum = function(num) {
- this.optUp.page.num = num - 1;
- };
- MeScroll.prototype.setPageSize = function(size) {
- this.optUp.page.size = size;
- };
- MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
- let hasNext;
- if (this.optUp.use && totalPage != null)
- hasNext = this.optUp.page.num < totalPage;
- this.endSuccess(dataSize, hasNext, systime);
- };
- MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
- let hasNext;
- if (this.optUp.use && totalSize != null) {
- let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize;
- hasNext = loadSize < totalSize;
- }
- this.endSuccess(dataSize, hasNext, systime);
- };
- MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
- let me = this;
- if (me.isDownScrolling) {
- me.isDownEndSuccess = true;
- me.endDownScroll();
- }
- if (me.optUp.use) {
- let isShowNoMore;
- if (dataSize != null) {
- let pageNum = me.optUp.page.num;
- let pageSize = me.optUp.page.size;
- if (pageNum === 1) {
- if (systime)
- me.optUp.page.time = systime;
- }
- if (dataSize < pageSize || hasNext === false) {
- me.optUp.hasNext = false;
- if (dataSize === 0 && pageNum === 1) {
- isShowNoMore = false;
- me.showEmpty();
- } else {
- let allDataSize = (pageNum - 1) * pageSize + dataSize;
- if (allDataSize < me.optUp.noMoreSize) {
- isShowNoMore = false;
- } else {
- isShowNoMore = true;
- }
- me.removeEmpty();
- }
- } else {
- isShowNoMore = false;
- me.optUp.hasNext = true;
- me.removeEmpty();
- }
- }
- me.endUpScroll(isShowNoMore);
- }
- };
- MeScroll.prototype.endErr = function(errDistance) {
- if (this.isDownScrolling) {
- this.isDownEndSuccess = false;
- let page2 = this.optUp.page;
- if (page2 && this.prePageNum) {
- page2.num = this.prePageNum;
- page2.time = this.prePageTime;
- }
- this.endDownScroll();
- }
- if (this.isUpScrolling) {
- this.optUp.page.num--;
- this.endUpScroll(false);
- if (this.isScrollBody && errDistance !== 0) {
- if (!errDistance)
- errDistance = this.optUp.errDistance;
- this.scrollTo(this.getScrollTop() - errDistance, 0);
- }
- }
- };
- MeScroll.prototype.showEmpty = function() {
- this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
- };
- MeScroll.prototype.removeEmpty = function() {
- this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
- };
- MeScroll.prototype.showTopBtn = function() {
- if (!this.topBtnShow) {
- this.topBtnShow = true;
- this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
- }
- };
- MeScroll.prototype.hideTopBtn = function() {
- if (this.topBtnShow) {
- this.topBtnShow = false;
- this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
- }
- };
- MeScroll.prototype.getScrollTop = function() {
- return this.scrollTop || 0;
- };
- MeScroll.prototype.setScrollTop = function(y) {
- this.scrollTop = y;
- };
- MeScroll.prototype.scrollTo = function(y, t) {
- this.myScrollTo && this.myScrollTo(y, t);
- };
- MeScroll.prototype.resetScrollTo = function(myScrollTo) {
- this.myScrollTo = myScrollTo;
- };
- MeScroll.prototype.getScrollBottom = function() {
- return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
- };
- MeScroll.prototype.getStep = function(star, end, callback, t, rate) {
- let diff = end - star;
- if (t === 0 || diff === 0) {
- callback && callback(end);
- return;
- }
- t = t || 300;
- rate = rate || 30;
- let count = t / rate;
- let step = diff / count;
- let i = 0;
- let timer = setInterval(function() {
- if (i < count - 1) {
- star += step;
- callback && callback(star, timer);
- i++;
- } else {
- callback && callback(end, timer);
- clearInterval(timer);
- }
- }, rate);
- };
- MeScroll.prototype.getClientHeight = function(isReal) {
- let h = this.clientHeight || 0;
- if (h === 0 && isReal !== true) {
- h = this.getBodyHeight();
- }
- return h;
- };
- MeScroll.prototype.setClientHeight = function(h) {
- this.clientHeight = h;
- };
- MeScroll.prototype.getScrollHeight = function() {
- return this.scrollHeight || 0;
- };
- MeScroll.prototype.setScrollHeight = function(h) {
- this.scrollHeight = h;
- };
- MeScroll.prototype.getBodyHeight = function() {
- return this.bodyHeight || 0;
- };
- MeScroll.prototype.setBodyHeight = function(h) {
- this.bodyHeight = h;
- };
- MeScroll.prototype.preventDefault = function(e) {
- if (e && e.cancelable && !e.defaultPrevented)
- e.preventDefault();
- };
- const _sfc_main$2o = {
- props: {
- // up.toTop的配置项
- option: Object,
- // 是否显示
- value: false
- },
- computed: {
- // 支付宝小程序需写成计算属性,prop定义default仍报错
- mOption() {
- return this.option || {};
- },
- // 优先显示左边
- left() {
- return this.mOption.left ? this.addUnit(this.mOption.left) : "auto";
- },
- // 右边距离 (优先显示左边)
- right() {
- return this.mOption.left ? "auto" : this.addUnit(this.mOption.right);
- }
- },
- methods: {
- addUnit(num) {
- if (!num)
- return 0;
- if (typeof num === "number")
- return num + "rpx";
- return num;
- },
- toTopClick() {
- this.$emit("input", false);
- this.$emit("click");
- }
- }
- };
- function _sfc_render$2B(_ctx, _cache, $props, $setup, $data, $options) {
- return $options.mOption.src ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: vue.normalizeClass(["mescroll-totop", [$props.value ? "mescroll-totop-in" : "mescroll-totop-out", { "mescroll-totop-safearea": $options.mOption.safearea }]]),
- 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) }),
- src: $options.mOption.src,
- mode: "widthFix",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.toTopClick && $options.toTopClick(...args))
- }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true);
- }
- const MescrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$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"]]);
- const WxsMixin = {
- data() {
- return {
- // 传入wxs视图层的数据 (响应式)
- wxsProp: {
- optDown: {},
- // 下拉刷新的配置
- scrollTop: 0,
- // 滚动条的距离
- bodyHeight: 0,
- // body的高度
- isDownScrolling: false,
- // 是否正在下拉刷新中
- isUpScrolling: false,
- // 是否正在上拉加载中
- isScrollBody: true,
- // 是否为mescroll-body滚动
- isUpBoth: true,
- // 上拉加载时,是否同时可以下拉刷新
- t: 0
- // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
- },
- // 标记调用wxs视图层的方法
- callProp: {
- callType: "",
- // 方法名
- t: 0
- // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
- }
- // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
- // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
- };
- },
- methods: {
- // wxs视图层调用逻辑层的回调
- wxsCall(msg) {
- if (msg.type === "setWxsProp") {
- this.wxsProp = {
- optDown: this.mescroll.optDown,
- scrollTop: this.mescroll.getScrollTop(),
- bodyHeight: this.mescroll.getBodyHeight(),
- isDownScrolling: this.mescroll.isDownScrolling,
- isUpScrolling: this.mescroll.isUpScrolling,
- isUpBoth: this.mescroll.optUp.isBoth,
- isScrollBody: this.mescroll.isScrollBody,
- t: Date.now()
- };
- } else if (msg.type === "setLoadType") {
- this.downLoadType = msg.downLoadType;
- this.$set(this.mescroll, "downLoadType", this.downLoadType);
- this.$set(this.mescroll, "isDownEndSuccess", null);
- } else if (msg.type === "triggerDownScroll") {
- this.mescroll.triggerDownScroll();
- } else if (msg.type === "endDownScroll") {
- this.mescroll.endDownScroll();
- } else if (msg.type === "triggerUpScroll") {
- this.mescroll.triggerUpScroll(true);
- }
- }
- },
- mounted() {
- this.mescroll.optDown.afterLoading = () => {
- this.callProp = { callType: "showLoading", t: Date.now() };
- };
- this.mescroll.optDown.afterEndDownScroll = () => {
- this.callProp = { callType: "endDownScroll", t: Date.now() };
- let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0);
- setTimeout(() => {
- if (this.downLoadType === 4 || this.downLoadType === 0) {
- this.callProp = { callType: "clearTransform", t: Date.now() };
- }
- this.$set(this.mescroll, "downLoadType", this.downLoadType);
- }, delay);
- };
- this.wxsCall({ type: "setWxsProp" });
- }
- };
- const block0$1 = (Comp) => {
- (Comp.$wxs || (Comp.$wxs = [])).push("wxsBiz");
- (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxsBiz"] = "30f4e25a";
- };
- const block1 = (Comp) => {
- (Comp.$renderjs || (Comp.$renderjs = [])).push("renderBiz");
- (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["renderBiz"] = "1ca30ca9";
- };
- const _sfc_main$2n = {
- name: "mescroll-body",
- mixins: [WxsMixin],
- components: {
- MescrollTop
- },
- props: {
- down: Object,
- up: Object,
- i18n: Object,
- top: [String, Number],
- topbar: [Boolean, String],
- bottom: [String, Number],
- safearea: Boolean,
- height: [String, Number],
- bottombar: {
- type: Boolean,
- default: true
- },
- sticky: Boolean
- },
- data() {
- return {
- mescroll: { optDown: {}, optUp: {} },
- // mescroll实例
- downHight: 0,
- //下拉刷新: 容器高度
- downRate: 0,
- // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
- downLoadType: 0,
- // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
- upLoadType: 0,
- // 上拉加载状态:0(loading前),1(loading中),2(没有更多了,显示END文本提示),3(没有更多了,不显示END文本提示)
- isShowEmpty: false,
- // 是否显示空布局
- isShowToTop: false,
- // 是否显示回到顶部按钮
- windowHeight: 0,
- // 可使用窗口的高度
- windowBottom: 0,
- // 可使用窗口的底部位置
- statusBarHeight: 0
- // 状态栏高度
- };
- },
- computed: {
- // mescroll最小高度,默认windowHeight,使列表不满屏仍可下拉
- minHeight() {
- return this.toPx(this.height || "100%") + "px";
- },
- // 下拉布局往下偏移的距离 (px)
- numTop() {
- return this.toPx(this.top);
- },
- padTop() {
- return this.numTop + "px";
- },
- // 上拉布局往上偏移 (px)
- numBottom() {
- return this.toPx(this.bottom);
- },
- padBottom() {
- return this.numBottom + "px";
- },
- // 是否为重置下拉的状态
- isDownReset() {
- return this.downLoadType === 3 || this.downLoadType === 4;
- },
- // 过渡
- transition() {
- return this.isDownReset ? "transform 300ms" : "";
- },
- translateY() {
- return this.downHight > 0 ? "translateY(" + this.downHight + "px)" : "";
- },
- // 是否在加载中
- isDownLoading() {
- return this.downLoadType === 3;
- },
- // 旋转的角度
- downRotate() {
- return "rotate(" + 360 * this.downRate + "deg)";
- },
- // 文本提示
- downText() {
- if (!this.mescroll)
- return "";
- switch (this.downLoadType) {
- case 1:
- return this.mescroll.optDown.textInOffset;
- case 2:
- return this.mescroll.optDown.textOutOffset;
- case 3:
- return this.mescroll.optDown.textLoading;
- case 4:
- return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess == false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
- default:
- return this.mescroll.optDown.textInOffset;
- }
- }
- },
- methods: {
- //number,rpx,upx,px,% --> px的数值
- toPx(num) {
- if (typeof num === "string") {
- if (num.indexOf("px") !== -1) {
- if (num.indexOf("rpx") !== -1) {
- num = num.replace("rpx", "");
- } else if (num.indexOf("upx") !== -1) {
- num = num.replace("upx", "");
- } else {
- return Number(num.replace("px", ""));
- }
- } else if (num.indexOf("%") !== -1) {
- let rate = Number(num.replace("%", "")) / 100;
- return this.windowHeight * rate;
- }
- }
- return num ? uni.upx2px(Number(num)) : 0;
- },
- // 点击空布局的按钮回调
- emptyClick() {
- this.$emit("emptyclick", this.mescroll);
- },
- // 点击回到顶部的按钮回调
- toTopClick() {
- this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration);
- this.$emit("topclick", this.mescroll);
- }
- },
- // 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
- created() {
- let vm = this;
- let diyOption = {
- // 下拉刷新的配置
- down: {
- inOffset() {
- vm.downLoadType = 1;
- },
- outOffset() {
- vm.downLoadType = 2;
- },
- onMoving(mescroll, rate, downHight) {
- vm.downHight = downHight;
- vm.downRate = rate;
- },
- showLoading(mescroll, downHight) {
- vm.downLoadType = 3;
- vm.downHight = downHight;
- },
- beforeEndDownScroll(mescroll) {
- vm.downLoadType = 4;
- return mescroll.optDown.beforeEndDelay;
- },
- endDownScroll() {
- vm.downLoadType = 4;
- vm.downHight = 0;
- if (vm.downResetTimer) {
- clearTimeout(vm.downResetTimer);
- vm.downResetTimer = null;
- }
- vm.downResetTimer = setTimeout(() => {
- if (vm.downLoadType === 4)
- vm.downLoadType = 0;
- }, 300);
- },
- // 派发下拉刷新的回调
- callback: function(mescroll) {
- vm.$emit("down", mescroll);
- }
- },
- // 上拉加载的配置
- up: {
- // 显示加载中的回调
- showLoading() {
- vm.upLoadType = 1;
- },
- // 显示无更多数据的回调
- showNoMore() {
- vm.upLoadType = 2;
- },
- // 隐藏上拉加载的回调
- hideUpScroll(mescroll) {
- vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
- },
- // 空布局
- empty: {
- onShow(isShow) {
- vm.isShowEmpty = isShow;
- }
- },
- // 回到顶部
- toTop: {
- onShow(isShow) {
- vm.isShowToTop = isShow;
- }
- },
- // 派发上拉加载的回调
- callback: function(mescroll) {
- vm.$emit("up", mescroll);
- }
- }
- };
- let i18nType = mescrollI18n.getType();
- let i18nOption = { type: i18nType };
- MeScroll.extend(i18nOption, vm.i18n);
- MeScroll.extend(i18nOption, GlobalOption.i18n);
- MeScroll.extend(diyOption, i18nOption[i18nType]);
- MeScroll.extend(diyOption, { down: GlobalOption.down, up: GlobalOption.up });
- let myOption = JSON.parse(JSON.stringify({ down: vm.down, up: vm.up }));
- MeScroll.extend(myOption, diyOption);
- vm.mescroll = new MeScroll(myOption, true);
- vm.mescroll.i18n = i18nOption;
- vm.$emit("init", vm.mescroll);
- const sys2 = uni.getSystemInfoSync();
- if (sys2.windowHeight)
- vm.windowHeight = sys2.windowHeight;
- if (sys2.windowBottom)
- vm.windowBottom = sys2.windowBottom;
- if (sys2.statusBarHeight)
- vm.statusBarHeight = sys2.statusBarHeight;
- vm.mescroll.setBodyHeight(sys2.windowHeight);
- vm.mescroll.resetScrollTo((y, t) => {
- if (typeof y === "string") {
- setTimeout(() => {
- let selector;
- if (y.indexOf("#") == -1 && y.indexOf(".") == -1) {
- selector = "#" + y;
- } else {
- selector = y;
- if (y.indexOf(">>>") != -1) {
- selector = y.split(">>>")[1].trim();
- }
- }
- uni.createSelectorQuery().select(selector).boundingClientRect(function(rect) {
- if (rect) {
- let top = rect.top;
- top += vm.mescroll.getScrollTop();
- uni.pageScrollTo({
- scrollTop: top,
- duration: t
- });
- } else {
- formatAppLog("error", "at uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue:352", selector + " does not exist");
- }
- }).exec();
- }, 30);
- } else {
- uni.pageScrollTo({
- scrollTop: y,
- duration: t
- });
- }
- });
- if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null)
- ;
- else {
- vm.mescroll.optUp.toTop.safearea = vm.safearea;
- }
- uni.$on("setMescrollGlobalOption", (options) => {
- if (!options)
- return;
- let i18nType2 = options.i18n ? options.i18n.type : null;
- if (i18nType2 && vm.mescroll.i18n.type != i18nType2) {
- vm.mescroll.i18n.type = i18nType2;
- mescrollI18n.setType(i18nType2);
- MeScroll.extend(options, vm.mescroll.i18n[i18nType2]);
- }
- if (options.down) {
- let down = MeScroll.extend({}, options.down);
- vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown);
- }
- if (options.up) {
- let up = MeScroll.extend({}, options.up);
- vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp);
- }
- });
- },
- destroyed() {
- uni.$off("setMescrollGlobalOption");
- }
- };
- function _sfc_render$2A(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_empty = resolveEasycom(vue.resolveDynamicComponent("mescroll-empty"), __easycom_0$d);
- const _component_mescroll_top = vue.resolveComponent("mescroll-top");
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["mescroll-body mescroll-render-touch", { "mescorll-sticky": $props.sticky }]),
- style: vue.normalizeStyle({ "minHeight": $options.minHeight, "padding-top": $options.padTop, "padding-bottom": $options.padBottom }),
- onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.wxsBiz.touchstartEvent && _ctx.wxsBiz.touchstartEvent(...args)),
- onTouchmove: _cache[2] || (_cache[2] = (...args) => _ctx.wxsBiz.touchmoveEvent && _ctx.wxsBiz.touchmoveEvent(...args)),
- onTouchend: _cache[3] || (_cache[3] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
- onTouchcancel: _cache[4] || (_cache[4] = (...args) => _ctx.wxsBiz.touchendEvent && _ctx.wxsBiz.touchendEvent(...args)),
- "change:prop": _ctx.wxsBiz.propObserver,
- prop: vue.wp(_ctx.wxsProp)
- }, [
- vue.createCommentVNode(" 状态栏 "),
- $props.topbar && $data.statusBarHeight ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "mescroll-topbar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight + "px", background: $props.topbar })
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "mescroll-body-content mescroll-wxs-content",
- style: vue.normalizeStyle({ transform: $options.translateY, transition: $options.transition }),
- "change:prop": _ctx.wxsBiz.callObserver,
- prop: vue.wp(_ctx.callProp)
- }, [
- vue.createCommentVNode(" 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)"),
- vue.createCommentVNode(' <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> '),
- $data.mescroll.optDown.use ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "mescroll-downwarp",
- style: vue.normalizeStyle({ "background": $data.mescroll.optDown.bgColor, "color": $data.mescroll.optDown.textColor })
- },
- [
- vue.createElementVNode("view", { class: "downwarp-content" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["downwarp-progress mescroll-wxs-progress", { "mescroll-rotate": $options.isDownLoading }]),
- style: vue.normalizeStyle({ "border-color": $data.mescroll.optDown.textColor, "transform": $options.downRotate })
- },
- null,
- 6
- /* CLASS, STYLE */
- ),
- vue.createElementVNode(
- "view",
- { class: "downwarp-tip" },
- vue.toDisplayString($options.downText),
- 1
- /* TEXT */
- )
- ])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 列表内容 "),
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
- vue.createCommentVNode(" 空布局 "),
- $data.isShowEmpty ? (vue.openBlock(), vue.createBlock(_component_mescroll_empty, {
- key: 1,
- option: $data.mescroll.optUp.empty,
- onEmptyclick: $options.emptyClick
- }, null, 8, ["option", "onEmptyclick"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)"),
- vue.createCommentVNode(' <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> '),
- $data.mescroll.optUp.use && !$options.isDownLoading && $data.upLoadType !== 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "mescroll-upwarp",
- style: vue.normalizeStyle({ "background": $data.mescroll.optUp.bgColor, "color": $data.mescroll.optUp.textColor })
- },
- [
- vue.createCommentVNode(" 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) "),
- vue.withDirectives(vue.createElementVNode(
- "view",
- null,
- [
- vue.createElementVNode(
- "view",
- {
- class: "upwarp-progress mescroll-rotate",
- style: vue.normalizeStyle({ "border-color": $data.mescroll.optUp.textColor })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode(
- "view",
- { class: "upwarp-tip" },
- vue.toDisplayString($data.mescroll.optUp.textLoading),
- 1
- /* TEXT */
- )
- ],
- 512
- /* NEED_PATCH */
- ), [
- [vue.vShow, $data.upLoadType === 1]
- ]),
- vue.createCommentVNode(" 无数据 "),
- $data.upLoadType === 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "upwarp-nodata"
- },
- vue.toDisplayString($data.mescroll.optUp.textNoMore),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], 12, ["change:prop", "prop"]),
- vue.createCommentVNode(" 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) "),
- vue.createCommentVNode(" 适配iPhoneX "),
- $props.safearea ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "mescroll-safearea"
- })) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 回到顶部按钮 (fixed元素需写在transform外面,防止降级为absolute)"),
- vue.createVNode(_component_mescroll_top, {
- modelValue: $data.isShowToTop,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.isShowToTop = $event),
- option: $data.mescroll.optUp.toTop,
- onClick: $options.toTopClick
- }, null, 8, ["modelValue", "option", "onClick"]),
- vue.createCommentVNode(" renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 "),
- vue.createElementVNode("view", {
- "change:prop": _ctx.renderBiz.propObserver,
- prop: vue.wp(_ctx.wxsProp)
- }, null, 8, ["change:prop", "prop"])
- ], 46, ["change:prop", "prop"]);
- }
- if (typeof block0$1 === "function")
- block0$1(_sfc_main$2n);
- if (typeof block1 === "function")
- block1(_sfc_main$2n);
- 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"]]);
- const _sfc_main$2m = {
- components: {},
- data() {
- return {
- cateId: 0,
- menuCurrent: 0
- //轮播下标
- };
- },
- props: {
- list: {
- type: Array,
- default: []
- },
- menu: {
- default: 4
- },
- imgW: {
- type: Number,
- default: 88
- }
- },
- computed: {
- carousel() {
- if (this.list) {
- let data = this.sortData(this.list, this.menu * 2);
- return data;
- }
- }
- },
- created() {
- },
- methods: {
- // 数据分层
- sortData(oArr, length) {
- let arr = [];
- let minArr = [];
- oArr.forEach((c) => {
- if (minArr.length === length) {
- minArr = [];
- }
- if (minArr.length === 0) {
- arr.push(minArr);
- }
- minArr.push(c);
- });
- return arr;
- },
- // 轮播
- onSwiper(e) {
- this.menuCurrent = e.detail.current;
- },
- routerTo(item) {
- this.cateId = item.cateId;
- this.$emit("menuClick", item);
- }
- }
- };
- function _sfc_render$2z(_ctx, _cache, $props, $setup, $data, $options) {
- return $options.carousel ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "menu-list-box",
- style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:160rpx` : `height:320rpx`)
- },
- [
- vue.createElementVNode(
- "swiper",
- {
- class: "menu-swiper-box",
- style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:160rpx` : `height:320rpx`),
- onChange: _cache[0] || (_cache[0] = (...args) => $options.onSwiper && $options.onSwiper(...args)),
- circular: "",
- autoplay: false,
- interval: 3e3,
- duration: 1e3
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.carousel, (itemList, index2) => {
- return vue.openBlock(), vue.createElementBlock(
- "swiper-item",
- {
- class: "menu-swiper-item",
- key: index2,
- style: vue.normalizeStyle($props.list.length <= $props.menu ? `height:200rpx` : `height:340rpx`)
- },
- [
- vue.createElementVNode("view", { class: "menu-tab-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(itemList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "tab-list",
- key: item.cateId,
- onClick: ($event) => $options.routerTo(item)
- }, [
- vue.createElementVNode("image", {
- class: "tab-img",
- style: vue.normalizeStyle({ width: $props.imgW + "rpx", height: $props.imgW + "rpx" }),
- src: item.imgUrl
- }, null, 12, ["src"]),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass($data.cateId == item.cateId ? "tab-title active" : "tab-title")
- },
- vue.toDisplayString(item.cateName),
- 3
- /* TEXT, CLASS */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ],
- 4
- /* STYLE */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 36
- /* STYLE, NEED_HYDRATION */
- ),
- $options.carousel.length > 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "menu-dots"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.carousel.length, (dot, index2) => {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- class: vue.normalizeClass($data.menuCurrent === index2 ? "dot-active" : "dot"),
- key: index2
- },
- null,
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- 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"]]);
- const MescrollMixin = {
- data() {
- return {
- mescroll: null
- //mescroll实例对象
- };
- },
- // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
- onPullDownRefresh() {
- this.mescroll && this.mescroll.onPullDownRefresh();
- },
- // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
- onPageScroll(e) {
- this.mescroll && this.mescroll.onPageScroll(e);
- },
- // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
- onReachBottom() {
- this.mescroll && this.mescroll.onReachBottom();
- },
- methods: {
- // mescroll组件初始化的回调,可获取到mescroll对象
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- this.mescrollInitByRef();
- },
- // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序)
- mescrollInitByRef() {
- if (!this.mescroll || !this.mescroll.resetUpScroll) {
- let mescrollRef = this.$refs.mescrollRef;
- if (mescrollRef)
- this.mescroll = mescrollRef.mescroll;
- }
- },
- // 下拉刷新的回调 (mixin默认resetUpScroll)
- downCallback() {
- if (this.mescroll.optUp.use) {
- this.mescroll.resetUpScroll();
- } else {
- setTimeout(() => {
- this.mescroll.endSuccess();
- }, 500);
- }
- },
- // 上拉加载的回调
- upCallback() {
- setTimeout(() => {
- this.mescroll.endErr();
- }, 500);
- }
- },
- mounted() {
- this.mescrollInitByRef();
- }
- };
- const _sfc_main$2l = {
- components: { Menu },
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- top: null,
- cates: [],
- diseaseType: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- this.getPackagCateList(1);
- },
- methods: {
- menuClick(item) {
- this.diseaseType = item.cateId;
- this.mescroll.resetUpScroll();
- },
- getPackagCateList(type2) {
- var data = { type: type2 };
- var that = this;
- getPackagCateList(data).then(
- (res) => {
- if (res.code == 200) {
- this.cates = res.data;
- var query = uni.createSelectorQuery().in(that);
- setTimeout(function() {
- query.select(".top-content").boundingClientRect((data2) => {
- if (data2) {
- formatAppLog("log", "at pages/store/index.vue:91", "View height:", data2.height + "px");
- that.top = data2.height + "px";
- }
- }).exec();
- }, 500);
- }
- },
- (err) => {
- }
- );
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- isShow: 1,
- diseaseType: this.diseaseType,
- keyword: this.keyword,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getPackageList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$2y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_Menu = vue.resolveComponent("Menu");
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
- key: 0,
- list: $data.cates,
- onMenuClick: $options.menuClick,
- style: { "width": "100%" }
- }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
- key: 0,
- top: $data.top,
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "package-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item.packageId)
- }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "bottom" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- "¥" + vue.toDisplayString(item.price.toFixed(2)) + "元/日",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.sales) + "人已购",
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const props$u = {
- props: {
- color: {
- type: String,
- default: props$y.line.color
- },
- // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
- length: {
- type: [String, Number],
- default: props$y.line.length
- },
- // 线条方向,col-竖向,row-横向
- direction: {
- type: String,
- default: props$y.line.direction
- },
- // 是否显示细边框
- hairline: {
- type: Boolean,
- default: props$y.line.hairline
- },
- // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
- margin: {
- type: [String, Number],
- default: props$y.line.margin
- },
- // 是否虚线,true-虚线,false-实线
- dashed: {
- type: Boolean,
- default: props$y.line.dashed
- }
- }
- };
- const _sfc_main$2k = {
- name: "u-line",
- mixins: [mpMixin, mixin, props$u],
- computed: {
- lineStyle() {
- const style = {};
- style.margin = this.margin;
- if (this.direction === "row") {
- style.borderBottomWidth = "1px";
- style.borderBottomStyle = this.dashed ? "dashed" : "solid";
- style.width = uni.$u.addUnit(this.length);
- if (this.hairline)
- style.transform = "scaleY(0.5)";
- } else {
- style.borderLeftWidth = "1px";
- style.borderLeftStyle = this.dashed ? "dashed" : "solid";
- style.height = uni.$u.addUnit(this.length);
- if (this.hairline)
- style.transform = "scaleX(0.5)";
- }
- style.borderColor = this.color;
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- }
- };
- function _sfc_render$2x(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-line",
- style: vue.normalizeStyle([$options.lineStyle])
- },
- null,
- 4
- /* STYLE */
- );
- }
- const __easycom_1$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"]]);
- const props$t = {
- props: {
- // 是否展示组件
- show: {
- type: Boolean,
- default: props$y.transition.show
- },
- // 使用的动画模式
- mode: {
- type: String,
- default: props$y.transition.mode
- },
- // 动画的执行时间,单位ms
- duration: {
- type: [String, Number],
- default: props$y.transition.duration
- },
- // 使用的动画过渡函数
- timingFunction: {
- type: String,
- default: props$y.transition.timingFunction
- }
- }
- };
- const getClassNames = (name) => ({
- enter: `u-${name}-enter u-${name}-enter-active`,
- "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
- leave: `u-${name}-leave u-${name}-leave-active`,
- "leave-to": `u-${name}-leave-to u-${name}-leave-active`
- });
- const transition = {
- methods: {
- // 组件被点击发出事件
- clickHandler() {
- this.$emit("click");
- },
- // vue版本的组件进场处理
- vueEnter() {
- const classNames = getClassNames(this.mode);
- this.status = "enter";
- this.$emit("beforeEnter");
- this.inited = true;
- this.display = true;
- this.classes = classNames.enter;
- this.$nextTick(async () => {
- this.$emit("enter");
- this.transitionEnded = false;
- this.$emit("afterEnter");
- this.classes = classNames["enter-to"];
- });
- },
- // 动画离场处理
- vueLeave() {
- if (!this.display)
- return;
- const classNames = getClassNames(this.mode);
- this.status = "leave";
- this.$emit("beforeLeave");
- this.classes = classNames.leave;
- this.$nextTick(() => {
- this.transitionEnded = false;
- this.$emit("leave");
- setTimeout(this.onTransitionEnd, this.duration);
- this.classes = classNames["leave-to"];
- });
- },
- // 完成过渡后触发
- onTransitionEnd() {
- if (this.transitionEnded)
- return;
- this.transitionEnded = true;
- this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
- if (!this.show && this.display) {
- this.display = false;
- this.inited = false;
- }
- }
- }
- };
- const _sfc_main$2j = {
- name: "u-transition",
- data() {
- return {
- inited: false,
- // 是否显示/隐藏组件
- viewStyle: {},
- // 组件内部的样式
- status: "",
- // 记录组件动画的状态
- transitionEnded: false,
- // 组件是否结束的标记
- display: false,
- // 组件是否展示
- classes: ""
- // 应用的类名
- };
- },
- computed: {
- mergeStyle() {
- const { viewStyle, customStyle } = this;
- return {
- transitionDuration: `${this.duration}ms`,
- // display: `${this.display ? '' : 'none'}`,
- transitionTimingFunction: this.timingFunction,
- // 避免自定义样式影响到动画属性,所以写在viewStyle前面
- ...uni.$u.addStyle(customStyle),
- ...viewStyle
- };
- }
- },
- // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
- mixins: [mpMixin, mixin, transition, props$t],
- watch: {
- show: {
- handler(newVal) {
- newVal ? this.vueEnter() : this.vueLeave();
- },
- // 表示同时监听初始化时的props的show的意思
- immediate: true
- }
- }
- };
- function _sfc_render$2w(_ctx, _cache, $props, $setup, $data, $options) {
- return $data.inited ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-transition", $data.classes]),
- ref: "u-transition",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
- style: vue.normalizeStyle([$options.mergeStyle]),
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args))
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 38
- /* CLASS, STYLE, NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_1$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"]]);
- const props$s = {
- props: {
- // 是否显示遮罩
- show: {
- type: Boolean,
- default: props$y.overlay.show
- },
- // 层级z-index
- zIndex: {
- type: [String, Number],
- default: props$y.overlay.zIndex
- },
- // 遮罩的过渡时间,单位为ms
- duration: {
- type: [String, Number],
- default: props$y.overlay.duration
- },
- // 不透明度值,当做rgba的第四个参数
- opacity: {
- type: [String, Number],
- default: props$y.overlay.opacity
- }
- }
- };
- const _sfc_main$2i = {
- name: "u-overlay",
- mixins: [mpMixin, mixin, props$s],
- computed: {
- overlayStyle() {
- const style = {
- position: "fixed",
- top: 0,
- left: 0,
- right: 0,
- zIndex: this.zIndex,
- bottom: 0,
- "background-color": `rgba(0, 0, 0, ${this.opacity})`
- };
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- methods: {
- clickHandler() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$2v(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- show: _ctx.show,
- "custom-class": "u-overlay",
- duration: _ctx.duration,
- "custom-style": $options.overlayStyle,
- onClick: $options.clickHandler
- }, {
- default: vue.withCtx(() => [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "duration", "custom-style", "onClick"]);
- }
- const __easycom_0$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"]]);
- const props$r = {
- props: {
- bgColor: {
- type: String,
- default: props$y.statusBar.bgColor
- }
- }
- };
- const _sfc_main$2h = {
- name: "u-status-bar",
- mixins: [mpMixin, mixin, props$r],
- data() {
- return {};
- },
- computed: {
- style() {
- const style = {};
- style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px");
- style.backgroundColor = this.bgColor;
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- }
- };
- function _sfc_render$2u(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- style: vue.normalizeStyle([$options.style]),
- class: "u-status-bar"
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_0$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"]]);
- const icons = {
- "uicon-level": "",
- "uicon-column-line": "",
- "uicon-checkbox-mark": "",
- "uicon-folder": "",
- "uicon-movie": "",
- "uicon-star-fill": "",
- "uicon-star": "",
- "uicon-phone-fill": "",
- "uicon-phone": "",
- "uicon-apple-fill": "",
- "uicon-chrome-circle-fill": "",
- "uicon-backspace": "",
- "uicon-attach": "",
- "uicon-cut": "",
- "uicon-empty-car": "",
- "uicon-empty-coupon": "",
- "uicon-empty-address": "",
- "uicon-empty-favor": "",
- "uicon-empty-permission": "",
- "uicon-empty-news": "",
- "uicon-empty-search": "",
- "uicon-github-circle-fill": "",
- "uicon-rmb": "",
- "uicon-person-delete-fill": "",
- "uicon-reload": "",
- "uicon-order": "",
- "uicon-server-man": "",
- "uicon-search": "",
- "uicon-fingerprint": "",
- "uicon-more-dot-fill": "",
- "uicon-scan": "",
- "uicon-share-square": "",
- "uicon-map": "",
- "uicon-map-fill": "",
- "uicon-tags": "",
- "uicon-tags-fill": "",
- "uicon-bookmark-fill": "",
- "uicon-bookmark": "",
- "uicon-eye": "",
- "uicon-eye-fill": "",
- "uicon-mic": "",
- "uicon-mic-off": "",
- "uicon-calendar": "",
- "uicon-calendar-fill": "",
- "uicon-trash": "",
- "uicon-trash-fill": "",
- "uicon-play-left": "",
- "uicon-play-right": "",
- "uicon-minus": "",
- "uicon-plus": "",
- "uicon-info": "",
- "uicon-info-circle": "",
- "uicon-info-circle-fill": "",
- "uicon-question": "",
- "uicon-error": "",
- "uicon-close": "",
- "uicon-checkmark": "",
- "uicon-android-circle-fill": "",
- "uicon-android-fill": "",
- "uicon-ie": "",
- "uicon-IE-circle-fill": "",
- "uicon-google": "",
- "uicon-google-circle-fill": "",
- "uicon-setting-fill": "",
- "uicon-setting": "",
- "uicon-minus-square-fill": "",
- "uicon-plus-square-fill": "",
- "uicon-heart": "",
- "uicon-heart-fill": "",
- "uicon-camera": "",
- "uicon-camera-fill": "",
- "uicon-more-circle": "",
- "uicon-more-circle-fill": "",
- "uicon-chat": "",
- "uicon-chat-fill": "",
- "uicon-bag-fill": "",
- "uicon-bag": "",
- "uicon-error-circle-fill": "",
- "uicon-error-circle": "",
- "uicon-close-circle": "",
- "uicon-close-circle-fill": "",
- "uicon-checkmark-circle": "",
- "uicon-checkmark-circle-fill": "",
- "uicon-question-circle-fill": "",
- "uicon-question-circle": "",
- "uicon-share": "",
- "uicon-share-fill": "",
- "uicon-shopping-cart": "",
- "uicon-shopping-cart-fill": "",
- "uicon-bell": "",
- "uicon-bell-fill": "",
- "uicon-list": "",
- "uicon-list-dot": "",
- "uicon-zhihu": "",
- "uicon-zhihu-circle-fill": "",
- "uicon-zhifubao": "",
- "uicon-zhifubao-circle-fill": "",
- "uicon-weixin-circle-fill": "",
- "uicon-weixin-fill": "",
- "uicon-twitter-circle-fill": "",
- "uicon-twitter": "",
- "uicon-taobao-circle-fill": "",
- "uicon-taobao": "",
- "uicon-weibo-circle-fill": "",
- "uicon-weibo": "",
- "uicon-qq-fill": "",
- "uicon-qq-circle-fill": "",
- "uicon-moments-circel-fill": "",
- "uicon-moments": "",
- "uicon-qzone": "",
- "uicon-qzone-circle-fill": "",
- "uicon-baidu-circle-fill": "",
- "uicon-baidu": "",
- "uicon-facebook-circle-fill": "",
- "uicon-facebook": "",
- "uicon-car": "",
- "uicon-car-fill": "",
- "uicon-warning-fill": "",
- "uicon-warning": "",
- "uicon-clock-fill": "",
- "uicon-clock": "",
- "uicon-edit-pen": "",
- "uicon-edit-pen-fill": "",
- "uicon-email": "",
- "uicon-email-fill": "",
- "uicon-minus-circle": "",
- "uicon-minus-circle-fill": "",
- "uicon-plus-circle": "",
- "uicon-plus-circle-fill": "",
- "uicon-file-text": "",
- "uicon-file-text-fill": "",
- "uicon-pushpin": "",
- "uicon-pushpin-fill": "",
- "uicon-grid": "",
- "uicon-grid-fill": "",
- "uicon-play-circle": "",
- "uicon-play-circle-fill": "",
- "uicon-pause-circle-fill": "",
- "uicon-pause": "",
- "uicon-pause-circle": "",
- "uicon-eye-off": "",
- "uicon-eye-off-outline": "",
- "uicon-gift-fill": "",
- "uicon-gift": "",
- "uicon-rmb-circle-fill": "",
- "uicon-rmb-circle": "",
- "uicon-kefu-ermai": "",
- "uicon-server-fill": "",
- "uicon-coupon-fill": "",
- "uicon-coupon": "",
- "uicon-integral": "",
- "uicon-integral-fill": "",
- "uicon-home-fill": "",
- "uicon-home": "",
- "uicon-hourglass-half-fill": "",
- "uicon-hourglass": "",
- "uicon-account": "",
- "uicon-plus-people-fill": "",
- "uicon-minus-people-fill": "",
- "uicon-account-fill": "",
- "uicon-thumb-down-fill": "",
- "uicon-thumb-down": "",
- "uicon-thumb-up": "",
- "uicon-thumb-up-fill": "",
- "uicon-lock-fill": "",
- "uicon-lock-open": "",
- "uicon-lock-opened-fill": "",
- "uicon-lock": "",
- "uicon-red-packet-fill": "",
- "uicon-photo-fill": "",
- "uicon-photo": "",
- "uicon-volume-off-fill": "",
- "uicon-volume-off": "",
- "uicon-volume-fill": "",
- "uicon-volume": "",
- "uicon-red-packet": "",
- "uicon-download": "",
- "uicon-arrow-up-fill": "",
- "uicon-arrow-down-fill": "",
- "uicon-play-left-fill": "",
- "uicon-play-right-fill": "",
- "uicon-rewind-left-fill": "",
- "uicon-rewind-right-fill": "",
- "uicon-arrow-downward": "",
- "uicon-arrow-leftward": "",
- "uicon-arrow-rightward": "",
- "uicon-arrow-upward": "",
- "uicon-arrow-down": "",
- "uicon-arrow-right": "",
- "uicon-arrow-left": "",
- "uicon-arrow-up": "",
- "uicon-skip-back-left": "",
- "uicon-skip-forward-right": "",
- "uicon-rewind-right": "",
- "uicon-rewind-left": "",
- "uicon-arrow-right-double": "",
- "uicon-arrow-left-double": "",
- "uicon-wifi-off": "",
- "uicon-wifi": "",
- "uicon-empty-data": "",
- "uicon-empty-history": "",
- "uicon-empty-list": "",
- "uicon-empty-page": "",
- "uicon-empty-order": "",
- "uicon-man": "",
- "uicon-woman": "",
- "uicon-man-add": "",
- "uicon-man-add-fill": "",
- "uicon-man-delete": "",
- "uicon-man-delete-fill": "",
- "uicon-zh": "",
- "uicon-en": ""
- };
- const props$q = {
- props: {
- // 图标类名
- name: {
- type: String,
- default: props$y.icon.name
- },
- // 图标颜色,可接受主题色
- color: {
- type: String,
- default: props$y.icon.color
- },
- // 字体大小,单位px
- size: {
- type: [String, Number],
- default: props$y.icon.size
- },
- // 是否显示粗体
- bold: {
- type: Boolean,
- default: props$y.icon.bold
- },
- // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
- index: {
- type: [String, Number],
- default: props$y.icon.index
- },
- // 触摸图标时的类名
- hoverClass: {
- type: String,
- default: props$y.icon.hoverClass
- },
- // 自定义扩展前缀,方便用户扩展自己的图标库
- customPrefix: {
- type: String,
- default: props$y.icon.customPrefix
- },
- // 图标右边或者下面的文字
- label: {
- type: [String, Number],
- default: props$y.icon.label
- },
- // label的位置,只能右边或者下边
- labelPos: {
- type: String,
- default: props$y.icon.labelPos
- },
- // label的大小
- labelSize: {
- type: [String, Number],
- default: props$y.icon.labelSize
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$y.icon.labelColor
- },
- // label与图标的距离
- space: {
- type: [String, Number],
- default: props$y.icon.space
- },
- // 图片的mode
- imgMode: {
- type: String,
- default: props$y.icon.imgMode
- },
- // 用于显示图片小图标时,图片的宽度
- width: {
- type: [String, Number],
- default: props$y.icon.width
- },
- // 用于显示图片小图标时,图片的高度
- height: {
- type: [String, Number],
- default: props$y.icon.height
- },
- // 用于解决某些情况下,让图标垂直居中的用途
- top: {
- type: [String, Number],
- default: props$y.icon.top
- },
- // 是否阻止事件传播
- stop: {
- type: Boolean,
- default: props$y.icon.stop
- }
- }
- };
- const _sfc_main$2g = {
- name: "u-icon",
- data() {
- return {};
- },
- emits: ["click"],
- mixins: [mpMixin, mixin, props$q],
- computed: {
- uClasses() {
- let classes = [];
- classes.push(this.customPrefix + "-" + this.name);
- if (this.color && uni.$u.config.type.includes(this.color))
- classes.push("u-icon__icon--" + this.color);
- return classes;
- },
- iconStyle() {
- let style = {};
- style = {
- fontSize: uni.$u.addUnit(this.size),
- lineHeight: uni.$u.addUnit(this.size),
- fontWeight: this.bold ? "bold" : "normal",
- // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
- top: uni.$u.addUnit(this.top)
- };
- if (this.color && !uni.$u.config.type.includes(this.color))
- style.color = this.color;
- return style;
- },
- // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
- isImg() {
- return this.name.indexOf("/") !== -1;
- },
- imgStyle() {
- let style = {};
- style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size);
- style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size);
- return style;
- },
- // 通过图标名,查找对应的图标
- icon() {
- return icons["uicon-" + this.name] || this.name;
- }
- },
- methods: {
- clickHandler(e) {
- this.$emit("click", this.index);
- this.stop && this.preventEvent(e);
- }
- }
- };
- function _sfc_render$2t(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "u-icon__img",
- src: _ctx.name,
- mode: _ctx.imgMode,
- style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)])
- }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: vue.normalizeClass(["u-icon__icon", $options.uClasses]),
- style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
- "hover-class": _ctx.hoverClass
- }, vue.toDisplayString($options.icon), 15, ["hover-class"])),
- vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
- _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "u-icon__label",
- style: vue.normalizeStyle({
- color: _ctx.labelColor,
- fontSize: _ctx.$u.addUnit(_ctx.labelSize),
- marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0,
- marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0,
- marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0,
- marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0
- })
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }
- const __easycom_0$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"]]);
- const props$p = {
- props: {}
- };
- const _sfc_main$2f = {
- name: "u-safe-bottom",
- mixins: [mpMixin, mixin, props$p],
- data() {
- return {
- safeAreaBottomHeight: 0,
- isNvue: false
- };
- },
- computed: {
- style() {
- const style = {};
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- }
- };
- function _sfc_render$2s(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]),
- style: vue.normalizeStyle([$options.style])
- },
- null,
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_3$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"]]);
- const props$o = {
- props: {
- // 是否展示弹窗
- show: {
- type: Boolean,
- default: props$y.popup.show
- },
- // 是否显示遮罩
- overlay: {
- type: Boolean,
- default: props$y.popup.overlay
- },
- // 弹出的方向,可选值为 top bottom right left center
- mode: {
- type: String,
- default: props$y.popup.mode
- },
- // 动画时长,单位ms
- duration: {
- type: [String, Number],
- default: props$y.popup.duration
- },
- // 是否显示关闭图标
- closeable: {
- type: Boolean,
- default: props$y.popup.closeable
- },
- // 自定义遮罩的样式
- overlayStyle: {
- type: [Object, String],
- default: props$y.popup.overlayStyle
- },
- // 点击遮罩是否关闭弹窗
- closeOnClickOverlay: {
- type: Boolean,
- default: props$y.popup.closeOnClickOverlay
- },
- // 层级
- zIndex: {
- type: [String, Number],
- default: props$y.popup.zIndex
- },
- // 是否为iPhoneX留出底部安全距离
- safeAreaInsetBottom: {
- type: Boolean,
- default: props$y.popup.safeAreaInsetBottom
- },
- // 是否留出顶部安全距离(状态栏高度)
- safeAreaInsetTop: {
- type: Boolean,
- default: props$y.popup.safeAreaInsetTop
- },
- // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
- closeIconPos: {
- type: String,
- default: props$y.popup.closeIconPos
- },
- // 是否显示圆角
- round: {
- type: [Boolean, String, Number],
- default: props$y.popup.round
- },
- // mode=center,也即中部弹出时,是否使用缩放模式
- zoom: {
- type: Boolean,
- default: props$y.popup.zoom
- },
- // 弹窗背景色,设置为transparent可去除白色背景
- bgColor: {
- type: String,
- default: props$y.popup.bgColor
- },
- // 遮罩的透明度,0-1之间
- overlayOpacity: {
- type: [Number, String],
- default: props$y.popup.overlayOpacity
- }
- }
- };
- const _sfc_main$2e = {
- name: "u-popup",
- mixins: [mpMixin, mixin, props$o],
- data() {
- return {
- overlayDuration: this.duration + 50
- };
- },
- watch: {
- show(newValue, oldValue) {
- }
- },
- computed: {
- transitionStyle() {
- const style = {
- zIndex: this.zIndex,
- position: "fixed",
- display: "flex"
- };
- style[this.mode] = 0;
- if (this.mode === "left") {
- return uni.$u.deepMerge(style, {
- bottom: 0,
- top: 0
- });
- } else if (this.mode === "right") {
- return uni.$u.deepMerge(style, {
- bottom: 0,
- top: 0
- });
- } else if (this.mode === "top") {
- return uni.$u.deepMerge(style, {
- left: 0,
- right: 0
- });
- } else if (this.mode === "bottom") {
- return uni.$u.deepMerge(style, {
- left: 0,
- right: 0
- });
- } else if (this.mode === "center") {
- return uni.$u.deepMerge(style, {
- alignItems: "center",
- "justify-content": "center",
- top: 0,
- left: 0,
- right: 0,
- bottom: 0
- });
- }
- },
- contentStyle() {
- const style = {};
- uni.$u.sys();
- if (this.mode !== "center") {
- style.flex = 1;
- }
- if (this.bgColor) {
- style.backgroundColor = this.bgColor;
- }
- if (this.round) {
- const value2 = uni.$u.addUnit(this.round);
- if (this.mode === "top") {
- style.borderBottomLeftRadius = value2;
- style.borderBottomRightRadius = value2;
- } else if (this.mode === "bottom") {
- style.borderTopLeftRadius = value2;
- style.borderTopRightRadius = value2;
- } else if (this.mode === "center") {
- style.borderRadius = value2;
- }
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- position() {
- if (this.mode === "center") {
- return this.zoom ? "fade-zoom" : "fade";
- }
- if (this.mode === "left") {
- return "slide-left";
- }
- if (this.mode === "right") {
- return "slide-right";
- }
- if (this.mode === "bottom") {
- return "slide-up";
- }
- if (this.mode === "top") {
- return "slide-down";
- }
- }
- },
- methods: {
- // 点击遮罩
- overlayClick() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- },
- close(e) {
- this.$emit("close");
- },
- afterEnter() {
- this.$emit("open");
- },
- clickHandler() {
- if (this.mode === "center") {
- this.overlayClick();
- }
- this.$emit("click");
- }
- }
- };
- function _sfc_render$2r(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$c);
- const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$2);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [
- _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, {
- key: 0,
- show: _ctx.show,
- onClick: $options.overlayClick,
- duration: $data.overlayDuration,
- customStyle: _ctx.overlayStyle,
- opacity: _ctx.overlayOpacity
- }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_u_transition, {
- show: _ctx.show,
- customStyle: $options.transitionStyle,
- mode: $options.position,
- duration: _ctx.duration,
- onAfterEnter: $options.afterEnter,
- onClick: $options.clickHandler
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: "u-popup__content",
- style: vue.normalizeStyle([$options.contentStyle]),
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"]))
- },
- [
- _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
- _ctx.closeable ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])),
- class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]),
- "hover-class": "u-popup__content__close--hover",
- "hover-stay-time": "150"
- },
- [
- vue.createVNode(_component_u_icon, {
- name: "close",
- color: "#909399",
- size: "18",
- bold: ""
- })
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"])
- ]);
- }
- const __easycom_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"]]);
- const props$n = {
- props: {
- // 是否展示modal
- show: {
- type: Boolean,
- default: props$y.modal.show
- },
- // 标题
- title: {
- type: [String],
- default: props$y.modal.title
- },
- // 弹窗内容
- content: {
- type: String,
- default: props$y.modal.content
- },
- // 确认文案
- confirmText: {
- type: String,
- default: props$y.modal.confirmText
- },
- // 取消文案
- cancelText: {
- type: String,
- default: props$y.modal.cancelText
- },
- // 是否显示确认按钮
- showConfirmButton: {
- type: Boolean,
- default: props$y.modal.showConfirmButton
- },
- // 是否显示取消按钮
- showCancelButton: {
- type: Boolean,
- default: props$y.modal.showCancelButton
- },
- // 确认按钮颜色
- confirmColor: {
- type: String,
- default: props$y.modal.confirmColor
- },
- // 取消文字颜色
- cancelColor: {
- type: String,
- default: props$y.modal.cancelColor
- },
- // 对调确认和取消的位置
- buttonReverse: {
- type: Boolean,
- default: props$y.modal.buttonReverse
- },
- // 是否开启缩放效果
- zoom: {
- type: Boolean,
- default: props$y.modal.zoom
- },
- // 是否异步关闭,只对确定按钮有效
- asyncClose: {
- type: Boolean,
- default: props$y.modal.asyncClose
- },
- // 是否允许点击遮罩关闭modal
- closeOnClickOverlay: {
- type: Boolean,
- default: props$y.modal.closeOnClickOverlay
- },
- // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
- negativeTop: {
- type: [String, Number],
- default: props$y.modal.negativeTop
- },
- // modal宽度,不支持百分比,可以数值,px,rpx单位
- width: {
- type: [String, Number],
- default: props$y.modal.width
- },
- // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
- confirmButtonShape: {
- type: String,
- default: props$y.modal.confirmButtonShape
- }
- }
- };
- const _sfc_main$2d = {
- name: "u-modal",
- mixins: [mpMixin, mixin, props$n],
- data() {
- return {
- loading: false
- };
- },
- watch: {
- show(n) {
- if (n && this.loading)
- this.loading = false;
- }
- },
- methods: {
- // 点击确定按钮
- confirmHandler() {
- if (this.asyncClose) {
- this.loading = true;
- }
- this.$emit("confirm");
- },
- // 点击取消按钮
- cancelHandler() {
- this.$emit("cancel");
- },
- // 点击遮罩
- // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
- // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
- // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
- // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
- clickHandler() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- }
- }
- };
- function _sfc_render$2q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- mode: "center",
- zoom: _ctx.zoom,
- show: _ctx.show,
- customStyle: {
- borderRadius: "6px",
- overflow: "hidden",
- marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}`
- },
- closeOnClickOverlay: _ctx.closeOnClickOverlay,
- safeAreaInsetBottom: false,
- duration: 400,
- onClick: $options.clickHandler
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: "u-modal",
- style: vue.normalizeStyle({
- width: _ctx.$u.addUnit(_ctx.width)
- })
- },
- [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-modal__title"
- },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: "u-modal__content",
- style: vue.normalizeStyle({
- paddingTop: `${_ctx.title ? 12 : 25}px`
- })
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- vue.createElementVNode(
- "text",
- { class: "u-modal__content__text" },
- vue.toDisplayString(_ctx.content),
- 1
- /* TEXT */
- )
- ], true)
- ],
- 4
- /* STYLE */
- ),
- _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-modal__button-group--confirm-button"
- }, [
- vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true)
- ])) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createVNode(_component_u_line),
- vue.createElementVNode(
- "view",
- {
- class: "u-modal__button-group",
- style: vue.normalizeStyle({
- flexDirection: _ctx.buttonReverse ? "row-reverse" : "row"
- })
- },
- [
- _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]),
- "hover-stay-time": 150,
- "hover-class": "u-modal__button-group__wrapper--hover",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args))
- },
- [
- vue.createElementVNode(
- "text",
- {
- class: "u-modal__button-group__wrapper__text",
- style: vue.normalizeStyle({
- color: _ctx.cancelColor
- })
- },
- vue.toDisplayString(_ctx.cancelText),
- 5
- /* TEXT, STYLE */
- )
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, {
- key: 1,
- direction: "column"
- })) : vue.createCommentVNode("v-if", true),
- _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]),
- "hover-stay-time": 150,
- "hover-class": "u-modal__button-group__wrapper--hover",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args))
- },
- [
- $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-modal__button-group__wrapper__text",
- style: vue.normalizeStyle({
- color: _ctx.confirmColor
- })
- },
- vue.toDisplayString(_ctx.confirmText),
- 5
- /* TEXT, STYLE */
- ))
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )
- ],
- 64
- /* STABLE_FRAGMENT */
- ))
- ],
- 4
- /* STYLE */
- )
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]);
- }
- const __easycom_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"]]);
- function getDevtoolsGlobalHook() {
- return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
- }
- function getTarget() {
- return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
- }
- const isProxyAvailable = typeof Proxy === "function";
- const HOOK_SETUP = "devtools-plugin:setup";
- const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
- class ApiProxy {
- constructor(plugin, hook) {
- this.target = null;
- this.targetQueue = [];
- this.onQueue = [];
- this.plugin = plugin;
- this.hook = hook;
- const defaultSettings = {};
- if (plugin.settings) {
- for (const id in plugin.settings) {
- const item = plugin.settings[id];
- defaultSettings[id] = item.defaultValue;
- }
- }
- const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
- let currentSettings = { ...defaultSettings };
- try {
- const raw = localStorage.getItem(localSettingsSaveId);
- const data = JSON.parse(raw);
- Object.assign(currentSettings, data);
- } catch (e) {
- }
- this.fallbacks = {
- getSettings() {
- return currentSettings;
- },
- setSettings(value2) {
- try {
- localStorage.setItem(localSettingsSaveId, JSON.stringify(value2));
- } catch (e) {
- }
- currentSettings = value2;
- }
- };
- hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value2) => {
- if (pluginId === this.plugin.id) {
- this.fallbacks.setSettings(value2);
- }
- });
- this.proxiedOn = new Proxy({}, {
- get: (_target, prop) => {
- if (this.target) {
- return this.target.on[prop];
- } else {
- return (...args) => {
- this.onQueue.push({
- method: prop,
- args
- });
- };
- }
- }
- });
- this.proxiedTarget = new Proxy({}, {
- get: (_target, prop) => {
- if (this.target) {
- return this.target[prop];
- } else if (prop === "on") {
- return this.proxiedOn;
- } else if (Object.keys(this.fallbacks).includes(prop)) {
- return (...args) => {
- this.targetQueue.push({
- method: prop,
- args,
- resolve: () => {
- }
- });
- return this.fallbacks[prop](...args);
- };
- } else {
- return (...args) => {
- return new Promise((resolve) => {
- this.targetQueue.push({
- method: prop,
- args,
- resolve
- });
- });
- };
- }
- }
- });
- }
- async setRealTarget(target) {
- this.target = target;
- for (const item of this.onQueue) {
- this.target.on[item.method](...item.args);
- }
- for (const item of this.targetQueue) {
- item.resolve(await this.target[item.method](...item.args));
- }
- }
- }
- function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
- const target = getTarget();
- const hook = getDevtoolsGlobalHook();
- const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy;
- if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
- hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
- } else {
- const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null;
- const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
- list.push({
- pluginDescriptor,
- setupFn,
- proxy
- });
- if (proxy)
- setupFn(proxy.proxiedTarget);
- }
- }
- /*!
- * vuex v4.1.0
- * (c) 2022 Evan You
- * @license MIT
- */
- var storeKey = "store";
- function forEachValue(obj, fn) {
- Object.keys(obj).forEach(function(key) {
- return fn(obj[key], key);
- });
- }
- function isObject$1(obj) {
- return obj !== null && typeof obj === "object";
- }
- function isPromise(val) {
- return val && typeof val.then === "function";
- }
- function assert(condition, msg) {
- if (!condition) {
- throw new Error("[vuex] " + msg);
- }
- }
- function partial(fn, arg) {
- return function() {
- return fn(arg);
- };
- }
- function genericSubscribe(fn, subs, options) {
- if (subs.indexOf(fn) < 0) {
- options && options.prepend ? subs.unshift(fn) : subs.push(fn);
- }
- return function() {
- var i = subs.indexOf(fn);
- if (i > -1) {
- subs.splice(i, 1);
- }
- };
- }
- function resetStore(store2, hot) {
- store2._actions = /* @__PURE__ */ Object.create(null);
- store2._mutations = /* @__PURE__ */ Object.create(null);
- store2._wrappedGetters = /* @__PURE__ */ Object.create(null);
- store2._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
- var state2 = store2.state;
- installModule(store2, state2, [], store2._modules.root, true);
- resetStoreState(store2, state2, hot);
- }
- function resetStoreState(store2, state2, hot) {
- var oldState = store2._state;
- var oldScope = store2._scope;
- store2.getters = {};
- store2._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
- var wrappedGetters = store2._wrappedGetters;
- var computedObj = {};
- var computedCache = {};
- var scope = vue.effectScope(true);
- scope.run(function() {
- forEachValue(wrappedGetters, function(fn, key) {
- computedObj[key] = partial(fn, store2);
- computedCache[key] = vue.computed(function() {
- return computedObj[key]();
- });
- Object.defineProperty(store2.getters, key, {
- get: function() {
- return computedCache[key].value;
- },
- enumerable: true
- // for local getters
- });
- });
- });
- store2._state = vue.reactive({
- data: state2
- });
- store2._scope = scope;
- if (store2.strict) {
- enableStrictMode(store2);
- }
- if (oldState) {
- if (hot) {
- store2._withCommit(function() {
- oldState.data = null;
- });
- }
- }
- if (oldScope) {
- oldScope.stop();
- }
- }
- function installModule(store2, rootState, path, module, hot) {
- var isRoot = !path.length;
- var namespace = store2._modules.getNamespace(path);
- if (module.namespaced) {
- if (store2._modulesNamespaceMap[namespace] && true) {
- console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/"));
- }
- store2._modulesNamespaceMap[namespace] = module;
- }
- if (!isRoot && !hot) {
- var parentState = getNestedState(rootState, path.slice(0, -1));
- var moduleName = path[path.length - 1];
- store2._withCommit(function() {
- {
- if (moduleName in parentState) {
- console.warn(
- '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"'
- );
- }
- }
- parentState[moduleName] = module.state;
- });
- }
- var local = module.context = makeLocalContext(store2, namespace, path);
- module.forEachMutation(function(mutation, key) {
- var namespacedType = namespace + key;
- registerMutation(store2, namespacedType, mutation, local);
- });
- module.forEachAction(function(action, key) {
- var type2 = action.root ? key : namespace + key;
- var handler = action.handler || action;
- registerAction(store2, type2, handler, local);
- });
- module.forEachGetter(function(getter, key) {
- var namespacedType = namespace + key;
- registerGetter(store2, namespacedType, getter, local);
- });
- module.forEachChild(function(child, key) {
- installModule(store2, rootState, path.concat(key), child, hot);
- });
- }
- function makeLocalContext(store2, namespace, path) {
- var noNamespace = namespace === "";
- var local = {
- dispatch: noNamespace ? store2.dispatch : function(_type, _payload, _options) {
- var args = unifyObjectStyle(_type, _payload, _options);
- var payload = args.payload;
- var options = args.options;
- var type2 = args.type;
- if (!options || !options.root) {
- type2 = namespace + type2;
- if (!store2._actions[type2]) {
- console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type2);
- return;
- }
- }
- return store2.dispatch(type2, payload);
- },
- commit: noNamespace ? store2.commit : function(_type, _payload, _options) {
- var args = unifyObjectStyle(_type, _payload, _options);
- var payload = args.payload;
- var options = args.options;
- var type2 = args.type;
- if (!options || !options.root) {
- type2 = namespace + type2;
- if (!store2._mutations[type2]) {
- console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type2);
- return;
- }
- }
- store2.commit(type2, payload, options);
- }
- };
- Object.defineProperties(local, {
- getters: {
- get: noNamespace ? function() {
- return store2.getters;
- } : function() {
- return makeLocalGetters(store2, namespace);
- }
- },
- state: {
- get: function() {
- return getNestedState(store2.state, path);
- }
- }
- });
- return local;
- }
- function makeLocalGetters(store2, namespace) {
- if (!store2._makeLocalGettersCache[namespace]) {
- var gettersProxy = {};
- var splitPos = namespace.length;
- Object.keys(store2.getters).forEach(function(type2) {
- if (type2.slice(0, splitPos) !== namespace) {
- return;
- }
- var localType = type2.slice(splitPos);
- Object.defineProperty(gettersProxy, localType, {
- get: function() {
- return store2.getters[type2];
- },
- enumerable: true
- });
- });
- store2._makeLocalGettersCache[namespace] = gettersProxy;
- }
- return store2._makeLocalGettersCache[namespace];
- }
- function registerMutation(store2, type2, handler, local) {
- var entry = store2._mutations[type2] || (store2._mutations[type2] = []);
- entry.push(function wrappedMutationHandler(payload) {
- handler.call(store2, local.state, payload);
- });
- }
- function registerAction(store2, type2, handler, local) {
- var entry = store2._actions[type2] || (store2._actions[type2] = []);
- entry.push(function wrappedActionHandler(payload) {
- var res = handler.call(store2, {
- dispatch: local.dispatch,
- commit: local.commit,
- getters: local.getters,
- state: local.state,
- rootGetters: store2.getters,
- rootState: store2.state
- }, payload);
- if (!isPromise(res)) {
- res = Promise.resolve(res);
- }
- if (store2._devtoolHook) {
- return res.catch(function(err) {
- store2._devtoolHook.emit("vuex:error", err);
- throw err;
- });
- } else {
- return res;
- }
- });
- }
- function registerGetter(store2, type2, rawGetter, local) {
- if (store2._wrappedGetters[type2]) {
- {
- console.error("[vuex] duplicate getter key: " + type2);
- }
- return;
- }
- store2._wrappedGetters[type2] = function wrappedGetter(store22) {
- return rawGetter(
- local.state,
- // local state
- local.getters,
- // local getters
- store22.state,
- // root state
- store22.getters
- // root getters
- );
- };
- }
- function enableStrictMode(store2) {
- vue.watch(function() {
- return store2._state.data;
- }, function() {
- {
- assert(store2._committing, "do not mutate vuex store state outside mutation handlers.");
- }
- }, { deep: true, flush: "sync" });
- }
- function getNestedState(state2, path) {
- return path.reduce(function(state22, key) {
- return state22[key];
- }, state2);
- }
- function unifyObjectStyle(type2, payload, options) {
- if (isObject$1(type2) && type2.type) {
- options = payload;
- payload = type2;
- type2 = type2.type;
- }
- {
- assert(typeof type2 === "string", "expects string as the type, but found " + typeof type2 + ".");
- }
- return { type: type2, payload, options };
- }
- var LABEL_VUEX_BINDINGS = "vuex bindings";
- var MUTATIONS_LAYER_ID = "vuex:mutations";
- var ACTIONS_LAYER_ID = "vuex:actions";
- var INSPECTOR_ID = "vuex";
- var actionId = 0;
- function addDevtools(app, store2) {
- setupDevtoolsPlugin(
- {
- id: "org.vuejs.vuex",
- app,
- label: "Vuex",
- homepage: "https://next.vuex.vuejs.org/",
- logo: "https://vuejs.org/images/icons/favicon-96x96.png",
- packageName: "vuex",
- componentStateTypes: [LABEL_VUEX_BINDINGS]
- },
- function(api) {
- api.addTimelineLayer({
- id: MUTATIONS_LAYER_ID,
- label: "Vuex Mutations",
- color: COLOR_LIME_500
- });
- api.addTimelineLayer({
- id: ACTIONS_LAYER_ID,
- label: "Vuex Actions",
- color: COLOR_LIME_500
- });
- api.addInspector({
- id: INSPECTOR_ID,
- label: "Vuex",
- icon: "storage",
- treeFilterPlaceholder: "Filter stores..."
- });
- api.on.getInspectorTree(function(payload) {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- if (payload.filter) {
- var nodes = [];
- flattenStoreForInspectorTree(nodes, store2._modules.root, payload.filter, "");
- payload.rootNodes = nodes;
- } else {
- payload.rootNodes = [
- formatStoreForInspectorTree(store2._modules.root, "")
- ];
- }
- }
- });
- api.on.getInspectorState(function(payload) {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- var modulePath = payload.nodeId;
- makeLocalGetters(store2, modulePath);
- payload.state = formatStoreForInspectorState(
- getStoreModule(store2._modules, modulePath),
- modulePath === "root" ? store2.getters : store2._makeLocalGettersCache,
- modulePath
- );
- }
- });
- api.on.editInspectorState(function(payload) {
- if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
- var modulePath = payload.nodeId;
- var path = payload.path;
- if (modulePath !== "root") {
- path = modulePath.split("/").filter(Boolean).concat(path);
- }
- store2._withCommit(function() {
- payload.set(store2._state.data, path, payload.state.value);
- });
- }
- });
- store2.subscribe(function(mutation, state2) {
- var data = {};
- if (mutation.payload) {
- data.payload = mutation.payload;
- }
- data.state = state2;
- api.notifyComponentUpdate();
- api.sendInspectorTree(INSPECTOR_ID);
- api.sendInspectorState(INSPECTOR_ID);
- api.addTimelineEvent({
- layerId: MUTATIONS_LAYER_ID,
- event: {
- time: Date.now(),
- title: mutation.type,
- data
- }
- });
- });
- store2.subscribeAction({
- before: function(action, state2) {
- var data = {};
- if (action.payload) {
- data.payload = action.payload;
- }
- action._id = actionId++;
- action._time = Date.now();
- data.state = state2;
- api.addTimelineEvent({
- layerId: ACTIONS_LAYER_ID,
- event: {
- time: action._time,
- title: action.type,
- groupId: action._id,
- subtitle: "start",
- data
- }
- });
- },
- after: function(action, state2) {
- var data = {};
- var duration = Date.now() - action._time;
- data.duration = {
- _custom: {
- type: "duration",
- display: duration + "ms",
- tooltip: "Action duration",
- value: duration
- }
- };
- if (action.payload) {
- data.payload = action.payload;
- }
- data.state = state2;
- api.addTimelineEvent({
- layerId: ACTIONS_LAYER_ID,
- event: {
- time: Date.now(),
- title: action.type,
- groupId: action._id,
- subtitle: "end",
- data
- }
- });
- }
- });
- }
- );
- }
- var COLOR_LIME_500 = 8702998;
- var COLOR_DARK = 6710886;
- var COLOR_WHITE = 16777215;
- var TAG_NAMESPACED = {
- label: "namespaced",
- textColor: COLOR_WHITE,
- backgroundColor: COLOR_DARK
- };
- function extractNameFromPath(path) {
- return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root";
- }
- function formatStoreForInspectorTree(module, path) {
- return {
- id: path || "root",
- // all modules end with a `/`, we want the last segment only
- // cart/ -> cart
- // nested/cart/ -> cart
- label: extractNameFromPath(path),
- tags: module.namespaced ? [TAG_NAMESPACED] : [],
- children: Object.keys(module._children).map(
- function(moduleName) {
- return formatStoreForInspectorTree(
- module._children[moduleName],
- path + moduleName + "/"
- );
- }
- )
- };
- }
- function flattenStoreForInspectorTree(result, module, filter, path) {
- if (path.includes(filter)) {
- result.push({
- id: path || "root",
- label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root",
- tags: module.namespaced ? [TAG_NAMESPACED] : []
- });
- }
- Object.keys(module._children).forEach(function(moduleName) {
- flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/");
- });
- }
- function formatStoreForInspectorState(module, getters, path) {
- getters = path === "root" ? getters : getters[path];
- var gettersKeys = Object.keys(getters);
- var storeState = {
- state: Object.keys(module.state).map(function(key) {
- return {
- key,
- editable: true,
- value: module.state[key]
- };
- })
- };
- if (gettersKeys.length) {
- var tree = transformPathsToObjectTree(getters);
- storeState.getters = Object.keys(tree).map(function(key) {
- return {
- key: key.endsWith("/") ? extractNameFromPath(key) : key,
- editable: false,
- value: canThrow(function() {
- return tree[key];
- })
- };
- });
- }
- return storeState;
- }
- function transformPathsToObjectTree(getters) {
- var result = {};
- Object.keys(getters).forEach(function(key) {
- var path = key.split("/");
- if (path.length > 1) {
- var target = result;
- var leafKey = path.pop();
- path.forEach(function(p) {
- if (!target[p]) {
- target[p] = {
- _custom: {
- value: {},
- display: p,
- tooltip: "Module",
- abstract: true
- }
- };
- }
- target = target[p]._custom.value;
- });
- target[leafKey] = canThrow(function() {
- return getters[key];
- });
- } else {
- result[key] = canThrow(function() {
- return getters[key];
- });
- }
- });
- return result;
- }
- function getStoreModule(moduleMap, path) {
- var names = path.split("/").filter(function(n) {
- return n;
- });
- return names.reduce(
- function(module, moduleName, i) {
- var child = module[moduleName];
- if (!child) {
- throw new Error('Missing module "' + moduleName + '" for path "' + path + '".');
- }
- return i === names.length - 1 ? child : child._children;
- },
- path === "root" ? moduleMap : moduleMap.root._children
- );
- }
- function canThrow(cb) {
- try {
- return cb();
- } catch (e) {
- return e;
- }
- }
- var Module = function Module2(rawModule, runtime) {
- this.runtime = runtime;
- this._children = /* @__PURE__ */ Object.create(null);
- this._rawModule = rawModule;
- var rawState = rawModule.state;
- this.state = (typeof rawState === "function" ? rawState() : rawState) || {};
- };
- var prototypeAccessors$1 = { namespaced: { configurable: true } };
- prototypeAccessors$1.namespaced.get = function() {
- return !!this._rawModule.namespaced;
- };
- Module.prototype.addChild = function addChild(key, module) {
- this._children[key] = module;
- };
- Module.prototype.removeChild = function removeChild(key) {
- delete this._children[key];
- };
- Module.prototype.getChild = function getChild(key) {
- return this._children[key];
- };
- Module.prototype.hasChild = function hasChild(key) {
- return key in this._children;
- };
- Module.prototype.update = function update(rawModule) {
- this._rawModule.namespaced = rawModule.namespaced;
- if (rawModule.actions) {
- this._rawModule.actions = rawModule.actions;
- }
- if (rawModule.mutations) {
- this._rawModule.mutations = rawModule.mutations;
- }
- if (rawModule.getters) {
- this._rawModule.getters = rawModule.getters;
- }
- };
- Module.prototype.forEachChild = function forEachChild(fn) {
- forEachValue(this._children, fn);
- };
- Module.prototype.forEachGetter = function forEachGetter(fn) {
- if (this._rawModule.getters) {
- forEachValue(this._rawModule.getters, fn);
- }
- };
- Module.prototype.forEachAction = function forEachAction(fn) {
- if (this._rawModule.actions) {
- forEachValue(this._rawModule.actions, fn);
- }
- };
- Module.prototype.forEachMutation = function forEachMutation(fn) {
- if (this._rawModule.mutations) {
- forEachValue(this._rawModule.mutations, fn);
- }
- };
- Object.defineProperties(Module.prototype, prototypeAccessors$1);
- var ModuleCollection = function ModuleCollection2(rawRootModule) {
- this.register([], rawRootModule, false);
- };
- ModuleCollection.prototype.get = function get(path) {
- return path.reduce(function(module, key) {
- return module.getChild(key);
- }, this.root);
- };
- ModuleCollection.prototype.getNamespace = function getNamespace(path) {
- var module = this.root;
- return path.reduce(function(namespace, key) {
- module = module.getChild(key);
- return namespace + (module.namespaced ? key + "/" : "");
- }, "");
- };
- ModuleCollection.prototype.update = function update$1(rawRootModule) {
- update2([], this.root, rawRootModule);
- };
- ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
- var this$1$1 = this;
- if (runtime === void 0)
- runtime = true;
- {
- assertRawModule(path, rawModule);
- }
- var newModule = new Module(rawModule, runtime);
- if (path.length === 0) {
- this.root = newModule;
- } else {
- var parent = this.get(path.slice(0, -1));
- parent.addChild(path[path.length - 1], newModule);
- }
- if (rawModule.modules) {
- forEachValue(rawModule.modules, function(rawChildModule, key) {
- this$1$1.register(path.concat(key), rawChildModule, runtime);
- });
- }
- };
- ModuleCollection.prototype.unregister = function unregister(path) {
- var parent = this.get(path.slice(0, -1));
- var key = path[path.length - 1];
- var child = parent.getChild(key);
- if (!child) {
- {
- console.warn(
- "[vuex] trying to unregister module '" + key + "', which is not registered"
- );
- }
- return;
- }
- if (!child.runtime) {
- return;
- }
- parent.removeChild(key);
- };
- ModuleCollection.prototype.isRegistered = function isRegistered(path) {
- var parent = this.get(path.slice(0, -1));
- var key = path[path.length - 1];
- if (parent) {
- return parent.hasChild(key);
- }
- return false;
- };
- function update2(path, targetModule, newModule) {
- {
- assertRawModule(path, newModule);
- }
- targetModule.update(newModule);
- if (newModule.modules) {
- for (var key in newModule.modules) {
- if (!targetModule.getChild(key)) {
- {
- console.warn(
- "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed"
- );
- }
- return;
- }
- update2(
- path.concat(key),
- targetModule.getChild(key),
- newModule.modules[key]
- );
- }
- }
- }
- var functionAssert = {
- assert: function(value2) {
- return typeof value2 === "function";
- },
- expected: "function"
- };
- var objectAssert = {
- assert: function(value2) {
- return typeof value2 === "function" || typeof value2 === "object" && typeof value2.handler === "function";
- },
- expected: 'function or object with "handler" function'
- };
- var assertTypes = {
- getters: functionAssert,
- mutations: functionAssert,
- actions: objectAssert
- };
- function assertRawModule(path, rawModule) {
- Object.keys(assertTypes).forEach(function(key) {
- if (!rawModule[key]) {
- return;
- }
- var assertOptions = assertTypes[key];
- forEachValue(rawModule[key], function(value2, type2) {
- assert(
- assertOptions.assert(value2),
- makeAssertionMessage(path, key, type2, value2, assertOptions.expected)
- );
- });
- });
- }
- function makeAssertionMessage(path, key, type2, value2, expected) {
- var buf = key + " should be " + expected + ' but "' + key + "." + type2 + '"';
- if (path.length > 0) {
- buf += ' in module "' + path.join(".") + '"';
- }
- buf += " is " + JSON.stringify(value2) + ".";
- return buf;
- }
- function createStore(options) {
- return new Store(options);
- }
- var Store = function Store2(options) {
- var this$1$1 = this;
- if (options === void 0)
- options = {};
- {
- assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser.");
- assert(this instanceof Store2, "store must be called with the new operator.");
- }
- var plugins2 = options.plugins;
- if (plugins2 === void 0)
- plugins2 = [];
- var strict = options.strict;
- if (strict === void 0)
- strict = false;
- var devtools = options.devtools;
- this._committing = false;
- this._actions = /* @__PURE__ */ Object.create(null);
- this._actionSubscribers = [];
- this._mutations = /* @__PURE__ */ Object.create(null);
- this._wrappedGetters = /* @__PURE__ */ Object.create(null);
- this._modules = new ModuleCollection(options);
- this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
- this._subscribers = [];
- this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
- this._scope = null;
- this._devtools = devtools;
- var store2 = this;
- var ref = this;
- var dispatch2 = ref.dispatch;
- var commit2 = ref.commit;
- this.dispatch = function boundDispatch(type2, payload) {
- return dispatch2.call(store2, type2, payload);
- };
- this.commit = function boundCommit(type2, payload, options2) {
- return commit2.call(store2, type2, payload, options2);
- };
- this.strict = strict;
- var state2 = this._modules.root.state;
- installModule(this, state2, [], this._modules.root);
- resetStoreState(this, state2);
- plugins2.forEach(function(plugin) {
- return plugin(this$1$1);
- });
- };
- var prototypeAccessors = { state: { configurable: true } };
- Store.prototype.install = function install2(app, injectKey) {
- app.provide(injectKey || storeKey, this);
- app.config.globalProperties.$store = this;
- var useDevtools = this._devtools !== void 0 ? this._devtools : true;
- if (useDevtools) {
- addDevtools(app, this);
- }
- };
- prototypeAccessors.state.get = function() {
- return this._state.data;
- };
- prototypeAccessors.state.set = function(v) {
- {
- assert(false, "use store.replaceState() to explicit replace store state.");
- }
- };
- Store.prototype.commit = function commit(_type, _payload, _options) {
- var this$1$1 = this;
- var ref = unifyObjectStyle(_type, _payload, _options);
- var type2 = ref.type;
- var payload = ref.payload;
- var options = ref.options;
- var mutation = { type: type2, payload };
- var entry = this._mutations[type2];
- if (!entry) {
- {
- console.error("[vuex] unknown mutation type: " + type2);
- }
- return;
- }
- this._withCommit(function() {
- entry.forEach(function commitIterator(handler) {
- handler(payload);
- });
- });
- this._subscribers.slice().forEach(function(sub) {
- return sub(mutation, this$1$1.state);
- });
- if (options && options.silent) {
- console.warn(
- "[vuex] mutation type: " + type2 + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
- );
- }
- };
- Store.prototype.dispatch = function dispatch(_type, _payload) {
- var this$1$1 = this;
- var ref = unifyObjectStyle(_type, _payload);
- var type2 = ref.type;
- var payload = ref.payload;
- var action = { type: type2, payload };
- var entry = this._actions[type2];
- if (!entry) {
- {
- console.error("[vuex] unknown action type: " + type2);
- }
- return;
- }
- try {
- this._actionSubscribers.slice().filter(function(sub) {
- return sub.before;
- }).forEach(function(sub) {
- return sub.before(action, this$1$1.state);
- });
- } catch (e) {
- {
- console.warn("[vuex] error in before action subscribers: ");
- console.error(e);
- }
- }
- var result = entry.length > 1 ? Promise.all(entry.map(function(handler) {
- return handler(payload);
- })) : entry[0](payload);
- return new Promise(function(resolve, reject2) {
- result.then(function(res) {
- try {
- this$1$1._actionSubscribers.filter(function(sub) {
- return sub.after;
- }).forEach(function(sub) {
- return sub.after(action, this$1$1.state);
- });
- } catch (e) {
- {
- console.warn("[vuex] error in after action subscribers: ");
- console.error(e);
- }
- }
- resolve(res);
- }, function(error2) {
- try {
- this$1$1._actionSubscribers.filter(function(sub) {
- return sub.error;
- }).forEach(function(sub) {
- return sub.error(action, this$1$1.state, error2);
- });
- } catch (e) {
- {
- console.warn("[vuex] error in error action subscribers: ");
- console.error(e);
- }
- }
- reject2(error2);
- });
- });
- };
- Store.prototype.subscribe = function subscribe(fn, options) {
- return genericSubscribe(fn, this._subscribers, options);
- };
- Store.prototype.subscribeAction = function subscribeAction(fn, options) {
- var subs = typeof fn === "function" ? { before: fn } : fn;
- return genericSubscribe(subs, this._actionSubscribers, options);
- };
- Store.prototype.watch = function watch$1(getter, cb, options) {
- var this$1$1 = this;
- {
- assert(typeof getter === "function", "store.watch only accepts a function.");
- }
- return vue.watch(function() {
- return getter(this$1$1.state, this$1$1.getters);
- }, cb, Object.assign({}, options));
- };
- Store.prototype.replaceState = function replaceState(state2) {
- var this$1$1 = this;
- this._withCommit(function() {
- this$1$1._state.data = state2;
- });
- };
- Store.prototype.registerModule = function registerModule(path, rawModule, options) {
- if (options === void 0)
- options = {};
- if (typeof path === "string") {
- path = [path];
- }
- {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- assert(path.length > 0, "cannot register the root module by using registerModule.");
- }
- this._modules.register(path, rawModule);
- installModule(this, this.state, path, this._modules.get(path), options.preserveState);
- resetStoreState(this, this.state);
- };
- Store.prototype.unregisterModule = function unregisterModule(path) {
- var this$1$1 = this;
- if (typeof path === "string") {
- path = [path];
- }
- {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- }
- this._modules.unregister(path);
- this._withCommit(function() {
- var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
- delete parentState[path[path.length - 1]];
- });
- resetStore(this);
- };
- Store.prototype.hasModule = function hasModule(path) {
- if (typeof path === "string") {
- path = [path];
- }
- {
- assert(Array.isArray(path), "module path must be a string or an Array.");
- }
- return this._modules.isRegistered(path);
- };
- Store.prototype.hotUpdate = function hotUpdate(newOptions) {
- this._modules.update(newOptions);
- resetStore(this, true);
- };
- Store.prototype._withCommit = function _withCommit(fn) {
- var committing = this._committing;
- this._committing = true;
- fn();
- this._committing = committing;
- };
- Object.defineProperties(Store.prototype, prototypeAccessors);
- const state = {
- isLogin: false,
- conversationList: [],
- messageList: [],
- conversation: {},
- conversationID: "",
- scrollTop: 0
- };
- const timStore = {
- namespaced: true,
- state,
- getters: {
- userInfo: (state2) => {
- return state2.userInfo;
- }
- },
- mutations: {
- setscrollTop(state2, payload) {
- state2.scrollTop = payload;
- },
- setImType(state2, payload) {
- state2.imType = payload;
- },
- setType(state2, payload) {
- state2.type = payload;
- },
- setOrderId(state2, payload) {
- state2.orderId = payload;
- },
- setFollowId(state2, payload) {
- state2.followId = payload;
- },
- setOrderType(state2, payload) {
- state2.orderType = payload;
- },
- setConversationList(state2, payload) {
- state2.conversationList = payload;
- },
- setConversation(state2, payload) {
- state2.conversation = payload;
- },
- setConversationID(state2, payload) {
- state2.conversationID = payload;
- },
- resetConversationID(state2) {
- state2.conversationID = "";
- },
- setMessageList(state2, payload) {
- state2.messageList = payload;
- },
- resetChat(state2) {
- state2.messageList = [];
- }
- },
- actions: {
- //
- }
- };
- const modules = {
- timStore
- };
- const store = createStore({
- modules
- });
- let request$f = new Request$1().http;
- function getUserFollowDoctor() {
- return request$f("/app/drugReport/getUserFollowDoctor", null, "GET");
- }
- function getDrugReportList(data) {
- return request$f("/app/drugReport/getDrugReportList", data, "GET");
- }
- function getDrugReportById(data) {
- return request$f("/app/drugReport/getDrugReportById", data, "GET");
- }
- function pingReport(data) {
- return request$f("/app/drugReport/pingReport", data, "POST", "application/json;charset=UTF-8");
- }
- function startDrugReport(data) {
- return request$f("/app/drugReport/startDrugReport", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$2c = {
- data() {
- return {
- isLogin: false,
- show: false,
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- user: {
- nickName: "登录/注册",
- phone: "",
- integral: 0,
- balance: 0
- }
- };
- },
- onLoad() {
- },
- onShow() {
- this.$isLogin().then(
- (res) => {
- if (res) {
- this.getUserInfo();
- }
- },
- (rej) => {
- }
- );
- },
- onReachBottom() {
- },
- onPageScroll(e) {
- },
- methods: {
- doIM() {
- formatAppLog("log", "at pages/user/index.vue:204", 110);
- getUserFollowDoctor().then(
- (res) => {
- if (res.code == 200) {
- if (res.data != null) {
- var data = { followId: res.data.followId };
- startDrugReport(data).then(
- (res2) => {
- uni.switchTab({
- url: "/pages/TUIKit/TUIPages/TUIConversation/index"
- });
- },
- (rej) => {
- }
- );
- } else {
- uni.showToast({
- icon: "none",
- title: "当前没有药师为您服务"
- });
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- toIM() {
- var that = this;
- this.$isLogin().then(
- (res) => {
- formatAppLog("log", "at pages/user/index.vue:273", res);
- if (res) {
- that.doIM();
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- },
- callPhone() {
- uni.makePhoneCall({
- phoneNumber: "18696558100"
- });
- },
- toCompany() {
- this.$isLogin().then(
- (res) => {
- formatAppLog("log", "at pages/user/index.vue:293", res);
- if (res) {
- var token = uni.getStorageSync("CompanyUserToken");
- if (token) {
- uni.navigateTo({
- url: "/pages_company/index"
- });
- } else {
- uni.navigateTo({
- url: "/pages_company/login"
- });
- }
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- },
- showLogout() {
- this.show = true;
- },
- hideLogout() {
- this.show = false;
- },
- logout() {
- this.$logout();
- uni.$TUIKit.logout();
- if (uni.$TUICallKit != null) {
- uni.$TUICallKit.logout();
- }
- uni.reLaunch({
- url: "/pages/index/index",
- animationType: "pop-in",
- animationDuration: 100
- });
- this.isLogin = false;
- },
- getUserInfo() {
- getUserInfo$1().then(
- (res) => {
- if (res.code == 200) {
- if (res.user != null) {
- this.isLogin = true;
- this.user = res.user;
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- navTo(url2) {
- this.$isLogin().then(
- (res) => {
- formatAppLog("log", "at pages/user/index.vue:354", res);
- if (res) {
- uni.navigateTo({
- url: url2
- });
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- }
- }
- };
- function _sfc_render$2p(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_0$9);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/bbe743373f4d4b78852ea5fd9824ade4.png" })
- ]),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "top-title" }),
- vue.createElementVNode("view", {
- class: "user",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.navTo("/pages_user/personInfo"), ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.user.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/90d9eb0f8f87482b977611eb36b66d82.jpg" : $data.user.avatar
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.user.nickName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("image", { src: "/static/images/icon_set.png" })
- ])
- ]),
- $data.user.phone != "" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "phone"
- },
- vue.toDisplayString(_ctx.$parsePhone($data.user.phone)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "counts" }, [
- vue.createElementVNode(
- "view",
- {
- class: "count",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_user/integral"))
- },
- "积分 " + vue.toDisplayString($data.user.integral),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <view class="count">我的健康金 {{user.balance}}</view> ')
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "menus" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "我的订单")
- ]),
- vue.createElementVNode("view", { class: "menu-box" }, [
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_order/inquiryOrderList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/icon_inquiry_order.png" }),
- vue.createElementVNode("view", { class: "title" }, "问诊订单")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/storeOrderList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/icon_store_order.png" }),
- vue.createElementVNode("view", { class: "title" }, "处方订单")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_order/packageOrderList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/icon_qianyue.png" }),
- vue.createElementVNode("view", { class: "title" }, "服务包")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_order/storeOrderRefundList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/sales_orders_icon.png" }),
- vue.createElementVNode("view", { class: "title" }, "售后服务")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "menus" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "医疗服务")
- ]),
- vue.createElementVNode("view", { class: "menu-box" }, [
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("/pages_user/myDoctorList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/icon_my_doctor.png" }),
- vue.createElementVNode("view", { class: "title" }, "我的医生")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_order/prescribeList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/icon_my_prescription.png" }),
- vue.createElementVNode("view", { class: "title" }, "我的处方")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[8] || (_cache[8] = ($event) => $options.navTo("/pages_user/followList"))
- }, [
- vue.createElementVNode("image", { src: "/static/images/icon_my_follow.png" }),
- vue.createElementVNode("view", { class: "title" }, "我的随访")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[9] || (_cache[9] = ($event) => $options.toIM())
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240429/6e68b42d9d824532945a1dda73350576.png" }),
- vue.createElementVNode("view", { class: "title" }, "用药咨询")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[10] || (_cache[10] = ($event) => $options.navTo("/pages_user/drugReportList"))
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240429/6b9f340b16e74fa2bc095265d525769e.png" }),
- vue.createElementVNode("view", { class: "title" }, "用药报告")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "menus" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "常用应用")
- ]),
- vue.createElementVNode("view", { class: "menu-box" }, [
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[11] || (_cache[11] = ($event) => $options.navTo("/pages_user/patient"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_visitor_management.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "就诊人管理")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[12] || (_cache[12] = ($event) => $options.navTo("/pages_user/address"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_address_management.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "地址管理")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[13] || (_cache[13] = ($event) => $options.navTo("/pages_order/inquiryOrderPingList"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_my_comments.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "我的评论")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[14] || (_cache[14] = ($event) => $options.navTo("/pages_user/myCouponList"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_my_coupon.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "我的优惠卷")
- ])
- ]),
- vue.createElementVNode("view", { class: "menu-box" }, [
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[15] || (_cache[15] = ($event) => $options.navTo("/pages_company/couponList?couponType=6"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_coupon.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "领券中心")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[16] || (_cache[16] = ($event) => $options.navTo("/pages_user/cert"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/cert.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "资质证书")
- ]),
- vue.createElementVNode("view", { class: "menu" }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_service_center.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "客服中心"),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- })
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[17] || (_cache[17] = ($event) => $options.navTo("/pages_user/about"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/icon_feedback.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "关于我们")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "menus" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "管理端")
- ]),
- vue.createElementVNode("view", { class: "menu-box" }, [
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[18] || (_cache[18] = ($event) => $options.navTo("/pages_user/registerDoctor?type=1"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/doctor_reg.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "医生入驻")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[19] || (_cache[19] = ($event) => $options.navTo("/pages_user/registerDoctor?type=2"))
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/doctor_reg.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "药师入驻")
- ]),
- vue.createElementVNode("view", {
- class: "menu",
- onClick: _cache[20] || (_cache[20] = ($event) => $options.toCompany())
- }, [
- vue.createElementVNode("image", {
- class: "min-image",
- src: "/static/images/sales.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "客服端")
- ])
- ])
- ]),
- $data.isLogin ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn-box"
- }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[21] || (_cache[21] = ($event) => $options.showLogout())
- }, "退出登录")
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "tip" }, [
- vue.createElementVNode("view", { class: "title" }, "技术支持 重庆云联融智科技有限公司 "),
- vue.createCommentVNode(' <view class="tel">联系电话 18696558100 </view> ')
- ])
- ])
- ]),
- vue.createVNode(_component_u_modal, {
- show: $data.show,
- title: "提示",
- showCancelButton: true,
- onCancel: _cache[22] || (_cache[22] = ($event) => $options.hideLogout()),
- onConfirm: _cache[23] || (_cache[23] = ($event) => $options.logout()),
- content: "确认退出吗?"
- }, null, 8, ["show"])
- ]);
- }
- 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"]]);
- function formatTime(secondTime) {
- const time = secondTime;
- let newTime;
- let hour;
- let minite;
- let seconds;
- if (time >= 3600) {
- hour = parseInt(`${time / 3600}`, 10) < 10 ? `0${parseInt(`${time / 3600}`, 10)}` : parseInt(`${time / 3600}`, 10);
- minite = parseInt(`${time % 60 / 60}`, 10) < 10 ? `0${parseInt(`${time % 60 / 60}`, 10)}` : parseInt(`${time % 60 / 60}`, 10);
- seconds = time % 3600 < 10 ? `0${time % 3600}` : time % 3600;
- if (seconds > 60) {
- minite = parseInt(`${seconds / 60}`, 10) < 10 ? `0${parseInt(`${seconds / 60}`, 10)}` : parseInt(`${seconds / 60}`, 10);
- seconds = seconds % 60 < 10 ? `0${seconds % 60}` : seconds % 60;
- }
- newTime = `${hour}:${minite}:${seconds}`;
- } else if (time >= 60 && time < 3600) {
- minite = parseInt(`${time / 60}`, 10) < 10 ? `0${parseInt(`${time / 60}`, 10)}` : parseInt(`${time / 60}`, 10);
- seconds = time % 60 < 10 ? `0${time % 60}` : time % 60;
- newTime = `00:${minite}:${seconds}`;
- } else if (time < 60) {
- seconds = time < 10 ? `0${time}` : time;
- newTime = `00:00:${seconds}`;
- }
- return newTime;
- }
- function caculateTimeago(dateTimeStamp) {
- const minute = 1e3 * 60;
- const hour = minute * 60;
- const day = hour * 24;
- const week = day * 7;
- const now = (/* @__PURE__ */ new Date()).getTime();
- const diffValue = now - dateTimeStamp;
- let result = "";
- if (diffValue < 0) {
- return;
- }
- const minC = diffValue / minute;
- const hourC = diffValue / hour;
- const dayC = diffValue / day;
- const weekC = diffValue / week;
- if (weekC >= 1 && weekC <= 4) {
- result = ` ${parseInt(`${weekC}`, 10)}周前`;
- } else if (dayC >= 1 && dayC <= 6) {
- result = ` ${parseInt(`${dayC}`, 10)}天前`;
- } else if (hourC >= 1 && hourC <= 23) {
- result = ` ${parseInt(`${hourC}`, 10)}小时前`;
- } else if (minC >= 1 && minC <= 59) {
- result = ` ${parseInt(`${minC}`, 10)}分钟前`;
- } else if (diffValue >= 0 && diffValue <= minute) {
- result = "刚刚";
- } else {
- const datetime = /* @__PURE__ */ new Date();
- datetime.setTime(dateTimeStamp);
- const Nyear = datetime.getFullYear();
- const Nmonth = datetime.getMonth() + 1 < 10 ? `0${datetime.getMonth() + 1}` : datetime.getMonth() + 1;
- const Ndate = datetime.getDate() < 10 ? `0${datetime.getDate()}` : datetime.getDate();
- result = `${Nyear}-${Nmonth}-${Ndate}`;
- }
- return result;
- }
- const TUIConversationList$1 = vue.defineComponent({
- props: {
- conversationList: {
- type: Array,
- default: () => {
- return [];
- }
- },
- currentID: {
- type: String,
- default: () => {
- return "";
- }
- }
- },
- setup(props2, ctx) {
- const obj = vue.reactive({
- conversationList: [],
- currentID: "",
- isOpened: "none",
- currentConversation: {},
- dialogID: ""
- });
- vue.watchEffect(() => {
- obj.conversationList = props2.conversationList;
- obj.currentID = props2.currentID;
- });
- const handleItemAvator = (item) => {
- var _a, _b, _c;
- let avatar = "";
- switch (item.type) {
- case uni.$TIM.TYPES.CONV_C2C:
- avatar = ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
- break;
- case uni.$TIM.TYPES.CONV_GROUP:
- avatar = ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png";
- break;
- case uni.$TIM.TYPES.CONV_SYSTEM:
- avatar = ((_c = item == null ? void 0 : item.groupProfile) == null ? void 0 : _c.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png";
- break;
- }
- return avatar;
- };
- const handleItemName = (item) => {
- var _a, _b;
- let name = "";
- switch (item.type) {
- case uni.$TIM.TYPES.CONV_C2C:
- name = (item == null ? void 0 : item.userProfile.nick) || ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.userID) || "";
- break;
- case uni.$TIM.TYPES.CONV_GROUP:
- name = item.groupProfile.name || ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.groupID) || "";
- break;
- case uni.$TIM.TYPES.CONV_SYSTEM:
- name = "系统通知";
- break;
- }
- return name;
- };
- const handleItemTime = (time) => {
- if (time > 0) {
- return caculateTimeago(time * 1e3);
- }
- return "";
- };
- const handleItemMessage = (message) => {
- switch (message.type) {
- case uni.$TIM.TYPES.MSG_TEXT:
- return message.payload.text;
- default:
- return message.messageForShow;
- }
- };
- const handleGotoItem = (item) => {
- ctx.emit("handleGotoItem", item);
- };
- const handleItemLongpress = (item) => {
- obj.currentConversation = item;
- obj.dialogID = item.conversationID;
- if (item.type === "C2C") {
- obj.currentuserID = item.userProfile.userID;
- } else if (item.type === "GROUP") {
- obj.currentuserID = item.groupProfile.groupID;
- }
- obj.conversationType = item.type;
- };
- const handlerIsOpened = (item) => {
- if (item.conversationID === obj.doalogID) {
- return "right";
- } else {
- return "none";
- }
- };
- const handleConversation = (type2) => {
- switch (type2) {
- case "delete":
- uni.$TUIKit.TUIConversationServer.deleteConversation(
- obj.dialogID
- ).then((imResponse) => {
- imResponse.data;
- });
- obj.dialogID = "";
- break;
- case "ispinned":
- if (type2 === "ispinned") {
- const options = {
- conversationID: obj.dialogID,
- isPinned: true
- };
- uni.$TUIKit.TUIConversationServer.pinConversation(options).then(
- (imResponse) => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:239", imResponse);
- }
- );
- }
- obj.dialogID = "";
- break;
- case "dispinned":
- if (type2 === "dispinned") {
- const options = {
- conversationID: obj.dialogID,
- isPinned: false
- };
- uni.$TUIKit.TUIConversationServer.pinConversation(options).then(
- (imResponse) => {
- }
- );
- }
- obj.dialogID = "";
- break;
- case "mute":
- if (type2 === "mute" && obj.conversationType === "C2C") {
- const options = {
- userIDList: [obj.currentuserID],
- messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE
- };
- uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
- (imResponse) => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:265", imResponse);
- }
- );
- } else if (type2 === "mute" && obj.conversationType === "GROUP") {
- const options = {
- groupID: obj.currentuserID,
- messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE
- };
- uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
- (imResponse) => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:275", imResponse);
- }
- );
- }
- obj.dialogID = "";
- break;
- case "notMute":
- if (type2 === "notMute" && obj.conversationType === "C2C") {
- const options = {
- userIDList: [obj.currentuserID],
- messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE
- };
- uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
- (imResponse) => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:289", imResponse);
- }
- );
- } else if (type2 === "notMute" && obj.conversationType === "GROUP") {
- const options = {
- groupID: obj.currentuserID,
- messageRemindType: uni.$TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE
- };
- uni.$TUIKit.TUIConversationServer.muteConversation(options).then(
- (imResponse) => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/conversation-list.vue:299", imResponse);
- }
- );
- }
- obj.dialogID = "";
- break;
- }
- };
- return {
- ...vue.toRefs(obj),
- handleGotoItem,
- handleItemAvator,
- handleItemTime,
- handleItemMessage,
- handleItemName,
- handleItemLongpress,
- handleConversation,
- handlerIsOpened
- };
- }
- });
- const _imports_0$6 = "/assets/mute.7e6900f5.svg";
- function _sfc_render$2o(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "TUI-conversation-list",
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.dialogID = "")
- }, [
- _ctx.conversationList.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "no-data-box"
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" }),
- vue.createElementVNode("view", { class: "empty-title" }, "暂无数据")
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.conversationList.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList(_ctx.conversationList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- vue.createElementVNode("view", {
- class: vue.normalizeClass(["TUI-conversation-item", [
- _ctx.dialogID === item.conversationID && "selected",
- item.isPinned && "pinned"
- ]]),
- onClick: ($event) => _ctx.handleGotoItem(item),
- onLongpress: ($event) => _ctx.handleItemLongpress(item)
- }, [
- vue.createElementVNode("aside", { class: "left" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "avatar",
- src: _ctx.handleItemAvator(item)
- }, null, 8, ["src"]),
- item.unreadCount > 0 && item.messageRemindType !== "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 0,
- class: "num"
- },
- vue.toDisplayString(item.unreadCount > 99 ? "99+" : item.unreadCount),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.unreadCount > 0 && item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("span", {
- key: 1,
- class: "num-notNotify"
- })) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("main", { class: "content" }, [
- vue.createElementVNode("header", { class: "content-header" }, [
- vue.createElementVNode("label", null, [
- vue.createElementVNode(
- "p",
- { class: "name" },
- vue.toDisplayString(_ctx.handleItemName(item)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("footer", { class: "content-footer" }, [
- item.unreadCount > 0 && item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 0,
- class: "content-footer-unread"
- },
- "[" + vue.toDisplayString(item.unreadCount > 99 ? "99+" : item.unreadCount) + "条]",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "span",
- { class: "message-text" },
- vue.toDisplayString(_ctx.handleItemMessage(item.lastMessage)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "conversation-line" })
- ]),
- vue.createElementVNode("view", { class: "item-footer" }, [
- vue.createElementVNode(
- "span",
- { class: "time" },
- vue.toDisplayString(_ctx.handleItemTime(item.lastMessage.lastTime)),
- 1
- /* TEXT */
- ),
- item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "mute-icon",
- src: _imports_0$6
- })) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- item.conversationID === _ctx.dialogID ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "dialog-box dialog-item"
- }, [
- vue.createElementVNode("view", {
- class: "conversation-options",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => _ctx.handleConversation("delete", _ctx.dialogID), ["stop"]))
- }, "删除会话"),
- !item.isPinned ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "conversation-options",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => _ctx.handleConversation("ispinned", _ctx.dialogID), ["stop"]))
- }, "置顶会话")) : vue.createCommentVNode("v-if", true),
- item.isPinned ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "conversation-options",
- onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => _ctx.handleConversation("dispinned", _ctx.dialogID), ["stop"]))
- }, "取消置顶")) : vue.createCommentVNode("v-if", true),
- item.messageRemindType === "" || item.messageRemindType === "AcceptAndNotify" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "conversation-options",
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => _ctx.handleConversation("mute", _ctx.dialogID), ["stop"]))
- }, "消息免打扰")) : vue.createCommentVNode("v-if", true),
- item.messageRemindType === "AcceptNotNotify" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "conversation-options",
- onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => _ctx.handleConversation("notMute", _ctx.dialogID), ["stop"]))
- }, "取消免打扰")) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ], 42, ["onClick", "onLongpress"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$2b = vue.defineComponent({
- name: "dialog",
- props: {
- visible: {
- type: Boolean,
- default: () => {
- return false;
- }
- },
- styleConfig: {
- type: Object,
- default: () => {
- return {
- width: "240px",
- // height: '120px',
- padding: "16px",
- top: "10px",
- right: "10px"
- };
- }
- },
- handleClose: {
- type: Function,
- default: () => {
- }
- }
- },
- setup(props2, context) {
- }
- });
- function _sfc_render$2n(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.visible ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "dialog",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "dialog-container",
- style: vue.normalizeStyle(_ctx.styleConfig)
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 4
- /* STYLE */
- )
- ])) : vue.createCommentVNode("v-if", true);
- }
- 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"]]);
- const TUIConversation = vue.defineComponent({
- name: "TUIConversation",
- components: {
- TUIConversationList,
- Dialog
- },
- setup(props2) {
- const timStore2 = store.state.timStore;
- const data = vue.reactive({
- conversationList: vue.computed(() => timStore2.conversationList),
- currrentConversationID: "",
- open: false,
- searchUserID: "",
- selectedList: [],
- searchUserList: [],
- step: 1,
- showDialog: false,
- item: {
- flow: "out",
- status: "success"
- },
- styleConfig: {
- width: "150px",
- // height: '160px',
- padding: "16px 16px 0px",
- top: "8px",
- right: "8px"
- },
- chatList: [
- {
- imgType: "SINGLE",
- type: uni.$TIM.TYPES.CONV_C2C,
- id: 1,
- content: "发起会话"
- },
- {
- imgType: "GROUP",
- type: uni.$TIM.TYPES.GRP_WORK,
- id: 1,
- content: "工作群"
- },
- {
- imgType: "GROUP",
- type: uni.$TIM.TYPES.GRP_PUBLIC,
- id: 2,
- content: "社交群"
- },
- {
- imgType: "GROUP",
- type: uni.$TIM.TYPES.GRP_MEETING,
- id: 3,
- content: "会议群"
- }
- ]
- });
- onUnload(() => {
- uni.$TUIKit.TUIConversationServer.destroyed();
- });
- onNavigationBarButtonTap(() => {
- data.showDialog = !data.showDialog;
- });
- onShow(() => {
- uni.$emit("refreshIM");
- store.commit("timStore/setConversationID", "");
- });
- const handleCurrrentConversation = (value2) => {
- if (value2.lastMessage.cloudCustomData != null) {
- try {
- var json = JSON.parse(value2.lastMessage.cloudCustomData);
- store.commit("timStore/setImType", json.imType);
- store.commit("timStore/setOrderType", json.orderType);
- store.commit("timStore/setOrderId", json.orderId);
- store.commit("timStore/setFollowId", json.followId);
- store.commit("timStore/setType", json.type);
- } catch (e) {
- }
- }
- data.currrentConversationID = value2.conversationID;
- store.commit("timStore/setConversationID", value2.conversationID);
- uni.navigateTo({
- url: `../TUIChat/index?conversationName=${handleItemName(value2)}`
- });
- uni.$TUIKit.TUIConversationServer.setMessageRead(value2.conversationID);
- const curConversation = data.conversationList.filter((item) => {
- return item.conversationID === value2.conversationID;
- });
- store.commit("timStore/setConversation", curConversation);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(
- value2.conversationID
- ).then((res) => {
- store.commit("timStore/setConversation", res.data.conversation);
- });
- };
- const handleShow = () => {
- data.showDialog = true;
- };
- const handleContentClick = (item) => {
- data.showDialog = false;
- uni.navigateTo({
- url: `../TUIConversation/create?title=${item.content}&type=${item.type}`
- });
- };
- const handleClose = () => {
- data.showDialog = false;
- };
- const handleItemName = (item) => {
- var _a, _b;
- let name = "";
- switch (item.type) {
- case uni.$TIM.TYPES.CONV_C2C:
- name = (item == null ? void 0 : item.userProfile.nick) || ((_a = item == null ? void 0 : item.userProfile) == null ? void 0 : _a.userID) || "";
- break;
- case uni.$TIM.TYPES.CONV_GROUP:
- name = item.groupProfile.name || ((_b = item == null ? void 0 : item.groupProfile) == null ? void 0 : _b.groupID) || "";
- break;
- case uni.$TIM.TYPES.CONV_SYSTEM:
- name = "系统通知";
- break;
- }
- return name;
- };
- return {
- ...vue.toRefs(data),
- handleCurrrentConversation,
- handleContentClick,
- handleItemName,
- handleClose,
- handleShow
- };
- }
- });
- const _imports_0$5 = "/assets/singlePerson.59f1319b.svg";
- const _imports_1$2 = "/assets/multiPerson.63026248.svg";
- function _sfc_render$2m(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_Dialog = vue.resolveComponent("Dialog");
- const _component_TUIConversationList = vue.resolveComponent("TUIConversationList");
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- [
- vue.createVNode(_component_Dialog, {
- visible: _ctx.showDialog,
- styleConfig: _ctx.styleConfig,
- handleClose: _ctx.handleClose
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.chatList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "chat-container",
- onClick: vue.withModifiers(($event) => _ctx.handleContentClick(item), ["stop"])
- }, [
- item.imgType === "SINGLE" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "item-icon",
- src: _imports_0$5
- })) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "item-icon",
- src: _imports_1$2
- })),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(item.content),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["visible", "styleConfig", "handleClose"]),
- vue.createElementVNode("view", { class: "TUI-conversation" }, [
- vue.createCommentVNode(' <view class="create-group" @click="handleShow"> + 发起聊天</view> '),
- vue.createVNode(_component_TUIConversationList, {
- currentID: _ctx.currrentConversationID,
- conversationList: _ctx.conversationList,
- onHandleGotoItem: _ctx.handleCurrrentConversation
- }, null, 8, ["currentID", "conversationList", "onHandleGotoItem"])
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }
- 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"]]);
- const _imports_0$4 = "/assets/selected.2c312a9c.svg";
- const _sfc_main$2a = vue.defineComponent({
- name: "Create",
- props: {},
- setup(props2, context) {
- const TUIConversationServer2 = uni.$TUIKit.TUIConversationServer;
- const { userInfo } = store.state.timStore;
- const data = vue.reactive({
- userID: (userInfo == null ? void 0 : userInfo.userID) || "",
- inputUserID: "",
- chooseUserList: [],
- title: "发起会话",
- myProfile: {},
- type: uni.$TIM.TYPES.CONV_C2C
- });
- onLoad((options) => {
- data.title = options && options.title || "发起会话";
- data.type = options && options.type || uni.$TIM.TYPES.CONV_C2C;
- });
- const handleUserIdInput = (e) => {
- data.inputUserID = e.detail.value;
- uni.$TUIKit.getMyProfile().then((imResponse) => {
- data.myProfile = imResponse.data;
- }).catch((imError) => {
- formatAppLog("warn", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:90", "getMyProfile error:", imError);
- });
- };
- const handleGetUserProfileInfo = () => {
- if (!data.inputUserID)
- return;
- const userIDList = [data.inputUserID];
- uni.$TUIKit.getUserProfile({ userIDList }).then((imRes) => {
- uni.hideLoading();
- if (imRes.data.length > 0) {
- const userInfo2 = {
- ...imRes.data[0],
- isChoose: false
- };
- if (data.chooseUserList.filter(
- (obj) => userInfo2.userID === obj.userID
- ).length === 0) {
- data.chooseUserList.push(userInfo2);
- }
- } else {
- uni.showToast({
- title: "搜索用户不存在",
- icon: "error"
- });
- data.inputUserID = "";
- }
- }).catch((err) => {
- uni.hideLoading();
- });
- };
- const handleChoose = (item) => {
- const list = data.chooseUserList.map((obj) => {
- if (item.userID == obj.userID) {
- return {
- ...obj,
- isChoose: !obj.isChoose
- };
- } else {
- return obj;
- }
- });
- data.chooseUserList = list;
- };
- const handleCreateGroup = () => {
- var _a, _b;
- const chooseList = data.chooseUserList.filter((obj) => obj.isChoose);
- if (chooseList.length > 0) {
- switch (data.type) {
- case uni.$TIM.TYPES.CONV_C2C: {
- if (chooseList.length > 1) {
- uni.showToast({
- title: `“发起会话”仅能选择一个用户`,
- icon: "none"
- });
- return;
- } else {
- const conversationId = `C2C${chooseList[0].userID}`;
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:154", conversationId);
- handleJumpToChat(conversationId);
- }
- break;
- }
- case uni.$TIM.TYPES.GRP_WORK:
- case uni.$TIM.TYPES.GRP_PUBLIC:
- case uni.$TIM.TYPES.GRP_MEETING: {
- let name = "";
- if (chooseList.length > 2) {
- name = chooseList.slice(0, 3).map((obj) => obj.nick || obj.userID).join(",") || "";
- } else {
- 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));
- }
- const groupOptions = {
- avatar: "https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png",
- type: data.type,
- name,
- memberList: chooseList.map((obj) => ({
- userID: obj.userID,
- role: obj.role,
- memberCustomField: obj.memberCustomField
- }))
- };
- uni.showLoading({ title: "群组创建中…" });
- uni.$TUIKit.createGroup(groupOptions).then((imResponse) => {
- uni.hideLoading();
- const { groupID } = imResponse.data && imResponse.data.group;
- if (groupID) {
- const conversationId = `GROUP${groupID}`;
- handleJumpToChat(conversationId);
- }
- }).catch((err) => {
- uni.showToast({ title: "群组创建失败!" });
- uni.hideLoading();
- });
- break;
- }
- }
- } else {
- uni.showToast({
- title: "请选择相关用户",
- icon: "none"
- });
- }
- };
- const handleJumpToChat = (conversationId) => {
- store.commit("timStore/setConversationID", conversationId);
- TUIConversationServer2.setMessageRead(conversationId);
- TUIConversationServer2.getConversationProfile(conversationId).then((res) => {
- var _a;
- const { conversation } = res.data;
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:221", "create conversation response = ", res);
- store.commit("timStore/setConversation", conversation);
- let url2 = "../TUIChat/index";
- if (conversationId.slice(0, 5) === "GROUP") {
- const { name } = conversation.groupProfile;
- url2 = `${url2}?conversationName=${name}`;
- } else if (conversationId.slice(0, 3) === "C2C") {
- conversation.userProfile;
- url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
- }
- uni.redirectTo({ url: url2 });
- }).catch((err) => {
- formatAppLog("warn", "at pages/TUIKit/TUIPages/TUIConversation/create.vue:237", "获取 group profile 异常 = ", err);
- });
- };
- return {
- ...vue.toRefs(data),
- handleUserIdInput,
- handleGetUserProfileInfo,
- handleChoose,
- handleCreateGroup
- };
- }
- });
- function _sfc_render$2l(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-Create-conversation-container" }, [
- vue.createElementVNode("view", { class: "tui-search-area" }, [
- vue.createElementVNode("view", { class: "tui-search-bar" }, [
- vue.createCommentVNode(' <image class="tui-searchcion" src="/static/static/assets/serach-icon.svg"></image> '),
- vue.createElementVNode("input", {
- class: "tui-search-bar-input",
- value: _ctx.inputUserID,
- placeholder: "请输入用户ID",
- onInput: _cache[0] || (_cache[0] = (...args) => _ctx.handleUserIdInput && _ctx.handleUserIdInput(...args)),
- onConfirm: _cache[1] || (_cache[1] = (...args) => _ctx.handleGetUserProfileInfo && _ctx.handleGetUserProfileInfo(...args)),
- onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleGetUserProfileInfo && _ctx.handleGetUserProfileInfo(...args))
- }, null, 40, ["value"])
- ]),
- vue.createElementVNode("view", { class: "tui-showID" })
- ]),
- vue.createCommentVNode(" 用户列表 "),
- vue.createElementVNode("view", { class: "tui-person-list-container" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.chooseUserList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "tui-person-to-invite",
- key: index2,
- onClick: ($event) => _ctx.handleChoose(item)
- }, [
- vue.createElementVNode("view", { class: "tui-person-choose-container" }, [
- item.isChoose ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "tui-normal-choose",
- src: _imports_0$4
- })) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tui-normal-unchoose"
- }))
- ]),
- vue.createElementVNode("view", { class: "tui-person-profile" }, [
- vue.createElementVNode("image", {
- class: "tui-person-profile-avatar",
- src: item.avatar || "https://sdk-web-1252463788.cos.ap-hongkong.myqcloud.com/component/TUIKit/assets/avatar_21.png"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "tui-person-profile-nick" },
- vue.toDisplayString(item.nick),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "tui-person-profile-userID" },
- "用户ID:" + vue.toDisplayString(item.userID),
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "tui-confirm-btn-container" }, [
- vue.createElementVNode("view", {
- class: "tui-confirm-btn",
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleCreateGroup && _ctx.handleCreateGroup(...args))
- }, "确认创建")
- ])
- ]);
- }
- 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"]]);
- const messageBubble = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- message: {},
- show: false
- });
- vue.watchEffect(() => {
- data.message = props2.data;
- });
- const toggleDialog = () => {
- data.show = !data.show;
- };
- return {
- ...vue.toRefs(data),
- toggleDialog
- };
- }
- });
- function _sfc_render$2k(_ctx, _cache, $props, $setup, $data, $options) {
- var _a;
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["message-bubble", [_ctx.message.flow === "in" ? "" : "reverse"]])
- },
- [
- vue.createElementVNode("image", {
- class: "avatar",
- src: ((_a = _ctx.message) == null ? void 0 : _a.avatar) || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",
- alt: ""
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "message-area" }, [
- _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock(
- "label",
- {
- key: 0,
- class: "name"
- },
- vue.toDisplayString(_ctx.message.nick),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "div",
- {
- class: vue.normalizeClass(["content content-" + _ctx.message.flow])
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 2
- /* CLASS */
- )
- ]),
- _ctx.message.status === "fail" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "message-label fail"
- }, "!")) : vue.createCommentVNode("v-if", true),
- _ctx.message.conversationType === "C2C" && _ctx.message.flow == "out" && _ctx.message.status !== "fail" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: vue.normalizeClass(["message-label", [!_ctx.message.isPeerRead && "unRead"]])
- },
- [
- !_ctx.message.isPeerRead ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "未读")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "已读"))
- ],
- 2
- /* CLASS */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }
- 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"]]);
- const MessageText$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- },
- messageData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- data: {},
- message: {}
- });
- vue.watchEffect(() => {
- data.data = props2.data;
- data.message = props2.messageData;
- });
- return {
- ...vue.toRefs(data)
- };
- }
- });
- function _sfc_render$2j(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["content content-" + _ctx.message.flow])
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.data.text, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- item.name === "text" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(item.text),
- 1
- /* TEXT */
- )) : item.name === "img" ? (vue.openBlock(), vue.createElementBlock("img", {
- key: 1,
- class: "text-img",
- src: item.src
- }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 2
- /* CLASS */
- );
- }
- 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"]]);
- const _sfc_main$29 = vue.defineComponent({
- props: {
- data: {
- type: Array,
- default: () => {
- return [];
- }
- },
- messageData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- imageInfo: [],
- imageHeight: 0,
- imageWidth: 0,
- message: {}
- });
- vue.watchEffect(() => {
- const DEFAULT_MAX_SIZE = 155;
- let imageWidth = 0;
- let imageHeight = 0;
- data.message = props2.messageData;
- data.imageInfo = props2.data.info[1];
- if (data.imageInfo.width >= data.imageInfo.height) {
- imageWidth = DEFAULT_MAX_SIZE;
- imageHeight = DEFAULT_MAX_SIZE * data.imageInfo.height / data.imageInfo.width;
- } else {
- imageWidth = DEFAULT_MAX_SIZE * data.imageInfo.width / data.imageInfo.height;
- imageHeight = DEFAULT_MAX_SIZE;
- }
- data.imageWidth = imageWidth + "px";
- data.imageHeight = imageHeight + "px";
- });
- const handlePreviewImage = () => {
- formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-image.vue:59", props2.data.info[0].url, "----linda");
- uni.previewImage({
- current: props2.data.info[0].url,
- // 当前显示图片的http链接
- urls: [props2.data.info[0].url]
- });
- };
- return {
- ...vue.toRefs(data),
- handlePreviewImage
- };
- }
- });
- function _sfc_render$2i(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "message-image",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handlePreviewImage && _ctx.handlePreviewImage(...args))
- }, [
- vue.createElementVNode("image", {
- src: _ctx.data.info[1].url,
- style: vue.normalizeStyle({ height: _ctx.imageHeight, width: _ctx.imageWidth }),
- class: vue.normalizeClass(["content-" + _ctx.message.flow])
- }, null, 14, ["src"]),
- vue.createCommentVNode(' <div class="progress" v-if="data.progress">\n <progress :value="data.progress" max="1"></progress>\n </div> ')
- ]);
- }
- 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"]]);
- const MessageOperate$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const TUIServer = uni.$TUIKit.TUIChatServer;
- const data = vue.reactive({
- message: {}
- });
- vue.watchEffect(() => {
- data.message = props2.data;
- });
- const handleMseeage = async (type2) => {
- switch (type2) {
- case "revoke":
- await TUIServer.revokeMessage(data.message).catch((error2) => {
- if (error2.code = 20016)
- uni.showToast({
- title: "消息超过了 2 分钟",
- icon: "error"
- });
- });
- data.dialogID = "";
- break;
- case "delete":
- await TUIServer.deleteMessage([data.message]);
- data.dialogID = "";
- break;
- case "resend":
- await TUIServer.resendMessage(data.message);
- data.dialogID = "";
- break;
- }
- };
- return {
- ...vue.toRefs(data),
- handleMseeage
- };
- }
- });
- const _imports_0$3 = "/assets/revoked.7c9df1a1.svg";
- const _imports_1$1 = "/assets/delete.f7e3358f.svg";
- const _imports_2$1 = "/assets/forword.ae89e5df.svg";
- function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "dialog-container" }, [
- _ctx.message.flow === "out" && _ctx.message.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item-box",
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleMseeage("revoke"))
- }, [
- vue.createElementVNode("image", {
- class: "item-icon",
- src: _imports_0$3
- }),
- vue.createElementVNode("view", null, "撤回")
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.message.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "item-box",
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleMseeage("delete"))
- }, [
- vue.createElementVNode("image", {
- class: "item-icon",
- src: _imports_1$1
- }),
- vue.createElementVNode("view", null, "删除")
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(` <view class="item-box" v-if="message.status==='success'" @click="handleMseeage('forward')">
- <img class="item-icon" src="/pages/TUIKit/assets/icon/forword.svg">
- <view>转发</view>
- </view> `),
- _ctx.message.flow === "out" && _ctx.message.status === "fail" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "item-box",
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handleMseeage("resend"))
- }, [
- vue.createElementVNode("image", {
- class: "item-icon",
- src: _imports_2$1
- }),
- vue.createElementVNode("view", null, "重发")
- ])) : vue.createCommentVNode("v-if", true),
- 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> ')
- ]);
- }
- 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"]]);
- const _sfc_main$28 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- },
- messageData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- video: {},
- message: {},
- show: false,
- videoContext: null
- });
- vue.watchEffect(() => {
- data.video = props2.data;
- data.message = props2.messageData;
- });
- const toggleShow = () => {
- uni.navigateTo({
- url: `./components/message-elements/video-play?videoMessage=${data.video.url}`
- });
- };
- return {
- ...vue.toRefs(data),
- toggleShow
- };
- }
- });
- const _imports_0$2 = "/assets/play_normal@2x.58b451c9.png";
- function _sfc_render$2g(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("div", { class: "message-video" }, [
- vue.createElementVNode(
- "div",
- {
- class: vue.normalizeClass(["message-video-box", [!_ctx.video.progress && "message-video-cover"]]),
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleShow && _ctx.toggleShow(...args))
- },
- [
- vue.createElementVNode("image", {
- src: _ctx.video.snapshotUrl,
- class: vue.normalizeClass(["message-video-box", ["content-" + _ctx.message.flow]])
- }, null, 10, ["src"]),
- vue.createElementVNode("image", {
- src: _imports_0$2,
- class: "video-play"
- })
- ],
- 2
- /* CLASS */
- )
- ]);
- }
- 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"]]);
- const audio = uni.createInnerAudioContext();
- const MessageAudio$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- },
- messageData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- data: {},
- message: {},
- isPlay: false
- });
- vue.watchEffect(() => {
- data.data = props2.data;
- data.message = props2.messageData;
- });
- vue.onMounted(() => {
- audio.onPlay(() => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:43", "开始播放");
- });
- audio.onEnded(() => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:46", "停止播放");
- });
- audio.onError((e) => {
- formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-elements/message-audio.vue:49", e, "onError");
- });
- });
- const handlePlay = () => {
- if (data.data.url) {
- audio.src = data.data.url;
- audio.play();
- }
- data.isPlay = true;
- };
- return {
- ...vue.toRefs(data),
- audio,
- handlePlay
- };
- }
- });
- const _imports_0$1 = "/assets/audio-play.949caa88.svg";
- function _sfc_render$2f(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["message-audio", ["content content-" + _ctx.message.flow]]),
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handlePlay && _ctx.handlePlay(...args))
- },
- [
- _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "audio-icon audio-icon-in",
- src: _imports_0$1
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- null,
- vue.toDisplayString(_ctx.data.second) + "s",
- 1
- /* TEXT */
- ),
- _ctx.message.flow === "out" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "audio-icon",
- src: _imports_0$1
- })) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(` <view class="play-icon" v-if="message.flow==='in' && !isPlay" ></view>
- `)
- ],
- 2
- /* CLASS */
- );
- }
- 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"]]);
- const MessageFace$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- data: {}
- });
- vue.watchEffect(() => {
- data.data = props2.data;
- });
- return {
- ...vue.toRefs(data)
- };
- }
- });
- function _sfc_render$2e(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("image", {
- class: "message-image",
- src: _ctx.data.url
- }, null, 8, ["src"]);
- }
- 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"]]);
- const MessageCustom$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- },
- messageData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- data: {},
- extension: {},
- isCustom: "",
- payload: {},
- message: {}
- });
- vue.watchEffect(() => {
- data.data = props2.data;
- data.message = props2.messageData;
- data.isCustom = props2.data.message.payload.data;
- data.payload = props2.data.message.payload;
- data.extension = JSON.parse(props2.data.message.payload.extension);
- });
- return {
- ...vue.toRefs(data)
- };
- }
- });
- function _sfc_render$2d(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "custom" }, [
- _ctx.isCustom === "order" ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createCommentVNode(" <div>\n <h1></h1>\n {{extension.title}}\n </div> "),
- vue.createElementVNode("view", { class: "order-item" }, [
- vue.createElementVNode("view", { class: "title" }, "问诊订单 "),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "患者:" + vue.toDisplayString(_ctx.extension.patientName) + " " + vue.toDisplayString(_ctx.extension.sex) + " " + vue.toDisplayString(_ctx.extension.mobile),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "患病时间:" + vue.toDisplayString(_ctx.extension.duration),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "就诊情况:" + vue.toDisplayString(_ctx.extension.isVisit),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "病情描述:" + vue.toDisplayString(_ctx.extension.title),
- 1
- /* TEXT */
- )
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : _ctx.isCustom === "prescribe" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "prescribe-item"
- }, [
- vue.createElementVNode("view", { class: "title" }, "电子处方单 "),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "诊断:" + vue.toDisplayString(_ctx.extension.diagnose),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "btn" }, "查看处方")
- ])
- ])) : _ctx.isCustom === "report" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "report-item"
- }, [
- vue.createElementVNode("view", { class: "title" }, "问诊报告单 "),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "btn" }, "查看报告单")
- ])
- ])) : _ctx.isCustom === "follow" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "prescribe-item"
- }, [
- vue.createElementVNode("view", { class: "title" }, "随访单 "),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "btn" }, "查看随访")
- ])
- ])) : _ctx.isCustom === "drugReport" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "report-item"
- }, [
- vue.createElementVNode("view", { class: "title" }, "用药报告单 "),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "btn" }, "查看报告单")
- ])
- ])) : _ctx.isCustom === "startInquiry" ? (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 5,
- class: vue.normalizeClass(["content content-" + _ctx.message.flow])
- },
- vue.toDisplayString(_ctx.extension.title),
- 3
- /* TEXT, CLASS */
- )) : _ctx.isCustom === "finishInquiry" ? (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 6,
- class: vue.normalizeClass(["content content-" + _ctx.message.flow])
- },
- vue.toDisplayString(_ctx.extension.title),
- 3
- /* TEXT, CLASS */
- )) : (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 7,
- class: vue.normalizeClass(["content content-" + _ctx.message.flow])
- },
- vue.toDisplayString(_ctx.data.custom),
- 3
- /* TEXT, CLASS */
- ))
- ]);
- }
- 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"]]);
- const MessageTip$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- message: {}
- });
- vue.watchEffect(() => {
- data.message = props2.data;
- });
- return {
- ...vue.toRefs(data)
- };
- }
- });
- function _sfc_render$2c(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "div",
- { class: "message-tip" },
- vue.toDisplayString(_ctx.message.text),
- 1
- /* TEXT */
- );
- }
- 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"]]);
- const MessageRevoked$1 = vue.defineComponent({
- props: {
- data: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- message: {}
- });
- vue.watchEffect(() => {
- data.message = props2.data;
- });
- const edit = () => {
- ctx.emit("edit", data.message);
- };
- return {
- ...vue.toRefs(data),
- edit
- };
- }
- });
- function _sfc_render$2b(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("div", { class: "revoke" }, [
- _ctx.message.flow === "in" ? (vue.openBlock(), vue.createElementBlock(
- "label",
- { key: 0 },
- vue.toDisplayString(_ctx.message.nick || _ctx.message.from),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock("label", { key: 1 }, "你")),
- vue.createElementVNode("span", null, "撤回了一条消息"),
- _ctx.message.flow === "out" ? (vue.openBlock(), vue.createElementBlock("span", {
- key: 2,
- class: "edit",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.edit && _ctx.edit(...args))
- }, "重新编辑")) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const emojiUrl = "https://web.sdk.qcloud.com/im/assets/emoji/";
- const emojiMap = {
- "[NO]": "emoji_0@2x.png",
- "[OK]": "emoji_1@2x.png",
- "[下雨]": "emoji_2@2x.png",
- "[么么哒]": "emoji_3@2x.png",
- "[乒乓]": "emoji_4@2x.png",
- "[便便]": "emoji_5@2x.png",
- "[信封]": "emoji_6@2x.png",
- "[偷笑]": "emoji_7@2x.png",
- "[傲慢]": "emoji_8@2x.png",
- "[再见]": "emoji_9@2x.png",
- "[冷汗]": "emoji_10@2x.png",
- "[凋谢]": "emoji_11@2x.png",
- "[刀]": "emoji_12@2x.png",
- "[删除]": "emoji_13@2x.png",
- "[勾引]": "emoji_14@2x.png",
- "[发呆]": "emoji_15@2x.png",
- "[发抖]": "emoji_16@2x.png",
- "[可怜]": "emoji_17@2x.png",
- "[可爱]": "emoji_18@2x.png",
- "[右哼哼]": "emoji_19@2x.png",
- "[右太极]": "emoji_20@2x.png",
- "[右车头]": "emoji_21@2x.png",
- "[吐]": "emoji_22@2x.png",
- "[吓]": "emoji_23@2x.png",
- "[咒骂]": "emoji_24@2x.png",
- "[咖啡]": "emoji_25@2x.png",
- "[啤酒]": "emoji_26@2x.png",
- "[嘘]": "emoji_27@2x.png",
- "[回头]": "emoji_28@2x.png",
- "[困]": "emoji_29@2x.png",
- "[坏笑]": "emoji_30@2x.png",
- "[多云]": "emoji_31@2x.png",
- "[大兵]": "emoji_32@2x.png",
- "[大哭]": "emoji_33@2x.png",
- "[太阳]": "emoji_34@2x.png",
- "[奋斗]": "emoji_35@2x.png",
- "[奶瓶]": "emoji_36@2x.png",
- "[委屈]": "emoji_37@2x.png",
- "[害羞]": "emoji_38@2x.png",
- "[尴尬]": "emoji_39@2x.png",
- "[左哼哼]": "emoji_40@2x.png",
- "[左太极]": "emoji_41@2x.png",
- "[左车头]": "emoji_42@2x.png",
- "[差劲]": "emoji_43@2x.png",
- "[弱]": "emoji_44@2x.png",
- "[强]": "emoji_45@2x.png",
- "[彩带]": "emoji_46@2x.png",
- "[彩球]": "emoji_47@2x.png",
- "[得意]": "emoji_48@2x.png",
- "[微笑]": "emoji_49@2x.png",
- "[心碎了]": "emoji_50@2x.png",
- "[快哭了]": "emoji_51@2x.png",
- "[怄火]": "emoji_52@2x.png",
- "[怒]": "emoji_53@2x.png",
- "[惊恐]": "emoji_54@2x.png",
- "[惊讶]": "emoji_55@2x.png",
- "[憨笑]": "emoji_56@2x.png",
- "[手枪]": "emoji_57@2x.png",
- "[打哈欠]": "emoji_58@2x.png",
- "[抓狂]": "emoji_59@2x.png",
- "[折磨]": "emoji_60@2x.png",
- "[抠鼻]": "emoji_61@2x.png",
- "[抱抱]": "emoji_62@2x.png",
- "[抱拳]": "emoji_63@2x.png",
- "[拳头]": "emoji_64@2x.png",
- "[挥手]": "emoji_65@2x.png",
- "[握手]": "emoji_66@2x.png",
- "[撇嘴]": "emoji_67@2x.png",
- "[擦汗]": "emoji_68@2x.png",
- "[敲打]": "emoji_69@2x.png",
- "[晕]": "emoji_70@2x.png",
- "[月亮]": "emoji_71@2x.png",
- "[棒棒糖]": "emoji_72@2x.png",
- "[汽车]": "emoji_73@2x.png",
- "[沙发]": "emoji_74@2x.png",
- "[流汗]": "emoji_75@2x.png",
- "[流泪]": "emoji_76@2x.png",
- "[激动]": "emoji_77@2x.png",
- "[灯泡]": "emoji_78@2x.png",
- "[炸弹]": "emoji_79@2x.png",
- "[熊猫]": "emoji_80@2x.png",
- "[爆筋]": "emoji_81@2x.png",
- "[爱你]": "emoji_82@2x.png",
- "[爱心]": "emoji_83@2x.png",
- "[爱情]": "emoji_84@2x.png",
- "[猪头]": "emoji_85@2x.png",
- "[猫咪]": "emoji_86@2x.png",
- "[献吻]": "emoji_87@2x.png",
- "[玫瑰]": "emoji_88@2x.png",
- "[瓢虫]": "emoji_89@2x.png",
- "[疑问]": "emoji_90@2x.png",
- "[白眼]": "emoji_91@2x.png",
- "[皮球]": "emoji_92@2x.png",
- "[睡觉]": "emoji_93@2x.png",
- "[磕头]": "emoji_94@2x.png",
- "[示爱]": "emoji_95@2x.png",
- "[礼品袋]": "emoji_96@2x.png",
- "[礼物]": "emoji_97@2x.png",
- "[篮球]": "emoji_98@2x.png",
- "[米饭]": "emoji_99@2x.png",
- "[糗大了]": "emoji_100@2x.png",
- "[红双喜]": "emoji_101@2x.png",
- "[红灯笼]": "emoji_102@2x.png",
- "[纸巾]": "emoji_103@2x.png",
- "[胜利]": "emoji_104@2x.png",
- "[色]": "emoji_105@2x.png",
- "[药]": "emoji_106@2x.png",
- "[菜刀]": "emoji_107@2x.png",
- "[蛋糕]": "emoji_108@2x.png",
- "[蜡烛]": "emoji_109@2x.png",
- "[街舞]": "emoji_110@2x.png",
- "[衰]": "emoji_111@2x.png",
- "[西瓜]": "emoji_112@2x.png",
- "[调皮]": "emoji_113@2x.png",
- "[象棋]": "emoji_114@2x.png",
- "[跳绳]": "emoji_115@2x.png",
- "[跳跳]": "emoji_116@2x.png",
- "[车厢]": "emoji_117@2x.png",
- "[转圈]": "emoji_118@2x.png",
- "[鄙视]": "emoji_119@2x.png",
- "[酷]": "emoji_120@2x.png",
- "[钞票]": "emoji_121@2x.png",
- "[钻戒]": "emoji_122@2x.png",
- "[闪电]": "emoji_123@2x.png",
- "[闭嘴]": "emoji_124@2x.png",
- "[闹钟]": "emoji_125@2x.png",
- "[阴险]": "emoji_126@2x.png",
- "[难过]": "emoji_127@2x.png",
- "[雨伞]": "emoji_128@2x.png",
- "[青蛙]": "emoji_129@2x.png",
- "[面条]": "emoji_130@2x.png",
- "[鞭炮]": "emoji_131@2x.png",
- "[风车]": "emoji_132@2x.png",
- "[飞吻]": "emoji_133@2x.png",
- "[飞机]": "emoji_134@2x.png",
- "[饥饿]": "emoji_135@2x.png",
- "[香蕉]": "emoji_136@2x.png",
- "[骷髅]": "emoji_137@2x.png",
- "[麦克风]": "emoji_138@2x.png",
- "[麻将]": "emoji_139@2x.png",
- "[鼓掌]": "emoji_140@2x.png",
- "[龇牙]": "emoji_141@2x.png"
- };
- const emojiName = [
- "[龇牙]",
- "[调皮]",
- "[流汗]",
- "[偷笑]",
- "[再见]",
- "[敲打]",
- "[擦汗]",
- "[猪头]",
- "[玫瑰]",
- "[流泪]",
- "[大哭]",
- "[嘘]",
- "[酷]",
- "[抓狂]",
- "[委屈]",
- "[便便]",
- "[炸弹]",
- "[菜刀]",
- "[可爱]",
- "[色]",
- "[害羞]",
- "[得意]",
- "[吐]",
- "[微笑]",
- "[怒]",
- "[尴尬]",
- "[惊恐]",
- "[冷汗]",
- "[爱心]",
- "[示爱]",
- "[白眼]",
- "[傲慢]",
- "[难过]",
- "[惊讶]",
- "[疑问]",
- "[困]",
- "[么么哒]",
- "[憨笑]",
- "[爱情]",
- "[衰]",
- "[撇嘴]",
- "[阴险]",
- "[奋斗]",
- "[发呆]",
- "[右哼哼]",
- "[抱抱]",
- "[坏笑]",
- "[飞吻]",
- "[鄙视]",
- "[晕]",
- "[大兵]",
- "[可怜]",
- "[强]",
- "[弱]",
- "[握手]",
- "[胜利]",
- "[抱拳]",
- "[凋谢]",
- "[米饭]",
- "[蛋糕]",
- "[西瓜]",
- "[啤酒]",
- "[瓢虫]",
- "[勾引]",
- "[OK]",
- "[爱你]",
- "[咖啡]",
- "[月亮]",
- "[刀]",
- "[发抖]",
- "[差劲]",
- "[拳头]",
- "[心碎了]",
- "[太阳]",
- "[礼物]",
- "[皮球]",
- "[骷髅]",
- "[挥手]",
- "[闪电]",
- "[饥饿]",
- "[咒骂]",
- "[折磨]",
- "[抠鼻]",
- "[鼓掌]",
- "[糗大了]",
- "[左哼哼]",
- "[打哈欠]",
- "[快哭了]",
- "[吓]",
- "[篮球]",
- "[乒乓]",
- "[NO]",
- "[跳跳]",
- "[怄火]",
- "[转圈]",
- "[磕头]",
- "[回头]",
- "[跳绳]",
- "[激动]",
- "[街舞]",
- "[献吻]",
- "[左太极]",
- "[右太极]",
- "[闭嘴]",
- "[猫咪]",
- "[红双喜]",
- "[鞭炮]",
- "[红灯笼]",
- "[麻将]",
- "[麦克风]",
- "[礼品袋]",
- "[信封]",
- "[象棋]",
- "[彩带]",
- "[蜡烛]",
- "[爆筋]",
- "[棒棒糖]",
- "[奶瓶]",
- "[面条]",
- "[香蕉]",
- "[飞机]",
- "[左车头]",
- "[车厢]",
- "[右车头]",
- "[多云]",
- "[下雨]",
- "[钞票]",
- "[熊猫]",
- "[灯泡]",
- "[风车]",
- "[闹钟]",
- "[雨伞]",
- "[彩球]",
- "[钻戒]",
- "[沙发]",
- "[纸巾]",
- "[手枪]",
- "[青蛙]"
- ];
- const faceUrl = "https://web.sdk.qcloud.com/im/assets/face-elem/";
- const bigEmojiList = [
- {
- icon: "yz00",
- list: [
- "yz00",
- "yz01",
- "yz02",
- "yz03",
- "yz04",
- "yz05",
- "yz06",
- "yz07",
- "yz08",
- "yz09",
- "yz10",
- "yz11",
- "yz12",
- "yz13",
- "yz14",
- "yz15",
- "yz16",
- "yz17"
- ]
- },
- {
- icon: "ys00",
- list: [
- "ys00",
- "ys01",
- "ys02",
- "ys03",
- "ys04",
- "ys05",
- "ys06",
- "ys07",
- "ys08",
- "ys09",
- "ys10",
- "ys11",
- "ys12",
- "ys13",
- "ys14",
- "ys15"
- ]
- },
- {
- icon: "gcs00",
- list: [
- "gcs00",
- "gcs01",
- "gcs02",
- "gcs03",
- "gcs04",
- "gcs05",
- "gcs06",
- "gcs07",
- "gcs08",
- "gcs09",
- "gcs10",
- "gcs11",
- "gcs12",
- "gcs13",
- "gcs14",
- "gcs15",
- "gcs16"
- ]
- }
- ];
- function decodeText(payload) {
- const renderDom = [];
- let temp = payload.text;
- let left = -1;
- let right = -1;
- while (temp !== "") {
- left = temp.indexOf("[");
- right = temp.indexOf("]");
- switch (left) {
- case 0:
- if (right === -1) {
- renderDom.push({
- name: "text",
- text: temp
- });
- temp = "";
- } else {
- const emojiKey = temp.slice(0, right + 1);
- if (emojiMap[emojiKey]) {
- renderDom.push({
- name: "img",
- src: emojiUrl + emojiMap[emojiKey]
- });
- temp = temp.substring(right + 1);
- } else {
- renderDom.push({
- name: "text",
- text: "["
- });
- temp = temp.slice(1);
- }
- }
- break;
- case -1:
- renderDom.push({
- name: "text",
- text: temp
- });
- temp = "";
- break;
- default:
- renderDom.push({
- name: "text",
- text: temp.slice(0, left)
- });
- temp = temp.substring(left);
- break;
- }
- }
- return renderDom;
- }
- function handleTipMessageShowContext(message) {
- const options = {
- message,
- text: ""
- };
- const userName = message.nick || message.payload.userIDList.join(",");
- switch (message.payload.operationType) {
- case uni.$TIM.TYPES.GRP_TIP_MBR_JOIN:
- options.text = `群成员:${userName} 加入群组`;
- break;
- case uni.$TIM.TYPES.GRP_TIP_MBR_QUIT:
- options.text = `群成员:${userName} 退出群组`;
- break;
- case uni.$TIM.TYPES.GRP_TIP_MBR_KICKED_OUT:
- options.text = `群成员:${userName} 被 ${message.payload.operatorID} 踢出群组`;
- break;
- case uni.$TIM.TYPES.GRP_TIP_MBR_SET_ADMIN:
- options.text = `群成员:${userName} 成为管理员`;
- break;
- case uni.$TIM.TYPES.GRP_TIP_MBR_CANCELED_ADMIN:
- options.text = `群成员:${userName} 被撤销管理员`;
- break;
- case uni.$TIM.TYPES.GRP_TIP_GRP_PROFILE_UPDATED:
- options.text = handleTipGrpUpdated(message);
- break;
- case uni.$TIM.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:
- for (const member of message.payload.memberList) {
- if (member.muteTime > 0) {
- options.text = `群成员:${member.userID} 被禁言`;
- } else {
- options.text = `群成员:${member.userID} 被取消禁言`;
- }
- }
- break;
- default:
- options.text = `[群提示消息]`;
- break;
- }
- return options;
- }
- function handleTipGrpUpdated(message) {
- const { payload } = message;
- const { newGroupProfile } = payload;
- const { operatorID } = payload;
- let text = "";
- const name = Object.keys(newGroupProfile)[0];
- switch (name) {
- case "ownerID":
- text = `${newGroupProfile[name]} 成为新的群主`;
- break;
- case "groupName":
- text = `${operatorID} 修改群名为 ${newGroupProfile[name]}`;
- break;
- case "notification":
- text = `${operatorID} 发布新公告`;
- break;
- }
- return text;
- }
- function handleTextMessageShowContext(item) {
- const options = {
- text: decodeText(item.payload)
- };
- return options;
- }
- function handleFaceMessageShowContext(item) {
- const face = {
- message: item,
- name: "",
- url: ""
- };
- const currentEmojiList = bigEmojiList.filter(
- (emoItem) => emoItem.icon === item.payload.data
- );
- if (currentEmojiList.length > 0) {
- face.name = currentEmojiList[0].list[item.payload.index];
- }
- if (item.payload.data.indexOf("@2x") > 0) {
- face.name = item.payload.data;
- } else {
- face.name = `${item.payload.data}@2x`;
- }
- face.url = `https://web.sdk.qcloud.com/im/assets/face-elem/${face.name}.png`;
- return face;
- }
- function handleLocationMessageShowContext(item) {
- const location2 = {
- lon: "",
- lat: "",
- href: "",
- url: "",
- description: "",
- message: item
- };
- location2.lon = item.payload.longitude.toFixed(6);
- location2.lat = item.payload.latitude.toFixed(6);
- location2.href = `https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&pointx=${location2.lon}&pointy=${location2.lat}&name=${item.payload.description}`;
- 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`;
- location2.description = item.payload.description;
- return location2;
- }
- function handleImageMessageShowContext(item) {
- return {
- progress: (item == null ? void 0 : item.status) === "unSend" && item.progress,
- info: item.payload.imageInfoArray,
- message: item
- };
- }
- function handleVideoMessageShowContext(item) {
- var _a, _b;
- return {
- progress: (item == null ? void 0 : item.status) === "unSend" && (item == null ? void 0 : item.progress),
- url: (_a = item == null ? void 0 : item.payload) == null ? void 0 : _a.videoUrl,
- snapshotUrl: (_b = item == null ? void 0 : item.payload) == null ? void 0 : _b.snapshotUrl,
- message: item
- };
- }
- function handleAudioMessageShowContext(item) {
- return {
- progress: (item == null ? void 0 : item.status) === "unSend" && item.progress,
- url: item.payload.url,
- message: item,
- second: item.payload.second
- };
- }
- function handleFileMessageShowContext(item) {
- let size = "";
- if (item.payload.fileSize >= 1024 * 1024) {
- size = `${(item.payload.fileSize / (1024 * 1024)).toFixed(2)} Mb`;
- } else if (item.payload.fileSize >= 1024) {
- size = `${(item.payload.fileSize / 1024).toFixed(2)} Kb`;
- } else {
- size = `${item.payload.fileSize.toFixed(2)}B`;
- }
- return {
- progress: (item == null ? void 0 : item.status) === "unSend" && item.progress,
- url: item.payload.fileUrl,
- message: item,
- name: item.payload.fileName,
- size
- };
- }
- function handleMergerMessageShowContext(item) {
- return { message: item, ...item.payload };
- }
- function extractCallingInfoFromMessage(message) {
- let callingmessage = {};
- let objectData = {};
- try {
- callingmessage = JSON.parse(message.payload.data);
- } catch (error2) {
- callingmessage = {};
- }
- if (callingmessage.businessID !== 1) {
- return "";
- }
- try {
- objectData = JSON.parse(callingmessage.data);
- } catch (error2) {
- objectData = {};
- }
- switch (callingmessage.actionType) {
- case 1: {
- if (objectData.call_end >= 0 && !callingmessage.groupID) {
- return `通话时长 :${formatTime(objectData.call_end)}`;
- }
- if (callingmessage.groupID) {
- return `结束群聊`;
- }
- if (objectData.data && objectData.data.cmd === "switchToAudio") {
- return `切换语音通话`;
- }
- if (objectData.data && objectData.data.cmd === "switchToVideo") {
- return `切换视频通话`;
- }
- return `发起通话`;
- }
- case 2:
- return `取消通话`;
- case 3:
- if (objectData.data && objectData.data.cmd === "switchToAudio") {
- return `切换语音通话`;
- }
- if (objectData.data && objectData.data.cmd === "switchToVideo") {
- return `切换视频通话`;
- }
- return `已接听`;
- case 4:
- return `拒绝通话`;
- case 5:
- if (objectData.data && objectData.data.cmd === "switchToAudio") {
- return `切换语音通话`;
- }
- if (objectData.data && objectData.data.cmd === "switchToVideo") {
- return `切换视频通话`;
- }
- return `无应答`;
- default:
- return "";
- }
- }
- function handleCustomMessageShowContext(item) {
- var _a;
- return {
- message: item,
- custom: extractCallingInfoFromMessage(item) || ((_a = item == null ? void 0 : item.payload) == null ? void 0 : _a.extension) || `[自定义消息]`
- };
- }
- function translateGroupSystemNotice(message) {
- var _a, _b;
- const groupName = ((_a = message.payload.groupProfile) == null ? void 0 : _a.name) || ((_b = message.payload.groupProfile) == null ? void 0 : _b.groupID);
- switch (message.payload.operationType) {
- case 1:
- return `${message.payload.operatorID} 申请加入群组:${groupName}`;
- case 2:
- return `成功加入群组:${groupName}`;
- case 3:
- return `申请加入群组:${groupName} 被拒绝`;
- case 4:
- return `你被管理员 ${message.payload.operatorID} 踢出群组:${groupName}`;
- case 5:
- return `群:${groupName} 被 ${message.payload.operatorID} 解散`;
- case 6:
- return `${message.payload.operatorID} 创建群:${groupName}`;
- case 7:
- return `${message.payload.operatorID} 邀请你加群:${groupName}`;
- case 8:
- return `你退出群组:${groupName}`;
- case 9:
- return `你被${message.payload.operatorID} 设置为群:${groupName} 的管理员`;
- case 10:
- return `你被 ${message.payload.operatorID} 撤销群:${groupName} 的管理员身份`;
- case 12:
- return `${message.payload.operatorID} 邀请你加群:${groupName}`;
- case 13:
- return `${message.payload.operatorID} 同意加群 :${groupName}`;
- case 14:
- return `${message.payload.operatorID} 拒接加群 :${groupName}`;
- case 255:
- return `自定义群系统通知: ${message.payload.userDefinedField}`;
- }
- }
- const MessageSystem$1 = vue.defineComponent({
- props: {
- data: {
- type: Array,
- default: () => {
- return [];
- }
- },
- types: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- messageList: [],
- types: {}
- });
- vue.watchEffect(() => {
- data.messageList = props2.data;
- data.types = props2.types;
- });
- const handleApplication = () => {
- uni.showActionSheet({
- itemList: ["同意", "拒绝"],
- success: (res) => {
- const option = {
- handleAction: "Agree",
- handleMessage: "欢迎进群",
- message: this.message
- };
- if (res.tapIndex === 1) {
- option.handleAction = "Reject";
- option.handleMessage = "拒绝申请";
- }
- uni.$TUIKit.handleGroupApplication(option).then(() => {
- uni.showToast({
- title: option.handleAction === "Agree" ? "已同意申请" : "已拒绝申请"
- });
- }).catch((error2) => {
- uni.showToast({
- title: error2.message || "处理失败",
- icon: "none"
- });
- });
- }
- });
- };
- return {
- ...vue.toRefs(data),
- translateGroupSystemNotice,
- handleApplication,
- caculateTimeago
- };
- }
- });
- function _sfc_render$2a(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.messageList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- item.payload.operationType === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "card handle"
- }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.translateGroupSystemNotice(item)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "choose" }, [
- vue.createElementVNode("view", {
- class: "button",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
- }, "处理")
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "card"
- }, [
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.translateGroupSystemNotice(item)),
- 1
- /* TEXT */
- )
- ]))
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- );
- }
- 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"]]);
- const Face$1 = vue.defineComponent({
- props: {
- show: {
- type: Boolean,
- default: () => false
- },
- isMute: {
- type: Boolean,
- default: () => false
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- emojiUrl,
- emojiMap,
- emojiName,
- faceUrl,
- bigEmojiList,
- show: false,
- currentIndex: 0,
- isMute: false
- });
- const dialog = vue.ref();
- vue.watchEffect(() => {
- data.show = props2.show;
- data.isMute = props2.isMute;
- });
- const toggleShow = () => {
- if (!data.isMute) {
- data.show = !data.show;
- }
- if (!data.show) {
- selectFace(0);
- }
- };
- const select = async (item, index2) => {
- const options = {
- name: item
- };
- if (data.currentIndex === 0) {
- options.type = "emo";
- options.url = emojiUrl + emojiMap[item];
- options.template = `<image src="${emojiUrl + emojiMap[item]}"></image>`;
- return ctx.emit("send", options);
- }
- try {
- await uni.$TUIKit.TUIChatServer.sendFaceMessage({
- index: index2,
- data: item
- });
- } catch (error2) {
- }
- };
- const list = vue.computed(() => {
- const emjiList = [data.emojiName];
- for (let i = 0; i < data.bigEmojiList.length; i++) {
- emjiList.push(data.bigEmojiList[i].list);
- }
- return emjiList;
- });
- const selectFace = (index2) => {
- data.currentIndex = index2;
- };
- const handleSendEmoji = () => {
- return ctx.emit("handleSendEmoji");
- };
- return {
- ...vue.toRefs(data),
- toggleShow,
- select,
- selectFace,
- list,
- dialog,
- handleSendEmoji
- };
- }
- });
- function _sfc_render$29(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "face" }, [
- vue.createElementVNode("view", {
- class: "icon icon-face",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleShow && _ctx.toggleShow(...args))
- }),
- vue.withDirectives(vue.createElementVNode(
- "view",
- {
- class: "face-main",
- ref: "dialog"
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.list, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "face-main-box",
- key: index2
- }, [
- _ctx.currentIndex === index2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "face-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item, (childrenItem, childrenIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "face-list-item",
- key: childrenIndex,
- onClick: ($event) => _ctx.select(childrenItem, childrenIndex)
- }, [
- index2 === 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "emo-image",
- src: _ctx.emojiUrl + _ctx.emojiMap[childrenItem]
- }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- class: "face-img",
- src: _ctx.faceUrl + childrenItem + "@2x.png"
- }, null, 8, ["src"]))
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "face-tab" }, [
- vue.createElementVNode("view", {
- class: "face-tab-item",
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.selectFace(0))
- }, [
- vue.createElementVNode("view", { class: "icon icon-face" })
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.bigEmojiList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "face-tab-item",
- key: index2,
- onClick: ($event) => _ctx.selectFace(index2 + 1)
- }, [
- vue.createElementVNode("image", {
- class: "face-icon",
- src: _ctx.faceUrl + item.icon + "@2x.png"
- }, null, 8, ["src"])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", {
- class: "send-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleSendEmoji && _ctx.handleSendEmoji(...args))
- }, "发送")
- ])
- ],
- 512
- /* NEED_PATCH */
- ), [
- [vue.vShow, _ctx.show]
- ])
- ]);
- }
- 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"]]);
- const recorderManager = uni.getRecorderManager();
- const AudioMessage$1 = vue.defineComponent({
- props: {
- show: {
- type: Boolean,
- default: () => {
- return false;
- }
- }
- },
- setup(props2, ctx) {
- const data = vue.reactive({
- popupToggle: false,
- isRecording: false,
- canSend: true,
- text: "按住说话",
- recorderManager: null,
- title: " ",
- recordTime: 0,
- recordTimer: null
- });
- vue.onMounted(() => {
- recorderManager.onStop((res) => {
- clearInterval(data.recordTimer);
- let msg = {
- duration: res.duration ? res.duration : data.recordTime * 1e3,
- tempFilePath: res.tempFilePath,
- fileSize: res.fileSize ? res.fileSize : 48 * data.recordTime / 8 * 1024
- };
- uni.hideLoading();
- if (data.canSend) {
- if (msg.duration < 1e3) {
- uni.showToast({
- title: "录音时间太短",
- icon: "none"
- });
- } else {
- uni.$TUIKit.TUIChatServer.sendAudioMessage(msg);
- }
- }
- data.popupToggle = false;
- data.isRecording = false;
- data.canSend = true;
- data.title = " ";
- data.text = "按住说话";
- });
- });
- const handleLongPress = (e) => {
- data.popupToggle = true, recorderManager.start({
- duration: 6e4,
- // 录音的时长,单位 ms,最大值 600000(10 分钟)
- sampleRate: 44100,
- // 采样率
- numberOfChannels: 1,
- // 录音通道数
- encodeBitRate: 192e3,
- // 编码码率
- format: "aac"
- // 音频格式,选择此格式创建的音频消息,可以在即时通信 IM 全平台(Android、iOS、微信小程序和Web)互通
- });
- data.startPoint = e.target, data.title = "正在录音", data.isRecording = true, data.recordTime = 0;
- data.recordTimer = setInterval(() => {
- data.recordTime++;
- }, 1e3);
- };
- const handleTouchMove = (e) => {
- if (data.isRecording) {
- if (e.currentTarget.offsetTop - e.changedTouches[e.changedTouches.length - 1].clientY > 100) {
- data.text = "抬起停止";
- data.title = "松开手指,取消发送";
- data.canSend = false;
- } else if (e.currentTarget.offsetTop - e.changedTouches[e.changedTouches.length - 1].clientY > 20) {
- data.text = "抬起停止";
- data.title = "上划可取消";
- data.canSend = true;
- } else {
- data.text = "抬起停止";
- data.title = "正在录音";
- data.canSend = true;
- }
- }
- };
- const handleTouchEnd = () => {
- data.isRecording = false;
- data.popupToggle = false;
- data.text = "按住说话";
- uni.hideLoading();
- recorderManager.stop();
- };
- const sendUploadMessage = (e) => {
- Video.TUIServer.sendVideoMessage(e.target);
- };
- return {
- ...vue.toRefs(data),
- sendUploadMessage,
- handleLongPress,
- handleTouchEnd,
- handleTouchMove
- };
- }
- });
- function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "TUI-message-input-main",
- onLongpress: _cache[3] || (_cache[3] = (...args) => _ctx.handleLongPress && _ctx.handleLongPress(...args)),
- onTouchmove: _cache[4] || (_cache[4] = (...args) => _ctx.handleTouchMove && _ctx.handleTouchMove(...args)),
- onTouchend: _cache[5] || (_cache[5] = (...args) => _ctx.handleTouchEnd && _ctx.handleTouchEnd(...args))
- },
- [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.text),
- 1
- /* TEXT */
- ),
- _ctx.popupToggle ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "record-modal",
- onLongpress: _cache[0] || (_cache[0] = (...args) => _ctx.handleLongPress && _ctx.handleLongPress(...args)),
- onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchMove && _ctx.handleTouchMove(...args)),
- onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.handleTouchEnd && _ctx.handleTouchEnd(...args))
- },
- [
- vue.createElementVNode("view", { class: "wrapper" }, [
- vue.createElementVNode("view", { class: "modal-loading" })
- ]),
- vue.createElementVNode(
- "view",
- { class: "modal-title" },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- )
- ],
- 32
- /* NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 32
- /* NEED_HYDRATION */
- );
- }
- 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"]]);
- const TUIChatInput$1 = vue.defineComponent({
- components: {
- Face,
- AudioMessage
- },
- props: {
- text: {
- type: String,
- default: () => {
- return "";
- }
- },
- conversationData: {
- type: Object,
- default: () => {
- return "";
- }
- }
- },
- setup(props2) {
- const TUIServer = uni.$TUIKit.TUIChatServer;
- const data = vue.reactive({
- imType: vue.computed(() => store.state.timStore.imType),
- orderType: vue.computed(() => store.state.timStore.orderType),
- firstSendMessage: true,
- inputText: "",
- extensionArea: false,
- sendMessageBtn: false,
- displayFlag: "",
- isAudio: false,
- displayServiceEvaluation: false,
- displayCommonWords: false,
- displayOrderList: false,
- conversation: vue.computed(() => store.state.timStore.conversation)
- });
- vue.watchEffect(() => {
- data.inputText = props2.text;
- });
- const handleSwitchAudio = () => {
- data.isAudio = !data.isAudio;
- };
- const handleEmoji = () => {
- data.displayFlag = data.displayFlag === "emoji" ? "" : "emoji";
- };
- const handleExtensions = (e) => {
- data.displayFlag = data.displayFlag === "extension" ? "" : "extension";
- };
- const handleSendTextMessage = (e) => {
- if (data.inputText.trimEnd()) {
- uni.$TUIKit.TUIChatServer.sendTextMessage(
- JSON.parse(JSON.stringify(data.inputText))
- );
- }
- data.inputText = " ";
- };
- const handleOrder = (value2) => {
- uni.navigateTo({
- url: "/pages_order/inquiryOrderDetails?orderId=" + store.state.timStore.orderId
- });
- };
- const handleFollow = (value2) => {
- uni.navigateTo({
- url: "/pages_user/followDetails?followId=" + store.state.timStore.followId
- });
- };
- const handleStoreOrder = (value2) => {
- uni.navigateTo({
- url: "/pages_order/storeOrderDetail?orderId=" + store.state.timStore.orderId
- });
- };
- const handleSend = (emo) => {
- data.inputText += emo.name;
- };
- const handleSendImageMessage = (type2) => {
- uni.chooseImage({
- sourceType: [type2],
- count: 1,
- success: (res) => {
- uni.getImageInfo({
- src: res.tempFilePaths[0],
- success(image2) {
- formatAppLog("error", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:228", image2);
- setTimeout(function() {
- TUIServer.sendImageMessage(res, image2);
- }, 500);
- }
- });
- }
- });
- };
- const handleSendVideoMessage = (type2) => {
- uni.chooseVideo({
- sourceType: [type2],
- // 来源相册或者拍摄
- maxDuration: 60,
- // 设置最长时间60s
- camera: "back",
- // 后置摄像头
- success: (res) => {
- if (res) {
- setTimeout(function() {
- TUIServer.sendVideoMessage(res);
- }, 500);
- }
- }
- });
- };
- const handleCalling = (value2) => {
- if (data.conversation.type === "GROUP") {
- uni.showToast({
- title: "群聊暂不支持",
- icon: "none"
- });
- return;
- }
- const { userID } = data.conversation.userProfile;
- if (typeof uni.$TUICallKit === "undefined") {
- formatAppLog(
- "error",
- "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:271",
- "请集成 TUICallKit 插件,使用真机运行并且自定义基座调试,请参考官网文档:https://cloud.tencent.com/document/product/269/83857"
- );
- uni.showToast({
- title: "请集成 TUICallKit 插件哦 ~ ",
- icon: "none",
- duration: 3e3
- });
- } else {
- uni.$TUICallKit.call(
- {
- userID,
- callMediaType: value2
- },
- (res) => {
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/components/message-input/index.vue:287", JSON.stringify(res));
- }
- );
- }
- };
- return {
- ...vue.toRefs(data),
- handleExtensions,
- handleSendImageMessage,
- handleSendTextMessage,
- handleSendVideoMessage,
- handleEmoji,
- handleSend,
- handleSwitchAudio,
- handleCalling,
- handleOrder,
- handleFollow,
- handleStoreOrder
- };
- }
- });
- const _imports_0 = "/assets/audio.3e97d529.svg";
- const _imports_1 = "/assets/emoji.ccca7654.svg";
- const _imports_2 = "/assets/more.abda2f36.svg";
- const _imports_3 = "/assets/take-photo.bbcbfd9a.svg";
- const _imports_4 = "/assets/send-img.7ec35072.svg";
- const _imports_5 = "/assets/take-video.3b38acb8.svg";
- const _imports_6 = "/assets/audio-calling.ce9b3c0a.svg";
- const _imports_7 = "/assets/inquiry.4da57648.svg";
- function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_AudioMessage = vue.resolveComponent("AudioMessage");
- const _component_Face = vue.resolveComponent("Face");
- return vue.openBlock(), vue.createElementBlock("view", { class: "TUI-message-input-container" }, [
- vue.createElementVNode("view", { class: "TUI-message-input" }, [
- vue.createElementVNode("image", {
- class: "TUI-icon",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleSwitchAudio && _ctx.handleSwitchAudio(...args)),
- src: _imports_0
- }),
- !_ctx.isAudio ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "TUI-message-input-main"
- }, [
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "TUI-message-input-area",
- "placeholder-class": "input-placeholder",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputText = $event),
- placeholder: "请输入想要咨询的问题...",
- "auto-height": "",
- "confirm-type": "send",
- "confirm-hold": "true",
- onConfirm: _cache[2] || (_cache[2] = (...args) => _ctx.handleSendTextMessage && _ctx.handleSendTextMessage(...args))
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.inputText]
- ])
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "TUI-message-input-main"
- }, [
- vue.createVNode(_component_AudioMessage)
- ])),
- vue.createElementVNode("view", {
- class: "TUI-message-input-functions",
- "hover-class": "none"
- }, [
- vue.createElementVNode("image", {
- class: "TUI-icon",
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleEmoji && _ctx.handleEmoji(...args)),
- src: _imports_1
- }),
- vue.createElementVNode("view", {
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleExtensions && _ctx.handleExtensions(...args))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-icon",
- src: _imports_2
- })
- ])
- ])
- ]),
- _ctx.displayFlag === "emoji" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "TUI-Emoji-area"
- }, [
- vue.createVNode(_component_Face, {
- show: _ctx.displayFlag === "emoji",
- onSend: _ctx.handleSend,
- onHandleSendEmoji: _ctx.handleSendTextMessage
- }, null, 8, ["show", "onSend", "onHandleSendEmoji"])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.displayFlag === "extension" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "TUI-Extensions"
- }, [
- vue.createCommentVNode(' TODO: 这里功能还没实现\r\n <! <camera device-position="back" flash="off" binderror="error" style="width: 100%; height: 300px;"></camera>'),
- vue.createElementVNode("view", {
- class: "TUI-Extension-slot",
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleSendImageMessage("camera"))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_3
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "拍照")
- ]),
- vue.createElementVNode("view", {
- class: "TUI-Extension-slot",
- onClick: _cache[6] || (_cache[6] = ($event) => _ctx.handleSendImageMessage("album"))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_4
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "图片")
- ]),
- vue.createElementVNode("view", {
- class: "TUI-Extension-slot",
- onClick: _cache[7] || (_cache[7] = ($event) => _ctx.handleSendVideoMessage("album"))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_5
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "视频")
- ]),
- vue.createElementVNode("view", {
- class: "TUI-Extension-slot",
- onClick: _cache[8] || (_cache[8] = ($event) => _ctx.handleSendVideoMessage("camera"))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_3
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "录像")
- ]),
- _ctx.imType == 1 && _ctx.orderType == 2 || _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "TUI-Extension-slot",
- onClick: _cache[9] || (_cache[9] = ($event) => _ctx.handleCalling(1))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_6
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "语音通话")
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.imType == 1 && _ctx.orderType == 2 || _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "TUI-Extension-slot",
- onClick: _cache[10] || (_cache[10] = ($event) => _ctx.handleCalling(2))
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_5
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "视频通话")
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.imType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "TUI-Extension-slot",
- onClick: _cache[11] || (_cache[11] = ($event) => _ctx.handleOrder())
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_7
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "问诊订单")
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "TUI-Extension-slot",
- onClick: _cache[12] || (_cache[12] = ($event) => _ctx.handleFollow())
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_7
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "随访单")
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.imType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "TUI-Extension-slot",
- onClick: _cache[13] || (_cache[13] = ($event) => _ctx.handleStoreOrder())
- }, [
- vue.createElementVNode("image", {
- class: "TUI-Extension-icon",
- src: _imports_7
- }),
- vue.createElementVNode("view", { class: "TUI-Extension-slot-name" }, "药品订单")
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- class IComponentServer {
- /**
- * 组件销毁
- */
- destroyed() {
- }
- /**
- * 数据监听回调
- *
- * @param {any} oldValue 旧数据
- * @param {any} newValue 新数据
- */
- updateStore(oldValue, newValue) {
- }
- }
- class TUIConversationServer extends IComponentServer {
- constructor(TUICore) {
- super();
- this.store = store.state.timStore;
- this.TUICore = uni.$TUIKit;
- uni.setStorageSync(`TIM_${uni.$chat_SDKAppID}_isTUIKit`, true);
- if (uni.$aegis) {
- uni.$aegis.reportEvent({
- name: "platform",
- ext1: "platform-APP-npm",
- ext2: "uniTuikitExternalVue3",
- ext3: `${uni.$chat_SDKAppID}`
- });
- }
- this.bindTIMEvent();
- if (uni.$chat_isSDKReady) {
- this.getConversationList();
- }
- }
- /**
- * /////////////////////////////////////////////////////////////////////////////////
- * //
- * // TIM 事件监听注册接口
- * //
- * /////////////////////////////////////////////////////////////////////////////////
- */
- bindTIMEvent() {
- this.TUICore.on(
- uni.$TIM.EVENT.CONVERSATION_LIST_UPDATED,
- this.handleConversationListUpdate,
- this
- );
- }
- unbindTIMEvent() {
- this.TUICore.off(
- uni.$TIM.EVENT.CONVERSATION_LIST_UPDATED,
- this.handleConversationListUpdate
- );
- }
- handleConversationListUpdate(res) {
- uni.hideLoading();
- if (res.data.length === 0)
- ;
- uni.$emit("refreshMsgCount");
- res.data.forEach(function(element) {
- formatAppLog("log", "at pages/TUIKit/TUICore/server/conversation/index.ts:96", "收到会话消息");
- formatAppLog("log", "at pages/TUIKit/TUICore/server/conversation/index.ts:97", element);
- });
- store.commit("timStore/setConversationList", res.data);
- }
- /**
- * 组件销毁
- *
- */
- destroyed() {
- this.unbindTIMEvent();
- }
- /*
- * 获取 conversationList
- *
- * @returns {Promise}
- */
- async getConversationList() {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await uni.$TUIKit.getConversationList();
- store.commit("timStore/setConversationList", imResponse.data.conversationList);
- uni.hideLoading();
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 获取 conversationList
- *
- * @param {string} conversationID 会话ID
- * @returns {Promise}
- */
- async getConversationProfile(conversationID) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.getConversationProfile(
- conversationID
- );
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 设置自定义值
- */
- async setConversationValue(conversationID, data) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.setConversationCustomData(
- {
- conversationIDList: [conversationID],
- customData: data
- }
- );
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 删除会话
- *
- * @param {string} conversationID 会话ID
- * @returns {Promise}
- */
- async deleteConversation(conversationID) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.deleteConversation(
- conversationID
- );
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 置顶会话
- *
- * @param {Object} options 置顶参数
- * @returns {Promise}
- */
- async pinConversation(options) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.pinConversation(options);
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * C2C消息免打扰
- *
- * @param {Object} options 消息免打扰参数
- * @returns {Promise}
- */
- async muteConversation(options) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.setMessageRemindType(
- options
- );
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 设置已读
- *
- * @param {string} conversationID 会话ID
- * @returns {Promise}
- */
- async setMessageRead(conversationID) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.setMessageRead({
- conversationID
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- }
- class TUIChatServer extends IComponentServer {
- constructor(TUICore) {
- super();
- this.currentStore = {};
- this.store = store.state.timStore;
- this.TUICore = uni.$TUIKit;
- this.bindTIMEvent();
- this.updateStore();
- }
- /**
- * 组件销毁
- */
- destroyed() {
- this.unbindTIMEvent();
- }
- /**
- * 数据监听回调
- *
- * @param {any} newValue 新数据
- * @param {any} oldValue 旧数据
- *
- */
- updateStore() {
- this.getMessageList({
- conversationID: this.store.conversationID,
- count: 15
- });
- store.commit("timStore/resetChat");
- }
- /**
- * /////////////////////////////////////////////////////////////////////////////////
- * //
- * // TIM 事件监听注册接口
- * //
- * /////////////////////////////////////////////////////////////////////////////////
- */
- bindTIMEvent() {
- this.TUICore.on(
- uni.$TIM.EVENT.MESSAGE_RECEIVED,
- this.handleMessageReceived,
- this
- );
- this.TUICore.on(
- uni.$TIM.EVENT.MESSAGE_MODIFIED,
- this.handleMessageModified,
- this
- );
- this.TUICore.on(
- uni.$TIM.EVENT.MESSAGE_REVOKED,
- this.handleMessageRevoked,
- this
- );
- this.TUICore.on(
- uni.$TIM.EVENT.MESSAGE_READ_BY_PEER,
- this.handleMessageReadByPeer,
- this
- );
- this.TUICore.on(
- uni.$TIM.EVENT.GROUP_LIST_UPDATED,
- this.handleGroupListUpdated,
- this
- );
- }
- unbindTIMEvent() {
- this.TUICore.off(
- uni.$TIM.EVENT.MESSAGE_RECEIVED,
- this.handleMessageReceived
- );
- this.TUICore.off(
- uni.$TIM.EVENT.MESSAGE_MODIFIED,
- this.handleMessageModified
- );
- this.TUICore.off(uni.$TIM.EVENT.MESSAGE_REVOKED, this.handleMessageRevoked);
- this.TUICore.off(
- uni.$TIM.EVENT.MESSAGE_READ_BY_PEER,
- this.handleMessageReadByPeer
- );
- this.TUICore.off(
- uni.$TIM.EVENT.GROUP_LIST_UPDATED,
- this.handleGroupListUpdated,
- this
- );
- }
- handleMessageReceived(event) {
- event.data.forEach((item) => {
- if (item.conversationID === this.store.conversationID) {
- uni.$TUIKit.TUIConversationServer.setMessageRead(item.conversationID);
- if (item.cloudCustomData != null && item.cloudCustomData != "") {
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:107", "收到消息");
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:108", item);
- try {
- var json = JSON.parse(item.cloudCustomData);
- store.commit("timStore/setType", json.type);
- store.commit("timStore/setImType", json.imType);
- store.commit("timStore/setOrderId", json.orderId);
- store.commit("timStore/setOrderType", json.orderType);
- store.commit("timStore/setFollowId", json.followId);
- if (json.type === "finishInquiry") {
- store.commit("timStore/setImType", 0);
- uni.navigateTo({
- url: "/pages_order/pingOrder?orderId=" + json.orderId
- });
- } else if (json.type === "startInquiry") {
- } else if (json.type === "inquiry") {
- } else if (json.type === "startFollow") {
- } else if (json.type === "follow") {
- } else if (json.type === "finishFollow") {
- } else if (json.type === "startDrugReport") {
- } else if (json.type === "finishDrugReport") {
- } else if (json.type === "drugReport") {
- }
- } catch (e) {
- }
- const messageList = [...this.store.messageList, item];
- store.commit("timStore/setMessageList", messageList);
- } else {
- const messageList = [...this.store.messageList, item];
- store.commit("timStore/setMessageList", messageList);
- }
- }
- });
- }
- handleMessageModified(event) {
- const middleData = this.store.messageList;
- this.store.messageList = [];
- this.store.messageList = middleData;
- }
- handleMessageRevoked(event) {
- }
- async handleMessageReadByPeer(event) {
- const middleData = this.store.messageList;
- await store.commit("timStore/setMessageList", middleData);
- }
- handleGroupListUpdated(event) {
- event == null ? void 0 : event.data.map((item) => {
- var _a, _b, _c;
- 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)) {
- this.store.conversation.groupProfile = item;
- const midden = this.store.conversation;
- this.store.conversation = {};
- this.store.conversation = midden;
- }
- return item;
- });
- }
- /**
- * /////////////////////////////////////////////////////////////////////////////////
- * //
- * // 处理 TIM 接口参数及回调
- * //
- * /////////////////////////////////////////////////////////////////////////////////
- */
- /**
- * 创建消息生成参数
- *
- * @param {Object} content 消息体
- * @param {String} type 消息类型 text: 文本类型 file: 文件类型 face: 表情 location: 地址 custom: 自定义 merger: 合并 forward: 转发
- * @param {Callback} callback 回调函数
- * @param {any} to 发送的对象
- * @returns {options} 消息参数
- */
- handleMessageOptions(content, type2, callback, to) {
- var _a, _b, _c, _d, _e, _f;
- var customerData = {
- type: this.store.type,
- imType: this.store.imType,
- orderId: this.store.orderId,
- followId: this.store.followId,
- orderType: this.store.orderType
- };
- const options = {
- cloudCustomData: JSON.stringify(customerData),
- to: "",
- conversationType: (to == null ? void 0 : to.type) || this.store.conversation.type,
- payload: content,
- needReadReceipt: true
- };
- if (type2 === "file" && callback) {
- options.onProgress = callback;
- }
- switch (options.conversationType) {
- case uni.$TIM.TYPES.CONV_C2C:
- 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) || "";
- break;
- case uni.$TIM.TYPES.CONV_GROUP:
- 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) || "";
- break;
- }
- return options;
- }
- /**
- * 处理异步函数
- *
- * @param {callback} callback 回调函数
- * @returns {Promise} 返回异步函数
- */
- handlePromiseCallback(callback) {
- return new Promise((resolve, reject2) => {
- });
- }
- /**
- * 文件上传进度函数处理
- *
- * @param {number} progress 文件上传进度 1表示完成
- * @param {message} message 文件消息
- */
- handleUploadProgress(progress, message) {
- this.store.messageList.map((item) => {
- if (item.ID === message.ID) {
- item.progress = progress;
- }
- return item;
- });
- }
- /**
- * /////////////////////////////////////////////////////////////////////////////////
- * //
- * // 对外方法
- * //
- * /////////////////////////////////////////////////////////////////////////////////
- */
- // /**
- // * 发送文本消息
- // *
- // * @param {any} text 发送的消息
- // * @returns {Promise}
- // */
- /**
- * 发送文本消息
- *
- * @param {any} text 发送的消息
- * @returns {Promise}
- */
- sendTextMessage(text) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions({ text }, "text");
- const message = this.TUICore.createTextMessage(options);
- const messageList = [...this.store.messageList, message];
- store.commit("timStore/setMessageList", messageList);
- const imResponse = await this.TUICore.sendMessage(message);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- const middleData = this.store.messageList;
- store.commit("timStore/resetChat");
- store.commit("timStore/setMessageList", middleData);
- }
- });
- }
- /**
- * 发送表情消息
- *
- * @param {Object} data 消息内容
- * @param {Number} data.index 表情索引
- * @param {String} data.data 额外数据
- * @returns {Promise}
- */
- sendFaceMessage(data) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(data, "face");
- const message = this.TUICore.createFaceMessage(options);
- const messageList = [...this.store.messageList, message];
- store.commit("timStore/setMessageList", messageList);
- const imResponse = await this.TUICore.sendMessage(message);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送图片消息
- *
- * @param {res} res 图片文件
- * @param {image} 图片尺寸
- * @returns {Promise}
- */
- sendImageMessage(res, image2) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions({ file: res }, "file");
- const message = this.TUICore.createImageMessage(options);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:366", 111222);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:367", options);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:368", message);
- message.payload.imageInfoArray[1].height = image2.height;
- message.payload.imageInfoArray[1].width = image2.width;
- const messageList = [...this.store.messageList, message];
- store.commit("timStore/setMessageList", messageList);
- const imResponse = await this.TUICore.sendMessage(message);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送视频消息
- *
- * @param {Video} video 图片文件
- * @returns {Promise}
- */
- sendVideoMessage(res, video2) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions({ file: res }, "file");
- const message = this.TUICore.createVideoMessage(options);
- const messageList = [...this.store.messageList, message];
- store.commit("timStore/setMessageList", messageList);
- const imResponse = await this.TUICore.sendMessage(message);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送语音消息
- *
- * @param {audio} audio 音频文件
- * @returns {Promise}
- */
- sendAudioMessage(audio2) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(
- { file: audio2 },
- "file",
- (progress) => {
- this.handleUploadProgress(progress, message);
- }
- );
- const message = this.TUICore.createAudioMessage(options);
- const messageList = [...this.store.messageList, message];
- store.commit("timStore/setMessageList", messageList);
- const imResponse = await this.TUICore.sendMessage(message);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:439", "发送音频消息完成", imResponse);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送文件消息
- *
- * @param {File} file 文件
- * @returns {Promise}
- */
- sendFileMessage(file) {
- return this.handlePromiseCallback(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(
- { file },
- "file",
- (progress) => {
- this.handleUploadProgress(progress, message);
- }
- );
- const message = this.TUICore.createFileMessage(options);
- this.currentStore.messageList.push(message);
- const imResponse = await this.TUICore.sendMessage(message);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:472", "发送文件消息完成", imResponse);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送自定义消息
- *
- * @param {Object} data 消息内容
- * @param {String} data.data 自定义消息的数据字段
- * @param {String} data.description 自定义消息的说明字段
- * @param {String} data.extension 自定义消息的扩展字段
- * @returns {Promise}
- */
- sendCustomMessage(data) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(data, "custom");
- const message = this.TUICore.createCustomMessage(options);
- const messageList = [...this.store.messageList, message];
- store.commit("timStore/setMessageList", messageList);
- const imResponse = await this.TUICore.sendMessage(message);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:504", "发送自定义消息完成", imResponse);
- this.store.messageList = this.store.messageList.map((item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- });
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送地理位置消息
- *
- * @param {Object} data 消息内容
- * @param {String} data.description 地理位置描述信息
- * @param {Number} data.longitude 经度
- * @param {Number} data.latitude 纬度
- * @returns {Promise}
- */
- sendLocationMessage(data) {
- return this.handlePromiseCallback(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(data, "location");
- const message = this.TUICore.createLocationMessage(options);
- this.store.messageList.push(message);
- const imResponse = await this.TUICore.sendMessage(message);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:534", "发送地理位置消息完成", imResponse);
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 转发消息
- *
- * @param {message} message 消息实例
- * @param {any} to 转发的对象
- * @returns {Promise}
- */
- forwardMessage(message, to) {
- return this.handlePromiseCallback(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(message, "forward", {}, to);
- const imMessage = this.TUICore.createForwardMessage(options);
- const imResponse = await this.TUICore.sendMessage(imMessage);
- if (this.store.conversation.conversationID === imResponse.data.message.conversationID) {
- this.store.messageList.push(imResponse.data.message);
- }
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:561", "消息转发完成", imResponse);
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送@ 提醒功能的文本消息
- *
- * @param {Object} data 消息内容
- * @param {String} data.text 文本消息
- * @param {Array} data.atUserList 需要 @ 的用户列表,如果需要 @ALL,请传入 TIM.TYPES.MSG_AT_ALL
- * @returns {message}
- *
- * - 注:此接口仅用于群聊
- */
- sendTextAtMessage(data) {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(data, "text");
- const message = this.TUICore.createTextAtMessage(options);
- this.currentStore.messageList.push(message);
- const imResponse = await this.TUICore.sendMessage(message);
- this.currentStore.messageList = this.currentStore.messageList.map(
- (item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- }
- );
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 发送合并消息
- *
- * @param {Object} data 消息内容
- * @param {Array.<Message>} data.messageList 合并的消息列表
- * @param {String} data.title 合并的标题
- * @param {String} data.abstractList 摘要列表,不同的消息类型可以设置不同的摘要信息
- * @param {String} data.compatibleText 兼容文本
- * @returns {Promise}
- */
- sendMergerMessage(data) {
- return this.handlePromiseCallback(async (resolve, reject2) => {
- try {
- const options = this.handleMessageOptions(data, "merger");
- const message = this.TUICore.createMergerMessage(options);
- this.currentStore.messageList.push(message);
- const imResponse = await this.TUICore.sendMessage(message);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:618", "发送合并消息完成", imResponse);
- this.currentStore.messageList = this.currentStore.messageList.map(
- (item) => {
- if (item.ID === imResponse.data.message.ID) {
- return imResponse.data.message;
- }
- return item;
- }
- );
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 获取 messageList
- *
- * @param {any} options 获取 messageList 参数
- * @param {Boolean} history 是否获取历史消息
- * @returns {Promise}
- */
- async getMessageList(options, history) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.getMessageList(options);
- let messageList;
- if (!history) {
- messageList = imResponse.data.messageList;
- } else {
- messageList = [
- ...imResponse.data.messageList,
- ...this.store.messageList
- ];
- }
- this.currentStore.nextReqMessageID = imResponse.data.nextReqMessageID;
- this.currentStore.isCompleted = imResponse.data.isCompleted;
- store.commit("timStore/setMessageList", messageList);
- resolve(imResponse.data);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 获取历史消息
- *
- * @returns {Promise}
- */
- async getHistoryMessageList() {
- return new Promise(async (resolve, reject2) => {
- try {
- const options = {
- conversationID: this.store.conversation.conversationID,
- nextReqMessageID: this.currentStore.nextReqMessageID,
- count: 15
- };
- let messageList = [];
- if (!this.currentStore.isCompleted) {
- messageList = await this.getMessageList(options, true);
- }
- resolve(messageList);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 消息撤回
- *
- * @param {message} message 消息实例
- * @returns {Promise}
- */
- revokeMessage(message) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.revokeMessage(message);
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 重发消息
- *
- * @param {message} message 消息实例
- * @returns {Promise}
- */
- resendMessage(message) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.resendMessage(message);
- formatAppLog("log", "at pages/TUIKit/TUICore/server/chat/index.ts:715", "消息重发完成", imResponse);
- let messageList = [];
- messageList = this.store.messageList.filter(
- (item) => item.ID !== message.ID
- );
- store.commit("timStore/setMessageList", messageList);
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- /**
- * 删除消息
- *
- * @param {Array.<message>} messages 消息实例
- * @returns {Promise}
- */
- deleteMessage(messages2) {
- return new Promise(async (resolve, reject2) => {
- try {
- const imResponse = await this.TUICore.deleteMessage(messages2);
- let messageList = [];
- messageList = this.store.messageList.filter(
- (item) => item.ID !== messages2.ID
- );
- store.commit("timStore/setMessageList", messageList);
- resolve(imResponse);
- } catch (error2) {
- reject2(error2);
- }
- });
- }
- }
- class TUIProfileServer extends IComponentServer {
- constructor(TUICore) {
- super();
- this.store = store.state.timStore;
- this.currentStore = {};
- this.TUICore = uni.$TUIKit;
- this.bindTIMEvent();
- }
- /**
- * 组件销毁
- */
- destroyed() {
- this.unbindTIMEvent();
- }
- /**
- * /////////////////////////////////////////////////////////////////////////////////
- * //
- * // TIM 事件监听注册接口
- * //
- * /////////////////////////////////////////////////////////////////////////////////
- */
- bindTIMEvent() {
- this.TUICore.on(
- uni.$TIM.EVENT.PROFILE_UPDATED,
- this.handleProfileUpdated,
- this
- );
- }
- unbindTIMEvent() {
- this.TUICore.off(uni.$TIM.EVENT.PROFILE_UPDATED, this.handleProfileUpdated);
- }
- handleProfileUpdated(event) {
- formatAppLog("log", "at pages/TUIKit/TUICore/server/profile/index.ts:51", event);
- }
- }
- const _sfc_main$27 = vue.defineComponent({
- name: "TUIChat",
- components: {
- MessageText,
- MessageImage,
- MessageVideo,
- MessageAudio,
- MessageFace,
- MessageCustom,
- MessageBubble,
- MessageTip,
- MessageRevoked,
- MessageSystem,
- TUIChatInput,
- MessageOperate
- },
- setup(props2) {
- const timStore2 = store.state.timStore;
- uni.$TUIKit.TUIChatServer = new TUIChatServer();
- const TUICallKit = vue.shallowRef(null);
- const TUIServer = uni.$TUIKit.TUIChatServer;
- const left = 0;
- const right = 0;
- const defaultDialogPosition = {
- top: -70,
- left,
- right
- };
- const data = vue.reactive({
- messageList: vue.computed(() => timStore2.messageList),
- conversation: vue.computed(() => timStore2.conversation),
- triggered: false,
- scrollTop: 999,
- text: "",
- types: uni.$TIM.TYPES,
- currentMessage: {},
- dialogID: "",
- forwardStatus: false,
- imageFlag: false,
- isCompleted: false,
- oldMessageTime: 0,
- dialogPosition: defaultDialogPosition,
- imType: vue.computed(() => timStore2.imType),
- orderId: vue.computed(() => timStore2.orderId)
- });
- const conversationType = vue.computed(() => {
- const conversation = data.conversation;
- if (!(conversation == null ? void 0 : conversation.conversationID)) {
- return "";
- }
- if ((conversation == null ? void 0 : conversation.type) === uni.$TIM.TYPES.CONV_SYSTEM) {
- return "system";
- }
- return "chat";
- });
- const messages2 = vue.computed(() => {
- if (data.messageList.length > 0) {
- data.oldMessageTime = data.messageList[0].time;
- return data.messageList.filter((item) => {
- return !item.isDeleted;
- });
- }
- });
- onLoad((options) => {
- uni.setNavigationBarTitle({
- title: options && options.conversationName
- });
- if (store.state.timStore.imType == 1)
- ;
- else if (store.state.timStore.imType == 2)
- ;
- });
- onUnload(() => {
- TUIServer.destroyed();
- });
- vue.watch(messages2, (newVal, oldVal) => {
- vue.nextTick(() => {
- const newLastMessage = newVal[newVal.length - 1];
- const oldLastMessage = oldVal ? oldVal[oldVal.length - 1] : {};
- data.oldMessageTime = messages2.value[0].time;
- handleShowTime();
- if (oldVal && newLastMessage.ID !== oldLastMessage.ID) {
- handleScrollBottom();
- }
- });
- });
- onReady(() => {
- const options = {
- sdkAppID: uni.$chat_SDKAppID,
- // 开通实时音视频服务创建应用后分配的 SDKAppID
- userID: uni.$chat_userID,
- // 用户 ID,可以由您的帐号系统指定
- userSig: uni.$chat_userSig,
- // 身份签名,相当于登录密码的作用
- tim: uni.$TUIKit
- // tim 参数适用于业务中已存在 TIM 实例,为保证 TIM 实例唯一性
- };
- uni.$TUICallKit = TUICallKit;
- vue.nextTick(() => {
- uni.$TUICallKit.value !== null && uni.$TUICallKit.value.init(options);
- });
- setTimeout(() => {
- handleScrollBottom();
- }, 500);
- });
- vue.onMounted(() => {
- handleShowTime();
- setTimeout(function() {
- uni.$TUIKit.TUIConversationServer.setMessageRead(
- data.conversation.conversationID
- );
- uni.$emit("refreshMsgCount");
- }, 2e3);
- });
- onNavigationBarButtonTap(() => {
- var _a;
- if (((_a = data.conversation) == null ? void 0 : _a.type) === uni.$TIM.TYPES.CONV_GROUP) {
- uni.navigateTo({
- url: "../TUIGroup/index"
- });
- } else {
- uni.showToast({
- title: "暂无信息"
- });
- }
- });
- const handleGetProfile = () => {
- uni.navigateTo({
- url: "../TUIGroup/index"
- });
- };
- const handleShowTime = () => {
- if (messages2.value) {
- Array.from(messages2.value).forEach((item) => {
- if (item.time - data.oldMessageTime > 5 * 60) {
- data.oldMessageTime = item.time;
- item.showTime = true;
- } else {
- item.showTime = false;
- }
- });
- }
- };
- const handleScrollBottom = () => {
- uni.createSelectorQuery().select(".TUI-message-list").boundingClientRect((res) => {
- const scrollH = res.height;
- data.scrollTop = scrollH;
- }).exec();
- };
- const handleCustomerItem = (event, item) => {
- if (item.payload.data == "order") {
- uni.navigateTo({
- url: "/pages_order/inquiryOrderDetails?orderId=" + item.payload.description
- });
- } else if (item.payload.data == "prescribe") {
- var prescribe = JSON.parse(item.payload.extension);
- uni.navigateTo({
- url: "/pages_order/prescribeDetails?prescribeId=" + prescribe.prescribeId
- });
- } else if (item.payload.data == "follow") {
- var follow = JSON.parse(item.payload.extension);
- formatAppLog("log", "at pages/TUIKit/TUIPages/TUIChat/index.vue:365", follow);
- if (follow.writeStatus == 0) {
- uni.navigateTo({
- url: "/pages_user/doFollow?followId=" + follow.followId
- });
- } else if (follow.writeStatus == 1) {
- uni.navigateTo({
- url: "/pages_user/followDetails?followId=" + follow.followId
- });
- }
- } else if (item.payload.data == "report") {
- uni.navigateTo({
- url: "/pages_order/inquiryOrderReport?orderId=" + item.payload.description
- });
- } else if (item.payload.data == "drugReport") {
- uni.navigateTo({
- url: "/pages_user/drugReportDetails?reportId=" + item.payload.description
- });
- }
- };
- const handleScroll = (e) => {
- data.triggered = "restore";
- };
- const handleRefresher = () => {
- data.triggered = true;
- if (!data.isCompleted) {
- TUIServer.getHistoryMessageList().then((res) => {
- data.triggered = false;
- data.isCompleted = res.isCompleted;
- });
- }
- setTimeout(() => {
- data.triggered = false;
- }, 500);
- };
- const handleSend = (emo) => {
- data.text += emo.name;
- };
- const handleItem = (event, item) => {
- const { flow } = item;
- try {
- const query = uni.createSelectorQuery();
- query.select(`#${item.flow + "-" + item.ID}`).boundingClientRect((res) => {
- var _a;
- const { top } = res;
- if (top < 60 + 20) {
- data.dialogPosition = {
- ...data.dialogPosition,
- top: ((_a = res.height) == null ? void 0 : _a.res) + 10
- // 在下面展示弹框 + 10px 间隔
- };
- data.dialogPosition = {
- ...data.dialogPosition,
- right: flow === "out" ? 0 : null,
- // 发出去的消息(弹框 right 都是 0)
- left: flow === "in" ? 0 : null
- // 接收的消息(弹框 left 都是 0)
- };
- } else {
- data.dialogPosition = {
- ...defaultDialogPosition,
- right: flow === "out" ? 0 : null,
- // 发出去的消息(弹框 right 都是 0)
- left: flow === "in" ? 0 : null
- // 接收的消息(弹框 left 都是 0)
- };
- }
- }).exec((res) => {
- data.currentMessage = item;
- data.dialogID = item.ID;
- });
- } catch (error2) {
- data.currentMessage = item;
- data.dialogID = item.ID;
- }
- };
- const handleTouchStart = () => {
- uni.hideKeyboard();
- };
- const handleEdit = (item) => {
- data.text = item.payload.text;
- };
- return {
- ...vue.toRefs(data),
- TUICallKit,
- conversationType,
- messages: messages2,
- handleShowTime,
- handleTouchStart,
- handleRefresher,
- handleScroll,
- handleScrollBottom,
- handleCustomerItem,
- handleItem,
- handleEdit,
- handleTextMessageShowContext,
- handleImageMessageShowContext,
- handleVideoMessageShowContext,
- handleAudioMessageShowContext,
- handleFileMessageShowContext,
- handleFaceMessageShowContext,
- handleLocationMessageShowContext,
- handleMergerMessageShowContext,
- handleTipMessageShowContext,
- handleCustomMessageShowContext,
- handleSend,
- caculateTimeago,
- handleGetProfile
- };
- }
- });
- function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) {
- var _a;
- const _component_MessageTip = vue.resolveComponent("MessageTip");
- const _component_Message_Operate = vue.resolveComponent("Message-Operate");
- const _component_MessageText = vue.resolveComponent("MessageText");
- const _component_MessageImage = vue.resolveComponent("MessageImage");
- const _component_MessageVideo = vue.resolveComponent("MessageVideo");
- const _component_MessageAudio = vue.resolveComponent("MessageAudio");
- const _component_MessageFace = vue.resolveComponent("MessageFace");
- const _component_MessageCustom = vue.resolveComponent("MessageCustom");
- const _component_MessageBubble = vue.resolveComponent("MessageBubble");
- const _component_MessageRevoked = vue.resolveComponent("MessageRevoked");
- const _component_TUIChatInput = vue.resolveComponent("TUIChatInput");
- const _component_MessageSystem = vue.resolveComponent("MessageSystem");
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- null,
- [
- _ctx.conversationType === "chat" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "TUIChat"
- }, [
- ((_a = _ctx.conversation) == null ? void 0 : _a.type) === "GROUP" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "more-btn",
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleGetProfile && _ctx.handleGetProfile(...args))
- }, " 更多")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "TUIChat-container" }, [
- vue.createElementVNode("scroll-view", {
- class: "TUIChat-main",
- "scroll-y": "true",
- "scroll-with-animation": true,
- "refresher-triggered": _ctx.triggered,
- "refresher-enabled": true,
- onRefresherrefresh: _cache[3] || (_cache[3] = (...args) => _ctx.handleRefresher && _ctx.handleRefresher(...args)),
- "scroll-top": _ctx.scrollTop
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "TUI-message-list",
- onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchStart && _ctx.handleTouchStart(...args)),
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.dialogID = "")
- },
- [
- _ctx.isCompleted ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "loading-text"
- }, "没有更多")) : vue.createCommentVNode("v-if", true),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.messages, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: item.ID,
- id: "view" + item.ID
- }, [
- item.showTime ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "time-container"
- },
- vue.toDisplayString(_ctx.caculateTimeago(item.time * 1e3)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- !item.isRevoked && item.type === _ctx.types.MSG_GRP_TIP ? (vue.openBlock(), vue.createBlock(_component_MessageTip, {
- key: 1,
- data: _ctx.handleTipMessageShowContext(item)
- }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(' <MessageTip v-if="item.type === types.MSG_GRP_SYS_NOTICE" /> '),
- !item.isRevoked && item.type !== _ctx.types.MSG_GRP_TIP ? (vue.openBlock(), vue.createBlock(_component_MessageBubble, {
- key: 2,
- data: item
- }, {
- default: vue.withCtx(() => [
- _ctx.dialogID === item.ID ? (vue.openBlock(), vue.createBlock(_component_Message_Operate, {
- key: 0,
- data: item,
- class: "dialog dialog-item",
- style: vue.normalizeStyle({
- top: _ctx.dialogPosition.top + "px",
- right: _ctx.dialogPosition.right + "px",
- left: _ctx.dialogPosition.left + "px"
- })
- }, null, 8, ["data", "style"])) : vue.createCommentVNode("v-if", true),
- item.type === _ctx.types.MSG_TEXT ? (vue.openBlock(), vue.createBlock(_component_MessageText, {
- key: 1,
- id: item.flow + "-" + item.ID,
- data: _ctx.handleTextMessageShowContext(item),
- messageData: item,
- onLongpress: ($event) => _ctx.handleItem($event, item)
- }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
- item.type === _ctx.types.MSG_IMAGE ? (vue.openBlock(), vue.createBlock(_component_MessageImage, {
- key: 2,
- id: item.flow + "-" + item.ID,
- data: _ctx.handleImageMessageShowContext(item),
- messageData: item,
- onLongpress: ($event) => _ctx.handleItem($event, item)
- }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
- item.type === _ctx.types.MSG_VIDEO ? (vue.openBlock(), vue.createBlock(_component_MessageVideo, {
- key: 3,
- id: item.flow + "-" + item.ID,
- data: _ctx.handleVideoMessageShowContext(item),
- messageData: item,
- onLongpress: ($event) => _ctx.handleItem($event, item)
- }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
- item.type === _ctx.types.MSG_AUDIO ? (vue.openBlock(), vue.createBlock(_component_MessageAudio, {
- key: 4,
- id: item.flow + "-" + item.ID,
- data: _ctx.handleAudioMessageShowContext(item),
- messageData: item,
- onLongpress: ($event) => _ctx.handleItem($event, item)
- }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
- item.type === _ctx.types.MSG_FACE ? (vue.openBlock(), vue.createBlock(_component_MessageFace, {
- key: 5,
- id: item.flow + "-" + item.ID,
- data: _ctx.handleFaceMessageShowContext(item),
- messageData: item,
- onLongpress: ($event) => _ctx.handleItem($event, item)
- }, null, 8, ["id", "data", "messageData", "onLongpress"])) : vue.createCommentVNode("v-if", true),
- item.type === _ctx.types.MSG_CUSTOM ? (vue.openBlock(), vue.createBlock(_component_MessageCustom, {
- key: 6,
- id: item.flow + "-" + item.ID,
- data: _ctx.handleCustomMessageShowContext(item),
- messageData: item,
- onClick: ($event) => _ctx.handleCustomerItem($event, item),
- onLongpress: ($event) => _ctx.handleItem($event, item)
- }, null, 8, ["id", "data", "messageData", "onClick", "onLongpress"])) : vue.createCommentVNode("v-if", true)
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["data"])) : vue.createCommentVNode("v-if", true),
- item.isRevoked ? (vue.openBlock(), vue.createBlock(_component_MessageRevoked, {
- key: 3,
- data: item,
- onEdit: ($event) => _ctx.handleEdit(item)
- }, null, 8, ["data", "onEdit"])) : vue.createCommentVNode("v-if", true)
- ], 8, ["id"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 32
- /* NEED_HYDRATION */
- )
- ], 40, ["refresher-triggered", "scroll-top"])
- ]),
- _ctx.imType == 1 || _ctx.imType == 2 ? (vue.openBlock(), vue.createBlock(_component_TUIChatInput, {
- key: 1,
- text: _ctx.text,
- conversationData: _ctx.conversation
- }, null, 8, ["text", "conversationData"])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.conversationType === "system" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "TUIChat"
- }, [
- vue.createVNode(_component_MessageSystem, {
- data: _ctx.messages,
- types: _ctx.types
- }, null, 8, ["data", "types"])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }
- 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"]]);
- const _sfc_main$26 = vue.defineComponent({
- name: "videoPlay",
- setup(props2) {
- const data = vue.reactive({
- videoData: "",
- show: false,
- videoContext: null,
- direction: 0
- });
- onLoad((option) => {
- data.videoData = option && option.videoMessage;
- data.show = true;
- });
- onReady(() => {
- data.videoContext = uni.createVideoContext("videoEle");
- });
- const toggleClose = () => {
- data.show = false;
- uni.navigateBack({
- delta: 1
- });
- };
- return {
- ...vue.toRefs(data),
- toggleClose
- };
- }
- });
- function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "dialog-video" }, [
- _ctx.show ? (vue.openBlock(), vue.createElementBlock("video", {
- key: 0,
- class: "video-box",
- src: _ctx.videoData,
- id: "videoEle",
- controls: "",
- autoplay: ""
- }, [
- 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> ')
- ], 8, ["src"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- let request$e = new Request$1().http;
- function getTestList(data) {
- return request$e("/app/test/getTestList", data, "GET");
- }
- function getTestDetails(data) {
- return request$e("/app/test/getTestDetails", data, "GET");
- }
- function getTestTempDetails(data) {
- return request$e("/app/test/getTestTempDetails", data, "GET");
- }
- function getTestReport(data) {
- return request$e("/app/test/getTestReport", data, "GET");
- }
- function getTestReportImg(data) {
- return request$e("/app/test/getTestReportImg", data, "GET");
- }
- function doReport(data) {
- return request$e("/app/test/doReport", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$25 = {
- mixins: [MescrollMixin],
- data() {
- return {
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- },
- //发送给朋友
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: "健康自测",
- path: "/pages_index/testList",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: "健康自测",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- pageNum: page2.num,
- pageSize: page2.size
- };
- getTestList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "/pages_index/testDetails?tempId=" + item.tempId
- });
- }
- }
- };
- function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/8e52ab17eabc4534b3ce56026fd5c624.jpg" })
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "0rpx",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "test-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "subtitle ellipsis2" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", { class: "people-num" }, [
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(item.peopleNum) + "W",
- 1
- /* TEXT */
- ),
- vue.createTextVNode("人测过")
- ]),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.num) + "题 | " + vue.toDisplayString(item.time) + "分钟",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: item.img,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_indexTestList = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testList.vue"]]);
- const _sfc_main$24 = {
- data() {
- return {
- tempId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.tempId = option.tempId;
- },
- onShow() {
- this.getTestDetails();
- },
- //发送给朋友
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: "健康自测",
- path: "/pages_index/testDetails?tempId=" + this.tempId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: "健康自测",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- navTo(url2) {
- this.$isLogin().then(
- (res) => {
- formatAppLog("log", "at pages_index/testDetails.vue:71", res);
- if (res) {
- uni.navigateTo({
- url: url2
- });
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- },
- getTestDetails() {
- let data = { tempId: this.tempId };
- getTestDetails(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- uni.setNavigationBarTitle({
- title: this.item.name + "自测"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "bg-box" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/71014b69fdcc4b56ae2a84bdc28f11c3.png" }),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.name),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "msg-box" }, [
- vue.createElementVNode(
- "view",
- { class: "msg" },
- vue.toDisplayString($data.item.msg),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.descs
- }, null, 8, ["innerHTML"])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_index/test?tempId=" + $data.item.tempId))
- }, "立即开始测试")
- ]),
- vue.createElementVNode("view", { class: "logo" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b95950e4208c493d8b74ce0de220c65c.png" })
- ])
- ])
- ]);
- }
- const Pages_indexTestDetails = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testDetails.vue"]]);
- const _sfc_main$23 = {
- data() {
- return {
- scrollTop: 0,
- //滚动条位置
- formJson: null,
- tempId: null,
- patient: null,
- items: {},
- msgs: [],
- index: 0,
- item: null
- };
- },
- onLoad(option) {
- this.tempId = option.tempId;
- var that = this;
- uni.$on("refreshOrderPatient", (res) => {
- that.patient = res;
- });
- },
- onShow() {
- this.getTestTempDetails();
- this.getTestDetails();
- },
- //发送给朋友
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: "健康体质检测",
- path: "/pages_index/test?tempId=" + this.tempId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: "健康体质检测",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- getTestDetails() {
- let data = { tempId: this.tempId };
- getTestDetails(data).then(
- (res) => {
- if (res.code == 200) {
- uni.setNavigationBarTitle({
- title: res.data.name + "自测"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- addMsg(type2, content) {
- var msg = { type: type2, content };
- this.msgs.push(msg);
- var that = this;
- uni.createSelectorQuery().select(".msgs").boundingClientRect((res) => {
- const scrollH = res.height;
- that.scrollTop = scrollH;
- formatAppLog("log", "at pages_index/test.vue:185", that.scrollTop);
- }).exec();
- },
- optionClick(item, option) {
- if (this.patient == null) {
- uni.showToast({
- icon: "none",
- title: "请选择体验者"
- });
- return;
- }
- item.option = option.name;
- formatAppLog("log", "at pages_index/test.vue:201", item.option);
- this.addMsg(2, option.name);
- this.index++;
- if (this.index <= this.items.length - 1) {
- this.item = this.items[this.index];
- this.addMsg(1, this.item.title);
- } else {
- this.submit();
- }
- },
- getTestTempDetails() {
- var data = { tempId: this.tempId };
- getTestTempDetails(data).then(
- (res) => {
- if (res.code == 200) {
- this.items = res.items;
- if (this.items.length > 0) {
- this.item = this.items[0];
- this.addMsg(1, this.item.title);
- }
- }
- },
- (err) => {
- }
- );
- },
- addPatient() {
- uni.navigateTo({
- url: "/pages_user/patient"
- });
- },
- submit() {
- var data = {
- tempId: this.tempId,
- patientId: this.patient.patientId,
- formJson: JSON.stringify(this.items)
- };
- doReport(data).then((res) => {
- if (res.code == 200) {
- uni.redirectTo({
- url: "/pages_index/testResult?reportId=" + res.reportId
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- });
- }
- }
- };
- function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "patient-cont" }, [
- vue.createElementVNode("view", { class: "chose-patient" }, [
- $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "patient-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("text", { class: "patient-title" }, "选择体验者"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "value" }, "请点击添加"),
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "patient",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.patient.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "msg-cont" }, [
- vue.createElementVNode("scroll-view", {
- class: "msg-scroll",
- "scroll-top": $data.scrollTop,
- "scroll-y": "true",
- "scroll-with-animation": true
- }, [
- vue.createElementVNode("view", { class: "msgs" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.msgs, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "msg-item" }, [
- item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "left"
- }, [
- vue.createElementVNode("image", {
- class: "img",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5fd36547a3ca4d0b9935e623d3d8e1c5.png"
- }),
- vue.createElementVNode(
- "view",
- { class: "msg-content" },
- vue.toDisplayString(item.content),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "right"
- }, [
- vue.createElementVNode(
- "view",
- { class: "msg-content" },
- vue.toDisplayString(item.content),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "img",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d7d49263e2e04f56a7a86fa7bfd35687.jpg"
- })
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ], 8, ["scroll-top"])
- ]),
- $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "option-cont"
- }, [
- vue.createElementVNode(
- "view",
- { class: "option-title" },
- vue.toDisplayString($data.item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "options" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(JSON.parse($data.item.scoreJson), (option) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "option-item",
- onClick: ($event) => $options.optionClick($data.item, option)
- }, vue.toDisplayString(option.name), 9, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(` <view class="title">\r
- 体质测试以当下感受为准作答,人的体质有可能会随季节变化。 \r
- </view>\r
- <view class="chose-patient">\r
- <view class="patient-box" @click="addPatient()" v-if="patient==null">\r
- <text class="patient-title">选择体验者</text>\r
- <view class="right" >\r
- <image src="/static/images/arrow_gray.png" mode=""></image>\r
- </view>\r
- </view>\r
- <view class="patient" @click="addPatient()" v-if="patient!=null">\r
- <view class="left">\r
- <view class="name">{{patient.patientName}}</view>\r
- <view class="info">\r
- <text class="text" v-if="patient.sex==1">男</text>\r
- <text class="text" v-if="patient.sex==2">女</text>\r
- <text class="text">{{$getAge(patient.birthday)}}岁</text>\r
- <text class="text">{{$parseIdCard(patient.idCard)}}</text>\r
- </view>\r
- </view>\r
- <view class="right" >\r
- <image src="/static/images/arrow_gray.png" mode=""></image>\r
- </view>\r
- </view>\r
- </view>\r
- <view class="items">\r
- <view class="item" v-for="(item,index) in items">\r
- <view class="name">{{index+1}}{{item.title}}?</view>\r
- <view class="options">\r
- <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
- {{option.name}}\r
- </view>\r
- </view>\r
- </view>\r
- \r
- </view>\r
- <view class="btns">\r
- <view class="btn" @click="submit()">提交</view>\r
- </view>\r
- <view class="tips">\r
- <view class="tip-title">提交代表你已接受以下声明</view>\r
- <view class="desc">\r
- 本测试不作为诊断和治疗的依据,对于已经医生确诊的疾病,应按照医嘱积极治疗。所提及的内容仅作为生活保健的咨询建议。如遇不适请及时就医。\r
- </view>\r
- </view> `)
- ]);
- }
- const Pages_indexTest = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/test.vue"]]);
- const _sfc_main$22 = {
- data() {
- return {
- advImgs: [],
- advs: [],
- reportId: null,
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- report: null
- };
- },
- onLoad(option) {
- this.reportId = option.reportId;
- this.getTestReport();
- },
- onShow() {
- this.getAdvList();
- },
- methods: {
- shareImg() {
- var data = { reportId: this.reportId };
- getTestReportImg(data).then(
- (res) => {
- if (res.code == 200) {
- formatAppLog("log", "at pages_index/testResult.vue:80", res);
- wx.downloadFile({
- url: res.img,
- success: (res1) => {
- formatAppLog("log", "at pages_index/testResult.vue:84", res1);
- wx.showShareImageMenu({
- path: res1.tempFilePath
- });
- },
- fail: (res2) => {
- formatAppLog("log", "at pages_index/testResult.vue:90", res2);
- }
- });
- }
- },
- (err) => {
- }
- );
- },
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/testResult.vue:105", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 3
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = res.data;
- that.advs.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advImgs.push(element.imageUrl);
- }
- });
- formatAppLog("log", "at pages_index/testResult.vue:140", that.advImgs);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getTestReport() {
- var data = { reportId: this.reportId };
- getTestReport(data).then(
- (res) => {
- if (res.code == 200) {
- this.report = res.report;
- }
- },
- (err) => {
- }
- );
- },
- goBack() {
- uni.navigateBack();
- }
- }
- };
- function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/8e52ab17eabc4534b3ce56026fd5c624.jpg" })
- ]),
- $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "cont-box"
- }, [
- vue.createElementVNode("view", { class: "user" }, [
- vue.createElementVNode("image", {
- 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
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "user-box" }, [
- vue.createElementVNode(
- "view",
- { class: "sex" },
- "性别 " + vue.toDisplayString(JSON.parse($data.report.patientJson).sex == 1 ? "男" : "女"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "username" },
- "年龄 " + vue.toDisplayString(JSON.parse($data.report.patientJson).age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "items" }, [
- vue.createElementVNode("view", { class: "result-box" }, [
- vue.createElementVNode(
- "view",
- { class: "time" },
- "检测时间 " + vue.toDisplayString($data.report.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "title" },
- "您属于" + vue.toDisplayString($data.report.testResult),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.report.testResult),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <view class="descs">{{report.testResult}}是一种身心和谐的表现,努力保持吧!</view> ')
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(JSON.parse($data.report.conditioningPlanJson), (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString(item.value.replace(/\\n/g, "<br>")),
- 1
- /* TEXT */
- )
- ]),
- index2 < JSON.parse($data.report.conditioningPlanJson).length - 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "tips" }, " 注:报告内容仅供参考,具体情况以医生建议为准 "),
- $data.advImgs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "banner"
- }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", {
- class: "share",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.shareImg())
- }, [
- vue.createElementVNode("text", null, "分享")
- ])
- ]);
- }
- const Pages_indexTestResult = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testResult.vue"]]);
- const _sfc_main$21 = {
- name: "Poster",
- components: {},
- props: {},
- data: function() {
- return {
- url: null
- };
- },
- mounted: function() {
- this.getTestReportImg();
- },
- methods: {
- shareImg: function() {
- wx.downloadFile({
- url: this.url,
- success: (res) => {
- wx.showShareImageMenu({
- path: res.tempFilePath
- });
- }
- });
- },
- getTestReportImg: function() {
- let that = this;
- var data = {
- reportId: this.reportId
- };
- getTestReportImg(data).then(
- (res) => {
- that.url = res.url;
- },
- (err) => {
- uni.showToast({
- title: err.msg,
- icon: "none",
- duration: 2e3
- });
- }
- );
- },
- downloadIamge(imgsrc, name) {
- var that = this;
- this.isDown = true;
- var downloadUrl = imgsrc;
- that.downloadFile(downloadUrl);
- },
- saveImg: function() {
- this.downloadIamge(this.url, "poster");
- },
- downloadFile(url2) {
- formatAppLog("log", "at pages_index/testResultImg.vue:106", url2);
- uni.showLoading({
- title: "图片保存中..."
- });
- uni.downloadFile({
- url: url2,
- fail: function(res) {
- uni.showModal({
- title: "提示",
- content: "保存失败"
- });
- },
- success: function(res) {
- formatAppLog("log", "at pages_index/testResultImg.vue:119", res);
- var tempFilePath = res.tempFilePath;
- uni.saveImageToPhotosAlbum({
- filePath: tempFilePath,
- success: () => {
- uni.showToast({
- title: "保存成功",
- duration: 2e3
- });
- },
- fail: () => {
- formatAppLog("log", "at pages_index/testResultImg.vue:132", "saveImageToPhotosAlbum 失败");
- uni.hideLoading();
- },
- complete: function() {
- uni.hideLoading();
- }
- });
- }
- });
- }
- }
- };
- function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "banenr" }, [
- vue.createElementVNode("image", {
- class: "slide-image",
- src: _ctx.url,
- mode: "widthFix",
- "show-menu-by-longpress": ""
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.shareImg())
- }, "分享好友")
- ])
- ]);
- }
- const Pages_indexTestResultImg = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/testResultImg.vue"]]);
- const _sfc_main$20 = {
- components: { Menu },
- mixins: [MescrollMixin],
- data() {
- return {
- top: null,
- cates: [],
- cateId: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- this.getArticleCateList();
- },
- methods: {
- menuClick(item) {
- this.cateId = item.cateId;
- this.mescroll.resetUpScroll();
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- getArticleCateList() {
- var that = this;
- let data = {};
- getArticleCateList$1(data).then(
- (res) => {
- if (res.code == 200) {
- this.cates = res.data;
- var query = uni.createSelectorQuery().in(that);
- setTimeout(function() {
- query.select(".top-content").boundingClientRect((data2) => {
- if (data2) {
- formatAppLog("log", "at pages_index/articleList.vue:104", "View height:", data2.height + "px");
- that.top = data2.height + "px";
- }
- }).exec();
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- cateId: this.cateId,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getArticleList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 关键词选择
- choseCate(item) {
- this.cateId = item.cateId;
- this.mescroll.resetUpScroll();
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./articleDetails?articleId=" + item.articleId
- });
- }
- }
- };
- function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_Menu = vue.resolveComponent("Menu");
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
- key: 0,
- list: $data.cates,
- onMenuClick: $options.menuClick,
- style: { "width": "100%" }
- }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 关键字列表 "),
- vue.createCommentVNode(` <view class="inner">\r
- <view v-for="(item,index) in cates" :key="index" :class="cateId == item.cateId?'item active':'item'" @click="choseCate(item)">\r
- <image class="icon" :src="item.imgUrl"></image>\r
- <view class="title" >{{item.cateName}} </view>\r
- </view>\r
- </view> `)
- ])
- ]),
- $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
- key: 0,
- top: $data.top,
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "article-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", { class: "readers" }, [
- vue.createElementVNode("view", { class: "readings" }, [
- vue.createElementVNode("image", {
- class: "eye",
- src: "/static/images/eye.png"
- }),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(item.views),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.publishTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: item.imageUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["top", "onInit", "onDown", "onUp", "down", "up"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const Pages_indexArticleList = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/articleList.vue"]]);
- const _sfc_main$1$ = {
- data() {
- return {
- articleId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.articleId = option.articleId;
- },
- onShow() {
- this.getArticleById();
- },
- //发送给朋友
- onShareAppMessage(res) {
- return {
- title: this.item.title,
- path: "/pages_index/articleDetails?articleId=" + this.articleId
- };
- },
- //分享到朋友圈
- onShareTimeline(res) {
- return {
- title: this.item.title,
- query: "articleId=" + this.articleId
- //页面参数
- };
- },
- methods: {
- getArticleById() {
- let data = { articleId: this.articleId };
- getArticleById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode(
- "view",
- { class: "reads" },
- "阅读数:" + vue.toDisplayString($data.item.views),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString($data.item.publishTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(" 正文 "),
- vue.createElementVNode("view", { class: "full-text" }, [
- vue.createElementVNode("view", {
- innerHTML: $data.item.contents
- }, null, 8, ["innerHTML"])
- ])
- ]),
- vue.createCommentVNode(" 咨询按钮 "),
- vue.createElementVNode("view", { class: "inquiry" }, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("image", {
- src: "/static/images/consult.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "咨询"),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- })
- ])
- ])
- ]);
- }
- const Pages_indexArticleDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/articleDetails.vue"]]);
- let request$d = new Request$1().http;
- function getDiseaseList(data) {
- return request$d("/app/disease/getDiseaseList", data, "GET");
- }
- function getDiseaseById(data) {
- return request$d("/app/disease/getDiseaseById", data, "GET");
- }
- const _sfc_main$1_ = {
- mixins: [MescrollMixin],
- data() {
- return {
- depts: [],
- deptId: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- this.getDepartmentList();
- },
- methods: {
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- getDepartmentList() {
- let data = {};
- getDepartmentList(data).then(
- (res) => {
- if (res.code == 200) {
- this.depts = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- deptId: this.deptId,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getDiseaseList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- choseDept(item) {
- this.deptId = item.deptId;
- this.mescroll.resetUpScroll();
- },
- showDetail(item) {
- uni.navigateTo({
- url: "./diseaseDetails?diseaseId=" + item.diseaseId
- });
- }
- }
- };
- function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "dept-list" }, [
- vue.createCommentVNode(" 关键字列表 "),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.depts, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.deptId == item.deptId ? "item active" : "item"),
- onClick: ($event) => $options.choseDept(item)
- }, vue.toDisplayString(item.deptName), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "192rpx",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "disease-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis1" },
- vue.toDisplayString(item.diseaseName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_indexDiseaseList = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/diseaseList.vue"]]);
- const _sfc_main$1Z = {
- data() {
- return {
- advs: [],
- advImgs: [],
- diseaseId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.diseaseId = option.diseaseId;
- },
- onShow() {
- this.getAdvList();
- this.getDiseaseById();
- },
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: this.item.diseaseName,
- path: "/pages_index/diseaseDetails?id=" + this.diseaseId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.diseaseName,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/diseaseDetails.vue:79", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 7
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getDiseaseById() {
- let data = { diseaseId: this.diseaseId };
- getDiseaseById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "疾病名称")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.diseaseName
- }, null, 8, ["innerHTML"]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "病情症状")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.symptom
- }, null, 8, ["innerHTML"]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "病情诊断")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.diagnose
- }, null, 8, ["innerHTML"]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "相关检验")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.inspect
- }, null, 8, ["innerHTML"])
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ])) : vue.createCommentVNode("v-if", true);
- }
- const Pages_indexDiseaseDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/diseaseDetails.vue"]]);
- let request$c = new Request$1().http;
- function getHospitalList(data) {
- return request$c("/app/hospital/getHospitalList", data, "GET");
- }
- function getHospitalById(data) {
- return request$c("/app/hospital/getHospitalById", data, "GET");
- }
- const _sfc_main$1Y = {
- mixins: [MescrollMixin],
- data() {
- return {
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- },
- methods: {
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getHospitalList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./hospitalDetails?hospitalId=" + item.hospitalId
- });
- }
- }
- };
- function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "hos-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl,
- mode: "aspectFit"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title one-t" },
- vue.toDisplayString(item.hospitalName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- vue.createElementVNode("text", { class: "tag" }, "二甲"),
- vue.createElementVNode("text", { class: "tag" }, "综合医院")
- ]),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.createElementVNode("view", { class: "address-left" }, [
- vue.createElementVNode(
- "view",
- { class: "address one-t" },
- vue.toDisplayString(item.address),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "address-right" }, [
- vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_indexHospitalList = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/hospitalList.vue"]]);
- const _sfc_main$1X = {
- data() {
- return {
- hospitalId: null,
- hospital: null,
- doctors: []
- };
- },
- onLoad(options) {
- this.hospitalId = options.hospitalId;
- this.getHospitalById();
- this.getDoctorList();
- },
- methods: {
- goMap() {
- uni.openLocation({
- latitude: parseFloat(this.hospital.lat),
- longitude: parseFloat(this.hospital.lng),
- scale: 18,
- name: this.hospital.hospitalName,
- address: this.hospital.address,
- success: () => {
- formatAppLog("log", "at pages_index/hospitalDetails.vue:113", "导航success");
- }
- });
- },
- getHospitalById() {
- var data = {
- hospitalId: this.hospitalId
- };
- getHospitalById(data).then((res) => {
- if (res.code == 200) {
- this.hospital = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getDoctorList() {
- var data = {
- hospitalId: this.hospitalId,
- pageNum: 1,
- pageSize: 10
- };
- getDoctorList(data).then((res) => {
- if (res.code == 200) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.prices = JSON.parse(value2.priceJson);
- });
- this.doctors = res.data.list;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "hos-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.hospital.imgUrl,
- mode: "aspectFit"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "hos-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "hos-name" },
- vue.toDisplayString($data.hospital.hospitalName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "hos-desc-box" },
- vue.toDisplayString($data.hospital.hospitalType),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "hos-address-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.goMap())
- }, [
- vue.createElementVNode("view", { class: "address-left" }, [
- vue.createElementVNode(
- "view",
- { class: "address one-t" },
- vue.toDisplayString($data.hospital.address),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "address-right" }, [
- vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "医院介绍")
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.hospital.descs),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doctor-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "医院专家")
- ]),
- $data.doctors.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "doctors"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.doctors, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + item.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position" },
- vue.toDisplayString(item.position),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "hospital" },
- vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-spec" }, [
- vue.createElementVNode("view", { class: "title" }, "擅长:"),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis" },
- vue.toDisplayString(item.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-ping" }, [
- vue.createElementVNode(
- "view",
- { class: "ping" },
- "好评率:" + vue.toDisplayString(item.pingStar) + "%",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- "咨询量:" + vue.toDisplayString(item.orderNumber),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-price" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createTextVNode("¥ "),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.prices, (price, index3) => {
- return vue.openBlock(), vue.createElementBlock("text", null, [
- vue.createTextVNode(
- vue.toDisplayString(price.price.toFixed(2)) + " ",
- 1
- /* TEXT */
- ),
- index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "btn" }, " 咨询医生 ")
- ])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$1W = {
- data() {
- return {
- searchHistory: [],
- searchKey: "",
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight
- };
- },
- onLoad() {
- this.searchHistory = this.$getHisSearch();
- },
- methods: {
- clearHistory() {
- this.$clearHisSearch();
- this.searchHistory = this.$getHisSearch();
- },
- back() {
- uni.navigateBack({
- delta: 1
- });
- },
- goSearchList(key) {
- uni.navigateTo({
- url: "/pages_doctor/doctorList?keyword=" + key
- });
- },
- toSearchList() {
- if (this.searchKey != "") {
- this.$addHisSearch(this.searchKey);
- }
- uni.navigateTo({
- url: "/pages_doctor/doctorList?keyword=" + this.searchKey
- });
- }
- }
- };
- function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-cont" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "back",
- src: "/static/images/icon_back_b.png",
- mode: "heightFix",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.back())
- }),
- vue.createElementVNode("view", { class: "screen-box" }, [
- vue.createElementVNode("image", {
- class: "search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.searchKey = $event),
- placeholder: "搜索医生/疾病/知识",
- onConfirm: _cache[2] || (_cache[2] = ($event) => $options.toSearchList($data.searchKey)),
- "placeholder-style": "font-size:26rpx;color:#DADADA;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.searchKey]
- ]),
- vue.createElementVNode("text", {
- class: "text",
- onClick: _cache[3] || (_cache[3] = (...args) => $options.toSearchList && $options.toSearchList(...args))
- }, "搜索")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cont-inner" }, [
- vue.createCommentVNode(" 搜索历史 "),
- vue.createElementVNode("view", { class: "search-info" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title" }, "搜索历史"),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.clearHistory())
- }, "清除搜索历史")
- ]),
- vue.createElementVNode("view", { class: "search-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.searchHistory, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.goSearchList(item),
- key: index2,
- class: "item ellipsis"
- }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(item),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(' <view class="item ellipsis">\r\n <text class="text">名字很长很长很长很长很长很长很长很长</text>\r\n </view> ')
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const props$m = {
- props: {
- // 是否显示圆点
- isDot: {
- type: Boolean,
- default: props$y.badge.isDot
- },
- // 显示的内容
- value: {
- type: [Number, String],
- default: props$y.badge.value
- },
- // 显示的内容
- modelValue: {
- type: [Number, String],
- default: props$y.badge.modelValue
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$y.badge.show
- },
- // 最大值,超过最大值会显示 '{max}+'
- max: {
- type: [Number, String],
- default: props$y.badge.max
- },
- // 主题类型,error|warning|success|primary
- type: {
- type: String,
- default: props$y.badge.type
- },
- // 当数值为 0 时,是否展示 Badge
- showZero: {
- type: Boolean,
- default: props$y.badge.showZero
- },
- // 背景颜色,优先级比type高,如设置,type参数会失效
- bgColor: {
- type: [String, null],
- default: props$y.badge.bgColor
- },
- // 字体颜色
- color: {
- type: [String, null],
- default: props$y.badge.color
- },
- // 徽标形状,circle-四角均为圆角,horn-左下角为直角
- shape: {
- type: String,
- default: props$y.badge.shape
- },
- // 设置数字的显示方式,overflow|ellipsis|limit
- // overflow会根据max字段判断,超出显示`${max}+`
- // ellipsis会根据max判断,超出显示`${max}...`
- // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
- numberType: {
- type: String,
- default: props$y.badge.numberType
- },
- // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
- offset: {
- type: Array,
- default: props$y.badge.offset
- },
- // 是否反转背景和字体颜色
- inverted: {
- type: Boolean,
- default: props$y.badge.inverted
- },
- // 是否绝对定位
- absolute: {
- type: Boolean,
- default: props$y.badge.absolute
- }
- }
- };
- const _sfc_main$1V = {
- name: "u-badge",
- mixins: [mpMixin, props$m, mixin],
- computed: {
- // 是否将badge中心与父组件右上角重合
- boxStyle() {
- let style = {};
- return style;
- },
- // 整个组件的样式
- badgeStyle() {
- const style = {};
- if (this.color) {
- style.color = this.color;
- }
- if (this.bgColor && !this.inverted) {
- style.backgroundColor = this.bgColor;
- }
- if (this.absolute) {
- style.position = "absolute";
- if (this.offset.length) {
- const top = this.offset[0];
- const right = this.offset[1] || top;
- style.top = uni.$u.addUnit(top);
- style.right = uni.$u.addUnit(right);
- }
- }
- return style;
- },
- showValue() {
- switch (this.numberType) {
- case "overflow":
- return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
- case "ellipsis":
- return Number(this.value) > Number(this.max) ? "..." : this.value;
- case "limit":
- return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value;
- default:
- return Number(this.value);
- }
- }
- }
- };
- function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass([[_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), $options.badgeStyle])
- },
- vue.toDisplayString(_ctx.isDot ? "" : $options.showValue),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_0$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"]]);
- const props$l = {
- props: {
- // 滑块的移动过渡时间,单位ms
- duration: {
- type: Number,
- default: props$y.tabs.duration
- },
- // tabs标签数组
- list: {
- type: Array,
- default: props$y.tabs.list
- },
- // 滑块颜色
- lineColor: {
- type: String,
- default: props$y.tabs.lineColor
- },
- // 菜单选择中时的样式
- activeStyle: {
- type: [String, Object],
- default: props$y.tabs.activeStyle
- },
- // 菜单非选中时的样式
- inactiveStyle: {
- type: [String, Object],
- default: props$y.tabs.inactiveStyle
- },
- // 滑块长度
- lineWidth: {
- type: [String, Number],
- default: props$y.tabs.lineWidth
- },
- // 滑块高度
- lineHeight: {
- type: [String, Number],
- default: props$y.tabs.lineHeight
- },
- // 滑块背景显示大小,当滑块背景设置为图片时使用
- lineBgSize: {
- type: String,
- default: props$y.tabs.lineBgSize
- },
- // 菜单item的样式
- itemStyle: {
- type: [String, Object],
- default: props$y.tabs.itemStyle
- },
- // 菜单是否可滚动
- scrollable: {
- type: Boolean,
- default: props$y.tabs.scrollable
- },
- // 当前选中标签的索引
- current: {
- type: [Number, String],
- default: props$y.tabs.current
- },
- // 默认读取的键名
- keyName: {
- type: String,
- default: props$y.tabs.keyName
- }
- }
- };
- const _sfc_main$1U = {
- name: "u-tabs",
- mixins: [mpMixin, mixin, props$l],
- data() {
- return {
- firstTime: true,
- scrollLeft: 0,
- scrollViewWidth: 0,
- lineOffsetLeft: 0,
- tabsRect: {
- left: 0
- },
- innerCurrent: 0,
- moving: false
- };
- },
- watch: {
- current: {
- immediate: true,
- handler(newValue, oldValue) {
- if (newValue !== this.innerCurrent) {
- this.innerCurrent = newValue;
- this.$nextTick(() => {
- this.resize();
- });
- }
- }
- },
- // list变化时,重新渲染list各项信息
- list() {
- this.$nextTick(() => {
- this.resize();
- });
- }
- },
- computed: {
- textStyle() {
- return (index2) => {
- const style = {};
- const customeStyle = index2 === this.innerCurrent ? uni.$u.addStyle(this.activeStyle) : uni.$u.addStyle(
- this.inactiveStyle
- );
- if (this.list[index2].disabled) {
- style.color = "#c8c9cc";
- }
- return uni.$u.deepMerge(customeStyle, style);
- };
- },
- propsBadge() {
- return uni.$u.props.badge;
- }
- },
- async mounted() {
- this.init();
- },
- emits: ["click", "change"],
- methods: {
- setLineLeft() {
- const tabItem = this.list[this.innerCurrent];
- if (!tabItem) {
- return;
- }
- let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
- const lineWidth = uni.$u.getPx(this.lineWidth);
- this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
- if (this.firstTime) {
- setTimeout(() => {
- this.firstTime = false;
- }, 10);
- }
- },
- // nvue下设置滑块的位置
- animation(x, duration = 0) {
- },
- // 点击某一个标签
- clickHandler(item, index2) {
- this.$emit("click", {
- ...item,
- index: index2
- });
- if (item.disabled)
- return;
- this.innerCurrent = index2;
- this.resize();
- this.$emit("change", {
- ...item,
- index: index2
- });
- },
- init() {
- uni.$u.sleep().then(() => {
- this.resize();
- });
- },
- setScrollLeft() {
- const tabRect = this.list[this.innerCurrent];
- const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
- return total + curr.rect.width;
- }, 0);
- const windowWidth2 = uni.$u.sys().windowWidth;
- let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth2 - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
- scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
- this.scrollLeft = Math.max(0, scrollLeft);
- },
- // 获取所有标签的尺寸
- resize() {
- if (this.list.length === 0) {
- return;
- }
- Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => {
- this.tabsRect = tabsRect;
- this.scrollViewWidth = 0;
- itemRect.map((item, index2) => {
- this.scrollViewWidth += item.width;
- this.list[index2].rect = item;
- });
- this.setLineLeft();
- this.setScrollLeft();
- });
- },
- // 获取导航菜单的尺寸
- getTabsRect() {
- return new Promise((resolve) => {
- this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
- });
- },
- // 获取所有标签的尺寸
- getAllItemRect() {
- return new Promise((resolve) => {
- const promiseAllArr = this.list.map((item, index2) => this.queryRect(
- `u-tabs__wrapper__nav__item-${index2}`,
- true
- ));
- Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
- });
- },
- // 获取各个标签的尺寸
- queryRect(el, item) {
- return new Promise((resolve) => {
- this.$uGetRect(`.${el}`).then((size) => {
- resolve(size);
- });
- });
- }
- }
- };
- function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$8);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
- vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
- vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
- vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
- vue.createElementVNode("scroll-view", {
- "scroll-x": _ctx.scrollable,
- "scroll-left": $data.scrollLeft,
- "scroll-with-animation": "",
- class: "u-tabs__wrapper__scroll-view",
- "show-scrollbar": false,
- ref: "u-tabs__wrapper__scroll-view"
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-tabs__wrapper__nav",
- ref: "u-tabs__wrapper__nav"
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.list, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [`u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled"]]),
- key: index2,
- onClick: ($event) => $options.clickHandler(item, index2),
- ref_for: true,
- ref: `u-tabs__wrapper__nav__item-${index2}`,
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }])
- }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
- style: vue.normalizeStyle([$options.textStyle(index2)])
- },
- vue.toDisplayString(item[_ctx.keyName]),
- 7
- /* TEXT, CLASS, STYLE */
- ),
- vue.createVNode(_component_u_badge, {
- show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)),
- isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot,
- value: item.badge && item.badge.value || $options.propsBadge.value,
- max: item.badge && item.badge.max || $options.propsBadge.max,
- type: item.badge && item.badge.type || $options.propsBadge.type,
- showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero,
- bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor,
- color: item.badge && item.badge.color || $options.propsBadge.color,
- shape: item.badge && item.badge.shape || $options.propsBadge.shape,
- numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType,
- inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted,
- customStyle: "margin-left: 4px;"
- }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"])
- ], 14, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode(
- "view",
- {
- class: "u-tabs__wrapper__nav__line",
- ref: "u-tabs__wrapper__nav__line",
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.lineWidth),
- transform: `translate(${$data.lineOffsetLeft}px)`,
- transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`,
- height: _ctx.$u.addUnit(_ctx.lineHeight),
- background: _ctx.lineColor,
- backgroundSize: _ctx.lineBgSize
- }])
- },
- null,
- 4
- /* STYLE */
- )
- ],
- 512
- /* NEED_PATCH */
- )
- ], 8, ["scroll-x", "scroll-left"])
- ]),
- vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
- ])
- ]);
- }
- const __easycom_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"]]);
- let request$b = new Request$1().http;
- function getFamousPrescribeList(data) {
- return request$b("/app/index/getFamousPrescribeList", data, "GET");
- }
- function getFamousPrescribeById(data) {
- return request$b("/app/index/getFamousPrescribeById", data, "GET");
- }
- function getQuestionsList(data) {
- return request$b("/app/index/getQuestionsList", data, "GET");
- }
- function getQuestionsById(data) {
- return request$b("/app/index/getQuestionsById", data, "GET");
- }
- function getMedicatedFoodList(data) {
- return request$b("/app/index/getMedicatedFoodList", data, "GET");
- }
- function getMedicatedFoodById(data) {
- return request$b("/app/index/getMedicatedFoodById", data, "GET");
- }
- function getVesselList(data) {
- return request$b("/app/index/getVesselList", data, "GET");
- }
- function getVesselById(data) {
- return request$b("/app/index/getVesselById", data, "GET");
- }
- function getChineseMedicineList(data) {
- return request$b("/app/index/getChineseMedicineList", data, "GET");
- }
- function getChineseMedicineById(data) {
- return request$b("/app/index/getChineseMedicineById", data, "GET");
- }
- const _sfc_main$1T = {
- data() {
- return {
- tabIndex: 1,
- indication: "",
- belongBook: "",
- title: "",
- prescribeType: 0,
- pageNum: 1,
- pageSize: 20,
- typeOptions: [],
- bookOptions: [],
- indicationOptions: [],
- tabs: [
- { name: "按类型", id: "1" },
- { name: "按疾病", id: "2" },
- { name: "按书籍", id: "3" }
- ],
- keyword: "",
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_famous_prescribe_type");
- this.getDictByKey("sys_famous_prescribe_indication");
- this.getDictByKey("sys_famous_prescribe_book");
- },
- methods: {
- scrolltolower(e) {
- this.pageNum++;
- this.getFamousPrescribeList();
- formatAppLog("log", "at pages_index/famousPrescribeList.vue:91", e);
- },
- typeClick(item) {
- this.indication = "";
- this.belongBook = "";
- this.prescribeType = parseInt(item.dictValue);
- formatAppLog("log", "at pages_index/famousPrescribeList.vue:97", this.prescribeType);
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getFamousPrescribeList();
- },
- bookClick(item) {
- this.indication = "";
- this.prescribeType = 0;
- this.belongBook = item.dictLabel;
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getFamousPrescribeList();
- },
- indicationClick(item) {
- formatAppLog("log", "at pages_index/famousPrescribeList.vue:111", item);
- this.belongBook = "";
- this.prescribeType = 0;
- this.indication = item.dictLabel;
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getFamousPrescribeList();
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_famous_prescribe_type") {
- this.typeOptions = res.data;
- if (this.typeOptions != null && this.typeOptions.length > 0) {
- this.typeClick(this.typeOptions[0]);
- }
- }
- if (key == "sys_famous_prescribe_indication") {
- this.indicationOptions = res.data;
- }
- if (key == "sys_famous_prescribe_book") {
- this.bookOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- tabChange(item) {
- this.tabIndex = item.id;
- this.getFamousPrescribeList();
- },
- doSearch() {
- this.pageNum = 1;
- this.getFamousPrescribeList();
- },
- getFamousPrescribeList() {
- var that = this;
- var data = {
- indication: this.indication,
- belongBook: this.belongBook,
- prescribeType: this.prescribeType,
- keyword: this.keyword,
- pageNum: this.pageNum,
- pageSize: this.pageSize
- };
- getFamousPrescribeList(data).then((res) => {
- if (res.code == 200) {
- if (this.pageNum == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = [];
- }
- });
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./famousPrescribeDetails?id=" + item.id
- });
- }
- }
- };
- function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "tabs" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ])
- ]),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "items" }, [
- $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.typeOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.typeClick(item),
- class: vue.normalizeClass(item.dictValue == $data.prescribeType ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictValue == $data.prescribeType ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList($data.indicationOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.indicationClick(item),
- class: vue.normalizeClass(item.dictLabel == $data.indication ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictLabel == $data.indication ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 3 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- vue.renderList($data.bookOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.bookClick(item),
- class: vue.normalizeClass(item.dictLabel == $data.belongBook ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictLabel == $data.belongBook ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "scroll-view",
- {
- onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
- "scroll-y": "true",
- style: { "height": "calc(100vh - 180rpx)" }
- },
- [
- vue.createElementVNode("view", { class: "items" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "r-item",
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode(
- "view",
- { class: "r-left" },
- vue.toDisplayString(item.prescribeName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "r-right" }, [
- vue.createElementVNode("image", { src: "/static/images/fire.png" })
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ])
- ])
- ]);
- }
- const Pages_indexFamousPrescribeList = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/famousPrescribeList.vue"]]);
- const _sfc_main$1S = {
- data() {
- return {
- advs: [],
- advImgs: [],
- tabIndex: 1,
- id: null,
- item: {}
- };
- },
- onLoad(option) {
- this.id = option.id;
- },
- onShow() {
- this.getAdvList();
- this.getFamousPrescribeById();
- },
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: this.item.prescribeName,
- path: "/pages_index/famousPrescribeDetails?id=" + this.id,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.title,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/famousPrescribeDetails.vue:95", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 9
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- tabClick(index2) {
- this.tabIndex = index2;
- },
- getFamousPrescribeById() {
- let data = { id: this.id };
- getFamousPrescribeById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createElementVNode("view", { class: "image" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: $data.item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.prescribeName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "title-py" },
- vue.toDisplayString($data.item.pinyin),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.item.actionTitle),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "line-h" }),
- vue.createElementVNode("view", { class: "tabs" }, [
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[0] || (_cache[0] = ($event) => $options.tabClick(1)),
- class: vue.normalizeClass($data.tabIndex == 1 ? "tab1 active" : "tab1")
- },
- " 基本用法 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[1] || (_cache[1] = ($event) => $options.tabClick(2)),
- class: vue.normalizeClass($data.tabIndex == 2 ? "tab2 active" : "tab2")
- },
- " 药物作用 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[2] || (_cache[2] = ($event) => $options.tabClick(3)),
- class: vue.normalizeClass($data.tabIndex == 3 ? "tab3 active" : "tab3")
- },
- " 用药方法 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[3] || (_cache[3] = ($event) => $options.tabClick(4)),
- class: vue.normalizeClass($data.tabIndex == 4 ? "tab4 active" : "tab4")
- },
- " 注意事项 ",
- 2
- /* CLASS */
- )
- ]),
- $data.tabIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content",
- innerHTML: $data.item.descs
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "content",
- innerHTML: $data.item.action
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "content",
- innerHTML: $data.item.usageMethod
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "content",
- innerHTML: $data.item.msg
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ])) : vue.createCommentVNode("v-if", true);
- }
- const Pages_indexFamousPrescribeDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/famousPrescribeDetails.vue"]]);
- const _sfc_main$1R = {
- data() {
- return {
- tabIndex: 1,
- vessel: "",
- region: "",
- title: "",
- pageNum: 1,
- pageSize: 20,
- vesselOptions: [],
- regionOptions: [],
- tabs: [
- { name: "按经络查询", id: "1" },
- { name: "按部位查询", id: "2" }
- ],
- keyword: "",
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_vessel");
- this.getDictByKey("sys_vessel_region");
- this.getVesselList();
- },
- methods: {
- scrolltolower(e) {
- this.pageNum++;
- this.getVesselList();
- formatAppLog("log", "at pages_index/vesselList.vue:85", e);
- },
- regionClick(item) {
- this.vessel = "";
- this.region = item.dictLabel;
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getVesselList();
- },
- vesselClick(item) {
- this.region = "";
- this.vessel = item.dictLabel;
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getVesselList();
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_vessel") {
- this.vesselOptions = res.data;
- }
- if (key == "sys_vessel_region") {
- this.regionOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- tabChange(item) {
- this.tabIndex = item.id;
- this.getVesselList();
- },
- doSearch() {
- this.pageNum = 1;
- this.getVesselList();
- },
- getVesselList() {
- var that = this;
- var data = {
- vessel: this.vessel,
- region: this.region,
- keyword: this.keyword,
- pageNum: this.pageNum,
- pageSize: this.pageSize
- };
- getVesselList(data).then((res) => {
- if (res.code == 200) {
- if (this.pageNum == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = [];
- }
- });
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./vesselDetails?id=" + item.id
- });
- }
- }
- };
- function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "tabs" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ])
- ]),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "items" }, [
- $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.vesselOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.vesselClick(item),
- class: vue.normalizeClass(item.dictValue == $data.vessel ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictValue == $data.vessel ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList($data.regionOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.regionClick(item),
- class: vue.normalizeClass(item.dictLabel == $data.region ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictLabel == $data.region ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "scroll-view",
- {
- onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
- "scroll-y": "true",
- style: { "height": "calc(100vh - 180rpx)" }
- },
- [
- vue.createElementVNode("view", { class: "items" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "r-item",
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode(
- "view",
- { class: "r-left" },
- vue.toDisplayString(item.vesselName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "r-right" }, [
- vue.createElementVNode("image", { src: "/static/images/fire.png" })
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ])
- ])
- ]);
- }
- const Pages_indexVesselList = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/vesselList.vue"]]);
- const _sfc_main$1Q = {
- data() {
- return {
- advs: [],
- advImgs: [],
- tabIndex: 1,
- item: {}
- };
- },
- onLoad(option) {
- this.id = option.id;
- },
- onShow() {
- this.getAdvList();
- this.getVesselById();
- },
- //发送给朋友
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: this.item.vesselName,
- path: "/pages_index/vesselDetails?id=" + this.id,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.vesselName,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/vesselDetails.vue:75", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 5
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getVesselById() {
- let data = { id: this.id };
- getVesselById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createElementVNode("view", { class: "image" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: $data.item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.vesselName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "title-py" },
- vue.toDisplayString($data.item.pinyin),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.item.actionTitle),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "line-h" }),
- vue.createElementVNode("view", {
- class: "content",
- innerHTML: $data.item.descs
- }, null, 8, ["innerHTML"])
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ])) : vue.createCommentVNode("v-if", true);
- }
- const Pages_indexVesselDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/vesselDetails.vue"]]);
- const _sfc_main$1P = {
- data() {
- return {
- tabIndex: 1,
- indication: "",
- flavor: "",
- vessel: "",
- title: "",
- pageNum: 1,
- pageSize: 20,
- flavorOptions: [],
- indicationOptions: [],
- tabs: [
- { name: "按五味", id: "1" },
- { name: "按疾病", id: "2" }
- ],
- keyword: "",
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_chinese_medicine_flavor");
- this.getDictByKey("sys_indication");
- this.getChineseMedicineList();
- },
- methods: {
- scrolltolower(e) {
- this.pageNum++;
- this.getChineseMedicineList();
- formatAppLog("log", "at pages_index/chineseMedicineList.vue:83", e);
- },
- indicationClick(item) {
- this.flavor = "";
- this.indication = item.dictLabel;
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getChineseMedicineList();
- },
- flavorClick(item) {
- formatAppLog("log", "at pages_index/chineseMedicineList.vue:93", item);
- this.indication = "";
- this.flavor = item.dictLabel;
- this.title = item.dictLabel;
- this.pageNum = 1;
- this.getChineseMedicineList();
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_indication") {
- this.indicationOptions = res.data;
- }
- if (key == "sys_chinese_medicine_flavor") {
- this.flavorOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- tabChange(item) {
- this.tabIndex = item.id;
- this.getChineseMedicineList();
- },
- doSearch() {
- this.pageNum = 1;
- this.getChineseMedicineList();
- },
- getChineseMedicineList() {
- var that = this;
- var data = {
- indication: this.indication,
- flavor: this.flavor,
- vessel: this.vessel,
- keyword: this.keyword,
- pageNum: this.pageNum,
- pageSize: this.pageSize
- };
- getChineseMedicineList(data).then((res) => {
- if (res.code == 200) {
- if (this.pageNum == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = [];
- }
- });
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./chineseMedicineDetails?id=" + item.id
- });
- }
- }
- };
- function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "tabs" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ])
- ]),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "items" }, [
- $data.tabIndex == 1 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.flavorOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.flavorClick(item),
- class: vue.normalizeClass(item.dictValue == $data.flavor ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictValue == $data.flavor ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 2 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList($data.indicationOptions, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.indicationClick(item),
- class: vue.normalizeClass(item.dictLabel == $data.indication ? "item ellipsis active" : "item ellipsis")
- }, [
- item.dictLabel == $data.indication ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "line"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(_ctx.$parseText(item.dictLabel, 4)),
- 1
- /* TEXT */
- )
- ], 10, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "scroll-view",
- {
- onScrolltolower: _cache[2] || (_cache[2] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)),
- "scroll-y": "true",
- style: { "height": "calc(100vh - 180rpx)" }
- },
- [
- vue.createElementVNode("view", { class: "items" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "r-item",
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode(
- "view",
- { class: "r-left" },
- vue.toDisplayString(item.medicineName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "r-right" }, [
- vue.createElementVNode("image", { src: "/static/images/fire.png" })
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ])
- ])
- ]);
- }
- const Pages_indexChineseMedicineList = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/chineseMedicineList.vue"]]);
- const _sfc_main$1O = {
- data() {
- return {
- advs: [],
- advImgs: [],
- tabIndex: 1,
- articleId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.id = option.id;
- },
- onShow() {
- this.getChineseMedicineById();
- this.getAdvList();
- },
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: this.item.medicineName,
- path: "/pages_index/chineseMedicineDetails?id=" + this.id,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.title,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/chineseMedicineDetails.vue:95", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 8
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- tabClick(index2) {
- this.tabIndex = index2;
- },
- getChineseMedicineById() {
- let data = { id: this.id };
- getChineseMedicineById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createElementVNode("view", { class: "image" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: $data.item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.medicineName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "title-py" },
- vue.toDisplayString($data.item.pinyin),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.item.actionTitle),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "line-h" }),
- vue.createElementVNode("view", { class: "tabs" }, [
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[0] || (_cache[0] = ($event) => $options.tabClick(1)),
- class: vue.normalizeClass($data.tabIndex == 1 ? "tab1 active" : "tab1")
- },
- " 基本用法 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[1] || (_cache[1] = ($event) => $options.tabClick(2)),
- class: vue.normalizeClass($data.tabIndex == 2 ? "tab2 active" : "tab2")
- },
- " 药物作用 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[2] || (_cache[2] = ($event) => $options.tabClick(3)),
- class: vue.normalizeClass($data.tabIndex == 3 ? "tab3 active" : "tab3")
- },
- " 用药方法 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- onClick: _cache[3] || (_cache[3] = ($event) => $options.tabClick(4)),
- class: vue.normalizeClass($data.tabIndex == 4 ? "tab4 active" : "tab4")
- },
- " 注意事项 ",
- 2
- /* CLASS */
- )
- ]),
- $data.tabIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content",
- innerHTML: $data.item.descs
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "content",
- innerHTML: $data.item.action
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "content",
- innerHTML: $data.item.usageMethod
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true),
- $data.tabIndex == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "content",
- innerHTML: $data.item.msg
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ])) : vue.createCommentVNode("v-if", true);
- }
- const Pages_indexChineseMedicineDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/chineseMedicineDetails.vue"]]);
- const _sfc_main$1N = {
- mixins: [MescrollMixin],
- data() {
- return {
- foodOptions: [],
- actionOptions: [],
- indicationOptions: [],
- action: "",
- food: "",
- indications: "",
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- this.getDictByKey("sys_medicated_food");
- this.getDictByKey("sys_medicated_food_action");
- this.getDictByKey("sys_indication");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_medicated_food") {
- this.foodOptions = res.data;
- }
- if (key == "sys_medicated_food_action") {
- this.actionOptions = res.data;
- }
- if (key == "sys_indication") {
- this.indicationOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- food: this.food,
- action: this.action,
- indications: this.indications,
- keyword: this.keyword,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMedicatedFoodList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- choseAction(item) {
- this.action = item.dictLabel;
- this.mescroll.resetUpScroll();
- },
- choseFood(item) {
- this.food = item.dictLabel;
- this.mescroll.resetUpScroll();
- },
- choseIndications(item) {
- this.indications = item.dictLabel;
- this.mescroll.resetUpScroll();
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./medicatedFoodDetails?id=" + item.id
- });
- }
- }
- };
- function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- vue.createCommentVNode(" 关键字列表 "),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.foodOptions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.food == item.dictLabel ? "item active" : "item"),
- onClick: ($event) => $options.choseFood(item)
- }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.actionOptions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.action == item.dictLabel ? "item active" : "item"),
- onClick: ($event) => $options.choseAction(item)
- }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.indicationOptions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.indications == item.dictLabel ? "item active" : "item"),
- onClick: ($event) => $options.choseIndications(item)
- }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "376rpx",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "article-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode(
- "view",
- { class: "title ellipsis" },
- vue.toDisplayString(item.foodName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "desc ellipsis" },
- vue.toDisplayString(item.actionTitle),
- 1
- /* TEXT */
- )
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_indexMedicatedFoodList = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/medicatedFoodList.vue"]]);
- const _sfc_main$1M = {
- data() {
- return {
- advs: [],
- advImgs: [],
- item: {}
- };
- },
- onLoad(option) {
- this.id = option.id;
- },
- onShow() {
- this.getAdvList();
- this.getMedicatedFoodById();
- },
- onShareAppMessage(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.foodName,
- path: "/pages_index/medicatedFoodDetails?id=" + this.id,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.title,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/medicatedFoodDetails.vue:73", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 4
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getMedicatedFoodById() {
- let data = { id: this.id };
- getMedicatedFoodById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createElementVNode("view", { class: "image" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: $data.item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.foodName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "title-py" },
- vue.toDisplayString($data.item.pinyin),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.item.actionTitle),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "line-h" }),
- vue.createElementVNode("view", {
- class: "content",
- innerHTML: $data.item.descs
- }, null, 8, ["innerHTML"])
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ])) : vue.createCommentVNode("v-if", true);
- }
- const Pages_indexMedicatedFoodDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/medicatedFoodDetails.vue"]]);
- const _sfc_main$1L = {
- mixins: [MescrollMixin],
- data() {
- return {
- typeOptions: [],
- questionsType: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- this.getDictByKey("sys_questions_type");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_questions_type") {
- this.typeOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- questionsType: this.questionsType,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getQuestionsList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 关键词选择
- choseType(item) {
- this.questionsType = item.dictValue;
- this.mescroll.resetUpScroll();
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./questionsDetails?id=" + item.id
- });
- }
- }
- };
- function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入服务包搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- vue.createCommentVNode(" 关键字列表 "),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.typeOptions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.questionsType == item.dictValue ? "item active" : "item"),
- onClick: ($event) => $options.choseType(item)
- }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "192rpx",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "article-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", { class: "readers" }, [
- vue.createElementVNode("view", { class: "readings" }, [
- vue.createElementVNode("image", {
- class: "eye",
- src: "/static/images/eye.png"
- }),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(item.views),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_indexQuestionsList = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/questionsList.vue"]]);
- const _sfc_main$1K = {
- data() {
- return {
- advs: [],
- advImgs: [],
- id: null,
- item: {}
- };
- },
- onLoad(option) {
- this.id = option.id;
- },
- onShow() {
- this.getAdvList();
- this.getQuestionsById();
- },
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: this.item.vesselName,
- path: "/pages_index/questionsDetails?id=" + this.id,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: this.item.title,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_index/questionsDetails.vue:70", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 6
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getQuestionsById() {
- let data = { id: this.id };
- getQuestionsById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode(
- "view",
- { class: "reads" },
- "阅读数:" + vue.toDisplayString($data.item.views),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString($data.item.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(" 正文 "),
- vue.createElementVNode("view", { class: "full-text" }, [
- vue.createElementVNode("view", {
- innerHTML: $data.item.answers
- }, null, 8, ["innerHTML"])
- ])
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ]);
- }
- const Pages_indexQuestionsDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/questionsDetails.vue"]]);
- const _sfc_main$1J = {
- components: { Menu },
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- top: null,
- cates: [],
- diseaseType: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- },
- onShow() {
- this.getPackagCateList(1);
- },
- methods: {
- menuClick(item) {
- this.diseaseType = item.cateId;
- this.mescroll.resetUpScroll();
- },
- getPackagCateList(type2) {
- var data = { type: type2 };
- var that = this;
- getPackagCateList(data).then(
- (res) => {
- if (res.code == 200) {
- this.cates = res.data;
- var query = uni.createSelectorQuery().in(that);
- setTimeout(function() {
- query.select(".top-content").boundingClientRect((data2) => {
- if (data2) {
- formatAppLog("log", "at pages_index/packageList.vue:99", "View height:", data2.height + "px");
- that.top = data2.height + "px";
- }
- }).exec();
- }, 500);
- }
- },
- (err) => {
- }
- );
- },
- // 关键词选择
- choseType(item) {
- this.diseaseType = item.cateCode;
- this.mescroll.resetUpScroll();
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- isShow: 1,
- diseaseType: this.diseaseType,
- keyword: this.keyword,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getPackageList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_Menu = vue.resolveComponent("Menu");
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
- key: 0,
- list: $data.cates,
- onMenuClick: $options.menuClick,
- style: { "width": "100%" }
- }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(` <view class="inner">
- <view v-for="(item,index) in cates" :key="index" :class="diseaseType == item.cateCode?'item active':'item'" @click="choseType(item)">
- <image class="icon" :src="item.imgUrl"></image>\r
- <view class="title" >{{item.cateName}} </view>
- </view>
- </view> `)
- ])
- ]),
- $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
- key: 0,
- top: $data.top,
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "package-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- onClick: ($event) => $options.navTo("/pages_index/packageDetails?packageId=" + item.packageId)
- }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "bottom" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- "¥" + vue.toDisplayString(item.price.toFixed(2)) + "元/日",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.sales) + "人已购",
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- let request$a = new Request$1().http;
- function create$1(data) {
- return request$a("/app/packageOrder/create", data, "POST", "application/json;charset=UTF-8");
- }
- function compute$2(data) {
- return request$a("/app/packageOrder/compute", data, "POST", "application/json;charset=UTF-8");
- }
- function pay$2(data) {
- return request$a("/app/packageOrder/pay", data, "POST", "application/json;charset=UTF-8");
- }
- function payment$2(data) {
- return request$a("/app/packageOrder/payment", data, "POST", "application/json;charset=UTF-8");
- }
- function getPackageOrderById(data) {
- return request$a("/app/packageOrder/getPackageOrderById", data, "GET");
- }
- function getMyPackageOrderList(data) {
- return request$a("/app/packageOrder/getMyPackageOrderList", data, "GET");
- }
- function getCompanyUserPackageOrderList(data) {
- return request$a("/app/packageOrder/getCompanyUserPackageOrderList", data, "GET");
- }
- function getSharePackageOrderById(data) {
- return request$a("/app/packageOrder/getSharePackageOrderById", data, "GET");
- }
- function getCompanyUserPackageOrderById(data) {
- return request$a("/app/packageOrder/getCompanyUserPackageOrderById", data, "GET");
- }
- function cancelOrder$1(data) {
- return request$a("/app/packageOrder/cancel", data, "POST", "application/json;charset=UTF-8");
- }
- let request$9 = new Request$1().http;
- function login(data) {
- return request$9("/app/companyUser/login", data, "POST", "application/json;charset=UTF-8");
- }
- function getUserInfo(data) {
- return request$9("/app/companyUser/getUserInfo", data, "GET", "application/json;charset=UTF-8");
- }
- function bindCompanyUser(data) {
- return request$9("/app/companyUser/bindCompanyUser", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$1I = {
- data() {
- return {
- // isDrug:0,
- storeName: "",
- displayText: "查看更多",
- displayMore: 0,
- imgs: [],
- activeImg: 1,
- doctorShow: false,
- doctors: [],
- products: [],
- packageId: null,
- item: {},
- describe: null,
- doctorId: null,
- doctorPageNum: 1,
- doctorLastPage: false,
- doctorTotal: 0,
- companyUserId: null,
- companyId: null
- };
- },
- onLoad(option) {
- this.packageId = option.packageId;
- if (!this.$isEmpty(option.companyId)) {
- this.companyId = option.companyId;
- }
- if (!this.$isEmpty(option.companyUserId)) {
- this.companyUserId = option.companyUserId;
- }
- },
- onShow() {
- this.$isLogin().then(
- (res) => {
- if (res) {
- let data = { companyUserId: this.companyUserId };
- bindCompanyUser(data).then(
- (res2) => {
- if (res2.code == 200)
- ;
- },
- (rej) => {
- }
- );
- }
- }
- );
- this.getPackageById();
- this.getPackageDoctorList();
- },
- onShareAppMessage(res) {
- return {
- title: this.item.packageName,
- path: "/pages_index/packageDetails?packageId=" + this.packageId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId,
- imageUrl: this.item.imgUrl
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- },
- methods: {
- showMore() {
- this.displayMore = this.displayMore == 1 ? 0 : 1;
- this.displayText = this.displayMore == 1 ? "收起" : "查看更多";
- formatAppLog("log", "at pages_index/packageDetails.vue:249", this.displayText);
- },
- swiperChange(event) {
- this.activeImg = event.detail.current + 1;
- },
- handleDoctorClick(item) {
- this.doctorShow = false;
- this.doctorId = item.doctorId;
- this.doSubmit();
- },
- lower(event) {
- if (this.doctorTotal > this.doctors.length) {
- this.doctorPageNum++;
- this.getPackageDoctorList();
- }
- },
- doSubmit() {
- var that = this;
- this.$isLogin().then(
- (res) => {
- if (res) {
- that.submit();
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- },
- submit() {
- if (this.doctors.length > 0 && this.doctorId == null) {
- this.doctorShow = true;
- } else {
- uni.navigateTo({
- url: "/pages_index/packageForm?packageId=" + this.packageId + "&doctorId=" + this.doctorId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- });
- }
- },
- createOrder() {
- uni.showLoading({
- title: "处理中..."
- });
- var data = {
- companyId: this.companyId,
- companyUserId: this.companyUserId,
- packageId: this.packageId,
- doctorId: this.doctorId
- };
- create$1(data).then((res) => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.navigateTo({
- url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- });
- },
- doctorOpen() {
- this.doctorShow = true;
- },
- doctorClose() {
- this.doctorShow = false;
- },
- showImg() {
- uni.previewImage({
- urls: this.imgs,
- current: this.imgs[0]
- });
- },
- getPackageDoctorList() {
- if (this.doctorLastPage) {
- return;
- }
- var data = {
- packageId: this.packageId,
- pageNum: this.doctorPageNum,
- pageSize: 10
- };
- var that = this;
- getPackageDoctorList(data).then(
- (res) => {
- if (res.code == 200) {
- if (this.doctorPageNum == 0) {
- that.doctors = res.data.list;
- } else {
- that.doctors = that.doctors.concat(res.data.list);
- }
- this.doctorLastPage = res.data.isLastPage;
- this.doctorTotal = res.data.total;
- formatAppLog("log", "at pages_index/packageDetails.vue:360", that.doctors);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- getPackageById() {
- let data = { packageId: this.packageId };
- getPackageById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- this.storeName = res.storeName;
- if (res.data.images != null) {
- this.imgs = res.data.images.split(",");
- } else {
- this.activeImg = 0;
- }
- this.describe = JSON.parse(this.item.describeJson);
- if (this.item.productJson != null) {
- this.products = JSON.parse(this.item.productJson);
- }
- formatAppLog("log", "at pages_index/packageDetails.vue:397", this.imgs);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createCommentVNode(' <view class="img-box" @click="showImg()">\r\n <image :src="item.imgUrl"></image>\r\n </view> '),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", {
- class: "goods-banner",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg())
- }, [
- vue.createElementVNode(
- "swiper",
- {
- class: "swiper",
- "indicator-dots": false,
- circular: true,
- autoplay: true,
- interval: 3e3,
- duration: 1e3,
- "indicator-color": "rgba(255, 255, 255, 0.6)",
- "indicator-active-color": "#ffffff",
- onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args))
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.imgs, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", {
- class: "swiper-item",
- key: index2
- }, [
- vue.createElementVNode("image", {
- src: item,
- mode: "aspectFit"
- }, null, 8, ["src"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 32
- /* NEED_HYDRATION */
- ),
- vue.createCommentVNode(" 数量 "),
- vue.createElementVNode(
- "view",
- { class: "num-box" },
- vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "package-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- $data.item.cycle > 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "cycle"
- },
- "用药周期" + vue.toDisplayString($data.item.cycle) + "天",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.item.duration > 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "duration"
- },
- "签约时长" + vue.toDisplayString($data.item.duration) + "天",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("view", { class: "price-box" }, [
- $data.item != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "price"
- },
- "¥" + vue.toDisplayString($data.item.price.toFixed(2)) + "元/日",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.item != null && $data.item.packageSubType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "price"
- }, "咨询包")) : vue.createCommentVNode("v-if", true),
- $data.item != null && $data.item.packageSubType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "price"
- }, "治疗包")) : vue.createCommentVNode("v-if", true),
- $data.item != null && $data.item.packageSubType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "price"
- }, "产品包")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString($data.item.sales) + "人已购",
- 1
- /* TEXT */
- )
- ])
- ]),
- $data.products.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "drug-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "产品列表")
- ]),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.products, (product, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
- ($data.displayMore == 0 ? index2 < 2 : true) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "drug"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: product.image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(product.productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(product.sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode(
- "view",
- { class: "use" },
- vue.toDisplayString(product.usageMethod),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text>\r\n <text class="num">{{product.price.toFixed(2)}}</text> ')
- ]),
- vue.createCommentVNode(' <view class="amount">x{{product.count}}</view> ')
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- $data.products.length > 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "display-more",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.showMore())
- },
- vue.toDisplayString($data.displayText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "tip" }, [
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/dui.png"
- }),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "本疗法所包含药品由" + vue.toDisplayString($data.storeName) + "配送",
- 1
- /* TEXT */
- )
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.use != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "功能")
- ]),
- $data.describe != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "desc",
- innerHTML: $data.describe.use
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- $data.item.indication != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "主治")
- ]),
- $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "desc",
- innerHTML: $data.item.indication
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.usageMethod != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "服用/使用方式")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.describe.usageMethod
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.forPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "适宜人群")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.describe.forPeople
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.tabooPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "禁忌人群")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.describe.tabooPeople
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- $data.item.explain != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "方解/搭配优势")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.explain
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "套餐描述")
- ]),
- vue.createElementVNode("view", {
- class: "html",
- innerHTML: $data.item.desc
- }, null, 8, ["innerHTML"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-foot" }, [
- vue.createElementVNode("view", { class: "p-price-box" }, [
- vue.createElementVNode("view", { class: "p-name" }, "¥"),
- $data.item != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "p-price"
- },
- vue.toDisplayString($data.item.totalPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn buy",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.doSubmit())
- }, "提交需求")
- ])
- ]),
- vue.createVNode(_component_u_popup, {
- bgColor: "#f6f6f6",
- round: 10,
- mode: "bottom",
- show: $data.doctorShow,
- onOpen: _cache[5] || (_cache[5] = ($event) => $options.doctorOpen()),
- onClose: _cache[6] || (_cache[6] = ($event) => $options.doctorClose())
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "doctors" }, [
- vue.createElementVNode(
- "scroll-view",
- {
- class: "scroll-list",
- "scroll-y": "true",
- onScrolltolower: _cache[4] || (_cache[4] = (...args) => $options.lower && $options.lower(...args))
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.doctors, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => _ctx.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position" },
- vue.toDisplayString(item.position),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "hospital" },
- vue.toDisplayString(item.hospitalName) + " " + vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: ($event) => $options.handleDoctorClick(item)
- }, "选择", 8, ["onClick"])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ],
- 32
- /* NEED_HYDRATION */
- )
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"])
- ]);
- }
- const Pages_indexPackageDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageDetails.vue"]]);
- const _sfc_main$1H = {
- data() {
- return {
- content: null,
- show: false,
- scrollTop: 0,
- //滚动条位置
- patient: null,
- items: [
- {
- title: "您是否已在线下就诊,且对所购买的药品无过敏或不良反应?",
- options: [
- { name: "是,我线下就诊过", value: 1, color: "green" },
- { name: "无,从未就诊", value: 0, color: "red" }
- ]
- },
- {
- title: "您是否已详细阅读药物说明,确认自己符合药物适用人群,并了解用药方法、用药禁忌等信息?",
- options: [
- { name: "是,我已充分了解", value: 1, color: "green" },
- { name: "否,未阅读", value: 0, color: "red" }
- ]
- }
- ],
- msgs: [],
- index: 0,
- item: null,
- notice: [
- { title: "好的。我将根据您提交的复诊信息开具处方,请详细阅读药品说明书,遵医嘱用药。" },
- { title: "您存在用药禁忌证,目前不推荐购买此套餐包。建议您尽早就医,在医生指导下采取针对性的治疗措施!在改善相关禁忌证后,也可以再次咨询,重新评估是否可以使用该套餐包。" }
- ],
- packageId: null,
- doctorId: null,
- isComplete: 0,
- companyUserId: null,
- companyId: null
- };
- },
- onLoad(option) {
- this.packageId = option.packageId;
- this.doctorId = option.doctorId;
- if (!this.$isEmpty(option.companyId)) {
- this.companyId = option.companyId;
- }
- if (!this.$isEmpty(option.companyUserId)) {
- this.companyUserId = option.companyUserId;
- }
- var that = this;
- uni.$on("refreshOrderPatient", (res) => {
- that.patient = res;
- });
- this.item = this.items[0];
- this.addMsg(1, this.item.title);
- },
- onShow() {
- },
- methods: {
- close() {
- this.show = false;
- },
- confirm() {
- if (this.isComplete == 1) {
- this.submit();
- } else {
- uni.navigateBack();
- }
- },
- addMsg(type2, content) {
- var msg = { type: type2, content };
- this.msgs.push(msg);
- var that = this;
- uni.createSelectorQuery().select(".msgs").boundingClientRect((res) => {
- const scrollH = res.height;
- that.scrollTop = scrollH;
- formatAppLog("log", "at pages_index/packageForm.vue:150", that.scrollTop);
- }).exec();
- },
- optionClick(item, option) {
- if (this.patient == null) {
- uni.showToast({
- icon: "none",
- title: "请选择就诊人"
- });
- return;
- }
- if (option.value == 0) {
- this.content = this.notice[1].title;
- this.show = true;
- this.isComplete = 0;
- return;
- }
- item.option = option.name;
- formatAppLog("log", "at pages_index/packageForm.vue:172", item.option);
- this.addMsg(2, option.name);
- this.index++;
- if (this.index <= this.items.length - 1) {
- this.item = this.items[this.index];
- this.addMsg(1, this.item.title);
- } else {
- this.content = this.notice[0].title;
- this.show = true;
- this.isComplete = 1;
- return;
- }
- },
- addPatient() {
- uni.navigateTo({
- url: "/pages_user/patient"
- });
- },
- submit() {
- uni.showLoading({
- title: "处理中..."
- });
- var data = {
- companyId: this.companyId,
- companyUserId: this.companyUserId,
- patientId: this.patient.patientId,
- patientJson: JSON.stringify(this.patient),
- packageId: this.packageId,
- doctorId: this.doctorId,
- formJson: JSON.stringify(this.items)
- };
- create$1(data).then((res) => {
- uni.hideLoading();
- if (res.code == 200) {
- var temps = ["jARl4BpoBkRu-2MxPMkQVhIfGMG0V9qW-X3V_7NtEOU"];
- uni.requestSubscribeMessage({
- tmplIds: temps,
- success(e) {
- setTimeout(function() {
- uni.navigateTo({
- url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId
- });
- }, 200);
- },
- fail(e) {
- setTimeout(function() {
- uni.navigateTo({
- url: "/pages_order/packageOrderPay?orderId=" + res.order.orderId
- });
- }, 200);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- });
- }
- }
- };
- function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_0$9);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "patient-cont" }, [
- vue.createElementVNode("view", { class: "chose-patient" }, [
- $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "patient-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "patient-item" }, [
- vue.createElementVNode("view", { class: "patient-tip" }, "*"),
- vue.createElementVNode("view", { class: "patient-title" }, "选择就诊人")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "patient",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.patient.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "msg-cont" }, [
- vue.createElementVNode("scroll-view", {
- class: "msg-scroll",
- "scroll-top": $data.scrollTop,
- "scroll-y": "true",
- "scroll-with-animation": true
- }, [
- vue.createElementVNode("view", { class: "msgs" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.msgs, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "msg-item" }, [
- item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "left"
- }, [
- vue.createElementVNode("image", {
- class: "img",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/be32b8d2ae9f497297d10327656bb43c.png"
- }),
- vue.createElementVNode(
- "view",
- { class: "msg-content" },
- vue.toDisplayString(item.content),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "right"
- }, [
- vue.createElementVNode(
- "view",
- { class: "msg-content" },
- vue.toDisplayString(item.content),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- class: "img",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg"
- })
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ], 8, ["scroll-top"])
- ]),
- $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "option-cont"
- }, [
- vue.createElementVNode(
- "view",
- { class: "option-title" },
- vue.toDisplayString($data.item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "options" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.item.options, (option, opIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: vue.normalizeClass(option.color == "red" ? "option-item red" : "option-item green"),
- onClick: ($event) => $options.optionClick($data.item, option)
- }, vue.toDisplayString(option.name), 11, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_u_modal, {
- onCancel: _cache[2] || (_cache[2] = ($event) => $options.close()),
- onConfirm: _cache[3] || (_cache[3] = ($event) => $options.confirm()),
- show: $data.show,
- title: "温馨提示",
- content: $data.content
- }, null, 8, ["show", "content"])
- ]);
- }
- const Pages_indexPackageForm = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_index/packageForm.vue"]]);
- const _sfc_main$1G = {
- components: { Menu },
- mixins: [MescrollMixin],
- data() {
- return {
- top: null,
- cates: [],
- cateId: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- },
- onShow() {
- this.getDoctorArticleCateList();
- },
- methods: {
- menuClick(item) {
- this.cateId = item.cateId;
- this.mescroll.resetUpScroll();
- },
- getDoctorArticleCateList() {
- var that = this;
- let data = {};
- getDoctorArticleCateList(data).then(
- (res) => {
- if (res.code == 200) {
- this.cates = res.data;
- var query = uni.createSelectorQuery().in(that);
- setTimeout(function() {
- query.select(".top-content").boundingClientRect((data2) => {
- if (data2) {
- formatAppLog("log", "at pages_doctor/doctorArticleList.vue:114", "View height:", data2.height + "px");
- that.top = data2.height + "px";
- }
- }).exec();
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- getArticleCateList() {
- let data = {};
- getArticleCateList(data).then(
- (res) => {
- if (res.code == 200) {
- this.cates = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- cateId: this.cateId,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getDoctorArticleList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 关键词选择
- choseCate(item) {
- this.cateId = item.cateId;
- this.mescroll.resetUpScroll();
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: "./doctorArticleDetails?articleId=" + item.articleId
- });
- }
- }
- };
- function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_Menu = vue.resolveComponent("Menu");
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入关键字搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- $data.cates.length > 0 ? (vue.openBlock(), vue.createBlock(_component_Menu, {
- key: 0,
- list: $data.cates,
- onMenuClick: $options.menuClick,
- style: { "width": "100%" }
- }, null, 8, ["list", "onMenuClick"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 关键字列表 "),
- vue.createCommentVNode(' <scroll-view scroll-x="true" > '),
- vue.createCommentVNode(` <view class="inner">\r
- <view v-for="(item,index) in cates" :key="index" :class="cateId == item.cateId?'item active':'item'" @click="choseCate(item)">\r
- <image class="icon" :src="item.imgUrl"></image>\r
- <view class="title" >{{item.cateName}} </view>\r
- </view>\r
- </view> `),
- vue.createCommentVNode(" </scroll-view> ")
- ])
- ]),
- $data.top != null ? (vue.openBlock(), vue.createBlock(_component_mescroll_body, {
- key: 0,
- top: $data.top,
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "article-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2,
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", { class: "readers" }, [
- vue.createElementVNode("view", { class: "head-box" }, [
- vue.createElementVNode("view", { class: "head" }, [
- vue.createElementVNode("image", {
- class: "eye",
- mode: "aspectFill",
- src: item.avatar
- }, null, 8, ["src"])
- ])
- ]),
- vue.createElementVNode("view", { class: "readings" }, [
- vue.createElementVNode("image", {
- class: "eye",
- src: "/static/images/eye.png"
- }),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(item.views),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "time-box" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: item.imageUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["top", "onInit", "onDown", "onUp", "down", "up"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const Pages_doctorDoctorArticleList = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorArticleList.vue"]]);
- const _sfc_main$1F = {
- data() {
- return {
- advs: [],
- advImgs: [],
- src: "",
- articleId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.articleId = option.articleId;
- },
- onShow() {
- this.getAdvList();
- this.getDoctorArticleById();
- },
- //发送给朋友
- onShareAppMessage(res) {
- return {
- title: this.item.title,
- path: "/pages_doctor/doctorArticleDetails?articleId=" + this.articleId
- };
- },
- //分享到朋友圈
- onShareTimeline(res) {
- return {
- title: this.item.title,
- query: "articleId=" + this.articleId
- //页面参数
- };
- },
- methods: {
- handleAdvClick(index2) {
- var ad = this.advs[index2];
- formatAppLog("log", "at pages_doctor/doctorArticleDetails.vue:79", ad.advUrl);
- if (ad.showType == 1) {
- uni.setStorageSync("url", ad.advUrl);
- uni.navigateTo({
- url: "h5"
- });
- } else if (ad.showType == 2) {
- uni.navigateTo({
- url: ad.advUrl
- });
- } else if (ad.showType == 3) {
- uni.setStorageSync("content", ad.content);
- uni.navigateTo({
- url: "content"
- });
- }
- },
- getAdvList() {
- var that = this;
- var data = {
- advType: 10
- };
- getAdvList(data).then((res) => {
- if (res.code == 200) {
- that.advImgs = [];
- that.advs = [];
- res.data.forEach(function(element) {
- if (element.imageUrl != null && element.imageUrl != "") {
- that.advs.push(element);
- that.advImgs.push(element.imageUrl);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- videoErrorCallback: function(e) {
- uni.showModal({
- content: e.target.errMsg,
- showCancel: false
- });
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- getDoctorArticleById() {
- let data = { articleId: this.articleId };
- getDoctorArticleById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_swiper = resolveEasycom(vue.resolveDynamicComponent("u-swiper"), __easycom_0$e);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "detail-cont" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode(
- "view",
- { class: "reads" },
- "阅读数:" + vue.toDisplayString($data.item.views),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString($data.item.createTime),
- 1
- /* TEXT */
- )
- ]),
- $data.item.videoUrl != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "video"
- }, [
- vue.createElementVNode("video", {
- class: "myVideo",
- id: "myVideo",
- src: $data.item.videoUrl,
- onError: _cache[0] || (_cache[0] = (...args) => $options.videoErrorCallback && $options.videoErrorCallback(...args)),
- controls: ""
- }, null, 40, ["src"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 正文 "),
- vue.createElementVNode("view", { class: "full-text" }, [
- vue.createElementVNode("view", {
- innerHTML: $data.item.content
- }, null, 8, ["innerHTML"])
- ])
- ]),
- vue.createCommentVNode(" 咨询按钮 "),
- vue.createElementVNode("view", { class: "inquiry" }, [
- vue.createElementVNode("view", {
- class: "content",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + $data.item.doctorId))
- }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- src: $data.item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.item.doctorName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "ad" }, [
- vue.createVNode(_component_u_swiper, {
- list: $data.advImgs,
- indicator: "",
- indicatorMode: "line",
- circular: "",
- onClick: $options.handleAdvClick
- }, null, 8, ["list", "onClick"])
- ])
- ]);
- }
- const Pages_doctorDoctorArticleDetails = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_doctor/doctorArticleDetails.vue"]]);
- const _sfc_main$1E = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- keyword: "",
- hosLevelOptions: [],
- tabIndex: 0,
- tabs: [
- { name: "全部", deptId: 0 }
- ],
- deptId: 0,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad(options) {
- if (options.deptId != null) {
- this.deptId = options.deptId;
- }
- if (options.keyword != null) {
- this.keyword = options.keyword;
- }
- formatAppLog("log", "at pages_doctor/doctorList.vue:124", this.deptId);
- this.getDictByKey("sys_hospital_level");
- this.getDepartmentList();
- },
- onShow() {
- },
- methods: {
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_hospital_level") {
- this.hosLevelOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- getDepartmentList(page2) {
- var that = this;
- var data = {};
- getDepartmentList(data).then((res) => {
- if (res.code == 200) {
- res.data.forEach(function(value2, index2, array3) {
- var data2 = { name: value2.deptName, deptId: value2.deptId };
- that.tabs.push(data2);
- if (value2.deptId == that.deptId) {
- that.tabIndex = index2 + 1;
- formatAppLog("log", "at pages_doctor/doctorList.vue:160", that.tabIndex);
- }
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- deptChange(item) {
- this.deptId = item.deptId;
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- deptId: this.deptId,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getDoctorList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.prices = JSON.parse(value2.priceJson);
- });
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入医生姓名搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- current: $data.tabIndex,
- scrollable: true,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.deptChange
- }, null, 8, ["current", "list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "176rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- $data.dataList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "doctors"
- }, [
- vue.createElementVNode("view", { class: "doctor-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "head-box" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item.avatar
- }, null, 8, ["src"]),
- item.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "isline"
- }, [
- vue.createElementVNode("view", { class: "img" }, [
- vue.createElementVNode("image", { src: "/static/images/isline.png" }),
- vue.createElementVNode("view", { class: "name" }, "在线")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position" },
- vue.toDisplayString(item.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-dept" },
- vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "hospital-box" }, [
- item.hospitalLevel != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tag"
- }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item.hospitalLevel)),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.hospitalName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-spec" }, [
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(item.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-count" }, [
- vue.createElementVNode("view", { class: "name" }, "好评:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.pingStar) + "分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "接诊量:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.orderNumber),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "平均响应:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.speed) + "分钟",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-price" }, [
- vue.createElementVNode("view", { class: "btn" }, [
- vue.createTextVNode(" 咨询医生¥ "),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.prices, (price, index3) => {
- return vue.openBlock(), vue.createElementBlock("text", null, [
- vue.createTextVNode(
- vue.toDisplayString(price.price.toFixed(2)) + " ",
- 1
- /* TEXT */
- ),
- index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const props$k = {
- props: {
- // 用于v-model双向绑定选中的星星数量
- modelValue: {
- type: [String, Number],
- default: props$y.rate.value
- },
- // 要显示的星星数量
- count: {
- type: [String, Number],
- default: props$y.rate.count
- },
- // 是否不可选中
- disabled: {
- type: Boolean,
- default: props$y.rate.disabled
- },
- // 是否只读
- readonly: {
- type: Boolean,
- default: props$y.rate.readonly
- },
- // 星星的大小,单位px
- size: {
- type: [String, Number],
- default: props$y.rate.size
- },
- // 未选中时的颜色
- inactiveColor: {
- type: String,
- default: props$y.rate.inactiveColor
- },
- // 选中的颜色
- activeColor: {
- type: String,
- default: props$y.rate.activeColor
- },
- // 星星之间的间距,单位px
- gutter: {
- type: [String, Number],
- default: props$y.rate.gutter
- },
- // 最少能选择的星星个数
- minCount: {
- type: [String, Number],
- default: props$y.rate.minCount
- },
- // 是否允许半星
- allowHalf: {
- type: Boolean,
- default: props$y.rate.allowHalf
- },
- // 选中时的图标(星星)
- activeIcon: {
- type: String,
- default: props$y.rate.activeIcon
- },
- // 未选中时的图标(星星)
- inactiveIcon: {
- type: String,
- default: props$y.rate.inactiveIcon
- },
- // 是否可以通过滑动手势选择评分
- touchable: {
- type: Boolean,
- default: props$y.rate.touchable
- }
- }
- };
- const _sfc_main$1D = {
- name: "u-rate",
- mixins: [mpMixin, mixin, props$k],
- data() {
- return {
- // 生成一个唯一id,否则一个页面多个评分组件,会造成冲突
- elId: uni.$u.guid(),
- elClass: uni.$u.guid(),
- rateBoxLeft: 0,
- // 评分盒子左边到屏幕左边的距离,用于滑动选择时计算距离
- activeIndex: this.modelValue,
- rateWidth: 0,
- // 每个星星的宽度
- // 标识是否正在滑动,由于iOS事件上touch比click先触发,导致快速滑动结束后,接着触发click,导致事件混乱而出错
- moving: false
- };
- },
- watch: {
- modelValue(val) {
- this.activeIndex = val;
- },
- activeIndex: "emitEvent"
- },
- emits: ["update:modelValue", "change"],
- methods: {
- init() {
- uni.$u.sleep().then(() => {
- this.getRateItemRect();
- this.getRateIconWrapRect();
- });
- },
- // 获取评分组件盒子的布局信息
- async getRateItemRect() {
- await uni.$u.sleep();
- this.$uGetRect("#" + this.elId).then((res) => {
- this.rateBoxLeft = res.left;
- });
- },
- // 获取单个星星的尺寸
- getRateIconWrapRect() {
- this.$uGetRect("." + this.elClass).then((res) => {
- this.rateWidth = res.width;
- });
- },
- // 手指滑动
- touchMove(e) {
- if (!this.touchable) {
- return;
- }
- this.preventEvent(e);
- const x = e.changedTouches[0].pageX;
- this.getActiveIndex(x);
- },
- // 停止滑动
- touchEnd(e) {
- if (!this.touchable) {
- return;
- }
- this.preventEvent(e);
- const x = e.changedTouches[0].pageX;
- this.getActiveIndex(x);
- },
- // 通过点击,直接选中
- clickHandler(e, index2) {
- if (uni.$u.os() === "ios" && this.moving) {
- return;
- }
- this.preventEvent(e);
- let x = 0;
- x = e.changedTouches[0].pageX;
- this.getActiveIndex(x, true);
- },
- // 发出事件
- emitEvent() {
- this.$emit("change", this.activeIndex);
- this.$emit("update:modelValue", this.activeIndex);
- },
- // 获取当前激活的评分图标
- getActiveIndex(x, isClick = false) {
- if (this.disabled || this.readonly) {
- return;
- }
- const allRateWidth = this.rateWidth * this.count + this.rateBoxLeft;
- x = uni.$u.range(this.rateBoxLeft, allRateWidth, x) - this.rateBoxLeft;
- const distance = x;
- let index2;
- if (this.allowHalf) {
- index2 = Math.floor(distance / this.rateWidth);
- const decimal = distance % this.rateWidth;
- if (decimal <= this.rateWidth / 2 && decimal > 0) {
- index2 += 0.5;
- } else if (decimal > this.rateWidth / 2) {
- index2++;
- }
- } else {
- index2 = Math.floor(distance / this.rateWidth);
- const decimal = distance % this.rateWidth;
- if (isClick) {
- if (decimal > 0)
- index2++;
- } else {
- if (decimal > this.rateWidth / 2)
- index2++;
- }
- }
- this.activeIndex = Math.min(index2, this.count);
- if (this.activeIndex < this.minCount) {
- this.activeIndex = this.minCount;
- }
- setTimeout(() => {
- this.moving = true;
- }, 10);
- setTimeout(() => {
- this.moving = false;
- }, 10);
- }
- },
- mounted() {
- this.init();
- }
- };
- function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-rate",
- id: $data.elId,
- ref: "u-rate",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-rate__content",
- onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["stop"])),
- onTouchend: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["stop"]))
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(Number(_ctx.count), (item, index2) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-rate__content__item", [$data.elClass]]),
- key: index2
- },
- [
- vue.createElementVNode("view", {
- class: "u-rate__content__item__icon-wrap",
- ref_for: true,
- ref: "u-rate__content__item__icon-wrap",
- onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"])
- }, [
- vue.createVNode(_component_u_icon, {
- name: Math.floor($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon,
- color: _ctx.disabled ? "#c8c9cc" : Math.floor($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor,
- "custom-style": {
- padding: `0 ${_ctx.$u.addUnit(_ctx.gutter / 2)}`
- },
- size: _ctx.size
- }, null, 8, ["name", "color", "custom-style", "size"])
- ], 8, ["onClick"]),
- _ctx.allowHalf ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]),
- class: "u-rate__content__item__icon-wrap u-rate__content__item__icon-wrap--half",
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit($data.rateWidth / 2)
- }]),
- ref_for: true,
- ref: "u-rate__content__item__icon-wrap"
- }, [
- vue.createVNode(_component_u_icon, {
- name: Math.ceil($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon,
- color: _ctx.disabled ? "#c8c9cc" : Math.ceil($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor,
- "custom-style": {
- padding: `0 ${_ctx.$u.addUnit(_ctx.gutter / 2)}`
- },
- size: _ctx.size
- }, null, 8, ["name", "color", "custom-style", "size"])
- ], 12, ["onClick"])) : vue.createCommentVNode("v-if", true)
- ],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 32
- /* NEED_HYDRATION */
- )
- ], 12, ["id"]);
- }
- 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"]]);
- const _sfc_main$1C = {
- data() {
- return {
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- isFollow: false,
- doctorId: null,
- doctor: null,
- department: null,
- hospital: null,
- pings: []
- };
- },
- onLoad(options) {
- if (options.doctorId != null) {
- this.doctorId = options.doctorId;
- } else if (options.hasOwnProperty("q") && options.q) {
- const url2 = decodeURIComponent(options.q);
- const obj = this.$urlToObj(url2);
- uni.setStorageSync("doctorId", obj.doctorId);
- this.doctorId = obj.doctorId;
- }
- },
- onShow() {
- this.getDoctorDetails();
- this.getDoctorPingList();
- var that = this;
- this.$isLogin().then(
- (res) => {
- if (res) {
- that.checkFollow();
- }
- },
- (rej) => {
- }
- );
- },
- //发送给朋友
- onShareAppMessage(res) {
- return {
- title: this.doctor.doctorName,
- path: "/pages_doctor/doctorDetails?doctorId=" + this.doctorId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- },
- //分享到朋友圈
- onShareTimeline(res) {
- return {
- title: this.doctor.doctorName,
- query: "doctorId=" + this.doctorId,
- //页面参数
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- },
- methods: {
- goback() {
- uni.navigateBack();
- },
- gohome() {
- uni.switchTab({
- url: "/pages/index/index"
- });
- },
- doInquiry(price) {
- if (this.doctor.workStatus == 0) {
- uni.showToast({
- icon: "none",
- title: "医生休息中"
- });
- return;
- }
- var that = this;
- this.$isLogin().then(
- (res) => {
- if (res) {
- uni.navigateTo({
- url: "/pages_order/inquiryForm1?inquiryType=1&orderType=" + price.type + "&doctorId=" + that.doctorId
- });
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- },
- (rej) => {
- }
- );
- },
- followChange() {
- this.$isLogin().then(
- (res) => {
- if (res) {
- this.doFollow();
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- },
- (rej) => {
- }
- );
- },
- checkFollow() {
- var data = { doctorId: this.doctorId };
- checkFollow(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.isFollow == 1) {
- this.isFollow = true;
- } else {
- this.isFollow = false;
- }
- } else {
- this.isFollow = false;
- }
- },
- (rej) => {
- }
- );
- },
- doFollow() {
- var data = { doctorId: this.doctorId };
- doFollow$1(data).then(
- (res) => {
- this.isFollow = !this.isFollow;
- if (res.code = 200) {
- uni.showToast({
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- getDoctorDetails() {
- var data = {
- doctorId: this.doctorId
- };
- getDoctorDetails(data).then((res) => {
- if (res.code == 200) {
- this.doctor = res.data.doctor;
- this.doctor.prices = JSON.parse(this.doctor.priceJson);
- this.department = res.data.department;
- this.hospital = res.data.hospital;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- getDoctorPingList() {
- var data = {
- doctorId: this.doctorId,
- pageNum: 1,
- pageSize: 10
- };
- getDoctorPingList(data).then((res) => {
- if (res.code == 200) {
- this.pings = res.data.list;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/dd7da40764af4db0ac326db271c7f1d3.png" })
- ]),
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btns",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.goback())
- }, [
- vue.createElementVNode("view", { class: "btn" }, [
- vue.createElementVNode("image", { src: "/static/images/back_white.png" })
- ]),
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.gohome())
- }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5981c2cd5f23484181f5b328c820d0de.png" })
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", {
- class: "docs",
- style: { "margin-top": "88rpx" }
- }, [
- vue.createElementVNode("view", {
- class: "tip",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_doctor/doctorImgs?doctorId=" + $data.doctor.doctorId))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "title" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a58ee2a3fb674c2e8339243cb4ca1378.png" }),
- vue.createElementVNode("view", null, "实名认证")
- ]),
- vue.createElementVNode("view", { class: "cert" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/62aeeb0579974b67863a6ab56e9562f9.png" }),
- vue.createElementVNode(
- "view",
- null,
- "资格证编号:" + 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) : ""),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d519ad0467e4daea843aac745ae6b40.png" })
- ])
- ]),
- vue.createElementVNode("view", { class: "doc-cont" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.doctor.avatar,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString($data.doctor.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-btns" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.followChange())
- }, [
- $data.isFollow ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "/static/images/icon_strar.png"
- })) : vue.createCommentVNode("v-if", true),
- !$data.isFollow ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d509e50536804703a4b7dc066b16beee.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(" 关注 ")
- ]),
- vue.createElementVNode("view", { class: "btn" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f79c3b9cbefa40be8c2beb74f616eefc.png" }),
- vue.createTextVNode(" 分享 "),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "data-name": "shareBtn",
- "open-type": "share"
- }, "分享")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "doc-dept-box" }, [
- vue.createTextVNode(
- vue.toDisplayString($data.doctor.position) + " ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "line" }),
- vue.createTextVNode(
- " " + vue.toDisplayString($data.department.deptName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "doc-his-box" },
- vue.toDisplayString($data.hospital.hospitalName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "doc-desc-box" }, [
- vue.createElementVNode("view", {
- class: "doc-desc-cont",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_doctor/doctorInfo?doctorId=" + $data.doctor.doctorId))
- }, [
- vue.createElementVNode(
- "view",
- { class: "desc-cont ellipsis2" },
- " " + vue.toDisplayString($data.doctor.speciality),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "title" }, "擅长:"),
- vue.createElementVNode("view", { class: "btn" }, "详情")
- ]),
- vue.createElementVNode("view", {
- class: "doc-desc-cont",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_doctor/doctorInfo?doctorId=" + $data.doctor.doctorId))
- }, [
- vue.createElementVNode(
- "view",
- { class: "desc-cont ellipsis2" },
- " " + vue.toDisplayString($data.doctor.introduction),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "title" }, "介绍:"),
- vue.createElementVNode("view", { class: "btn" }, "详情")
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "count-box" }, [
- vue.createElementVNode("view", { class: "count-item" }, [
- vue.createElementVNode(
- "view",
- { class: "count yellow" },
- vue.toDisplayString($data.doctor.pingStar) + "分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "好评")
- ]),
- vue.createElementVNode("view", { class: "count-item" }, [
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString($data.doctor.orderNumber),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "接诊量")
- ]),
- vue.createElementVNode("view", { class: "count-item" }, [
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString($data.doctor.speed) + "分钟",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "平均响应")
- ]),
- vue.createElementVNode("view", { class: "count-item" }, [
- vue.createElementVNode("view", { class: "count" }, "0"),
- vue.createElementVNode("view", { class: "name" }, "粉丝数")
- ])
- ]),
- $data.doctor != null && $data.doctor.prices != null && $data.doctor.prices.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "price-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.doctor.prices, (price, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "price-item",
- onClick: ($event) => $options.doInquiry(price)
- }, [
- vue.createElementVNode("view", { class: "p-left" }, [
- price.type == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/645f3f298a264882b48e529342fc4074.png"
- })) : vue.createCommentVNode("v-if", true),
- price.type == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/45e904a9e74f4d1da771936a4b83f015.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "price-name" }, [
- vue.createElementVNode("view", { class: "price" }, [
- price.type == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "title"
- }, "图文问诊")) : vue.createCommentVNode("v-if", true),
- price.type == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "title"
- }, "视频问诊")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "money" },
- vue.toDisplayString(price.price.toFixed(2)) + "/次",
- 1
- /* TEXT */
- )
- ]),
- price.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "price-desc"
- }, " 与医生图文交流 ")) : vue.createCommentVNode("v-if", true),
- price.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "price-desc"
- }, " 与医生视频交流 ")) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "p-right" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass($data.doctor.workStatus == 1 ? "btn" : "btn gray")
- },
- " 去咨询 ",
- 2
- /* CLASS */
- )
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(` <view class="his-box">\r
- <view class="title-box">\r
- <view class="title">执业医院</view>\r
- </view>\r
- <view class="his" @click="navTo('/pages/index/hospitalDetails?hospitalId='+hospital.hospitalId)">\r
- <view class="left">\r
- <view class="his-name">\r
- {{hospital.hospitalName}}\r
- </view>\r
- <view class="his-desc" v-if="hospital.hospitalType!=null">\r
- {{hospital.hospitalType}}\r
- </view>\r
- </view>\r
- <view class="right">\r
- <image src="/static/images/icon_arrow_r.png"></image>\r
- </view>\r
- </view>\r
- </view> `),
- 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> '),
- vue.createElementVNode("view", { class: "ping-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- "患者评价(" + vue.toDisplayString($data.pings.length) + ")",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "more",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("./doctorPingList?doctorId=" + $data.doctorId))
- }, [
- vue.createElementVNode("view", null, "更多"),
- vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
- ])
- ]),
- $data.pings.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "ping-list"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.pings, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "ping-item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: item.avatar == null ? "/static/images/detault_head.jpg" : item.avatar
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "user-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "user-name" },
- vue.toDisplayString(item.nickName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "ping-star" }, [
- vue.createVNode(_component_u_rate, {
- activeColor: "#ffc603",
- count: "5",
- readonly: "",
- modelValue: item.pingStar,
- "onUpdate:modelValue": ($event) => item.pingStar = $event
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "ping-cont" },
- vue.toDisplayString(item.pingContent),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "ping-time" },
- vue.toDisplayString(item.pingTime),
- 1
- /* TEXT */
- )
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$1B = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- total: 0,
- doctorId: null,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad(options) {
- this.doctorId = options.doctorId;
- },
- methods: {
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- doctorId: this.doctorId,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getDoctorPingList(data).then((res) => {
- if (res.code == 200) {
- this.total = res.data.total;
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "ping-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- "患者评价(" + vue.toDisplayString($data.total) + ")",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "ping-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "ping-item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: item.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/dfdd555016854b0d9fb623937238729f.jpg" : item.avatar
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "user-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "user-name" },
- vue.toDisplayString(item.nickName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "ping-star" }, [
- vue.createVNode(_component_u_rate, {
- activeColor: "#ffc603",
- count: "5",
- readonly: "",
- modelValue: item.pingStar,
- "onUpdate:modelValue": ($event) => item.pingStar = $event
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "ping-cont" },
- vue.toDisplayString(item.pingContent),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "ping-time" },
- vue.toDisplayString(item.pingTime),
- 1
- /* TEXT */
- )
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$1A = {
- data() {
- return {
- isFollow: false,
- doctorId: null,
- doctor: null,
- department: null,
- hospital: null,
- pings: []
- };
- },
- onLoad(options) {
- this.doctorId = options.doctorId;
- },
- onShow() {
- this.getDoctorDetails();
- },
- methods: {
- showImg() {
- var data = [];
- data.push(this.doctor.avatar);
- uni.previewImage({
- current: 0,
- urls: data
- });
- },
- getDoctorDetails() {
- var data = {
- doctorId: this.doctorId
- };
- getDoctorDetails(data).then((res) => {
- if (res.code == 200) {
- this.doctor = res.data.doctor;
- this.department = res.data.department;
- this.hospital = res.data.hospital;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- }
- }
- };
- function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- onClick: _cache[0] || (_cache[0] = ($event) => $options.showImg()),
- src: $data.doctor.avatar,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString($data.doctor.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-ping" }, [
- vue.createVNode(_component_u_rate, {
- activeColor: "#ffc603",
- count: "5",
- readonly: "",
- modelValue: $data.doctor.pingStar,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.doctor.pingStar = $event)
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "doc-dept-box" },
- vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-his-box" },
- vue.toDisplayString($data.hospital.hospitalName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "擅长方向")
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.doctor.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "医生介绍")
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc" },
- vue.toDisplayString($data.doctor.introduction),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$1z = {
- data() {
- return {
- imgs: []
- };
- },
- onLoad(options) {
- this.doctorId = options.doctorId;
- },
- onShow() {
- this.getDoctorDetails();
- },
- methods: {
- showImg(index2) {
- uni.previewImage({
- current: index2,
- urls: this.imgs
- });
- },
- getDoctorDetails() {
- var data = {
- doctorId: this.doctorId
- };
- this.imgs = [];
- getDoctorDetails(data).then((res) => {
- if (res.code == 200) {
- this.doctor = res.data.doctor;
- if (this.doctor.certificateImages != null) {
- this.imgs.concat(this.doctor.certificateImages);
- }
- if (this.doctor.practiseImages != null) {
- this.imgs.concat(this.doctor.practiseImages);
- }
- formatAppLog("log", "at pages_doctor/doctorImgs.vue:49", this.imgs);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- }
- }
- };
- function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "imgs" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.imgs, (img, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "img" }, [
- vue.createElementVNode("image", {
- onClick: ($event) => $options.showImg(index2),
- src: img
- }, null, 8, ["onClick", "src"])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]);
- }
- 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"]]);
- let request$8 = new Request$1().http;
- function confirm(data) {
- return request$8("/app/inquiryOrder/confirm", data, "POST", "application/json;charset=UTF-8");
- }
- function create(data) {
- return request$8("/app/inquiryOrder/create", data, "POST", "application/json;charset=UTF-8");
- }
- function pay$1(data) {
- return request$8("/app/inquiryOrder/pay", data, "POST", "application/json;charset=UTF-8");
- }
- function compute$1(data) {
- return request$8("/app/inquiryOrder/compute", data, "POST", "application/json;charset=UTF-8");
- }
- function payment$1(data) {
- return request$8("/app/inquiryOrder/payment", data, "POST", "application/json;charset=UTF-8");
- }
- function cancel(data) {
- return request$8("/app/inquiryOrder/cancel", data, "POST", "application/json;charset=UTF-8");
- }
- function getMyInquiryOrderList(data) {
- return request$8("/app/inquiryOrder/getMyInquiryOrderList", data, "GET");
- }
- function getMyInquiryOrderById(data) {
- return request$8("/app/inquiryOrder/getMyInquiryOrderById", data, "GET");
- }
- function getMyInquiryOrderPingList(data) {
- return request$8("/app/inquiryOrder/getMyInquiryOrderPingList", data, "GET");
- }
- function getInquiryOrderById(data) {
- return request$8("/app/inquiryOrder/getInquiryOrderById", data, "GET");
- }
- function getCompanyUserInquiryOrderById(data) {
- return request$8("/app/inquiryOrder/getCompanyUserInquiryOrderById", data, "GET");
- }
- function pingOrder(data) {
- return request$8("/app/inquiryOrder/pingOrder", data, "POST", "application/json;charset=UTF-8");
- }
- function getInquiryTemp(data) {
- return request$8("/app/inquiryOrder/getInquiryTemp", data, "GET");
- }
- function getInquiryOrderReport(data) {
- return request$8("/app/inquiryOrder/getInquiryOrderReport", data, "GET");
- }
- function getCompanyUserInquiryOrderList(data) {
- return request$8("/app/inquiryOrder/getCompanyUserInquiryOrderList", data, "GET");
- }
- const _sfc_main$1y = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- orderStatusOptions: [],
- orderTypeOptions: [],
- inquiryTypeOptions: [],
- tabs: [
- {
- id: 2,
- name: "快速问诊"
- },
- {
- id: 1,
- name: "专家问诊"
- },
- {
- id: 3,
- name: "开药问诊"
- }
- ],
- inquiryType: 2,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_inquiry_order_type");
- this.getDictByKey("sys_inquiry_type");
- this.getDictByKey("sys_inquiry_status");
- var that = this;
- uni.$on("refreshInquiryOrder", () => {
- that.mescroll.resetUpScroll();
- });
- },
- onShow() {
- },
- methods: {
- cancel(item) {
- uni.showModal({
- title: "提示",
- content: "确认取消订单吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: item.orderId };
- cancel(data).then(
- (res2) => {
- if (res2.code == 200) {
- this.mescroll.resetUpScroll();
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- ping(item) {
- uni.navigateTo({
- url: "/pages_order/pingOrder?orderId=" + item.orderId
- });
- },
- pay(item) {
- uni.navigateTo({
- url: "/pages_order/inquiryPay?orderId=" + item.orderId
- });
- },
- toIM(item) {
- var id = "C2CD-" + item.doctorId;
- store.commit("timStore/setType", "startInquiry");
- store.commit("timStore/setOrderType", item.orderType);
- store.commit("timStore/setImType", 1);
- store.commit("timStore/setFollowId", 0);
- store.commit("timStore/setOrderId", item.orderId);
- store.commit("timStore/setConversationID", id);
- uni.$TUIKit.TUIConversationServer.setMessageRead(id);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
- var _a;
- const { conversation } = res.data;
- store.commit("timStore/setConversation", conversation);
- let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
- conversation.userProfile;
- url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}&orderId=` + item.orderId;
- uni.redirectTo({ url: url2 });
- }).catch((err) => {
- formatAppLog("warn", "at pages_order/inquiryOrderList.vue:215", "获取 group profile 异常 = ", err);
- });
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_inquiry_order_type") {
- this.orderTypeOptions = res.data;
- }
- if (key == "sys_inquiry_type") {
- this.inquiryTypeOptions = res.data;
- }
- if (key == "sys_inquiry_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- inquiryTypeChange(item) {
- this.inquiryType = item.id;
- formatAppLog("log", "at pages_order/inquiryOrderList.vue:241", item);
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- inquiryType: this.inquiryType,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMyInquiryOrderList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.inquiryTypeChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-item",
- onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
- }, [
- vue.createElementVNode("view", { class: "order-top" }, [
- item.doctorId != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "left"
- }, [
- vue.createElementVNode("image", {
- class: "head",
- mode: "aspectFill",
- src: item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "dept" },
- vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- item.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "left"
- }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title"
- }, " 支付后为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "title"
- }, " 正在为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
- item.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "title"
- }, " 订单已取消 ")) : vue.createCommentVNode("v-if", true),
- item.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "title"
- }, " 订单已退款 ")) : vue.createCommentVNode("v-if", true),
- item.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "title"
- }, " 医生已拒单 ")) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 3,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 4,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 5,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 6,
- class: "status gray"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "order-cont" }, [
- vue.createElementVNode("view", { class: "order-type" }, [
- vue.createTextVNode(" 订单类型: "),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, item.inquiryType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, item.orderType)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "order-desc" },
- "病情描述:" + vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "order-time-box" }, [
- vue.createElementVNode(
- "view",
- { class: "order-time" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "right" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: vue.withModifiers(($event) => $options.pay(item), ["stop"])
- }, "去支付", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn",
- onClick: vue.withModifiers(($event) => $options.cancel(item), ["stop"])
- }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status == 4 && item.isPing == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "btn",
- onClick: vue.withModifiers(($event) => $options.ping(item), ["stop"])
- }, "去评价", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "btn",
- onClick: vue.withModifiers(($event) => $options.toIM(item), ["stop"])
- }, "去咨询", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const props$j = {
- props: {
- // 文字颜色
- color: {
- type: String,
- default: props$y.link.color
- },
- // 字体大小,单位px
- fontSize: {
- type: [String, Number],
- default: props$y.link.fontSize
- },
- // 是否显示下划线
- underLine: {
- type: Boolean,
- default: props$y.link.underLine
- },
- // 要跳转的链接
- href: {
- type: String,
- default: props$y.link.href
- },
- // 小程序中复制到粘贴板的提示语
- mpTips: {
- type: String,
- default: props$y.link.mpTips
- },
- // 下划线颜色
- lineColor: {
- type: String,
- default: props$y.link.lineColor
- },
- // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
- text: {
- type: String,
- default: props$y.link.text
- }
- }
- };
- const _sfc_main$1x = {
- name: "u-link",
- mixins: [mpMixin, mixin, props$j],
- computed: {
- linkStyle() {
- const style = {
- color: this.color,
- fontSize: uni.$u.addUnit(this.fontSize),
- // line-height设置为比字体大小多2px
- lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
- textDecoration: this.underLine ? "underline" : "none"
- };
- return style;
- }
- },
- methods: {
- openLink() {
- plus.runtime.openURL(this.href);
- this.$emit("click");
- }
- }
- };
- function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- class: "u-link",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])),
- style: vue.normalizeStyle([$options.linkStyle, _ctx.$u.addStyle(_ctx.customStyle)])
- },
- vue.toDisplayString(_ctx.text),
- 5
- /* TEXT, STYLE */
- );
- }
- const __easycom_1$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"]]);
- const value = {
- computed: {
- // 经处理后需要显示的值
- value() {
- const {
- text,
- mode,
- format: format2,
- href
- } = this;
- if (mode === "price") {
- if (!/^\d+(\.\d+)?$/.test(text)) {
- uni.$u.error("金额模式下,text参数需要为金额格式");
- }
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- return uni.$u.priceFormat(text, 2);
- }
- if (mode === "date") {
- !uni.$u.test.date(text) && uni.$u.error("日期模式下,text参数需要为日期或时间戳格式");
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- if (format2) {
- return uni.$u.timeFormat(text, format2);
- }
- return uni.$u.timeFormat(text, "yyyy-mm-dd");
- }
- if (mode === "phone") {
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- if (format2 === "encrypt") {
- return `${text.substr(0, 3)}****${text.substr(7)}`;
- }
- return text;
- }
- if (mode === "name") {
- !(typeof text === "string") && uni.$u.error("姓名模式下,text参数需要为字符串格式");
- if (uni.$u.test.func(format2)) {
- return format2(text);
- }
- if (format2 === "encrypt") {
- return this.formatName(text);
- }
- return text;
- }
- if (mode === "link") {
- !uni.$u.test.url(href) && uni.$u.error("超链接模式下,href参数需要为URL格式");
- return text;
- }
- return text;
- }
- },
- methods: {
- // 默认的姓名脱敏规则
- formatName(name) {
- let value2 = "";
- if (name.length === 2) {
- value2 = name.substr(0, 1) + "*";
- } else if (name.length > 2) {
- let char = "";
- for (let i = 0, len = name.length - 2; i < len; i++) {
- char += "*";
- }
- value2 = name.substr(0, 1) + char + name.substr(-1, 1);
- } else {
- value2 = name;
- }
- return value2;
- }
- }
- };
- const button = {
- props: {
- lang: String,
- sessionFrom: String,
- sendMessageTitle: String,
- sendMessagePath: String,
- sendMessageImg: String,
- showMessageCard: Boolean,
- appParameter: String,
- formType: String,
- openType: String
- }
- };
- const openType = {
- props: {
- openType: String
- },
- methods: {
- onGetUserInfo(event) {
- this.$emit("getuserinfo", event.detail);
- },
- onContact(event) {
- this.$emit("contact", event.detail);
- },
- onGetPhoneNumber(event) {
- this.$emit("getphonenumber", event.detail);
- },
- onError(event) {
- this.$emit("error", event.detail);
- },
- onLaunchApp(event) {
- this.$emit("launchapp", event.detail);
- },
- onOpenSetting(event) {
- this.$emit("opensetting", event.detail);
- }
- }
- };
- const props$i = {
- props: {
- // 主题颜色
- type: {
- type: String,
- default: props$y.text.type
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$y.text.show
- },
- // 显示的值
- text: {
- type: [String, Number],
- default: props$y.text.text
- },
- // 前置图标
- prefixIcon: {
- type: String,
- default: props$y.text.prefixIcon
- },
- // 后置图标
- suffixIcon: {
- type: String,
- default: props$y.text.suffixIcon
- },
- // 文本处理的匹配模式
- // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
- mode: {
- type: String,
- default: props$y.text.mode
- },
- // mode=link下,配置的链接
- href: {
- type: String,
- default: props$y.text.href
- },
- // 格式化规则
- format: {
- type: [String, Function],
- default: props$y.text.format
- },
- // mode=phone时,点击文本是否拨打电话
- call: {
- type: Boolean,
- default: props$y.text.call
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: props$y.text.openType
- },
- // 是否粗体,默认normal
- bold: {
- type: Boolean,
- default: props$y.text.bold
- },
- // 是否块状
- block: {
- type: Boolean,
- default: props$y.text.block
- },
- // 文本显示的行数,如果设置,超出此行数,将会显示省略号
- lines: {
- type: [String, Number],
- default: props$y.text.lines
- },
- // 文本颜色
- color: {
- type: String,
- default: props$y.text.color
- },
- // 字体大小
- size: {
- type: [String, Number],
- default: props$y.text.size
- },
- // 图标的样式
- iconStyle: {
- type: [Object, String],
- default: props$y.text.iconStyle
- },
- // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
- decoration: {
- tepe: String,
- default: props$y.text.decoration
- },
- // 外边距,对象、字符串,数值形式均可
- margin: {
- type: [Object, String, Number],
- default: props$y.text.margin
- },
- // 文本行高
- lineHeight: {
- type: [String, Number],
- default: props$y.text.lineHeight
- },
- // 文本对齐方式,可选值left|center|right
- align: {
- type: String,
- default: props$y.text.align
- },
- // 文字换行,可选值break-word|normal|anywhere
- wordWrap: {
- type: String,
- default: props$y.text.wordWrap
- }
- }
- };
- const _sfc_main$1w = {
- name: "u--text",
- mixins: [mpMixin, mixin, value, props$i],
- emits: ["click"],
- computed: {
- valueStyle() {
- const style = {
- textDecoration: this.decoration,
- fontWeight: this.bold ? "bold" : "normal",
- wordWrap: this.wordWrap,
- fontSize: uni.$u.addUnit(this.size)
- };
- !this.type && (style.color = this.color);
- this.isNvue && this.lines && (style.lines = this.lines);
- this.lineHeight && (style.lineHeight = uni.$u.addUnit(this.lineHeight));
- !this.isNvue && this.block && (style.display = "block");
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- isNvue() {
- let nvue = false;
- return nvue;
- },
- isMp() {
- let mp = false;
- return mp;
- }
- },
- data() {
- return {};
- },
- methods: {
- clickHandler() {
- if (this.call && this.mode === "phone") {
- uni.makePhoneCall({
- phoneNumber: this.text
- });
- }
- this.$emit("click");
- }
- }
- };
- function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_1$3);
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-text", []]),
- style: vue.normalizeStyle({
- margin: _ctx.margin,
- justifyContent: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end"
- }),
- onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]),
- style: vue.normalizeStyle([$options.valueStyle])
- },
- "¥",
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-text__prefix-icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.prefixIcon,
- customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
- }, null, 8, ["name", "customStyle"])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, {
- key: 2,
- text: _ctx.value,
- href: _ctx.href,
- underLine: ""
- }, null, 8, ["text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", {
- key: 3,
- class: "u-reset-button u-text__value",
- style: vue.normalizeStyle([$options.valueStyle]),
- "data-index": _ctx.index,
- openType: _ctx.openType,
- onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
- onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)),
- onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
- onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)),
- onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
- onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
- lang: _ctx.lang,
- "session-from": _ctx.sessionFrom,
- "send-message-title": _ctx.sendMessageTitle,
- "send-message-path": _ctx.sendMessagePath,
- "send-message-img": _ctx.sendMessageImg,
- "show-message-card": _ctx.showMessageCard,
- "app-parameter": _ctx.appParameter
- }, vue.toDisplayString(_ctx.value), 45, ["data-index", "openType", "lang", "session-from", "send-message-title", "send-message-path", "send-message-img", "show-message-card", "app-parameter"])) : (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 4,
- class: vue.normalizeClass(["u-text__value", [
- _ctx.type && `u-text__value--${_ctx.type}`,
- _ctx.lines && `u-line-${_ctx.lines}`
- ]]),
- style: vue.normalizeStyle([$options.valueStyle])
- },
- vue.toDisplayString(_ctx.value),
- 7
- /* TEXT, CLASS, STYLE */
- )),
- _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "u-text__suffix-icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.suffixIcon,
- customStyle: _ctx.$u.addStyle(_ctx.iconStyle)
- }, null, 8, ["name", "customStyle"])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true);
- }
- const 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"]]);
- const _sfc_main$1v = {
- name: "u--text",
- mixins: [mpMixin, mixin, props$i],
- components: {
- uvText
- }
- };
- function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uvText = vue.resolveComponent("uvText");
- return vue.openBlock(), vue.createBlock(_component_uvText, {
- type: _ctx.type,
- show: _ctx.show,
- text: _ctx.text,
- prefixIcon: _ctx.prefixIcon,
- suffixIcon: _ctx.suffixIcon,
- mode: _ctx.mode,
- href: _ctx.href,
- format: _ctx.format,
- call: _ctx.call,
- openType: _ctx.openType,
- bold: _ctx.bold,
- block: _ctx.block,
- lines: _ctx.lines,
- color: _ctx.color,
- decoration: _ctx.decoration,
- size: _ctx.size,
- iconStyle: _ctx.iconStyle,
- margin: _ctx.margin,
- lineHeight: _ctx.lineHeight,
- align: _ctx.align,
- wordWrap: _ctx.wordWrap,
- customStyle: _ctx.customStyle
- }, null, 8, ["type", "show", "text", "prefixIcon", "suffixIcon", "mode", "href", "format", "call", "openType", "bold", "block", "lines", "color", "decoration", "size", "iconStyle", "margin", "lineHeight", "align", "wordWrap", "customStyle"]);
- }
- const __easycom_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"]]);
- const props$h = {
- props: {
- // 图片地址,Array<String>|Array<Object>形式
- urls: {
- type: Array,
- default: props$y.album.urls
- },
- // 指定从数组的对象元素中读取哪个属性作为图片地址
- keyName: {
- type: String,
- default: props$y.album.keyName
- },
- // 单图时,图片长边的长度
- singleSize: {
- type: [String, Number],
- default: props$y.album.singleSize
- },
- // 多图时,图片边长
- multipleSize: {
- type: [String, Number],
- default: props$y.album.multipleSize
- },
- // 多图时,图片水平和垂直之间的间隔
- space: {
- type: [String, Number],
- default: props$y.album.space
- },
- // 单图时,图片缩放裁剪的模式
- singleMode: {
- type: String,
- default: props$y.album.singleMode
- },
- // 多图时,图片缩放裁剪的模式
- multipleMode: {
- type: String,
- default: props$y.album.multipleMode
- },
- // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
- maxCount: {
- type: [String, Number],
- default: props$y.album.maxCount
- },
- // 是否可以预览图片
- previewFullImage: {
- type: Boolean,
- default: props$y.album.previewFullImage
- },
- // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
- rowCount: {
- type: [String, Number],
- default: props$y.album.rowCount
- },
- // 超出maxCount时是否显示查看更多的提示
- showMore: {
- type: Boolean,
- default: props$y.album.showMore
- }
- }
- };
- const _sfc_main$1u = {
- name: "u-album",
- mixins: [mpMixin, mixin, props$h],
- data() {
- return {
- // 单图的宽度
- singleWidth: 0,
- // 单图的高度
- singleHeight: 0,
- // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比
- singlePercent: 0.6
- };
- },
- watch: {
- urls: {
- immediate: true,
- handler(newVal) {
- if (newVal.length === 1) {
- this.getImageRect();
- }
- }
- }
- },
- computed: {
- imageStyle() {
- return (index1, index2) => {
- const { space, rowCount, multipleSize, urls } = this, { addUnit: addUnit2, addStyle: addStyle2 } = uni.$u, rowLen = this.showUrls.length;
- this.urls.length;
- const style = {
- marginRight: addUnit2(space),
- marginBottom: addUnit2(space)
- };
- if (index1 === rowLen)
- style.marginBottom = 0;
- if (index2 === rowCount || index1 === rowLen && index2 === this.showUrls[index1 - 1].length)
- style.marginRight = 0;
- return style;
- };
- },
- // 将数组划分为二维数组
- showUrls() {
- const arr = [];
- this.urls.map((item, index2) => {
- if (index2 + 1 <= this.maxCount) {
- const itemIndex = Math.floor(index2 / this.rowCount);
- if (!arr[itemIndex]) {
- arr[itemIndex] = [];
- }
- arr[itemIndex].push(item);
- }
- });
- return arr;
- },
- imageWidth() {
- return uni.$u.addUnit(
- this.urls.length === 1 ? this.singleWidth : this.multipleSize
- );
- },
- imageHeight() {
- return uni.$u.addUnit(
- this.urls.length === 1 ? this.singleHeight : this.multipleSize
- );
- },
- // 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度
- // 因为用户在某些特殊的情况下,需要让文字与相册的宽度相等,所以这里事件的形式对外发送
- albumWidth() {
- let width = 0;
- if (this.urls.length === 1) {
- width = this.singleWidth;
- } else {
- width = this.showUrls[0].length * this.multipleSize + this.space * (this.showUrls[0].length - 1);
- }
- this.$emit("albumWidth", width);
- return width;
- }
- },
- methods: {
- // 预览图片
- onPreviewTap(url2) {
- const urls = this.urls.map((item) => {
- return this.getSrc(item);
- });
- uni.previewImage({
- current: url2,
- urls
- });
- },
- // 获取图片的路径
- getSrc(item) {
- return uni.$u.test.object(item) ? this.keyName && item[this.keyName] || item.src : item;
- },
- // 单图时,获取图片的尺寸
- // 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸
- // 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent)
- getImageRect() {
- const src = this.getSrc(this.urls[0]);
- uni.getImageInfo({
- src,
- success: (res) => {
- const isHorizotal = res.width >= res.height;
- this.singleWidth = isHorizotal ? this.singleSize : res.width / res.height * this.singleSize;
- this.singleHeight = !isHorizotal ? this.singleSize : res.height / res.width * this.singleWidth;
- },
- fail: () => {
- this.getComponentWidth();
- }
- });
- },
- // 获取组件的宽度
- async getComponentWidth() {
- await uni.$u.sleep(30);
- this.$uGetRect(".u-album__row").then((size) => {
- this.singleWidth = size.width * this.singlePercent;
- });
- }
- }
- };
- function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u__text = resolveEasycom(vue.resolveDynamicComponent("u--text"), __easycom_0$5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-album" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($options.showUrls, (arr, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-album__row",
- ref_for: true,
- ref: "u-album__row",
- forComputedUse: $options.albumWidth,
- key: index2
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(arr, (item, index1) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-album__row__wrapper",
- key: index1,
- style: vue.normalizeStyle([$options.imageStyle(index2 + 1, index1 + 1)]),
- onClick: ($event) => _ctx.previewFullImage ? $options.onPreviewTap($options.getSrc(item)) : ""
- }, [
- vue.createElementVNode("image", {
- src: $options.getSrc(item),
- mode: _ctx.urls.length === 1 ? $options.imageHeight > 0 ? _ctx.singleMode : "widthFix" : _ctx.multipleMode,
- style: vue.normalizeStyle([
- {
- width: $options.imageWidth,
- height: $options.imageHeight
- }
- ])
- }, null, 12, ["src", "mode"]),
- _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", {
- key: 0,
- class: "u-album__row__wrapper__text"
- }, [
- vue.createVNode(_component_u__text, {
- text: `+${_ctx.urls.length - _ctx.maxCount}`,
- color: "#fff",
- size: _ctx.multipleSize * 0.3,
- align: "center",
- customStyle: "justify-content: center"
- }, null, 8, ["text", "size"])
- ])) : vue.createCommentVNode("v-if", true)
- ], 12, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 8, ["forComputedUse"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]);
- }
- 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"]]);
- const _sfc_main$1t = {
- data() {
- return {
- report: null,
- patient: null,
- hospital: null,
- department: null,
- doctor: null,
- order: null,
- orderId: null,
- orderStatusOptions: [],
- orderTypeOptions: [],
- inquiryTypeOptions: [],
- reportImages: [],
- tongueImages: [],
- faceImages: []
- // forms:[],
- };
- },
- onLoad(options) {
- this.orderId = options.orderId;
- this.getDictByKey("sys_inquiry_order_type");
- this.getDictByKey("sys_inquiry_type");
- this.getDictByKey("sys_inquiry_status");
- },
- onShow() {
- this.getMyInquiryOrderById();
- },
- methods: {
- cancel() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确认取消订单吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: this.orderId };
- cancel(data).then(
- (res2) => {
- if (res2.code == 200) {
- that.getMyInquiryOrderById();
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- ping() {
- uni.navigateTo({
- url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId
- });
- },
- pay() {
- uni.navigateTo({
- url: "/pages_order/inquiryPay?orderId=" + this.orderId
- });
- },
- toIM() {
- var that = this;
- var id = "C2CD-" + this.doctor.doctorId;
- store.commit("timStore/setType", "startInquiry");
- store.commit("timStore/setOrderType", this.order.orderType);
- store.commit("timStore/setOrderId", this.order.orderId);
- store.commit("timStore/setFollowId", 0);
- store.commit("timStore/setImType", 1);
- store.commit("timStore/setConversationID", id);
- uni.$TUIKit.TUIConversationServer.setMessageRead(id);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
- var _a;
- uni.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => {
- formatAppLog("log", "at pages_order/inquiryOrderDetails.vue:394", "更新order");
- }).catch((err) => {
- });
- formatAppLog("log", "at pages_order/inquiryOrderDetails.vue:399", res);
- const { conversation } = res.data;
- store.commit("timStore/setConversation", conversation);
- let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
- conversation.userProfile;
- url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
- uni.redirectTo({ url: url2 });
- }).catch((err) => {
- formatAppLog("warn", "at pages_order/inquiryOrderDetails.vue:412", "获取 group profile 异常 = ", err);
- });
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- copyOrderSn() {
- uni.setClipboardData({
- data: this.order.orderSn,
- success: function() {
- uni.showToast({
- title: "复制成功",
- icon: "none"
- });
- }
- });
- },
- getMyInquiryOrderById() {
- var that = this;
- var data = { orderId: this.orderId };
- getMyInquiryOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.data.order;
- this.report = res.data.report;
- this.patient = JSON.parse(res.data.order.patientJson);
- if (that.patient.reportImages != null) {
- that.reportImages = that.patient.reportImages.split(",");
- }
- if (that.patient.tongueImages != null) {
- that.tongueImages = that.patient.tongueImages.split(",");
- }
- if (that.patient.faceImages != null) {
- that.faceImages = that.patient.faceImages.split(",");
- }
- this.doctor = res.data.doctor;
- this.department = res.data.department;
- this.hospital = res.data.hospital;
- }
- },
- (err) => {
- }
- );
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_inquiry_order_type") {
- this.orderTypeOptions = res.data;
- }
- if (key == "sys_inquiry_type") {
- this.inquiryTypeOptions = res.data;
- }
- if (key == "sys_inquiry_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- const _component_u_album = resolveEasycom(vue.resolveDynamicComponent("u-album"), __easycom_1$2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "付款详情"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单类型:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
- 1
- /* TEXT */
- )
- ]),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 3,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 4,
- class: "status gray"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.doctor != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "doc-box"
- }, [
- vue.createElementVNode("view", { class: "title" }, "医生详情"),
- vue.createElementVNode("view", { class: "doc-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString($data.doctor.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-star" }, [
- vue.createVNode(_component_u_rate, {
- activeColor: "#ffc603",
- count: "5",
- readonly: "",
- modelValue: $data.doctor.pingStar,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.doctor.pingStar = $event)
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "doc-dept-box" },
- vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-his-box" },
- vue.toDisplayString($data.hospital.hospitalName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-spec-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "title" }, "擅长:"),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString($data.doctor.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId))
- }, "详情")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null && $data.order.inquiryType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "咨询内容"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者信息:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "病情描述:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患病时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.duration),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "就诊情况:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.isVisit),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null && $data.order.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "咨询内容"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者信息:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "身高(CM):"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.height),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "体重(KG):"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.weight),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "联系电话:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.mobile),
- 1
- /* TEXT */
- )
- ])
- ]),
- 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> '),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "用药情况:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.medication),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "期望会诊方式:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.usage),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "病情描述:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.drugs),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.duration),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.isVisit),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "面部照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null && $data.order.inquiryType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "咨询内容"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者信息:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "病情描述:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.drugs),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.duration),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.isVisit),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "面部照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- 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> '),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单号码:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "item-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.copyOrderSn && $options.copyOrderSn(...args))
- }, "复制")
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.money.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn-box"
- }, [
- $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId))
- }, "查看报告")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.toIM())
- }, "去问诊")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "btn",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.pay())
- }, "去支付")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "btn",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.cancel())
- }, "取消订单")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 4 && $data.order.isPing == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "btn",
- onClick: _cache[7] || (_cache[7] = ($event) => $options.ping())
- }, "去评价")) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$1s = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- },
- methods: {
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMyInquiryOrderPingList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createVNode(_component_mescroll_body, {
- top: "0rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "doctor-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => $options.navTo("../doctor/doctorDetails?doctorId=" + item.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "ping-star" }, [
- vue.createVNode(_component_u_rate, {
- activeColor: "#ffc603",
- count: "5",
- readonly: "",
- modelValue: item.pingStar,
- "onUpdate:modelValue": ($event) => item.pingStar = $event
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "doc-ping-content" },
- vue.toDisplayString(item.pingContent),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-ping-time" },
- vue.toDisplayString(item.pingTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const _sfc_main$1r = {
- data() {
- return {
- isShare: null,
- companyId: null,
- companyUserId: null,
- inquiryType: null,
- prices: []
- };
- },
- onLoad(options) {
- if (!this.$isEmpty(options.isShare)) {
- this.isShare = options.isShare;
- } else {
- uni.hideShareMenu();
- }
- this.inquiryType = options.inquiryType;
- this.companyId = options.companyId;
- this.companyUserId = options.companyUserId;
- },
- onShow() {
- this.getConfigByKey();
- },
- onShareAppMessage(res) {
- uni.showShareMenu({
- withShareTicket: true
- });
- wx.updateShareMenu({
- isPrivateMessage: true,
- withShareTicket: false,
- success(res2) {
- formatAppLog("log", "at pages_order/inquirySelect.vue:66", "updateShareMenu: ", res2);
- },
- fail() {
- }
- });
- return {
- title: "御君方互联网医院--健康会诊",
- path: "/pages_order/inquirySelect?inquiryType=3&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- };
- },
- methods: {
- getConfigByKey() {
- let data = { key: "his.inquiryConfig" };
- getConfigByKey(data).then(
- (res) => {
- if (res.code == 200) {
- var data2 = JSON.parse(res.data);
- this.prices = data2.prices;
- formatAppLog("log", "at pages_order/inquirySelect.vue:85", this.prices);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- doInquiryForm(price) {
- this.$isLogin().then(
- (res) => {
- formatAppLog("log", "at pages_order/inquirySelect.vue:99", res);
- if (res) {
- if (this.inquiryType == 1) {
- uni.navigateTo({
- url: "/pages_order/inquiryForm1?inquiryType=" + this.inquiryType + "&orderType=" + price.type
- });
- } else if (this.inquiryType == 3) {
- uni.navigateTo({
- url: "/pages_order/inquiryForm3?inquiryType=" + this.inquiryType + "&orderType=" + price.type + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- });
- }
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- }
- }
- };
- function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f06ec63771984f3b9f9aa65eb0c17eeb.png" })
- ]),
- vue.createElementVNode("view", { class: "title" }, "20秒快速匹配专家医生"),
- vue.createElementVNode("view", { class: "cont" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.prices, (price, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "inquiry-item",
- onClick: ($event) => $options.doInquiryForm(price)
- }, [
- price.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "left"
- }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/939cf3ad7d1a4186a7195e84a1db84bf.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- "图文问诊 " + vue.toDisplayString(price.price) + "/次",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, "和医生1对1在线图文问诊")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- price.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "left"
- }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/cf80011807af45c9af1bea6c4cf4bb3a.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- "视频问诊 " + vue.toDisplayString(price.price) + "/次",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, "和医生1对1在线视频问诊")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", { src: "/static/images/icon_arrow_r.png" })
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$1q = {
- data() {
- return {
- companyId: null,
- companyUserId: null,
- isShare: null
- };
- },
- onLoad(options) {
- this.isShare = options.isShare;
- this.companyId = options.companyId;
- this.companyUserId = options.companyUserId;
- },
- onShow() {
- },
- methods: {
- doInquiryForm(type2) {
- this.$isLogin().then(
- (res) => {
- formatAppLog("log", "at pages_order/inquirySelectType.vue:123", res);
- if (res) {
- if (type2 == 1 || type2 == 2 || type2 == 6 || type2 == 5 || type2 == 7 || type2 == 8 || type2 == 9 || type2 == 10) {
- uni.navigateTo({
- url: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + type2 + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&isShare=" + this.isShare
- });
- } else if (type2 == 3) {
- uni.navigateTo({
- url: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + type2 + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&isShare=" + this.isShare
- });
- }
- } else {
- uni.navigateTo({
- url: "/pages/auth/login"
- });
- }
- }
- );
- }
- }
- };
- function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont-bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/42d328f9604947eea86b6331ff7013e6.jpg" })
- ]),
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("view"),
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/65d12607ca874b0d8536c7201a0dfa97.png" })
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.doInquiryForm(1))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "翟佳滨教授专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.doInquiryForm(2))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "红彦主任专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.doInquiryForm(6))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "史士昊老师专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.doInquiryForm(5))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "张然丁教授专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.doInquiryForm(7))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "丁玉球教授专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.doInquiryForm(8))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "杜丁主任专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.doInquiryForm(9))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "王洋主任专家团队 会诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队会诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[7] || (_cache[7] = ($event) => $options.doInquiryForm(10))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "御君方互联网医院 VIP问诊"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队问诊咨询")
- ])
- ])
- ]),
- vue.createElementVNode("view", {
- class: "inquiry-item",
- onClick: _cache[8] || (_cache[8] = ($event) => $options.doInquiryForm(3))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/33a4d6077e394d37a920c45ca10f8c4d.png" }),
- vue.createElementVNode("view", { class: "inquiry-cont" }, [
- vue.createElementVNode("view", { class: "name" }, "御君方互联网医院 问诊咨询"),
- vue.createElementVNode("view", { class: "desc" }, "医疗专家团队问诊咨询")
- ])
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const props$g = {
- props: {
- // 是否开启顶部安全区适配
- safeAreaInsetTop: {
- type: Boolean,
- default: props$y.navbar.safeAreaInsetTop
- },
- // 固定在顶部时,是否生成一个等高元素,以防止塌陷
- placeholder: {
- type: Boolean,
- default: props$y.navbar.placeholder
- },
- // 是否固定在顶部
- fixed: {
- type: Boolean,
- default: props$y.navbar.fixed
- },
- // 是否显示下边框
- border: {
- type: Boolean,
- default: props$y.navbar.border
- },
- // 左边的图标
- leftIcon: {
- type: String,
- default: props$y.navbar.leftIcon
- },
- // 左边的提示文字
- leftText: {
- type: String,
- default: props$y.navbar.leftText
- },
- // 左右的提示文字
- rightText: {
- type: String,
- default: props$y.navbar.rightText
- },
- // 右边的图标
- rightIcon: {
- type: String,
- default: props$y.navbar.rightIcon
- },
- // 标题
- title: {
- type: [String, Number],
- default: props$y.navbar.title
- },
- // 背景颜色
- bgColor: {
- type: String,
- default: props$y.navbar.bgColor
- },
- // 标题的宽度
- titleWidth: {
- type: [String, Number],
- default: props$y.navbar.titleWidth
- },
- // 导航栏高度
- height: {
- type: [String, Number],
- default: props$y.navbar.height
- },
- // 左侧返回图标的大小
- leftIconSize: {
- type: [String, Number],
- default: props$y.navbar.leftIconSize
- },
- // 左侧返回图标的颜色
- leftIconColor: {
- type: String,
- default: props$y.navbar.leftIconColor
- },
- // 点击左侧区域(返回图标),是否自动返回上一页
- autoBack: {
- type: Boolean,
- default: props$y.navbar.autoBack
- },
- // 标题的样式,对象或字符串
- titleStyle: {
- type: [String, Object],
- default: props$y.navbar.titleStyle
- }
- }
- };
- const _sfc_main$1p = {
- name: "u-navbar",
- mixins: [mpMixin, mixin, props$g],
- data() {
- return {};
- },
- methods: {
- // 点击左侧区域
- leftClick() {
- this.$emit("leftClick");
- if (this.autoBack) {
- uni.navigateBack();
- }
- },
- // 点击右侧区域
- rightClick() {
- this.$emit("rightClick");
- }
- }
- };
- function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$b);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-navbar" }, [
- _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-navbar__placeholder",
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
- })
- },
- null,
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"])
- },
- [
- _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, {
- key: 0,
- bgColor: _ctx.bgColor
- }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]),
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.height),
- backgroundColor: _ctx.bgColor
- })
- },
- [
- vue.createElementVNode("view", {
- class: "u-navbar__content__left",
- "hover-class": "u-navbar__content__left--hover",
- "hover-start-time": "150",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "left", {}, () => [
- _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.leftIcon,
- size: _ctx.leftIconSize,
- color: _ctx.leftIconColor
- }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true),
- _ctx.leftText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- style: vue.normalizeStyle({
- color: _ctx.leftIconColor
- }),
- class: "u-navbar__content__left__text"
- },
- vue.toDisplayString(_ctx.leftText),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true)
- ]),
- vue.renderSlot(_ctx.$slots, "center", {}, () => [
- vue.createElementVNode(
- "text",
- {
- class: "u-line-1 u-navbar__content__title",
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.titleWidth)
- }, _ctx.$u.addStyle(_ctx.titleStyle)])
- },
- vue.toDisplayString(_ctx.title),
- 5
- /* TEXT, STYLE */
- )
- ], true),
- _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-navbar__content__right",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "right", {}, () => [
- _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: _ctx.rightIcon,
- size: "20"
- }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true),
- _ctx.rightText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-navbar__content__right__text"
- },
- vue.toDisplayString(_ctx.rightText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], true)
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )
- ],
- 2
- /* CLASS */
- )
- ]);
- }
- const __easycom_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"]]);
- const props$f = {
- props: {
- // 显示文字
- title: {
- type: String,
- default: props$y.alert.title
- },
- // 主题,success/warning/info/error
- type: {
- type: String,
- default: props$y.alert.type
- },
- // 辅助性文字
- description: {
- type: String,
- default: props$y.alert.description
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: props$y.alert.closable
- },
- // 是否显示图标
- showIcon: {
- type: Boolean,
- default: props$y.alert.showIcon
- },
- // 浅或深色调,light-浅色,dark-深色
- effect: {
- type: String,
- default: props$y.alert.effect
- },
- // 文字是否居中
- center: {
- type: Boolean,
- default: props$y.alert.center
- },
- // 字体大小
- fontSize: {
- type: [String, Number],
- default: props$y.alert.fontSize
- }
- }
- };
- const _sfc_main$1o = {
- name: "u-alert",
- mixins: [mpMixin, mixin, props$f],
- data() {
- return {
- show: true
- };
- },
- computed: {
- iconColor() {
- return this.effect === "light" ? this.type : "#fff";
- },
- // 不同主题对应不同的图标
- iconName() {
- switch (this.type) {
- case "success":
- return "checkmark-circle-fill";
- case "error":
- return "close-circle-fill";
- case "warning":
- return "error-circle-fill";
- case "info":
- return "info-circle-fill";
- case "primary":
- return "more-circle-fill";
- default:
- return "error-circle-fill";
- }
- }
- },
- methods: {
- // 点击内容
- clickHandler() {
- this.$emit("click");
- },
- // 点击关闭按钮
- closeHandler() {
- this.show = false;
- }
- }
- };
- function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- mode: "fade",
- show: $data.show
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]),
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-alert__icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: $options.iconName,
- size: "18",
- color: $options.iconColor
- }, null, 8, ["name", "color"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- {
- class: "u-alert__content",
- style: vue.normalizeStyle([{
- paddingRight: _ctx.closable ? "20px" : 0
- }])
- },
- [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
- style: vue.normalizeStyle([{
- fontSize: _ctx.$u.addUnit(_ctx.fontSize),
- textAlign: _ctx.center ? "center" : "left"
- }])
- },
- vue.toDisplayString(_ctx.title),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- _ctx.description ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]),
- style: vue.normalizeStyle([{
- fontSize: _ctx.$u.addUnit(_ctx.fontSize),
- textAlign: _ctx.center ? "center" : "left"
- }])
- },
- vue.toDisplayString(_ctx.description),
- 7
- /* TEXT, CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 4
- /* STYLE */
- ),
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-alert__close",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"]))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- color: $options.iconColor,
- size: "15"
- }, null, 8, ["color"])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- )
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show"]);
- }
- const __easycom_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"]]);
- const props$e = {
- props: {
- // 输入框的内容
- value: {
- type: [String, Number],
- default: props$y.textarea.value
- },
- // 输入框的内容
- modelValue: {
- type: [String, Number],
- default: props$y.textarea.value
- },
- // 输入框为空时占位符
- placeholder: {
- type: [String, Number],
- default: props$y.textarea.placeholder
- },
- // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
- placeholderClass: {
- type: String,
- default: props$y.input.placeholderClass
- },
- // 指定placeholder的样式
- placeholderStyle: {
- type: [String, Object],
- default: props$y.input.placeholderStyle
- },
- // 输入框高度
- height: {
- type: [String, Number],
- default: props$y.textarea.height
- },
- // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
- confirmType: {
- type: String,
- default: props$y.textarea.confirmType
- },
- // 是否禁用
- disabled: {
- type: Boolean,
- default: props$y.textarea.disabled
- },
- // 是否显示统计字数
- count: {
- type: Boolean,
- default: props$y.textarea.count
- },
- // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
- focus: {
- type: Boolean,
- default: props$y.textarea.focus
- },
- // 是否自动增加高度
- autoHeight: {
- type: Boolean,
- default: props$y.textarea.autoHeight
- },
- // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
- fixed: {
- type: Boolean,
- default: props$y.textarea.fixed
- },
- // 指定光标与键盘的距离
- cursorSpacing: {
- type: Number,
- default: props$y.textarea.cursorSpacing
- },
- // 指定focus时的光标位置
- cursor: {
- type: [String, Number],
- default: props$y.textarea.cursor
- },
- // 是否显示键盘上方带有”完成“按钮那一栏,
- showConfirmBar: {
- type: Boolean,
- default: props$y.textarea.showConfirmBar
- },
- // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
- selectionStart: {
- type: Number,
- default: props$y.textarea.selectionStart
- },
- // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
- selectionEnd: {
- type: Number,
- default: props$y.textarea.selectionEnd
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: props$y.textarea.adjustPosition
- },
- // 是否去掉 iOS 下的默认内边距,只微信小程序有效
- disableDefaultPadding: {
- type: Boolean,
- default: props$y.textarea.disableDefaultPadding
- },
- // focus时,点击页面的时候不收起键盘,只微信小程序有效
- holdKeyboard: {
- type: Boolean,
- default: props$y.textarea.holdKeyboard
- },
- // 最大输入长度,设置为 -1 的时候不限制最大长度
- maxlength: {
- type: [String, Number],
- default: props$y.textarea.maxlength
- },
- // 边框类型,surround-四周边框,bottom-底部边框
- border: {
- type: String,
- default: props$y.textarea.border
- },
- // 用于处理或者过滤输入框内容的方法
- formatter: {
- type: [Function, null],
- default: props$y.textarea.formatter
- },
- // 是否忽略组件内对文本合成系统事件的处理
- ignoreCompositionEvent: {
- type: Boolean,
- default: true
- }
- }
- };
- const _sfc_main$1n = {
- name: "u-textarea",
- mixins: [mpMixin, mixin, props$e],
- data() {
- return {
- // 输入框的值
- innerValue: "",
- // 是否处于获得焦点状态
- focused: false,
- // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
- firstChange: true,
- // value绑定值的变化是由内部还是外部引起的
- changeFromInner: false,
- // 过滤处理方法
- innerFormatter: (value2) => value2
- };
- },
- created() {
- },
- watch: {
- modelValue: {
- immediate: true,
- handler(newVal, oldVal) {
- this.innerValue = newVal;
- this.firstChange = false;
- this.changeFromInner = false;
- }
- }
- },
- computed: {
- // 组件的类名
- textareaClass() {
- let classes = [], { border, disabled } = this;
- border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"]));
- border === "bottom" && (classes = classes.concat([
- "u-border-bottom",
- "u-textarea--no-radius"
- ]));
- disabled && classes.push("u-textarea--disabled");
- return classes.join(" ");
- },
- // 组件的样式
- textareaStyle() {
- const style = {};
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"],
- methods: {
- // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
- setFormatter(e) {
- this.innerFormatter = e;
- },
- onFocus(e) {
- this.$emit("focus", e);
- },
- onBlur(e) {
- this.$emit("blur", e);
- uni.$u.formValidate(this, "blur");
- },
- onLinechange(e) {
- this.$emit("linechange", e);
- },
- onInput(e) {
- let { value: value2 = "" } = e.detail || {};
- const formatter = this.formatter || this.innerFormatter;
- const formatValue = formatter(value2);
- this.innerValue = value2;
- this.$nextTick(() => {
- this.innerValue = formatValue;
- this.valueChange();
- });
- },
- // 内容发生变化,进行处理
- valueChange() {
- const value2 = this.innerValue;
- this.$nextTick(() => {
- this.$emit("update:modelValue", value2);
- this.changeFromInner = true;
- this.$emit("change", value2);
- uni.$u.formValidate(this, "change");
- });
- },
- onConfirm(e) {
- this.$emit("confirm", e);
- },
- onKeyboardheightchange(e) {
- this.$emit("keyboardheightchange", e);
- }
- }
- };
- function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-textarea", $options.textareaClass]),
- style: vue.normalizeStyle([$options.textareaStyle])
- },
- [
- vue.createElementVNode("textarea", {
- class: "u-textarea__field",
- value: $data.innerValue,
- style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.height) }),
- placeholder: _ctx.placeholder,
- "placeholder-style": _ctx.$u.addStyle(_ctx.placeholderStyle, "string"),
- "placeholder-class": _ctx.placeholderClass,
- disabled: _ctx.disabled,
- focus: _ctx.focus,
- autoHeight: _ctx.autoHeight,
- fixed: _ctx.fixed,
- cursorSpacing: _ctx.cursorSpacing,
- cursor: _ctx.cursor,
- showConfirmBar: _ctx.showConfirmBar,
- selectionStart: _ctx.selectionStart,
- selectionEnd: _ctx.selectionEnd,
- adjustPosition: _ctx.adjustPosition,
- disableDefaultPadding: _ctx.disableDefaultPadding,
- holdKeyboard: _ctx.holdKeyboard,
- maxlength: _ctx.maxlength,
- "confirm-type": _ctx.confirmType,
- ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
- onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)),
- onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
- onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)),
- onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)),
- onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
- onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args))
- }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]),
- _ctx.count ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-textarea__count",
- style: vue.normalizeStyle({
- "background-color": _ctx.disabled ? "transparent" : "#fff"
- })
- },
- vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const 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"]]);
- const _sfc_main$1m = {
- name: "u--textarea",
- mixins: [mpMixin, props$e, mixin],
- components: {
- uvTextarea
- }
- };
- function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_uvTextarea = vue.resolveComponent("uvTextarea");
- return vue.openBlock(), vue.createBlock(_component_uvTextarea, {
- value: _ctx.value,
- modelValue: _ctx.modelValue,
- placeholder: _ctx.placeholder,
- height: _ctx.height,
- confirmType: _ctx.confirmType,
- disabled: _ctx.disabled,
- count: _ctx.count,
- focus: _ctx.focus,
- autoHeight: _ctx.autoHeight,
- fixed: _ctx.fixed,
- cursorSpacing: _ctx.cursorSpacing,
- cursor: _ctx.cursor,
- showConfirmBar: _ctx.showConfirmBar,
- selectionStart: _ctx.selectionStart,
- selectionEnd: _ctx.selectionEnd,
- adjustPosition: _ctx.adjustPosition,
- disableDefaultPadding: _ctx.disableDefaultPadding,
- holdKeyboard: _ctx.holdKeyboard,
- maxlength: _ctx.maxlength,
- border: _ctx.border,
- customStyle: _ctx.customStyle,
- formatter: _ctx.formatter,
- ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
- onInput: _cache[0] || (_cache[0] = (e) => _ctx.$emit("input", e)),
- "onUpdate:modelValue": _cache[1] || (_cache[1] = (e) => _ctx.$emit("update:modelValue", e))
- }, 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"]);
- }
- 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"]]);
- const props$d = {
- props: {
- // radio的名称
- name: {
- type: [String, Number, Boolean],
- default: props$y.radio.name
- },
- // 形状,square为方形,circle为圆型
- shape: {
- type: String,
- default: props$y.radio.shape
- },
- // 是否禁用
- disabled: {
- type: [String, Boolean],
- default: props$y.radio.disabled
- },
- // 是否禁止点击提示语选中单选框
- labelDisabled: {
- type: [String, Boolean],
- default: props$y.radio.labelDisabled
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$y.radio.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$y.radio.inactiveColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$y.radio.iconSize
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$y.radio.labelSize
- },
- // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
- label: {
- type: [String, Number],
- default: props$y.radio.label
- },
- // 整体的大小
- size: {
- type: [String, Number],
- default: props$y.radio.size
- },
- // 图标颜色
- color: {
- type: String,
- default: props$y.radio.color
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$y.radio.labelColor
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$y.radio.iconColor
- }
- }
- };
- const _sfc_main$1l = {
- name: "u-radio",
- mixins: [mpMixin, mixin, props$d],
- data() {
- return {
- checked: false,
- // 当你看到这段代码的时候,
- // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
- // 故只能使用如此方法
- parentData: {
- iconSize: 12,
- labelDisabled: null,
- disabled: null,
- shape: null,
- activeColor: null,
- inactiveColor: null,
- size: 18,
- value: null,
- modelValue: null,
- iconColor: null,
- placement: "row",
- borderBottom: false,
- iconPlacement: "left"
- }
- };
- },
- computed: {
- // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
- elDisabled() {
- return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
- },
- // 是否禁用label点击
- elLabelDisabled() {
- return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
- },
- // 组件尺寸,对应size的值,默认值为21px
- elSize() {
- return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
- },
- // 组件的勾选图标的尺寸,默认12px
- elIconSize() {
- return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
- },
- // 组件选中激活时的颜色
- elActiveColor() {
- return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
- },
- // 组件选未中激活时的颜色
- elInactiveColor() {
- return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
- },
- // label的颜色
- elLabelColor() {
- return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
- },
- // 组件的形状
- elShape() {
- return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
- },
- // label大小
- elLabelSize() {
- return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
- },
- elIconColor() {
- const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
- if (this.elDisabled) {
- return this.checked ? this.elInactiveColor : "transparent";
- } else {
- return this.checked ? iconColor : "transparent";
- }
- },
- iconClasses() {
- let classes = [];
- classes.push("u-radio__icon-wrap--" + this.elShape);
- if (this.elDisabled) {
- classes.push("u-radio__icon-wrap--disabled");
- }
- if (this.checked && this.elDisabled) {
- classes.push("u-radio__icon-wrap--disabled--checked");
- }
- return classes;
- },
- iconWrapStyle() {
- const style = {};
- style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff";
- style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
- style.width = uni.$u.addUnit(this.elSize);
- style.height = uni.$u.addUnit(this.elSize);
- if (this.parentData.iconPlacement === "right") {
- style.marginRight = 0;
- }
- return style;
- },
- radioStyle() {
- const style = {};
- if (this.parentData.borderBottom && this.parentData.placement === "row") {
- uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效");
- }
- if (this.parentData.borderBottom && this.parentData.placement === "column") {
- style.paddingBottom = uni.$u.os() === "ios" ? "12px" : "8px";
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.updateParentData();
- if (!this.parent) {
- uni.$u.error("u-radio必须搭配u-radio-group组件使用");
- }
- this.checked = this.name === this.parentData.modelValue;
- },
- updateParentData() {
- this.getParentData("u-radio-group");
- },
- // 点击图标
- iconClickHandler(e) {
- this.preventEvent(e);
- if (!this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- // 横向两端排列时,点击组件即可触发选中事件
- wrapperClickHandler(e) {
- this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
- },
- // 点击label
- labelClickHandler(e) {
- this.preventEvent(e);
- if (!this.elLabelDisabled && !this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- emitEvent() {
- if (!this.checked) {
- this.$emit("change", this.name);
- this.$nextTick(() => {
- uni.$u.formValidate(this, "change");
- });
- }
- },
- // 改变组件选中状态
- // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
- // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
- setRadioCheckedStatus() {
- this.emitEvent();
- this.checked = true;
- typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
- }
- }
- };
- function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-radio", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
- onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([$options.radioStyle])
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-radio__icon-wrap", $options.iconClasses]),
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([$options.iconWrapStyle])
- },
- [
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
- vue.createVNode(_component_u_icon, {
- class: "u-radio__icon-wrap__icon",
- name: "checkbox-mark",
- size: $options.elIconSize,
- color: $options.elIconColor
- }, null, 8, ["size", "color"])
- ], true)
- ],
- 6
- /* CLASS, STYLE */
- ),
- vue.createElementVNode(
- "text",
- {
- class: "u-radio__text",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle({
- color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
- fontSize: $options.elLabelSize,
- lineHeight: $options.elLabelSize
- })
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_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"]]);
- const props$c = {
- props: {
- // 绑定的值
- modelValue: {
- type: [String, Number, Boolean],
- default: props$y.radioGroup.value
- },
- // 是否禁用全部radio
- disabled: {
- type: Boolean,
- default: props$y.radioGroup.disabled
- },
- // 形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$y.radioGroup.shape
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$y.radioGroup.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$y.radioGroup.inactiveColor
- },
- // 标识符
- name: {
- type: String,
- default: props$y.radioGroup.name
- },
- // 整个组件的尺寸,默认px
- size: {
- type: [String, Number],
- default: props$y.radioGroup.size
- },
- // 布局方式,row-横向,column-纵向
- placement: {
- type: String,
- default: props$y.radioGroup.placement
- },
- // label的文本
- label: {
- type: [String],
- default: props$y.radioGroup.label
- },
- // label的颜色 (默认 '#303133' )
- labelColor: {
- type: [String],
- default: props$y.radioGroup.labelColor
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$y.radioGroup.labelSize
- },
- // 是否禁止点击文本操作checkbox(默认 false )
- labelDisabled: {
- type: Boolean,
- default: props$y.radioGroup.labelDisabled
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$y.radioGroup.iconColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$y.radioGroup.iconSize
- },
- // 竖向配列时,是否显示下划线
- borderBottom: {
- type: Boolean,
- default: props$y.radioGroup.borderBottom
- },
- // 图标与文字的对齐方式
- iconPlacement: {
- type: String,
- default: props$y.radio.iconPlacement
- }
- }
- };
- const _sfc_main$1k = {
- name: "u-radio-group",
- mixins: [mpMixin, mixin, props$c],
- computed: {
- // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
- // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)
- // 拉取父组件新的变化后的参数
- parentData() {
- return [
- this.modelValue,
- this.disabled,
- this.inactiveColor,
- this.activeColor,
- this.size,
- this.labelDisabled,
- this.shape,
- this.iconSize,
- this.borderBottom,
- this.placement
- ];
- },
- bemClass() {
- return this.bem("radio-group", ["placement"]);
- }
- },
- watch: {
- // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
- parentData() {
- if (this.children.length) {
- this.children.map((child) => {
- typeof child.init === "function" && child.init();
- });
- }
- }
- },
- data() {
- return {};
- },
- created() {
- this.children = [];
- },
- emits: ["update:modelValue", "change"],
- methods: {
- // 将其他的radio设置为未选中的状态
- unCheckedOther(childInstance) {
- this.children.map((child) => {
- if (childInstance !== child) {
- child.checked = false;
- }
- });
- const {
- name
- } = childInstance;
- this.$emit("update:modelValue", name);
- this.$emit("change", name);
- }
- }
- };
- function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-radio-group", $options.bemClass])
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 2
- /* CLASS */
- );
- }
- const __easycom_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"]]);
- function pickExclude(obj, keys) {
- if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) {
- return {};
- }
- return Object.keys(obj).reduce((prev, key) => {
- if (!keys.includes(key)) {
- prev[key] = obj[key];
- }
- return prev;
- }, {});
- }
- function formatImage(res) {
- return res.tempFiles.map((item) => ({
- ...pickExclude(item, ["path"]),
- type: "image",
- url: item.path,
- thumb: item.path,
- size: item.size
- }));
- }
- function formatVideo(res) {
- return [
- {
- ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]),
- type: "video",
- url: res.tempFilePath,
- thumb: res.thumbTempFilePath,
- size: res.size
- }
- ];
- }
- function chooseFile({
- accept,
- multiple,
- capture,
- compressed,
- maxDuration,
- sizeType,
- camera,
- maxCount
- }) {
- return new Promise((resolve, reject2) => {
- switch (accept) {
- case "image":
- uni.chooseImage({
- count: multiple ? Math.min(maxCount, 9) : 1,
- sourceType: capture,
- sizeType,
- success: (res) => resolve(formatImage(res)),
- fail: reject2
- });
- break;
- case "video":
- uni.chooseVideo({
- sourceType: capture,
- compressed,
- maxDuration,
- camera,
- success: (res) => resolve(formatVideo(res)),
- fail: reject2
- });
- break;
- }
- });
- }
- const mixinUp = {
- watch: {
- // 监听accept的变化,判断是否符合个平台要求
- // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
- accept: {
- immediate: true,
- handler(val) {
- if (val === "all" || val === "media") {
- uni.$u.error("只有微信小程序才支持把accept配置为all、media之一");
- }
- if (val === "file") {
- uni.$u.error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file");
- }
- }
- }
- }
- };
- const props$b = {
- props: {
- // 接受的文件类型, 可选值为all media image file video
- accept: {
- type: String,
- default: props$y.upload.accept
- },
- // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
- capture: {
- type: [String, Array],
- default: props$y.upload.capture
- },
- // 当accept为video时生效,是否压缩视频,默认为true
- compressed: {
- type: Boolean,
- default: props$y.upload.compressed
- },
- // 当accept为video时生效,可选值为back或front
- camera: {
- type: String,
- default: props$y.upload.camera
- },
- // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
- maxDuration: {
- type: Number,
- default: props$y.upload.maxDuration
- },
- // 上传区域的图标,只能内置图标
- uploadIcon: {
- type: String,
- default: props$y.upload.uploadIcon
- },
- // 上传区域的图标的颜色,默认
- uploadIconColor: {
- type: String,
- default: props$y.upload.uploadIconColor
- },
- // 是否开启文件读取前事件
- useBeforeRead: {
- type: Boolean,
- default: props$y.upload.useBeforeRead
- },
- // 读取后的处理函数
- afterRead: {
- type: Function,
- default: null
- },
- // 读取前的处理函数
- beforeRead: {
- type: Function,
- default: null
- },
- // 是否显示组件自带的图片预览功能
- previewFullImage: {
- type: Boolean,
- default: props$y.upload.previewFullImage
- },
- // 最大上传数量
- maxCount: {
- type: [String, Number],
- default: props$y.upload.maxCount
- },
- // 是否启用
- disabled: {
- type: Boolean,
- default: props$y.upload.disabled
- },
- // 预览上传的图片时的裁剪模式,和image组件mode属性一致
- imageMode: {
- type: String,
- default: props$y.upload.imageMode
- },
- // 标识符,可以在回调函数的第二项参数中获取
- name: {
- type: String,
- default: props$y.upload.name
- },
- // 所选的图片的尺寸, 可选值为original compressed
- sizeType: {
- type: Array,
- default: props$y.upload.sizeType
- },
- // 是否开启图片多选,部分安卓机型不支持
- multiple: {
- type: Boolean,
- default: props$y.upload.multiple
- },
- // 是否展示删除按钮
- deletable: {
- type: Boolean,
- default: props$y.upload.deletable
- },
- // 文件大小限制,单位为byte
- maxSize: {
- type: [String, Number],
- default: props$y.upload.maxSize
- },
- // 显示已上传的文件列表
- fileList: {
- type: Array,
- default: props$y.upload.fileList
- },
- // 上传区域的提示文字
- uploadText: {
- type: String,
- default: props$y.upload.uploadText
- },
- // 内部预览图片区域和选择图片按钮的区域宽度
- width: {
- type: [String, Number],
- default: props$y.upload.width
- },
- // 内部预览图片区域和选择图片按钮的区域高度
- height: {
- type: [String, Number],
- default: props$y.upload.height
- },
- // 是否在上传完成后展示预览图
- previewImage: {
- type: Boolean,
- default: props$y.upload.previewImage
- }
- }
- };
- const _sfc_main$1j = {
- name: "u-upload",
- mixins: [mpMixin, mixin, mixinUp, props$b],
- data() {
- return {
- lists: [],
- isInCount: true
- };
- },
- watch: {
- // 监听文件列表的变化,重新整理内部数据
- fileList: {
- immediate: true,
- handler() {
- this.formatFileList();
- },
- immediate: true,
- deep: true
- }
- },
- emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"],
- methods: {
- formatFileList() {
- const {
- fileList = [],
- maxCount
- } = this;
- const lists = fileList.map(
- (item) => Object.assign(Object.assign({}, item), {
- // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理
- isImage: this.accept === "image" || uni.$u.test.image(item.url || item.thumb),
- isVideo: this.accept === "video" || uni.$u.test.video(item.url || item.thumb),
- deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable
- })
- );
- this.lists = lists;
- this.isInCount = lists.length < maxCount;
- },
- chooseFile() {
- const {
- maxCount,
- multiple,
- lists,
- disabled
- } = this;
- if (disabled)
- return;
- let capture;
- try {
- capture = uni.$u.test.array(this.capture) ? this.capture : this.capture.split(",");
- } catch (e) {
- capture = [];
- }
- chooseFile(
- Object.assign({
- accept: this.accept,
- multiple: this.multiple,
- capture,
- compressed: this.compressed,
- maxDuration: this.maxDuration,
- sizeType: this.sizeType,
- camera: this.camera
- }, {
- maxCount: maxCount - lists.length
- })
- ).then((res) => {
- this.onBeforeRead(multiple ? res : res[0]);
- }).catch((error2) => {
- this.$emit("error", error2);
- });
- },
- // 文件读取之前
- onBeforeRead(file) {
- const {
- beforeRead,
- useBeforeRead
- } = this;
- let res = true;
- if (uni.$u.test.func(beforeRead)) {
- res = beforeRead(file, this.getDetail());
- }
- if (useBeforeRead) {
- res = new Promise((resolve, reject2) => {
- this.$emit(
- "beforeRead",
- Object.assign(Object.assign({
- file
- }, this.getDetail()), {
- callback: (ok) => {
- ok ? resolve() : reject2();
- }
- })
- );
- });
- }
- if (!res) {
- return;
- }
- if (uni.$u.test.promise(res)) {
- res.then((data) => this.onAfterRead(data || file));
- } else {
- this.onAfterRead(file);
- }
- },
- getDetail(index2) {
- return {
- name: this.name,
- index: index2 == null ? this.fileList.length : index2
- };
- },
- onAfterRead(file) {
- const {
- maxSize,
- afterRead
- } = this;
- const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize;
- if (oversize) {
- this.$emit("oversize", Object.assign({
- file
- }, this.getDetail()));
- return;
- }
- if (typeof afterRead === "function") {
- afterRead(file, this.getDetail());
- }
- this.$emit("afterRead", Object.assign({
- file
- }, this.getDetail()));
- },
- deleteItem(index2) {
- this.$emit(
- "delete",
- Object.assign(Object.assign({}, this.getDetail(index2)), {
- file: this.fileList[index2]
- })
- );
- },
- // 预览图片
- onPreviewImage(item) {
- if (!item.isImage || !this.previewFullImage)
- return;
- uni.previewImage({
- // 先filter找出为图片的item,再返回filter结果中的图片url
- urls: this.lists.filter((item2) => this.accept === "image" || uni.$u.test.image(item2.url || item2.thumb)).map((item2) => item2.url || item2.thumb),
- current: item.url || item.thumb,
- fail() {
- uni.$u.toast("预览图片失败");
- }
- });
- },
- onPreviewVideo(event) {
- if (!this.data.previewFullImage)
- return;
- const {
- index: index2
- } = event.currentTarget.dataset;
- const {
- lists
- } = this.data;
- wx.previewMedia({
- sources: lists.filter((item) => isVideoFile(item)).map(
- (item) => Object.assign(Object.assign({}, item), {
- type: "video"
- })
- ),
- current: index2,
- fail() {
- uni.$u.toast("预览视频失败");
- }
- });
- },
- onClickPreview(event) {
- const {
- index: index2
- } = event.currentTarget.dataset;
- const item = this.data.lists[index2];
- this.$emit(
- "clickPreview",
- Object.assign(Object.assign({}, item), this.getDetail(index2))
- );
- }
- }
- };
- function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-upload",
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)])
- },
- [
- vue.createElementVNode("view", { class: "u-upload__wrap" }, [
- _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.lists, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "u-upload__wrap__preview",
- key: index2
- }, [
- item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: item.thumb || item.url,
- mode: _ctx.imageMode,
- class: "u-upload__wrap__preview__image",
- onClick: ($event) => $options.onPreviewImage(item),
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- }])
- }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-upload__wrap__preview__other"
- }, [
- vue.createVNode(_component_u_icon, {
- color: "#80CBF9",
- size: "26",
- name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder"
- }, null, 8, ["name"]),
- vue.createElementVNode(
- "text",
- { class: "u-upload__wrap__preview__other__text" },
- vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"),
- 1
- /* TEXT */
- )
- ])),
- item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "u-upload__status"
- }, [
- vue.createElementVNode("view", { class: "u-upload__status__icon" }, [
- item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 0,
- name: "close-circle",
- color: "#ffffff",
- size: "25"
- })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
- key: 1,
- size: "22",
- mode: "circle",
- color: "#ffffff"
- }))
- ]),
- item.message ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-upload__status__message"
- },
- vue.toDisplayString(item.message),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "u-upload__deletable",
- onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- color: "#ffffff",
- size: "10"
- })
- ])
- ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "u-upload__success"
- }, [
- vue.createElementVNode("view", { class: "u-upload__success__icon" }, [
- vue.createVNode(_component_u_icon, {
- name: "checkmark",
- color: "#ffffff",
- size: "12"
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- $data.isInCount ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args))
- }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]),
- "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "",
- "hover-stay-time": "150",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)),
- style: vue.normalizeStyle([{
- width: _ctx.$u.addUnit(_ctx.width),
- height: _ctx.$u.addUnit(_ctx.height)
- }])
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.uploadIcon,
- size: "26",
- color: _ctx.uploadIconColor
- }, null, 8, ["name", "color"]),
- _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-upload__button__text"
- },
- vue.toDisplayString(_ctx.uploadText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], 14, ["hover-class"]))
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ],
- 4
- /* STYLE */
- );
- }
- const __easycom_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"]]);
- const _sfc_main$1i = {
- data() {
- return {
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- orderKey: null,
- patient: null,
- durations: [
- {
- name: "一周内",
- disabled: false
- },
- {
- name: "一个月内",
- disabled: false
- },
- {
- name: "半年内",
- disabled: false
- },
- {
- name: "半年以上",
- disabled: false
- }
- ],
- isVisits: [
- {
- name: "未就诊",
- disabled: false
- },
- {
- name: "就诊过",
- disabled: false
- }
- ],
- title: "",
- isVisit: "就诊过",
- duration: "一周内",
- inquiryType: null,
- orderType: null,
- doctorId: null,
- fileList1: []
- };
- },
- onLoad(options) {
- this.inquiryType = options.inquiryType;
- this.orderType = options.orderType;
- this.doctorId = options.doctorId;
- formatAppLog("log", "at pages_order/inquiryForm1.vue:147", this.inquiryType);
- formatAppLog("log", "at pages_order/inquiryForm1.vue:148", this.orderType);
- formatAppLog("log", "at pages_order/inquiryForm1.vue:149", this.doctorId);
- this.confirm();
- },
- onShow() {
- var that = this;
- uni.$on("refreshOrderPatient", (res) => {
- that.patient = res;
- });
- },
- methods: {
- leftClick() {
- formatAppLog("log", "at pages_order/inquiryForm1.vue:160", "leftClick");
- uni.showModal({
- title: "提示",
- content: "确认关闭吗",
- success: function(res) {
- if (res.confirm) {
- uni.navigateBack();
- } else if (res.cancel)
- ;
- }
- });
- },
- submitOrder() {
- if (this.patient == null) {
- uni.showToast({
- icon: "none",
- title: "请选择就诊人"
- });
- return;
- }
- if (this.orderKey == null) {
- this.confirm();
- }
- var images = [];
- this.fileList1.forEach(function(element) {
- images.push(element.url);
- });
- var data = {
- orderKey: this.orderKey,
- patientId: this.patient.patientId,
- title: this.title,
- isVisit: this.isVisit,
- duration: this.duration,
- inquiryType: this.inquiryType,
- orderType: this.orderType,
- doctorId: this.doctorId,
- reportImages: images.toString()
- };
- uni.showLoading({
- title: "正在处理中..."
- });
- create(data).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
- uni.requestSubscribeMessage({
- tmplIds: temps,
- success(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res.order.orderId
- });
- }, 200);
- },
- fail(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res.order.orderId
- });
- }, 200);
- }
- });
- return;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- confirm() {
- let data = {};
- confirm(data).then(
- (res) => {
- if (res.code == 200) {
- this.orderKey = res.orderKey;
- }
- },
- (rej) => {
- }
- );
- },
- addPatient() {
- uni.navigateTo({
- url: "/pages_user/patient"
- });
- },
- deletePic(event) {
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- async afterRead(event) {
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: "uploading",
- message: "上传中"
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: "success",
- message: "",
- url: result
- }));
- fileListLen++;
- }
- },
- uploadFilePromise(url2) {
- return new Promise((resolve, reject2) => {
- uni.uploadFile({
- url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
- // 仅为示例,非真实的接口地址
- filePath: url2,
- name: "file",
- formData: {
- user: "test"
- },
- success: (res) => {
- setTimeout(() => {
- formatAppLog("log", "at pages_order/inquiryForm1.vue:288", JSON.parse(res.data).url);
- resolve(JSON.parse(res.data).url);
- }, 1e3);
- }
- });
- });
- }
- }
- };
- function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_navbar, {
- title: "症状描述",
- onLeftClick: $options.leftClick
- }, null, 8, ["onLeftClick"])
- ]),
- vue.createElementVNode("view", { class: "main" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createVNode(_component_u_alert, {
- fontSize: "16",
- type: "primary",
- description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
- }),
- vue.createElementVNode("view", { class: "chose-patient" }, [
- $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "value" }, "请点击添加"),
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "patient",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.patient.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "red-dot" }, "*"),
- vue.createElementVNode("view", { class: "title" }, "请描述您的病情")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u__textarea, {
- maxlength: "500",
- modelValue: $data.title,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.title = $event),
- placeholder: "请输入内容",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "red-dot" }, "*"),
- vue.createElementVNode("view", { class: "title" }, "本次患病多久了?")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $data.duration,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.duration = $event),
- iconPlacement: "left"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.durations, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginRight: "5px" },
- key: index2,
- label: item.name,
- name: item.name,
- activeColor: "#C39A58"
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "red-dot" }, "*"),
- vue.createElementVNode("view", { class: "title" }, "此次病情是否去医院就诊过?")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $data.isVisit,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.isVisit = $event),
- iconPlacement: "left"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.isVisits, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginRight: "5px" },
- key: index2,
- label: item.name,
- name: item.name,
- activeColor: "#C39A58"
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title" }, "上传检测报告或患处照片?")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList1,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "1",
- maxCount: 5
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.submitOrder())
- }, "提交订单")
- ])
- ]);
- }
- 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"]]);
- const props$a = {
- props: {
- // 绑定的值
- modelValue: {
- type: [String, Number],
- default: props$y.input.value
- },
- // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
- // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
- // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
- // text-文本输入键盘
- type: {
- type: String,
- default: props$y.input.type
- },
- // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
- // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
- fixed: {
- type: Boolean,
- default: props$y.input.fixed
- },
- // 是否禁用输入框
- disabled: {
- type: Boolean,
- default: props$y.input.disabled
- },
- // 禁用状态时的背景色
- disabledColor: {
- type: String,
- default: props$y.input.disabledColor
- },
- // 是否显示清除控件
- clearable: {
- type: Boolean,
- default: props$y.input.clearable
- },
- // 是否密码类型
- password: {
- type: Boolean,
- default: props$y.input.password
- },
- // 最大输入长度,设置为 -1 的时候不限制最大长度
- maxlength: {
- type: [String, Number],
- default: props$y.input.maxlength
- },
- // 输入框为空时的占位符
- placeholder: {
- type: String,
- default: props$y.input.placeholder
- },
- // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
- placeholderClass: {
- type: String,
- default: props$y.input.placeholderClass
- },
- // 指定placeholder的样式
- placeholderStyle: {
- type: [String, Object],
- default: props$y.input.placeholderStyle
- },
- // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
- showWordLimit: {
- type: Boolean,
- default: props$y.input.showWordLimit
- },
- // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
- // https://uniapp.dcloud.io/component/input
- // https://uniapp.dcloud.io/component/textarea
- confirmType: {
- type: String,
- default: props$y.input.confirmType
- },
- // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
- confirmHold: {
- type: Boolean,
- default: props$y.input.confirmHold
- },
- // focus时,点击页面的时候不收起键盘,微信小程序有效
- holdKeyboard: {
- type: Boolean,
- default: props$y.input.holdKeyboard
- },
- // 自动获取焦点
- // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
- focus: {
- type: Boolean,
- default: props$y.input.focus
- },
- // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
- autoBlur: {
- type: Boolean,
- default: props$y.input.autoBlur
- },
- // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
- disableDefaultPadding: {
- type: Boolean,
- default: props$y.input.disableDefaultPadding
- },
- // 指定focus时光标的位置
- cursor: {
- type: [String, Number],
- default: props$y.input.cursor
- },
- // 输入框聚焦时底部与键盘的距离
- cursorSpacing: {
- type: [String, Number],
- default: props$y.input.cursorSpacing
- },
- // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
- selectionStart: {
- type: [String, Number],
- default: props$y.input.selectionStart
- },
- // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
- selectionEnd: {
- type: [String, Number],
- default: props$y.input.selectionEnd
- },
- // 键盘弹起时,是否自动上推页面
- adjustPosition: {
- type: Boolean,
- default: props$y.input.adjustPosition
- },
- // 输入框内容对齐方式,可选值为:left|center|right
- inputAlign: {
- type: String,
- default: props$y.input.inputAlign
- },
- // 输入框字体的大小
- fontSize: {
- type: [String, Number],
- default: props$y.input.fontSize
- },
- // 输入框字体颜色
- color: {
- type: String,
- default: props$y.input.color
- },
- // 输入框前置图标
- prefixIcon: {
- type: String,
- default: props$y.input.prefixIcon
- },
- // 前置图标样式,对象或字符串
- prefixIconStyle: {
- type: [String, Object],
- default: props$y.input.prefixIconStyle
- },
- // 输入框后置图标
- suffixIcon: {
- type: String,
- default: props$y.input.suffixIcon
- },
- // 后置图标样式,对象或字符串
- suffixIconStyle: {
- type: [String, Object],
- default: props$y.input.suffixIconStyle
- },
- // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
- border: {
- type: String,
- default: props$y.input.border
- },
- // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
- readonly: {
- type: Boolean,
- default: props$y.input.readonly
- },
- // 输入框形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$y.input.shape
- },
- // 用于处理或者过滤输入框内容的方法
- formatter: {
- type: [Function, null],
- default: props$y.input.formatter
- },
- // 是否忽略组件内对文本合成系统事件的处理
- ignoreCompositionEvent: {
- type: Boolean,
- default: true
- }
- }
- };
- const _sfc_main$1h = {
- name: "u-input",
- mixins: [mpMixin, mixin, props$a],
- data() {
- return {
- // 输入框的值
- innerValue: "",
- // 是否处于获得焦点状态
- focused: false,
- // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
- firstChange: true,
- // value绑定值的变化是由内部还是外部引起的
- changeFromInner: false,
- // 过滤处理方法
- innerFormatter: (value2) => value2
- };
- },
- watch: {
- modelValue: {
- immediate: true,
- handler(newVal, oldVal) {
- this.innerValue = newVal;
- this.firstChange = false;
- this.changeFromInner = false;
- }
- }
- },
- computed: {
- // 是否显示清除控件
- isShowClear() {
- const { clearable, readonly, focused, innerValue } = this;
- return !!clearable && !readonly && !!focused && innerValue !== "";
- },
- // 组件的类名
- inputClass() {
- let classes = [], { border, disabled, shape } = this;
- border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
- classes.push(`u-input--${shape}`);
- border === "bottom" && (classes = classes.concat([
- "u-border-bottom",
- "u-input--no-radius"
- ]));
- return classes.join(" ");
- },
- // 组件的样式
- wrapperStyle() {
- const style = {};
- if (this.disabled) {
- style.backgroundColor = this.disabledColor;
- }
- if (this.border === "none") {
- style.padding = "0";
- } else {
- style.paddingTop = "6px";
- style.paddingBottom = "6px";
- style.paddingLeft = "9px";
- style.paddingRight = "9px";
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- // 输入框的样式
- inputStyle() {
- const style = {
- color: this.color,
- fontSize: uni.$u.addUnit(this.fontSize),
- textAlign: this.inputAlign
- };
- return style;
- }
- },
- emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
- methods: {
- // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
- setFormatter(e) {
- this.innerFormatter = e;
- },
- // 当键盘输入时,触发input事件
- onInput(e) {
- let { value: value2 = "" } = e.detail || {};
- const formatter = this.formatter || this.innerFormatter;
- const formatValue = formatter(value2);
- this.innerValue = value2;
- this.$nextTick(() => {
- this.innerValue = formatValue;
- this.valueChange();
- });
- },
- // 输入框失去焦点时触发
- onBlur(event) {
- this.$emit("blur", event.detail.value);
- uni.$u.sleep(50).then(() => {
- this.focused = false;
- });
- uni.$u.formValidate(this, "blur");
- },
- // 输入框聚焦时触发
- onFocus(event) {
- this.focused = true;
- this.$emit("focus");
- },
- // 点击完成按钮时触发
- onConfirm(event) {
- this.$emit("confirm", this.innerValue);
- },
- // 键盘高度发生变化的时候触发此事件
- // 兼容性:微信小程序2.7.0+、App 3.1.0+
- onkeyboardheightchange() {
- this.$emit("keyboardheightchange");
- },
- // 内容发生变化,进行处理
- valueChange() {
- const value2 = this.innerValue;
- this.$nextTick(() => {
- this.$emit("update:modelValue", value2);
- this.changeFromInner = true;
- this.$emit("change", value2);
- uni.$u.formValidate(this, "change");
- });
- },
- // 点击清除控件
- onClear() {
- this.innerValue = "";
- this.$nextTick(() => {
- this.valueChange();
- this.$emit("clear");
- });
- },
- /**
- * 在安卓nvue上,事件无法冒泡
- * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
- * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
- */
- clickHandler() {
- }
- }
- };
- function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-input", $options.inputClass]),
- style: vue.normalizeStyle([$options.wrapperStyle])
- },
- [
- vue.createElementVNode("view", { class: "u-input__content" }, [
- _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-input__content__prefix-icon"
- }, [
- vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
- vue.createVNode(_component_u_icon, {
- name: _ctx.prefixIcon,
- size: "18",
- customStyle: _ctx.prefixIconStyle
- }, null, 8, ["name", "customStyle"])
- ], true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "u-input__content__field-wrapper",
- onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- }, [
- vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "),
- vue.createElementVNode("input", {
- class: "u-input__content__field-wrapper__field",
- style: vue.normalizeStyle([$options.inputStyle]),
- type: _ctx.type,
- focus: _ctx.focus,
- cursor: _ctx.cursor,
- value: $data.innerValue,
- "auto-blur": _ctx.autoBlur,
- disabled: _ctx.disabled || _ctx.readonly,
- maxlength: _ctx.maxlength,
- placeholder: _ctx.placeholder,
- "placeholder-style": _ctx.placeholderStyle,
- "placeholder-class": _ctx.placeholderClass,
- "confirm-type": _ctx.confirmType,
- "confirm-hold": _ctx.confirmHold,
- "hold-keyboard": _ctx.holdKeyboard,
- "cursor-spacing": _ctx.cursorSpacing,
- "adjust-position": _ctx.adjustPosition,
- "selection-end": _ctx.selectionEnd,
- "selection-start": _ctx.selectionStart,
- password: _ctx.password || _ctx.type === "password" || void 0,
- ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
- onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
- onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
- onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
- onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
- onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
- }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"])
- ]),
- $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-input__content__clear",
- onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: "11",
- color: "#ffffff",
- customStyle: "line-height: 12px"
- })
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "u-input__content__subfix-icon"
- }, [
- vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
- vue.createVNode(_component_u_icon, {
- name: _ctx.suffixIcon,
- size: "18",
- customStyle: _ctx.suffixIconStyle
- }, null, 8, ["name", "customStyle"])
- ], true)
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0$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"]]);
- const props$9 = {
- props: {
- // input的label提示语
- label: {
- type: String,
- default: props$y.formItem.label
- },
- // 绑定的值
- prop: {
- type: String,
- default: props$y.formItem.prop
- },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: [String, Boolean],
- default: props$y.formItem.borderBottom
- },
- // label的宽度,单位px
- labelWidth: {
- type: [String, Number],
- default: props$y.formItem.labelWidth
- },
- // 右侧图标
- rightIcon: {
- type: String,
- default: props$y.formItem.rightIcon
- },
- // 左侧图标
- leftIcon: {
- type: String,
- default: props$y.formItem.leftIcon
- },
- // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
- required: {
- type: Boolean,
- default: props$y.formItem.required
- },
- leftIconStyle: {
- type: [String, Object],
- default: props$y.formItem.leftIconStyle
- }
- }
- };
- const _sfc_main$1g = {
- name: "u-form-item",
- mixins: [mpMixin, mixin, props$9],
- data() {
- return {
- // 错误提示语
- message: "",
- parentData: {
- // 提示文本的位置
- labelPosition: "left",
- // 提示文本对齐方式
- labelAlign: "left",
- // 提示文本的样式
- labelStyle: {},
- // 提示文本的宽度
- labelWidth: 45,
- // 错误提示方式
- errorType: "message"
- }
- };
- },
- // 组件创建完成时,将当前实例保存到u-form中
- computed: {
- propsLine() {
- return uni.$u.props.line;
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.updateParentData();
- if (!this.parent) {
- uni.$u.error("u-form-item需要结合u-form组件使用");
- }
- },
- // 获取父组件的参数
- updateParentData() {
- this.getParentData("u-form");
- },
- // 移除u-form-item的校验结果
- clearValidate() {
- this.message = null;
- },
- // 清空当前的组件的校验结果,并重置为初始值
- resetField() {
- const value2 = uni.$u.getProperty(this.parent.originalModel, this.prop);
- uni.$u.setProperty(this.parent.model, this.prop, value2);
- this.message = null;
- },
- // 点击组件
- clickHandler() {
- this.$emit("click");
- }
- }
- };
- function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-form-item" }, [
- vue.createElementVNode(
- "view",
- {
- class: "u-form-item__body",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)),
- style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle), {
- flexDirection: $data.parentData.labelPosition === "left" ? "row" : "column"
- }])
- },
- [
- vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '),
- vue.renderSlot(_ctx.$slots, "label", {}, () => [
- vue.createCommentVNode(" {{required}} "),
- _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-form-item__body__left",
- style: vue.normalizeStyle({
- width: _ctx.$u.addUnit(_ctx.labelWidth || $data.parentData.labelWidth),
- marginBottom: $data.parentData.labelPosition === "left" ? 0 : "5px"
- })
- },
- [
- vue.createCommentVNode(" 为了块对齐 "),
- vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [
- vue.createCommentVNode(" nvue不支持伪元素before "),
- _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "u-form-item__body__left__content__required"
- }, "*")) : vue.createCommentVNode("v-if", true),
- _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-form-item__body__left__content__icon"
- }, [
- vue.createVNode(_component_u_icon, {
- name: _ctx.leftIcon,
- "custom-style": _ctx.leftIconStyle
- }, null, 8, ["name", "custom-style"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- {
- class: "u-form-item__body__left__content__label",
- style: vue.normalizeStyle([$data.parentData.labelStyle, {
- justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end"
- }])
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )
- ])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true),
- vue.createElementVNode("view", { class: "u-form-item__body__right" }, [
- vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [
- vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ]),
- _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item__body__right__content__icon"
- }, [
- vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ],
- 4
- /* STYLE */
- ),
- vue.renderSlot(_ctx.$slots, "error", {}, () => [
- !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-form-item__body__right__message",
- style: vue.normalizeStyle({
- marginLeft: _ctx.$u.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth)
- })
- },
- vue.toDisplayString($data.message),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ], true),
- _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, {
- key: 0,
- color: $data.message && $data.parentData.errorType === "border-bottom" ? _ctx.$u.color.error : $options.propsLine.color,
- customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}`
- }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- const __easycom_1 = /* @__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"]]);
- const props$8 = {
- props: {
- // 背景颜色(默认transparent)
- bgColor: {
- type: String,
- default: props$y.gap.bgColor
- },
- // 分割槽高度,单位px(默认30)
- height: {
- type: [String, Number],
- default: props$y.gap.height
- },
- // 与上一个组件的距离
- marginTop: {
- type: [String, Number],
- default: props$y.gap.marginTop
- },
- // 与下一个组件的距离
- marginBottom: {
- type: [String, Number],
- default: props$y.gap.marginBottom
- }
- }
- };
- const _sfc_main$1f = {
- name: "u-gap",
- mixins: [mpMixin, mixin, props$8],
- computed: {
- gapStyle() {
- const style = {
- backgroundColor: this.bgColor,
- height: uni.$u.addUnit(this.height),
- marginTop: uni.$u.addUnit(this.marginTop),
- marginBottom: uni.$u.addUnit(this.marginBottom)
- };
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- }
- };
- function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: "u-gap",
- style: vue.normalizeStyle([$options.gapStyle])
- },
- null,
- 4
- /* STYLE */
- );
- }
- const __easycom_3$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"]]);
- const props$7 = {
- props: {
- // 操作菜单是否展示 (默认false)
- show: {
- type: Boolean,
- default: props$y.actionSheet.show
- },
- // 标题
- title: {
- type: String,
- default: props$y.actionSheet.title
- },
- // 选项上方的描述信息
- description: {
- type: String,
- default: props$y.actionSheet.description
- },
- // 数据
- actions: {
- type: Array,
- default: props$y.actionSheet.actions
- },
- // 取消按钮的文字,不为空时显示按钮
- cancelText: {
- type: String,
- default: props$y.actionSheet.cancelText
- },
- // 点击某个菜单项时是否关闭弹窗
- closeOnClickAction: {
- type: Boolean,
- default: props$y.actionSheet.closeOnClickAction
- },
- // 处理底部安全区(默认true)
- safeAreaInsetBottom: {
- type: Boolean,
- default: props$y.actionSheet.safeAreaInsetBottom
- },
- // 小程序的打开方式
- openType: {
- type: String,
- default: props$y.actionSheet.openType
- },
- // 点击遮罩是否允许关闭 (默认true)
- closeOnClickOverlay: {
- type: Boolean,
- default: props$y.actionSheet.closeOnClickOverlay
- },
- // 圆角值
- round: {
- type: [Boolean, String, Number],
- default: props$y.actionSheet.round
- }
- }
- };
- const _sfc_main$1e = {
- name: "u-action-sheet",
- // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
- mixins: [openType, button, mixin, props$7],
- data() {
- return {};
- },
- computed: {
- // 操作项目的样式
- itemStyle() {
- return (index2) => {
- let style = {};
- if (this.actions[index2].color)
- style.color = this.actions[index2].color;
- if (this.actions[index2].fontSize)
- style.fontSize = uni.$u.addUnit(this.actions[index2].fontSize);
- if (this.actions[index2].disabled)
- style.color = "#c0c4cc";
- return style;
- };
- }
- },
- methods: {
- closeHandler() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- },
- // 点击取消按钮
- cancel() {
- this.$emit("close");
- },
- selectHandler(index2) {
- const item = this.actions[index2];
- if (item && !item.disabled && !item.loading) {
- this.$emit("select", item);
- if (this.closeOnClickAction) {
- this.$emit("close");
- }
- }
- }
- }
- };
- function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$5);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
- const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_3$1);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- show: _ctx.show,
- mode: "bottom",
- onClose: $options.closeHandler,
- safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
- round: _ctx.round
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "u-action-sheet" }, [
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-action-sheet__header"
- }, [
- vue.createElementVNode(
- "text",
- { class: "u-action-sheet__header__title u-line-1" },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "u-action-sheet__header__icon-wrap",
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"]))
- }, [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: "17",
- color: "#c8c9cc",
- bold: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- _ctx.description ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "u-action-sheet__description",
- style: vue.normalizeStyle([{
- marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
- }])
- },
- vue.toDisplayString(_ctx.description),
- 5
- /* TEXT, STYLE */
- )) : vue.createCommentVNode("v-if", true),
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
- _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "u-action-sheet__item-wrap" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.actions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
- vue.createElementVNode("view", {
- class: "u-action-sheet__item-wrap__item",
- onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]),
- "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
- "hover-stay-time": 150
- }, [
- !item.loading ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode(
- "text",
- {
- class: "u-action-sheet__item-wrap__item__name",
- style: vue.normalizeStyle([$options.itemStyle(index2)])
- },
- vue.toDisplayString(item.name),
- 5
- /* TEXT, STYLE */
- ),
- item.subname ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-action-sheet__item-wrap__item__subname"
- },
- vue.toDisplayString(item.subname),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, {
- key: 1,
- "custom-class": "van-action-sheet__loading",
- size: "18",
- mode: "circle"
- }))
- ], 8, ["onClick", "hover-class"]),
- index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ], true),
- _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, {
- key: 2,
- bgColor: "#eaeaec",
- height: "6"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { "hover-class": "u-action-sheet--hover" }, [
- _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
- }, ["stop", "prevent"])),
- "hover-stay-time": 150,
- class: "u-action-sheet__cancel-text",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args))
- },
- vue.toDisplayString(_ctx.cancelText),
- 33
- /* TEXT, NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]);
- }
- const __easycom_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"]]);
- const props$6 = {
- props: {
- // 当前form的需要验证字段的集合
- model: {
- type: Object,
- default: props$y.form.model
- },
- // 验证规则
- rules: {
- type: [Object, Function, Array],
- default: props$y.form.rules
- },
- // 有错误时的提示方式,message-提示信息,toast-进行toast提示
- // border-bottom-下边框呈现红色,none-无提示
- errorType: {
- type: String,
- default: props$y.form.errorType
- },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: Boolean,
- default: props$y.form.borderBottom
- },
- // label的位置,left-左边,top-上边
- labelPosition: {
- type: String,
- default: props$y.form.labelPosition
- },
- // label的宽度,单位px
- labelWidth: {
- type: [String, Number],
- default: props$y.form.labelWidth
- },
- // lable字体的对齐方式
- labelAlign: {
- type: String,
- default: props$y.form.labelAlign
- },
- // lable的样式,对象形式
- labelStyle: {
- type: Object,
- default: props$y.form.labelStyle
- }
- }
- };
- var define_process_env_default = {};
- const formatRegExp = /%[sdj%]/g;
- let warning = function warning2() {
- };
- if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") {
- warning = function warning3(type2, errors) {
- if (typeof console !== "undefined" && console.warn) {
- if (errors.every((e) => typeof e === "string")) {
- formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors);
- }
- }
- };
- }
- function convertFieldsError(errors) {
- if (!errors || !errors.length)
- return null;
- const fields = {};
- errors.forEach((error2) => {
- const { field } = error2;
- fields[field] = fields[field] || [];
- fields[field].push(error2);
- });
- return fields;
- }
- function format() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- let i = 1;
- const f = args[0];
- const len = args.length;
- if (typeof f === "function") {
- return f.apply(null, args.slice(1));
- }
- if (typeof f === "string") {
- let str = String(f).replace(formatRegExp, (x) => {
- if (x === "%%") {
- return "%";
- }
- if (i >= len) {
- return x;
- }
- switch (x) {
- case "%s":
- return String(args[i++]);
- case "%d":
- return Number(args[i++]);
- case "%j":
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return "[Circular]";
- }
- break;
- default:
- return x;
- }
- });
- for (let arg = args[i]; i < len; arg = args[++i]) {
- str += ` ${arg}`;
- }
- return str;
- }
- return f;
- }
- function isNativeStringType(type2) {
- return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
- }
- function isEmptyValue(value2, type2) {
- if (value2 === void 0 || value2 === null) {
- return true;
- }
- if (type2 === "array" && Array.isArray(value2) && !value2.length) {
- return true;
- }
- if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
- return true;
- }
- return false;
- }
- function asyncParallelArray(arr, func2, callback) {
- const results = [];
- let total = 0;
- const arrLength = arr.length;
- function count(errors) {
- results.push.apply(results, errors);
- total++;
- if (total === arrLength) {
- callback(results);
- }
- }
- arr.forEach((a) => {
- func2(a, count);
- });
- }
- function asyncSerialArray(arr, func2, callback) {
- let index2 = 0;
- const arrLength = arr.length;
- function next(errors) {
- if (errors && errors.length) {
- callback(errors);
- return;
- }
- const original = index2;
- index2 += 1;
- if (original < arrLength) {
- func2(arr[original], next);
- } else {
- callback([]);
- }
- }
- next([]);
- }
- function flattenObjArr(objArr) {
- const ret = [];
- Object.keys(objArr).forEach((k) => {
- ret.push.apply(ret, objArr[k]);
- });
- return ret;
- }
- function asyncMap(objArr, option, func2, callback) {
- if (option.first) {
- const _pending = new Promise((resolve, reject2) => {
- const next = function next2(errors) {
- callback(errors);
- return errors.length ? reject2({
- errors,
- fields: convertFieldsError(errors)
- }) : resolve();
- };
- const flattenArr = flattenObjArr(objArr);
- asyncSerialArray(flattenArr, func2, next);
- });
- _pending.catch((e) => e);
- return _pending;
- }
- let firstFields = option.firstFields || [];
- if (firstFields === true) {
- firstFields = Object.keys(objArr);
- }
- const objArrKeys = Object.keys(objArr);
- const objArrLength = objArrKeys.length;
- let total = 0;
- const results = [];
- const pending = new Promise((resolve, reject2) => {
- const next = function next2(errors) {
- results.push.apply(results, errors);
- total++;
- if (total === objArrLength) {
- callback(results);
- return results.length ? reject2({
- errors: results,
- fields: convertFieldsError(results)
- }) : resolve();
- }
- };
- if (!objArrKeys.length) {
- callback(results);
- resolve();
- }
- objArrKeys.forEach((key) => {
- const arr = objArr[key];
- if (firstFields.indexOf(key) !== -1) {
- asyncSerialArray(arr, func2, next);
- } else {
- asyncParallelArray(arr, func2, next);
- }
- });
- });
- pending.catch((e) => e);
- return pending;
- }
- function complementError(rule) {
- return function(oe) {
- if (oe && oe.message) {
- oe.field = oe.field || rule.fullField;
- return oe;
- }
- return {
- message: typeof oe === "function" ? oe() : oe,
- field: oe.field || rule.fullField
- };
- };
- }
- function deepMerge$2(target, source) {
- if (source) {
- for (const s in source) {
- if (source.hasOwnProperty(s)) {
- const value2 = source[s];
- if (typeof value2 === "object" && typeof target[s] === "object") {
- target[s] = { ...target[s], ...value2 };
- } else {
- target[s] = value2;
- }
- }
- }
- }
- return target;
- }
- function required(rule, value2, source, errors, options, type2) {
- if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
- errors.push(format(options.messages.required, rule.fullField));
- }
- }
- function whitespace(rule, value2, source, errors, options) {
- if (/^\s+$/.test(value2) || value2 === "") {
- errors.push(format(options.messages.whitespace, rule.fullField));
- }
- }
- const pattern = {
- // http://emailregex.com/
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
- url: new RegExp(
- "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
- "i"
- ),
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
- };
- var types = {
- integer: function integer(value2) {
- return /^(-)?\d+$/.test(value2);
- },
- float: function float(value2) {
- return /^(-)?\d+(\.\d+)?$/.test(value2);
- },
- array: function array3(value2) {
- return Array.isArray(value2);
- },
- regexp: function regexp(value2) {
- if (value2 instanceof RegExp) {
- return true;
- }
- try {
- return !!new RegExp(value2);
- } catch (e) {
- return false;
- }
- },
- date: function date3(value2) {
- return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
- },
- number: function number3(value2) {
- if (isNaN(value2)) {
- return false;
- }
- return typeof +value2 === "number";
- },
- object: function object3(value2) {
- return typeof value2 === "object" && !types.array(value2);
- },
- method: function method(value2) {
- return typeof value2 === "function";
- },
- email: function email2(value2) {
- return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
- },
- url: function url2(value2) {
- return typeof value2 === "string" && !!value2.match(pattern.url);
- },
- hex: function hex(value2) {
- return typeof value2 === "string" && !!value2.match(pattern.hex);
- }
- };
- function type(rule, value2, source, errors, options) {
- if (rule.required && value2 === void 0) {
- required(rule, value2, source, errors, options);
- return;
- }
- const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
- const ruleType = rule.type;
- if (custom.indexOf(ruleType) > -1) {
- if (!types[ruleType](value2)) {
- errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
- }
- } else if (ruleType && typeof value2 !== rule.type) {
- errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
- }
- }
- function range$2(rule, value2, source, errors, options) {
- const len = typeof rule.len === "number";
- const min = typeof rule.min === "number";
- const max = typeof rule.max === "number";
- const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
- let val = value2;
- let key = null;
- const num = typeof value2 === "number";
- const str = typeof value2 === "string";
- const arr = Array.isArray(value2);
- if (num) {
- key = "number";
- } else if (str) {
- key = "string";
- } else if (arr) {
- key = "array";
- }
- if (!key) {
- return false;
- }
- if (arr) {
- val = value2.length;
- }
- if (str) {
- val = value2.replace(spRegexp, "_").length;
- }
- if (len) {
- if (val !== rule.len) {
- errors.push(format(options.messages[key].len, rule.fullField, rule.len));
- }
- } else if (min && !max && val < rule.min) {
- errors.push(format(options.messages[key].min, rule.fullField, rule.min));
- } else if (max && !min && val > rule.max) {
- errors.push(format(options.messages[key].max, rule.fullField, rule.max));
- } else if (min && max && (val < rule.min || val > rule.max)) {
- errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
- }
- }
- const ENUM = "enum";
- function enumerable(rule, value2, source, errors, options) {
- rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
- if (rule[ENUM].indexOf(value2) === -1) {
- errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
- }
- }
- function pattern$1(rule, value2, source, errors, options) {
- if (rule.pattern) {
- if (rule.pattern instanceof RegExp) {
- rule.pattern.lastIndex = 0;
- if (!rule.pattern.test(value2)) {
- errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
- }
- } else if (typeof rule.pattern === "string") {
- const _pattern = new RegExp(rule.pattern);
- if (!_pattern.test(value2)) {
- errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
- }
- }
- }
- }
- const rules = {
- required,
- whitespace,
- type,
- range: range$2,
- enum: enumerable,
- pattern: pattern$1
- };
- function string$1(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, "string") && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options, "string");
- if (!isEmptyValue(value2, "string")) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- rules.pattern(rule, value2, source, errors, options);
- if (rule.whitespace === true) {
- rules.whitespace(rule, value2, source, errors, options);
- }
- }
- }
- callback(errors);
- }
- function method2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function number2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (value2 === "") {
- value2 = void 0;
- }
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function _boolean(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function regexp2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (!isEmptyValue(value2)) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function integer2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function floatFn(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function array2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, "array") && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options, "array");
- if (!isEmptyValue(value2, "array")) {
- rules.type(rule, value2, source, errors, options);
- rules.range(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function object2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- const ENUM$1 = "enum";
- function enumerable$1(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (value2 !== void 0) {
- rules[ENUM$1](rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function pattern$2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, "string") && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (!isEmptyValue(value2, "string")) {
- rules.pattern(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function date2(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- if (!isEmptyValue(value2)) {
- let dateObject;
- if (typeof value2 === "number") {
- dateObject = new Date(value2);
- } else {
- dateObject = value2;
- }
- rules.type(rule, dateObject, source, errors, options);
- if (dateObject) {
- rules.range(rule, dateObject.getTime(), source, errors, options);
- }
- }
- }
- callback(errors);
- }
- function required$1(rule, value2, callback, source, options) {
- const errors = [];
- const type2 = Array.isArray(value2) ? "array" : typeof value2;
- rules.required(rule, value2, source, errors, options, type2);
- callback(errors);
- }
- function type$1(rule, value2, callback, source, options) {
- const ruleType = rule.type;
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2, ruleType) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options, ruleType);
- if (!isEmptyValue(value2, ruleType)) {
- rules.type(rule, value2, source, errors, options);
- }
- }
- callback(errors);
- }
- function any(rule, value2, callback, source, options) {
- const errors = [];
- const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
- if (validate2) {
- if (isEmptyValue(value2) && !rule.required) {
- return callback();
- }
- rules.required(rule, value2, source, errors, options);
- }
- callback(errors);
- }
- const validators = {
- string: string$1,
- method: method2,
- number: number2,
- boolean: _boolean,
- regexp: regexp2,
- integer: integer2,
- float: floatFn,
- array: array2,
- object: object2,
- enum: enumerable$1,
- pattern: pattern$2,
- date: date2,
- url: type$1,
- hex: type$1,
- email: type$1,
- required: required$1,
- any
- };
- function newMessages() {
- return {
- default: "Validation error on field %s",
- required: "%s is required",
- enum: "%s must be one of %s",
- whitespace: "%s cannot be empty",
- date: {
- format: "%s date %s is invalid for format %s",
- parse: "%s date could not be parsed, %s is invalid ",
- invalid: "%s date %s is invalid"
- },
- types: {
- string: "%s is not a %s",
- method: "%s is not a %s (function)",
- array: "%s is not an %s",
- object: "%s is not an %s",
- number: "%s is not a %s",
- date: "%s is not a %s",
- boolean: "%s is not a %s",
- integer: "%s is not an %s",
- float: "%s is not a %s",
- regexp: "%s is not a valid %s",
- email: "%s is not a valid %s",
- url: "%s is not a valid %s",
- hex: "%s is not a valid %s"
- },
- string: {
- len: "%s must be exactly %s characters",
- min: "%s must be at least %s characters",
- max: "%s cannot be longer than %s characters",
- range: "%s must be between %s and %s characters"
- },
- number: {
- len: "%s must equal %s",
- min: "%s cannot be less than %s",
- max: "%s cannot be greater than %s",
- range: "%s must be between %s and %s"
- },
- array: {
- len: "%s must be exactly %s in length",
- min: "%s cannot be less than %s in length",
- max: "%s cannot be greater than %s in length",
- range: "%s must be between %s and %s in length"
- },
- pattern: {
- mismatch: "%s value %s does not match pattern %s"
- },
- clone: function clone2() {
- const cloned = JSON.parse(JSON.stringify(this));
- cloned.clone = this.clone;
- return cloned;
- }
- };
- }
- const messages = newMessages();
- function Schema(descriptor) {
- this.rules = null;
- this._messages = messages;
- this.define(descriptor);
- }
- Schema.prototype = {
- messages: function messages2(_messages) {
- if (_messages) {
- this._messages = deepMerge$2(newMessages(), _messages);
- }
- return this._messages;
- },
- define: function define(rules2) {
- if (!rules2) {
- throw new Error("Cannot configure a schema with no rules");
- }
- if (typeof rules2 !== "object" || Array.isArray(rules2)) {
- throw new Error("Rules must be an object");
- }
- this.rules = {};
- let z;
- let item;
- for (z in rules2) {
- if (rules2.hasOwnProperty(z)) {
- item = rules2[z];
- this.rules[z] = Array.isArray(item) ? item : [item];
- }
- }
- },
- validate: function validate(source_, o, oc) {
- const _this = this;
- if (o === void 0) {
- o = {};
- }
- if (oc === void 0) {
- oc = function oc2() {
- };
- }
- let source = source_;
- let options = o;
- let callback = oc;
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
- if (!this.rules || Object.keys(this.rules).length === 0) {
- if (callback) {
- callback();
- }
- return Promise.resolve();
- }
- function complete(results) {
- let i;
- let errors = [];
- let fields = {};
- function add(e) {
- if (Array.isArray(e)) {
- let _errors;
- errors = (_errors = errors).concat.apply(_errors, e);
- } else {
- errors.push(e);
- }
- }
- for (i = 0; i < results.length; i++) {
- add(results[i]);
- }
- if (!errors.length) {
- errors = null;
- fields = null;
- } else {
- fields = convertFieldsError(errors);
- }
- callback(errors, fields);
- }
- if (options.messages) {
- let messages$1 = this.messages();
- if (messages$1 === messages) {
- messages$1 = newMessages();
- }
- deepMerge$2(messages$1, options.messages);
- options.messages = messages$1;
- } else {
- options.messages = this.messages();
- }
- let arr;
- let value2;
- const series = {};
- const keys = options.keys || Object.keys(this.rules);
- keys.forEach((z) => {
- arr = _this.rules[z];
- value2 = source[z];
- arr.forEach((r) => {
- let rule = r;
- if (typeof rule.transform === "function") {
- if (source === source_) {
- source = { ...source };
- }
- value2 = source[z] = rule.transform(value2);
- }
- if (typeof rule === "function") {
- rule = {
- validator: rule
- };
- } else {
- rule = { ...rule };
- }
- rule.validator = _this.getValidationMethod(rule);
- rule.field = z;
- rule.fullField = rule.fullField || z;
- rule.type = _this.getType(rule);
- if (!rule.validator) {
- return;
- }
- series[z] = series[z] || [];
- series[z].push({
- rule,
- value: value2,
- source,
- field: z
- });
- });
- });
- const errorFields = {};
- return asyncMap(series, options, (data, doIt) => {
- const { rule } = data;
- let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
- deep = deep && (rule.required || !rule.required && data.value);
- rule.field = data.field;
- function addFullfield(key, schema) {
- return { ...schema, fullField: `${rule.fullField}.${key}` };
- }
- function cb(e) {
- if (e === void 0) {
- e = [];
- }
- let errors = e;
- if (!Array.isArray(errors)) {
- errors = [errors];
- }
- if (!options.suppressWarning && errors.length) {
- Schema.warning("async-validator:", errors);
- }
- if (errors.length && rule.message) {
- errors = [].concat(rule.message);
- }
- errors = errors.map(complementError(rule));
- if (options.first && errors.length) {
- errorFields[rule.field] = 1;
- return doIt(errors);
- }
- if (!deep) {
- doIt(errors);
- } else {
- if (rule.required && !data.value) {
- if (rule.message) {
- errors = [].concat(rule.message).map(complementError(rule));
- } else if (options.error) {
- errors = [options.error(rule, format(options.messages.required, rule.field))];
- } else {
- errors = [];
- }
- return doIt(errors);
- }
- let fieldsSchema = {};
- if (rule.defaultField) {
- for (const k in data.value) {
- if (data.value.hasOwnProperty(k)) {
- fieldsSchema[k] = rule.defaultField;
- }
- }
- }
- fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
- for (const f in fieldsSchema) {
- if (fieldsSchema.hasOwnProperty(f)) {
- const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
- fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
- }
- }
- const schema = new Schema(fieldsSchema);
- schema.messages(options.messages);
- if (data.rule.options) {
- data.rule.options.messages = options.messages;
- data.rule.options.error = options.error;
- }
- schema.validate(data.value, data.rule.options || options, (errs) => {
- const finalErrors = [];
- if (errors && errors.length) {
- finalErrors.push.apply(finalErrors, errors);
- }
- if (errs && errs.length) {
- finalErrors.push.apply(finalErrors, errs);
- }
- doIt(finalErrors.length ? finalErrors : null);
- });
- }
- }
- let res;
- if (rule.asyncValidator) {
- res = rule.asyncValidator(rule, data.value, cb, data.source, options);
- } else if (rule.validator) {
- res = rule.validator(rule, data.value, cb, data.source, options);
- if (res === true) {
- cb();
- } else if (res === false) {
- cb(rule.message || `${rule.field} fails`);
- } else if (res instanceof Array) {
- cb(res);
- } else if (res instanceof Error) {
- cb(res.message);
- }
- }
- if (res && res.then) {
- res.then(() => cb(), (e) => cb(e));
- }
- }, (results) => {
- complete(results);
- });
- },
- getType: function getType(rule) {
- if (rule.type === void 0 && rule.pattern instanceof RegExp) {
- rule.type = "pattern";
- }
- if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
- throw new Error(format("Unknown rule type %s", rule.type));
- }
- return rule.type || "string";
- },
- getValidationMethod: function getValidationMethod(rule) {
- if (typeof rule.validator === "function") {
- return rule.validator;
- }
- const keys = Object.keys(rule);
- const messageIndex = keys.indexOf("message");
- if (messageIndex !== -1) {
- keys.splice(messageIndex, 1);
- }
- if (keys.length === 1 && keys[0] === "required") {
- return validators.required;
- }
- return validators[this.getType(rule)] || false;
- }
- };
- Schema.register = function register(type2, validator) {
- if (typeof validator !== "function") {
- throw new Error("Cannot register a validator by type, validator is not a function");
- }
- validators[type2] = validator;
- };
- Schema.warning = warning;
- Schema.messages = messages;
- Schema.warning = function() {
- };
- const _sfc_main$1d = {
- name: "u-form",
- mixins: [mpMixin, mixin, props$6],
- provide() {
- return {
- uForm: this
- };
- },
- data() {
- return {
- formRules: {},
- // 规则校验器
- validator: {},
- // 原始的model快照,用于resetFields方法重置表单时使用
- originalModel: null
- };
- },
- watch: {
- // 监听规则的变化
- rules: {
- immediate: true,
- handler(n) {
- this.setRules(n);
- }
- },
- // 监听属性的变化,通知子组件u-form-item重新获取信息
- propsChange(n) {
- var _a;
- if ((_a = this.children) == null ? void 0 : _a.length) {
- this.children.map((child) => {
- typeof child.updateParentData == "function" && child.updateParentData();
- });
- }
- },
- // 监听model的初始值作为重置表单的快照
- model: {
- immediate: true,
- handler(n) {
- if (!this.originalModel) {
- this.originalModel = uni.$u.deepClone(n);
- }
- }
- }
- },
- computed: {
- propsChange() {
- return [
- this.errorType,
- this.borderBottom,
- this.labelPosition,
- this.labelWidth,
- this.labelAlign,
- this.labelStyle
- ];
- }
- },
- created() {
- this.children = [];
- },
- methods: {
- // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
- setRules(rules2) {
- if (Object.keys(rules2).length === 0)
- return;
- if (Object.keys(this.model).length === 0) {
- uni.$u.error("设置rules,model必须设置!如果已经设置,请刷新页面。");
- return;
- }
- this.formRules = rules2;
- this.validator = new Schema(rules2);
- },
- // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法
- resetFields() {
- this.resetModel();
- },
- // 重置model为初始值的快照
- resetModel(obj) {
- this.children.map((child) => {
- const prop = child == null ? void 0 : child.prop;
- const value2 = uni.$u.getProperty(this.originalModel, prop);
- uni.$u.setProperty(this.model, prop, value2);
- });
- },
- // 清空校验结果
- clearValidate(props2) {
- props2 = [].concat(props2);
- this.children.map((child) => {
- if (props2[0] === void 0 || props2.includes(child.prop)) {
- child.message = null;
- }
- });
- },
- // 对部分表单字段进行校验
- async validateField(value2, callback, event = null) {
- this.$nextTick(() => {
- const errorsRes = [];
- value2 = [].concat(value2);
- this.children.map((child) => {
- const childErrors = [];
- if (value2.includes(child.prop)) {
- const propertyVal = uni.$u.getProperty(
- this.model,
- child.prop
- );
- const propertyChain = child.prop.split(".");
- const propertyName = propertyChain[propertyChain.length - 1];
- const rule = this.formRules[child.prop];
- if (!rule)
- return;
- const rules2 = [].concat(rule);
- for (let i = 0; i < rules2.length; i++) {
- const ruleItem = rules2[i];
- const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger);
- if (event && !trigger.includes(event))
- continue;
- const validator = new Schema({
- [propertyName]: ruleItem
- });
- validator.validate(
- {
- [propertyName]: propertyVal
- },
- (errors, fields) => {
- var _a;
- if (uni.$u.test.array(errors)) {
- errorsRes.push(...errors);
- childErrors.push(...errors);
- }
- child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ?? null;
- }
- );
- }
- }
- });
- typeof callback === "function" && callback(errorsRes);
- });
- },
- // 校验全部数据
- validate(callback) {
- if (Object.keys(this.formRules).length === 0) {
- uni.$u.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。");
- return;
- }
- return new Promise((resolve, reject2) => {
- this.$nextTick(() => {
- const formItemProps = this.children.map(
- (item) => item.prop
- );
- this.validateField(formItemProps, (errors) => {
- if (errors.length) {
- this.errorType === "toast" && uni.$u.toast(errors[0].message);
- reject2(errors);
- } else {
- resolve(true);
- }
- });
- });
- });
- }
- }
- };
- function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [
- vue.renderSlot(_ctx.$slots, "default")
- ]);
- }
- 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"]]);
- const _sfc_main$1c = {
- data() {
- return {
- companyId: null,
- companyUserId: null,
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- temps: [],
- usageShow: false,
- usages: [
- {
- name: "图文问诊"
- },
- {
- name: "语音问诊"
- }
- ],
- orderKey: null,
- patient: null,
- inquiryType: null,
- inquirySubType: null,
- orderType: null,
- fileList1: [],
- fileList2: [],
- fileList3: [],
- form: {
- title: ""
- },
- rules: {
- height: [
- {
- required: true,
- message: "请输入身高",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ],
- weight: [
- {
- required: true,
- message: "请输入体重",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ],
- mobile: [
- {
- required: true,
- message: "请输入联系电话",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ]
- }
- };
- },
- onLoad(options) {
- if (!this.$isEmpty(options.isShare)) {
- this.isShare = options.isShare;
- } else {
- uni.hideShareMenu();
- }
- if (!this.$isEmpty(options.companyId)) {
- this.companyId = options.companyId;
- }
- if (!this.$isEmpty(options.companyUserId)) {
- this.companyUserId = options.companyUserId;
- }
- formatAppLog("log", "at pages_order/inquiryForm2_1.vue:349", this.companyId);
- formatAppLog("log", "at pages_order/inquiryForm2_1.vue:350", this.companyUserId);
- this.inquiryType = options.inquiryType;
- this.inquirySubType = options.inquirySubType;
- this.orderType = options.orderType;
- },
- onReady() {
- this.$refs.uForm.setRules(this.rules);
- },
- onShow() {
- if (this.$isLogin()) {
- if (!this.$isEmpty(this.companyUserId)) {
- let data = { companyUserId: this.companyUserId };
- bindCompanyUser(data).then(
- (res) => {
- if (res.code == 200)
- ;
- },
- (rej) => {
- }
- );
- }
- }
- var that = this;
- uni.$on("refreshOrderPatient", (res) => {
- that.patient = res;
- });
- this.confirm();
- },
- onShareAppMessage(res) {
- uni.showShareMenu({
- withShareTicket: true
- });
- wx.updateShareMenu({
- isPrivateMessage: true,
- withShareTicket: true,
- success(res2) {
- formatAppLog("log", "at pages_order/inquiryForm2_1.vue:388", "updateShareMenu: ", res2);
- },
- fail() {
- }
- });
- return {
- title: "御君方互联网医院--健康会诊",
- path: "/pages_order/inquiryForm2_1?inquiryType=2&orderType=2&inquirySubType=" + this.inquirySubType + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- };
- },
- methods: {
- showImg(type2) {
- if (type2 == 1) {
- var imgs = [
- "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0640bd4b80ba4491842b9d20d7238616.png"
- ];
- uni.previewImage({
- current: 0,
- urls: imgs
- });
- } else if (type2 == 2) {
- var imgs = [
- "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/2c9f24e5c3fc458f8bcb30a4fb0619be.png"
- ];
- uni.previewImage({
- current: 0,
- urls: imgs
- });
- }
- },
- leftClick() {
- formatAppLog("log", "at pages_order/inquiryForm2_1.vue:422", "leftClick");
- uni.showModal({
- title: "提示",
- content: "确认关闭吗",
- success: function(res) {
- if (res.confirm) {
- uni.navigateBack();
- } else if (res.cancel)
- ;
- }
- });
- },
- confirm() {
- let data = {};
- confirm(data).then(
- (res) => {
- if (res.code == 200) {
- this.orderKey = res.orderKey;
- }
- },
- (rej) => {
- }
- );
- },
- usageSelect(e) {
- this.form.usage = e.name;
- this.$refs.uForm.validateField("usage");
- },
- submitOrder() {
- if (this.patient == null) {
- uni.showToast({
- icon: "none",
- title: "请选择就诊人"
- });
- return;
- }
- if (this.orderKey == null) {
- this.confirm();
- }
- var reportImages = [];
- this.fileList3.forEach(function(element) {
- reportImages.push(element.url);
- });
- var tongueImages = [];
- this.fileList1.forEach(function(element) {
- tongueImages.push(element.url);
- });
- var faceImages = [];
- this.fileList2.forEach(function(element) {
- faceImages.push(element.url);
- });
- var that = this;
- this.$refs.uForm.validate().then((res) => {
- var data = {
- companyId: that.companyId,
- companyUserId: that.companyUserId,
- orderKey: that.orderKey,
- patientId: that.patient.patientId,
- title: that.form.title,
- inquiryType: that.inquiryType,
- inquirySubType: that.inquirySubType,
- orderType: that.orderType,
- doctorId: that.doctorId,
- height: that.form.height,
- weight: that.form.weight,
- mobile: that.form.mobile,
- // study:that.form.study,
- medication: that.form.medication,
- usage: that.form.usage,
- reportImages: reportImages.toString(),
- tongueImages: tongueImages.toString(),
- faceImages: faceImages.toString()
- // formJson:JSON.stringify(forms)
- };
- uni.showLoading({
- title: "正在处理中..."
- });
- create(data).then(
- (res2) => {
- uni.hideLoading();
- if (res2.code == 200) {
- var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
- uni.requestSubscribeMessage({
- tmplIds: temps,
- success(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res2.order.orderId
- });
- }, 200);
- },
- fail(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res2.order.orderId
- });
- }, 200);
- }
- });
- return;
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }).catch((errors) => {
- });
- },
- // getInquiryTemp(){
- // let data = {};
- // getInquiryTemp(data).then(
- // res => {
- // if(res.code==200){
- // this.temps=res.data;
- // this.temps.forEach(function(element) {
- // element.options=JSON.parse(element.itemJson)
- // });
- // // this.temps1=temps.filter((item) => {
- // // return item.tempType==1;
- // // });
- // // this.temps2=temps.filter((item) => {
- // // return item.tempType==2;
- // // });
- // // this.temps3=temps.filter((item) => {
- // // return item.tempType==3;
- // // });
- // // this.temps4=temps.filter((item) => {
- // // return item.tempType==4;
- // // });
- // __f__('log','at pages_order/inquiryForm2_1.vue:566',this.temps1)
- // }
- // },
- // rej => {}
- // );
- // },
- addPatient() {
- uni.navigateTo({
- url: "/pages_user/patient"
- });
- },
- deletePic(event) {
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- async afterRead(event) {
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: "uploading",
- message: "上传中"
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: "success",
- message: "",
- url: result
- }));
- fileListLen++;
- }
- },
- uploadFilePromise(url2) {
- return new Promise((resolve, reject2) => {
- uni.uploadFile({
- url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
- // 仅为示例,非真实的接口地址
- filePath: url2,
- name: "file",
- formData: {
- user: "test"
- },
- success: (res) => {
- setTimeout(() => {
- formatAppLog("log", "at pages_order/inquiryForm2_1.vue:613", JSON.parse(res.data).url);
- resolve(JSON.parse(res.data).url);
- }, 1e3);
- }
- });
- });
- }
- }
- };
- function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$2);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_2$1);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_navbar, {
- title: "症状描述",
- onLeftClick: $options.leftClick
- }, null, 8, ["onLeftClick"])
- ]),
- vue.createElementVNode("view", { class: "main" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createVNode(_component_u_alert, {
- fontSize: "16",
- type: "primary",
- description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
- }),
- vue.createElementVNode("view", { class: "chose-patient" }, [
- $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "value" }, "请点击添加"),
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "patient",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.patient.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createVNode(_component_u_form, {
- rules: $data.rules,
- model: $data.form,
- ref: "uForm",
- labelPosition: "left"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "您的基本情况填写")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "身高(厘米)",
- prop: "height"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- type: "number",
- border: "none",
- placeholder: "请输入身高",
- modelValue: $data.form.height,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.height = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "体重(公斤)",
- prop: "weight"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- type: "number",
- border: "none",
- placeholder: "请输入体重",
- modelValue: $data.form.weight,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.weight = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- maxlength: "11",
- borderBottom: "",
- label: "联系电话",
- prop: "mobile"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- type: "number",
- border: "none",
- placeholder: "请输入电话",
- modelValue: $data.form.mobile,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.form.mobile = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- 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> '),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "用药情况",
- prop: "medication"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u__textarea, {
- modelValue: $data.form.medication,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.medication = $event),
- placeholder: "请输入用药情况",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- onClick: _cache[7] || (_cache[7] = ($event) => {
- $data.usageShow = true;
- }),
- labelWidth: "200rpx",
- label: "期望会诊方式",
- prop: "usage"
- }, {
- right: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, { name: "arrow-right" })
- ]),
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $data.form.usage,
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.form.usage = $event),
- disabled: "",
- disabledColor: "#ffffff",
- placeholder: "请选择",
- border: "none"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_action_sheet, {
- show: $data.usageShow,
- actions: $data.usages,
- title: "请选择",
- onClose: _cache[8] || (_cache[8] = ($event) => $data.usageShow = false),
- onSelect: $options.usageSelect
- }, null, 8, ["show", "actions", "onSelect"])
- ]),
- 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> '),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "补充信息")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createVNode(_component_u_form_item, {
- labelWidth: "140rpx",
- borderBottom: "",
- label: "舌苔照片",
- prop: "avatar"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("image", {
- onClick: _cache[9] || (_cache[9] = ($event) => $options.showImg(1)),
- class: "icon",
- src: "/static/images/question.png"
- }),
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList1,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "1",
- multiple: "",
- maxCount: 4
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "140rpx",
- borderBottom: "",
- label: "面部照片",
- prop: "avatar"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("image", {
- onClick: _cache[10] || (_cache[10] = ($event) => $options.showImg(2)),
- class: "icon",
- src: "/static/images/question.png"
- }),
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList2,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "2",
- multiple: "",
- maxCount: 4
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "140rpx",
- borderBottom: "",
- label: "相关报告",
- prop: "avatar"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("view", { class: "icon" }),
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList3,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "3",
- multiple: "",
- maxCount: 4
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- label: "您最想咨询医生的问题是什么?",
- prop: "title"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u__textarea, {
- modelValue: $data.form.title,
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.title = $event),
- placeholder: "请输入内容",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["rules", "model"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[12] || (_cache[12] = ($event) => $options.submitOrder())
- }, "预约会诊")
- ])
- ]);
- }
- 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"]]);
- const props$5 = {
- props: {
- // checkbox的名称
- name: {
- type: [String, Number, Boolean],
- default: props$y.checkbox.name
- },
- // 形状,square为方形,circle为圆型
- shape: {
- type: String,
- default: props$y.checkbox.shape
- },
- // 整体的大小
- size: {
- type: [String, Number],
- default: props$y.checkbox.size
- },
- // 是否默认选中
- checked: {
- type: Boolean,
- default: props$y.checkbox.checked
- },
- // 是否禁用
- disabled: {
- type: [String, Boolean],
- default: props$y.checkbox.disabled
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$y.checkbox.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$y.checkbox.inactiveColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$y.checkbox.iconSize
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$y.checkbox.iconColor
- },
- // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
- label: {
- type: [String, Number],
- default: props$y.checkbox.label
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$y.checkbox.labelSize
- },
- // label的颜色
- labelColor: {
- type: String,
- default: props$y.checkbox.labelColor
- },
- // 是否禁止点击提示语选中复选框
- labelDisabled: {
- type: [String, Boolean],
- default: props$y.checkbox.labelDisabled
- }
- }
- };
- const _sfc_main$1b = {
- name: "u-checkbox",
- mixins: [mpMixin, mixin, props$5],
- data() {
- return {
- isChecked: false,
- // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
- // 故只能使用如此方法
- parentData: {
- iconSize: 12,
- labelDisabled: null,
- disabled: null,
- shape: "square",
- activeColor: null,
- inactiveColor: null,
- size: 18,
- modelValue: null,
- iconColor: null,
- placement: "row",
- borderBottom: false,
- iconPlacement: "left"
- }
- };
- },
- computed: {
- // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
- elDisabled() {
- return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
- },
- // 是否禁用label点击
- elLabelDisabled() {
- return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
- },
- // 组件尺寸,对应size的值,默认值为21px
- elSize() {
- return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
- },
- // 组件的勾选图标的尺寸,默认12px
- elIconSize() {
- return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
- },
- // 组件选中激活时的颜色
- elActiveColor() {
- return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
- },
- // 组件选未中激活时的颜色
- elInactiveColor() {
- return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
- },
- // label的颜色
- elLabelColor() {
- return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
- },
- // 组件的形状
- elShape() {
- return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
- },
- // label大小
- elLabelSize() {
- return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
- },
- elIconColor() {
- const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
- if (this.elDisabled) {
- return this.isChecked ? this.elInactiveColor : "transparent";
- } else {
- return this.isChecked ? iconColor : "transparent";
- }
- },
- iconClasses() {
- let classes = [];
- classes.push("u-checkbox__icon-wrap--" + this.elShape);
- if (this.elDisabled) {
- classes.push("u-checkbox__icon-wrap--disabled");
- }
- if (this.isChecked && this.elDisabled) {
- classes.push("u-checkbox__icon-wrap--disabled--checked");
- }
- return classes;
- },
- iconWrapStyle() {
- const style = {};
- style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff";
- style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
- style.width = uni.$u.addUnit(this.elSize);
- style.height = uni.$u.addUnit(this.elSize);
- if (this.parentData.iconPlacement === "right") {
- style.marginRight = 0;
- }
- return style;
- },
- checkboxStyle() {
- const style = {};
- if (this.parentData.borderBottom && this.parentData.placement === "row") {
- uni.$u.error("检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效");
- }
- if (this.parentData.borderBottom && this.parentData.placement === "column") {
- style.paddingBottom = "8px";
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted() {
- this.init();
- },
- methods: {
- init() {
- this.updateParentData();
- if (!this.parent) {
- uni.$u.error("u-checkbox必须搭配u-checkbox-group组件使用");
- }
- const value2 = this.parentData.modelValue;
- if (this.checked) {
- this.isChecked = true;
- } else if (uni.$u.test.array(value2)) {
- this.isChecked = value2.some((item) => {
- return item === this.name;
- });
- }
- },
- updateParentData() {
- this.getParentData("u-checkbox-group");
- },
- // 横向两端排列时,点击组件即可触发选中事件
- wrapperClickHandler(e) {
- this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
- },
- // 点击图标
- iconClickHandler(e) {
- this.preventEvent(e);
- if (!this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- // 点击label
- labelClickHandler(e) {
- this.preventEvent(e);
- if (!this.elLabelDisabled && !this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- emitEvent() {
- this.$emit("change", this.isChecked);
- this.$nextTick(() => {
- uni.$u.formValidate(this, "change");
- });
- },
- // 改变组件选中状态
- // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例
- // 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
- setRadioCheckedStatus() {
- this.isChecked = !this.isChecked;
- this.emitEvent();
- typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
- }
- },
- watch: {
- checked() {
- this.isChecked = this.checked;
- }
- }
- };
- function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-checkbox", [`u-checkbox-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]),
- style: vue.normalizeStyle([$options.checkboxStyle]),
- onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"]))
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-checkbox__icon-wrap", $options.iconClasses]),
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([$options.iconWrapStyle])
- },
- [
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
- vue.createVNode(_component_u_icon, {
- class: "u-checkbox__icon-wrap__icon",
- name: "checkbox-mark",
- size: $options.elIconSize,
- color: $options.elIconColor
- }, null, 8, ["size", "color"])
- ], true)
- ],
- 6
- /* CLASS, STYLE */
- ),
- vue.createElementVNode(
- "text",
- {
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])),
- style: vue.normalizeStyle({
- color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
- fontSize: $options.elLabelSize,
- lineHeight: $options.elLabelSize
- })
- },
- vue.toDisplayString(_ctx.label),
- 5
- /* TEXT, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_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"]]);
- const props$4 = {
- props: {
- // 标识符
- name: {
- type: String,
- default: props$y.checkboxGroup.name
- },
- // 绑定的值
- modelValue: {
- type: Array,
- default: props$y.checkboxGroup.value
- },
- // 形状,circle-圆形,square-方形
- shape: {
- type: String,
- default: props$y.checkboxGroup.shape
- },
- // 是否禁用全部checkbox
- disabled: {
- type: Boolean,
- default: props$y.checkboxGroup.disabled
- },
- // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
- activeColor: {
- type: String,
- default: props$y.checkboxGroup.activeColor
- },
- // 未选中的颜色
- inactiveColor: {
- type: String,
- default: props$y.checkboxGroup.inactiveColor
- },
- // 整个组件的尺寸,默认px
- size: {
- type: [String, Number],
- default: props$y.checkboxGroup.size
- },
- // 布局方式,row-横向,column-纵向
- placement: {
- type: String,
- default: props$y.checkboxGroup.placement
- },
- // label的字体大小,px单位
- labelSize: {
- type: [String, Number],
- default: props$y.checkboxGroup.labelSize
- },
- // label的字体颜色
- labelColor: {
- type: [String],
- default: props$y.checkboxGroup.labelColor
- },
- // 是否禁止点击文本操作
- labelDisabled: {
- type: Boolean,
- default: props$y.checkboxGroup.labelDisabled
- },
- // 图标颜色
- iconColor: {
- type: String,
- default: props$y.checkboxGroup.iconColor
- },
- // 图标的大小,单位px
- iconSize: {
- type: [String, Number],
- default: props$y.checkboxGroup.iconSize
- },
- // 勾选图标的对齐方式,left-左边,right-右边
- iconPlacement: {
- type: String,
- default: props$y.checkboxGroup.iconPlacement
- },
- // 竖向配列时,是否显示下划线
- borderBottom: {
- type: Boolean,
- default: props$y.checkboxGroup.borderBottom
- }
- }
- };
- const _sfc_main$1a = {
- name: "u-checkbox-group",
- mixins: [mpMixin, mixin, props$4],
- computed: {
- // 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
- // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group)
- // 拉取父组件新的变化后的参数
- parentData() {
- return [
- this.modelValue,
- this.disabled,
- this.inactiveColor,
- this.activeColor,
- this.size,
- this.labelDisabled,
- this.shape,
- this.iconSize,
- this.borderBottom,
- this.placement
- ];
- },
- bemClass() {
- return this.bem("checkbox-group", ["placement"]);
- }
- },
- watch: {
- // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
- parentData: {
- handler() {
- if (this.children.length) {
- this.children.map((child) => {
- typeof child.init === "function" && child.init();
- });
- }
- },
- deep: true
- }
- },
- data() {
- return {};
- },
- created() {
- this.children = [];
- },
- emits: ["update:modelValue", "change"],
- methods: {
- // 将其他的checkbox设置为未选中的状态
- unCheckedOther(childInstance) {
- const values = [];
- this.children.map((child) => {
- if (child.isChecked) {
- values.push(child.name);
- }
- });
- this.$emit("change", values);
- this.$emit("update:modelValue", values);
- }
- }
- };
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-checkbox-group", $options.bemClass])
- },
- [
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
- ],
- 2
- /* CLASS */
- );
- }
- 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"]]);
- const _sfc_main$19 = {
- data() {
- return {
- companyId: null,
- companyUserId: null,
- temps: [],
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- orderKey: null,
- patient: null,
- durations: [
- {
- name: "一周内",
- disabled: false
- },
- {
- name: "一个月内",
- disabled: false
- },
- {
- name: "半年内",
- disabled: false
- },
- {
- name: "半年以上",
- disabled: false
- }
- ],
- isVisits: [
- {
- name: "未就诊",
- disabled: false
- },
- {
- name: "就诊过",
- disabled: false
- }
- ],
- form: {
- title: "",
- drug: "",
- isVisit: "就诊过",
- duration: "一周内"
- },
- rules: {
- title: [
- {
- required: true,
- message: "请输入您的病情",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ],
- drugs: [
- {
- required: true,
- message: "请输入正在服用药品",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ],
- durations: [
- {
- required: true,
- message: "请选择本次患病多久",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ],
- isVisit: [
- {
- required: true,
- message: "请选择是否去医院就诊过",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ]
- },
- inquiryType: null,
- inquirySubType: null,
- orderType: null,
- doctorId: null,
- fileList1: [],
- fileList2: [],
- fileList3: [],
- isShare: null
- };
- },
- onLoad(options) {
- if (!this.$isEmpty(options.isShare)) {
- this.isShare = options.isShare;
- } else {
- uni.hideShareMenu();
- }
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:350", options);
- if (!this.$isEmpty(options.companyId)) {
- this.companyId = options.companyId;
- }
- if (!this.$isEmpty(options.companyUserId)) {
- this.companyUserId = options.companyUserId;
- }
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:357", this.companyId);
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:358", this.companyUserId);
- this.inquiryType = options.inquiryType;
- this.inquirySubType = options.inquirySubType;
- this.orderType = options.orderType;
- this.doctorId = options.doctorId;
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:363", this.inquiryType);
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:364", this.orderType);
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:365", this.doctorId);
- this.getInquiryTemp();
- },
- onShow() {
- if (this.$isLogin()) {
- if (!this.$isEmpty(this.companyUserId)) {
- let data = { companyUserId: this.companyUserId };
- bindCompanyUser(data).then(
- (res) => {
- if (res.code == 200)
- ;
- },
- (rej) => {
- }
- );
- }
- }
- var that = this;
- uni.$on("refreshOrderPatient", (res) => {
- that.patient = res;
- });
- this.confirm();
- },
- onReady() {
- this.$refs.uForm.setRules(this.rules);
- },
- onShareAppMessage(res) {
- uni.showShareMenu({
- withShareTicket: true
- });
- wx.updateShareMenu({
- isPrivateMessage: true,
- withShareTicket: false,
- success(res2) {
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:402", "updateShareMenu: ", res2);
- },
- fail() {
- }
- });
- return {
- title: "御君方互联网医院--健康会诊",
- path: "/pages_order/inquiryForm2_2?inquiryType=2&orderType=2&inquirySubType=" + this.inquirySubType + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- };
- },
- methods: {
- leftClick() {
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:415", "leftClick");
- uni.showModal({
- title: "提示",
- content: "确认关闭吗",
- success: function(res) {
- if (res.confirm) {
- uni.navigateBack();
- } else if (res.cancel)
- ;
- }
- });
- },
- showImg(type2) {
- if (type2 == 1) {
- var imgs = [
- "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0640bd4b80ba4491842b9d20d7238616.png"
- ];
- uni.previewImage({
- current: 0,
- urls: imgs
- });
- } else if (type2 == 2) {
- var imgs = [
- "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/2c9f24e5c3fc458f8bcb30a4fb0619be.png"
- ];
- uni.previewImage({
- current: 0,
- urls: imgs
- });
- }
- },
- getInquiryTemp() {
- let data = {};
- getInquiryTemp(data).then(
- (res) => {
- if (res.code == 200) {
- this.temps = res.data;
- this.temps.forEach(function(element) {
- element.options = JSON.parse(element.itemJson);
- });
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:468", this.temps1);
- }
- },
- (rej) => {
- }
- );
- },
- submitOrder() {
- if (this.patient == null) {
- uni.showToast({
- icon: "none",
- title: "请选择就诊人"
- });
- return;
- }
- if (this.orderKey == null) {
- this.confirm();
- }
- var reportImages = [];
- this.fileList1.forEach(function(element) {
- reportImages.push(element.url);
- });
- var tongueImages = [];
- this.fileList2.forEach(function(element) {
- tongueImages.push(element.url);
- });
- var faceImages = [];
- this.fileList3.forEach(function(element) {
- faceImages.push(element.url);
- });
- var forms = [];
- this.temps.forEach(function(element) {
- var item = {
- title: element.title,
- option: element.checks
- };
- forms.push(item);
- });
- var that = this;
- this.$refs.uForm.validate().then((res) => {
- var data = {
- companyId: that.companyId,
- companyUserId: that.companyUserId,
- orderKey: this.orderKey,
- patientId: this.patient.patientId,
- title: this.form.title,
- drugs: this.form.drugs,
- isVisit: this.form.isVisit,
- duration: this.form.duration,
- inquiryType: this.inquiryType,
- inquirySubType: this.inquirySubType,
- orderType: this.orderType,
- doctorId: this.doctorId,
- reportImages: reportImages.toString(),
- tongueImages: tongueImages.toString(),
- faceImages: faceImages.toString(),
- formJson: JSON.stringify(forms)
- };
- uni.showLoading({
- title: "正在处理中..."
- });
- create(data).then(
- (res2) => {
- uni.hideLoading();
- if (res2.code == 200) {
- var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
- uni.requestSubscribeMessage({
- tmplIds: temps,
- success(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res2.order.orderId
- });
- }, 200);
- },
- fail(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res2.order.orderId
- });
- }, 200);
- }
- });
- return;
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }).catch((errors) => {
- });
- },
- confirm() {
- let data = {};
- confirm(data).then(
- (res) => {
- if (res.code == 200) {
- this.orderKey = res.orderKey;
- }
- },
- (rej) => {
- }
- );
- },
- addPatient() {
- uni.navigateTo({
- url: "/pages_user/patient"
- });
- },
- deletePic(event) {
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- async afterRead(event) {
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: "uploading",
- message: "上传中"
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: "success",
- message: "",
- url: result
- }));
- fileListLen++;
- }
- },
- uploadFilePromise(url2) {
- return new Promise((resolve, reject2) => {
- uni.uploadFile({
- url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
- // 仅为示例,非真实的接口地址
- filePath: url2,
- name: "file",
- formData: {
- user: "test"
- },
- success: (res) => {
- setTimeout(() => {
- formatAppLog("log", "at pages_order/inquiryForm2_2.vue:620", JSON.parse(res.data).url);
- resolve(JSON.parse(res.data).url);
- }, 1e3);
- }
- });
- });
- }
- }
- };
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
- const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
- const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_navbar, {
- title: "症状描述",
- onLeftClick: $options.leftClick
- }, null, 8, ["onLeftClick"])
- ]),
- vue.createElementVNode("view", { class: "main" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createVNode(_component_u_alert, {
- fontSize: "16",
- type: "primary",
- description: "尊敬的用户,您好!\n为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
- }),
- vue.createElementVNode("view", { class: "chose-patient" }, [
- $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "value" }, "请点击添加"),
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "patient",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.patient.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createVNode(_component_u_form, {
- rules: $data.rules,
- model: $data.form,
- ref: "uForm",
- labelPosition: "left"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "请描述您的病情")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "描述您的病情",
- prop: "title"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u__textarea, {
- maxlength: "500",
- modelValue: $data.form.title,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.title = $event),
- placeholder: "请输入内容",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "正在服用药品",
- prop: "drugs"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u__textarea, {
- maxlength: "500",
- modelValue: $data.form.drugs,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.drugs = $event),
- placeholder: "请输入内容",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "本次患病多久了",
- prop: "duration"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $data.form.duration,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.form.duration = $event),
- iconPlacement: "left"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.durations, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginRight: "5px" },
- key: index2,
- label: item.name,
- name: item.name,
- activeColor: "#C39A58"
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "此次病情是否去医院就诊过",
- prop: "isVisit"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $data.form.isVisit,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.isVisit = $event),
- iconPlacement: "left"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.isVisits, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginRight: "5px" },
- key: index2,
- label: item.name,
- name: item.name,
- activeColor: "#C39A58"
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "上传检测报告或患处照片"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("view", { class: "icon" }),
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList1,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "1",
- multiple: "",
- maxCount: 4
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- borderBottom: "",
- label: "上传舌苔照片"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("image", {
- onClick: _cache[6] || (_cache[6] = ($event) => $options.showImg(1)),
- class: "icon",
- src: "/static/images/question.png"
- }),
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList2,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "2",
- multiple: "",
- maxCount: 4
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- required: true,
- labelWidth: "200rpx",
- label: "上传面部照片"
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("image", {
- onClick: _cache[7] || (_cache[7] = ($event) => $options.showImg(2)),
- class: "icon",
- src: "/static/images/question.png"
- }),
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList3,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "3",
- multiple: "",
- maxCount: 4
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "您的头面部健康状况自我检查")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createElementVNode("view", { class: "option-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.temps, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
- item.tempType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "title"
- },
- vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "options" }, [
- item.tempType == 1 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
- key: 0,
- modelValue: item.checks,
- "onUpdate:modelValue": ($event) => item.checks = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- size: "28",
- shape: "circle",
- activeColor: "#C39A58",
- key: option.name,
- label: option.name,
- name: option.name
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "您的四肢肩颈健康状况自我检查")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createElementVNode("view", { class: "option-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.temps, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
- item.tempType == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "title"
- },
- vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "options" }, [
- item.tempType == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
- key: 0,
- modelValue: item.checks,
- "onUpdate:modelValue": ($event) => item.checks = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- size: "28",
- shape: "circle",
- activeColor: "#C39A58",
- key: option.name,
- label: option.name,
- name: option.name
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "您的胸腹部健康状况自我检查")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createElementVNode("view", { class: "option-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.temps, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
- item.tempType == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "title"
- },
- vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "options" }, [
- item.tempType == 3 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
- key: 0,
- modelValue: item.checks,
- "onUpdate:modelValue": ($event) => item.checks = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- size: "28",
- shape: "circle",
- activeColor: "#C39A58",
- key: option.name,
- label: option.name,
- name: option.name
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "其他身体状况自我检查")
- ]),
- vue.createElementVNode("view", { class: "form" }, [
- vue.createElementVNode("view", { class: "option-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.temps, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option-item" }, [
- item.tempType == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "title"
- },
- vue.toDisplayString(index2 + 1) + " " + vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "options" }, [
- item.tempType == 4 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
- key: 0,
- modelValue: item.checks,
- "onUpdate:modelValue": ($event) => item.checks = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- size: "28",
- shape: "circle",
- activeColor: "#C39A58",
- key: option.name,
- label: option.name,
- name: option.name
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["rules", "model"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[8] || (_cache[8] = ($event) => $options.submitOrder())
- }, "提交订单")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$18 = {
- data() {
- return {
- companyId: null,
- companyUserId: null,
- orderKey: null,
- patient: null,
- durations: [
- {
- name: "一周内",
- disabled: false
- },
- {
- name: "一个月内",
- disabled: false
- },
- {
- name: "半年内",
- disabled: false
- },
- {
- name: "半年以上",
- disabled: false
- }
- ],
- isVisits: [
- {
- name: "未就诊",
- disabled: false
- },
- {
- name: "就诊过",
- disabled: false
- }
- ],
- title: "",
- isVisit: "就诊过",
- duration: "一周内",
- inquiryType: null,
- orderType: null,
- doctorId: null,
- fileList1: []
- };
- },
- onLoad(options) {
- if (!this.$isEmpty(options.companyId)) {
- this.companyId = options.companyId;
- }
- if (!this.$isEmpty(options.companyUserId)) {
- this.companyUserId = options.companyUserId;
- }
- this.inquiryType = options.inquiryType;
- this.orderType = options.orderType;
- this.doctorId = options.doctorId;
- formatAppLog("log", "at pages_order/inquiryForm3.vue:151", this.inquiryType);
- formatAppLog("log", "at pages_order/inquiryForm3.vue:152", this.orderType);
- formatAppLog("log", "at pages_order/inquiryForm3.vue:153", this.doctorId);
- this.confirm();
- },
- onShow() {
- var that = this;
- uni.$on("refreshOrderPatient", (res) => {
- that.patient = res;
- });
- },
- methods: {
- submitOrder() {
- if (this.patient == null) {
- uni.showToast({
- icon: "none",
- title: "请选择就诊人"
- });
- return;
- }
- var images = [];
- this.fileList1.forEach(function(element) {
- images.push(element.url);
- });
- var data = {
- companyId: this.companyId,
- companyUserId: this.companyUserId,
- orderKey: this.orderKey,
- patientId: this.patient.patientId,
- title: this.title,
- isVisit: this.isVisit,
- duration: this.duration,
- inquiryType: this.inquiryType,
- orderType: this.orderType,
- doctorId: this.doctorId,
- reportImages: images.toString()
- };
- uni.showLoading({
- title: "正在处理中..."
- });
- create(data).then(
- (res) => {
- if (res.code == 200) {
- var temps = ["YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok"];
- uni.requestSubscribeMessage({
- tmplIds: temps,
- success(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res.order.orderId
- });
- }, 200);
- },
- fail(e) {
- setTimeout(function() {
- uni.redirectTo({
- url: "./inquiryPay?orderId=" + res.order.orderId
- });
- }, 200);
- }
- });
- return;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- confirm() {
- let data = {};
- confirm(data).then(
- (res) => {
- if (res.code == 200) {
- this.orderKey = res.orderKey;
- }
- },
- (rej) => {
- }
- );
- },
- addPatient() {
- uni.navigateTo({
- url: "/pages_user/patient"
- });
- },
- deletePic(event) {
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- async afterRead(event) {
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: "uploading",
- message: "上传中"
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: "success",
- message: "",
- url: result
- }));
- fileListLen++;
- }
- },
- uploadFilePromise(url2) {
- return new Promise((resolve, reject2) => {
- uni.uploadFile({
- url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
- // 仅为示例,非真实的接口地址
- filePath: url2,
- name: "file",
- formData: {
- user: "test"
- },
- success: (res) => {
- setTimeout(() => {
- formatAppLog("log", "at pages_order/inquiryForm3.vue:279", JSON.parse(res.data).url);
- resolve(JSON.parse(res.data).url);
- }, 1e3);
- }
- });
- });
- }
- }
- };
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "main" }, [
- vue.createVNode(_component_u_alert, {
- fontSize: "16",
- type: "primary",
- description: "尊敬的用户,您好!\r\n 为了您的健康,请认真填写以下内容,以便医生为您更好地辨证论治,提供更有针对性的解决方案!"
- }),
- vue.createElementVNode("view", { class: "chose-patient" }, [
- $data.patient == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("text", { class: "title" }, "选择就诊人"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "value" }, "请点击添加"),
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "patient",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addPatient())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.patient.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "info" }, [
- $data.patient.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- $data.patient.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge($data.patient.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard($data.patient.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "red-dot" }, "*"),
- vue.createElementVNode("view", { class: "title" }, "请描述您的病情")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u__textarea, {
- maxlength: "500",
- modelValue: $data.title,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.title = $event),
- placeholder: "请输入内容",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "red-dot" }, "*"),
- vue.createElementVNode("view", { class: "title" }, "本次患病多久了?")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $data.duration,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.duration = $event),
- iconPlacement: "left"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.durations, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginRight: "5px" },
- key: index2,
- label: item.name,
- name: item.name,
- activeColor: "#C39A58"
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "red-dot" }, "*"),
- vue.createElementVNode("view", { class: "title" }, "此次病情是否去医院就诊过?")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u_radio_group, {
- modelValue: $data.isVisit,
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.isVisit = $event),
- iconPlacement: "left"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.isVisits, (item, index2) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginRight: "5px" },
- key: index2,
- label: item.name,
- name: item.name,
- activeColor: "#C39A58"
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title" }, "上传检测报告或患处照片?")
- ]),
- vue.createElementVNode("view", { style: { "margin": "15rpx 0rpx" } }, [
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList1,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "1",
- maxCount: 5
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.submitOrder())
- }, "提交订单")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$17 = {
- data() {
- return {
- order: null,
- orderId: null,
- orderTypeOptions: [],
- inquiryTypeOptions: [],
- couponText: "请选择优惠券",
- userCouponId: 0,
- coupons: [],
- couponShow: false,
- payMoney: 0,
- discountMoney: 0
- };
- },
- onLoad(options) {
- this.orderId = options.orderId;
- },
- onShow() {
- this.getDictByKey("sys_inquiry_order_type");
- this.getDictByKey("sys_inquiry_type");
- this.getInquiryOrderById();
- this.getMyEnableCouponList();
- },
- //发送给朋友
- onShareAppMessage(res) {
- var that = this;
- if (this.$isLogin()) {
- return {
- title: "订单支付",
- path: "/pages_order/inquiryPay?orderId=" + that.orderId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- couponSelect(item) {
- this.couponShow = false;
- this.userCouponId = item.id;
- formatAppLog("log", "at pages_order/inquiryPay.vue:148", item);
- this.couponText = item.price + "元优惠券";
- this.compute();
- },
- open() {
- },
- close() {
- this.couponShow = false;
- },
- openCoupon() {
- this.couponShow = true;
- },
- delCoupon() {
- this.userCouponId = 0;
- this.couponText = "请选择优惠券";
- this.compute();
- },
- compute() {
- var data = {
- orderId: this.orderId,
- userCouponId: this.userCouponId
- };
- formatAppLog("log", "at pages_order/inquiryPay.vue:170", data);
- compute$1(data).then(
- (res) => {
- if (res.code == 200) {
- this.payMoney = res.data.payMoney;
- this.discountMoney = res.data.discountMoney;
- } else {
- this.userCouponId = 0;
- this.couponText = "请选择优惠券";
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (err) => {
- }
- );
- },
- getMyEnableCouponList() {
- var data = { couponType: 3 };
- getMyEnableCouponList(data).then(
- (res) => {
- if (res.code == 200) {
- this.coupons = res.data;
- }
- },
- (err) => {
- }
- );
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_inquiry_order_type") {
- this.orderTypeOptions = res.data;
- }
- if (key == "sys_inquiry_type") {
- this.inquiryTypeOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- getInquiryOrderById() {
- var data = { orderId: this.orderId };
- var that = this;
- uni.showLoading();
- getInquiryOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- uni.hideLoading();
- that.order = res.data;
- this.compute();
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- payOrder() {
- var data = {
- orderId: this.order.orderId,
- userCouponId: this.userCouponId
- };
- uni.showLoading();
- pay$1(data).then(
- (res) => {
- if (res.code == 200) {
- uni.redirectTo({
- url: "./inquiryPayment?orderId=" + this.orderId
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "other-info" }, [
- vue.createElementVNode("view", { class: "title" }, "付款详情"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单号:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单类型:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "text" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.money.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item",
- onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠券:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.couponText),
- 1
- /* TEXT */
- ),
- $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])),
- class: "ic-close",
- src: "/static/images/close.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("image", {
- class: "ic-back",
- src: "/static/images/arrow_gray.png"
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.userCouponId == null || $data.order.userCouponId == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createVNode(_component_u_popup, {
- closeable: true,
- show: $data.couponShow,
- round: 10,
- mode: "bottom",
- onClose: $options.close,
- onOpen: $options.open
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "coupon" }, [
- $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "coupon-box"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.coupons, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.couponSelect(item),
- class: "coupon-item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/004bcf24fc7641dea9f3247fa8d59ea2.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3ce37842579c48e2b8e50e547adbfeb6.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { style: { "z-index": "999" } }, [
- vue.createTextVNode(" ¥"),
- vue.createElementVNode(
- "span",
- { class: "num" },
- vue.toDisplayString(item.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "pic-num" },
- "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "btns" }, [
- item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(item.limitTime) + " 到期",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- "使用时间 " + vue.toDisplayString(item.useTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "bnt gray"
- }, "已使用")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "bnt gray"
- }, "已过期")) : vue.createCommentVNode("v-if", true),
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "btn"
- }, "使用")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "empty"
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" })
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show", "onClose", "onOpen"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode(
- "view",
- {
- class: "btn",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.payOrder())
- },
- "支付" + vue.toDisplayString($data.payMoney.toFixed(2)) + "元",
- 1
- /* TEXT */
- )
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$16 = {
- data() {
- return {
- payMethod: null,
- orderId: null,
- order: null
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.payMethod = option.payMethod;
- },
- onShow() {
- this.getInquiryOrderById();
- },
- methods: {
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- getInquiryOrderById() {
- var data = { orderId: this.orderId };
- formatAppLog("log", "at pages_order/inquiryPayment.vue:71", data);
- getInquiryOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.data;
- if (this.payMethod != null && this.payMethod == "app") {
- this.payOrder();
- }
- }
- },
- (rej) => {
- }
- );
- },
- payOrder() {
- var data = {
- orderId: this.orderId
- };
- var that = this;
- uni.showLoading();
- payment$1(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.isPay == 1) {
- uni.redirectTo({
- url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
- });
- } else {
- if (res.type == "tz") {
- uni.setStorageSync("ztPayUrl", res.data.body.url);
- uni.redirectTo({
- url: "/pages_order/tzPay"
- });
- } else if (res.type == "yb") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/inquiryPayment.vue:109", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/inquiryPayment.vue:118", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "hf") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/inquiryPayment.vue:138", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/inquiryPayment.vue:147", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "wx") {
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.packageValue,
- signType: res.data.signType,
- paySign: res.data.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/inquiryPayment.vue:174", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- }
- }
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner-box"
- }, [
- vue.createCommentVNode(" 时间、价格 "),
- vue.createElementVNode("view", { class: "time-price" }, [
- vue.createElementVNode("text", { class: "time" }, "订单金额"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
- }, "立即支付")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderInquiryPayment = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryPayment.vue"]]);
- const _sfc_main$15 = {
- data() {
- return {
- url: "",
- content: ""
- };
- },
- onLoad(options) {
- var that = this;
- var url2 = uni.getStorageSync("ztPayUrl");
- that.url = url2;
- const obj = this.$urlToObj(url2);
- formatAppLog("log", "at pages_order/tzPay.vue:20", obj.extraData);
- uni.setStorageSync("payExtraData", obj.extraData);
- },
- methods: {}
- };
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("web-view", { src: $data.url }, null, 8, ["src"])
- ]);
- }
- 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"]]);
- const _sfc_main$14 = {
- data() {
- return {
- payData: null,
- payExtraData: null
- };
- },
- onLoad(options) {
- formatAppLog("log", "at pages_order/tzWeixinPay.vue:18", options);
- this.payData = JSON.parse(decodeURIComponent(options.openid));
- var json = uni.getStorageSync("payExtraData");
- this.payExtraData = JSON.parse(json);
- formatAppLog("log", "at pages_order/tzWeixinPay.vue:22", this.payExtraData);
- formatAppLog("log", "at pages_order/tzWeixinPay.vue:23", this.payData);
- this.payOrder();
- },
- methods: {
- payOrder() {
- var that = this;
- uni.showLoading({
- title: "处理中..."
- });
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: that.payData.timeStamp,
- nonceStr: that.payData.nonceStr,
- package: that.payData.package,
- signType: that.payData.signType,
- paySign: that.payData.paySign,
- success: function(res) {
- uni.hideLoading();
- if (that.payExtraData.orderType == 1) {
- uni.redirectTo({
- url: "/pages_order/inquiryOrderPaySuccess?orderId=" + that.payExtraData.orderId
- });
- } else if (that.payExtraData.orderType == 2) {
- uni.redirectTo({
- url: "/pages_order/storeOrderPaySuccess?orderId=" + that.payExtraData.orderId
- });
- } else if (that.payExtraData.orderType == 3) {
- uni.redirectTo({
- url: "/pages_order/packageOrderPaySuccess?orderId=" + that.payExtraData.orderId
- });
- }
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- }
- }
- };
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.payOrder())
- }, "支付")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$13 = {
- data() {
- return {
- order: null
- };
- },
- onLoad(option) {
- uni.setNavigationBarTitle({
- title: "支付结果"
- });
- this.orderId = option.orderId;
- this.getInquiryOrderById();
- },
- methods: {
- getInquiryOrderById() {
- var data = { orderId: this.orderId };
- var that = this;
- uni.showLoading();
- getInquiryOrderById(data).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- that.order = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- showOrderDetails(orderId) {
- uni.redirectTo({
- url: "./inquiryOrderDetails?orderId=" + orderId
- });
- }
- }
- };
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("text", { class: "title" }, "支付成功"),
- vue.createElementVNode("image", {
- class: "icon",
- src: "/static/images/success.png"
- }),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
- }, " 查看订单")
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.money.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const Pages_orderInquiryOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderPaySuccess.vue"]]);
- let request$7 = new Request$1().http;
- function getMyStoreOrderList(data) {
- return request$7("/app/storeOrder/getMyStoreOrderList", data, "GET");
- }
- function getCompanyUserStoreOrderList(data) {
- return request$7("/app/storeOrder/getCompanyUserStoreOrderList", data, "GET");
- }
- function getMyStoreOrderById(data) {
- return request$7("/app/storeOrder/getMyStoreOrderById", data, "GET");
- }
- function getStoreOrderById(data) {
- return request$7("/app/storeOrder/getStoreOrderById", data, "GET");
- }
- function getCompanyUserStoreOrderById(data) {
- return request$7("/app/storeOrder/getCompanyUserStoreOrderById", data, "GET");
- }
- function pay(data) {
- return request$7("/app/storeOrder/pay", data, "POST", "application/json;charset=UTF-8");
- }
- function payment(data) {
- return request$7("/app/storeOrder/payment", data, "POST", "application/json;charset=UTF-8");
- }
- function compute(data) {
- return request$7("/app/storeOrder/compute", data, "POST", "application/json;charset=UTF-8");
- }
- function cancelOrder(data) {
- return request$7("/app/storeOrder/cancelOrder", data, "POST", "application/json;charset=UTF-8");
- }
- function finishOrder(data) {
- return request$7("/app/storeOrder/finishOrder", data, "POST", "application/json;charset=UTF-8");
- }
- function getExpress(data) {
- return request$7("/app/storeOrder/getExpress", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$12 = {
- data() {
- return {
- order: null
- };
- },
- onLoad(option) {
- uni.setNavigationBarTitle({
- title: "支付结果"
- });
- uni.$emit("refreshStoreOrder");
- this.orderId = option.orderId;
- this.getStoreOrderById();
- },
- methods: {
- getStoreOrderById() {
- var data = { orderId: this.orderId };
- var that = this;
- uni.showLoading();
- getStoreOrderById(data).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- that.order = res.order;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- showOrderDetails(orderId) {
- formatAppLog("log", "at pages_order/storeOrderPaySuccess.vue:87", orderId);
- uni.redirectTo({
- url: "/pages_order/storeOrderDetail?orderId=" + orderId
- });
- }
- }
- };
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("text", { class: "title" }, "支付成功"),
- vue.createElementVNode("image", {
- class: "icon",
- src: "/static/images/success.png"
- }),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
- }, " 查看订单")
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderCode))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const Pages_orderStoreOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPaySuccess.vue"]]);
- const _sfc_main$11 = {
- data() {
- return {
- hospital: null,
- department: null,
- doctor: null,
- form: {
- orderId: null,
- starCount: 5,
- pingStar: 0,
- pingContent: ""
- }
- };
- },
- onLoad(options) {
- this.form.orderId = options.orderId;
- this.getMyInquiryOrderById();
- },
- methods: {
- getMyInquiryOrderById() {
- var data = { orderId: this.form.orderId };
- getMyInquiryOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.data.order;
- this.doctorId = this.order.doctorId;
- this.getDoctorDetails();
- }
- },
- (err) => {
- }
- );
- },
- getDoctorDetails() {
- var data = { doctorId: this.doctorId };
- getDoctorDetails(data).then(
- (res) => {
- if (res.code == 200) {
- this.doctor = res.data.doctor;
- this.department = res.data.department;
- this.hospital = res.data.hospital;
- }
- },
- (rej) => {
- }
- );
- },
- submit() {
- uni.showLoading({
- title: "处理中..."
- });
- pingOrder(this.form).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "评价成功"
- });
- uni.$emit("refreshInquiryOrder");
- setTimeout(function() {
- uni.navigateBack({
- delta: 1
- });
- }, 2e3);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "ping" }, [
- vue.createElementVNode("view", { class: "title" }, " 问诊医生 "),
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.doctor.avatar,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString($data.doctor.doctorName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "doc-dept-box" },
- vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-his-box" },
- vue.toDisplayString($data.hospital.hospitalName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "ping-star" }, [
- vue.createElementVNode("text", { class: "label" }, "问诊满意度"),
- vue.createElementVNode("view", { class: "star" }, [
- vue.createVNode(_component_u_rate, {
- size: "24",
- "active-color": "#fcab36",
- modelValue: $data.form.pingStar,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.pingStar = $event)
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createElementVNode("view", { class: "ping-content" }, [
- vue.createElementVNode("view", { class: "textarea-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.pingContent = $event),
- placeholder: "写入您对医生的评价吧",
- maxlength: "200"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.pingContent]
- ]),
- vue.createElementVNode(
- "view",
- { class: "num-box" },
- vue.toDisplayString($data.form.pingContent.length) + "/200",
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
- }, "提交评价")
- ])
- ]);
- }
- 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"]]);
- let request$6 = new Request$1().http;
- function getPrescribeList(data) {
- return request$6("/app/prescribe/getPrescribeList", data, "GET");
- }
- function getPrescribeById(data) {
- return request$6("/app/prescribe/getPrescribeById", data, "GET");
- }
- const _sfc_main$10 = {
- mixins: [MescrollMixin],
- data() {
- return {
- status: 0,
- tabs: [
- {
- id: 0,
- name: "待开方"
- },
- {
- id: 1,
- name: "已开方"
- },
- {
- id: 2,
- name: "已拒绝"
- }
- ],
- mescroll: null,
- // 上拉加载的配置
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- // 列表数据
- dataList: []
- };
- },
- onLoad() {
- },
- methods: {
- tabChange(item) {
- this.status = item.id;
- formatAppLog("log", "at pages_order/prescribeList.vue:91", item);
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getPrescribeList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- showImg(item) {
- var imgArr = [];
- imgArr.push(item.rpUrl);
- uni.previewImage({
- urls: imgArr,
- current: imgArr[0]
- });
- }
- }
- };
- function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: _ctx.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "prescribe-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item",
- onClick: ($event) => $options.navTo("/pages_order/prescribeDetails?prescribeId=" + item.prescribeId)
- }, [
- vue.createElementVNode("view", { class: "ordersn-box" }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "处方单号:" + vue.toDisplayString(item.prescribeCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text info"
- }, "待开方")) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text success"
- }, "已开方")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 2,
- class: "text black"
- }, "已拒绝")) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "ask-text" },
- "诊断结果:" + vue.toDisplayString(item.diagnose),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.drugs, (subItme, index3) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", { class: "name-box ellipsis" }, [
- vue.createElementVNode(
- "view",
- { class: "tag" },
- vue.toDisplayString(index3 + 1),
- 1
- /* TEXT */
- ),
- vue.createTextVNode(
- vue.toDisplayString(subItme.drugName),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- vue.createElementVNode(
- "view",
- { class: "ask-text" },
- "审核结果:" + vue.toDisplayString(item.auditReason),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "patient-text" },
- "患者:" + vue.toDisplayString(item.patientName) + " " + vue.toDisplayString(item.patientAge) + "岁 " + vue.toDisplayString(item.patientGender == 1 ? "男" : "女"),
- 1
- /* TEXT */
- ),
- item.createTime != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "ask-time"
- },
- "提交时间:" + vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.auditTime != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "ask-time"
- },
- "审核时间:" + vue.toDisplayString(item.auditTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_orderPrescribeList = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/prescribeList.vue"]]);
- const _sfc_main$$ = {
- data() {
- return {
- doctor: null,
- drugs: [],
- prescribe: null,
- prescribeId: null,
- usage: {}
- };
- },
- onLoad(options) {
- if (options.prescribeId != null) {
- this.prescribeId = options.prescribeId;
- } else if (options.hasOwnProperty("q") && options.q) {
- const url2 = decodeURIComponent(options.q);
- const obj = this.$urlToObj(url2);
- this.prescribeId = obj.prescribeId;
- }
- },
- onShow() {
- this.getPrescribeById();
- },
- methods: {
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- copyOrderSn() {
- uni.setClipboardData({
- data: this.order.orderSn,
- success: function() {
- uni.showToast({
- title: "复制成功",
- icon: "none"
- });
- }
- });
- },
- getPrescribeById() {
- var data = { prescribeId: this.prescribeId };
- getPrescribeById(data).then(
- (res) => {
- if (res.code == 200) {
- this.prescribe = res.data.prescribe;
- this.drugs = res.data.drugs;
- this.doctor = res.data.doctor;
- this.usage = JSON.parse(this.prescribe.usageJson);
- }
- },
- (err) => {
- }
- );
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- $data.prescribe != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "cont"
- }, [
- vue.createElementVNode("view", { class: "other-info" }, [
- vue.createElementVNode("view", { class: "title" }, "御君方互联网医院处方笺"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "医生姓名:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.doctor.doctorName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者姓名:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.prescribe.patientName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者年龄:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.prescribe.patientAge) + "岁 ",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者性别:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.prescribe.patientGender == 1 ? "男" : "女"),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "other-info" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "处方单号:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.prescribe.prescribeCode),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "开方时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.prescribe.createTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "医生诊断:"),
- vue.createElementVNode(
- "view",
- { class: "text" },
- vue.toDisplayString($data.prescribe.diagnose),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "审核意见:"),
- $data.prescribe.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.prescribe.auditReason),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "drug-cont" }, [
- vue.createElementVNode("view", { class: "title" }, "药品信息"),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.drugs, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
- vue.createElementVNode("view", { class: "drug" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: item.drugImgUrl == "" ? "/static/images/drug.svg" : item.drugImgUrl
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "name-cont" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tag"
- }, "西药")) : vue.createCommentVNode("v-if", true),
- item.drugType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "tag"
- }, "中药")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.drugName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(item.drugSpec),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createCommentVNode(" {{item.drugPrice}}元 ")
- ]),
- item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "num"
- },
- "X" + vue.toDisplayString(item.drugNum),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ]),
- item.drugType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "drug-use"
- }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- "用药频率:" + vue.toDisplayString(item.usageFrequencyUnit),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "name" },
- "单次用量:" + vue.toDisplayString(item.usagePerUseCount),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "name" },
- "用药方法:" + vue.toDisplayString(item.usageMethod),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "name" },
- "备注:" + vue.toDisplayString(item.remark),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- $data.prescribe.prescribeType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title left" }, "用药说明"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "用药数量:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.usage.counts),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "用药频率:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.usage.usageFrequencyUnit),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "单次用量:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.usage.usagePerUseCount),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "用药方法:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.usage.usageMethod),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "备注:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.usage.remark),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.prescribe.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "other-info"
- }, [
- vue.createCommentVNode(' <view class="sign">\r\n 出方医生签名\r\n <image :src="prescribe.doctorSignUrl"></image>\r\n </view> '),
- vue.createElementVNode("view", { class: "sign" }, [
- vue.createTextVNode(" 处方医生签名 "),
- vue.createElementVNode("image", {
- src: $data.prescribe.prescribeDoctorSignUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "sign" }, [
- vue.createTextVNode(" 药师签名 "),
- vue.createElementVNode("image", {
- src: $data.prescribe.drugDoctorSignUrl
- }, null, 8, ["src"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.prescribe.storeOrderId != null && $data.prescribe.storeOrderId > 0 && $data.prescribe.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn pay",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_order/storeOrderDetail?orderId=" + $data.prescribe.storeOrderId))
- }, "药品订单")) : vue.createCommentVNode("v-if", true)
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$_ = {
- mixins: [MescrollMixin],
- data() {
- return {
- orderStatusOptions: [],
- searchKey: "",
- status: "0",
- tabs: [
- { name: "全部", id: "0" },
- { name: "待付款", id: "1" },
- { name: "待发货", id: "2" },
- { name: "待收货", id: "3" },
- { name: "已完成", id: "4" }
- ],
- mescroll: null,
- // 上拉加载的配置
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- // 列表数据
- dataList: []
- };
- },
- onLoad(option) {
- var that = this;
- uni.$on("refreshStoreOrder", () => {
- that.mescroll.resetUpScroll();
- });
- this.getDictByKey("sys_order_status");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_order_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- goSearch(e) {
- this.searchKey = e.detail.value;
- this.mescroll.resetUpScroll();
- },
- refund(item) {
- uni.navigateTo({
- url: "/pages_order/storeOrderRefundApply?orderId=" + item.orderId
- });
- },
- tabChange(item) {
- this.status = item.id;
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.searchKey,
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMyStoreOrderList(data).then((res) => {
- if (res.code == 200) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.items = JSON.parse(value2.itemJson);
- });
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 查看订单详情
- showDetail(item) {
- uni.navigateTo({
- url: "./storeOrderDetail?orderId=" + item.orderId
- });
- },
- finish(item) {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定已收货吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: item.orderId
- };
- finishOrder(data).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- that.mescroll.resetUpScroll();
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- cancel(item) {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定取消订单吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: item.orderId
- };
- cancelOrder(data).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- that.mescroll.resetUpScroll();
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- pay(item) {
- uni.navigateTo({
- url: "/pages_order/storeOrderPay?orderId=" + item.orderId
- });
- },
- // 查看物流
- showDelivery(item) {
- uni.navigateTo({
- url: "./storeOrderDelivery?orderId=" + item.orderId
- });
- }
- }
- };
- function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: _ctx.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createCommentVNode(" 订单号,状态 "),
- vue.createElementVNode("view", {
- class: "ordersn-box",
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "订单号:" + vue.toDisplayString(item.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "text success"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ], 8, ["onClick"]),
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.items, (subItem, subIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.showDetail(item),
- key: subIndex,
- class: "drug-item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(subItem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subItem.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(JSON.parse(subItem.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(JSON.parse(subItem.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text> '),
- vue.createCommentVNode(' <text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text> ')
- ]),
- item.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "amount"
- },
- "x" + vue.toDisplayString(JSON.parse(subItem.jsonInfo).num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(" 实付金额、按钮 "),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createCommentVNode(` <view class="btn cancel">
- 联系客服
- <button class='contact-btn' open-type="contact">
- </button>
- </view> `),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn cancel",
- onClick: ($event) => $options.cancel(item)
- }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn pay",
- onClick: ($event) => $options.pay(item)
- }, "支付", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(' <view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view> '),
- vue.createCommentVNode(' <view v-if="item.deliverySn!=null" class="btn pay" @click.stop="showDelivery(item)">查看物流</view> '),
- item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "btn pay",
- onClick: ($event) => $options.finish(item)
- }, "确认收货", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_orderStoreOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderList.vue"]]);
- const _sfc_main$Z = {
- data() {
- return {
- payLimitTime: null,
- orderId: null,
- order: {},
- items: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- },
- onShow() {
- this.getMyStoreOrderById();
- },
- methods: {
- showPrescribe() {
- var data = { prescribeId: this.order.prescribeId };
- getPrescribeById(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.data.prescribe.prescribeImgUrl != null) {
- var data2 = [];
- data2.push(res.data.prescribe.prescribeImgUrl);
- uni.previewImage({
- current: 0,
- urls: data2
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "电子处方单不存在"
- });
- }
- }
- },
- (err) => {
- }
- );
- },
- getMyStoreOrderById() {
- var data = { orderId: this.orderId };
- getMyStoreOrderById(data).then((res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.items = res.items;
- this.payLimitTime = res.payLimitTime;
- this.prescribe = res.prescribe;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- showDelivery() {
- uni.navigateTo({
- url: "./storeOrderDelivery?orderId=" + this.orderId
- });
- },
- cancel() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定取消订单吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: that.order.orderId
- };
- cancelOrder(data).then((res2) => {
- if (res2.code == 200) {
- that.getMyStoreOrderById();
- uni.$emit("refreshStoreOrder");
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- finish() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定已收货吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: that.orderId
- };
- finishOrder(data).then((res2) => {
- if (res2.code == 200) {
- that.getMyStoreOrderById();
- uni.$emit("refreshStoreOrder");
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- pay() {
- uni.navigateTo({
- url: "/pages_order/storeOrderPay?orderId=" + this.order.orderId
- });
- },
- payRemain() {
- uni.navigateTo({
- url: "/pages_user/user/paymentOrderRemain?orderId=" + this.order.orderId
- });
- },
- // 复制订单编号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- // 退货
- refund() {
- uni.navigateTo({
- url: "/pages_order/storeOrderRefundApply?orderId=" + this.orderId
- });
- }
- }
- };
- function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createCommentVNode(" 订单状态 "),
- vue.createElementVNode("view", { class: "order-status" }, [
- vue.createCommentVNode(" 待付款 "),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待付款"),
- vue.createElementVNode(
- "text",
- { class: "desc" },
- "请在" + vue.toDisplayString($data.payLimitTime) + "前完成支付",
- 1
- /* TEXT */
- )
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 待发货 "),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待发货"),
- vue.createElementVNode("text", { class: "desc" }, "等待后台发货")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已发货、待收货 "),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待收货"),
- vue.createElementVNode("text", { class: "desc" }, "运输中")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已完成 "),
- $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "已完成"),
- vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode("交易取消 "),
- $data.order.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "交易关闭"),
- vue.createElementVNode("text", { class: "desc" }, "订单已取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "申请售后"),
- vue.createElementVNode("text", { class: "desc" }, "请等待客服审核,您的退款将在2-5个工作日内原路退回")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "退款成功"),
- vue.createElementVNode("text", { class: "desc" }, "已成功退款")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 下单人信息 "),
- $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "order-placer"
- }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "location",
- src: "/static/images/location.png",
- mode: ""
- }),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("view", { class: "name-phone" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.userName),
- 1
- /* TEXT */
- ),
- $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.userPhone),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "address ellipsis2" },
- vue.toDisplayString($data.order.userAddress),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "goods-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text> '),
- vue.createCommentVNode(' <text class="num" v-if="JSON.parse(item.jsonInfo).price!=null">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> ')
- ]),
- $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "num"
- },
- "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(" 已优惠、小计 "),
- vue.createElementVNode("view", { class: "sub-total" }, [
- vue.createElementVNode(
- "view",
- { class: "discount" },
- " 订单金额:¥" + vue.toDisplayString($data.order.payPrice),
- 1
- /* TEXT */
- ),
- 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> ')
- ])
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付方式"),
- $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "微信支付")) : vue.createCommentVNode("v-if", true),
- $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "物流代收")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额"),
- $data.order.totalPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.totalPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额"),
- $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "应付金额"),
- $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付时间"),
- $data.order.payTime != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.payTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- 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> ')
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", { class: "btn cancel" }, [
- vue.createTextVNode(" 联系客服 "),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- })
- ]),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn cancel",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.cancel())
- }, "取消订单")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn pay",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.pay())
- }, "支付")) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(' <view class="btn pay" v-if="order.status>1&&order.prescribeId!=null&&order.prescribeId>0" @click="showPrescribe()">查看处方单</view> '),
- $data.order.status > 1 && $data.order.isAfterSales == 1 && $data.order.orderType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "btn cancel",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.refund())
- }, "申请售后")) : vue.createCommentVNode("v-if", true),
- $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "btn pay",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.showDelivery())
- }, "查看物流")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "btn pay",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.finish())
- }, "确认收货")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderStoreOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderDetail.vue"]]);
- const _sfc_main$Y = {
- data() {
- return {
- addressId: null,
- wxPay: true,
- address: null,
- orderId: null,
- order: null,
- items: null,
- couponText: "请选择优惠券",
- userCouponId: 0,
- coupons: [],
- couponShow: false,
- payMoney: 0,
- discountMoney: 0
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- var that = this;
- uni.$on("updateAddress", (e) => {
- that.addressId = e.addressId;
- that.address = e;
- that.address.address = e.province + e.city + e.district + e.detail;
- });
- },
- onShow() {
- this.getStoreOrderById();
- this.getMyEnableCouponList();
- },
- onShareAppMessage(res) {
- var that = this;
- if (this.$isLogin()) {
- return {
- title: "订单支付",
- path: "/pages_order/storeOrderPay?orderId=" + that.orderId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- couponSelect(item) {
- this.couponShow = false;
- this.userCouponId = item.id;
- formatAppLog("log", "at pages_order/storeOrderPay.vue:203", item);
- this.couponText = item.price + "元优惠券";
- this.compute();
- },
- open() {
- },
- close() {
- this.couponShow = false;
- },
- openCoupon() {
- this.couponShow = true;
- },
- delCoupon() {
- this.userCouponId = 0;
- this.couponText = "请选择优惠券";
- this.compute();
- },
- compute() {
- var data = {
- orderId: this.orderId,
- userCouponId: this.userCouponId
- };
- formatAppLog("log", "at pages_order/storeOrderPay.vue:225", data);
- compute(data).then(
- (res) => {
- if (res.code == 200) {
- this.payMoney = res.data.payMoney;
- this.discountMoney = res.data.discountMoney;
- } else {
- this.userCouponId = 0;
- this.couponText = "请选择优惠券";
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (err) => {
- }
- );
- },
- getMyEnableCouponList() {
- var data = { couponType: 2 };
- getMyEnableCouponList(data).then(
- (res) => {
- if (res.code == 200) {
- this.coupons = res.data;
- }
- },
- (err) => {
- }
- );
- },
- getStoreOrderById() {
- var data = { orderId: this.orderId };
- formatAppLog("log", "at pages_order/storeOrderPay.vue:260", data);
- getStoreOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.items = res.items;
- if (this.order.userName != null) {
- this.address = {
- realName: this.order.userName,
- phone: this.order.userPhone,
- address: this.order.userAddress
- };
- }
- this.compute();
- }
- },
- (rej) => {
- }
- );
- },
- openAddress() {
- uni.navigateTo({
- url: "/pages_user/address"
- });
- },
- payOrder() {
- var data = {
- userCouponId: this.userCouponId,
- addressId: this.addressId,
- remark: this.order.remark,
- orderId: this.order.orderId
- };
- var that = this;
- uni.showLoading();
- pay(data).then(
- (res) => {
- if (res.code == 200) {
- uni.redirectTo({
- url: "/pages_order/storeOrderPayment?orderId=" + that.order.orderId
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "inner-box" }, [
- vue.createCommentVNode(" 收货人 "),
- $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "address-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode("text", { class: "text name" }, "添加收货地址")
- ])
- ]),
- vue.createElementVNode("view", { class: "arrow-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "address-box",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text name" },
- vue.toDisplayString($data.address.realName),
- 1
- /* TEXT */
- ),
- $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.address.phone),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "address" },
- vue.toDisplayString($data.address.address),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "arrow-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "goods-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text> '),
- vue.createCommentVNode(' <text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> ')
- ]),
- $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "num"
- },
- "x" + vue.toDisplayString(item.num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(" 小计 "),
- vue.createElementVNode("view", { class: "sub-total" }, [
- vue.createElementVNode("text", { class: "label" }, "合计:"),
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "num"
- },
- vue.toDisplayString($data.order.totalPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "other-info" }, [
- vue.createElementVNode("view", { class: "title" }, "支付明细"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item",
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠券:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.couponText),
- 1
- /* TEXT */
- ),
- $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])),
- class: "ic-close",
- src: "/static/images/close.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("image", {
- class: "ic-back",
- src: "/static/images/arrow_gray.png"
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "pay-type" }, [
- vue.createElementVNode("view", { class: "title" }, "支付方式"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: "/static/images/wecha_pay.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "全款支付")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- value: "",
- checked: $data.wxPay,
- color: "#C39A58"
- }, null, 8, ["checked"])
- ])
- ])
- ]),
- vue.createCommentVNode(" 备注 "),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "remarks"
- }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.order.remark = $event),
- placeholder: "备注留言(选填)",
- "placeholder-class": "input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.order.remark]
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createVNode(_component_u_popup, {
- closeable: true,
- show: $data.couponShow,
- round: 10,
- mode: "bottom",
- onClose: $options.close,
- onOpen: $options.open
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "coupon" }, [
- $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "coupon-box"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.coupons, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.couponSelect(item),
- class: "coupon-item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { style: { "z-index": "999" } }, [
- vue.createTextVNode(" ¥"),
- vue.createElementVNode(
- "span",
- { class: "num" },
- vue.toDisplayString(item.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "pic-num" },
- "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "btns" }, [
- item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(item.limitTime) + " 到期",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- "使用时间 " + vue.toDisplayString(item.useTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "bnt gray"
- }, "已使用")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "bnt gray"
- }, "已过期")) : vue.createCommentVNode("v-if", true),
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "btn"
- }, "使用")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "empty"
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" })
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show", "onClose", "onOpen"]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "btn",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.payOrder())
- },
- "支付" + vue.toDisplayString($data.payMoney.toFixed(2)) + "元",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderStoreOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPay.vue"]]);
- const _sfc_main$X = {
- data() {
- return {
- payMethod: null,
- orderId: null,
- order: null
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.payMethod = option.payMethod;
- },
- onShow() {
- this.getStoreOrderById();
- },
- methods: {
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- getStoreOrderById() {
- var data = { orderId: this.orderId };
- formatAppLog("log", "at pages_order/storeOrderPayment.vue:71", data);
- getStoreOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.order;
- if (this.payMethod != null && this.payMethod == "app") {
- this.payOrder();
- }
- }
- },
- (rej) => {
- }
- );
- },
- payOrder() {
- var data = {
- orderId: this.orderId
- };
- var that = this;
- uni.showLoading();
- payment(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.isPay == 1) {
- uni.redirectTo({
- url: "/pages_order/storeOrderPaySuccess?orderId=" + that.order.orderId
- });
- } else {
- if (res.type == "tz") {
- uni.setStorageSync("ztPayUrl", res.data.body.url);
- uni.redirectTo({
- url: "/pages_order/tzPay"
- });
- }
- if (res.type == "yb") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/storeOrderPayment.vue:110", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/storeOrderPayment.vue:119", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./storeOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "hf") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/storeOrderPayment.vue:139", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/storeOrderPayment.vue:148", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./storeOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "wx") {
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.packageValue,
- signType: res.data.signType,
- paySign: res.data.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/storeOrderPayment.vue:175", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./storeOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- }
- }
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner-box"
- }, [
- vue.createCommentVNode(" 时间、价格 "),
- vue.createElementVNode("view", { class: "time-price" }, [
- vue.createElementVNode("text", { class: "time" }, "订单金额"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
- }, "立即支付")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderStoreOrderPayment = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderPayment.vue"]]);
- const _sfc_main$W = {
- data() {
- return {
- orderId: null,
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- report: null,
- patient: null
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.getInquiryOrderReport();
- },
- onShow() {
- },
- methods: {
- getInquiryOrderReport() {
- let data = { orderId: this.orderId };
- getInquiryOrderReport(data).then(
- (res) => {
- if (res.code == 200) {
- if (data != null) {
- formatAppLog("log", "at pages_order/inquiryOrderReport.vue:121", res.data);
- this.report = res.data;
- if (res.data.patientJson != null) {
- this.patient = JSON.parse(res.data.patientJson);
- }
- if (res.data.conditioningPlanJson != null) {
- this.report.conditioningPlan = JSON.parse(res.data.conditioningPlanJson);
- }
- formatAppLog("log", "at pages_order/inquiryOrderReport.vue:129", this.patient);
- }
- }
- },
- (rej) => {
- }
- );
- },
- goBack() {
- uni.navigateBack();
- }
- }
- };
- function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3305ca20c3f646c6b465918efb07f849.png" })
- ]),
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "top-title" }, [
- vue.createElementVNode("image", {
- onClick: _cache[0] || (_cache[0] = ($event) => $options.goBack()),
- src: "/static/images/icon_back_w.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "诊断报告")
- ])
- ]),
- $data.patient != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "cont-box"
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "user" }, [
- vue.createElementVNode("image", {
- src: $data.patient.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : JSON.parse($data.report.patientJson).avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "user-box" }, [
- vue.createElementVNode(
- "view",
- { class: "sex" },
- "性别 " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女"),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "username" },
- "年龄 " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "user-box" }, [
- vue.createElementVNode(
- "view",
- { class: "sex" },
- "身高 " + vue.toDisplayString($data.patient.height) + "CM",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "username" },
- "体重 " + vue.toDisplayString($data.patient.weight) + "KG",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "items" }, [
- vue.createElementVNode("view", { class: "result-box" }, [
- vue.createElementVNode(
- "view",
- { class: "time" },
- "报告时间 " + vue.toDisplayString($data.report.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString($data.report.inquiryResult),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode("view", { class: "title" }, "主诉")
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "line" })
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode("view", { class: "title" }, "用药情况")
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString($data.patient.medication),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "line" })
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode("view", { class: "title" }, "诊断结果")
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString($data.report.inquiryResult),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "line" })
- ]),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.report.conditioningPlan, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.name),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString(item.value.replace(/\\n/g, "<br>")),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "line" })
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode("view", { class: "title" }, "备注")
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString($data.report.remark),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "sign" }, [
- vue.createTextVNode(
- vue.toDisplayString($data.report.deptId == 39 ? "药师" : "医生") + "签名 ",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- src: $data.report.doctorSignUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "tips" }, " 注:本次会诊,仅为针对患者当前身体情况的咨询问诊建议,不作为长期参考依据。 ")
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderInquiryOrderReport = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/inquiryOrderReport.vue"]]);
- const _sfc_main$V = {
- data() {
- return {
- orderId: null,
- order: {},
- package: null,
- items: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.getPackageOrderById();
- },
- onShow() {
- },
- methods: {
- cancelOrder() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确认取消订单吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: that.orderId };
- cancelOrder$1(data).then(
- (res2) => {
- if (res2.code == 200) {
- uni.$emit("refreshPackageOrder");
- that.getPackageOrderById();
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- getPackageOrderById() {
- var data = { orderId: this.orderId };
- getPackageOrderById(data).then((res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.package = JSON.parse(this.order.packageJson);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- pay() {
- uni.navigateTo({
- url: "/pages_order/packageOrderPay?orderId=" + this.order.orderId
- });
- },
- // 返回上一页
- back() {
- let pages2 = getCurrentPages();
- formatAppLog("log", "at pages_order/packageOrderDetails.vue:214", pages2.length);
- if (pages2.length > 1) {
- uni.navigateBack();
- } else {
- uni.reLaunch({
- url: "/pages/common/launch"
- });
- }
- },
- // 复制订单编号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- }
- }
- };
- function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createCommentVNode(" 订单状态 "),
- vue.createElementVNode("view", { class: "order-status" }, [
- vue.createCommentVNode(" 待付款 "),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待付款"),
- vue.createCommentVNode(' <text class="desc">请在{{payLimitTime}}前完成支付</text> ')
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 服务中 "),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b71efb4b5ca54564b553569d578738b4.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "服务中"),
- vue.createElementVNode("text", { class: "desc" }, "正在服务中")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已完成 "),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "已完成"),
- vue.createElementVNode("text", { class: "desc" }, "服务已完成")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode("交易取消 "),
- $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "交易关闭"),
- vue.createElementVNode("text", { class: "desc" }, "订单已取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "退款成功"),
- vue.createElementVNode("text", { class: "desc" }, "已成功退款")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "package-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.package.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.package.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- vue.createElementVNode(
- "view",
- { class: "cycle" },
- "用药周期" + vue.toDisplayString($data.package.cycle) + "天",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "duration" },
- "签约时长" + vue.toDisplayString($data.package.duration) + "天",
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(' <view class="price-box">\r\n <view class="price">¥30元/日</view>\r\n <view class="count">6.2w人已购</view>\r\n </view> ')
- ])
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付方式"),
- $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "全款支付")) : vue.createCommentVNode("v-if", true),
- $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "物流代收")) : vue.createCommentVNode("v-if", true),
- $data.order.payType == 3 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 2,
- class: "text"
- }, "货到付款")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额"),
- $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "抵扣金额"),
- $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "代收金额"),
- $data.order.payRemain != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payRemain.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "运费金额"),
- $data.order.payDelivery != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payDelivery.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn cancel",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.cancelOrder())
- }, "取消订单")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn pay",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.pay())
- }, "支付")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderPackageOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderDetails.vue"]]);
- const _sfc_main$U = {
- mixins: [MescrollMixin],
- data() {
- return {
- orderStatusOptions: [],
- searchKey: "",
- status: "0",
- tabs: [
- { name: "全部", id: "0" },
- { name: "待支付", id: "1" },
- { name: "服务中", id: "2" },
- { name: "已完成", id: "3" },
- { name: "已取消", id: "-1" },
- { name: "已退款", id: "-2" }
- ],
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad(options) {
- var that = this;
- uni.$on("refreshPackageOrder", () => {
- that.mescroll.resetUpScroll();
- });
- this.getDictByKey("sys_package_order_status");
- },
- onShow() {
- },
- methods: {
- pay(item) {
- uni.navigateTo({
- url: "/pages_order/packageOrderPay?orderId=" + item.orderId
- });
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_package_order_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- cancelOrder(item) {
- uni.showModal({
- title: "提示",
- content: "确认取消订单吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: item.orderId };
- cancelOrder$1(data).then(
- (res2) => {
- if (res2.code == 200) {
- uni.$emit("refreshPackageOrder");
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- showDetails(item) {
- uni.navigateTo({
- url: "/pages_order/packageOrderDetails?orderId=" + item.orderId
- });
- },
- tabChange(item) {
- this.status = item.id;
- formatAppLog("log", "at pages_order/packageOrderList.vue:179", item);
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMyPackageOrderList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: true,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-item",
- onClick: ($event) => $options.showDetails(item)
- }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "订单号:" + vue.toDisplayString(item.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "text success"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "package-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- vue.createElementVNode(
- "view",
- { class: "cycle" },
- "用药周期" + vue.toDisplayString(item.cycle) + "天",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "duration" },
- "签约时长" + vue.toDisplayString(item.duration) + "天",
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(' <view class="price-box">\n <view class="price">¥30元/日</view>\n <view class="count">6.2w人已购</view>\n </view> ')
- ])
- ]),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn cancel",
- onClick: vue.withModifiers(($event) => $options.cancelOrder(item), ["stop"])
- }, "取消订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn pay",
- onClick: vue.withModifiers(($event) => $options.pay(item), ["stop"])
- }, "支付订单", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- 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"]]);
- let request$5 = new Request$1().http;
- function getAddressByDefault() {
- return request$5("/app/userAddress/getAddressByDefault", null, "GET");
- }
- function getAddressList() {
- return request$5("/app/userAddress/getAddressList", null, "GET");
- }
- function getAddressById(data) {
- return request$5("/app/userAddress/getAddressById", data, "GET");
- }
- function delAddress(data) {
- return request$5("/app/userAddress/delAddress", data, "POST", "application/json;charset=UTF-8");
- }
- function addAddress(data) {
- return request$5("/app/userAddress/addAddress", data, "POST", "application/json;charset=UTF-8");
- }
- function editAddress(data) {
- return request$5("/app/userAddress/editAddress", data, "POST", "application/json;charset=UTF-8");
- }
- function parseAddress(data) {
- return request$5("/app/userAddress/parseAddress", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$T = {
- data() {
- return {
- giftPrice: 0,
- payTypes: [],
- addressId: null,
- wxPay: true,
- address: null,
- orderId: null,
- order: null,
- items: null,
- payType: "1",
- couponText: "请选择优惠券",
- userCouponId: 0,
- coupons: [],
- couponShow: false,
- payMoney: 0,
- discountMoney: 0,
- payRemain: 0,
- payDelivery: 0,
- payPrice: 0,
- gifts: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- var that = this;
- uni.$on("updateAddress", (e) => {
- that.addressId = e.addressId;
- that.address = e;
- that.address.address = e.province + e.city + e.district + e.detail;
- });
- this.getAddressByDefault();
- },
- onShow() {
- this.getPackageOrderById();
- this.getPackageById();
- this.getConfigByKey();
- },
- methods: {
- getAddressByDefault() {
- getAddressByDefault().then(
- (res) => {
- if (res.code == 200) {
- if (res.data != null) {
- this.addressId = res.data.addressId;
- this.address = res.data;
- this.address.address = res.data.province + res.data.city + res.data.district + res.data.detail;
- }
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- getConfigByKey() {
- var data = { key: "his.package" };
- getConfigByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.giftPrice = JSON.parse(res.data).giftPrice;
- formatAppLog("log", "at pages_order/packageOrderPay.vue:268", this.giftPrice);
- }
- },
- (rej) => {
- }
- );
- },
- checkPayType(payType) {
- var flag2 = false;
- this.payTypes.forEach(function(value2, index2, array3) {
- if (value2.toString() == payType.toString()) {
- flag2 = true;
- }
- });
- return flag2;
- },
- payTypeChange(e) {
- formatAppLog("log", "at pages_order/packageOrderPay.vue:284", e.detail.value);
- this.payType = e.detail.value;
- this.compute();
- },
- couponSelect(item) {
- this.couponShow = false;
- this.userCouponId = item.id;
- formatAppLog("log", "at pages_order/packageOrderPay.vue:292", item);
- this.couponText = item.price + "元优惠券";
- this.compute();
- },
- open() {
- },
- close() {
- this.couponShow = false;
- },
- openCoupon() {
- this.couponShow = true;
- },
- delCoupon() {
- this.userCouponId = 0;
- this.couponText = "请选择优惠券";
- this.compute();
- },
- compute() {
- var data = {
- payType: this.payType,
- orderId: this.orderId,
- userCouponId: this.userCouponId
- };
- formatAppLog("log", "at pages_order/packageOrderPay.vue:315", data);
- compute$2(data).then(
- (res) => {
- if (res.code == 200) {
- this.payPrice = res.moneys.payPrice.toFixed(2);
- this.payMoney = res.moneys.payMoney.toFixed(2);
- this.discountMoney = res.moneys.discountMoney.toFixed(2);
- this.payDelivery = res.moneys.payDelivery.toFixed(2);
- this.payRemain = res.moneys.payRemain.toFixed(2);
- this.gifts = res.moneys.gifts;
- } else {
- this.payType = 1;
- this.compute();
- this.userCouponId = 0;
- this.couponText = "请选择优惠券";
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (err) => {
- }
- );
- },
- getMyEnableCouponList() {
- var data = {};
- if (this.package.isShow == 0) {
- data.couponType = 5;
- data.cateId = this.package.privateType;
- } else if (this.package.isShow == 1) {
- data.couponType = 6;
- data.cateId = this.package.diseaseType;
- }
- getMyEnableCouponList(data).then(
- (res) => {
- if (res.code == 200) {
- this.coupons = res.data;
- }
- },
- (err) => {
- }
- );
- },
- getPackageOrderById() {
- var data = { orderId: this.orderId };
- formatAppLog("log", "at pages_order/packageOrderPay.vue:364", data);
- getPackageOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.compute();
- this.getPackageById(this.order.packageId);
- }
- },
- (rej) => {
- }
- );
- },
- getPackageById(packageId) {
- var data = { packageId };
- getPackageById(data).then(
- (res) => {
- if (res.code == 200) {
- this.package = res.data;
- this.payTypes = res.data.payType.split(",");
- formatAppLog("log", "at pages_order/packageOrderPay.vue:386", this.payTypes);
- this.getMyEnableCouponList();
- }
- },
- (rej) => {
- }
- );
- },
- openAddress() {
- uni.navigateTo({
- url: "/pages_user/address"
- });
- },
- payOrder() {
- var data = {
- payType: this.payType,
- userCouponId: this.userCouponId,
- addressId: this.addressId,
- remark: this.order.remark,
- orderId: this.order.orderId
- };
- uni.showLoading();
- pay$2(data).then(
- (res) => {
- if (res.code == 200) {
- uni.redirectTo({
- url: "./packagePayment?orderId=" + this.orderId
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "inner-box" }, [
- vue.createCommentVNode(" 收货人 "),
- $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "address-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode("text", { class: "text name" }, "添加收货地址")
- ])
- ]),
- vue.createElementVNode("view", { class: "arrow-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "address-box",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text name" },
- vue.toDisplayString($data.address.realName),
- 1
- /* TEXT */
- ),
- $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.address.phone),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "address" },
- vue.toDisplayString($data.address.address),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "arrow-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "other-info" }, [
- vue.createElementVNode("view", { class: "title" }, "支付明细"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "应付金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.payPrice),
- 1
- /* TEXT */
- )
- ])
- ]),
- $data.order != null && ($data.order.userCouponId == null || $data.order.userCouponId == 0) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item",
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.openCoupon(), ["stop"]))
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠券:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.couponText),
- 1
- /* TEXT */
- ),
- $data.userCouponId != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $options.delCoupon(), ["stop"])),
- class: "ic-close",
- src: "/static/images/close.png"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("image", {
- class: "ic-back",
- src: "/static/images/arrow_gray.png"
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.discountMoney),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.payMoney),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "物流代收:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.payRemain),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "邮费:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.payDelivery),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "pay-type" }, [
- vue.createElementVNode("view", { class: "title" }, "支付方式"),
- vue.createElementVNode(
- "radio-group",
- {
- onChange: _cache[4] || (_cache[4] = (...args) => $options.payTypeChange && $options.payTypeChange(...args))
- },
- [
- $options.checkPayType("1") ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: "/static/images/wecha_pay.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "全款支付")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- value: 1,
- checked: $data.payType == "1"
- }, null, 8, ["checked"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $options.checkPayType("2") ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: "/static/images/pay_de.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "物流代收")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- value: 2,
- checked: $data.payType == "2"
- }, null, 8, ["checked"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $options.checkPayType("3") ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: "/static/images/pay_1.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "货到付款")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- value: 3,
- checked: $data.payType == "3"
- }, null, 8, ["checked"])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]),
- $data.payType == "1" && $data.order != null && $data.order.companyId != null && $data.order.companyId > 0 && $data.giftPrice <= $data.payPrice ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "赠品"),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.gifts, (product) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: product.image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(product.productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(product.sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode(
- "view",
- { class: "use" },
- vue.toDisplayString(product.usageMethod),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(product.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "amount" },
- "x" + vue.toDisplayString(product.count),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 备注 "),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "remarks"
- }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.order.remark = $event),
- placeholder: "备注留言(选填)",
- "placeholder-class": "input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.order.remark]
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createVNode(_component_u_popup, {
- closeable: true,
- show: $data.couponShow,
- round: 10,
- mode: "bottom",
- onClose: $options.close,
- onOpen: $options.open
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "coupon" }, [
- $data.coupons.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "coupon-box"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.coupons, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.couponSelect(item),
- class: "coupon-item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { style: { "z-index": "999" } }, [
- vue.createTextVNode(" ¥"),
- vue.createElementVNode(
- "span",
- { class: "num" },
- vue.toDisplayString(item.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "pic-num" },
- "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "btns" }, [
- item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(item.limitTime) + " 到期",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- "使用时间 " + vue.toDisplayString(item.useTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "bnt gray"
- }, "已使用")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "bnt gray"
- }, "已过期")) : vue.createCommentVNode("v-if", true),
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "btn"
- }, "使用")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- $data.coupons.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "empty"
- }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" })
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show", "onClose", "onOpen"]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "btn",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.payOrder())
- },
- "支付" + vue.toDisplayString($data.payMoney) + "元",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderPackageOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderPay.vue"]]);
- const _sfc_main$S = {
- data() {
- return {
- order: null
- };
- },
- onLoad(option) {
- uni.setNavigationBarTitle({
- title: "支付结果"
- });
- uni.$emit("refreshPackageOrder");
- this.orderId = option.orderId;
- this.getPackageOrderById();
- },
- methods: {
- getPackageOrderById() {
- var data = { orderId: this.orderId };
- var that = this;
- uni.showLoading();
- getPackageOrderById(data).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- that.order = res.order;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- showOrderDetails(orderId) {
- formatAppLog("log", "at pages_order/packageOrderPaySuccess.vue:87", orderId);
- uni.redirectTo({
- url: "/pages_order/packageOrderDetails?orderId=" + orderId
- });
- }
- }
- };
- function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("text", { class: "title" }, "支付成功"),
- vue.createElementVNode("image", {
- class: "icon",
- src: "/static/images/success.png"
- }),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
- }, " 查看订单")
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const Pages_orderPackageOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOrderPaySuccess.vue"]]);
- const _sfc_main$R = {
- data() {
- return {
- orderId: null,
- deliverySn: null,
- express: {},
- expressList: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.getExpress();
- },
- methods: {
- getExpress() {
- var data = { orderId: this.orderId };
- getExpress(data).then((res) => {
- if (res.code == 200) {
- this.express = res.express;
- this.expressList = res.data;
- this.deliverySn = res.deliverySn;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- // 返回上一页
- back() {
- uni.navigateBack();
- },
- // 复制运单号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- // 拨打电话
- callPhone(phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- });
- }
- }
- };
- function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-cont" }, [
- vue.createCommentVNode(" 背景图片 "),
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "top-inner" }, [
- vue.createCommentVNode(" 运单号 "),
- vue.createElementVNode("view", { class: "waybill-number" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("text", { class: "text" }, "运单号"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.deliverySn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.deliverySn))
- }, "复制")
- ]),
- vue.createElementVNode("view", { class: "kf-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.express.name),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <text class="text">客服电话:95311</text> ')
- ])
- ])
- ]),
- $data.expressList != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createCommentVNode(" 物流信息 "),
- $data.expressList.Traces != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "refund-steps"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.expressList.Traces, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "steps"
- }, [
- vue.createElementVNode("view", { class: "title" }, [
- vue.createCommentVNode(' <text v-if="index == 0" class="text black-text">已签收</text> '),
- vue.createCommentVNode(' <text class="text gray-bold">运输中</text> '),
- vue.createCommentVNode(" 左侧灰色圆点 "),
- vue.createElementVNode("view", { class: "dot" }),
- vue.createCommentVNode(" 对号 "),
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/complete.png",
- mode: ""
- }),
- vue.createCommentVNode(" 运输中图标 "),
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/car40.png",
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc-text" },
- vue.toDisplayString(item.AcceptStation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.AcceptTime),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }
- const Pages_orderStoreOrderDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderDelivery.vue"]]);
- let request$4 = new Request$1().http;
- function getStoreOrderItems(data) {
- return request$4("/app/storeAfterSales/getStoreOrderItems", data, "GET");
- }
- function applyAfterSales(data) {
- return request$4("/app/storeAfterSales/applyAfterSales", data, "POST", "application/json;charset=UTF-8");
- }
- function getStoreAfterSalesList(data) {
- return request$4("/app/storeAfterSales/getStoreAfterSalesList", data, "GET");
- }
- function getStoreAfterSalesById(data) {
- return request$4("/app/storeAfterSales/getStoreAfterSalesById", data, "GET");
- }
- function revoke(data) {
- return request$4("/app/storeAfterSales/revoke", data, "POST", "application/json;charset=UTF-8");
- }
- function addDelivery(data) {
- return request$4("/app/storeAfterSales/addDelivery", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$Q = {
- data() {
- return {
- order: null,
- items: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.getStoreOrderItems();
- },
- methods: {
- checkChange(item) {
- item.checked = !item.checked;
- },
- submit(type2) {
- uni.redirectTo({
- url: "./storeOrderRefundSubmit?orderId=" + this.orderId + "&type=" + type2
- });
- },
- getStoreOrderItems() {
- var data = { orderId: this.orderId };
- getStoreOrderItems(data).then((res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.items = res.items;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- }
- }
- };
- function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
- return $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "goods-list" }, [
- $data.order != null ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- key: index2
- }, [
- vue.createCommentVNode(' <label style="margin-right: 30upx;">\r\n <checkbox :value="item.checked" :checked="item.checked" @click="checkChange(item)" />\r\n </label> '),
- vue.createElementVNode("image", {
- class: "goods-img",
- src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
- mode: "aspectFit"
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "price" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "num" },
- "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", { class: "text" }, "提交申请后,客服会与您电话沟通,请保持手机通畅"),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", { class: "left" }),
- vue.createElementVNode("view", { class: "right" }, [
- $data.order.status == 2 || $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.submit(0))
- }, "仅退款")) : vue.createCommentVNode("v-if", true),
- $data.order.status == 3 || $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn cancel",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.submit(1))
- }, "退款退货")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true);
- }
- const Pages_orderStoreOrderRefundApply = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundApply.vue"]]);
- const _sfc_main$P = {
- data() {
- return {
- orderId: null,
- order: null,
- orderCode: null,
- items: [],
- type: null,
- reasonsOptions: [],
- reasons: "请选择",
- explains: "",
- refundAmount: 0
- };
- },
- onLoad(option) {
- this.type = option.type;
- this.orderId = option.orderId;
- this.getStoreOrderItems();
- this.getDictByKey("sys_sales_reasons");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_sales_reasons") {
- this.reasonsOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- getStoreOrderItems() {
- var data = { orderId: this.orderId };
- getStoreOrderItems(data).then((res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.items = res.items;
- this.refundAmount = this.order.payMoney.toFixed(2);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- handleReasons(e) {
- formatAppLog("log", "at pages_order/storeOrderRefundSubmit.vue:134", e.detail.value);
- this.reasons = this.reasonsOptions[e.detail.value].dictLabel;
- },
- submit() {
- if (this.reasons == "请选择") {
- uni.showToast({
- icon: "none",
- title: "请选择原因"
- });
- return;
- }
- if (this.refundAmount < 0) {
- uni.showToast({
- icon: "none",
- title: "请输入退款金额"
- });
- return;
- }
- var productIds = this.items.map((item2) => item2.productId);
- var products = [];
- for (var i = 0; i < productIds.length; i++) {
- var item = { productId: productIds[i] };
- products.push(item);
- }
- var data = {
- refundAmount: this.refundAmount,
- orderId: this.orderId,
- refundType: this.type,
- reasons: this.reasons,
- explains: this.explains,
- productList: products
- };
- applyAfterSales(data).then((res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "提交成功"
- });
- setTimeout(function() {
- uni.$emit("refreshOrder");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- });
- }
- }
- };
- function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "drug-list" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createCommentVNode(" 药品信息 "),
- $data.order != null ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "drug-info",
- key: index2
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
- mode: "aspectFit"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "price" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "num" },
- "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createCommentVNode(" 申请原因 "),
- vue.createElementVNode("view", { class: "reason-apply" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("text", { class: "label" }, "退款金额"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "money",
- type: "text",
- disabled: "",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.refundAmount = $event),
- placeholder: "退款金额",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.refundAmount]
- ])
- ]),
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("text", { class: "label" }, "申请原因"),
- vue.createElementVNode("picker", {
- onChange: _cache[1] || (_cache[1] = (...args) => $options.handleReasons && $options.handleReasons(...args)),
- value: $data.reasons,
- "range-key": "dictLabel",
- range: $data.reasonsOptions
- }, [
- vue.createElementVNode("view", { class: "chose-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.reasons),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ], 40, ["value", "range"])
- ]),
- vue.createElementVNode("view", { class: "textarea-box" }, [
- vue.createVNode(_component_u__textarea, {
- height: 100,
- modelValue: $data.explains,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.explains = $event),
- placeholder: "请描述申请售后服务的具体原因",
- count: 100
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createCommentVNode(" 退回方式 "),
- 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> '),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.submit())
- }, "申请售后")
- ])
- ])
- ]);
- }
- const Pages_orderStoreOrderRefundSubmit = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundSubmit.vue"]]);
- const _sfc_main$O = {
- mixins: [MescrollMixin],
- data() {
- return {
- statusOptions: [],
- tabs: [
- { name: "全部", id: "0" },
- { name: "售后中", id: "1" },
- { name: "已完成", id: "2" }
- ],
- status: 0,
- mescroll: null,
- // 上拉加载的配置
- upOption: {
- onScroll: true,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- num: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- // 列表数据
- dataList: []
- };
- },
- onLoad(option) {
- var that = this;
- uni.$on("refreshAfterSales", () => {
- that.mescroll.resetUpScroll();
- });
- this.getDictByKey("sys_after_sales_status");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_after_sales_status") {
- this.statusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- tabChange(item) {
- this.status = item.id;
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getStoreAfterSalesList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 查看订单详情
- showDetail(item) {
- uni.navigateTo({
- url: "./storeOrderRefundDetails?id=" + item.id
- });
- }
- }
- };
- function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: _ctx.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createCommentVNode(" 订单号,状态 "),
- vue.createElementVNode("view", { class: "ordersn-box" }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "订单号:" + vue.toDisplayString(item.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text info" },
- vue.toDisplayString(_ctx.$getDictLabelName($data.statusOptions, item.salesStatus)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "drug-list" }, [
- item != null ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList(item.items, (subitem, j) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: j,
- class: "drug-item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(subitem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subitem.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode("view", { class: "name-box ellipsis2" }, [
- vue.createCommentVNode(' <view class="tag">处方药</view> '),
- vue.createTextVNode(
- " " + vue.toDisplayString(JSON.parse(subitem.jsonInfo).productName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- "规格:" + vue.toDisplayString(JSON.parse(subitem.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(JSON.parse(subitem.jsonInfo).price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "amount" },
- "x" + vue.toDisplayString(JSON.parse(subitem.jsonInfo).num),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 实付金额、按钮 "),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "退款金额:"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.refundAmount.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn pay",
- onClick: ($event) => $options.showDetail(item)
- }, "查看详情", 8, ["onClick"])
- ])
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_orderStoreOrderRefundList = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundList.vue"]]);
- const _sfc_main$N = {
- data() {
- return {
- statusOptions: [],
- sales: {},
- items: [],
- order: null,
- salesId: null,
- // 状态栏的高度
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight
- };
- },
- onLoad(option) {
- this.id = option.id;
- },
- onShow() {
- this.getStoreAfterSalesById();
- this.getDictByKey("sys_after_sales_status");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_after_sales_status") {
- this.statusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- addDeliverySn() {
- uni.navigateTo({
- url: "./storeOrderRefundAddDelivery?id=" + this.id
- });
- },
- revoke() {
- var data = { id: this.id };
- revoke(data).then((res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshAfterSales");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- });
- },
- getStoreAfterSalesById() {
- var data = {
- id: this.id
- };
- getStoreAfterSalesById(data).then((res) => {
- if (res.code == 200) {
- this.sales = res.sales;
- this.items = res.items;
- this.order = res.order;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- });
- },
- showLogs(status) {
- uni.navigateTo({
- url: "./refundOrderLogs?orderStatus=" + status
- });
- }
- }
- };
- function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-cont" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "top-inner" }, [
- vue.createCommentVNode(" 订单状态 "),
- vue.createElementVNode("view", { class: "order-status" }, [
- vue.createCommentVNode(" 处理中 "),
- $data.sales.salesStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a4bf17c7fb7342118f5ba52911fbcd84.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "售后中"),
- vue.createElementVNode("text", { class: "desc" }, "请等待客服处理...")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.salesStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "售后取消"),
- vue.createElementVNode("text", { class: "desc" }, "用户已取消售后")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.salesStatus == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "售后取消"),
- vue.createElementVNode("text", { class: "desc" }, "商家已拒绝...")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 退款成功 "),
- $data.sales.salesStatus == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/09e5cf7de97d4ee6aa9f0c778599d760.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "退款成功"),
- vue.createElementVNode("text", { class: "desc" }, "已退款,退款金额将按原支付退回")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 退款信息 "),
- vue.createElementVNode("view", { class: "refund-info" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "title" }, "退款金额"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- $data.sales.refundAmount != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "num"
- },
- vue.toDisplayString($data.sales.refundAmount.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("text", { class: "text" }, [
- vue.createElementVNode(
- "text",
- { class: "text success" },
- vue.toDisplayString(_ctx.$getDictLabelName($data.statusOptions, $data.sales.salesStatus)),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- $data.sales.status >= 1 && $data.sales.refundType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "refund-item"
- }, [
- vue.createElementVNode(
- "view",
- { class: "text" },
- "收件人:" + vue.toDisplayString($data.sales.consignee),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "电话:" + vue.toDisplayString($data.sales.address),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "text" },
- "收件地址:" + vue.toDisplayString($data.sales.phoneNumber),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.salesStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn-box"
- }, [
- $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.addDeliverySn())
- }, "填写物流")) : vue.createCommentVNode("v-if", true),
- $data.sales.status == 0 || $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn cancel",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.revoke())
- }, "撤销申请")) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(' <view class="btn cancel" @click="showLogs()" >查看进度</view> ')
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "refund-item"
- }, [
- vue.createElementVNode("view", { class: "text" }, "已提交等待平台审核 ")
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "refund-item"
- }, [
- vue.createElementVNode("view", { class: "text" }, "平台已审核,等待用户发货 ")
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "refund-item"
- }, [
- vue.createElementVNode("view", { class: "text" }, "用户已发货,等待仓库审核 ")
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "refund-item"
- }, [
- vue.createElementVNode("view", { class: "text" }, "财务审核 ")
- ])) : vue.createCommentVNode("v-if", true),
- $data.sales.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "refund-item"
- }, [
- vue.createElementVNode("view", { class: "text" }, "已完成 ")
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 退货信息 "),
- vue.createElementVNode("view", { class: "return-info" }, [
- vue.createCommentVNode(' <view class="title-box">\r\n <text class="label">退货信息</text>\r\n <text class="ret-num">共{{items.length}}件</text>\r\n </view> '),
- vue.createCommentVNode(" 退货列表 "),
- vue.createElementVNode("view", { class: "goods-list" }, [
- $data.sales != null ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList($data.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- "规格:" + vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "num" },
- "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
- 1
- /* TEXT */
- )
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 详细信息 "),
- vue.createElementVNode("view", { class: "refund-det-info" }, [
- vue.createElementVNode("view", { class: "det-item" }, [
- vue.createElementVNode("text", { class: "label" }, "退货原因"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.sales.reasons),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "det-item" }, [
- vue.createElementVNode("text", { class: "label" }, "退货说明"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.sales.explains),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "det-item" }, [
- vue.createElementVNode("text", { class: "label" }, "退款金额"),
- $data.sales.refundAmount != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.sales.refundAmount.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "det-item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderCode),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "det-item" }, [
- vue.createElementVNode("text", { class: "label" }, "申请时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.sales.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ])
- ])
- ])
- ])
- ]);
- }
- const Pages_orderStoreOrderRefundDetails = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundDetails.vue"]]);
- const _sfc_main$M = {
- data() {
- return {
- form: {
- salesId: null,
- deliverySn: null,
- deliveryName: null
- }
- };
- },
- onLoad(option) {
- this.form.id = option.id;
- },
- methods: {
- submit() {
- if (this.form.deliveryName == null) {
- uni.showToast({
- icon: "none",
- title: "请输入快递公司"
- });
- return;
- }
- if (this.form.deliverySn == null) {
- uni.showToast({
- icon: "none",
- title: "请输入快递单号"
- });
- return;
- }
- addDelivery(this.form).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "提交成功"
- });
- uni.navigateBack({
- delta: 1
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "form-box" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "快递公司"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.deliveryName = $event),
- placeholder: "请输入物流公司",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.deliveryName]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "快递单号"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.deliverySn = $event),
- placeholder: "请输入物流单号",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.deliverySn]
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
- }, "提交")
- ])
- ]);
- }
- const Pages_orderStoreOrderRefundAddDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/storeOrderRefundAddDelivery.vue"]]);
- const _sfc_main$L = {
- data() {
- return {
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- orderId: null,
- order: null
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- },
- onShow() {
- this.getPackageOrderById();
- },
- methods: {
- leftClick() {
- uni.showToast({
- title: "请帮好友支付",
- icon: "none"
- });
- },
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- getPackageOrderById() {
- var data = { orderId: this.orderId };
- var that = this;
- uni.showLoading();
- getSharePackageOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- uni.hideLoading();
- that.order = res.order;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- payOrder() {
- var data = {
- orderId: this.orderId
- };
- var that = this;
- uni.showLoading();
- payment$2(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.isPay == 0) {
- if (res.type == "tz") {
- uni.setStorageSync("ztPayUrl", res.data.body.url);
- uni.navigateTo({
- url: "/pages_order/tzPay"
- });
- }
- if (res.type == "yb") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/packageOtherPayment.vue:116", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/packageOtherPayment.vue:125", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "wx") {
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.packageValue,
- signType: res.data.signType,
- paySign: res.data.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/packageOtherPayment.vue:152", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- }
- } else {
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- }
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0$4);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_navbar, {
- title: "亲友代付",
- onLeftClick: $options.leftClick
- }, null, 8, ["onLeftClick"])
- ]),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createCommentVNode(" 时间、价格 "),
- vue.createElementVNode("view", { class: "time-price" }, [
- vue.createElementVNode("text", { class: "time" }, "请帮好友支付"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "num"
- },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
- }, "帮TA支付")
- ])
- ]);
- }
- const Pages_orderPackageOtherPayment = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packageOtherPayment.vue"]]);
- const _sfc_main$K = {
- data() {
- return {
- payMethod: null,
- orderId: null,
- order: null
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.payMethod = option.payMethod;
- },
- onShow() {
- this.getPackageOrderById();
- },
- onShareAppMessage(res) {
- var that = this;
- if (this.$isLogin()) {
- return {
- title: "亲友代付",
- path: "/pages_order/packageOtherPayment?orderId=" + that.orderId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- }
- },
- methods: {
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- getPackageOrderById() {
- var data = { orderId: this.orderId };
- formatAppLog("log", "at pages_order/packagePayment.vue:85", data);
- getPackageOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.order;
- if (this.payMethod != null && this.payMethod == "app") {
- this.payOrder();
- }
- }
- },
- (rej) => {
- }
- );
- },
- payOrder() {
- var data = {
- orderId: this.orderId
- };
- var that = this;
- uni.showLoading();
- payment$2(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.isPay == 0) {
- if (res.type == "tz") {
- uni.setStorageSync("ztPayUrl", res.data.body.url);
- uni.navigateTo({
- url: "/pages_order/tzPay"
- });
- }
- if (res.type == "yb") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/packagePayment.vue:118", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/packagePayment.vue:127", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "hf") {
- var payData = JSON.parse(res.data.pay_info);
- formatAppLog("log", "at pages_order/packagePayment.vue:147", payData);
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: payData.timeStamp,
- nonceStr: payData.nonceStr,
- package: payData.package,
- signType: payData.signType,
- paySign: payData.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/packagePayment.vue:156", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- } else if (res.type == "wx") {
- uni.requestPayment({
- provider: "wxpay",
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.packageValue,
- signType: res.data.signType,
- paySign: res.data.paySign,
- success: function(res2) {
- formatAppLog("log", "at pages_order/packagePayment.vue:183", that.order.orderId);
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- },
- fail: function(err) {
- uni.showToast({
- icon: "none",
- title: "fail:" + JSON.stringify(err)
- });
- uni.hideLoading();
- }
- });
- }
- } else {
- uni.hideLoading();
- uni.redirectTo({
- url: "./packageOrderPaySuccess?orderId=" + that.order.orderId
- });
- }
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner-box"
- }, [
- vue.createCommentVNode(" 时间、价格 "),
- vue.createElementVNode("view", { class: "time-price" }, [
- vue.createElementVNode("text", { class: "time" }, "订单金额"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyTest($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.payOrder())
- }, "立即支付")) : vue.createCommentVNode("v-if", true),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn1"
- }, [
- vue.createTextVNode(" 亲友代付 "),
- vue.createElementVNode("button", {
- class: "share-btn",
- "data-name": "shareBtn",
- "open-type": "share"
- })
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_orderPackagePayment = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_order/packagePayment.vue"]]);
- const props$3 = {
- props: {
- // 是否展示工具条
- show: {
- type: Boolean,
- default: props$y.toolbar.show
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: props$y.toolbar.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: props$y.toolbar.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: props$y.toolbar.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: props$y.toolbar.confirmColor
- },
- // 标题文字
- title: {
- type: String,
- default: props$y.toolbar.title
- }
- }
- };
- const _sfc_main$J = {
- name: "u-toolbar",
- mixins: [mpMixin, mixin, props$3],
- methods: {
- // 点击取消按钮
- cancel() {
- this.$emit("cancel");
- },
- // 点击确定按钮
- confirm() {
- this.$emit("confirm");
- }
- }
- };
- function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
- return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "u-toolbar",
- onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"]))
- },
- [
- vue.createElementVNode("view", {
- class: "u-toolbar__cancel__wrapper",
- "hover-class": "u-hover-class"
- }, [
- vue.createElementVNode(
- "text",
- {
- class: "u-toolbar__wrapper__cancel",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
- style: vue.normalizeStyle({
- color: _ctx.cancelColor
- })
- },
- vue.toDisplayString(_ctx.cancelText),
- 5
- /* TEXT, STYLE */
- )
- ]),
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "u-toolbar__title u-line-1"
- },
- vue.toDisplayString(_ctx.title),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "u-toolbar__confirm__wrapper",
- "hover-class": "u-hover-class"
- }, [
- vue.createElementVNode(
- "text",
- {
- class: "u-toolbar__wrapper__confirm",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
- style: vue.normalizeStyle({
- color: _ctx.confirmColor
- })
- },
- vue.toDisplayString(_ctx.confirmText),
- 5
- /* TEXT, STYLE */
- )
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )) : vue.createCommentVNode("v-if", true);
- }
- const __easycom_0$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"]]);
- const props$2 = {
- props: {
- // 是否展示picker弹窗
- show: {
- type: Boolean,
- default: props$y.picker.show
- },
- // 是否展示顶部的操作栏
- showToolbar: {
- type: Boolean,
- default: props$y.picker.showToolbar
- },
- // 顶部标题
- title: {
- type: String,
- default: props$y.picker.title
- },
- // 对象数组,设置每一列的数据
- columns: {
- type: Array,
- default: props$y.picker.columns
- },
- // 是否显示加载中状态
- loading: {
- type: Boolean,
- default: props$y.picker.loading
- },
- // 各列中,单个选项的高度
- itemHeight: {
- type: [String, Number],
- default: props$y.picker.itemHeight
- },
- // 取消按钮的文字
- cancelText: {
- type: String,
- default: props$y.picker.cancelText
- },
- // 确认按钮的文字
- confirmText: {
- type: String,
- default: props$y.picker.confirmText
- },
- // 取消按钮的颜色
- cancelColor: {
- type: String,
- default: props$y.picker.cancelColor
- },
- // 确认按钮的颜色
- confirmColor: {
- type: String,
- default: props$y.picker.confirmColor
- },
- // 每列中可见选项的数量
- visibleItemCount: {
- type: [String, Number],
- default: props$y.picker.visibleItemCount
- },
- // 选项对象中,需要展示的属性键名
- keyName: {
- type: String,
- default: props$y.picker.keyName
- },
- // 是否允许点击遮罩关闭选择器
- closeOnClickOverlay: {
- type: Boolean,
- default: props$y.picker.closeOnClickOverlay
- },
- // 各列的默认索引
- defaultIndex: {
- type: Array,
- default: props$y.picker.defaultIndex
- },
- // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
- immediateChange: {
- type: Boolean,
- default: props$y.picker.immediateChange
- }
- }
- };
- const _sfc_main$I = {
- name: "u-picker",
- mixins: [mpMixin, mixin, props$2],
- data() {
- return {
- // 上一次选择的列索引
- lastIndex: [],
- // 索引值 ,对应picker-view的value
- innerIndex: [],
- // 各列的值
- innerColumns: [],
- // 上一次的变化列索引
- columnIndex: 0
- };
- },
- watch: {
- // 监听默认索引的变化,重新设置对应的值
- defaultIndex: {
- immediate: true,
- handler(n) {
- this.setIndexs(n, true);
- }
- },
- // 监听columns参数的变化
- columns: {
- immediate: true,
- deep: true,
- handler(n) {
- this.setColumns(n);
- }
- }
- },
- emits: ["close", "cancel", "confirm", "change"],
- methods: {
- // 获取item需要显示的文字,判别为对象还是文本
- getItemText(item) {
- if (uni.$u.test.object(item)) {
- return item[this.keyName];
- } else {
- return item;
- }
- },
- // 关闭选择器
- closeHandler() {
- if (this.closeOnClickOverlay) {
- this.$emit("close");
- }
- },
- // 点击工具栏的取消按钮
- cancel() {
- this.$emit("cancel");
- },
- // 点击工具栏的确定按钮
- confirm() {
- this.$emit("confirm", {
- indexs: this.innerIndex,
- value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]),
- values: this.innerColumns
- });
- },
- // 选择器某一列的数据发生变化时触发
- changeHandler(e) {
- const {
- value: value2
- } = e.detail;
- let index2 = 0, columnIndex = 0;
- for (let i = 0; i < value2.length; i++) {
- let item = value2[i];
- if (item !== (this.lastIndex[i] || 0)) {
- columnIndex = i;
- index2 = item;
- break;
- }
- }
- this.columnIndex = columnIndex;
- const values = this.innerColumns;
- this.setLastIndex(value2);
- this.setIndexs(value2);
- this.$emit("change", {
- // 微信小程序不能传递this,会因为循环引用而报错
- picker: this,
- value: this.innerColumns.map((item, index3) => item[value2[index3]]),
- index: index2,
- indexs: value2,
- // values为当前变化列的数组内容
- values,
- columnIndex
- });
- },
- // 设置index索引,此方法可被外部调用设置
- setIndexs(index2, setLastIndex) {
- this.innerIndex = uni.$u.deepClone(index2);
- if (setLastIndex) {
- this.setLastIndex(index2);
- }
- },
- // 记录上一次的各列索引位置
- setLastIndex(index2) {
- this.lastIndex = uni.$u.deepClone(index2);
- },
- // 设置对应列选项的所有值
- setColumnValues(columnIndex, values) {
- this.innerColumns.splice(columnIndex, 1, values);
- let tmpIndex = uni.$u.deepClone(this.innerIndex);
- for (let i = 0; i < this.innerColumns.length; i++) {
- if (i > this.columnIndex) {
- tmpIndex[i] = 0;
- }
- }
- this.setIndexs(tmpIndex);
- },
- // 获取对应列的所有选项
- getColumnValues(columnIndex) {
- (async () => {
- await uni.$u.sleep();
- })();
- return this.innerColumns[columnIndex];
- },
- // 设置整体各列的columns的值
- setColumns(columns) {
- formatAppLog("log", "at uni_modules/uview-plus/components/u-picker/u-picker.vue:217", columns);
- this.innerColumns = uni.$u.deepClone(columns);
- if (this.innerIndex.length === 0) {
- this.innerIndex = new Array(columns.length).fill(0);
- }
- },
- // 获取各列选中值对应的索引
- getIndexs() {
- return this.innerIndex;
- },
- // 获取各列选中的值
- getValues() {
- (async () => {
- await uni.$u.sleep();
- })();
- return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]);
- }
- }
- };
- function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$1);
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
- const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3);
- return vue.openBlock(), vue.createBlock(_component_u_popup, {
- show: _ctx.show,
- onClose: $options.closeHandler
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "u-picker" }, [
- _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, {
- key: 0,
- cancelColor: _ctx.cancelColor,
- confirmColor: _ctx.confirmColor,
- cancelText: _ctx.cancelText,
- confirmText: _ctx.confirmText,
- title: _ctx.title,
- onCancel: $options.cancel,
- onConfirm: $options.confirm
- }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("picker-view", {
- class: "u-picker__view",
- indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`,
- value: $data.innerIndex,
- immediateChange: _ctx.immediateChange,
- style: vue.normalizeStyle({
- height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`
- }),
- onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args))
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.innerColumns, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("picker-view-column", {
- key: index2,
- class: "u-picker__view__column"
- }, [
- _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList(item, (item1, index1) => {
- return vue.openBlock(), vue.createElementBlock(
- "text",
- {
- class: "u-picker__view__column__item u-line-1",
- key: index1,
- style: vue.normalizeStyle({
- height: _ctx.$u.addUnit(_ctx.itemHeight),
- lineHeight: _ctx.$u.addUnit(_ctx.itemHeight),
- fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal"
- })
- },
- vue.toDisplayString($options.getItemText(item1)),
- 5
- /* TEXT, STYLE */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 44, ["indicatorStyle", "value", "immediateChange"]),
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "u-picker--loading"
- }, [
- vue.createVNode(_component_u_loading_icon, { mode: "circle" })
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["show", "onClose"]);
- }
- const __easycom_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"]]);
- const _sfc_main$H = {
- data() {
- return {
- cityIndex1: 0,
- cityIndex2: 0,
- allCitys: [],
- citys: [[], [], []],
- cityShow: false,
- depts: [[]],
- deptShow: false,
- hospitals: [[]],
- hospitalShow: false,
- positions: [[]],
- positionShow: false,
- fileList1: [],
- fileList2: [],
- fileList3: [],
- fileList4: [],
- checked: 0,
- form: {
- sex: "1"
- },
- rules: {
- doctorName: [
- {
- required: true,
- message: "请输入医生姓名"
- }
- ],
- idCard: [
- {
- required: true,
- message: "请输入身份证号",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ],
- deptId: [
- {
- required: true,
- message: "请选择部门"
- }
- ],
- hospitalId: [
- {
- required: true,
- message: "请选择医院"
- }
- ],
- position: [
- {
- required: true,
- message: "请选择职务"
- }
- ],
- cityIds: [
- {
- required: true,
- message: "请选择所在城市"
- }
- ],
- account: [
- {
- required: true,
- message: "请输入帐号"
- }
- ],
- password: [
- {
- required: true,
- message: "请输入密码"
- }
- ],
- mobile: [
- {
- required: true,
- message: "请输入手机号",
- // 可以单个或者同时写两个触发验证方式
- trigger: ["change", "blur"]
- }
- ]
- }
- };
- },
- onLoad(options) {
- this.form.doctorType = options.type;
- this.getCitys();
- this.getHospitalList();
- this.getDepartmentList();
- this.getDictByKey("sys_doc_position");
- },
- onShow() {
- },
- onReady() {
- this.$refs.uForm.setRules(this.rules);
- },
- methods: {
- hospitalSelect(e) {
- this.form.hospitalId = this.hospitals[0][e.indexs[0]].hospitalId;
- this.form.hospitalName = this.hospitals[0][e.indexs[0]].hospitalName;
- this.hospitalShow = false;
- },
- deptSelect(e) {
- formatAppLog("log", "at pages_user/registerDoctor.vue:307", e);
- this.form.deptId = this.depts[0][e.indexs[0]].deptId;
- this.form.deptName = this.depts[0][e.indexs[0]].deptName;
- this.deptShow = false;
- },
- positionSelect(e) {
- formatAppLog("log", "at pages_user/registerDoctor.vue:313", e);
- this.form.position = this.positions[0][e.indexs[0]].dictLabel;
- this.positionShow = false;
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.positions[0] = res.data;
- }
- },
- (err) => {
- }
- );
- },
- openContent(type2) {
- uni.navigateTo({
- url: "agreement?type=" + type2
- });
- },
- cityChangeHandler(e) {
- const {
- columnIndex,
- index: index2,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.cityPicker
- } = e;
- if (columnIndex == 0) {
- this.cityIndex1 = index2;
- formatAppLog("log", "at pages_user/registerDoctor.vue:344", this.cityIndex1);
- var citys1 = this.allCitys[this.cityIndex1].c;
- formatAppLog("log", "at pages_user/registerDoctor.vue:347", citys1);
- picker.setColumnValues(1, citys1);
- this.cityIndex2 = 0;
- var citys2 = this.allCitys[this.cityIndex1].c[this.cityIndex2].c;
- picker.setColumnValues(2, citys2);
- }
- if (columnIndex == 1) {
- this.cityIndex2 = index2;
- var citys = this.allCitys[this.cityIndex1].c[this.cityIndex2].c;
- formatAppLog("log", "at pages_user/registerDoctor.vue:357", citys);
- picker.setColumnValues(2, citys);
- }
- },
- citySelect(e) {
- formatAppLog("log", "at pages_user/registerDoctor.vue:363", e);
- this.form.cityName = e.value[0].n + ">" + e.value[1].n + ">" + e.value[2].n;
- this.form.cityIds = e.value[0].v + "," + e.value[1].v + "," + e.value[2].v;
- this.cityShow = false;
- },
- getCitys() {
- var that = this;
- var data = {};
- getCitys(data).then(
- (res) => {
- if (res.code == 200) {
- that.allCitys = res.data;
- that.citys = [[], [], []];
- that.citys[0] = that.allCitys;
- that.citys[1] = that.allCitys[0].c;
- that.citys[2] = that.allCitys[0].c[0].c;
- formatAppLog("log", "at pages_user/registerDoctor.vue:380", that.citys);
- }
- },
- (err) => {
- }
- );
- },
- getHospitalList() {
- var that = this;
- var data = {};
- getHospitalList$1(data).then(
- (res) => {
- if (res.code == 200) {
- that.hospitals[0] = res.data;
- formatAppLog("log", "at pages_user/registerDoctor.vue:395", 111);
- formatAppLog("log", "at pages_user/registerDoctor.vue:396", that.hospitals);
- }
- },
- (err) => {
- }
- );
- },
- getDepartmentList() {
- var that = this;
- var data = {};
- getDepartmentList$1(data).then(
- (res) => {
- if (res.code == 200) {
- that.depts[0] = res.data;
- }
- },
- (err) => {
- }
- );
- },
- deletePic(event) {
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- async afterRead(event) {
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map((item) => {
- this[`fileList${event.name}`].push({
- ...item,
- status: "uploading",
- message: "上传中"
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
- status: "success",
- message: "",
- url: result
- }));
- fileListLen++;
- }
- },
- uploadFilePromise(url2) {
- return new Promise((resolve, reject2) => {
- uni.uploadFile({
- url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
- filePath: url2,
- name: "file",
- formData: {
- user: "test"
- },
- success: (res) => {
- setTimeout(() => {
- formatAppLog("log", "at pages_user/registerDoctor.vue:455", JSON.parse(res.data).url);
- resolve(JSON.parse(res.data).url);
- }, 1e3);
- }
- });
- });
- },
- register() {
- registerDoctor(this.form).then(
- (res) => {
- formatAppLog("log", "at pages_user/registerDoctor.vue:465", res);
- if (res.code == 200) {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- setTimeout(function() {
- uni.navigateBack({
- delta: 1
- });
- }, 2e3);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- formatAppLog("log", "at pages_user/registerDoctor.vue:484", rej);
- }
- );
- },
- submit() {
- var that = this;
- if (this.fileList1.length > 0) {
- this.form.avatar = this.fileList1[0].url;
- }
- if (this.fileList2.length > 0) {
- var images = [];
- that.fileList2.forEach(function(item) {
- images.push(item.url);
- });
- if (images.length != 2) {
- uni.showToast({
- icon: "none",
- title: "请上传身份证号"
- });
- return;
- }
- this.form.idCardFrontUrl = images[0];
- this.form.idCardBackUrl = images[1];
- }
- if (this.fileList3.length > 0) {
- var images = [];
- that.fileList3.forEach(function(item) {
- images.push(item.url);
- });
- this.form.certificateImages = images.toString();
- }
- if (this.fileList4.length > 0) {
- var images = [];
- that.fileList4.forEach(function(item) {
- images.push(item.url);
- });
- this.form.practiseImages = images.toString();
- }
- if (this.checked != 1) {
- uni.showToast({
- icon: "none",
- title: "请同意协议"
- });
- return;
- }
- formatAppLog("log", "at pages_user/registerDoctor.vue:530", this.form);
- this.$refs.uForm.validate().then((res) => {
- that.register();
- }).catch((errors) => {
- formatAppLog("log", "at pages_user/registerDoctor.vue:534", errors);
- });
- }
- }
- };
- function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$2);
- const _component_u_form_item = resolveEasycom(vue.resolveDynamicComponent("u-form-item"), __easycom_1);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- const _component_u_upload = resolveEasycom(vue.resolveDynamicComponent("u-upload"), __easycom_6);
- const _component_u_form = resolveEasycom(vue.resolveDynamicComponent("u-form"), __easycom_7);
- const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
- const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
- const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_10);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/74645f3b57bc45b08b35e2449fdf90c7.jpg" }),
- $data.form.doctorType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title"
- }, "医生注册")) : vue.createCommentVNode("v-if", true),
- $data.form.doctorType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "desc"
- }, "请填写医生资料")) : vue.createCommentVNode("v-if", true),
- $data.form.doctorType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "title"
- }, "药师注册")) : vue.createCommentVNode("v-if", true),
- $data.form.doctorType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "desc"
- }, "请填写药师资料")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "my-form" }, [
- vue.createVNode(_component_u_form, {
- rules: $data.rules,
- model: $data.form,
- ref: "uForm",
- labelPosition: "left"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "真实姓名",
- prop: "doctorName"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- placeholder: "请输入真实姓名",
- modelValue: $data.form.doctorName,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.doctorName = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "身份证号",
- prop: "idCard"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- placeholder: "请输入身份证号",
- modelValue: $data.form.idCard,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.idCard = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "性别",
- prop: "sex"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio_group, {
- placement: "row",
- modelValue: $data.form.sex,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.sex = $event)
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_radio, {
- activeColor: "#C39A58",
- customStyle: { marginRight: "8px" },
- key: "1",
- label: "男",
- name: "1"
- }),
- vue.createVNode(_component_u_radio, {
- activeColor: "#C39A58",
- key: "2",
- label: "女",
- name: "2"
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- prop: "cityId",
- onClick: _cache[4] || (_cache[4] = ($event) => $data.cityShow = true),
- borderBottom: "",
- label: "所在城市"
- }, {
- right: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, { name: "arrow-right" })
- ]),
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $data.form.cityName,
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.cityName = $event),
- disabled: "",
- disabledColor: "#ffffff",
- placeholder: "请选择所在城市",
- border: "none"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- prop: "hospitalId",
- onClick: _cache[6] || (_cache[6] = ($event) => $data.hospitalShow = true),
- borderBottom: "",
- label: "就职医院"
- }, {
- right: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, { name: "arrow-right" })
- ]),
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $data.form.hospitalName,
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.hospitalName = $event),
- disabled: "",
- disabledColor: "#ffffff",
- placeholder: "请选择医院",
- border: "none"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- prop: "deptId",
- onClick: _cache[8] || (_cache[8] = ($event) => $data.deptShow = true),
- borderBottom: "",
- label: "所属科室"
- }, {
- right: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, { name: "arrow-right" })
- ]),
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $data.form.deptName,
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.form.deptName = $event),
- disabled: "",
- disabledColor: "#ffffff",
- placeholder: "请选择科室",
- border: "none"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- prop: "position",
- onClick: _cache[10] || (_cache[10] = ($event) => $data.positionShow = true),
- borderBottom: "",
- label: "职称"
- }, {
- right: vue.withCtx(() => [
- vue.createVNode(_component_u_icon, { name: "arrow-right" })
- ]),
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- modelValue: $data.form.position,
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.form.position = $event),
- disabled: "",
- disabledColor: "#ffffff",
- placeholder: "请选择职称",
- border: "none"
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "擅长领域",
- prop: "speciality"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u__textarea, {
- modelValue: $data.form.speciality,
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.speciality = $event),
- placeholder: "请输入擅长领域",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "个人简介",
- prop: "introduction"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u__textarea, {
- modelValue: $data.form.introduction,
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.form.introduction = $event),
- placeholder: "请输入个人简介",
- count: ""
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "医生照片",
- prop: "avatar"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList1,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "1",
- multiple: "",
- maxCount: 1
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "身份证照片(正反面)",
- prop: "idCardFrontUrl"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList2,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "2",
- multiple: "",
- maxCount: 2
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "资质证编号",
- prop: "certificateCode"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- placeholder: "请输入资质证编号",
- modelValue: $data.form.certificateCode,
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.form.certificateCode = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "资质证书",
- prop: "certificateImages"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList3,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "3",
- maxCount: 3
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "执业证编号",
- prop: "practiseCode"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- placeholder: "请输入执业证编号",
- modelValue: $data.form.practiseCode,
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.form.practiseCode = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "执业证书",
- prop: "certificateImages"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_upload, {
- fileList: $data.fileList4,
- onAfterRead: $options.afterRead,
- onDelete: $options.deletePic,
- name: "4",
- maxCount: 3
- }, null, 8, ["fileList", "onAfterRead", "onDelete"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "联系电话",
- prop: "mobile"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- placeholder: "请输入联系电话",
- modelValue: $data.form.mobile,
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.form.mobile = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- borderBottom: "",
- label: "登录帐号",
- prop: "account"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- placeholder: "请输入登录帐号",
- modelValue: $data.form.account,
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.form.account = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- }),
- vue.createVNode(_component_u_form_item, {
- labelWidth: "180rpx",
- label: "登录密码",
- prop: "password"
- }, {
- default: vue.withCtx(() => [
- vue.createVNode(_component_u_input, {
- border: "none",
- type: "password",
- placeholder: "请输入登录密码",
- modelValue: $data.form.password,
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $data.form.password = $event)
- }, null, 8, ["modelValue"])
- ]),
- _: 1
- /* STABLE */
- })
- ]),
- _: 1
- /* STABLE */
- }, 8, ["rules", "model"])
- ]),
- vue.createElementVNode("view", { class: "agree" }, [
- vue.createVNode(_component_u_checkbox_group, {
- modelValue: $data.checked,
- "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $data.checked = $event),
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- activeColor: "#2BC7B9",
- customStyle: { marginRight: "8px" },
- key: 1,
- label: "同意",
- name: 1
- }))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["modelValue"]),
- vue.createElementVNode("text", {
- class: "text",
- onClick: _cache[19] || (_cache[19] = ($event) => $options.openContent("doctorRegister"))
- }, "《医生注册协议》"),
- vue.createElementVNode("text", {
- class: "text",
- onClick: _cache[20] || (_cache[20] = ($event) => $options.openContent("doctorFiling"))
- }, "《医生多机构备案协议》")
- ]),
- vue.createVNode(_component_u_picker, {
- ref: "cityPicker",
- onCancel: _cache[21] || (_cache[21] = ($event) => $data.cityShow = false),
- keyName: "n",
- onConfirm: $options.citySelect,
- onChange: $options.cityChangeHandler,
- show: $data.cityShow,
- columns: $data.citys
- }, null, 8, ["onConfirm", "onChange", "show", "columns"]),
- vue.createVNode(_component_u_picker, {
- ref: "deptPicker",
- onCancel: _cache[22] || (_cache[22] = ($event) => $data.deptShow = false),
- keyName: "deptName",
- onConfirm: $options.deptSelect,
- show: $data.deptShow,
- columns: $data.depts
- }, null, 8, ["onConfirm", "show", "columns"]),
- vue.createVNode(_component_u_picker, {
- onCancel: _cache[23] || (_cache[23] = ($event) => $data.hospitalShow = false),
- keyName: "hospitalName",
- onConfirm: $options.hospitalSelect,
- show: $data.hospitalShow,
- columns: $data.hospitals
- }, null, 8, ["onConfirm", "show", "columns"]),
- vue.createVNode(_component_u_picker, {
- ref: "positionPicker",
- onCancel: _cache[24] || (_cache[24] = ($event) => $data.positionShow = false),
- keyName: "dictLabel",
- onConfirm: $options.positionSelect,
- show: $data.positionShow,
- columns: $data.positions
- }, null, 8, ["onConfirm", "show", "columns"])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[25] || (_cache[25] = ($event) => $options.submit())
- }, "提交")
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$G = {
- data() {
- return {
- tel: void 0,
- version: "1.0"
- };
- },
- onLoad() {
- const accountInfo = wx.getAccountInfoSync();
- this.version = accountInfo.miniProgram.version;
- },
- methods: {
- callPhone() {
- uni.makePhoneCall({
- phoneNumber: "4000717770"
- });
- },
- submit() {
- }
- }
- };
- function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "logo" }, [
- vue.createElementVNode("image", { src: "https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png" }),
- vue.createElementVNode("p", null, "芸医汇互联网医院")
- ]),
- vue.createElementVNode("view", { class: "set-box" }, [
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.callPhone())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "text" }, "联系我们")
- ]),
- vue.createElementVNode("image", {
- class: "right",
- src: "/static/images/arrow_gray.png",
- mode: "aspectFill"
- })
- ]),
- vue.createElementVNode("view", { style: { "height": "1px", "background-color": "#F5F6FA" } }),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "text" }, "在线客服")
- ]),
- vue.createElementVNode("image", {
- class: "right",
- src: "/static/images/arrow_gray.png",
- mode: "aspectFill"
- }),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- }, " 1111 ")
- ]),
- vue.createElementVNode("view", { style: { "height": "1px", "background-color": "#F5F6FA" } }),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "text" }, "版本号")
- ]),
- vue.createElementVNode("view", { class: "right-text" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- "v" + vue.toDisplayString($data.version),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$F = {
- data() {
- return {
- address: []
- };
- },
- onLoad() {
- var that = this;
- uni.$on("refreshAddress", () => {
- that.getAddressList();
- });
- },
- onShow() {
- this.getAddressList();
- },
- methods: {
- selectAddress(item) {
- uni.$emit("updateAddress", item);
- uni.navigateBack({
- delta: 1
- });
- },
- editAddress(item) {
- uni.navigateTo({
- url: "./addEditAddress?type=edit&addressId=" + item.addressId
- });
- },
- delAddress(item) {
- uni.showModal({
- title: "提示",
- content: "确认删除此地址吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { addressId: item.addressId };
- delAddress(data).then(
- (res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- this.getAddressList();
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- getAddressList() {
- getAddressList().then(
- (res) => {
- if (res.code == 200) {
- this.address = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- // 新建地址
- addAddress() {
- uni.navigateTo({
- url: "./addEditAddress?type=add"
- });
- }
- }
- };
- function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.address, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- onClick: vue.withModifiers(($event) => $options.selectAddress(item), ["stop"]),
- class: "address-item"
- }, [
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("view", { class: "title" }, [
- item.isDefault == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tag"
- }, "默认")) : vue.createCommentVNode("v-if", true),
- vue.createTextVNode(
- " " + vue.toDisplayString(item.province) + vue.toDisplayString(item.city) + vue.toDisplayString(item.district) + vue.toDisplayString(item.detail),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "name-phone" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(item.realName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parsePhone(item.phone)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "operat-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/del.png",
- mode: "",
- onClick: vue.withModifiers(($event) => $options.delAddress(item), ["stop"])
- }, null, 8, ["onClick"]),
- vue.createElementVNode("image", {
- src: "/static/images/edit.png",
- mode: "",
- onClick: vue.withModifiers(($event) => $options.editAddress(item), ["stop"])
- }, null, 8, ["onClick"])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.address.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "no-data-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.getAddressList())
- }, [
- vue.createElementVNode("image", {
- src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- mode: "aspectFit"
- }),
- vue.createElementVNode("view", { class: "empty-title" }, "暂无数据")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.addAddress())
- }, "新建收货地址")
- ])
- ]);
- }
- const Pages_userAddress = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/address.vue"]]);
- const props$1 = {
- props: {
- // 是否为加载中状态
- loading: {
- type: Boolean,
- default: props$y.switch.loading
- },
- // 是否为禁用装填
- disabled: {
- type: Boolean,
- default: props$y.switch.disabled
- },
- // 开关尺寸,单位px
- size: {
- type: [String, Number],
- default: props$y.switch.size
- },
- // 打开时的背景颜色
- activeColor: {
- type: String,
- default: props$y.switch.activeColor
- },
- // 关闭时的背景颜色
- inactiveColor: {
- type: String,
- default: props$y.switch.inactiveColor
- },
- // 通过v-model双向绑定的值
- modelValue: {
- type: [Boolean, String, Number],
- default: props$y.switch.value
- },
- // switch打开时的值
- activeValue: {
- type: [String, Number, Boolean],
- default: props$y.switch.activeValue
- },
- // switch关闭时的值
- inactiveValue: {
- type: [String, Number, Boolean],
- default: props$y.switch.inactiveValue
- },
- // 是否开启异步变更,开启后需要手动控制输入值
- asyncChange: {
- type: Boolean,
- default: props$y.switch.asyncChange
- },
- // 圆点与外边框的距离
- space: {
- type: [String, Number],
- default: props$y.switch.space
- }
- }
- };
- const _sfc_main$E = {
- name: "u-switch",
- mixins: [mpMixin, mixin, props$1],
- watch: {
- modelValue: {
- immediate: true,
- handler(n) {
- if (n !== this.inactiveValue && n !== this.activeValue) {
- uni.$u.error("v-model绑定的值必须为inactiveValue、activeValue二者之一");
- }
- }
- }
- },
- data() {
- return {
- bgColor: "#ffffff"
- };
- },
- computed: {
- isActive() {
- return this.modelValue === this.activeValue;
- },
- switchStyle() {
- let style = {};
- style.width = uni.$u.addUnit(this.size * 2 + 2);
- style.height = uni.$u.addUnit(Number(this.size) + 2);
- if (this.customInactiveColor) {
- style.borderColor = "rgba(0, 0, 0, 0)";
- }
- style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor;
- return style;
- },
- nodeStyle() {
- let style = {};
- style.width = uni.$u.addUnit(this.size - this.space);
- style.height = uni.$u.addUnit(this.size - this.space);
- const translateX = this.isActive ? uni.$u.addUnit(this.space) : uni.$u.addUnit(this.size);
- style.transform = `translateX(-${translateX})`;
- return style;
- },
- bgStyle() {
- let style = {};
- style.width = uni.$u.addUnit(Number(this.size) * 2 - this.size / 2);
- style.height = uni.$u.addUnit(this.size);
- style.backgroundColor = this.inactiveColor;
- style.transform = `scale(${this.isActive ? 0 : 1})`;
- return style;
- },
- customInactiveColor() {
- return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff";
- }
- },
- emits: ["update:modelValue", "change"],
- methods: {
- clickHandler() {
- if (!this.disabled && !this.loading) {
- const oldValue = this.isActive ? this.inactiveValue : this.activeValue;
- if (!this.asyncChange) {
- this.$emit("update:modelValue", oldValue);
- }
- this.$nextTick(() => {
- this.$emit("change", oldValue);
- });
- }
- }
- }
- };
- function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$f);
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- class: vue.normalizeClass(["u-switch", [_ctx.disabled && "u-switch--disabled"]]),
- style: vue.normalizeStyle([$options.switchStyle, _ctx.$u.addStyle(_ctx.customStyle)]),
- onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "u-switch__bg",
- style: vue.normalizeStyle([$options.bgStyle])
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]),
- style: vue.normalizeStyle([$options.nodeStyle]),
- ref: "u-switch__node"
- },
- [
- vue.createVNode(_component_u_loading_icon, {
- show: _ctx.loading,
- mode: "circle",
- timingFunction: "linear",
- color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD",
- size: _ctx.size * 0.6
- }, null, 8, ["show", "color", "size"])
- ],
- 6
- /* CLASS, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$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"]]);
- const _sfc_main$D = {
- components: {},
- data() {
- return {
- content: null,
- type: null,
- addressId: null,
- isDefault: false,
- addressList: [[], [], []],
- multiIndex: [0, 0, 0],
- address: [],
- form: {
- realName: null,
- phone: null,
- detail: null,
- address: null,
- isDefault: 0
- }
- };
- },
- onLoad(option) {
- this.type = option.type;
- if (this.type == "edit") {
- uni.setNavigationBarTitle({
- title: "修改收货地址"
- });
- this.addressId = option.addressId;
- this.getAddressById();
- } else {
- uni.setNavigationBarTitle({
- title: "新增收货地址"
- });
- }
- this.getCitys();
- },
- methods: {
- parseAddress() {
- if (this.content == null || this.content == "") {
- uni.showToast({
- icon: "none",
- title: "请输入地址信息"
- });
- return;
- }
- var data = { content: this.content };
- parseAddress(data).then(
- (res) => {
- if (res.code == 200) {
- this.form.realName = res.data.name;
- this.form.phone = res.data.mobile;
- this.form.address = res.data.provinceName + res.data.cityName + res.data.expAreaName;
- this.form.province = res.data.provinceName;
- this.form.city = res.data.cityName;
- this.form.district = res.data.expAreaName;
- this.form.detail = res.data.streetName + res.data.address;
- this.form.detail = this.form.detail.replace(/\s+/g, "");
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- getAddressById() {
- var data = { addressId: this.addressId };
- getAddressById(data).then(
- (res) => {
- if (res.code == 200) {
- this.form = res.data;
- this.isDefault = this.form.isDefault == 1 ? true : false;
- this.form.address = this.form.province + this.form.city + this.form.district;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- submit() {
- if (this.type == "add") {
- this.addAddress();
- } else if (this.type == "edit") {
- this.editAddress();
- }
- },
- editAddress() {
- this.form.isDefault = this.isDefault ? 1 : 0;
- editAddress(this.form).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshAddress");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- addAddress() {
- this.form.isDefault = this.isDefault ? 1 : 0;
- addAddress(this.form).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshAddress");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- // 地区选择
- pickerChange(e) {
- this.multiIndex = e.detail.value;
- this.form.address = this.addressList[0][this.multiIndex[0]].n + this.addressList[1][this.multiIndex[1]].n + this.addressList[2][this.multiIndex[2]].n;
- this.form.province = this.addressList[0][this.multiIndex[0]].n;
- this.form.city = this.addressList[1][this.multiIndex[1]].n;
- this.form.district = this.addressList[2][this.multiIndex[2]].n;
- this.form.cityId = this.addressList[1][this.multiIndex[1]].v;
- },
- pickerColumnchange(e) {
- if (e.detail.column === 0) {
- this.multiIndex[0] = e.detail.value;
- this.addressList[1] = this.address[this.multiIndex[0]].c;
- this.addressList[2] = this.address[this.multiIndex[0]].c[0].c;
- this.multiIndex.splice(1, 1, 0);
- this.multiIndex.splice(2, 1, 0);
- }
- if (e.detail.column === 1) {
- this.multiIndex[1] = e.detail.value;
- this.addressList[2] = this.address[this.multiIndex[0]].c[this.multiIndex[1]].c;
- this.multiIndex.splice(2, 1, 0);
- }
- if (e.detail.column === 2) {
- this.multiIndex[2] = e.detail.value;
- }
- },
- getCitys() {
- getCitys().then(
- (res) => {
- if (res.code == 200) {
- this.address = res.data;
- for (var i = 0; i < this.address.length; i++) {
- this.addressList[0].push(this.address[i]);
- }
- for (var i = 0; i < this.address[0].c.length; i++) {
- this.addressList[1].push(this.address[0].c[i]);
- }
- for (var i = 0; i < this.address[0].c[0].c.length; i++) {
- this.addressList[2].push(this.address[0].c[0].c[i]);
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_switch = resolveEasycom(vue.resolveDynamicComponent("u-switch"), __easycom_0);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "form-box" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "收货人"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.realName = $event),
- maxlength: "10",
- placeholder: "请输入姓名",
- class: "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.realName]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "手机号"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "number",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.phone = $event),
- maxlength: "11",
- placeholder: "请输入手机号",
- class: "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.phone]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "所在地区"),
- vue.createElementVNode("picker", {
- value: $data.multiIndex,
- class: "birth-picker",
- mode: "multiSelector",
- "range-key": "n",
- range: $data.addressList,
- onChange: _cache[3] || (_cache[3] = (...args) => $options.pickerChange && $options.pickerChange(...args)),
- onColumnchange: _cache[4] || (_cache[4] = (...args) => $options.pickerColumnchange && $options.pickerColumnchange(...args))
- }, [
- vue.createElementVNode("view", { class: "right-box" }, [
- vue.createElementVNode("view", { class: "input-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.form.address = $event),
- placeholder: "请选择省市区",
- class: "form-input",
- disabled: "disabled"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.address]
- ])
- ]),
- vue.createElementVNode("image", {
- class: "arrow",
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ], 40, ["value", "range"])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "详细地址"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.detail = $event),
- placeholder: "请输入详细地址",
- class: "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.detail]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "address-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- class: "textarea",
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.content = $event),
- placeholder: "请粘贴或输入文本,点击'识别'自动识别姓名、电话、地址,格式:深圳市龙岗区坂田街道长坑路西2巷2号202 黄大大 18888888888"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.content]
- ]),
- vue.createElementVNode("view", { class: "btns" }, [
- vue.createElementVNode("view", {
- class: "btn parse",
- onClick: _cache[7] || (_cache[7] = ($event) => $options.parseAddress())
- }, "识别")
- ])
- ]),
- vue.createCommentVNode(" 设为默认地址 "),
- vue.createElementVNode("view", { class: "setting-box" }, [
- vue.createElementVNode("text", { class: "label" }, "设为默认地址"),
- vue.createVNode(_component_u_switch, {
- modelValue: $data.isDefault,
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.isDefault = $event),
- activeColor: "#C39A58"
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[9] || (_cache[9] = ($event) => $options.submit())
- }, "保存地址")
- ])
- ]);
- }
- const Pages_userAddEditAddress = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/addEditAddress.vue"]]);
- const _sfc_main$C = {
- data() {
- return {
- user: {
- avatar: null,
- phone: ""
- }
- };
- },
- onLoad() {
- this.getUserInfo();
- },
- methods: {
- bindblur(e) {
- this.user.nickName = e.detail.value;
- },
- bindinput(e) {
- this.user.nickName = e.detail.value;
- },
- onChooseAvatar(e) {
- let {
- avatarUrl
- } = e.detail;
- uni.uploadFile({
- url: uni.getStorageSync("requestPath") + "/app/common/uploadOSS",
- //仅为示例,非真实的接口地址
- filePath: avatarUrl,
- name: "file",
- formData: {
- "user": "test"
- // 上传附带参数
- },
- success: (uploadFileRes) => {
- this.user.avatar = JSON.parse(uploadFileRes.data).url;
- }
- });
- },
- // chooseImage() {
- // var that = this;
- // uni.chooseImage({
- // count: 1, // 默认9
- // sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
- // sourceType: ['album', 'camera'], //从相册选择
- // success: (res) => {
- // uni.uploadFile({
- // url: uni.getStorageSync('requestPath')+'/api/common/uploadOSS', //仅为示例,非真实的接口地址
- // filePath: res.tempFilePaths[0],
- // name: 'file',
- // formData: {
- // 'user': 'test' // 上传附带参数
- // },
- // success: (uploadFileRes) => {
- // __f__('log','at pages_user/personInfo.vue:86',uploadFileRes)
- // this.user.avatar =JSON.parse(uploadFileRes.data).data.url
- // }
- // });
- // }
- // });
- // },
- submit() {
- editUser(this.user).then(
- (res) => {
- if (res.code == 200) {
- uni.setStorageSync("avatar", this.avatar);
- uni.setStorageSync("nickName", this.nickName);
- uni.showToast({
- icon: "success",
- title: "修改成功"
- });
- this.getUserInfo();
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- getUserInfo() {
- getUserInfo$1().then(
- (res) => {
- if (res.code == 200) {
- if (res.user != null) {
- this.user = res.user;
- } else {
- this.utils.loginOut();
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("view", { class: "label" }, "头像"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("image", {
- class: "head",
- src: $data.user.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.user.avatar,
- mode: ""
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "button",
- {
- class: "wx-head",
- type: "balanced",
- "open-type": "chooseAvatar",
- onChooseavatar: _cache[0] || (_cache[0] = (...args) => $options.onChooseAvatar && $options.onChooseAvatar(...args))
- },
- null,
- 32
- /* NEED_HYDRATION */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("view", { class: "label" }, "昵称"),
- vue.createElementVNode("view", { class: "right" }, [
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "nickname",
- onBlur: _cache[1] || (_cache[1] = (...args) => $options.bindblur && $options.bindblur(...args)),
- onInput: _cache[2] || (_cache[2] = (...args) => $options.bindinput && $options.bindinput(...args)),
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.user.nickName = $event),
- class: "input"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.user.nickName]
- ]),
- vue.createElementVNode("image", {
- class: "image",
- src: "/static/images/icon_edit.png",
- mode: ""
- })
- ])
- ]),
- vue.createElementVNode("view", { class: "info-item" }, [
- vue.createElementVNode("view", { class: "label" }, "手机号"),
- vue.createElementVNode("view", { class: "right" }, [
- $data.user != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString(_ctx.$parsePhone($data.user.phone)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("image", {
- class: "image",
- src: "/static/images/icon_lock.png",
- mode: ""
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.submit())
- }, "保存修改")
- ])
- ]);
- }
- 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"]]);
- const block0 = (Comp) => {
- (Comp.$wxs || (Comp.$wxs = [])).push("handler");
- (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "174adfb2";
- };
- function getTop(e) {
- let top;
- top = e.touches[0].pageY;
- if (top - e.currentTarget.offsetTop < 150)
- top = e.currentTarget.offsetTop;
- if (top < 30)
- top += 70;
- return top - 30;
- }
- const _sfc_main$B = {
- name: "node",
- options: {},
- data() {
- return {
- ctrl: {}
- };
- },
- props: {
- name: String,
- attrs: {
- type: Object,
- default() {
- return {};
- }
- },
- childs: Array,
- opts: Array
- },
- components: {
- node
- },
- mounted() {
- this.$nextTick(() => {
- for (this.root = this.$parent; this.root.$options.name !== "mp-html"; this.root = this.root.$parent)
- ;
- });
- if (this.opts[0]) {
- let i;
- for (i = this.childs.length; i--; ) {
- if (this.childs[i].name === "img")
- break;
- }
- if (i !== -1) {
- this.observer = uni.createIntersectionObserver(this).relativeToViewport({
- top: 500,
- bottom: 500
- });
- this.observer.observe("._img", (res) => {
- if (res.intersectionRatio) {
- this.$set(this.ctrl, "load", 1);
- this.observer.disconnect();
- }
- });
- }
- }
- },
- beforeDestroy() {
- if (this.root._edit === this) {
- this.root._edit = void 0;
- }
- if (this.observer) {
- this.observer.disconnect();
- }
- },
- methods: {
- editStart(e) {
- if (this.opts[5]) {
- const i = e.currentTarget.dataset.i;
- if (!this.ctrl["e" + i]) {
- this.$set(this.ctrl, "e" + i, 1);
- setTimeout(() => {
- this.root._mask.push(() => this.$set(this.ctrl, "e" + i, 0));
- }, 50);
- this.root._edit = this;
- this.i = i;
- this.cursor = this.childs[i].text.length;
- } else {
- this.root._mask.pop();
- this.root._maskTap();
- this.$set(this.ctrl, "e" + i, 2);
- setTimeout(() => {
- this.$set(this.ctrl, "e" + i, 3);
- }, 50);
- }
- }
- },
- editInput(e) {
- const i = e.target.dataset.i;
- const value2 = e.detail.value.replace(/ {2,}/, ($) => {
- let res = " ";
- for (let i2 = 1; i2 < $.length; i2++) {
- res += " ";
- }
- return res;
- });
- this.root._editVal(`${this.opts[7]}.${i}.text`, this.childs[i].text, value2);
- this.cursor = e.detail.cursor;
- },
- editEnd(e) {
- const i = e.target.dataset.i;
- this.$set(this.ctrl, "e" + i, 0);
- this.root._setData(`${this.opts[7]}.${i}.text`, e.detail.value.replace(/ {2}/g, " "));
- if (e.detail.cursor !== void 0) {
- this.cursor = e.detail.cursor;
- }
- },
- insert(node2) {
- setTimeout(() => {
- const childs = this.childs.slice(0);
- if (!childs[this.i]) {
- childs.push(node2);
- } else if (childs[this.i].text) {
- const text = childs[this.i].text;
- const list = [];
- if (this.cursor) {
- list.push({
- type: "text",
- text: text.substring(0, this.cursor)
- });
- }
- list.push(node2);
- if (this.cursor < text.length) {
- list.push({
- type: "text",
- text: text.substring(this.cursor)
- });
- }
- childs.splice(this.i, 1, ...list);
- } else {
- childs.splice(parseInt(this.i) + 1, 0, node2);
- }
- this.root._editVal(this.opts[7], this.childs, childs, true);
- this.i = parseInt(this.i) + 1;
- }, 200);
- },
- remove(i) {
- const arr = this.childs.slice(0);
- const delEle = arr.splice(i, 1)[0];
- if (delEle.name === "img" || delEle.name === "video" || delEle.name === "audio") {
- let src = delEle.attrs.src;
- if (delEle.src) {
- src = delEle.src.length === 1 ? delEle.src[0] : delEle.src;
- }
- this.root.$emit("remove", {
- type: delEle.name,
- src
- });
- }
- this.root._edit = void 0;
- this.root._maskTap();
- this.root._editVal(this.opts[7], this.childs, arr, true);
- },
- nodeTap(e) {
- if (this.opts[5]) {
- if (this.root._lock)
- return;
- this.root._lock = true;
- setTimeout(() => {
- this.root._lock = false;
- }, 50);
- if (this.ctrl["e" + this.i] === 3)
- return;
- this.root._maskTap();
- this.root._edit = this;
- let start = this.opts[7].lastIndexOf("children.");
- if (start !== -1) {
- start += 9;
- } else {
- start = 6;
- }
- const i = parseInt(this.opts[7].substring(start, this.opts[7].lastIndexOf(".children")));
- let parent = this.$parent;
- while (parent && parent.$options.name !== "node") {
- parent = parent.$parent;
- }
- if (!parent || this.opts[7].length - parent.opts[7].length > 15)
- return;
- this.$set(this.ctrl, "root", 1);
- this.root._mask.push(() => this.$set(this.ctrl, "root", 0));
- if (this.childs.length === 1 && this.childs[0].type === "text" && !this.ctrl.e0) {
- this.$set(this.ctrl, "e0", 1);
- this.root._mask.push(() => this.$set(this.ctrl, "e0", 0));
- this.i = 0;
- this.cursor = this.childs[0].text.length;
- }
- const items = this.root._getItem(parent.childs[i], i !== 0, i !== parent.childs.length - 1);
- this.root._tooltip({
- top: getTop(e),
- items,
- success: (tapIndex) => {
- if (items[tapIndex] === "大小") {
- const style = parent.childs[i].attrs.style || "";
- let value2 = style.match(/;font-size:([0-9]+)px/);
- if (value2) {
- value2 = parseInt(value2[1]);
- } else {
- value2 = 16;
- }
- this.root._slider({
- min: 10,
- max: 30,
- value: value2,
- top: getTop(e),
- changing: (val) => {
- if (Math.abs(val - value2) > 2) {
- parent.changeStyle("font-size", i, val + "px", value2 + "px");
- value2 = e.detail.value;
- }
- },
- change: (val) => {
- if (val !== value2) {
- parent.changeStyle("font-size", i, val + "px", value2 + "px");
- }
- this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, parent.childs[i].attrs.style);
- }
- });
- } else if (items[tapIndex] === "上移" || items[tapIndex] === "下移") {
- const arr = parent.childs.slice(0);
- const item = arr[i];
- if (items[tapIndex] === "上移") {
- arr[i] = arr[i - 1];
- arr[i - 1] = item;
- } else {
- arr[i] = arr[i + 1];
- arr[i + 1] = item;
- }
- this.root._editVal(parent.opts[7], parent.childs, arr, true);
- } else if (items[tapIndex] === "删除") {
- parent.remove(i);
- } else {
- const style = parent.childs[i].attrs.style || "";
- let newStyle = "";
- const item = items[tapIndex];
- let name;
- let value2;
- if (item === "斜体") {
- name = "font-style";
- value2 = "italic";
- } else if (item === "粗体") {
- name = "font-weight";
- value2 = "bold";
- } else if (item === "下划线") {
- name = "text-decoration";
- value2 = "underline";
- } else if (item === "居中") {
- name = "text-align";
- value2 = "center";
- } else if (item === "缩进") {
- name = "text-indent";
- value2 = "2em";
- }
- if (style.includes(name + ":")) {
- newStyle = style.replace(new RegExp(name + ":[^;]+"), "");
- } else {
- newStyle = style + ";" + name + ":" + value2;
- }
- this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, newStyle, true);
- }
- }
- });
- }
- },
- mediaTap(e) {
- if (this.opts[5]) {
- const i = e.target.dataset.i;
- const node2 = this.childs[i];
- const items = this.root._getItem(node2);
- this.root._edit = this;
- this.i = i;
- this.root._tooltip({
- top: e.target.offsetTop - 30,
- items,
- success: (tapIndex) => {
- switch (items[tapIndex]) {
- case "封面":
- this.root.getSrc("img", node2.attrs.poster || "").then((url2) => {
- this.root._editVal(`${this.opts[7]}.${i}.attrs.poster`, node2.attrs.poster, url2 instanceof Array ? url2[0] : url2, true);
- }).catch(() => {
- });
- break;
- case "删除":
- this.remove(i);
- break;
- case "循环":
- case "不循环":
- this.root._setData(`${this.opts[7]}.${i}.attrs.loop`, !node2.attrs.loop);
- uni.showToast({
- title: "成功"
- });
- break;
- case "自动播放":
- case "不自动播放":
- this.root._setData(`${this.opts[7]}.${i}.attrs.autoplay`, !node2.attrs.autoplay);
- uni.showToast({
- title: "成功"
- });
- break;
- }
- }
- });
- this.root._lock = true;
- setTimeout(() => {
- this.root._lock = false;
- }, 50);
- }
- },
- changeStyle(name, i, value2, oldVal) {
- let style = this.childs[i].attrs.style || "";
- if (style.includes(";" + name + ":" + oldVal)) {
- style = style.replace(";" + name + ":" + oldVal, ";" + name + ":" + value2);
- } else {
- style += ";" + name + ":" + value2;
- }
- this.root._setData(`${this.opts[7]}.${i}.attrs.style`, style);
- },
- /**
- * @description 播放视频事件
- * @param {Event} e
- */
- play(e) {
- this.root.$emit("play");
- },
- /**
- * @description 图片点击事件
- * @param {Event} e
- */
- imgTap(e) {
- if (!this.opts[5]) {
- const node2 = this.childs[e.currentTarget.dataset.i];
- if (node2.a) {
- this.linkTap(node2.a);
- return;
- }
- if (node2.attrs.ignore)
- return;
- node2.attrs.src = node2.attrs.src || node2.attrs["data-src"];
- this.root.$emit("imgtap", node2.attrs);
- if (this.root.previewImg) {
- uni.previewImage({
- current: parseInt(node2.attrs.i),
- urls: this.root.imgList
- });
- }
- } else {
- const i = e.currentTarget.dataset.i;
- const node2 = this.childs[i];
- const items = this.root._getItem(node2);
- this.root._edit = this;
- this.i = i;
- this.root._maskTap();
- this.$set(this.ctrl, "e" + i, 1);
- this.root._mask.push(() => this.$set(this.ctrl, "e" + i, 0));
- this.root._tooltip({
- top: getTop(e),
- items,
- success: (tapIndex) => {
- if (items[tapIndex] === "换图") {
- this.root.getSrc("img", node2.attrs.src || "").then((url2) => {
- this.root._editVal(this.opts[7] + "." + i + ".attrs.src", node2.attrs.src, url2 instanceof Array ? url2[0] : url2, true);
- }).catch(() => {
- });
- } else if (items[tapIndex] === "宽度") {
- const style = node2.attrs.style || "";
- let value2 = style.match(/max-width:([0-9]+)%/);
- if (value2) {
- value2 = parseInt(value2[1]);
- } else {
- value2 = 100;
- }
- this.root._slider({
- min: 0,
- max: 100,
- value: value2,
- top: getTop(e),
- changing: (val) => {
- if (Math.abs(val - value2) > 5) {
- this.changeStyle("max-width", i, val + "%", value2 + "%");
- value2 = val;
- }
- },
- change: (val) => {
- if (val !== value2) {
- this.changeStyle("max-width", i, val + "%", value2 + "%");
- value2 = val;
- }
- this.root._editVal(this.opts[7] + "." + i + ".attrs.style", style, this.childs[i].attrs.style);
- }
- });
- } else if (items[tapIndex] === "超链接") {
- this.root.getSrc("link", node2.a ? node2.a.href : "").then((url2) => {
- if (node2.a) {
- this.root._editVal(this.opts[7] + "." + i + ".a.href", node2.a.href, url2, true);
- } else {
- const link = {
- name: "a",
- attrs: {
- href: url2
- },
- children: [node2]
- };
- node2.a = link.attrs;
- this.root._editVal(this.opts[7] + "." + i, node2, link, true);
- }
- wx.showToast({
- title: "成功"
- });
- }).catch(() => {
- });
- } else if (items[tapIndex] === "预览图") {
- this.root.getSrc("img", node2.attrs["original-src"] || "").then((url2) => {
- this.root._editVal(this.opts[7] + "." + i + ".attrs.original-src", node2.attrs["original-src"], url2 instanceof Array ? url2[0] : url2, true);
- uni.showToast({
- title: "成功"
- });
- }).catch(() => {
- });
- } else if (items[tapIndex] === "删除") {
- this.remove(i);
- } else {
- this.root._setData(this.opts[7] + "." + i + ".attrs.ignore", !node2.attrs.ignore);
- uni.showToast({
- title: "成功"
- });
- }
- }
- });
- this.root._lock = true;
- setTimeout(() => {
- this.root._lock = false;
- }, 50);
- }
- },
- /**
- * @description 图片长按
- */
- imgLongTap(e) {
- const attrs = this.childs[e.currentTarget.dataset.i].attrs;
- if (this.opts[3] && !attrs.ignore) {
- uni.showActionSheet({
- itemList: ["保存图片"],
- success: () => {
- const save = (path) => {
- uni.saveImageToPhotosAlbum({
- filePath: path,
- success() {
- uni.showToast({
- title: "保存成功"
- });
- }
- });
- };
- if (this.root.imgList[attrs.i].startsWith("http")) {
- uni.downloadFile({
- url: this.root.imgList[attrs.i],
- success: (res) => save(res.tempFilePath)
- });
- } else {
- save(this.root.imgList[attrs.i]);
- }
- }
- });
- }
- },
- /**
- * @description 图片加载完成事件
- * @param {Event} e
- */
- imgLoad(e) {
- const i = e.currentTarget.dataset.i;
- if (!this.childs[i].w) {
- this.$set(this.ctrl, i, e.detail.width);
- if (this.opts[5]) {
- const path = this.opts[7] + "." + i + ".attrs.";
- if (e.detail.width < 150)
- this.root._setData(path + "ignore", "T");
- this.root._setData(path + "width", e.detail.width.toString());
- }
- } else if (this.opts[1] && !this.ctrl[i] || this.ctrl[i] === -1) {
- this.$set(this.ctrl, i, 1);
- }
- },
- /**
- * @description 链接点击事件
- * @param {Event} e
- */
- linkTap(e) {
- if (!this.opts[5]) {
- const node2 = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {};
- const attrs = node2.attrs || e;
- const href = attrs.href;
- this.root.$emit("linktap", Object.assign({
- innerText: this.root.getText(node2.children || [])
- // 链接内的文本内容
- }, attrs));
- if (href) {
- if (href[0] === "#") {
- this.root.navigateTo(href.substring(1)).catch(() => {
- });
- } else if (href.split("?")[0].includes("://")) {
- if (this.root.copyLink) {
- plus.runtime.openWeb(href);
- }
- } else {
- uni.navigateTo({
- url: href,
- fail() {
- uni.switchTab({
- url: href,
- fail() {
- }
- });
- }
- });
- }
- }
- } else {
- const i = e.currentTarget.dataset.i;
- const node2 = this.childs[i];
- const items = this.root._getItem(node2);
- this.root._tooltip({
- top: getTop(e),
- items,
- success: (tapIndex) => {
- if (items[tapIndex] === "更换链接") {
- this.root.getSrc("link", node2.attrs.href).then((url2) => {
- this.root._editVal(this.opts[7] + "." + i + ".attrs.href", node2.attrs.href, url2, true);
- uni.showToast({
- title: "成功"
- });
- }).catch(() => {
- });
- } else {
- this.remove(i);
- }
- }
- });
- }
- },
- /**
- * @description 错误事件
- * @param {Event} e
- */
- mediaError(e) {
- const i = e.currentTarget.dataset.i;
- const node2 = this.childs[i];
- if (node2.name === "video" || node2.name === "audio") {
- let index2 = (this.ctrl[i] || 0) + 1;
- if (index2 > node2.src.length) {
- index2 = 0;
- }
- if (index2 < node2.src.length) {
- this.$set(this.ctrl, i, index2);
- return;
- }
- } else if (node2.name === "img") {
- if (this.opts[2]) {
- this.$set(this.ctrl, i, -1);
- }
- }
- if (this.root) {
- this.root.$emit("error", {
- source: node2.name,
- attrs: node2.attrs,
- errMsg: e.detail.errMsg
- });
- }
- }
- }
- };
- function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_node = vue.resolveComponent("node", true);
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: _cache[11] || (_cache[11] = (...args) => $options.nodeTap && $options.nodeTap(...args)),
- id: $props.attrs.id,
- class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class),
- style: vue.normalizeStyle(($data.ctrl.root ? "border:1px solid black;padding:5px;display:block;" : "") + $props.attrs.style)
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($props.childs, (n, i) => {
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: i },
- [
- vue.createCommentVNode(" 图片 "),
- vue.createCommentVNode(" 占位图 "),
- n.name === "img" && ($props.opts[1] && !$data.ctrl[i] || $data.ctrl[i] < 0) ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- class: "_img",
- style: vue.normalizeStyle(n.attrs.style),
- src: $data.ctrl[i] < 0 ? $props.opts[2] : $props.opts[1],
- mode: "widthFix"
- }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 显示图片 "),
- n.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- id: n.attrs.id,
- class: vue.normalizeClass("_img " + n.attrs.class),
- 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),
- src: n.attrs.src || ($data.ctrl.load ? n.attrs["data-src"] : ""),
- mode: !n.h ? "widthFix" : !n.w ? "heightFix" : "",
- "data-i": i,
- onLoad: _cache[0] || (_cache[0] = (...args) => $options.imgLoad && $options.imgLoad(...args)),
- onError: _cache[1] || (_cache[1] = (...args) => $options.mediaError && $options.mediaError(...args)),
- onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])),
- onLongpress: _cache[3] || (_cache[3] = (...args) => $options.imgLongTap && $options.imgLongTap(...args))
- }, null, 46, ["id", "src", "mode", "data-i"])) : n.type === "text" && !$data.ctrl["e" + i] ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createCommentVNode(" 文本 "),
- vue.createElementVNode("text", {
- "data-i": i,
- "user-select": $props.opts[4],
- decode: !$props.opts[5],
- onClick: _cache[4] || (_cache[4] = (...args) => $options.editStart && $options.editStart(...args))
- }, [
- vue.createTextVNode(
- vue.toDisplayString(n.text) + " ",
- 1
- /* TEXT */
- ),
- !n.text ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- style: { "color": "gray" }
- },
- vue.toDisplayString($props.opts[6] || "请输入"),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], 8, ["data-i", "user-select", "decode"])
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : n.type === "text" && $data.ctrl["e" + i] === 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 3,
- "data-i": i,
- style: { "border": "1px dashed black", "min-width": "50px", "width": "auto", "padding": "5px", "display": "block" },
- onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.editStart && $options.editStart(...args), ["stop"]))
- }, [
- vue.createTextVNode(
- vue.toDisplayString(n.text) + " ",
- 1
- /* TEXT */
- ),
- !n.text ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- style: { "color": "gray" }
- },
- vue.toDisplayString($props.opts[6] || "请输入"),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ], 8, ["data-i"])) : n.type === "text" ? (vue.openBlock(), vue.createElementBlock("textarea", {
- key: 4,
- style: { "border": "1px dashed black", "min-width": "50px", "width": "auto", "padding": "5px" },
- "auto-height": "",
- maxlength: "-1",
- focus: $data.ctrl["e" + i] === 3,
- value: n.text,
- "data-i": i,
- onInput: _cache[6] || (_cache[6] = (...args) => $options.editInput && $options.editInput(...args)),
- onBlur: _cache[7] || (_cache[7] = (...args) => $options.editEnd && $options.editEnd(...args))
- }, null, 40, ["focus", "value", "data-i"])) : n.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 5 }, "\\n")) : n.name === "a" ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 6 },
- [
- vue.createCommentVNode(" 链接 "),
- vue.createElementVNode("view", {
- id: n.attrs.id,
- class: vue.normalizeClass((n.attrs.href ? "_a " : "") + n.attrs.class),
- "hover-class": "_hover",
- style: vue.normalizeStyle("display:inline;" + n.attrs.style),
- "data-i": i,
- onClick: _cache[8] || (_cache[8] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"]))
- }, [
- vue.createVNode(_component_node, {
- name: "span",
- childs: n.children,
- 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"],
- style: { "display": "inherit" }
- }, null, 8, ["childs", "opts"])
- ], 14, ["id", "data-i"])
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : n.html ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 7 },
- [
- vue.createCommentVNode(" 视频 "),
- vue.createElementVNode("view", {
- "data-i": i,
- onClick: _cache[9] || (_cache[9] = (...args) => $options.mediaTap && $options.mediaTap(...args)),
- id: n.attrs.id,
- class: vue.normalizeClass("_video " + n.attrs.class),
- style: vue.normalizeStyle(n.attrs.style),
- innerHTML: n.html,
- onVplay: _cache[10] || (_cache[10] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"]))
- }, null, 46, ["data-i", "id", "innerHTML"])
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : n.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", {
- key: 8,
- style: vue.normalizeStyle(n.attrs.style),
- allowfullscreen: n.attrs.allowfullscreen,
- frameborder: n.attrs.frameborder,
- src: n.attrs.src
- }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", {
- key: 9,
- style: vue.normalizeStyle(n.attrs.style),
- src: n.attrs.src
- }, null, 12, ["src"])) : n.name === "table" && (n.c || $props.opts[5]) || n.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 10,
- id: n.attrs.id,
- class: vue.normalizeClass("_" + n.name + " " + n.attrs.class),
- style: vue.normalizeStyle(n.attrs.style)
- }, [
- n.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, {
- key: 0,
- childs: n.children,
- 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"]
- }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList(n.children, (tbody, x) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: x,
- class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class),
- style: vue.normalizeStyle(tbody.attrs.style)
- },
- [
- tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, {
- key: 0,
- childs: tbody.children,
- 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"]
- }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- vue.renderList(tbody.children, (tr, y) => {
- return vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: y },
- [
- tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
- style: vue.normalizeStyle(tr.attrs.style)
- },
- [
- vue.createVNode(_component_node, {
- childs: tr.children,
- 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"]
- }, null, 8, ["childs", "opts"])
- ],
- 6
- /* CLASS, STYLE */
- )) : (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
- style: vue.normalizeStyle(tr.attrs.style)
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(tr.children, (td, z) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: z,
- class: vue.normalizeClass("_" + td.name + " " + td.attrs.class),
- style: vue.normalizeStyle(td.attrs.style)
- },
- [
- vue.createVNode(_component_node, {
- childs: td.children,
- 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"]
- }, null, 8, ["childs", "opts"])
- ],
- 6
- /* CLASS, STYLE */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 6
- /* CLASS, STYLE */
- ))
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 6
- /* CLASS, STYLE */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 14, ["id"])) : !$props.opts[5] && !n.c ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 11 },
- [
- vue.createCommentVNode(" 富文本 "),
- vue.createElementVNode("rich-text", {
- id: n.attrs.id,
- style: vue.normalizeStyle(n.f + ";display:inline"),
- preview: false,
- selectable: $props.opts[4],
- "user-select": $props.opts[4],
- nodes: [n]
- }, null, 12, ["id", "selectable", "user-select", "nodes"])
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : n.c === 2 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 12 },
- [
- vue.createCommentVNode(" 继续递归 "),
- vue.createElementVNode("view", {
- id: n.attrs.id,
- class: vue.normalizeClass("_block _" + n.name + " " + n.attrs.class),
- style: vue.normalizeStyle(n.f + ";" + n.attrs.style)
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(n.children, (n2, j) => {
- return vue.openBlock(), vue.createBlock(_component_node, {
- key: j,
- style: vue.normalizeStyle(n2.f),
- name: n2.name,
- attrs: n2.attrs,
- childs: n2.children,
- 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"]
- }, null, 8, ["style", "name", "attrs", "childs", "opts"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 14, ["id"])
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )) : (vue.openBlock(), vue.createBlock(_component_node, {
- key: 13,
- style: vue.normalizeStyle(n.f),
- name: n.name,
- attrs: n.attrs,
- childs: n.children,
- 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"]
- }, null, 8, ["style", "name", "attrs", "childs", "opts"]))
- ],
- 64
- /* STABLE_FRAGMENT */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ], 14, ["id"]);
- }
- if (typeof block0 === "function")
- block0(_sfc_main$B);
- 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"]]);
- const config$1 = {
- // 信任的标签(保持标签名不变)
- 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"),
- // 块级标签(转为 div,其他的非信任标签转为 span)
- blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),
- // 行内标签
- inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"),
- // 要移除的标签
- ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),
- // 自闭合的标签
- voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),
- // html 实体
- entities: {
- lt: "<",
- gt: ">",
- quot: '"',
- apos: "'",
- ensp: " ",
- emsp: " ",
- nbsp: " ",
- semi: ";",
- ndash: "–",
- mdash: "—",
- middot: "·",
- lsquo: "‘",
- rsquo: "’",
- ldquo: "“",
- rdquo: "”",
- bull: "•",
- hellip: "…",
- larr: "←",
- uarr: "↑",
- rarr: "→",
- darr: "↓"
- },
- // 默认的标签样式
- tagStyle: {
- address: "font-style:italic",
- big: "display:inline;font-size:1.2em",
- caption: "display:table-caption;text-align:center",
- center: "text-align:center",
- cite: "font-style:italic",
- dd: "margin-left:40px",
- mark: "background-color:yellow",
- pre: "font-family:monospace;white-space:pre",
- s: "text-decoration:line-through",
- small: "display:inline;font-size:0.8em",
- strike: "text-decoration:line-through",
- u: "text-decoration:underline"
- },
- // svg 大小写对照表
- svgDict: {
- animatetransform: "animateTransform",
- lineargradient: "linearGradient",
- viewbox: "viewBox",
- attributename: "attributeName",
- repeatcount: "repeatCount",
- repeatdur: "repeatDur"
- }
- };
- const tagSelector = {};
- const {
- windowWidth
- } = uni.getSystemInfoSync();
- const blankChar = makeMap(" ,\r,\n, ,\f");
- let idIndex = 0;
- config$1.ignoreTags.iframe = void 0;
- config$1.trustTags.iframe = true;
- config$1.ignoreTags.embed = void 0;
- config$1.trustTags.embed = true;
- function makeMap(str) {
- const map = /* @__PURE__ */ Object.create(null);
- const list = str.split(",");
- for (let i = list.length; i--; ) {
- map[list[i]] = true;
- }
- return map;
- }
- function decodeEntity(str, amp) {
- let i = str.indexOf("&");
- while (i !== -1) {
- const j = str.indexOf(";", i + 3);
- let code2;
- if (j === -1)
- break;
- if (str[i + 1] === "#") {
- code2 = parseInt((str[i + 2] === "x" ? "0" : "") + str.substring(i + 2, j));
- if (!isNaN(code2)) {
- str = str.substr(0, i) + String.fromCharCode(code2) + str.substr(j + 1);
- }
- } else {
- code2 = str.substring(i + 1, j);
- if (config$1.entities[code2] || code2 === "amp" && amp) {
- str = str.substr(0, i) + (config$1.entities[code2] || "&") + str.substr(j + 1);
- }
- }
- i = str.indexOf("&", i + 1);
- }
- return str;
- }
- function mergeNodes(nodes) {
- let i = nodes.length - 1;
- for (let j = i; j >= -1; j--) {
- 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")) {
- if (i - j >= 5) {
- nodes.splice(j + 1, i - j, {
- name: "div",
- attrs: {},
- children: nodes.slice(j + 1, i + 1)
- });
- }
- i = j - 1;
- }
- }
- }
- function Parser(vm) {
- this.options = vm || {};
- this.tagStyle = Object.assign({}, config$1.tagStyle, this.options.tagStyle);
- this.imgList = vm.imgList || [];
- this.plugins = vm.plugins || [];
- this.attrs = /* @__PURE__ */ Object.create(null);
- this.stack = [];
- this.nodes = [];
- this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0;
- }
- Parser.prototype.parse = function(content) {
- for (let i = this.plugins.length; i--; ) {
- if (this.plugins[i].onUpdate) {
- content = this.plugins[i].onUpdate(content, config$1) || content;
- }
- }
- new Lexer(this).parse(content);
- while (this.stack.length) {
- this.popNode();
- }
- if (this.nodes.length > 50) {
- mergeNodes(this.nodes);
- }
- return this.nodes;
- };
- Parser.prototype.expose = function() {
- for (let i = this.stack.length; i--; ) {
- const item = this.stack[i];
- if (item.c || item.name === "a" || item.name === "video" || item.name === "audio")
- return;
- item.c = 1;
- }
- };
- Parser.prototype.hook = function(node2) {
- for (let i = this.plugins.length; i--; ) {
- if (this.plugins[i].onParse && this.plugins[i].onParse(node2, this) === false) {
- return false;
- }
- }
- return true;
- };
- Parser.prototype.getUrl = function(url2) {
- const domain = this.options.domain;
- if (url2[0] === "/") {
- if (url2[1] === "/") {
- url2 = (domain ? domain.split("://")[0] : "http") + ":" + url2;
- } else if (domain) {
- url2 = domain + url2;
- } else {
- url2 = plus.io.convertLocalFileSystemURL(url2);
- }
- } else if (!url2.includes("data:") && !url2.includes("://")) {
- if (domain) {
- url2 = domain + "/" + url2;
- } else {
- url2 = plus.io.convertLocalFileSystemURL(url2);
- }
- }
- return url2;
- };
- Parser.prototype.parseStyle = function(node2) {
- const attrs = node2.attrs;
- const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";"));
- const styleObj = {};
- let tmp = "";
- if (attrs.id && !this.xml) {
- if (this.options.useAnchor) {
- this.expose();
- } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") {
- attrs.id = void 0;
- }
- }
- if (attrs.width) {
- styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px");
- attrs.width = void 0;
- }
- if (attrs.height) {
- styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px");
- attrs.height = void 0;
- }
- for (let i = 0, len = list.length; i < len; i++) {
- const info = list[i].split(":");
- if (info.length < 2)
- continue;
- const key = info.shift().trim().toLowerCase();
- let value2 = info.join(":").trim();
- if (value2[0] === "-" && value2.lastIndexOf("-") > 0 || value2.includes("safe")) {
- tmp += `;${key}:${value2}`;
- } else if (!styleObj[key] || value2.includes("import") || !styleObj[key].includes("import")) {
- if (value2.includes("url")) {
- let j = value2.indexOf("(") + 1;
- if (j) {
- while (value2[j] === '"' || value2[j] === "'" || blankChar[value2[j]]) {
- j++;
- }
- value2 = value2.substr(0, j) + this.getUrl(value2.substr(j));
- }
- } else if (value2.includes("rpx")) {
- value2 = value2.replace(/[0-9.]+\s*rpx/g, ($) => parseFloat($) * windowWidth / 750 + "px");
- }
- styleObj[key] = value2;
- }
- }
- node2.attrs.style = tmp;
- return styleObj;
- };
- Parser.prototype.onTagName = function(name) {
- this.tagName = this.xml ? name : name.toLowerCase();
- if (this.tagName === "svg") {
- this.xml = (this.xml || 0) + 1;
- }
- };
- Parser.prototype.onAttrName = function(name) {
- name = this.xml ? name : name.toLowerCase();
- if (name.substr(0, 5) === "data-") {
- if (name === "data-src" && !this.attrs.src) {
- this.attrName = "src";
- } else if (this.tagName === "img" || this.tagName === "a") {
- this.attrName = name;
- } else {
- this.attrName = void 0;
- }
- } else {
- this.attrName = name;
- this.attrs[name] = "T";
- }
- };
- Parser.prototype.onAttrVal = function(val) {
- const name = this.attrName || "";
- if (name === "style" || name === "href") {
- this.attrs[name] = decodeEntity(val, true);
- } else if (name.includes("src")) {
- this.attrs[name] = this.getUrl(decodeEntity(val, true));
- } else if (name) {
- this.attrs[name] = val;
- }
- };
- Parser.prototype.onOpenTag = function(selfClose) {
- const node2 = /* @__PURE__ */ Object.create(null);
- node2.name = this.tagName;
- node2.attrs = this.attrs;
- if (this.options.nodes.length) {
- node2.type = "node";
- }
- this.attrs = /* @__PURE__ */ Object.create(null);
- const attrs = node2.attrs;
- const parent = this.stack[this.stack.length - 1];
- const siblings = parent ? parent.children : this.nodes;
- const close = this.xml ? selfClose : config$1.voidTags[node2.name];
- if (tagSelector[node2.name]) {
- attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : "");
- }
- if (node2.name === "embed") {
- this.expose();
- }
- if (node2.name === "video" || node2.name === "audio") {
- if (node2.name === "video" && !attrs.id) {
- attrs.id = "v" + idIndex++;
- }
- if (!attrs.controls && !attrs.autoplay) {
- attrs.controls = "T";
- }
- node2.src = [];
- if (attrs.src) {
- node2.src.push(attrs.src);
- attrs.src = void 0;
- }
- this.expose();
- }
- if (close) {
- if (!this.hook(node2) || config$1.ignoreTags[node2.name]) {
- if (node2.name === "base" && !this.options.domain) {
- this.options.domain = attrs.href;
- } else if (node2.name === "source" && parent && (parent.name === "video" || parent.name === "audio") && attrs.src) {
- parent.src.push(attrs.src);
- }
- return;
- }
- const styleObj = this.parseStyle(node2);
- if (node2.name === "img") {
- if (attrs.src) {
- if (attrs.src.includes("webp")) {
- node2.webp = "T";
- }
- if (attrs.src.includes("data:") && !attrs["original-src"]) {
- attrs.ignore = "T";
- }
- if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) {
- for (let i = this.stack.length; i--; ) {
- const item = this.stack[i];
- if (item.name === "a") {
- node2.a = item.attrs;
- break;
- }
- item.c = 1;
- }
- attrs.i = this.imgList.length.toString();
- let src = attrs["original-src"] || attrs.src;
- this.imgList.push(src);
- if (this.options.lazyLoad) {
- attrs["data-src"] = attrs.src;
- attrs.src = void 0;
- }
- }
- }
- if (styleObj.display === "inline") {
- styleObj.display = "";
- }
- if (attrs.ignore) {
- styleObj["max-width"] = styleObj["max-width"] || "100%";
- attrs.style += ";-webkit-touch-callout:none";
- }
- if (parseInt(styleObj.width) > windowWidth) {
- styleObj.height = void 0;
- }
- if (!isNaN(parseInt(styleObj.width))) {
- node2.w = "T";
- }
- if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent && (parent.attrs.style || "").includes("height"))) {
- node2.h = "T";
- }
- } else if (node2.name === "svg") {
- siblings.push(node2);
- this.stack.push(node2);
- this.popNode();
- return;
- }
- for (const key in styleObj) {
- if (styleObj[key]) {
- attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`;
- }
- }
- attrs.style = attrs.style.substr(1) || void 0;
- } else {
- if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) {
- this.pre = node2.pre = 1;
- }
- node2.children = [];
- this.stack.push(node2);
- }
- siblings.push(node2);
- };
- Parser.prototype.onCloseTag = function(name) {
- name = this.xml ? name : name.toLowerCase();
- let i;
- for (i = this.stack.length; i--; ) {
- if (this.stack[i].name === name)
- break;
- }
- if (i !== -1) {
- while (this.stack.length > i) {
- this.popNode();
- }
- } else if (name === "p" || name === "br") {
- const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
- siblings.push({
- name,
- attrs: {
- class: tagSelector[name] || "",
- style: this.tagStyle[name] || ""
- }
- });
- }
- };
- Parser.prototype.popNode = function() {
- const editable = this.options.editable;
- const node2 = this.stack.pop();
- let attrs = node2.attrs;
- const children = node2.children;
- const parent = this.stack[this.stack.length - 1];
- const siblings = parent ? parent.children : this.nodes;
- if (!this.hook(node2) || config$1.ignoreTags[node2.name]) {
- if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) {
- uni.setNavigationBarTitle({
- title: children[0].text
- });
- }
- siblings.pop();
- return;
- }
- if (node2.pre && this.pre !== 2) {
- this.pre = node2.pre = void 0;
- for (let i = this.stack.length; i--; ) {
- if (this.stack[i].pre) {
- this.pre = 1;
- }
- }
- }
- const styleObj = {};
- if (node2.name === "svg") {
- if (this.xml > 1) {
- this.xml--;
- return;
- }
- let src = "";
- const style = attrs.style;
- attrs.style = "";
- attrs.xmlns = "http://www.w3.org/2000/svg";
- (function traversal(node3) {
- if (node3.type === "text") {
- src += node3.text;
- return;
- }
- const name = config$1.svgDict[node3.name] || node3.name;
- src += "<" + name;
- for (const item in node3.attrs) {
- const val = node3.attrs[item];
- if (val) {
- src += ` ${config$1.svgDict[item] || item}="${val}"`;
- }
- }
- if (!node3.children) {
- src += "/>";
- } else {
- src += ">";
- for (let i = 0; i < node3.children.length; i++) {
- traversal(node3.children[i]);
- }
- src += "</" + name + ">";
- }
- })(node2);
- node2.name = "img";
- node2.attrs = {
- src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"),
- style,
- ignore: "T"
- };
- node2.children = void 0;
- this.xml = false;
- return;
- }
- if (attrs.align) {
- if (node2.name === "table") {
- if (attrs.align === "center") {
- styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto";
- } else {
- styleObj.float = attrs.align;
- }
- } else {
- styleObj["text-align"] = attrs.align;
- }
- attrs.align = void 0;
- }
- if (attrs.dir) {
- styleObj.direction = attrs.dir;
- attrs.dir = void 0;
- }
- if (node2.name === "font") {
- if (attrs.color) {
- styleObj.color = attrs.color;
- attrs.color = void 0;
- }
- if (attrs.face) {
- styleObj["font-family"] = attrs.face;
- attrs.face = void 0;
- }
- if (attrs.size) {
- let size = parseInt(attrs.size);
- if (!isNaN(size)) {
- if (size < 1) {
- size = 1;
- } else if (size > 7) {
- size = 7;
- }
- styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1];
- }
- attrs.size = void 0;
- }
- }
- if ((attrs.class || "").includes("align-center")) {
- styleObj["text-align"] = "center";
- }
- Object.assign(styleObj, this.parseStyle(node2));
- if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) {
- styleObj["max-width"] = "100%";
- styleObj["box-sizing"] = "border-box";
- }
- if (config$1.blockTags[node2.name]) {
- if (!editable) {
- node2.name = "div";
- }
- } else if (!config$1.trustTags[node2.name] && !this.xml) {
- node2.name = "span";
- }
- if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") {
- this.expose();
- } else if (node2.name === "video") {
- if ((styleObj.height || "").includes("auto")) {
- styleObj.height = void 0;
- }
- let str = '<video style="width:100%;height:100%"';
- if (editable) {
- attrs.controls = "";
- }
- for (const item in attrs) {
- if (attrs[item]) {
- str += " " + item + '="' + attrs[item] + '"';
- }
- }
- if (this.options.pauseVideo) {
- 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()"`;
- }
- str += ">";
- for (let i = 0; i < node2.src.length; i++) {
- str += '<source src="' + node2.src[i] + '">';
- }
- str += "</video>";
- node2.html = str;
- } else if ((node2.name === "ul" || node2.name === "ol") && (node2.c || editable)) {
- const types2 = {
- a: "lower-alpha",
- A: "upper-alpha",
- i: "lower-roman",
- I: "upper-roman"
- };
- if (types2[attrs.type]) {
- attrs.style += ";list-style-type:" + types2[attrs.type];
- attrs.type = void 0;
- }
- for (let i = children.length; i--; ) {
- if (children[i].name === "li") {
- children[i].c = 1;
- }
- }
- } else if (node2.name === "table") {
- let padding = parseFloat(attrs.cellpadding);
- let spacing = parseFloat(attrs.cellspacing);
- const border = parseFloat(attrs.border);
- const bordercolor = styleObj["border-color"];
- const borderstyle = styleObj["border-style"];
- if (node2.c || editable) {
- if (isNaN(padding)) {
- padding = 2;
- }
- if (isNaN(spacing)) {
- spacing = 2;
- }
- }
- if (border) {
- attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`;
- }
- if (node2.flag && (node2.c || editable)) {
- styleObj.display = "grid";
- if (spacing) {
- styleObj["grid-gap"] = spacing + "px";
- styleObj.padding = spacing + "px";
- } else if (border) {
- attrs.style += ";border-left:0;border-top:0";
- }
- const width = [];
- const trList = [];
- const cells = [];
- const map = {};
- (function traversal(nodes) {
- for (let i = 0; i < nodes.length; i++) {
- if (nodes[i].name === "tr") {
- trList.push(nodes[i]);
- } else {
- traversal(nodes[i].children || []);
- }
- }
- })(children);
- for (let row = 1; row <= trList.length; row++) {
- let col = 1;
- for (let j = 0; j < trList[row - 1].children.length; j++) {
- const td = trList[row - 1].children[j];
- if (td.name === "td" || td.name === "th") {
- while (map[row + "." + col]) {
- col++;
- }
- if (editable) {
- td.r = row;
- }
- let style = td.attrs.style || "";
- const start = style.indexOf("width") ? style.indexOf(";width") : 0;
- if (start !== -1) {
- let end = style.indexOf(";", start + 6);
- if (end === -1) {
- end = style.length;
- }
- if (!td.attrs.colspan) {
- width[col] = style.substring(start ? start + 7 : 6, end);
- }
- style = style.substr(0, start) + style.substr(end);
- }
- style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style;
- if (td.attrs.colspan) {
- style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`;
- if (!td.attrs.rowspan) {
- style += `;grid-row-start:${row};grid-row-end:${row + 1}`;
- }
- col += parseInt(td.attrs.colspan) - 1;
- }
- if (td.attrs.rowspan) {
- style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`;
- if (!td.attrs.colspan) {
- style += `;grid-column-start:${col};grid-column-end:${col + 1}`;
- }
- for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
- for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
- map[row + rowspan + "." + (col - colspan)] = 1;
- }
- }
- }
- if (style) {
- td.attrs.style = style;
- }
- cells.push(td);
- col++;
- }
- }
- if (row === 1) {
- let temp = "";
- for (let i = 1; i < col; i++) {
- temp += (width[i] ? width[i] : "auto") + " ";
- }
- styleObj["grid-template-columns"] = temp;
- }
- }
- node2.children = cells;
- } else {
- if (node2.c || editable) {
- styleObj.display = "table";
- }
- if (!isNaN(spacing)) {
- styleObj["border-spacing"] = spacing + "px";
- }
- if (border || padding) {
- (function traversal(nodes) {
- for (let i = 0; i < nodes.length; i++) {
- const td = nodes[i];
- if (td.name === "th" || td.name === "td") {
- if (border) {
- td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`;
- }
- if (padding) {
- td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`;
- }
- } else if (td.children) {
- traversal(td.children);
- }
- }
- })(children);
- }
- }
- if (this.options.scrollTable && !(attrs.style || "").includes("inline")) {
- const table = Object.assign({}, node2);
- node2.name = "div";
- node2.attrs = {
- style: "overflow:auto"
- };
- node2.children = [table];
- attrs = table.attrs;
- }
- } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) {
- for (let i = this.stack.length; i--; ) {
- if (this.stack[i].name === "table") {
- this.stack[i].flag = 1;
- break;
- }
- }
- } else if (node2.name === "ruby") {
- node2.name = "span";
- for (let i = 0; i < children.length - 1; i++) {
- if (children[i].type === "text" && children[i + 1].name === "rt") {
- children[i] = {
- name: "div",
- attrs: {
- style: "display:inline-block;text-align:center"
- },
- children: [{
- name: "div",
- attrs: {
- style: "font-size:50%;" + (children[i + 1].attrs.style || "")
- },
- children: children[i + 1].children
- }, children[i]]
- };
- children.splice(i + 1, 1);
- }
- }
- } else if (!editable && node2.c) {
- (function traversal(node3) {
- node3.c = 2;
- for (let i = node3.children.length; i--; ) {
- const child = node3.children[i];
- if (child.name && (config$1.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) {
- traversal(child);
- }
- if (!child.c || child.name === "table") {
- node3.c = 1;
- }
- }
- })(node2);
- }
- if ((styleObj.display || "").includes("flex") && !(node2.c || editable)) {
- for (let i = children.length; i--; ) {
- const item = children[i];
- if (item.f) {
- item.attrs.style = (item.attrs.style || "") + item.f;
- item.f = void 0;
- }
- }
- }
- const flex = parent && ((parent.attrs.style || "").includes("flex") || (parent.attrs.style || "").includes("grid")) && !node2.c;
- if (flex) {
- node2.f = ";max-width:100%";
- }
- if (children.length >= 50 && (node2.c || editable) && !(styleObj.display || "").includes("flex")) {
- mergeNodes(children);
- }
- for (const key in styleObj) {
- if (styleObj[key]) {
- const val = `;${key}:${styleObj[key].replace(" !important", "")}`;
- if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) {
- node2.f += val;
- if (key === "width") {
- attrs.style += ";width:100%";
- }
- } else {
- attrs.style += val;
- }
- }
- }
- attrs.style = attrs.style.substr(1) || void 0;
- };
- Parser.prototype.onText = function(text) {
- if (!this.pre) {
- let trim2 = "";
- let flag2;
- for (let i = 0, len = text.length; i < len; i++) {
- if (!blankChar[text[i]]) {
- trim2 += text[i];
- } else {
- if (trim2[trim2.length - 1] !== " ") {
- trim2 += " ";
- }
- if (text[i] === "\n" && !flag2) {
- flag2 = true;
- }
- }
- }
- if (trim2 === " ") {
- if (flag2)
- return;
- else {
- const parent = this.stack[this.stack.length - 1];
- if (parent && parent.name[0] === "t")
- return;
- }
- }
- text = trim2;
- }
- const node2 = /* @__PURE__ */ Object.create(null);
- node2.type = "text";
- node2.text = decodeEntity(text);
- if (this.hook(node2)) {
- const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
- siblings.push(node2);
- }
- };
- function Lexer(handler) {
- this.handler = handler;
- }
- Lexer.prototype.parse = function(content) {
- this.content = content || "";
- this.i = 0;
- this.start = 0;
- this.state = this.text;
- for (let len = this.content.length; this.i !== -1 && this.i < len; ) {
- this.state();
- }
- };
- Lexer.prototype.checkClose = function(method) {
- const selfClose = this.content[this.i] === "/";
- if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") {
- if (method) {
- this.handler[method](this.content.substring(this.start, this.i));
- }
- this.i += selfClose ? 2 : 1;
- this.start = this.i;
- this.handler.onOpenTag(selfClose);
- if (this.handler.tagName === "script") {
- this.i = this.content.indexOf("</", this.i);
- if (this.i !== -1) {
- this.i += 2;
- this.start = this.i;
- }
- this.state = this.endTag;
- } else {
- this.state = this.text;
- }
- return true;
- }
- return false;
- };
- Lexer.prototype.text = function() {
- this.i = this.content.indexOf("<", this.i);
- if (this.i === -1) {
- if (this.start < this.content.length) {
- this.handler.onText(this.content.substring(this.start, this.content.length));
- }
- return;
- }
- const c = this.content[this.i + 1];
- if (c >= "a" && c <= "z" || c >= "A" && c <= "Z") {
- if (this.start !== this.i) {
- this.handler.onText(this.content.substring(this.start, this.i));
- }
- this.start = ++this.i;
- this.state = this.tagName;
- } else if (c === "/" || c === "!" || c === "?") {
- if (this.start !== this.i) {
- this.handler.onText(this.content.substring(this.start, this.i));
- }
- const next = this.content[this.i + 2];
- if (c === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) {
- this.i += 2;
- this.start = this.i;
- this.state = this.endTag;
- return;
- }
- let end = "-->";
- if (c !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") {
- end = ">";
- }
- this.i = this.content.indexOf(end, this.i);
- if (this.i !== -1) {
- this.i += end.length;
- this.start = this.i;
- }
- } else {
- this.i++;
- }
- };
- Lexer.prototype.tagName = function() {
- if (blankChar[this.content[this.i]]) {
- this.handler.onTagName(this.content.substring(this.start, this.i));
- while (blankChar[this.content[++this.i]])
- ;
- if (this.i < this.content.length && !this.checkClose()) {
- this.start = this.i;
- this.state = this.attrName;
- }
- } else if (!this.checkClose("onTagName")) {
- this.i++;
- }
- };
- Lexer.prototype.attrName = function() {
- let c = this.content[this.i];
- if (blankChar[c] || c === "=") {
- this.handler.onAttrName(this.content.substring(this.start, this.i));
- let needVal = c === "=";
- const len = this.content.length;
- while (++this.i < len) {
- c = this.content[this.i];
- if (!blankChar[c]) {
- if (this.checkClose())
- return;
- if (needVal) {
- this.start = this.i;
- this.state = this.attrVal;
- return;
- }
- if (this.content[this.i] === "=") {
- needVal = true;
- } else {
- this.start = this.i;
- this.state = this.attrName;
- return;
- }
- }
- }
- } else if (!this.checkClose("onAttrName")) {
- this.i++;
- }
- };
- Lexer.prototype.attrVal = function() {
- const c = this.content[this.i];
- const len = this.content.length;
- if (c === '"' || c === "'") {
- this.start = ++this.i;
- this.i = this.content.indexOf(c, this.i);
- if (this.i === -1)
- return;
- this.handler.onAttrVal(this.content.substring(this.start, this.i));
- } else {
- for (; this.i < len; this.i++) {
- if (blankChar[this.content[this.i]]) {
- this.handler.onAttrVal(this.content.substring(this.start, this.i));
- break;
- } else if (this.checkClose("onAttrVal"))
- return;
- }
- }
- while (blankChar[this.content[++this.i]])
- ;
- if (this.i < len && !this.checkClose()) {
- this.start = this.i;
- this.state = this.attrName;
- }
- };
- Lexer.prototype.endTag = function() {
- const c = this.content[this.i];
- if (blankChar[c] || c === ">" || c === "/") {
- this.handler.onCloseTag(this.content.substring(this.start, this.i));
- if (c !== ">") {
- this.i = this.content.indexOf(">", this.i);
- if (this.i === -1)
- return;
- }
- this.start = ++this.i;
- this.state = this.text;
- } else {
- this.i++;
- }
- };
- const config = {
- // 普通标签的菜单项
- node: ["大小", "斜体", "粗体", "下划线", "居中", "缩进", "上移", "下移", "删除"],
- // 图片的菜单项
- img: ["换图", "宽度", "超链接", "预览图", "禁用预览", "上移", "下移", "删除"],
- // 链接的菜单项
- link: ["更换链接", "上移", "下移", "删除"],
- // 音视频的菜单项
- media: ["封面", "循环", "自动播放", "上移", "下移", "删除"]
- };
- function Editable(vm) {
- this.vm = vm;
- this.editHistory = [];
- this.editI = -1;
- vm._mask = [];
- vm._setData = function(path, val) {
- const paths = path.split(".");
- let target = vm;
- for (let i = 0; i < paths.length - 1; i++) {
- target = target[paths[i]];
- }
- vm.$set(target, paths.pop(), val);
- };
- const move = (num) => {
- setTimeout(() => {
- const item = this.editHistory[this.editI + num];
- if (item) {
- this.editI += num;
- vm._setData(item.key, item.value);
- }
- }, 200);
- };
- vm.undo = () => move(-1);
- vm.redo = () => move(1);
- vm._editVal = (path, oldVal, newVal, set) => {
- while (this.editI < this.editHistory.length - 1) {
- this.editHistory.pop();
- }
- while (this.editHistory.length > 30) {
- this.editHistory.pop();
- this.editI--;
- }
- const last = this.editHistory[this.editHistory.length - 1];
- if (!last || last.key !== path) {
- if (last) {
- this.editHistory.pop();
- this.editI--;
- }
- this.editHistory.push({
- key: path,
- value: oldVal
- });
- this.editI++;
- }
- this.editHistory.push({
- key: path,
- value: newVal
- });
- this.editI++;
- if (set) {
- vm._setData(path, newVal);
- }
- };
- vm._getItem = function(node2, up, down) {
- let items;
- let i;
- if (node2.name === "img") {
- items = config.img.slice(0);
- if (!vm.getSrc) {
- i = items.indexOf("换图");
- if (i !== -1) {
- items.splice(i, 1);
- }
- i = items.indexOf("超链接");
- if (i !== -1) {
- items.splice(i, 1);
- }
- i = items.indexOf("预览图");
- if (i !== -1) {
- items.splice(i, 1);
- }
- }
- i = items.indexOf("禁用预览");
- if (i !== -1 && node2.attrs.ignore) {
- items[i] = "启用预览";
- }
- } else if (node2.name === "a") {
- items = config.link.slice(0);
- if (!vm.getSrc) {
- i = items.indexOf("更换链接");
- if (i !== -1) {
- items.splice(i, 1);
- }
- }
- } else if (node2.name === "video" || node2.name === "audio") {
- items = config.media.slice(0);
- i = items.indexOf("封面");
- if (!vm.getSrc && i !== -1) {
- items.splice(i, 1);
- }
- i = items.indexOf("循环");
- if (node2.attrs.loop && i !== -1) {
- items[i] = "不循环";
- }
- i = items.indexOf("自动播放");
- if (node2.attrs.autoplay && i !== -1) {
- items[i] = "不自动播放";
- }
- } else {
- items = config.node.slice(0);
- }
- if (!up) {
- i = items.indexOf("上移");
- if (i !== -1) {
- items.splice(i, 1);
- }
- }
- if (!down) {
- i = items.indexOf("下移");
- if (i !== -1) {
- items.splice(i, 1);
- }
- }
- return items;
- };
- vm._tooltip = function(obj) {
- vm.$set(vm, "tooltip", {
- top: obj.top,
- items: obj.items
- });
- vm._tooltipcb = obj.success;
- };
- vm._slider = function(obj) {
- vm.$set(vm, "slider", {
- min: obj.min,
- max: obj.max,
- value: obj.value,
- top: obj.top
- });
- vm._slideringcb = obj.changing;
- vm._slidercb = obj.change;
- };
- vm._maskTap = function() {
- while (vm._mask.length) {
- vm._mask.pop()();
- }
- if (vm.tooltip) {
- vm.$set(vm, "tooltip", null);
- }
- if (vm.slider) {
- vm.$set(vm, "slider", null);
- }
- };
- function insert(node2) {
- if (vm._edit) {
- vm._edit.insert(node2);
- } else {
- const nodes = vm.nodes.slice(0);
- nodes.push(node2);
- vm._editVal("nodes", vm.nodes, nodes, true);
- }
- }
- vm.insertHtml = (html) => {
- this.inserting = true;
- const arr = new Parser(vm).parse(html);
- this.inserting = void 0;
- for (let i = 0; i < arr.length; i++) {
- insert(arr[i]);
- }
- };
- vm.insertImg = function() {
- vm.getSrc && vm.getSrc("img").then((src) => {
- if (typeof src === "string") {
- src = [src];
- }
- const parser = new Parser(vm);
- for (let i = 0; i < src.length; i++) {
- insert({
- name: "img",
- attrs: {
- src: parser.getUrl(src[i])
- }
- });
- }
- }).catch(() => {
- });
- };
- vm.insertLink = function() {
- vm.getSrc && vm.getSrc("link").then((url2) => {
- insert({
- name: "a",
- attrs: {
- href: url2
- },
- children: [{
- type: "text",
- text: url2
- }]
- });
- }).catch(() => {
- });
- };
- vm.insertTable = function(rows, cols) {
- const table = {
- name: "table",
- attrs: {
- style: "display:table;width:100%;margin:10px 0;text-align:center;border-spacing:0;border-collapse:collapse;border:1px solid gray"
- },
- children: []
- };
- for (let i = 0; i < rows; i++) {
- const tr = {
- name: "tr",
- attrs: {},
- children: []
- };
- for (let j = 0; j < cols; j++) {
- tr.children.push({
- name: "td",
- attrs: {
- style: "padding:2px;border:1px solid gray"
- },
- children: [{
- type: "text",
- text: ""
- }]
- });
- }
- table.children.push(tr);
- }
- insert(table);
- };
- function insertMedia(node2) {
- if (typeof node2.src === "string") {
- node2.src = [node2.src];
- }
- const parser = new Parser(vm);
- for (let i = 0; i < node2.src.length; i++) {
- node2.src[i] = parser.getUrl(node2.src[i]);
- }
- insert({
- name: "div",
- attrs: {
- style: "text-align:center"
- },
- children: [node2]
- });
- }
- vm.insertVideo = function() {
- vm.getSrc && vm.getSrc("video").then((src) => {
- insertMedia({
- name: "video",
- attrs: {
- controls: "T"
- },
- children: [],
- src,
- html: `<video src="${src}" style="width:100%;height:100%"></video>`
- });
- }).catch(() => {
- });
- };
- vm.insertAudio = function() {
- vm.getSrc && vm.getSrc("audio").then((attrs) => {
- let src;
- if (attrs.src) {
- src = attrs.src;
- attrs.src = void 0;
- } else {
- src = attrs;
- attrs = {};
- }
- attrs.controls = "T";
- insertMedia({
- name: "audio",
- attrs,
- children: [],
- src
- });
- }).catch(() => {
- });
- };
- vm.insertText = function() {
- insert({
- name: "p",
- attrs: {},
- children: [{
- type: "text",
- text: ""
- }]
- });
- };
- vm.clear = function() {
- vm._maskTap();
- vm._edit = void 0;
- vm.$set(vm, "nodes", [{
- name: "p",
- attrs: {},
- children: [{
- type: "text",
- text: ""
- }]
- }]);
- };
- vm.getContent = function() {
- let html = "";
- (function traversal(nodes, table) {
- for (let i = 0; i < nodes.length; i++) {
- let item = nodes[i];
- if (item.type === "text") {
- html += item.text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br>").replace(/\xa0/g, " ");
- } else {
- if (item.name === "img") {
- item.attrs.i = "";
- if ((item.attrs.src || "").includes("data:image/svg+xml;utf8,")) {
- html += item.attrs.src.substr(24).replace(/%23/g, "#").replace("<svg", '<svg style="' + (item.attrs.style || "") + '"');
- continue;
- }
- } else if (item.name === "video" || item.name === "audio") {
- item = JSON.parse(JSON.stringify(item));
- if (item.src.length > 1) {
- item.children = [];
- for (let j = 0; j < item.src.length; j++) {
- item.children.push({
- name: "source",
- attrs: {
- src: item.src[j]
- }
- });
- }
- } else {
- item.attrs.src = item.src[0];
- }
- } else if (item.name === "div" && (item.attrs.style || "").includes("overflow:auto") && (item.children[0] || {}).name === "table") {
- item = item.children[0];
- }
- if (item.name === "table") {
- item = JSON.parse(JSON.stringify(item));
- table = item.attrs;
- if ((item.attrs.style || "").includes("display:grid")) {
- item.attrs.style = item.attrs.style.split("display:grid")[0];
- const children = [{
- name: "tr",
- attrs: {},
- children: []
- }];
- for (let j = 0; j < item.children.length; j++) {
- item.children[j].attrs.style = item.children[j].attrs.style.replace(/grid-[^;]+;*/g, "");
- if (item.children[j].r !== children.length) {
- children.push({
- name: "tr",
- attrs: {},
- children: [item.children[j]]
- });
- } else {
- children[children.length - 1].children.push(item.children[j]);
- }
- }
- item.children = children;
- }
- }
- html += "<" + item.name;
- for (const attr in item.attrs) {
- let val = item.attrs[attr];
- if (!val)
- continue;
- if (val === "T" || val === true) {
- html += " " + attr;
- continue;
- } else if (item.name[0] === "t" && attr === "style" && table) {
- val = val.replace(/;*display:table[^;]*/, "");
- if (table.border) {
- val = val.replace(/border[^;]+;*/g, ($) => $.includes("collapse") ? $ : "");
- }
- if (table.cellpadding) {
- val = val.replace(/padding[^;]+;*/g, "");
- }
- if (!val)
- continue;
- }
- html += " " + attr + '="' + val.replace(/"/g, """) + '"';
- }
- html += ">";
- if (item.children) {
- traversal(item.children, table);
- html += "</" + item.name + ">";
- }
- }
- }
- })(vm.nodes);
- for (let i = vm.plugins.length; i--; ) {
- if (vm.plugins[i].onGetContent) {
- html = vm.plugins[i].onGetContent(html) || html;
- }
- }
- return html;
- };
- }
- Editable.prototype.onUpdate = function(content, config2) {
- if (this.vm.editable) {
- this.vm._maskTap();
- config2.entities.amp = "&";
- if (!this.inserting) {
- this.vm._edit = void 0;
- if (!content) {
- setTimeout(() => {
- this.vm.$set(this.vm, "nodes", [{
- name: "p",
- attrs: {},
- children: [{
- type: "text",
- text: ""
- }]
- }]);
- }, 0);
- }
- }
- }
- };
- Editable.prototype.onParse = function(node2) {
- if (this.vm.editable && (node2.name === "td" || node2.name === "th") && !this.vm.getText(node2.children)) {
- node2.children.push({
- type: "text",
- text: ""
- });
- }
- };
- const plugins = [Editable];
- const _sfc_main$A = {
- name: "mp-html",
- data() {
- return {
- tooltip: null,
- slider: null,
- nodes: []
- };
- },
- props: {
- editable: Boolean,
- placeholder: String,
- containerStyle: {
- type: String,
- default: ""
- },
- content: {
- type: String,
- default: ""
- },
- copyLink: {
- type: [Boolean, String],
- default: true
- },
- domain: String,
- errorImg: {
- type: String,
- default: ""
- },
- lazyLoad: {
- type: [Boolean, String],
- default: false
- },
- loadingImg: {
- type: String,
- default: ""
- },
- pauseVideo: {
- type: [Boolean, String],
- default: true
- },
- previewImg: {
- type: [Boolean, String],
- default: true
- },
- scrollTable: [Boolean, String],
- selectable: [Boolean, String],
- setTitle: {
- type: [Boolean, String],
- default: true
- },
- showImgMenu: {
- type: [Boolean, String],
- default: true
- },
- tagStyle: Object,
- useAnchor: [Boolean, Number]
- },
- emits: ["load", "ready", "imgtap", "linktap", "play", "error"],
- components: {
- node
- },
- watch: {
- editable(val) {
- this.setContent(val ? this.content : this.getContent());
- if (!val)
- this._maskTap();
- },
- content(content) {
- this.setContent(content);
- }
- },
- created() {
- this.plugins = [];
- for (let i = plugins.length; i--; ) {
- this.plugins.push(new plugins[i](this));
- }
- },
- mounted() {
- if ((this.content || this.editable) && !this.nodes.length) {
- this.setContent(this.content);
- }
- },
- beforeDestroy() {
- this._hook("onDetached");
- clearInterval(this._timer);
- },
- methods: {
- _containTap() {
- if (!this._lock && !this.slider) {
- this._edit = void 0;
- this._maskTap();
- }
- },
- _tooltipTap(e) {
- this._tooltipcb(e.currentTarget.dataset.i);
- this.$set(this, "tooltip", null);
- },
- _sliderChanging(e) {
- this._slideringcb(e.detail.value);
- },
- _sliderChange(e) {
- this._slidercb(e.detail.value);
- },
- /**
- * @description 将锚点跳转的范围限定在一个 scroll-view 内
- * @param {Object} page scroll-view 所在页面的示例
- * @param {String} selector scroll-view 的选择器
- * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名
- */
- in(page2, selector, scrollTop) {
- if (page2 && selector && scrollTop) {
- this._in = {
- page: page2,
- selector,
- scrollTop
- };
- }
- },
- /**
- * @description 锚点跳转
- * @param {String} id 要跳转的锚点 id
- * @param {Number} offset 跳转位置的偏移量
- * @returns {Promise}
- */
- navigateTo(id, offset) {
- return new Promise((resolve, reject2) => {
- if (!this.useAnchor) {
- reject2(Error("Anchor is disabled"));
- return;
- }
- offset = offset || parseInt(this.useAnchor) || 0;
- let deep = " ";
- const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect();
- if (this._in) {
- selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect();
- } else {
- selector.selectViewport().scrollOffset();
- }
- selector.exec((res) => {
- if (!res[0]) {
- reject2(Error("Label not found"));
- return;
- }
- const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset;
- if (this._in) {
- this._in.page[this._in.scrollTop] = scrollTop;
- } else {
- uni.pageScrollTo({
- scrollTop,
- duration: 300
- });
- }
- resolve();
- });
- });
- },
- /**
- * @description 获取文本内容
- * @return {String}
- */
- getText(nodes) {
- let text = "";
- (function traversal(nodes2) {
- for (let i = 0; i < nodes2.length; i++) {
- const node2 = nodes2[i];
- if (node2.type === "text") {
- text += node2.text.replace(/&/g, "&");
- } else if (node2.name === "br") {
- text += "\n";
- } else {
- 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";
- if (isBlock && text && text[text.length - 1] !== "\n") {
- text += "\n";
- }
- if (node2.children) {
- traversal(node2.children);
- }
- if (isBlock && text[text.length - 1] !== "\n") {
- text += "\n";
- } else if (node2.name === "td" || node2.name === "th") {
- text += " ";
- }
- }
- }
- })(nodes || this.nodes);
- return text;
- },
- /**
- * @description 获取内容大小和位置
- * @return {Promise}
- */
- getRect() {
- return new Promise((resolve, reject2) => {
- uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject2(Error("Root label not found")));
- });
- },
- /**
- * @description 暂停播放媒体
- */
- pauseMedia() {
- for (let i = (this._videos || []).length; i--; ) {
- this._videos[i].pause();
- }
- const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()';
- let page2 = this.$parent;
- while (!page2.$scope)
- page2 = page2.$parent;
- page2.$scope.$getAppWebview().evalJS(command);
- },
- /**
- * @description 设置内容
- * @param {String} content html 内容
- * @param {Boolean} append 是否在尾部追加
- */
- setContent(content, append) {
- if (!append || !this.imgList) {
- this.imgList = [];
- }
- const nodes = new Parser(this).parse(content);
- this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes);
- this._videos = [];
- this.$nextTick(() => {
- this._hook("onLoad");
- this.$emit("load");
- });
- let height;
- clearInterval(this._timer);
- this._timer = setInterval(() => {
- this.getRect().then((rect) => {
- if (rect.height === height) {
- this.$emit("ready", rect);
- clearInterval(this._timer);
- }
- height = rect.height;
- }).catch(() => {
- });
- }, 350);
- },
- /**
- * @description 调用插件钩子函数
- */
- _hook(name) {
- for (let i = plugins.length; i--; ) {
- if (this.plugins[i][name]) {
- this.plugins[i][name]();
- }
- }
- }
- }
- };
- function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_node = vue.resolveComponent("node");
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- id: "_root",
- class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"),
- style: vue.normalizeStyle(($props.editable ? "min-height:200px;" : "") + $props.containerStyle),
- onClick: _cache[3] || (_cache[3] = (...args) => $options._containTap && $options._containTap(...args))
- },
- [
- !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, {
- key: 1,
- childs: $data.nodes,
- opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable, $props.editable, $props.placeholder, "nodes"],
- name: "span"
- }, null, 8, ["childs", "opts"])),
- $data.tooltip ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "_tooltip_contain",
- style: vue.normalizeStyle("top:" + $data.tooltip.top + "px")
- },
- [
- vue.createElementVNode("view", { class: "_tooltip" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.tooltip.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "_tooltip_item",
- "data-i": index2,
- onClick: _cache[0] || (_cache[0] = (...args) => $options._tooltipTap && $options._tooltipTap(...args))
- }, vue.toDisplayString(item), 9, ["data-i"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true),
- $data.slider ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 3,
- class: "_slider",
- style: vue.normalizeStyle("top:" + $data.slider.top + "px")
- },
- [
- vue.createElementVNode("slider", {
- value: $data.slider.value,
- min: $data.slider.min,
- max: $data.slider.max,
- "handle-size": "14",
- "block-size": "14",
- "show-value": "",
- activeColor: "white",
- style: { "padding": "3px" },
- onChanging: _cache[1] || (_cache[1] = (...args) => $options._sliderChanging && $options._sliderChanging(...args)),
- onChange: _cache[2] || (_cache[2] = (...args) => $options._sliderChange && $options._sliderChange(...args))
- }, null, 40, ["value", "min", "max"])
- ],
- 4
- /* STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ],
- 6
- /* CLASS, STYLE */
- );
- }
- 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"]]);
- const _sfc_main$z = {
- components: {
- mpHtml
- },
- data() {
- return {
- type: null,
- content: ""
- };
- },
- onLoad(options) {
- this.type = options.type;
- if (this.type == "doctorAgreement") {
- uni.setNavigationBarTitle({
- title: "入驻协议"
- });
- }
- if (this.type == "userRegister") {
- uni.setNavigationBarTitle({
- title: "用户协议"
- });
- }
- if (this.type == "userPrivacy") {
- uni.setNavigationBarTitle({
- title: "隐私协议"
- });
- }
- this.getConfig();
- },
- methods: {
- getConfig() {
- var data = { key: "his.agreementConfig" };
- getConfigByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (this.type == "doctorRegister") {
- this.content = JSON.parse(res.data).doctorRegister;
- } else if (this.type == "doctorFiling") {
- this.content = JSON.parse(res.data).doctorFiling;
- } else if (this.type == "userRegister") {
- this.content = JSON.parse(res.data).userRegister;
- } else if (this.type == "userPrivacy") {
- this.content = JSON.parse(res.data).userPrivacy;
- }
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mp_html = vue.resolveComponent("mp-html");
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createVNode(_component_mp_html, { content: $data.content }, null, 8, ["content"])
- ]);
- }
- 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"]]);
- const _sfc_main$y = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- hosLevelOptions: [],
- tabs: [
- {
- index: 1,
- name: "关注医生"
- },
- {
- index: 2,
- name: "签约医生"
- }
- ],
- type: 0,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad(options) {
- this.getDictByKey("sys_hospital_level");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_hospital_level") {
- this.hosLevelOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- typeChange(item) {
- this.type = item.index;
- formatAppLog("log", "at pages_user/myDoctorList.vue:138", this.type);
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- type: this.type + 1,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMyDoctorList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.prices = JSON.parse(value2.priceJson);
- });
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- current: $data.type,
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.typeChange
- }, null, 8, ["current", "list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "doctors" }, [
- vue.createElementVNode("view", { class: "doctor-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "doctor",
- onClick: ($event) => $options.navTo("/pages_doctor/doctorDetails?doctorId=" + item.doctorId)
- }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "head-box" }, [
- vue.createElementVNode("image", {
- mode: "aspectFill",
- class: "doc-img",
- src: item.avatar
- }, null, 8, ["src"]),
- item.workStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "isline"
- }, [
- vue.createElementVNode("view", { class: "img" }, [
- vue.createElementVNode("image", { src: "/static/images/isline.png" }),
- vue.createElementVNode("view", { class: "name" }, "在线")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-position" },
- vue.toDisplayString(item.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-dept" },
- vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "hospital-box" }, [
- vue.createElementVNode("view", { class: "tag" }, [
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.$getDictLabelName($data.hosLevelOptions, item.hospitalLevel)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.hospitalName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-spec" }, [
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(item.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "doc-count" }, [
- vue.createElementVNode("view", { class: "name" }, "好评:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.pingStar) + "分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "接诊量:"),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.pingStar),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "name" }, "平均响应:"),
- vue.createElementVNode("view", { class: "count" })
- ]),
- vue.createElementVNode("view", { class: "doc-price" }, [
- vue.createElementVNode("view", { class: "btn" }, [
- vue.createTextVNode(" 咨询医生¥ "),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.prices, (price, index3) => {
- return vue.openBlock(), vue.createElementBlock("text", null, [
- vue.createTextVNode(
- vue.toDisplayString(price.price.toFixed(2)) + " ",
- 1
- /* TEXT */
- ),
- index3 == 0 ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "/")) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- let request$3 = new Request$1().http;
- function getPatientList() {
- return request$3("/app/patient/getPatientList", null, "GET");
- }
- function getPatientById(data) {
- return request$3("/app/patient/getPatientById", data, "GET");
- }
- function delPatient(data) {
- return request$3("/app/patient/delPatient", data, "POST", "application/json;charset=UTF-8");
- }
- function addPatient(data) {
- return request$3("/app/patient/addPatient", data, "POST", "application/json;charset=UTF-8");
- }
- function editPatient(data) {
- return request$3("/app/patient/editPatient", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$x = {
- data() {
- return {
- patient: []
- };
- },
- onLoad() {
- this.getPatientList();
- uni.$on("refreshPatient", () => {
- this.getPatientList();
- });
- },
- methods: {
- selectPatient(item) {
- uni.$emit("refreshOrderPatient", item);
- uni.navigateBack({
- delta: 1
- });
- },
- editPatient(item) {
- uni.navigateTo({
- url: "./addEditPatient?type=edit&patientId=" + item.patientId
- });
- },
- delPatient(item) {
- uni.showModal({
- title: "提示",
- content: "确认删除吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { patientId: item.patientId };
- delPatient(data).then(
- (res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- this.getPatientList();
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- getPatientList() {
- getPatientList().then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- this.patient = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- addPatient() {
- uni.navigateTo({
- url: "./addEditPatient?type=add"
- });
- }
- }
- };
- function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.patient, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- onClick: vue.withModifiers(($event) => $options.selectPatient(item), ["stop"]),
- class: "peop-item"
- }, [
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.patientName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "detail" }, [
- item.sex == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "男")) : vue.createCommentVNode("v-if", true),
- item.sex == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "女")) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getAge(item.birthday)) + "岁",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$parseIdCard(item.idCard)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "operat-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/del.png",
- mode: "",
- onClick: vue.withModifiers(($event) => $options.delPatient(item), ["stop"])
- }, null, 8, ["onClick"]),
- vue.createElementVNode("image", {
- src: "/static/images/edit.png",
- mode: "",
- onClick: vue.withModifiers(($event) => $options.editPatient(item), ["stop"])
- }, null, 8, ["onClick"])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- $data.patient.length == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "no-data-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.getPatientList())
- }, [
- vue.createElementVNode("image", {
- src: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- mode: "aspectFit"
- }),
- vue.createElementVNode("view", { class: "empty-title" }, "暂无数据")
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[1] || (_cache[1] = (...args) => $options.addPatient && $options.addPatient(...args))
- }, "创建就诊人")
- ])
- ]);
- }
- const Pages_userPatient = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/patient.vue"]]);
- const props = {
- props: {
- // 标签类型info、primary、success、warning、error
- type: {
- type: String,
- default: props$y.tag.type
- },
- // 不可用
- disabled: {
- type: [Boolean, String],
- default: props$y.tag.disabled
- },
- // 标签的大小,large,medium,mini
- size: {
- type: String,
- default: props$y.tag.size
- },
- // tag的形状,circle(两边半圆形), square(方形,带圆角)
- shape: {
- type: String,
- default: props$y.tag.shape
- },
- // 标签文字
- text: {
- type: [String, Number],
- default: props$y.tag.text
- },
- // 背景颜色,默认为空字符串,即不处理
- bgColor: {
- type: String,
- default: props$y.tag.bgColor
- },
- // 标签字体颜色,默认为空字符串,即不处理
- color: {
- type: String,
- default: props$y.tag.color
- },
- // 标签的边框颜色
- borderColor: {
- type: String,
- default: props$y.tag.borderColor
- },
- // 关闭按钮图标的颜色
- closeColor: {
- type: String,
- default: props$y.tag.closeColor
- },
- // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
- name: {
- type: [String, Number],
- default: props$y.tag.name
- },
- // // 模式选择,dark|light|plain
- // mode: {
- // type: String,
- // default: 'light'
- // },
- // 镂空时是否填充背景色
- plainFill: {
- type: Boolean,
- default: props$y.tag.plainFill
- },
- // 是否镂空
- plain: {
- type: Boolean,
- default: props$y.tag.plain
- },
- // 是否可关闭
- closable: {
- type: Boolean,
- default: props$y.tag.closable
- },
- // 是否显示
- show: {
- type: Boolean,
- default: props$y.tag.show
- },
- // 内置图标,或绝对路径的图片
- icon: {
- type: String,
- default: props$y.tag.icon
- }
- }
- };
- const _sfc_main$w = {
- name: "u-tag",
- mixins: [mpMixin, mixin, props],
- data() {
- return {};
- },
- computed: {
- style() {
- const style = {};
- if (this.bgColor) {
- style.backgroundColor = this.bgColor;
- }
- if (this.color) {
- style.color = this.color;
- }
- if (this.borderColor) {
- style.borderColor = this.borderColor;
- }
- return style;
- },
- // nvue下,文本颜色无法继承父元素
- textColor() {
- const style = {};
- if (this.color) {
- style.color = this.color;
- }
- return style;
- },
- imgStyle() {
- const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
- return {
- width,
- height: width
- };
- },
- // 文本的样式
- closeSize() {
- const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
- return size;
- },
- // 图标大小
- iconSize() {
- const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
- return size;
- },
- // 图标颜色
- elIconColor() {
- return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
- }
- },
- methods: {
- // 点击关闭按钮
- closeHandler() {
- this.$emit("close", this.name);
- },
- // 点击标签
- clickHandler() {
- this.$emit("click", this.name);
- }
- }
- };
- function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$a);
- const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_1$4);
- return vue.openBlock(), vue.createBlock(_component_u_transition, {
- mode: "fade",
- show: _ctx.show,
- style: { "display": "inline-flex" }
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "u-tag-wrapper" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["u-tag", [`u-tag--${_ctx.shape}`, !_ctx.plain && `u-tag--${_ctx.type}`, _ctx.plain && `u-tag--${_ctx.type}--plain`, `u-tag--${_ctx.size}`, _ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`]]),
- onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])),
- style: vue.normalizeStyle([{
- marginRight: _ctx.closable ? "10px" : 0,
- marginTop: _ctx.closable ? "10px" : 0
- }, $options.style])
- },
- [
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
- _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "u-tag__icon"
- }, [
- _ctx.$u.test.image(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: _ctx.icon,
- style: vue.normalizeStyle([$options.imgStyle])
- }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_icon, {
- key: 1,
- color: $options.elIconColor,
- name: _ctx.icon,
- size: $options.iconSize
- }, null, 8, ["color", "name", "size"]))
- ])) : vue.createCommentVNode("v-if", true)
- ], true),
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]),
- style: vue.normalizeStyle([$options.textColor])
- },
- vue.toDisplayString(_ctx.text),
- 7
- /* TEXT, CLASS, STYLE */
- )
- ],
- 6
- /* CLASS, STYLE */
- ),
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]),
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])),
- style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor })
- },
- [
- vue.createVNode(_component_u_icon, {
- name: "close",
- size: $options.closeSize,
- color: "#ffffff"
- }, null, 8, ["size"])
- ],
- 6
- /* CLASS, STYLE */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- _: 3
- /* FORWARDED */
- }, 8, ["show"]);
- }
- const __easycom_2 = /* @__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"]]);
- const _sfc_main$v = {
- data() {
- return {
- relationShow: false,
- relations: [
- {
- name: "本人"
- },
- {
- name: "配偶"
- },
- {
- name: "父母"
- },
- {
- name: "子女"
- },
- {
- name: "朋友"
- },
- {
- name: "亲戚"
- },
- {
- name: "其他"
- }
- ],
- historyAllergics: [
- {
- name: "阿司匹林",
- checked: 0
- },
- {
- name: "磺胺类",
- checked: 0
- },
- {
- name: "头孢类",
- checked: 0
- },
- {
- name: "青毒素类",
- checked: 0
- },
- {
- name: "奶制品",
- checked: 0
- },
- {
- name: "其他",
- checked: 0
- }
- ],
- selfMedHistorys: [
- {
- name: "糖尿病",
- checked: 0
- },
- {
- name: "哮喘",
- checked: 0
- },
- {
- name: "恶性肿瘤",
- checked: 0
- },
- {
- name: "高血压",
- checked: 0
- },
- {
- name: "其他",
- checked: 0
- }
- ],
- familyMedHistorys: [
- {
- name: "糖尿病",
- checked: 0
- },
- {
- name: "哮喘",
- checked: 0
- },
- {
- name: "恶性肿瘤",
- checked: 0
- },
- {
- name: "高血压",
- checked: 0
- },
- {
- name: "其他",
- checked: 0
- }
- ],
- type: null,
- patientId: null,
- form: {
- sex: 1,
- birthday: "",
- idCard: "",
- relation: "",
- // 与本人关系
- liverUnusual: "正常",
- // 肝功能是否异常
- renalUnusual: "正常",
- // 肾功能是否异常
- historyAllergic: "无",
- // 过敏史
- familyMedHistory: "无",
- // 家族病史
- selfMedHistory: "无"
- // 个人病史
- }
- };
- },
- onLoad(option) {
- this.type = option.type;
- if (this.type == "edit") {
- this.patientId = option.patientId;
- this.getPatientById();
- uni.setNavigationBarTitle({
- title: "编辑就诊人"
- });
- } else {
- uni.setNavigationBarTitle({
- title: "新增就诊人"
- });
- }
- },
- methods: {
- liverUnusualChange(item) {
- formatAppLog("log", "at pages_user/addEditPatient.vue:289", item);
- this.form.liverUnusual = item.detail.value;
- },
- renalUnusualChange(item) {
- formatAppLog("log", "at pages_user/addEditPatient.vue:293", item);
- this.form.renalUnusual = item.detail.value;
- },
- historyAllergicOptionChange(item) {
- item.checked = item.checked == 1 ? 0 : 1;
- },
- selfMedHistoryOptionChange(item) {
- item.checked = item.checked == 1 ? 0 : 1;
- },
- familyMedHistoryOptionChange(item) {
- item.checked = item.checked == 1 ? 0 : 1;
- },
- historyAllergicChange(item) {
- formatAppLog("log", "at pages_user/addEditPatient.vue:306", item);
- this.form.historyAllergic = item.detail.value;
- },
- selfMedHistoryChange(item) {
- formatAppLog("log", "at pages_user/addEditPatient.vue:310", item);
- this.form.selfMedHistory = item.detail.value;
- },
- familyMedHistoryChange(item) {
- formatAppLog("log", "at pages_user/addEditPatient.vue:314", item);
- this.form.familyMedHistory = item.detail.value;
- },
- relationSelect(e) {
- this.form.relation = e.name;
- },
- idcardChange() {
- if (this.form.idCard.length == 18) {
- var json = this.$parseIDCardInfo(this.form.idCard);
- this.form.birthday = json.birthday;
- formatAppLog("log", "at pages_user/addEditPatient.vue:324", json);
- }
- },
- genderChange(type2) {
- this.form.sex = type2;
- },
- getPatientById() {
- var data = { patientId: this.patientId };
- getPatientById(data).then(
- (res) => {
- if (res.code == 200) {
- this.form = res.data;
- this.date = this.form.birthday;
- if (this.form.historyAllergic != null && this.form.historyAllergic != "无") {
- var options = this.form.historyAllergic.split(",");
- this.historyAllergics.forEach((item) => {
- for (var i = 0; i < options.length; i++) {
- if (item.name == options[i]) {
- item.checked = 1;
- }
- }
- });
- this.form.historyAllergic = "有";
- }
- if (this.form.selfMedHistory != null && this.form.selfMedHistory != "无") {
- var options = this.form.selfMedHistory.split(",");
- this.selfMedHistorys.forEach((item) => {
- for (var i = 0; i < options.length; i++) {
- if (item.name == options[i]) {
- item.checked = 1;
- }
- }
- });
- this.form.selfMedHistory = "有";
- }
- if (this.form.familyMedHistory != null && this.form.familyMedHistory != "无") {
- var options = this.form.familyMedHistory.split(",");
- this.familyMedHistorys.forEach((item) => {
- for (var i = 0; i < options.length; i++) {
- if (item.name == options[i]) {
- item.checked = 1;
- }
- }
- });
- this.form.familyMedHistory = "有";
- }
- } else {
- uni.showToast({
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- submit() {
- if (this.type == "add") {
- this.addPatient();
- } else if (this.type == "edit") {
- this.editPatient();
- }
- },
- editPatient() {
- var data = {
- patientId: this.patientId,
- patientName: this.form.patientName,
- mobile: this.form.mobile,
- sex: this.form.sex,
- birthday: this.form.birthday,
- idCard: this.form.idCard,
- relation: this.form.relation,
- // 与本人关系
- liverUnusual: this.form.liverUnusual,
- // 肝功能是否异常
- renalUnusual: this.form.renalUnusual
- // 肾功能是否异常
- };
- if (this.form.historyAllergic == "有") {
- var options = [];
- this.historyAllergics.forEach((item) => {
- if (item.checked == 1) {
- options.push(item.name);
- }
- });
- data.historyAllergic = options.toString();
- } else {
- data.historyAllergic = this.form.historyAllergic;
- }
- if (this.form.selfMedHistory == "有") {
- var options = [];
- this.selfMedHistorys.forEach((item) => {
- if (item.checked == 1) {
- options.push(item.name);
- }
- });
- data.selfMedHistory = options.toString();
- } else {
- data.selfMedHistory = this.form.selfMedHistory;
- }
- if (this.form.familyMedHistory == "有") {
- var options = [];
- this.familyMedHistorys.forEach((item) => {
- if (item.checked == 1) {
- options.push(item.name);
- }
- });
- data.familyMedHistory = options.toString();
- } else {
- data.familyMedHistory = this.form.familyMedHistory;
- }
- editPatient(data).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshPatient");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- addPatient() {
- var data = {
- patientName: this.form.patientName,
- mobile: this.form.mobile,
- sex: this.form.sex,
- birthday: this.form.birthday,
- idCard: this.form.idCard,
- relation: this.form.relation,
- // 与本人关系
- liverUnusual: this.form.liverUnusual,
- // 肝功能是否异常
- renalUnusual: this.form.renalUnusual
- // 肾功能是否异常
- };
- if (this.form.historyAllergic == "有") {
- var options = [];
- this.historyAllergics.forEach((item) => {
- if (item.checked == 1) {
- options.push(item.name);
- }
- });
- data.historyAllergic = options.toString();
- } else {
- data.historyAllergic = this.form.historyAllergic;
- }
- if (this.form.selfMedHistory == "有") {
- var options = [];
- this.selfMedHistorys.forEach((item) => {
- if (item.checked == 1) {
- options.push(item.name);
- }
- });
- data.selfMedHistory = options.toString();
- } else {
- data.selfMedHistory = this.form.selfMedHistory;
- }
- if (this.form.familyMedHistory == "有") {
- var options = [];
- this.familyMedHistorys.forEach((item) => {
- if (item.checked == 1) {
- options.push(item.name);
- }
- });
- data.familyMedHistory = options.toString();
- } else {
- data.familyMedHistory = this.form.familyMedHistory;
- }
- addPatient(data).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshPatient");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- // 出生日期选择
- birthdayChange: function(e) {
- this.form.birthday = e.target.value;
- }
- }
- };
- function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2);
- const _component_u_action_sheet = resolveEasycom(vue.resolveDynamicComponent("u-action-sheet"), __easycom_2$1);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createVNode(_component_u_alert, {
- title: "国家卫健委要求,就医行为必须实名登记",
- type: "info"
- }),
- vue.createElementVNode("view", { class: "form-box" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "姓名"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input-width",
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.patientName = $event),
- placeholder: "请输入真实姓名",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.patientName]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "性别"),
- vue.createElementVNode("radio-group", { style: { "display": "flex", "align-items": "center" } }, [
- vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
- vue.createElementVNode("radio", {
- onClick: _cache[1] || (_cache[1] = ($event) => $options.genderChange(1)),
- color: "#C39A58",
- value: "1",
- checked: $data.form.sex === 1,
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "男")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- onClick: _cache[2] || (_cache[2] = ($event) => $options.genderChange(2)),
- color: "#C39A58",
- value: "2",
- checked: $data.form.sex === 2,
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "女")
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "联系方式"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input-width",
- type: "phone",
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.form.mobile = $event),
- placeholder: "请输入联系方式",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.mobile]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "身份证号"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- class: "input-width",
- type: "idcard",
- onBlur: _cache[4] || (_cache[4] = ($event) => $options.idcardChange()),
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.form.idCard = $event),
- placeholder: "请输入身份证号",
- "placeholder-class": "form-input"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.idCard]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "出生年月"),
- vue.createElementVNode("picker", {
- value: $data.form.birthday,
- start: "1900-01-01",
- class: "birth-picker",
- mode: "date",
- onChange: _cache[6] || (_cache[6] = (...args) => $options.birthdayChange && $options.birthdayChange(...args))
- }, [
- vue.createElementVNode("view", { class: "right-box" }, [
- vue.createElementVNode("view", { class: "input-box" }, [
- vue.createElementVNode("input", {
- type: "text",
- value: $data.form.birthday,
- placeholder: "请选择出生年月",
- "placeholder-class": "form-input",
- disabled: "disabled"
- }, null, 8, ["value"])
- ]),
- vue.createElementVNode("image", {
- class: "arrow",
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ], 40, ["value"])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-box" }, [
- vue.createElementVNode("view", {
- class: "form-item",
- onClick: _cache[7] || (_cache[7] = ($event) => $data.relationShow = true)
- }, [
- vue.createElementVNode("text", { class: "label" }, "与本人关系"),
- vue.createElementVNode("view", { class: "right-box" }, [
- vue.createElementVNode("view", { class: "input-box" }, [
- vue.createElementVNode("input", {
- type: "text",
- value: $data.form.relation,
- placeholder: "请选择",
- "placeholder-class": "form-input",
- disabled: "disabled"
- }, null, 8, ["value"])
- ]),
- vue.createElementVNode("image", {
- class: "arrow",
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "form-box" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "肝功能"),
- vue.createElementVNode(
- "radio-group",
- {
- onChange: _cache[8] || (_cache[8] = (...args) => $options.liverUnusualChange && $options.liverUnusualChange(...args)),
- style: { "display": "flex", "align-items": "center" }
- },
- [
- vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "正常",
- checked: $data.form.liverUnusual === "正常",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "正常")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "异常",
- checked: $data.form.liverUnusual === "异常",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "异常")
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "肾功能"),
- vue.createElementVNode(
- "radio-group",
- {
- onChange: _cache[9] || (_cache[9] = (...args) => $options.renalUnusualChange && $options.renalUnusualChange(...args)),
- style: { "display": "flex", "align-items": "center" }
- },
- [
- vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "正常",
- checked: $data.form.renalUnusual === "正常",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "正常")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "异常",
- checked: $data.form.renalUnusual === "异常",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "异常")
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "过敏史"),
- vue.createElementVNode(
- "radio-group",
- {
- onChange: _cache[10] || (_cache[10] = (...args) => $options.historyAllergicChange && $options.historyAllergicChange(...args)),
- style: { "display": "flex", "align-items": "center", "justify-content": "flex-end", "margin": "5rpx 0rpx" }
- },
- [
- vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "无",
- checked: $data.form.historyAllergic === "无",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "无")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "有",
- checked: $data.form.historyAllergic === "有",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "有")
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]),
- $data.form.historyAllergic == "有" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "form-item"
- }, [
- vue.createElementVNode("view", {
- class: "option-box",
- style: { "margin": "5rpx 0rpx" }
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.historyAllergics, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [
- vue.createVNode(_component_u_tag, {
- onClick: ($event) => $options.historyAllergicOptionChange(item),
- borderColor: item.checked == 1 ? "#ffffff" : "#C39A58",
- bgColor: item.checked == 1 ? "#C39A58" : "#ffffff",
- color: item.checked == 1 ? "#ffffff" : "#C39A58",
- shape: "circle",
- text: item.name
- }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "个人病史"),
- vue.createElementVNode(
- "radio-group",
- {
- onChange: _cache[11] || (_cache[11] = (...args) => $options.selfMedHistoryChange && $options.selfMedHistoryChange(...args)),
- style: { "display": "flex", "align-items": "center" }
- },
- [
- vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "无",
- checked: $data.form.selfMedHistory === "无",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "无")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "有",
- checked: $data.form.selfMedHistory === "有",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "有")
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]),
- $data.form.selfMedHistory == "有" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "form-item"
- }, [
- vue.createElementVNode("view", {
- class: "option-box",
- style: { "margin": "5rpx 0rpx" }
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.selfMedHistorys, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [
- vue.createVNode(_component_u_tag, {
- onClick: ($event) => $options.selfMedHistoryOptionChange(item),
- borderColor: item.checked == 1 ? "#ffffff" : "#C39A58",
- bgColor: item.checked == 1 ? "#C39A58" : "#ffffff",
- color: item.checked == 1 ? "#ffffff" : "#C39A58",
- shape: "circle",
- text: item.name
- }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "家庭病史"),
- vue.createElementVNode(
- "radio-group",
- {
- onChange: _cache[12] || (_cache[12] = (...args) => $options.familyMedHistoryChange && $options.familyMedHistoryChange(...args)),
- style: { "display": "flex", "align-items": "center" }
- },
- [
- vue.createElementVNode("label", { style: { "margin-right": "30rpx" } }, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "无",
- checked: $data.form.familyMedHistory === "无",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "无")
- ]),
- vue.createElementVNode("label", null, [
- vue.createElementVNode("radio", {
- color: "#C39A58",
- value: "有",
- checked: $data.form.familyMedHistory === "有",
- style: { "margin-right": "16upx" }
- }, null, 8, ["checked"]),
- vue.createElementVNode("text", { class: "option-text" }, "有")
- ])
- ],
- 32
- /* NEED_HYDRATION */
- )
- ]),
- $data.form.familyMedHistory == "有" ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "form-item"
- }, [
- vue.createElementVNode("view", {
- class: "option-box",
- style: { "margin": "5rpx 0rpx" }
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.familyMedHistorys, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "option" }, [
- vue.createVNode(_component_u_tag, {
- onClick: ($event) => $options.familyMedHistoryOptionChange(item),
- borderColor: item.checked == 1 ? "#ffffff" : "#C39A58",
- bgColor: item.checked == 1 ? "#C39A58" : "#ffffff",
- color: item.checked == 1 ? "#ffffff" : "#C39A58",
- shape: "circle",
- text: item.name
- }, null, 8, ["onClick", "borderColor", "bgColor", "color", "text"])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[13] || (_cache[13] = ($event) => $options.submit())
- }, "保存就诊人")
- ]),
- vue.createVNode(_component_u_action_sheet, {
- show: $data.relationShow,
- actions: $data.relations,
- title: "请选择",
- onClose: _cache[14] || (_cache[14] = ($event) => $data.relationShow = false),
- onSelect: $options.relationSelect
- }, null, 8, ["show", "actions", "onSelect"])
- ]);
- }
- const Pages_userAddEditPatient = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/addEditPatient.vue"]]);
- const _sfc_main$u = {
- name: "UserCoupon",
- props: {},
- mixins: [MescrollMixin],
- // 使用mixin
- data: function() {
- return {
- tabs: [
- {
- id: 0,
- name: "待使用"
- },
- {
- id: 1,
- name: "已使用"
- },
- {
- id: 2,
- name: "已过期"
- }
- ],
- status: 0,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- watch: {},
- onShow() {
- },
- methods: {
- statusChange(item) {
- formatAppLog("log", "at pages_user/myCouponList.vue:96", item);
- this.status = item.id;
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getMyCouponList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- current: _ctx.status,
- scrollable: false,
- list: _ctx.tabs,
- lineColor: "#C39A58",
- onChange: $options.statusChange
- }, null, 8, ["current", "list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: _ctx.downOption,
- up: _ctx.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "coupon-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0fdd75d89db84458886d38e615011048.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- item.status != 0 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 1,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/d950e4c7af1e4464be1a7777e9dca576.png",
- mode: "widthFix"
- })) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { style: { "z-index": "999" } }, [
- vue.createTextVNode(" ¥"),
- item.price != null ? (vue.openBlock(), vue.createElementBlock(
- "span",
- {
- key: 0,
- class: "num"
- },
- vue.toDisplayString(item.price.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- item.minPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "pic-num"
- },
- "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "btns" }, [
- item.status == 0 || item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 0 },
- vue.toDisplayString(item.limitTime) + " 到期",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- { key: 1 },
- "使用时间 " + vue.toDisplayString(item.useTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "bnt gray"
- }, "已使用")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "bnt gray"
- }, "已过期")) : vue.createCommentVNode("v-if", true),
- item.status == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "btn"
- }, "可使用")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const _sfc_main$t = {
- data() {
- return {
- certs: []
- };
- },
- onLoad(val) {
- this.getConfigByKey();
- },
- methods: {
- getConfigByKey() {
- var data = { key: "his.certs" };
- getConfigByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.certs = JSON.parse(res.data).certs.split(",");
- }
- },
- (rej) => {
- }
- );
- },
- showImg(item) {
- var urls = [];
- urls.push(item);
- uni.previewImage({
- urls,
- current: 0
- });
- }
- }
- };
- function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "my-content" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.certs, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
- vue.createElementVNode("image", {
- onClick: ($event) => $options.showImg(item),
- src: item
- }, null, 8, ["onClick", "src"])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]);
- }
- 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"]]);
- let request$2 = new Request$1().http;
- function getFollowList(data) {
- return request$2("/app/follow/getFollowList", data, "GET");
- }
- function getFollowById(data) {
- return request$2("/app/follow/getFollowById", data, "GET");
- }
- function doFollow(data) {
- return request$2("/app/follow/doFollow", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$s = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- tabs: [
- {
- id: -1,
- name: "全部"
- },
- {
- id: 0,
- name: "未完成"
- },
- {
- id: 1,
- name: "已完成"
- }
- ],
- writeStatus: -1,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- var that = this;
- uni.$on("refreshFollowList", () => {
- that.mescroll.resetUpScroll();
- });
- },
- onShow() {
- },
- methods: {
- doFoloow(item) {
- uni.navigateTo({
- url: "./doFollow?followId=" + item.followId
- });
- },
- showDetails(item) {
- uni.navigateTo({
- url: "./followDetails?followId=" + item.followId
- });
- },
- statusChange(item) {
- this.writeStatus = item.id;
- formatAppLog("log", "at pages_user/followList.vue:111", item);
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- pageNum: page2.num,
- pageSize: page2.size
- };
- if (this.writeStatus != -1) {
- data.writeStatus = this.writeStatus;
- }
- getFollowList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.statusChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-item",
- onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
- }, [
- vue.createElementVNode("view", { class: "order-top" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.tempName),
- 1
- /* TEXT */
- )
- ]),
- item.writeStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "status red"
- }, " 未完成 ")) : vue.createCommentVNode("v-if", true),
- item.writeStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "status green"
- }, " 已完成 ")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "order-cont" }, [
- vue.createElementVNode("view", { class: "order-time-box" }, [
- vue.createElementVNode("view", { class: "order-time" }, [
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.planTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString(item.num) + "/" + vue.toDisplayString(item.totalNum) + "期",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- item.writeStatus == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn red",
- onClick: vue.withModifiers(($event) => $options.doFoloow(item), ["stop"])
- }, "去填写", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- item.writeStatus == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn green",
- onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"])
- }, "查看", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const _sfc_main$r = {
- data() {
- return {
- followId: null,
- follow: null,
- doctor: null,
- form: null
- };
- },
- onLoad(options) {
- this.followId = options.followId;
- },
- onShow() {
- this.getFollowById();
- },
- methods: {
- toIM() {
- var id = "C2CD-" + this.follow.doctorId;
- formatAppLog("log", "at pages_user/followDetails.vue:83", uni.$TUIKit.TUIConversationServer);
- store.commit("timStore/setType", "startFollow");
- store.commit("timStore/setOrderId", this.follow.orderId);
- store.commit("timStore/setFollowId", this.follow.followId);
- store.commit("timStore/setImType", 2);
- store.commit("timStore/setConversationID", id);
- uni.$TUIKit.TUIConversationServer.setMessageRead(id);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
- var _a;
- formatAppLog("log", "at pages_user/followDetails.vue:93", res);
- const { conversation } = res.data;
- store.commit("timStore/setConversation", conversation);
- let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
- conversation.userProfile;
- url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
- uni.redirectTo({ url: url2 });
- }).catch((err) => {
- formatAppLog("warn", "at pages_user/followDetails.vue:114", "获取 group profile 异常 = ", err);
- });
- },
- doFollow() {
- uni.showModal({
- title: "提示",
- content: "确认提交吗吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = {
- followId: this.followId,
- formJson: JSON.stringify(this.form)
- };
- doFollow(data).then(
- (res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshFollowList");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- getFollowById() {
- var data = { followId: this.followId };
- getFollowById(data).then(
- (res) => {
- if (res.code == 200) {
- this.follow = res.follow;
- this.doctor = res.doctor;
- this.form = JSON.parse(this.follow.formJson);
- }
- },
- (err) => {
- }
- );
- }
- }
- };
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
- const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
- const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createVNode(_component_u_alert, {
- fontSize: "13",
- type: "info",
- description: "为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!"
- }),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "doctor" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- "发布医生:" + vue.toDisplayString(_ctx.dortor != null ? $data.doctor.doctorName : ""),
- 1
- /* TEXT */
- ),
- $data.follow != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "count"
- },
- vue.toDisplayString($data.follow.num) + "/" + vue.toDisplayString($data.follow.totalNum) + "期",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "right" },
- vue.toDisplayString($data.follow.planTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.form, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.question),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "option" }, [
- item.type == 1 ? (vue.openBlock(), vue.createBlock(_component_u_radio_group, {
- key: 0,
- disabled: true,
- modelValue: item.answers,
- "onUpdate:modelValue": ($event) => item.answers = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginBottom: "8px" },
- key: subIndex,
- label: option,
- name: option
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
- item.type == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
- key: 1,
- disabled: true,
- modelValue: item.answers,
- "onUpdate:modelValue": ($event) => item.answers = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- customStyle: { marginBottom: "8px" },
- key: subIndex,
- label: option,
- name: option
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
- item.type == 3 ? (vue.openBlock(), vue.createBlock(_component_u__textarea, {
- key: 2,
- disabled: true,
- count: "",
- maxlength: "200",
- modelValue: item.answers,
- "onUpdate:modelValue": ($event) => item.answers = $event,
- placeholder: "请输入内容"
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.toIM())
- }, "咨询")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$q = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- tabs: [
- {
- id: 0,
- name: "全部"
- },
- {
- id: 1,
- name: "待评价"
- },
- {
- id: 2,
- name: "已评价"
- }
- ],
- status: 0,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- var that = this;
- uni.$on("refreshDrugReportList", () => {
- that.mescroll.resetUpScroll();
- });
- },
- onShow() {
- },
- methods: {
- doPing(item) {
- uni.navigateTo({
- url: "./drugReportPing?reportId=" + item.reportId
- });
- },
- showDetails(item) {
- uni.navigateTo({
- url: "./drugReportDetails?reportId=" + item.reportId
- });
- },
- statusChange(item) {
- this.status = item.id;
- formatAppLog("log", "at pages_user/drugReportList.vue:113", item);
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- pageNum: page2.num,
- pageSize: page2.size
- };
- if (this.status != 0) {
- data.status = this.status;
- }
- getDrugReportList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.statusChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-item",
- onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
- }, [
- vue.createElementVNode("view", { class: "order-top" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- class: "head",
- mode: "aspectFill",
- src: item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- )
- ]),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "status red"
- }, " 未评价 ")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "status green"
- }, " 已评价 ")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "order-cont" }, [
- vue.createElementVNode(
- "view",
- { class: "order-desc" },
- "咨询总结:" + vue.toDisplayString(item.reportSummary),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "order-time-box" }, [
- vue.createElementVNode("view", { class: "order-time" }, [
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn green",
- onClick: vue.withModifiers(($event) => $options.doPing(item), ["stop"])
- }, "去评价", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", {
- class: "btn green",
- onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"])
- }, "查看", 8, ["onClick"])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const _sfc_main$p = {
- data() {
- return {
- report: null,
- form: {
- reportId: null,
- pingStar: 0,
- pingContent: ""
- }
- };
- },
- onLoad(options) {
- this.form.reportId = options.reportId;
- this.getDrugReportById();
- },
- methods: {
- getDrugReportById() {
- var data = { reportId: this.form.reportId };
- getDrugReportById(data).then(
- (res) => {
- if (res.code == 200) {
- this.report = res.data;
- }
- },
- (err) => {
- }
- );
- },
- submit() {
- uni.showLoading({
- title: "处理中..."
- });
- pingReport(this.form).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "评价成功"
- });
- uni.$emit("refreshDrugReportList");
- setTimeout(function() {
- uni.navigateBack({
- delta: 1
- });
- }, 2e3);
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "ping" }, [
- vue.createElementVNode("view", { class: "title" }, " 咨询评价 "),
- $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "doc-box"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.report.avatar,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", { class: "doc-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString($data.report.doctorName),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "ping-star" }, [
- vue.createElementVNode("text", { class: "label" }, "评分"),
- vue.createElementVNode("view", { class: "star" }, [
- vue.createVNode(_component_u_rate, {
- size: "24",
- "active-color": "#fcab36",
- modelValue: $data.form.pingStar,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.pingStar = $event)
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createElementVNode("view", { class: "ping-content" }, [
- vue.createElementVNode("view", { class: "textarea-box" }, [
- vue.withDirectives(vue.createElementVNode(
- "textarea",
- {
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.pingContent = $event),
- placeholder: "写入您对医生的评价吧",
- maxlength: "200"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.pingContent]
- ]),
- vue.createElementVNode(
- "view",
- { class: "num-box" },
- vue.toDisplayString($data.form.pingContent.length) + "/200",
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
- }, "提交评价")
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$o = {
- data() {
- return {
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- reportId: null,
- report: null
- };
- },
- onLoad(options) {
- this.reportId = options.reportId;
- },
- onShow() {
- this.getDrugReportById();
- },
- methods: {
- goBack() {
- uni.navigateBack();
- },
- doPing() {
- uni.navigateTo({
- url: "./drugReportPing?reportId=" + this.reportId
- });
- },
- getDrugReportById() {
- var data = { reportId: this.reportId };
- getDrugReportById(data).then(
- (res) => {
- if (res.code == 200) {
- this.report = res.data;
- }
- },
- (err) => {
- }
- );
- }
- }
- };
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }, [
- vue.createElementVNode("image", { src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/3305ca20c3f646c6b465918efb07f849.png" })
- ]),
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "top-title" }, [
- vue.createElementVNode("image", {
- onClick: _cache[0] || (_cache[0] = ($event) => $options.goBack()),
- src: "/static/images/icon_back_w.png"
- }),
- vue.createElementVNode("view", { class: "title" }, "用药报告")
- ])
- ]),
- $data.report != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "cont-box"
- }, [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", { class: "user" }, [
- vue.createElementVNode("image", {
- src: $data.report.avatar == null ? "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/22cb9518a55040dea74d8f730551a7a2.jpg" : $data.report.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode("view", { class: "user-box" }, [
- vue.createElementVNode(
- "view",
- { class: "username" },
- vue.toDisplayString($data.report.doctorName),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "items" }, [
- vue.createElementVNode("view", { class: "result-box" }, [
- vue.createElementVNode("view", { class: "name" }, "用药咨询报告"),
- vue.createElementVNode(
- "view",
- { class: "time" },
- "报告时间 " + vue.toDisplayString($data.report.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode("view", { class: "title" }, "咨询总结")
- ]),
- vue.createElementVNode(
- "view",
- { class: "descs" },
- vue.toDisplayString($data.report.reportSummary),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "line" })
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "title-line" }),
- vue.createElementVNode("view", { class: "title" }, "生活建议")
- ]),
- $data.report.reportAdvice != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "descs"
- },
- vue.toDisplayString($data.report.reportAdvice),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]),
- 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> ')
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- $data.report.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn-box"
- }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.doPing())
- }, "咨询评价")
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$n = {
- data() {
- return {
- followId: null,
- follow: null,
- doctor: null,
- form: null
- };
- },
- onLoad(options) {
- this.followId = options.followId;
- },
- onShow() {
- this.getFollowById();
- },
- methods: {
- doFollow() {
- uni.showModal({
- title: "提示",
- content: "确认提交吗吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = {
- followId: this.followId,
- formJson: JSON.stringify(this.form)
- };
- doFollow(data).then(
- (res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- setTimeout(function() {
- uni.$emit("refreshFollowList");
- uni.navigateBack({
- delta: 1
- });
- }, 500);
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- getFollowById() {
- var data = { followId: this.followId };
- getFollowById(data).then(
- (res) => {
- if (res.code == 200) {
- this.follow = res.follow;
- this.doctor = res.doctor;
- this.form = JSON.parse(this.follow.formJson);
- this.form.forEach(function(element) {
- if (element.type == 3) {
- element.answers = "";
- }
- });
- }
- },
- (err) => {
- }
- );
- }
- }
- };
- function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_alert = resolveEasycom(vue.resolveDynamicComponent("u-alert"), __easycom_0$3);
- const _component_u_radio = resolveEasycom(vue.resolveDynamicComponent("u-radio"), __easycom_1$1);
- const _component_u_radio_group = resolveEasycom(vue.resolveDynamicComponent("u-radio-group"), __easycom_2$2);
- const _component_u_checkbox = resolveEasycom(vue.resolveDynamicComponent("u-checkbox"), __easycom_3);
- const _component_u_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("u-checkbox-group"), __easycom_4);
- const _component_u__textarea = resolveEasycom(vue.resolveDynamicComponent("u--textarea"), __easycom_5);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createVNode(_component_u_alert, {
- fontSize: "13",
- type: "info",
- description: "为了给您提供更好的服务,希望您能用几分钟时间,将您的感受和建议告诉我们,我们非常重视您的宝贵意见!"
- }),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "doctor" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "view",
- { class: "name" },
- "发布医生:" + vue.toDisplayString(_ctx.dortor != null ? $data.doctor.doctorName : ""),
- 1
- /* TEXT */
- ),
- $data.follow != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "count"
- },
- vue.toDisplayString($data.follow.num) + "/" + vue.toDisplayString($data.follow.totalNum) + "期",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "right" },
- vue.toDisplayString($data.follow.planTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.form, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "title" }, [
- vue.createTextVNode(
- vue.toDisplayString(item.question),
- 1
- /* TEXT */
- ),
- item.require ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "tip"
- }, "(必填)")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "option" }, [
- item.type == 1 ? (vue.openBlock(), vue.createBlock(_component_u_radio_group, {
- key: 0,
- modelValue: item.answers,
- "onUpdate:modelValue": ($event) => item.answers = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_radio, {
- customStyle: { marginBottom: "8px" },
- key: subIndex,
- label: option,
- name: option
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
- item.type == 2 ? (vue.openBlock(), vue.createBlock(_component_u_checkbox_group, {
- key: 1,
- modelValue: item.answers,
- "onUpdate:modelValue": ($event) => item.answers = $event,
- placement: "column"
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.options, (option, subIndex) => {
- return vue.openBlock(), vue.createBlock(_component_u_checkbox, {
- customStyle: { marginBottom: "8px" },
- key: subIndex,
- label: option,
- name: option
- }, null, 8, ["label", "name"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- _: 2
- /* DYNAMIC */
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true),
- item.type == 3 ? (vue.openBlock(), vue.createBlock(_component_u__textarea, {
- key: 2,
- count: "",
- maxlength: "200",
- modelValue: item.answers,
- "onUpdate:modelValue": ($event) => item.answers = $event,
- placeholder: "请输入内容"
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.doFollow())
- }, "提交随访")
- ])
- ]);
- }
- 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"]]);
- let request$1 = new Request$1().http;
- function getIntegralGoodsList(data) {
- return request$1("/app/integral/getIntegralGoodsList", data, "GET");
- }
- function getIntegralGoodsById(data) {
- return request$1("/app/integral/getIntegralGoodsById", data, "GET");
- }
- function getUserIntegralLogsList(data) {
- return request$1("/app/integral/getUserIntegralLogsList", data, "GET");
- }
- function getIntegralOrderList(data) {
- return request$1("/app/integral/getIntegralOrderList", data, "GET");
- }
- function getIntegralOrderById(data) {
- return request$1("/app/integral/getIntegralOrderById", data, "GET");
- }
- function createOrder(data) {
- return request$1("/app/integral/createOrder", data, "POST", "application/json;charset=UTF-8");
- }
- function getUserSign() {
- return request$1("/app/integral/getUserSign", null, "GET");
- }
- function doSign(data) {
- return request$1("/app/integral/sign", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$m = {
- mixins: [MescrollMixin],
- data() {
- return {
- integral: 0,
- type: "0",
- typeOptions: [],
- tabIndex: 0,
- tabs: [],
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_integral_goods_type");
- this.getUserInfo();
- },
- methods: {
- getUserInfo() {
- getUserInfo$1().then(
- (res) => {
- if (res.code == 200) {
- if (res.user != null) {
- this.integral = res.user.integral;
- }
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- getDictByKey(key) {
- var data = { key };
- var that = this;
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.typeOptions = res.data;
- this.typeOptions.forEach(function(item, index2) {
- var data2 = { name: item.dictLabel };
- that.tabs.push(data2);
- });
- if (this.tabs.length > 0) {
- this.tabIndex = 0;
- }
- }
- },
- (err) => {
- }
- );
- },
- tabChange(item) {
- formatAppLog("log", "at pages_user/integralGoodsList.vue:135", item.index);
- this.type = this.typeOptions[item.index].dictValue;
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- pageNum: page2.num,
- pageSize: page2.size
- };
- if (this.type != null) {
- data.goodsType = this.type;
- }
- getIntegralGoodsList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode("view", { class: "my-integral" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "label" }, "我的积分"),
- vue.createElementVNode(
- "view",
- { class: "integral" },
- vue.toDisplayString($data.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_user/integralLogsList"))
- }, "积分记录"),
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_user/integralOrderList"))
- }, "兑换记录")
- ])
- ]),
- $data.tabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tabs"
- }, [
- vue.createVNode(_component_u_tabs, {
- current: $data.tabIndex,
- scrollable: true,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["current", "list", "onChange"])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "288rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "integral-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "item",
- onClick: ($event) => $options.navTo("/pages_user/integralGoodsDetails?goodsId=" + item.goodsId)
- }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "bottom" }, [
- vue.createElementVNode(
- "view",
- { class: "title ellipsis2" },
- vue.toDisplayString(item.goodsName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- vue.toDisplayString(item.integral) + "积分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- "原价:" + vue.toDisplayString(item.otPrice.toFixed(2)) + "元",
- 1
- /* TEXT */
- )
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$l = {
- data() {
- return {
- imgs: [],
- activeImg: 1,
- goodsId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.goodsId = option.goodsId;
- },
- onShow() {
- this.getIntegralGoodsById();
- },
- methods: {
- submit() {
- uni.navigateTo({
- url: "./integralOrderPay?goodsId=" + this.goodsId
- });
- },
- swiperChange(event) {
- this.activeImg = event.detail.current + 1;
- },
- showImg() {
- uni.previewImage({
- urls: this.imgs,
- current: this.imgs[0]
- });
- },
- getIntegralGoodsById() {
- let data = { goodsId: this.goodsId };
- getIntegralGoodsById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- if (res.data.images != null) {
- this.imgs = res.data.images.split(",");
- } else {
- this.activeImg = 0;
- }
- formatAppLog("log", "at pages_user/integralGoodsDetails.vue:98", this.imgs);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", {
- class: "goods-banner",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg())
- }, [
- vue.createElementVNode(
- "swiper",
- {
- class: "swiper",
- "indicator-dots": false,
- circular: true,
- autoplay: true,
- interval: 3e3,
- duration: 1e3,
- "indicator-color": "rgba(255, 255, 255, 0.6)",
- "indicator-active-color": "#ffffff",
- onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args))
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.imgs, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", {
- class: "swiper-item",
- key: index2
- }, [
- vue.createElementVNode("image", {
- src: item,
- mode: "aspectFit"
- }, null, 8, ["src"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 32
- /* NEED_HYDRATION */
- ),
- vue.createCommentVNode(" 数量 "),
- vue.createElementVNode(
- "view",
- { class: "num-box" },
- vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "integral-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.goodsName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode(
- "view",
- { class: "price" },
- vue.toDisplayString($data.item.integral) + " 积分",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "count" },
- "原价:" + vue.toDisplayString($data.item.otPrice.toFixed(2)) + "元",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.descs
- }, null, 8, ["innerHTML"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-foot" }, [
- vue.createElementVNode("view", { class: "p-price-box" }, [
- vue.createElementVNode("view", { class: "p-name" }, "兑换积分: "),
- vue.createElementVNode(
- "view",
- { class: "p-price" },
- vue.toDisplayString($data.item.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn buy",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
- }, " 立即兑换 ")
- ])
- ])
- ]);
- }
- const Pages_userIntegralGoodsDetails = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralGoodsDetails.vue"]]);
- const _sfc_main$k = {
- mixins: [MescrollMixin],
- data() {
- return {
- orderStatusOptions: [],
- searchKey: "",
- status: "0",
- tabs: [
- { name: "全部", id: "0" },
- { name: "待发货", id: "1" },
- { name: "待收货", id: "2" },
- { name: "已完成", id: "3" },
- { name: "已取消", id: "-1" }
- ],
- mescroll: null,
- // 上拉加载的配置
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- // 列表数据
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_integral_order_status");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_integral_order_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- tabChange(item) {
- this.status = item.id;
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.searchKey,
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getIntegralOrderList(data).then((res) => {
- if (res.code == 200) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.items = [];
- value2.items.push(JSON.parse(value2.itemJson));
- });
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 查看订单详情
- showDetail(item) {
- uni.navigateTo({
- url: "./integralOrderDetails?orderId=" + item.orderId
- });
- }
- }
- };
- function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: _ctx.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createCommentVNode(" 订单号,状态 "),
- vue.createElementVNode("view", {
- class: "ordersn-box",
- onClick: ($event) => $options.showDetail(item)
- }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "订单号:" + vue.toDisplayString(item.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "text success"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ], 8, ["onClick"]),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.items, (subItem, subIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.showDetail(item),
- key: subIndex,
- class: "drug-item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: subItem.imgUrl == "" ? "/static/images/drug.svg" : subItem.imgUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(subItem.goodsName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "积分"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(subItem.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "amount" }, "x1")
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(" 实付金额、按钮 "),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "使用积分:"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.integral),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", { class: "btn cancel" }, [
- vue.createTextVNode(" 联系客服 "),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- })
- ])
- ])
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- 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"]]);
- const _sfc_main$j = {
- data() {
- return {
- orderId: null,
- order: null,
- item: null
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- },
- onShow() {
- this.getIntegralOrderById();
- },
- methods: {
- getIntegralOrderById() {
- var data = { orderId: this.orderId };
- getIntegralOrderById(data).then((res) => {
- if (res.code == 200) {
- this.order = res.data;
- this.item = JSON.parse(this.order.itemJson);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- // 复制订单编号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- }
- }
- };
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createCommentVNode(" 订单状态 "),
- vue.createElementVNode("view", { class: "order-status" }, [
- vue.createCommentVNode(" 待发货 "),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待发货"),
- vue.createElementVNode("text", { class: "desc" }, "等待后台发货")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已发货、待收货 "),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待收货"),
- vue.createElementVNode("text", { class: "desc" }, "运输中")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已完成 "),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "已完成"),
- vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode("交易取消 "),
- $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "交易关闭"),
- vue.createElementVNode("text", { class: "desc" }, "订单已取消")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 下单人信息 "),
- $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "order-placer"
- }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "location",
- src: "/static/images/location.png",
- mode: ""
- }),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("view", { class: "name-phone" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.userName),
- 1
- /* TEXT */
- ),
- $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.userPhone),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "address ellipsis2" },
- vue.toDisplayString($data.order.userAddress),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "goods-list" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString($data.item.goodsName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "积分:"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.item.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num" }, "x1")
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "使用积分"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- "¥" + vue.toDisplayString($data.order.integral),
- 1
- /* TEXT */
- )
- ]),
- $data.order.deliveryName != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "item"
- }, [
- vue.createElementVNode("text", { class: "label" }, "物流公司"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.deliveryName),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "item"
- }, [
- vue.createElementVNode("text", { class: "label" }, "物流单号"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.deliverySn),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", { class: "btn cancel" }, [
- vue.createTextVNode(" 联系客服 "),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "open-type": "contact"
- })
- ])
- ])
- ]);
- }
- const Pages_userIntegralOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderDetails.vue"]]);
- const _sfc_main$i = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- typeOptions: [],
- mescroll: null,
- downOption: {
- auto: false
- //不要自动加载
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- num: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_integral_log_type");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.typeOptions = res.data;
- }
- },
- (err) => {
- }
- );
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- pageNum: page2.num,
- pageSize: page2.size
- };
- getUserIntegralLogsList(data).then((res) => {
- uni.hideLoading();
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "page" }, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createVNode(_component_mescroll_body, {
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- up: $data.upOption,
- down: $data.downOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "text",
- { class: "title" },
- vue.toDisplayString(_ctx.$getDictLabelName($data.typeOptions, item.logType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- {
- class: vue.normalizeClass(item.integral > 0 ? "money green" : "money red")
- },
- vue.toDisplayString(item.integral),
- 3
- /* TEXT, CLASS */
- ),
- vue.createElementVNode(
- "text",
- { class: "remark" },
- "剩余积分:" + vue.toDisplayString(item.balance),
- 1
- /* TEXT */
- )
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "up", "down", "onDown", "onUp"])
- ])
- ]);
- }
- 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"]]);
- const _sfc_main$h = {
- data() {
- return {
- addressId: null,
- address: null,
- orderId: null,
- order: null,
- item: null
- };
- },
- onLoad(option) {
- this.goodsId = option.goodsId;
- var that = this;
- uni.$on("updateAddress", (e) => {
- that.addressId = e.addressId;
- that.address = e;
- that.address.address = e.province + e.city + e.district + e.detail;
- });
- this.getIntegralGoodsById();
- },
- methods: {
- getIntegralGoodsById() {
- var data = { goodsId: this.goodsId };
- formatAppLog("log", "at pages_user/integralOrderPay.vue:97", data);
- getIntegralGoodsById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- }
- },
- (rej) => {
- }
- );
- },
- openAddress() {
- uni.navigateTo({
- url: "/pages_user/address"
- });
- },
- payOrder() {
- if (this.addressId == null) {
- uni.showToast({
- icon: "none",
- title: "请选择收货地址"
- });
- return;
- }
- var data = {
- goodsId: this.goodsId,
- addressId: this.addressId
- };
- uni.showLoading();
- createOrder(data).then(
- (res) => {
- if (res.code == 200) {
- uni.redirectTo({
- url: "./integralOrderPaySuccess?orderId=" + res.order.orderId
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "inner-box" }, [
- vue.createCommentVNode(" 收货人 "),
- $data.address == null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "address-box",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.openAddress())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode("text", { class: "text name" }, "添加收货地址")
- ])
- ]),
- vue.createElementVNode("view", { class: "arrow-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.address != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "address-box",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.openAddress())
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text name" },
- vue.toDisplayString($data.address.realName),
- 1
- /* TEXT */
- ),
- $data.address.phone != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.address.phone),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "address" },
- vue.toDisplayString($data.address.address),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "arrow-box" }, [
- vue.createElementVNode("image", {
- src: "/static/images/arrow_gray.png",
- mode: ""
- })
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "goods-list" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: $data.item.imgUrl == "" ? "/static/images/drug.svg" : $data.item.imgUrl,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString($data.item.goodsName),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createElementVNode("text", { class: "unit" }, "积分"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.item.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num" }, "x1")
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "other-info" }, [
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "所需积分:")
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.item.integral),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 底部按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.payOrder())
- }, "立即兑换")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_userIntegralOrderPay = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderPay.vue"]]);
- const _sfc_main$g = {
- data() {
- return {
- order: null
- };
- },
- onLoad(option) {
- uni.setNavigationBarTitle({
- title: "支付结果"
- });
- uni.$emit("refreshStoreOrder");
- this.orderId = option.orderId;
- this.getIntegralOrderById();
- },
- methods: {
- getIntegralOrderById() {
- var data = { orderId: this.orderId };
- var that = this;
- uni.showLoading();
- getIntegralOrderById(data).then(
- (res) => {
- uni.hideLoading();
- if (res.code == 200) {
- that.order = res.data;
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- copyTest(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- showOrderDetails(orderId) {
- formatAppLog("log", "at pages_user/integralOrderPaySuccess.vue:87", orderId);
- uni.redirectTo({
- url: "./integralOrderDetails?orderId=" + orderId
- });
- }
- }
- };
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "top" }, [
- vue.createElementVNode("text", { class: "title" }, "兑换成功"),
- vue.createElementVNode("image", {
- class: "icon",
- src: "/static/images/success.png"
- }),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn cancel",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.showOrderDetails($data.order.orderId))
- }, " 查看订单")
- ])
- ]),
- vue.createCommentVNode(" 订单详情查看 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.copyTest($data.order.orderCode))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "兑换时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]);
- }
- const Pages_userIntegralOrderPaySuccess = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integralOrderPaySuccess.vue"]]);
- const _sfc_main$f = {
- name: "Loading",
- props: {
- loaded: Boolean,
- loading: Boolean
- }
- };
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
- return $props.loading || !$props.loaded ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "Loads acea-row row-center-wrapper",
- style: { "margin-top": "20rpx" }
- }, [
- $props.loading ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode("view", { class: "iconfont icon-jiazai loading acea-row row-center-wrapper" }),
- vue.createTextVNode(" 正在加载中 ")
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- !$props.loading ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createTextVNode(" 上拉加载更多 ")
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true);
- }
- 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"]]);
- const _sfc_main$e = {
- components: {
- Loading
- },
- data() {
- return {
- typeOptions: [],
- isDaySign: false,
- top: 0,
- signNum: 0,
- integral: 0,
- sign: [],
- // 状态栏的高度
- statusBarHeight: uni.getStorageSync("menuInfo").statusBarHeight,
- // tab切换
- tags: [{ lable: "全部", value: 0 }, { lable: "获得", value: 1 }, { lable: "消耗", value: 2 }],
- // 选中的tab
- tabIndex: 0,
- current: 0,
- page: {
- type: 0,
- page: 1,
- pageSize: 10
- },
- list: [],
- loaded: false,
- loading: false
- };
- },
- onLoad(option) {
- this.getDictByKey("sys_integral_log_type");
- this.getUserSign();
- this.getUserIntegralLogsList();
- },
- onReachBottom() {
- !this.loading && this.getUserIntegralLogsList();
- },
- onPageScroll(e) {
- if (e.scrollTop > 30) {
- this.topFixed = true;
- } else {
- this.topFixed = false;
- }
- },
- onPageScroll(e) {
- this.top = e.scrollTop;
- },
- computed: {
- // 计算属性的 getter
- bg: function() {
- return "rgba(255,142,60, " + this.top / 30 + ")";
- }
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.typeOptions = res.data;
- }
- },
- (err) => {
- }
- );
- },
- doSign() {
- var data = {};
- doSign(data).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: res.msg
- });
- this.list = [];
- this.page.page = 1;
- this.list = [];
- this.loaded = false;
- this.loading = false;
- this.getUserIntegralLogsList();
- this.getUserSign();
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- },
- getUserSign() {
- getUserSign().then(
- (res) => {
- if (res.code == 200) {
- this.data = res.member;
- this.signNum = res.signNum;
- this.isDaySign = res.isDaySign;
- this.integral = res.integral;
- this.sign = JSON.parse(res.sign);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- getUserIntegralLogsList() {
- let that = this;
- if (that.loaded == true || that.loading == true)
- return;
- that.loading = true;
- uni.showLoading({
- title: "加载中..."
- });
- getUserIntegralLogsList(that.page).then(
- (res) => {
- that.loading = false;
- that.loaded = res.data.list.length < that.page.pageSize;
- that.page.page = that.page.page + 1;
- that.list.push.apply(that.list, res.data.list);
- uni.hideLoading();
- },
- (err) => {
- uni.hideLoading();
- uni.showToast({
- title: err.msg,
- icon: "none",
- duration: 2e3
- });
- }
- );
- },
- // 返回上一页
- back() {
- uni.navigateBack();
- },
- // tab选择
- tabChange(item) {
- formatAppLog("log", "at pages_user/integral.vue:254", item);
- this.tabIndex = item.value;
- this.page.type = this.tabIndex;
- this.page.page = 1;
- this.list = [];
- this.loaded = false;
- this.loading = false;
- this.getUserIntegralLogsList();
- }
- }
- };
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_Loading = vue.resolveComponent("Loading");
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-cont" }, [
- vue.createCommentVNode(" 背景图片 "),
- vue.createElementVNode("image", {
- class: "bg",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/ed4a8ff0406747a68e40988b210d1c78.png",
- mode: ""
- }),
- vue.createElementVNode("view", { class: "top-inner" }, [
- vue.createCommentVNode(" 这里是状态栏 "),
- vue.createElementVNode(
- "view",
- {
- class: "fixed-top-box",
- style: vue.normalizeStyle({ background: $options.bg })
- },
- [
- vue.createElementVNode(
- "view",
- {
- class: "status_bar",
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- ),
- vue.createElementVNode("view", {
- class: "back-box",
- onClick: _cache[0] || (_cache[0] = (...args) => $options.back && $options.back(...args))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/back_white.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "title" }, "我的积分"),
- vue.createElementVNode("text")
- ])
- ],
- 4
- /* STYLE */
- ),
- vue.createCommentVNode(" 顶部固定后站位元素 "),
- vue.createElementVNode("view", { style: { "padding-bottom": "88upx" } }, [
- vue.createElementVNode(
- "view",
- {
- style: vue.normalizeStyle({ height: $data.statusBarHeight })
- },
- null,
- 4
- /* STYLE */
- )
- ]),
- vue.createCommentVNode(" 可用积分 "),
- vue.createElementVNode("view", { class: "available-points" }, [
- vue.createElementVNode("text", { class: "label" }, "可用积分"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.integral),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(" 签到 "),
- vue.createElementVNode("view", { class: "singn-content" }, [
- vue.createElementVNode("view", { class: "sign-in-box" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createTextVNode("已连续签到"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString($data.signNum),
- 1
- /* TEXT */
- ),
- vue.createTextVNode("天")
- ]),
- vue.createCommentVNode(" 签到天数 "),
- vue.createElementVNode("view", { class: "sign-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.sign, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: index2,
- class: vue.normalizeClass($data.signNum >= index2 + 1 ? "item active" : "item")
- },
- [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createCommentVNode(" 已签到图标 "),
- $data.signNum >= index2 + 1 ? (vue.openBlock(), vue.createElementBlock("image", {
- key: 0,
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f3bdd5d388854e9a8f365904840c3b32.png",
- mode: ""
- })) : (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(" 未签到图标 "),
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/c593e551e4b246b981aaa58deb1fe725.png",
- mode: ""
- })
- ],
- 2112
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
- )),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(item.day),
- 1
- /* TEXT */
- )
- ])
- ],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" 签到按钮 "),
- vue.createElementVNode("view", { class: "sign-btn-box" }, [
- $data.isDaySign == false ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.doSign())
- }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "签到")
- ])) : (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn"
- }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "签到")
- ]))
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 积分列表 "),
- vue.createElementVNode("view", { class: "points-cont" }, [
- vue.createCommentVNode(" tab切换 "),
- vue.createElementVNode("view", { class: "pub-tab-box" }, [
- vue.createElementVNode("view", { class: "tab-inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.tags, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.tabIndex == item.value ? "item active" : "item"),
- onClick: ($event) => $options.tabChange(item)
- }, [
- vue.createElementVNode("view", { class: "text" }, [
- vue.createTextVNode(
- vue.toDisplayString(item.lable) + " ",
- 1
- /* TEXT */
- ),
- vue.withDirectives(vue.createElementVNode(
- "image",
- {
- class: "tab-bg",
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1828ea6b3b124b5f84e3556267a8d9ef.png",
- mode: ""
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vShow, $data.tabIndex == item.value]
- ])
- ])
- ], 10, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- vue.createCommentVNode(" 列表 "),
- vue.createElementVNode("view", { class: "point-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.list, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "text",
- { class: "title" },
- vue.toDisplayString(_ctx.$getDictLabelName($data.typeOptions, item.logType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- item.integral < 0 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "less"
- },
- vue.toDisplayString(item.integral),
- 1
- /* TEXT */
- )) : (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "add"
- },
- "+" + vue.toDisplayString(item.integral),
- 1
- /* TEXT */
- ))
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createVNode(_component_Loading, {
- loaded: $data.loaded,
- loading: $data.loading
- }, null, 8, ["loaded", "loading"])
- ])
- ])
- ])
- ])
- ]);
- }
- const Pages_userIntegral = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_user/integral.vue"]]);
- const _sfc_main$d = {
- data() {
- return {
- form: {
- userName: null,
- password: null
- }
- };
- },
- computed: {},
- onLoad() {
- },
- onHide() {
- },
- onUnload() {
- },
- mounted() {
- },
- methods: {
- submit() {
- login(this.form).then(
- (res) => {
- if (res.code == 200) {
- uni.showToast({
- icon: "success",
- title: "登录成功"
- });
- uni.setStorageSync("companyId", res.user.companyId);
- uni.setStorageSync("companyUserId", res.user.userId);
- uni.setStorageSync("CompanyUserToken", res.companyUserToken);
- uni.redirectTo({
- url: "/pages_company/index"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "form-box" }, [
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "员工帐号"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.form.userName = $event),
- placeholder: "登录帐号",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.userName]
- ])
- ]),
- vue.createElementVNode("view", { class: "form-item" }, [
- vue.createElementVNode("text", { class: "label" }, "员工密码"),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "password",
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.form.password = $event),
- placeholder: "登录密码",
- "placeholder-class": "form-input"
- },
- null,
- 512
- /* NEED_PATCH */
- ), [
- [vue.vModelText, $data.form.password]
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "sub-btn",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.submit())
- }, "员工登录")
- ])
- ]);
- }
- const Pages_companyLogin = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/login.vue"]]);
- const _sfc_main$c = {
- data() {
- return {
- companyId: null,
- companyUserId: null,
- user: null
- };
- },
- onLoad() {
- },
- onShow() {
- this.companyId = uni.getStorageSync("companyId");
- this.companyUserId = uni.getStorageSync("companyUserId");
- formatAppLog("log", "at pages_company/index.vue:81", this.companyUserId);
- this.getUserInfo();
- },
- onShareAppMessage(res) {
- return {
- title: "问诊",
- path: "/pages/TUIKit/TUIPages/TUIConversation/index",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- },
- methods: {
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- getUserInfo() {
- var data = {};
- getUserInfo(data).then(
- (res) => {
- if (res.code == 200) {
- this.user = res.data;
- } else {
- uni.setStorageSync("CompanyUserToken", null);
- uni.showToast({
- icon: "none",
- title: res.msg
- });
- uni.navigateBack({
- delta: -1
- });
- }
- },
- (rej) => {
- }
- );
- },
- logout() {
- uni.showModal({
- title: "提示",
- content: "确认退出登录吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- uni.setStorageSync("CompanyUserToken", null);
- uni.navigateBack({
- delta: -1
- });
- }
- }
- });
- },
- // 跳转页面
- navgetTo(url2) {
- this.$isLogin().then((res) => {
- if (res) {
- uni.navigateTo({
- url: url2
- });
- }
- });
- }
- }
- };
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "top-cont" }, [
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "user-info" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "name-phone" }, [
- $data.user != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "name"
- },
- vue.toDisplayString($data.user.nickName),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.user != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "phone"
- },
- vue.toDisplayString(_ctx.$parsePhone($data.user.phonenumber)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- $data.user != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "msg-box"
- },
- vue.toDisplayString($data.user.deptName),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 常用工具 "),
- vue.createElementVNode("view", { class: "used-tools" }, [
- vue.createElementVNode("view", { class: "title" }, "常用工具"),
- vue.createElementVNode("view", { class: "tools-list" }, [
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.navTo("/pages_company/couponList?isShare=1&couponType=5"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_my_coupon.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "私域疗法券")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages_company/couponList?isShare=1&couponType=2"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_my_coupon.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "中药免单券")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("/pages_company/packageList"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_2.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "疗法")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquirySelectType?companyId=" + $data.companyId + "&companyUserId=" + $data.companyUserId + "&isShare=1"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_3.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "会诊")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("/pages_order/inquirySelect?inquiryType=3&companyId=" + $data.companyId + "&companyUserId=" + $data.companyUserId + "&isShare=1"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_3.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "按方开药")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("/pages_company/packageOrderList"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_3.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "套餐订单")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[6] || (_cache[6] = ($event) => $options.navTo("/pages_company/inquiryOrderList"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_3.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "问诊订单")
- ]),
- vue.createElementVNode("view", {
- class: "item",
- onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("/pages_company/storeOrderList"))
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_3.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "药品订单")
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("image", {
- src: "/static/images/icon_company_3.png",
- mode: ""
- }),
- vue.createElementVNode("text", { class: "text" }, "问诊分享"),
- vue.createElementVNode("button", {
- class: "share-btn",
- "open-type": "share"
- })
- ])
- ])
- ]),
- vue.createCommentVNode(" 退出登录按钮 "),
- vue.createElementVNode("view", {
- class: "logout",
- onClick: _cache[8] || (_cache[8] = (...args) => $options.logout && $options.logout(...args))
- }, "退出登录")
- ])
- ]);
- }
- const Pages_companyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/index.vue"]]);
- const _sfc_main$b = {
- mixins: [MescrollMixin],
- data() {
- return {
- cates: [],
- privateType: 0,
- keyword: "",
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onShow() {
- this.getPackagCateList(2);
- },
- methods: {
- getPackagCateList(type2) {
- var data = { type: type2 };
- getPackagCateList(data).then(
- (res) => {
- if (res.code == 200) {
- this.cates = res.data;
- }
- },
- (err) => {
- }
- );
- },
- showMore(item) {
- item.displayMore = item.displayMore == 1 ? 0 : 1;
- item.displayText = item.displayMore == 1 ? "收起" : "点击查看方案明细";
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- isShow: 0,
- keyword: this.keyword,
- privateType: this.privateType,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getPackageList(data).then((res) => {
- if (res.code == 200) {
- res.data.list.forEach(function(element) {
- element.displayMore = 0;
- element.displayText = "点击查看方案明细";
- if (element.productJson != null) {
- element.products = JSON.parse(element.productJson);
- } else {
- element.products = [];
- }
- });
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- choseType(item) {
- this.privateType = item.cateCode;
- this.mescroll.resetUpScroll();
- }
- }
- };
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-content" }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.keyword = $event),
- placeholder: "输入健康疗法名称或别名搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, $data.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- vue.createCommentVNode(" 关键字列表 "),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.cates, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass($data.privateType == item.cateCode ? "item active" : "item"),
- onClick: ($event) => $options.choseType(item)
- }, vue.toDisplayString(item.cateName), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "192rpx",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "package-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "subtitle" },
- "别名:" + vue.toDisplayString(item.secondName),
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.products, (subItem, subIndex) => {
- return vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: subIndex,
- class: vue.normalizeClass(["drug-item", item.displayMore == 0 ? "hide" : "show"])
- },
- [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: subItem.image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(subItem.productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(subItem.sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- subItem.price != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "price"
- }, [
- vue.createElementVNode("text", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "text",
- { class: "num" },
- vue.toDisplayString(subItem.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode(
- "view",
- { class: "amount" },
- "x" + vue.toDisplayString(subItem.count),
- 1
- /* TEXT */
- )
- ])
- ])
- ],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createElementVNode("view", {
- class: "display-more",
- onClick: ($event) => $options.showMore(item)
- }, vue.toDisplayString(item.displayText), 9, ["onClick"]),
- vue.createCommentVNode(" 实付金额、按钮 "),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "套餐价格:"),
- item.totalPrice != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "price-box"
- }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.totalPrice.toFixed(2)),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn pay",
- onClick: vue.withModifiers(($event) => $options.navTo("/pages_company/packageDetails?packageId=" + item.packageId), ["stop"])
- }, " 查看详情 ", 8, ["onClick"])
- ])
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ]),
- vue.createCommentVNode(` <view class="package-box" >
- <view class="item" @click="navTo('/pages_company/packageDetails?packageId='+item.packageId)" v-for="(item,index) in dataList">
- <view class="top">
- <image :src="item.imgUrl"></image>
- </view>
- <view class="bottom">
- <view class="title ellipsis2">
- {{item.packageName}}
- </view>
- <view class="price-box">
- <view class="price">¥{{item.price.toFixed(2)}}元/日</view>
- <view class="count">{{item.sales}}人已购</view>
- </view>
- </view>
- </view>
- </view> `)
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_companyPackageList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageList.vue"]]);
- const _sfc_main$a = {
- data() {
- return {
- displayText: "查看更多",
- displayMore: 0,
- imgs: [],
- activeImg: 1,
- doctorShow: false,
- doctors: [],
- products: [],
- packageId: null,
- item: {},
- describe: null,
- doctorId: null,
- doctorPageNum: 1,
- doctorLastPage: false,
- doctorTotal: 0
- };
- },
- onLoad(option) {
- this.packageId = option.packageId;
- this.companyId = uni.getStorageSync("companyId");
- this.companyUserId = uni.getStorageSync("companyUserId");
- },
- onShow() {
- this.getPackageById();
- this.getPackageDoctorList();
- },
- onShareAppMessage(res) {
- return {
- title: this.item.packageName,
- path: "/pages_index/packageDetails?packageId=" + this.packageId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId,
- imageUrl: this.item.imgUrl
- //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- };
- },
- methods: {
- showMore() {
- this.displayMore = this.displayMore == 1 ? 0 : 1;
- this.displayText = this.displayMore == 1 ? "收起" : "查看更多";
- formatAppLog("log", "at pages_company/packageDetails.vue:194", this.displayText);
- },
- swiperChange(event) {
- this.activeImg = event.detail.current + 1;
- },
- handleDoctorClick(item) {
- this.doctorShow = false;
- this.doctorId = item.doctorId;
- uni.navigateTo({
- url: "/pages_index/packageForm?packageId=" + this.packageId + "&doctorId=" + this.doctorId
- });
- },
- lower(event) {
- if (this.doctorTotal > this.doctors.length) {
- this.doctorPageNum++;
- this.getPackageDoctorList();
- }
- },
- doctorOpen() {
- this.doctorShow = true;
- },
- doctorClose() {
- this.doctorShow = false;
- },
- showImg() {
- uni.previewImage({
- urls: this.imgs,
- current: this.imgs[0]
- });
- },
- getPackageDoctorList() {
- if (this.doctorLastPage) {
- return;
- }
- var data = {
- packageId: this.packageId,
- pageNum: this.doctorPageNum,
- pageSize: 10
- };
- var that = this;
- getPackageDoctorList(data).then(
- (res) => {
- if (res.code == 200) {
- if (this.doctorPageNum == 0) {
- that.doctors = res.data.list;
- } else {
- that.doctors = that.doctors.concat(res.data.list);
- }
- this.doctorLastPage = res.data.isLastPage;
- this.doctorTotal = res.data.total;
- formatAppLog("log", "at pages_company/packageDetails.vue:250", that.doctors);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- getPackageById() {
- let data = { packageId: this.packageId };
- getPackageById(data).then(
- (res) => {
- if (res.code == 200) {
- this.item = res.data;
- if (res.data.images != null) {
- this.imgs = res.data.images.split(",");
- } else {
- this.activeImg = 0;
- }
- this.describe = JSON.parse(this.item.describeJson);
- if (this.item.productJson != null) {
- this.products = JSON.parse(this.item.productJson);
- }
- formatAppLog("log", "at pages_company/packageDetails.vue:278", this.imgs);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- };
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createCommentVNode(' <view class="img-box" @click="showImg()">\r\n <image :src="item.imgUrl"></image>\r\n </view> '),
- vue.createElementVNode("view", { class: "cont-box" }, [
- vue.createElementVNode("view", {
- class: "goods-banner",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.showImg())
- }, [
- vue.createElementVNode(
- "swiper",
- {
- class: "swiper",
- "indicator-dots": false,
- circular: true,
- autoplay: true,
- interval: 3e3,
- duration: 1e3,
- "indicator-color": "rgba(255, 255, 255, 0.6)",
- "indicator-active-color": "#ffffff",
- onChange: _cache[0] || (_cache[0] = (...args) => $options.swiperChange && $options.swiperChange(...args))
- },
- [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.imgs, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("swiper-item", {
- class: "swiper-item",
- key: index2
- }, [
- vue.createElementVNode("image", {
- src: item,
- mode: "aspectFit"
- }, null, 8, ["src"])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ],
- 32
- /* NEED_HYDRATION */
- ),
- vue.createCommentVNode(" 数量 "),
- vue.createElementVNode(
- "view",
- { class: "num-box" },
- vue.toDisplayString($data.activeImg) + "/" + vue.toDisplayString($data.imgs.length),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "package-box" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- $data.item.cycle > 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "cycle"
- },
- "用药周期" + vue.toDisplayString($data.item.cycle) + "天",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.item.duration > 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "duration"
- },
- "签约时长" + vue.toDisplayString($data.item.duration) + "天",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("view", { class: "price-box" }, [
- $data.item != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "price"
- },
- "¥" + vue.toDisplayString($data.item.price.toFixed(2)) + "元/日",
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.item != null && $data.item.packageSubType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "price"
- }, "咨询包")) : vue.createCommentVNode("v-if", true),
- $data.item != null && $data.item.packageSubType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "price"
- }, "治疗包")) : vue.createCommentVNode("v-if", true),
- $data.item != null && $data.item.packageSubType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "price"
- }, "产品包")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "count" },
- vue.toDisplayString($data.item.sales) + "人已购",
- 1
- /* TEXT */
- )
- ])
- ]),
- $data.products.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "drug-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "产品列表")
- ]),
- vue.createElementVNode("view", { class: "drug-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.products, (product, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "drug-item" }, [
- ($data.displayMore == 0 ? index2 < 2 : true) ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "drug"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: product.image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(product.productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString(product.sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode(
- "view",
- { class: "use" },
- vue.toDisplayString(product.usageMethod),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text>\r\n <text class="num">{{product.price.toFixed(2)}}</text> ')
- ]),
- vue.createCommentVNode(' <view class="amount">x{{product.count}}</view> ')
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ]),
- $data.products.length > 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "display-more",
- onClick: _cache[2] || (_cache[2] = ($event) => $options.showMore())
- },
- vue.toDisplayString($data.displayText),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.use != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "功能")
- ]),
- $data.describe != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "desc",
- innerHTML: $data.describe.use
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- $data.item.indication != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "主治")
- ]),
- $data.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "desc",
- innerHTML: $data.item.indication
- }, null, 8, ["innerHTML"])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.usageMethod != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "服用/使用方式")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.describe.usageMethod
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.forPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "适宜人群")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.describe.forPeople
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- $data.describe.tabooPeople != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "禁忌人群")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.describe.tabooPeople
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- $data.item.explain != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "desc-box"
- }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "方解/搭配优势")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.explain
- }, null, 8, ["innerHTML"])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "desc-box" }, [
- vue.createElementVNode("view", { class: "title-box" }, [
- vue.createElementVNode("view", { class: "line" }),
- vue.createElementVNode("view", { class: "title" }, "套餐描述")
- ]),
- vue.createElementVNode("view", {
- class: "desc",
- innerHTML: $data.item.desc
- }, null, 8, ["innerHTML"])
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-foot" }, [
- vue.createElementVNode("view", { class: "p-price-box" }, [
- vue.createElementVNode("view", { class: "p-name" }, "¥"),
- $data.item != null ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "p-price"
- },
- vue.toDisplayString($data.item.totalPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", { class: "btn buy" }, [
- vue.createTextVNode(" 分享 "),
- vue.createElementVNode("button", {
- class: "contact-btn",
- "data-name": "shareBtn",
- "open-type": "share"
- }, "分享")
- ])
- ])
- ])
- ]);
- }
- const Pages_companyPackageDetails = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageDetails.vue"]]);
- const _sfc_main$9 = {
- mixins: [MescrollMixin],
- data() {
- return {
- orderStatusOptions: [],
- searchKey: "",
- status: "0",
- tabs: [
- { name: "全部", id: "0" },
- { name: "待支付", id: "1" },
- { name: "服务中", id: "2" },
- { name: "已完成", id: "3" },
- { name: "已取消", id: "-1" },
- { name: "已退款", id: "-2" }
- ],
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad(options) {
- var that = this;
- uni.$on("refreshPackageOrder", () => {
- that.mescroll.resetUpScroll();
- });
- this.getDictByKey("sys_package_order_status");
- },
- onShow() {
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_package_order_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- showDetails(item) {
- uni.navigateTo({
- url: "/pages_company/packageOrderDetails?orderId=" + item.orderId
- });
- },
- tabChange(item) {
- this.status = item.id;
- formatAppLog("log", "at pages_company/packageOrderList.vue:141", item);
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getCompanyUserPackageOrderList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: true,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: $data.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-box" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-item",
- onClick: vue.withModifiers(($event) => $options.showDetails(item), ["stop"])
- }, [
- vue.createElementVNode("view", { class: "top-box" }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "订单号:" + vue.toDisplayString(item.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "text success"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createElementVNode("view", { class: "package-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: item.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString(item.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- vue.createElementVNode(
- "view",
- { class: "cycle" },
- "用药周期" + vue.toDisplayString(item.cycle) + "天",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "duration" },
- "签约时长" + vue.toDisplayString(item.duration) + "天",
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(' <view class="price-box">\n <view class="price">¥30元/日</view>\n <view class="count">6.2w人已购</view>\n </view> ')
- ])
- ]),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createCommentVNode(' <view v-if="item.status == 1" class="btn cancel" @click="cancel(item)">取消订单</view> '),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn pay"
- }, "查看订单")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- 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"]]);
- const _sfc_main$8 = {
- data() {
- return {
- orderId: null,
- order: {},
- package: null,
- items: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.getPackageOrderById();
- },
- onShow() {
- },
- methods: {
- getPackageOrderById() {
- var data = { orderId: this.orderId };
- getCompanyUserPackageOrderById(data).then((res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.package = JSON.parse(this.order.packageJson);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- pay() {
- uni.navigateTo({
- url: "/pages_order/packageOrderPay?orderId=" + this.order.orderId
- });
- },
- // 返回上一页
- back() {
- let pages2 = getCurrentPages();
- formatAppLog("log", "at pages_company/packageOrderDetails.vue:180", pages2.length);
- if (pages2.length > 1) {
- uni.navigateBack();
- } else {
- uni.reLaunch({
- url: "/pages/common/launch"
- });
- }
- },
- // 复制订单编号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- }
- }
- };
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createCommentVNode(" 订单状态 "),
- vue.createElementVNode("view", { class: "order-status" }, [
- vue.createCommentVNode(" 待付款 "),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待付款"),
- vue.createCommentVNode(' <text class="desc">请在{{payLimitTime}}前完成支付</text> ')
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 服务中 "),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b71efb4b5ca54564b553569d578738b4.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "服务中"),
- vue.createElementVNode("text", { class: "desc" }, "正在服务中")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已完成 "),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "已完成"),
- vue.createElementVNode("text", { class: "desc" }, "服务已完成")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode("交易取消 "),
- $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "交易关闭"),
- vue.createElementVNode("text", { class: "desc" }, "订单已取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "退款成功"),
- vue.createElementVNode("text", { class: "desc" }, "已成功退款")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "package-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("image", {
- src: $data.package.imgUrl
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode(
- "view",
- { class: "title" },
- vue.toDisplayString($data.package.packageName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "desc" }, [
- vue.createElementVNode(
- "view",
- { class: "cycle" },
- "用药周期" + vue.toDisplayString($data.package.cycle) + "天",
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "duration" },
- "签约时长" + vue.toDisplayString($data.package.duration) + "天",
- 1
- /* TEXT */
- )
- ]),
- vue.createCommentVNode(' <view class="price-box">\r\n <view class="price">¥30元/日</view>\r\n <view class="count">6.2w人已购</view>\r\n </view> ')
- ])
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderSn))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付方式"),
- $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "微信支付")) : vue.createCommentVNode("v-if", true),
- $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "物流代收")) : vue.createCommentVNode("v-if", true),
- $data.order.payType == 3 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 2,
- class: "text"
- }, "货到付款")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额"),
- $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "抵扣金额"),
- $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "代收金额"),
- $data.order.payRemain != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payRemain.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "运费金额"),
- $data.order.payDelivery != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payDelivery.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payTime),
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createCommentVNode(' <view class="btn cancel" v-if="order.status==1" @click="cancel()">取消订单</view> '),
- vue.createCommentVNode(' <view class="btn pay" v-if="order.status==1" @click="pay()">支付</view> ')
- ])
- ]);
- }
- const Pages_companyPackageOrderDetails = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/packageOrderDetails.vue"]]);
- let request = new Request$1().http;
- function getCouponList(data) {
- return request("/app/coupon/getCouponList", data, "GET");
- }
- function getCouponById(data) {
- return request("/app/coupon/getCouponById", data, "GET");
- }
- function genCode(data) {
- return request("/app/coupon/genCode", data, "GET");
- }
- function receive(data) {
- return request("/app/coupon/receive", data, "POST", "application/json;charset=UTF-8");
- }
- const _sfc_main$7 = {
- name: "UserCoupon",
- props: {},
- mixins: [MescrollMixin],
- // 使用mixin
- data: function() {
- return {
- keyword: "",
- cateOptions: [],
- cateId: null,
- couponType: null,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: [],
- isShare: null
- };
- },
- watch: {},
- onLoad(options) {
- this.couponType = options.couponType;
- this.isShare = options.isShare;
- },
- onShow() {
- if (this.couponType == 5) {
- this.getDictByKey("sys_package_private_type");
- } else if (this.couponType == 6) {
- this.getDictByKey("sys_package_disease_type");
- }
- },
- methods: {
- choseCate(item) {
- this.cateId = item.dictValue;
- this.mescroll.resetUpScroll();
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- this.cateOptions = res.data;
- }
- },
- (err) => {
- }
- );
- },
- doSearch() {
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.keyword,
- couponType: this.couponType,
- pageNum: page2.num,
- pageSize: page2.size
- };
- if (this.cateId != null) {
- data.cateId = this.cateId;
- }
- getCouponList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- _ctx.couponType == 5 || _ctx.couponType == 6 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "top-content"
- }, [
- vue.createCommentVNode(" 搜索框 "),
- vue.createElementVNode("view", { class: "search-cont" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "icon-search",
- src: "/static/images/icon_search.png",
- mode: ""
- }),
- vue.withDirectives(vue.createElementVNode(
- "input",
- {
- type: "text",
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keyword = $event),
- placeholder: "输入名称搜索",
- "confirm-type": "search",
- onConfirm: _cache[1] || (_cache[1] = (...args) => $options.doSearch && $options.doSearch(...args)),
- "placeholder-style": "font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;"
- },
- null,
- 544
- /* NEED_HYDRATION, NEED_PATCH */
- ), [
- [vue.vModelText, _ctx.keyword]
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "cate-list" }, [
- vue.createCommentVNode(" 关键字列表 "),
- vue.createElementVNode("scroll-view", { "scroll-x": "true" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.cateOptions, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: vue.normalizeClass(_ctx.cateId == item.dictValue ? "item active" : "item"),
- onClick: ($event) => $options.choseCate(item)
- }, vue.toDisplayString(item.dictLabel), 11, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createVNode(_component_mescroll_body, {
- top: _ctx.couponType == 5 || _ctx.couponType == 6 ? "192rpx" : "0rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: _ctx.downOption,
- up: _ctx.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "tui-coupon-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(_ctx.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "tui-coupon-item tui-top20",
- key: index2
- }, [
- vue.createElementVNode("image", {
- src: "/static/images/bg_coupon_3x.png",
- class: "tui-coupon-bg",
- mode: "widthFix"
- }),
- vue.createElementVNode("view", { class: "tui-coupon-item-left" }, [
- vue.createElementVNode("view", { class: "tui-coupon-price-box" }, [
- vue.createElementVNode("view", { class: "tui-coupon-price-sign" }, "¥"),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tui-coupon-price", { "tui-price-small": false }])
- },
- vue.toDisplayString(item.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "tui-coupon-intro" },
- "满" + vue.toDisplayString(item.minPrice.toFixed(2)) + "元可用",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "tui-coupon-item-right" }, [
- vue.createElementVNode("view", { class: "tui-coupon-content" }, [
- vue.createElementVNode("view", { class: "tui-coupon-title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "tui-coupon-title" },
- vue.toDisplayString(item.title),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "tui-coupon-rule" }, [
- vue.createElementVNode("view", { class: "tui-rule-box tui-padding-btm" }, [
- vue.createElementVNode("view", { class: "tui-coupon-circle" }),
- vue.createElementVNode("view", { class: "tui-coupon-text" }, "不可叠加使用")
- ]),
- vue.createElementVNode("view", { class: "tui-rule-box" }, [
- vue.createElementVNode("view", { class: "tui-coupon-circle" }),
- vue.createElementVNode(
- "view",
- { class: "tui-coupon-text" },
- vue.toDisplayString(item.limitTime) + " 到期",
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "tui-btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn receive",
- onClick: ($event) => $options.navTo("/pages_company/couponDetails?isShare=" + _ctx.isShare + "&couponId=" + item.couponId)
- }, "查看", 8, ["onClick"])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["top", "onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const _sfc_main$6 = {
- name: "getCoupon",
- props: {},
- data: function() {
- return {
- couponId: null,
- item: null,
- isShare: null,
- code: null
- };
- },
- onLoad(options) {
- this.couponId = options.couponId;
- this.code = options.code;
- if (!this.$isEmpty(options.isShare)) {
- this.isShare = options.isShare;
- this.genCode();
- } else {
- uni.hideShareMenu();
- }
- formatAppLog("log", "at pages_company/couponDetails.vue:63", options.couponId);
- this.companyId = uni.getStorageSync("companyId");
- this.companyUserId = uni.getStorageSync("companyUserId");
- this.getCouponById();
- },
- //发送给朋友
- onShareAppMessage(res) {
- uni.showShareMenu({
- withShareTicket: true
- });
- wx.updateShareMenu({
- isPrivateMessage: true,
- withShareTicket: true,
- success(res2) {
- formatAppLog("log", "at pages_company/couponDetails.vue:78", "updateShareMenu: ", res2);
- },
- fail() {
- }
- });
- return {
- title: this.item.title,
- path: "/pages_company/couponDetails?couponId=" + this.item.couponId + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId + "&code=" + this.code
- };
- },
- mounted: function() {
- },
- onShow() {
- },
- methods: {
- genCode: function() {
- let that = this;
- var data = { couponId: this.couponId };
- genCode(data).then(function(res) {
- that.code = res.data;
- }).catch(function(err) {
- });
- },
- getCouponById: function() {
- let that = this;
- var data = {
- couponId: this.couponId
- };
- getCouponById(data).then(function(res) {
- that.item = res.data;
- }).catch(function(err) {
- uni.showToast({
- title: err.msg,
- icon: "none",
- duration: 2e3
- });
- });
- },
- receive: function() {
- var data = {
- couponId: this.item.couponId,
- companyId: this.companyId,
- companyUserId: this.companyUserId,
- code: this.code
- };
- receive(data).then(function(res) {
- if (res.code == 200) {
- uni.showToast({
- title: "领取成功",
- icon: "success",
- duration: 2e3
- });
- } else {
- uni.showToast({
- title: res.msg,
- duration: 2e3
- });
- }
- }).catch(function(err) {
- uni.showToast({
- title: err.msg,
- icon: "none",
- duration: 2e3
- });
- });
- }
- }
- };
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
- _ctx.item != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "tui-coupon-list"
- }, [
- vue.createElementVNode("view", { class: "tui-coupon-item tui-top20" }, [
- vue.createElementVNode("image", {
- src: "/static/images/bg_coupon_3x.png",
- class: "tui-coupon-bg",
- mode: "widthFix"
- }),
- vue.createElementVNode("view", { class: "tui-coupon-item-left" }, [
- vue.createElementVNode("view", { class: "tui-coupon-price-box" }, [
- vue.createElementVNode("view", { class: "tui-coupon-price-sign" }, "¥"),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass(["tui-coupon-price", { "tui-price-small": false }])
- },
- vue.toDisplayString(_ctx.item.price.toFixed(2)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "tui-coupon-intro" },
- "满" + vue.toDisplayString(_ctx.item.minPrice.toFixed(2)) + "元可用",
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "tui-coupon-item-right" }, [
- vue.createElementVNode("view", { class: "tui-coupon-content" }, [
- vue.createElementVNode("view", { class: "tui-coupon-title-box" }, [
- vue.createElementVNode(
- "view",
- { class: "tui-coupon-title" },
- vue.toDisplayString(_ctx.item.title),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "tui-coupon-rule" }, [
- vue.createElementVNode("view", { class: "tui-rule-box tui-padding-btm" }, [
- vue.createElementVNode("view", { class: "tui-coupon-circle" }),
- vue.createElementVNode("view", { class: "tui-coupon-text" }, "不可叠加使用")
- ]),
- vue.createElementVNode("view", { class: "tui-rule-box" }, [
- vue.createElementVNode("view", { class: "tui-coupon-circle" }),
- vue.createElementVNode(
- "view",
- { class: "tui-coupon-text" },
- vue.toDisplayString(_ctx.item.limitTime) + " 到期",
- 1
- /* TEXT */
- )
- ])
- ])
- ])
- ]),
- vue.createElementVNode("view", { class: "tui-btn-box" }, [
- _ctx.item.remainNumber > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn receive",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.receive())
- }, "立即领取")) : _ctx.item.remainNumber == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "btn cancel"
- }, "已领完")) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$5 = {
- mixins: [MescrollMixin],
- // 使用mixin
- data() {
- return {
- orderStatusOptions: [],
- orderTypeOptions: [],
- inquiryTypeOptions: [],
- tabs: [
- {
- id: 2,
- name: "快速问诊"
- },
- {
- id: 1,
- name: "专家问诊"
- },
- {
- id: 3,
- name: "开药问诊"
- }
- ],
- inquiryType: 2,
- mescroll: null,
- downOption: {
- //下拉刷新
- use: true,
- auto: false
- // 不自动加载 (mixin已处理第一个tab触发downCallback)
- },
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- dataList: []
- };
- },
- onLoad() {
- this.getDictByKey("sys_inquiry_order_type");
- this.getDictByKey("sys_inquiry_type");
- this.getDictByKey("sys_inquiry_status");
- var that = this;
- uni.$on("refreshInquiryOrder", () => {
- that.mescroll.resetUpScroll();
- });
- },
- onShow() {
- },
- methods: {
- cancel(item) {
- uni.showModal({
- title: "提示",
- content: "确认取消订单吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: item.orderId };
- cancel(data).then(
- (res2) => {
- if (res2.code == 200) {
- this.mescroll.resetUpScroll();
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- ping(item) {
- uni.navigateTo({
- url: "/pages_order/pingOrder?orderId=" + item.orderId
- });
- },
- pay(item) {
- uni.navigateTo({
- url: "/pages_order/inquiryPay?orderId=" + item.orderId
- });
- },
- toIM(item) {
- var id = "C2CD-" + item.doctorId;
- formatAppLog("log", "at pages_company/inquiryOrderList.vue:190", uni.$TUIKit.TUIConversationServer);
- store.commit("timStore/setConversationID", id);
- uni.$TUIKit.TUIConversationServer.setMessageRead(id);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
- var _a;
- store.commit("timStore/setImType", res.customData);
- const { conversation } = res.data;
- store.commit("timStore/setImType", 1);
- store.commit("timStore/setConversation", conversation);
- let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
- conversation.userProfile;
- url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}&orderId=` + item.orderId;
- uni.redirectTo({ url: url2 });
- }).catch((err) => {
- formatAppLog("warn", "at pages_company/inquiryOrderList.vue:217", "获取 group profile 异常 = ", err);
- });
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_inquiry_order_type") {
- this.orderTypeOptions = res.data;
- }
- if (key == "sys_inquiry_type") {
- this.inquiryTypeOptions = res.data;
- }
- if (key == "sys_inquiry_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- inquiryTypeChange(item) {
- this.inquiryType = item.id;
- formatAppLog("log", "at pages_company/inquiryOrderList.vue:243", item);
- this.mescroll.resetUpScroll();
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback() {
- this.mescroll.resetUpScroll();
- },
- /*上拉加载的回调*/
- upCallback(page2) {
- var that = this;
- var data = {
- inquiryType: this.inquiryType,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getCompanyUserInquiryOrderList(data).then((res) => {
- if (res.code == 200) {
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- }
- }
- };
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.inquiryTypeChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- down: $data.downOption,
- up: $data.upOption,
- onDown: $options.downCallback,
- onUp: $options.upCallback
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- class: "order-item",
- onClick: ($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId)
- }, [
- vue.createElementVNode("view", { class: "order-top" }, [
- item.doctorId != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "left"
- }, [
- vue.createElementVNode("image", {
- class: "head",
- mode: "aspectFill",
- src: item.avatar
- }, null, 8, ["src"]),
- vue.createElementVNode(
- "view",
- { class: "name" },
- vue.toDisplayString(item.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "dept" },
- vue.toDisplayString(item.deptName),
- 1
- /* TEXT */
- )
- ])) : vue.createCommentVNode("v-if", true),
- item.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "left"
- }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "title"
- }, " 支付后为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "title"
- }, " 正在为您安排医生接诊 ")) : vue.createCommentVNode("v-if", true),
- item.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "title"
- }, " 订单已取消 ")) : vue.createCommentVNode("v-if", true),
- item.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "title"
- }, " 订单已退款 ")) : vue.createCommentVNode("v-if", true),
- item.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "title"
- }, " 医生已拒单 ")) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 3,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 4,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 5,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 6,
- class: "status gray"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "order-cont" }, [
- vue.createElementVNode("view", { class: "order-type" }, [
- vue.createTextVNode(" 订单类型: "),
- vue.createElementVNode(
- "text",
- null,
- vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, item.inquiryType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- null,
- "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, item.orderType)),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode(
- "view",
- { class: "order-desc" },
- "病情描述:" + vue.toDisplayString(item.title),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "order-time-box" }, [
- vue.createElementVNode(
- "view",
- { class: "order-time" },
- vue.toDisplayString(item.createTime),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: vue.withModifiers(($event) => $options.navTo("./inquiryOrderDetails?orderId=" + item.orderId), ["stop"])
- }, "查看", 8, ["onClick"])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "down", "up", "onDown", "onUp"])
- ]);
- }
- 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"]]);
- const _sfc_main$4 = {
- data() {
- return {
- report: null,
- patient: null,
- hospital: null,
- department: null,
- doctor: null,
- order: null,
- orderId: null,
- orderStatusOptions: [],
- orderTypeOptions: [],
- inquiryTypeOptions: [],
- reportImages: [],
- tongueImages: [],
- faceImages: [],
- forms: []
- };
- },
- onLoad(options) {
- this.orderId = options.orderId;
- this.getDictByKey("sys_inquiry_order_type");
- this.getDictByKey("sys_inquiry_type");
- this.getDictByKey("sys_inquiry_status");
- },
- onShow() {
- this.getCompanyUserInquiryOrderById();
- },
- methods: {
- cancel() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确认取消订单吗?",
- showCancel: true,
- cancelText: "取消",
- confirmText: "确定",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: this.orderId };
- cancel(data).then(
- (res2) => {
- if (res2.code == 200) {
- that.getMyInquiryOrderById();
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- },
- (rej) => {
- }
- );
- }
- }
- });
- },
- ping() {
- uni.navigateTo({
- url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId
- });
- },
- pay() {
- uni.navigateTo({
- url: "/pages_order/inquiryPay?orderId=" + this.orderId
- });
- },
- toIM() {
- var that = this;
- var id = "C2CD-" + this.doctor.doctorId;
- formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:371", uni.$TUIKit.TUIConversationServer);
- store.commit("timStore/setConversationID", id);
- uni.$TUIKit.TUIConversationServer.setMessageRead(id);
- uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
- var _a;
- uni.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => {
- formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:379", "更新order");
- }).catch((err) => {
- });
- formatAppLog("log", "at pages_company/inquiryOrderDetails.vue:384", res);
- const { conversation } = res.data;
- store.commit("timStore/setImType", 1);
- store.commit("timStore/setConversation", conversation);
- let url2 = "/pages/TUIKit/TUIPages/TUIChat/index";
- conversation.userProfile;
- url2 = `${url2}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
- uni.redirectTo({ url: url2 });
- }).catch((err) => {
- formatAppLog("warn", "at pages_company/inquiryOrderDetails.vue:398", "获取 group profile 异常 = ", err);
- });
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- },
- copyOrderSn() {
- uni.setClipboardData({
- data: this.order.orderSn,
- success: function() {
- uni.showToast({
- title: "复制成功",
- icon: "none"
- });
- }
- });
- },
- getCompanyUserInquiryOrderById() {
- var that = this;
- var data = { orderId: this.orderId };
- getCompanyUserInquiryOrderById(data).then(
- (res) => {
- if (res.code == 200) {
- this.order = res.data.order;
- this.report = res.data.report;
- this.patient = JSON.parse(res.data.order.patientJson);
- if (this.report != null && this.report.formJson != null) {
- this.forms = JSON.parse(this.report.formJson);
- }
- if (that.patient.reportImages != null) {
- that.reportImages = that.patient.reportImages.split(",");
- }
- if (that.patient.tongueImages != null) {
- that.tongueImages = that.patient.tongueImages.split(",");
- }
- if (that.patient.faceImages != null) {
- that.faceImages = that.patient.faceImages.split(",");
- }
- this.doctor = res.data.doctor;
- this.department = res.data.department;
- this.hospital = res.data.hospital;
- }
- },
- (err) => {
- }
- );
- },
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_inquiry_order_type") {
- this.orderTypeOptions = res.data;
- }
- if (key == "sys_inquiry_type") {
- this.inquiryTypeOptions = res.data;
- }
- if (key == "sys_inquiry_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- navTo(url2) {
- uni.navigateTo({
- url: url2
- });
- }
- }
- };
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_rate = resolveEasycom(vue.resolveDynamicComponent("u-rate"), __easycom_0$6);
- const _component_u_album = resolveEasycom(vue.resolveDynamicComponent("u-album"), __easycom_1$2);
- const _component_u_tag = resolveEasycom(vue.resolveDynamicComponent("u-tag"), __easycom_2);
- return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
- vue.createElementVNode("view", { class: "cont" }, [
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "付款详情"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单类型:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "text",
- { class: "text" },
- "-" + vue.toDisplayString(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
- 1
- /* TEXT */
- )
- ]),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 1,
- class: "status red"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 2,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 3,
- class: "status green"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- $data.order.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 4,
- class: "status gray"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.doctor != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "doc-box"
- }, [
- vue.createElementVNode("view", { class: "title" }, "医生详情"),
- vue.createElementVNode("view", { class: "doc-name-box" }, [
- vue.createElementVNode(
- "view",
- { class: "doc-name" },
- vue.toDisplayString($data.doctor.doctorName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-star" }, [
- vue.createVNode(_component_u_rate, {
- activeColor: "#ffc603",
- count: "5",
- readonly: "",
- modelValue: $data.doctor.pingStar,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.doctor.pingStar = $event)
- }, null, 8, ["modelValue"])
- ])
- ]),
- vue.createElementVNode(
- "view",
- { class: "doc-dept-box" },
- vue.toDisplayString($data.department.deptName) + "|" + vue.toDisplayString($data.doctor.position),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "doc-his-box" },
- vue.toDisplayString($data.hospital.hospitalName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "doc-spec-box" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("view", { class: "title" }, "擅长:"),
- vue.createElementVNode(
- "view",
- { class: "spec" },
- vue.toDisplayString($data.doctor.speciality),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "right" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId))
- }, "详情")
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null && $data.order.inquiryType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "咨询内容"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者信息:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "病情描述:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患病时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.duration),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "就诊情况:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.isVisit),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null && $data.order.inquiryType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "咨询内容"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者信息:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "身高(CM):"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.height),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "体重(KG):"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.weight),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "联系电话:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.mobile),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "学习进度:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.study),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "期望会诊方式:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.usage),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "病情描述:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.drugs),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.duration),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.isVisit),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "面部照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.patient != null && $data.order.inquiryType == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "咨询内容"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "患者信息:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.patientName) + " " + vue.toDisplayString($data.patient.sex == 1 ? "男" : "女") + " " + vue.toDisplayString($data.patient.age) + "岁",
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "病情描述:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.title),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "正在服用药品:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.drugs),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "本次患病时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.duration),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "是否就诊过:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.patient.isVisit),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "检测报告或患处照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.reportImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "舌苔照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.tongueImages }, null, 8, ["urls"])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "面部照片:")
- ])
- ]),
- vue.createElementVNode("view", null, [
- vue.createVNode(_component_u_album, { urls: $data.faceImages }, null, 8, ["urls"])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "体检信息"),
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.forms, (item) => {
- return vue.openBlock(), vue.createElementBlock("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode(
- "text",
- { class: "label" },
- vue.toDisplayString(item.title) + ":",
- 1
- /* TEXT */
- ),
- vue.createElementVNode("text", { class: "text" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList(item.option, (tag) => {
- return vue.openBlock(), vue.createBlock(_component_u_tag, {
- size: "mini",
- plain: "",
- type: "success",
- style: { "margin-right": "5rpx", "margin-bottom": "5rpx" },
- text: tag
- }, null, 8, ["text"]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])
- ])
- ]);
- }),
- 256
- /* UNKEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "other-info"
- }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单号码:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderSn),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", {
- class: "item-btn",
- onClick: _cache[2] || (_cache[2] = (...args) => $options.copyOrderSn && $options.copyOrderSn(...args))
- }, "复制")
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.money.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("view", { class: "left" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额:"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- $data.order != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn-box"
- }, [
- $data.report != null && $data.order.status >= 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn",
- onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId))
- }, "查看报告")) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ]);
- }
- 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"]]);
- const _sfc_main$3 = {
- mixins: [MescrollMixin],
- data() {
- return {
- orderStatusOptions: [],
- searchKey: "",
- status: "0",
- tabs: [
- { name: "全部", id: "0" },
- { name: "待付款", id: "1" },
- { name: "待发货", id: "2" },
- { name: "待收货", id: "3" },
- { name: "已完成", id: "4" }
- ],
- mescroll: null,
- // 上拉加载的配置
- upOption: {
- onScroll: false,
- use: true,
- // 是否启用上拉加载; 默认true
- page: {
- pae: 0,
- // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10
- // 每页数据的数量,默认10
- },
- noMoreSize: 10,
- // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore: "已经到底了",
- empty: {
- icon: "https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",
- tip: "暂无数据"
- }
- },
- // 列表数据
- dataList: []
- };
- },
- onLoad(option) {
- var that = this;
- uni.$on("refreshStoreOrder", () => {
- that.mescroll.resetUpScroll();
- });
- this.getDictByKey("sys_order_status");
- },
- methods: {
- getDictByKey(key) {
- var data = { key };
- getDictByKey(data).then(
- (res) => {
- if (res.code == 200) {
- if (key == "sys_order_status") {
- this.orderStatusOptions = res.data;
- }
- }
- },
- (err) => {
- }
- );
- },
- goSearch(e) {
- this.searchKey = e.detail.value;
- this.mescroll.resetUpScroll();
- },
- refund(item) {
- uni.navigateTo({
- url: "/pages_order/storeOrderRefundApply?orderId=" + item.orderId
- });
- },
- tabChange(item) {
- this.status = item.id;
- this.mescroll.resetUpScroll();
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll();
- },
- upCallback(page2) {
- var that = this;
- var data = {
- keyword: this.searchKey,
- status: this.status,
- pageNum: page2.num,
- pageSize: page2.size
- };
- getCompanyUserStoreOrderList(data).then((res) => {
- if (res.code == 200) {
- res.data.list.forEach(function(value2, index2, array3) {
- value2.items = JSON.parse(value2.itemJson);
- });
- if (page2.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- // 查看订单详情
- showDetail(item) {
- uni.navigateTo({
- url: "./storeOrderDetail?orderId=" + item.orderId
- });
- },
- finish(item) {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定已收货吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: item.orderId
- };
- finishOrder(data).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- that.mescroll.resetUpScroll();
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- cancel(item) {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定取消订单吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: item.orderId
- };
- cancelOrder(data).then((res2) => {
- if (res2.code == 200) {
- uni.showToast({
- icon: "success",
- title: "操作成功"
- });
- that.mescroll.resetUpScroll();
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- pay(item) {
- uni.navigateTo({
- url: "/pages_order/storeOrderPay?orderId=" + item.orderId
- });
- },
- // 查看物流
- showDelivery(item) {
- uni.navigateTo({
- url: "./storeOrderDelivery?orderId=" + item.orderId
- });
- }
- }
- };
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_u_tabs = resolveEasycom(vue.resolveDynamicComponent("u-tabs"), __easycom_0$7);
- const _component_mescroll_body = resolveEasycom(vue.resolveDynamicComponent("mescroll-body"), __easycom_1$6);
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-fixed" }, [
- vue.createVNode(_component_u_tabs, {
- scrollable: false,
- list: $data.tabs,
- lineColor: "#C39A58",
- onChange: $options.tabChange
- }, null, 8, ["list", "onChange"])
- ]),
- vue.createCommentVNode(" 订单列表 "),
- vue.createVNode(_component_mescroll_body, {
- top: "88rpx",
- bottom: "0",
- ref: "mescrollRef",
- onInit: $options.mescrollInit,
- onDown: $options.downCallback,
- onUp: $options.upCallback,
- down: _ctx.downOption,
- up: $data.upOption
- }, {
- default: vue.withCtx(() => [
- vue.createElementVNode("view", { class: "order-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.dataList, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- onClick: ($event) => $options.showDetail(item),
- key: index2,
- class: "item"
- }, [
- vue.createCommentVNode(" 订单号,状态 "),
- vue.createElementVNode("view", { class: "ordersn-box" }, [
- vue.createElementVNode(
- "view",
- { class: "num" },
- "订单号:" + vue.toDisplayString(item.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", { class: "status-box" }, [
- item.status == 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status > 1 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 1,
- class: "text success"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true),
- item.status < 0 ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 2,
- class: "text info"
- },
- vue.toDisplayString(_ctx.$getDictLabelName($data.orderStatusOptions, item.status)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ]),
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "drug-list" }, [
- item.isPackage != 1 ? (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- vue.renderList(item.items, (subItem, subIndex) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: subIndex,
- class: "drug-item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(subItem.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(subItem.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "drug-info" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(JSON.parse(subItem.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(JSON.parse(subItem.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text> '),
- vue.createCommentVNode(' <text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text> ')
- ]),
- item.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "amount"
- },
- "x" + vue.toDisplayString(JSON.parse(subItem.jsonInfo).num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 实付金额、按钮 "),
- vue.createElementVNode("view", { class: "bottom-box" }, [
- vue.createElementVNode("view", { class: "amount-paid" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额:"),
- vue.createElementVNode("view", { class: "price-box" }, [
- vue.createElementVNode("view", { class: "unit" }, "¥"),
- vue.createElementVNode(
- "view",
- { class: "num" },
- vue.toDisplayString(item.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )
- ])
- ]),
- vue.createElementVNode("view", { class: "btn-box" }, [
- vue.createElementVNode("view", {
- class: "btn",
- onClick: ($event) => $options.showDetail(item)
- }, "查看订单", 8, ["onClick"])
- ])
- ])
- ])
- ], 8, ["onClick"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])
- ]),
- _: 1
- /* STABLE */
- }, 8, ["onInit", "onDown", "onUp", "down", "up"])
- ]);
- }
- const Pages_companyStoreOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderList.vue"]]);
- const _sfc_main$2 = {
- data() {
- return {
- payLimitTime: null,
- orderId: null,
- order: {},
- items: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- },
- onShow() {
- this.getCompanyUserStoreOrderById();
- },
- methods: {
- showPrescribe() {
- var data = { prescribeId: this.order.prescribeId };
- getPrescribeById(data).then(
- (res) => {
- if (res.code == 200) {
- if (res.data.prescribe.prescribeImgUrl != null) {
- var data2 = [];
- data2.push(res.data.prescribe.prescribeImgUrl);
- uni.previewImage({
- current: 0,
- urls: data2
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "电子处方单不存在"
- });
- }
- }
- },
- (err) => {
- }
- );
- },
- getCompanyUserStoreOrderById() {
- var data = { orderId: this.orderId };
- getCompanyUserStoreOrderById(data).then((res) => {
- if (res.code == 200) {
- this.order = res.order;
- this.items = res.items;
- this.payLimitTime = res.payLimitTime;
- this.prescribe = res.prescribe;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- showDelivery() {
- uni.navigateTo({
- url: "./storeOrderDelivery?orderId=" + this.orderId
- });
- },
- cancel() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定取消订单吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: that.order.orderId
- };
- cancelOrder(data).then((res2) => {
- if (res2.code == 200) {
- that.getMyStoreOrderById();
- uni.$emit("refreshStoreOrder");
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- finish() {
- var that = this;
- uni.showModal({
- title: "提示",
- content: "确定已收货吗",
- success: function(res) {
- if (res.confirm) {
- var data = {
- orderId: that.orderId
- };
- finishOrder(data).then((res2) => {
- if (res2.code == 200) {
- that.getMyStoreOrderById();
- uni.$emit("refreshStoreOrder");
- } else {
- uni.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- });
- } else if (res.cancel)
- ;
- }
- });
- },
- pay() {
- uni.navigateTo({
- url: "/pages_order/storeOrderPay?orderId=" + this.order.orderId
- });
- },
- payRemain() {
- uni.navigateTo({
- url: "/pages_user/user/paymentOrderRemain?orderId=" + this.order.orderId
- });
- },
- // 复制订单编号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- // 退货
- refund() {
- uni.navigateTo({
- url: "/pages_order/storeOrderRefundApply?orderId=" + this.orderId
- });
- }
- }
- };
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "cont" }, [
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createCommentVNode(" 订单状态 "),
- vue.createElementVNode("view", { class: "order-status" }, [
- vue.createCommentVNode(" 待付款 "),
- $data.order.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/67eda0644e5847008096525b04cd12ca.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待付款"),
- vue.createElementVNode(
- "text",
- { class: "desc" },
- "请在" + vue.toDisplayString($data.payLimitTime) + "前完成支付",
- 1
- /* TEXT */
- )
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 待发货 "),
- $data.order.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 1,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/520e24fba47441b3b0f73b5250bb0b57.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待发货"),
- vue.createElementVNode("text", { class: "desc" }, "等待后台发货")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已发货、待收货 "),
- $data.order.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 2,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1e6ba423ff7e4537bef87a022d530015.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "待收货"),
- vue.createElementVNode("text", { class: "desc" }, "运输中")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 已完成 "),
- $data.order.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 3,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/0712ba14f3a648afa69c9912fcbf9b61.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "已完成"),
- vue.createElementVNode("text", { class: "desc" }, "订单已确认收货,交易完成")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode("交易取消 "),
- $data.order.status == -3 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 4,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/02f95bd03e854a9c8076aef1e6c05e74.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "交易关闭"),
- vue.createElementVNode("text", { class: "desc" }, "订单已取消")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.status == -1 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 5,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "申请售后"),
- vue.createElementVNode("text", { class: "desc" }, "请等待客服审核")
- ])
- ])) : vue.createCommentVNode("v-if", true),
- $data.order.status == -2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 6,
- class: "inner"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: "https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6020712aa10f4bb08db92957cb7eb8ed.png",
- mode: ""
- })
- ]),
- vue.createElementVNode("view", { class: "status-box" }, [
- vue.createElementVNode("text", { class: "status" }, "退款成功"),
- vue.createElementVNode("text", { class: "desc" }, "已成功退款")
- ])
- ])) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createCommentVNode(" 下单人信息 "),
- $data.order.userName != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "order-placer"
- }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("image", {
- class: "location",
- src: "/static/images/location.png",
- mode: ""
- }),
- vue.createElementVNode("view", { class: "info" }, [
- vue.createElementVNode("view", { class: "name-phone" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.userName),
- 1
- /* TEXT */
- ),
- $data.order.userPhone != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.userPhone),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode(
- "view",
- { class: "address ellipsis2" },
- vue.toDisplayString($data.order.userAddress),
- 1
- /* TEXT */
- )
- ])
- ])
- ])) : vue.createCommentVNode("v-if", true),
- vue.createElementVNode("view", { class: "content" }, [
- vue.createCommentVNode(" 药品列表 "),
- vue.createElementVNode("view", { class: "goods-list" }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.items, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "item"
- }, [
- vue.createElementVNode("view", { class: "img-box" }, [
- vue.createElementVNode("image", {
- src: JSON.parse(item.jsonInfo).image == "" ? "/static/images/drug.svg" : JSON.parse(item.jsonInfo).image,
- mode: "aspectFill"
- }, null, 8, ["src"])
- ]),
- vue.createElementVNode("view", { class: "info-box" }, [
- vue.createElementVNode("view", null, [
- vue.createElementVNode(
- "view",
- { class: "name-box ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).productName),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "spec ellipsis2" },
- vue.toDisplayString(JSON.parse(item.jsonInfo).sku),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "price-num" }, [
- vue.createElementVNode("view", { class: "price" }, [
- vue.createCommentVNode(' <text class="unit">¥</text> '),
- vue.createCommentVNode(' <text class="num" v-if="JSON.parse(item.jsonInfo).price!=null">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> ')
- ]),
- $data.order.ordetType == 1 ? (vue.openBlock(), vue.createElementBlock(
- "view",
- {
- key: 0,
- class: "num"
- },
- "x" + vue.toDisplayString(JSON.parse(item.jsonInfo).num),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- )),
- vue.createCommentVNode(" 已优惠、小计 "),
- vue.createElementVNode("view", { class: "sub-total" }, [
- vue.createElementVNode(
- "view",
- { class: "discount" },
- " 订单金额:¥" + vue.toDisplayString($data.order.payPrice),
- 1
- /* TEXT */
- ),
- 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> ')
- ])
- ]),
- vue.createCommentVNode(" 订单信息 "),
- vue.createElementVNode("view", { class: "order-info" }, [
- vue.createElementVNode("view", { class: "title" }, "订单信息"),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单编号"),
- vue.createElementVNode("view", { class: "sn-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.orderCode),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy-btn",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.order.orderCode))
- }, "复制")
- ])
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "下单时间"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.order.createTime),
- 1
- /* TEXT */
- )
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付方式"),
- $data.order.payType == 1 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 0,
- class: "text"
- }, "微信支付")) : vue.createCommentVNode("v-if", true),
- $data.order.payType == 2 ? (vue.openBlock(), vue.createElementBlock("text", {
- key: 1,
- class: "text"
- }, "物流代收")) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "订单金额"),
- $data.order.totalPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.totalPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "优惠金额"),
- $data.order.discountMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.discountMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "应付金额"),
- $data.order.payPrice != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payPrice.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付金额"),
- $data.order.payMoney != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- "¥" + vue.toDisplayString($data.order.payMoney.toFixed(2)),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- vue.createElementVNode("view", { class: "item" }, [
- vue.createElementVNode("text", { class: "label" }, "支付时间"),
- $data.order.payTime != null ? (vue.openBlock(), vue.createElementBlock(
- "text",
- {
- key: 0,
- class: "text"
- },
- vue.toDisplayString($data.order.payTime),
- 1
- /* TEXT */
- )) : vue.createCommentVNode("v-if", true)
- ]),
- 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> ')
- ])
- ])
- ])
- ]),
- vue.createCommentVNode(" 按钮 "),
- vue.createElementVNode("view", { class: "btn-box" }, [
- $data.order.deliverySn != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "btn pay",
- onClick: _cache[1] || (_cache[1] = ($event) => $options.showDelivery())
- }, "查看物流")) : vue.createCommentVNode("v-if", true)
- ])
- ]);
- }
- const Pages_companyStoreOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderDetail.vue"]]);
- const _sfc_main$1 = {
- data() {
- return {
- orderId: null,
- deliverySn: null,
- express: {},
- expressList: []
- };
- },
- onLoad(option) {
- this.orderId = option.orderId;
- this.getExpress();
- },
- methods: {
- getExpress() {
- var data = { orderId: this.orderId };
- getExpress(data).then((res) => {
- if (res.code == 200) {
- this.express = res.express;
- this.expressList = res.data;
- this.deliverySn = res.deliverySn;
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- });
- },
- // 返回上一页
- back() {
- uni.navigateBack();
- },
- // 复制运单号
- copyOrderSn(text) {
- uni.setClipboardData({
- data: text,
- success: () => {
- uni.showToast({
- title: "内容已成功复制到剪切板",
- icon: "none"
- });
- }
- });
- },
- // 拨打电话
- callPhone(phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return vue.openBlock(), vue.createElementBlock("view", null, [
- vue.createElementVNode("view", { class: "top-cont" }, [
- vue.createCommentVNode(" 背景图片 "),
- vue.createElementVNode("view", { class: "bg" }),
- vue.createElementVNode("view", { class: "top-inner" }, [
- vue.createCommentVNode(" 运单号 "),
- vue.createElementVNode("view", { class: "waybill-number" }, [
- vue.createElementVNode("view", { class: "inner" }, [
- vue.createElementVNode("view", { class: "num-box" }, [
- vue.createElementVNode("text", { class: "text" }, "运单号"),
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.deliverySn),
- 1
- /* TEXT */
- ),
- vue.createElementVNode("view", {
- class: "copy",
- onClick: _cache[0] || (_cache[0] = ($event) => $options.copyOrderSn($data.deliverySn))
- }, "复制")
- ]),
- vue.createElementVNode("view", { class: "kf-box" }, [
- vue.createElementVNode(
- "text",
- { class: "text" },
- vue.toDisplayString($data.express.name),
- 1
- /* TEXT */
- ),
- vue.createCommentVNode(' <text class="text">客服电话:95311</text> ')
- ])
- ])
- ]),
- $data.expressList != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "content"
- }, [
- vue.createCommentVNode(" 物流信息 "),
- $data.expressList.Traces != null ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "refund-steps"
- }, [
- (vue.openBlock(true), vue.createElementBlock(
- vue.Fragment,
- null,
- vue.renderList($data.expressList.Traces, (item, index2) => {
- return vue.openBlock(), vue.createElementBlock("view", {
- key: index2,
- class: "steps"
- }, [
- vue.createElementVNode("view", { class: "title" }, [
- vue.createCommentVNode(' <text v-if="index == 0" class="text black-text">已签收</text> '),
- vue.createCommentVNode(' <text class="text gray-bold">运输中</text> '),
- vue.createCommentVNode(" 左侧灰色圆点 "),
- vue.createElementVNode("view", { class: "dot" }),
- vue.createCommentVNode(" 对号 "),
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/complete.png",
- mode: ""
- }),
- vue.createCommentVNode(" 运输中图标 "),
- vue.createElementVNode("image", {
- class: "img",
- src: "/static/images/car40.png",
- mode: ""
- })
- ]),
- vue.createElementVNode(
- "view",
- { class: "desc-text" },
- vue.toDisplayString(item.AcceptStation),
- 1
- /* TEXT */
- ),
- vue.createElementVNode(
- "view",
- { class: "time" },
- vue.toDisplayString(item.AcceptTime),
- 1
- /* TEXT */
- )
- ]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))
- ])) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true)
- ])
- ])
- ]);
- }
- const Pages_companyStoreOrderDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/Project/2023/问诊平台/his_user_app/pages_company/storeOrderDelivery.vue"]]);
- __definePage("pages/common/launch", PagesCommonLaunch);
- __definePage("pages/auth/login", PagesAuthLogin);
- __definePage("pages/index/index", PagesIndexIndex);
- __definePage("pages/index/h5", PagesIndexH5);
- __definePage("pages/index/content", PagesIndexContent);
- __definePage("pages/doctor/index", PagesDoctorIndex);
- __definePage("pages/store/index", PagesStoreIndex);
- __definePage("pages/user/index", PagesUserIndex);
- __definePage("pages/TUIKit/TUIPages/TUIConversation/index", PagesTUIKitTUIPagesTUIConversationIndex);
- __definePage("pages/TUIKit/TUIPages/TUIConversation/create", PagesTUIKitTUIPagesTUIConversationCreate);
- __definePage("pages/TUIKit/TUIPages/TUIChat/index", PagesTUIKitTUIPagesTUIChatIndex);
- __definePage("pages/TUIKit/TUIPages/TUIChat/components/message-elements/video-play", PagesTUIKitTUIPagesTUIChatComponentsMessageElementsVideoPlay);
- __definePage("pages_index/testList", Pages_indexTestList);
- __definePage("pages_index/testDetails", Pages_indexTestDetails);
- __definePage("pages_index/test", Pages_indexTest);
- __definePage("pages_index/testResult", Pages_indexTestResult);
- __definePage("pages_index/testResultImg", Pages_indexTestResultImg);
- __definePage("pages_index/articleList", Pages_indexArticleList);
- __definePage("pages_index/articleDetails", Pages_indexArticleDetails);
- __definePage("pages_index/diseaseList", Pages_indexDiseaseList);
- __definePage("pages_index/diseaseDetails", Pages_indexDiseaseDetails);
- __definePage("pages_index/hospitalList", Pages_indexHospitalList);
- __definePage("pages_index/hospitalDetails", Pages_indexHospitalDetails);
- __definePage("pages_index/search", Pages_indexSearch);
- __definePage("pages_index/famousPrescribeList", Pages_indexFamousPrescribeList);
- __definePage("pages_index/famousPrescribeDetails", Pages_indexFamousPrescribeDetails);
- __definePage("pages_index/vesselList", Pages_indexVesselList);
- __definePage("pages_index/vesselDetails", Pages_indexVesselDetails);
- __definePage("pages_index/chineseMedicineList", Pages_indexChineseMedicineList);
- __definePage("pages_index/chineseMedicineDetails", Pages_indexChineseMedicineDetails);
- __definePage("pages_index/medicatedFoodList", Pages_indexMedicatedFoodList);
- __definePage("pages_index/medicatedFoodDetails", Pages_indexMedicatedFoodDetails);
- __definePage("pages_index/questionsList", Pages_indexQuestionsList);
- __definePage("pages_index/questionsDetails", Pages_indexQuestionsDetails);
- __definePage("pages_index/packageList", Pages_indexPackageList);
- __definePage("pages_index/packageDetails", Pages_indexPackageDetails);
- __definePage("pages_index/packageForm", Pages_indexPackageForm);
- __definePage("pages_doctor/doctorArticleList", Pages_doctorDoctorArticleList);
- __definePage("pages_doctor/doctorArticleDetails", Pages_doctorDoctorArticleDetails);
- __definePage("pages_doctor/doctorList", Pages_doctorDoctorList);
- __definePage("pages_doctor/doctorDetails", Pages_doctorDoctorDetails);
- __definePage("pages_doctor/doctorPingList", Pages_doctorDoctorPingList);
- __definePage("pages_doctor/doctorInfo", Pages_doctorDoctorInfo);
- __definePage("pages_doctor/doctorImgs", Pages_doctorDoctorImgs);
- __definePage("pages_order/inquiryOrderList", Pages_orderInquiryOrderList);
- __definePage("pages_order/inquiryOrderDetails", Pages_orderInquiryOrderDetails);
- __definePage("pages_order/inquiryOrderPingList", Pages_orderInquiryOrderPingList);
- __definePage("pages_order/inquirySelect", Pages_orderInquirySelect);
- __definePage("pages_order/inquirySelectType", Pages_orderInquirySelectType);
- __definePage("pages_order/inquiryForm1", Pages_orderInquiryForm1);
- __definePage("pages_order/inquiryForm2_1", Pages_orderInquiryForm2_1);
- __definePage("pages_order/inquiryForm2_2", Pages_orderInquiryForm2_2);
- __definePage("pages_order/inquiryForm3", Pages_orderInquiryForm3);
- __definePage("pages_order/inquiryPay", Pages_orderInquiryPay);
- __definePage("pages_order/inquiryPayment", Pages_orderInquiryPayment);
- __definePage("pages_order/tzPay", Pages_orderTzPay);
- __definePage("pages_order/tzWeixinPay", Pages_orderTzWeixinPay);
- __definePage("pages_order/inquiryOrderPaySuccess", Pages_orderInquiryOrderPaySuccess);
- __definePage("pages_order/storeOrderPaySuccess", Pages_orderStoreOrderPaySuccess);
- __definePage("pages_order/pingOrder", Pages_orderPingOrder);
- __definePage("pages_order/prescribeList", Pages_orderPrescribeList);
- __definePage("pages_order/prescribeDetails", Pages_orderPrescribeDetails);
- __definePage("pages_order/storeOrderList", Pages_orderStoreOrderList);
- __definePage("pages_order/storeOrderDetail", Pages_orderStoreOrderDetail);
- __definePage("pages_order/storeOrderPay", Pages_orderStoreOrderPay);
- __definePage("pages_order/storeOrderPayment", Pages_orderStoreOrderPayment);
- __definePage("pages_order/inquiryOrderReport", Pages_orderInquiryOrderReport);
- __definePage("pages_order/packageOrderDetails", Pages_orderPackageOrderDetails);
- __definePage("pages_order/packageOrderList", Pages_orderPackageOrderList);
- __definePage("pages_order/packageOrderPay", Pages_orderPackageOrderPay);
- __definePage("pages_order/packageOrderPaySuccess", Pages_orderPackageOrderPaySuccess);
- __definePage("pages_order/storeOrderDelivery", Pages_orderStoreOrderDelivery);
- __definePage("pages_order/storeOrderRefundApply", Pages_orderStoreOrderRefundApply);
- __definePage("pages_order/storeOrderRefundSubmit", Pages_orderStoreOrderRefundSubmit);
- __definePage("pages_order/storeOrderRefundList", Pages_orderStoreOrderRefundList);
- __definePage("pages_order/storeOrderRefundDetails", Pages_orderStoreOrderRefundDetails);
- __definePage("pages_order/storeOrderRefundAddDelivery", Pages_orderStoreOrderRefundAddDelivery);
- __definePage("pages_order/packageOtherPayment", Pages_orderPackageOtherPayment);
- __definePage("pages_order/packagePayment", Pages_orderPackagePayment);
- __definePage("pages_user/registerDoctor", Pages_userRegisterDoctor);
- __definePage("pages_user/about", Pages_userAbout);
- __definePage("pages_user/address", Pages_userAddress);
- __definePage("pages_user/addEditAddress", Pages_userAddEditAddress);
- __definePage("pages_user/personInfo", Pages_userPersonInfo);
- __definePage("pages_user/agreement", Pages_userAgreement);
- __definePage("pages_user/myDoctorList", Pages_userMyDoctorList);
- __definePage("pages_user/patient", Pages_userPatient);
- __definePage("pages_user/addEditPatient", Pages_userAddEditPatient);
- __definePage("pages_user/myCouponList", Pages_userMyCouponList);
- __definePage("pages_user/cert", Pages_userCert);
- __definePage("pages_user/followList", Pages_userFollowList);
- __definePage("pages_user/followDetails", Pages_userFollowDetails);
- __definePage("pages_user/drugReportList", Pages_userDrugReportList);
- __definePage("pages_user/drugReportPing", Pages_userDrugReportPing);
- __definePage("pages_user/drugReportDetails", Pages_userDrugReportDetails);
- __definePage("pages_user/doFollow", Pages_userDoFollow);
- __definePage("pages_user/integralGoodsList", Pages_userIntegralGoodsList);
- __definePage("pages_user/integralGoodsDetails", Pages_userIntegralGoodsDetails);
- __definePage("pages_user/integralOrderList", Pages_userIntegralOrderList);
- __definePage("pages_user/integralOrderDetails", Pages_userIntegralOrderDetails);
- __definePage("pages_user/integralLogsList", Pages_userIntegralLogsList);
- __definePage("pages_user/integralOrderPay", Pages_userIntegralOrderPay);
- __definePage("pages_user/integralOrderPaySuccess", Pages_userIntegralOrderPaySuccess);
- __definePage("pages_user/integral", Pages_userIntegral);
- __definePage("pages_company/login", Pages_companyLogin);
- __definePage("pages_company/index", Pages_companyIndex);
- __definePage("pages_company/packageList", Pages_companyPackageList);
- __definePage("pages_company/packageDetails", Pages_companyPackageDetails);
- __definePage("pages_company/packageOrderList", Pages_companyPackageOrderList);
- __definePage("pages_company/packageOrderDetails", Pages_companyPackageOrderDetails);
- __definePage("pages_company/couponList", Pages_companyCouponList);
- __definePage("pages_company/couponDetails", Pages_companyCouponDetails);
- __definePage("pages_company/inquiryOrderList", Pages_companyInquiryOrderList);
- __definePage("pages_company/inquiryOrderDetails", Pages_companyInquiryOrderDetails);
- __definePage("pages_company/storeOrderList", Pages_companyStoreOrderList);
- __definePage("pages_company/storeOrderDetail", Pages_companyStoreOrderDetail);
- __definePage("pages_company/storeOrderDelivery", Pages_companyStoreOrderDelivery);
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
- function getDefaultExportFromCjs(x) {
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
- }
- var timWx = { exports: {} };
- (function(module, exports) {
- !function(e, t) {
- module.exports = t();
- }(commonjsGlobal, function() {
- function e(e2, t2) {
- var n2 = Object.keys(e2);
- if (Object.getOwnPropertySymbols) {
- var o2 = Object.getOwnPropertySymbols(e2);
- t2 && (o2 = o2.filter(function(t3) {
- return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
- })), n2.push.apply(n2, o2);
- }
- return n2;
- }
- function t(t2) {
- for (var n2 = 1; n2 < arguments.length; n2++) {
- var o2 = null != arguments[n2] ? arguments[n2] : {};
- n2 % 2 ? e(Object(o2), true).forEach(function(e2) {
- i(t2, e2, o2[e2]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(o2)) : e(Object(o2)).forEach(function(e2) {
- Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(o2, e2));
- });
- }
- return t2;
- }
- function n(e2) {
- return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
- return typeof e3;
- } : function(e3) {
- return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
- })(e2);
- }
- function o(e2, t2) {
- if (!(e2 instanceof t2))
- throw new TypeError("Cannot call a class as a function");
- }
- function s(e2, t2) {
- for (var n2 = 0; n2 < t2.length; n2++) {
- var o2 = t2[n2];
- o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2);
- }
- }
- function a(e2, t2, n2) {
- return t2 && s(e2.prototype, t2), n2 && s(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2;
- }
- function i(e2, t2, n2) {
- return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
- }
- function r(e2, t2) {
- if ("function" != typeof t2 && null !== t2)
- throw new TypeError("Super expression must either be null or a function");
- e2.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e2, writable: true, configurable: true } }), Object.defineProperty(e2, "prototype", { writable: false }), t2 && c(e2, t2);
- }
- function u(e2) {
- return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function(e3) {
- return e3.__proto__ || Object.getPrototypeOf(e3);
- })(e2);
- }
- function c(e2, t2) {
- return (c = Object.setPrototypeOf || function(e3, t3) {
- return e3.__proto__ = t3, e3;
- })(e2, t2);
- }
- function l() {
- if ("undefined" == typeof Reflect || !Reflect.construct)
- return false;
- if (Reflect.construct.sham)
- return false;
- if ("function" == typeof Proxy)
- return true;
- try {
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
- })), true;
- } catch (e2) {
- return false;
- }
- }
- function d(e2, t2, n2) {
- return (d = l() ? Reflect.construct : function(e3, t3, n3) {
- var o2 = [null];
- o2.push.apply(o2, t3);
- var s2 = new (Function.bind.apply(e3, o2))();
- return n3 && c(s2, n3.prototype), s2;
- }).apply(null, arguments);
- }
- function p(e2) {
- var t2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
- return (p = function(e3) {
- if (null === e3 || (n2 = e3, -1 === Function.toString.call(n2).indexOf("[native code]")))
- return e3;
- var n2;
- if ("function" != typeof e3)
- throw new TypeError("Super expression must either be null or a function");
- if (void 0 !== t2) {
- if (t2.has(e3))
- return t2.get(e3);
- t2.set(e3, o2);
- }
- function o2() {
- return d(e3, arguments, u(this).constructor);
- }
- return o2.prototype = Object.create(e3.prototype, { constructor: { value: o2, enumerable: false, writable: true, configurable: true } }), c(o2, e3);
- })(e2);
- }
- function g(e2, t2) {
- if (null == e2)
- return {};
- var n2, o2, s2 = function(e3, t3) {
- if (null == e3)
- return {};
- var n3, o3, s3 = {}, a3 = Object.keys(e3);
- for (o3 = 0; o3 < a3.length; o3++)
- n3 = a3[o3], t3.indexOf(n3) >= 0 || (s3[n3] = e3[n3]);
- return s3;
- }(e2, t2);
- if (Object.getOwnPropertySymbols) {
- var a2 = Object.getOwnPropertySymbols(e2);
- for (o2 = 0; o2 < a2.length; o2++)
- n2 = a2[o2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (s2[n2] = e2[n2]);
- }
- return s2;
- }
- function h(e2) {
- if (void 0 === e2)
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return e2;
- }
- function _(e2, t2) {
- if (t2 && ("object" == typeof t2 || "function" == typeof t2))
- return t2;
- if (void 0 !== t2)
- throw new TypeError("Derived constructors may only return object or undefined");
- return h(e2);
- }
- function f(e2) {
- var t2 = l();
- return function() {
- var n2, o2 = u(e2);
- if (t2) {
- var s2 = u(this).constructor;
- n2 = Reflect.construct(o2, arguments, s2);
- } else
- n2 = o2.apply(this, arguments);
- return _(this, n2);
- };
- }
- function v(e2, t2) {
- return M(e2) || function(e3, t3) {
- var n2 = null == e3 ? null : "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
- if (null == n2)
- return;
- var o2, s2, a2 = [], i2 = true, r2 = false;
- try {
- for (n2 = n2.call(e3); !(i2 = (o2 = n2.next()).done) && (a2.push(o2.value), !t3 || a2.length !== t3); i2 = true)
- ;
- } catch (u2) {
- r2 = true, s2 = u2;
- } finally {
- try {
- i2 || null == n2.return || n2.return();
- } finally {
- if (r2)
- throw s2;
- }
- }
- return a2;
- }(e2, t2) || I(e2, t2) || T();
- }
- function m(e2) {
- return function(e3) {
- if (Array.isArray(e3))
- return C(e3);
- }(e2) || y(e2) || I(e2) || function() {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }();
- }
- function M(e2) {
- if (Array.isArray(e2))
- return e2;
- }
- function y(e2) {
- if ("undefined" != typeof Symbol && null != e2[Symbol.iterator] || null != e2["@@iterator"])
- return Array.from(e2);
- }
- function I(e2, t2) {
- if (e2) {
- if ("string" == typeof e2)
- return C(e2, t2);
- var n2 = Object.prototype.toString.call(e2).slice(8, -1);
- 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;
- }
- }
- function C(e2, t2) {
- (null == t2 || t2 > e2.length) && (t2 = e2.length);
- for (var n2 = 0, o2 = new Array(t2); n2 < t2; n2++)
- o2[n2] = e2[n2];
- return o2;
- }
- function T() {
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }
- function D(e2, t2) {
- var n2 = "undefined" != typeof Symbol && e2[Symbol.iterator] || e2["@@iterator"];
- if (!n2) {
- if (Array.isArray(e2) || (n2 = I(e2)) || t2 && e2 && "number" == typeof e2.length) {
- n2 && (e2 = n2);
- var o2 = 0, s2 = function() {
- };
- return { s: s2, n: function() {
- return o2 >= e2.length ? { done: true } : { done: false, value: e2[o2++] };
- }, e: function(e3) {
- throw e3;
- }, f: s2 };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }
- var a2, i2 = true, r2 = false;
- return { s: function() {
- n2 = n2.call(e2);
- }, n: function() {
- var e3 = n2.next();
- return i2 = e3.done, e3;
- }, e: function(e3) {
- r2 = true, a2 = e3;
- }, f: function() {
- try {
- i2 || null == n2.return || n2.return();
- } finally {
- if (r2)
- throw a2;
- }
- } };
- }
- 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() {
- function e2() {
- o(this, e2), this.cache = [], this.options = null;
- }
- return a(e2, [{ key: "use", value: function(e3) {
- if ("function" != typeof e3)
- throw "middleware must be a function";
- return this.cache.push(e3), this;
- } }, { key: "next", value: function(e3) {
- if (this.middlewares && this.middlewares.length > 0)
- return this.middlewares.shift().call(this, this.options, this.next.bind(this));
- } }, { key: "run", value: function(e3) {
- return this.middlewares = this.cache.map(function(e4) {
- return e4;
- }), this.options = e3, this.next();
- } }]), e2;
- }(), L = function() {
- function e2() {
- var t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
- o(this, e2), this.high = t2, this.low = n2;
- }
- return a(e2, [{ key: "equal", value: function(e3) {
- return null !== e3 && (this.low === e3.low && this.high === e3.high);
- } }, { key: "toString", value: function() {
- var e3 = Number(this.high).toString(16), t2 = Number(this.low).toString(16);
- if (t2.length < 8)
- for (var n2 = 8 - t2.length; n2; )
- t2 = "0" + t2, n2--;
- return e3 + t2;
- } }]), e2;
- }(), 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() {
- var e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : G;
- this.CURRENT = A.PRODUCTION[e2];
- } }, 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";
- V.HOST.setCurrent(G);
- 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);
- le && parseFloat(le.pop());
- 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() {
- var e2 = ue.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);
- if (!e2)
- return null;
- var t2 = e2[1] && parseFloat(e2[1]), n2 = e2[2] && parseFloat(e2[2]);
- return t2 && n2 ? parseFloat(e2[1] + "." + e2[2]) : t2 || null;
- }();
- !function() {
- var e2 = ue.match(/Chrome\/(\d+)/);
- e2 && e2[1] && parseFloat(e2[1]);
- }();
- var Ie = /MSIE/.test(ue) || ue.indexOf("Trident") > -1 && ue.indexOf("rv:11.0") > -1, Ce = function() {
- var e2 = /MSIE\s(\d+)\.\d/.exec(ue), t2 = e2 && parseFloat(e2[1]);
- return !t2 && /Trident\/7.0/i.test(ue) && /rv:11.0/.test(ue) && (t2 = 11), t2;
- }();
- !function() {
- var e2 = ue.match(/TBS\/(\d+)/i);
- if (e2 && e2[1])
- e2[1];
- }();
- 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;
- Te = "undefined" != typeof console ? console : "undefined" != typeof commonjsGlobal && commonjsGlobal.console ? commonjsGlobal.console : "undefined" != typeof window && window.console ? window.console : {};
- for (var Re = function() {
- }, 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--; )
- De = Ne[Oe], console[De] || (Te[De] = Re);
- var Ge = Te, Ue = 0, Pe = function() {
- return (/* @__PURE__ */ new Date()).getTime() + Ue;
- }, be = function() {
- Ue = 0;
- }, we = function() {
- return Math.floor(Pe() / 1e3);
- }, Fe = 0;
- function qe() {
- return Kt() ? "%c TIM %c" : "TIM";
- }
- function xe() {
- var e2, t2 = ((e2 = /* @__PURE__ */ new Date()).setTime(Pe()), e2);
- return t2.toLocaleTimeString("en-US", { hour12: false }) + "." + function(e3) {
- var t3;
- switch (e3.toString().length) {
- case 1:
- t3 = "00" + e3;
- break;
- case 2:
- t3 = "0" + e3;
- break;
- default:
- t3 = e3;
- }
- return t3;
- }(t2.getMilliseconds());
- }
- var Ve = { arguments2String: function(e2) {
- var t2 = "";
- if (1 === e2.length)
- t2 = e2[0];
- else
- for (var n2 = 0, o2 = e2.length; n2 < o2; n2++)
- rt(e2[n2]) ? ct(e2[n2]) ? t2 += gt(e2[n2]) : t2 += JSON.stringify(e2[n2]) : t2 += e2[n2], t2 += " ";
- return t2;
- }, _exec: function(e2, t2) {
- 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));
- }, d: function() {
- if (Fe <= -1) {
- var e2 = this.arguments2String(arguments);
- this._exec("debug", e2);
- }
- }, l: function() {
- if (Fe <= 0) {
- var e2 = this.arguments2String(arguments);
- this._exec("log", e2);
- }
- }, log: function() {
- if (Fe <= 0) {
- var e2 = this.arguments2String(arguments);
- this._exec("log", e2);
- }
- }, i: function() {
- if (Fe <= 1) {
- var e2 = this.arguments2String(arguments);
- this._exec("info", e2);
- }
- }, w: function() {
- if (Fe <= 2) {
- var e2 = this.arguments2String(arguments);
- this._exec("warn", e2);
- }
- }, e: function() {
- if (Fe <= 3) {
- var e2 = this.arguments2String(arguments);
- this._exec("error", e2);
- }
- }, setLevel: function(e2) {
- e2 < 4 && this._exec("log", "set level from " + Fe + " to " + e2), Fe = e2;
- }, getLevel: function() {
- return Fe;
- } }, 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) {
- return "map" === lt(e2);
- }, $e = function(e2) {
- return "file" === lt(e2);
- }, et = function(e2) {
- return null !== e2 && ("number" == typeof e2 && !isNaN(e2 - 0) || "object" === n(e2) && e2.constructor === Number);
- }, nt = function(e2) {
- return "string" == typeof e2;
- }, ot = function(e2) {
- return null !== e2 && "object" === n(e2);
- }, st = function(e2) {
- if ("object" !== n(e2) || null === e2)
- return false;
- var t2 = Object.getPrototypeOf(e2);
- if (null === t2)
- return true;
- for (var o2 = t2; null !== Object.getPrototypeOf(o2); )
- o2 = Object.getPrototypeOf(o2);
- return t2 === o2;
- }, at = function(e2) {
- return "function" == typeof Array.isArray ? Array.isArray(e2) : "array" === lt(e2);
- }, it = function(e2) {
- return void 0 === e2;
- }, rt = function(e2) {
- return at(e2) || ot(e2);
- }, ut = function(e2) {
- return "function" == typeof e2;
- }, ct = function(e2) {
- return e2 instanceof Error;
- }, lt = function(e2) {
- return Object.prototype.toString.call(e2).match(/^\[object (.*)\]$/)[1].toLowerCase();
- }, dt = function(e2) {
- if ("string" != typeof e2)
- return false;
- var t2 = e2[0];
- return !/[^a-zA-Z0-9]/.test(t2);
- };
- Date.now || (Date.now = function() {
- return (/* @__PURE__ */ new Date()).getTime();
- });
- var pt = function e2(t2, n2, o2, s2) {
- if (!rt(t2) || !rt(n2))
- return 0;
- for (var a2, i2 = 0, r2 = Object.keys(n2), u2 = 0, c2 = r2.length; u2 < c2; u2++)
- if (a2 = r2[u2], !(it(n2[a2]) || o2 && o2.includes(a2)))
- if (rt(t2[a2]) && rt(n2[a2]))
- i2 += e2(t2[a2], n2[a2], o2, s2);
- else {
- if (s2 && s2.includes(n2[a2]))
- continue;
- t2[a2] !== n2[a2] && (t2[a2] = n2[a2], i2 += 1);
- }
- return i2;
- }, gt = function(e2) {
- return JSON.stringify(e2, ["message", "code"]);
- }, ht = function(e2) {
- if (0 === e2.length)
- return 0;
- for (var t2 = 0, n2 = 0, o2 = "undefined" != typeof document && void 0 !== document.characterSet ? document.characterSet : "UTF-8"; void 0 !== e2[t2]; )
- n2 += e2[t2++].charCodeAt[t2] <= 255 ? 1 : false === o2 ? 3 : 2;
- return n2;
- }, _t = function(e2) {
- var t2 = e2 || 99999999;
- return Math.round(Math.random() * t2);
- }, ft = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", vt = ft.length, mt = function(e2, t2) {
- for (var n2 in e2)
- if (e2[n2] === t2)
- return true;
- return false;
- }, Mt = {}, yt = function(e2) {
- return -1 === e2.indexOf("http://") || -1 === e2.indexOf("https://") ? "https://" + e2 : e2.replace(/https|http/, "https");
- }, It = function e2(t2) {
- if (0 === Object.getOwnPropertyNames(t2).length)
- return /* @__PURE__ */ Object.create(null);
- var o2 = Array.isArray(t2) ? [] : /* @__PURE__ */ Object.create(null), s2 = "";
- for (var a2 in t2)
- 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;
- return o2;
- };
- function Ct(e2, t2) {
- if (!at(e2) || !at(t2))
- return false;
- var n2 = false;
- return t2.forEach(function(t3) {
- var o2 = t3.key, s2 = t3.value, a2 = e2.find(function(e3) {
- return e3.key === o2;
- });
- a2 ? a2.value !== s2 && (a2.value = s2, n2 = true) : (e2.push({ key: o2, value: s2 }), n2 = true);
- }), n2;
- }
- var Tt = function(e2) {
- return e2 === E.GRP_AVCHATROOM;
- }, Dt = function(e2) {
- var t2 = e2.type, n2 = e2.groupID;
- return t2 === E.GRP_COMMUNITY || "".concat(n2).startsWith(Je) && !"".concat(n2).includes(Xe);
- }, kt = function(e2) {
- return "".concat(e2).startsWith(Je) && "".concat(e2).includes(Xe);
- }, Et = function(e2) {
- return nt(e2) && e2.slice(0, 3) === E.CONV_C2C;
- }, St = function(e2) {
- return nt(e2) && e2.slice(0, 5) === E.CONV_GROUP;
- }, Lt = function(e2) {
- return nt(e2) && e2 === E.CONV_SYSTEM;
- };
- function At(e2, t2) {
- var n2 = {};
- return Object.keys(e2).forEach(function(o2) {
- n2[o2] = t2(e2[o2], o2);
- }), n2;
- }
- function Rt(e2) {
- return ae ? new Promise(function(t2, n2) {
- re.getImageInfo({ src: e2, success: function(e3) {
- t2({ width: e3.width, height: e3.height });
- }, fail: function() {
- t2({ width: 0, height: 0 });
- } });
- }) : Ie && 9 === Ce ? Promise.resolve({ width: 0, height: 0 }) : new Promise(function(t2, n2) {
- var o2 = new Image();
- o2.onload = function() {
- t2({ width: this.width, height: this.height }), o2 = null;
- }, o2.onerror = function() {
- t2({ width: 0, height: 0 }), o2 = null;
- }, o2.src = e2;
- });
- }
- function Nt() {
- function e2() {
- return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
- }
- return "".concat(e2() + e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2());
- }
- function Ot() {
- var e2 = "unknown";
- if (Ee && (e2 = "mac"), ke && (e2 = "windows"), ve && (e2 = "ios"), Me && (e2 = "android"), ae)
- try {
- var t2 = re.getSystemInfoSync().platform;
- void 0 !== t2 && (e2 = t2);
- } catch (n2) {
- }
- return e2;
- }
- function Gt(e2, t2) {
- e2 = e2.split("."), t2 = t2.split(".");
- for (var n2 = Math.max(e2.length, t2.length); e2.length < n2; )
- e2.push("0");
- for (; t2.length < n2; )
- t2.push("0");
- for (var o2 = 0; o2 < n2; o2++) {
- var s2 = parseInt(e2[o2]), a2 = parseInt(t2[o2]);
- if (s2 > a2)
- return 1;
- if (s2 < a2)
- return -1;
- }
- return 0;
- }
- function Ut(e2) {
- 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 };
- if ((r2 <= u2 ? r2 : u2) <= i2)
- c2.url = n2, c2.width = r2, c2.height = u2;
- else {
- u2 <= r2 ? (c2.width = Math.ceil(r2 * i2 / u2), c2.height = i2) : (c2.width = i2, c2.height = Math.ceil(u2 * i2 / r2));
- var l2 = n2 && n2.indexOf("?") > -1 ? "".concat(n2, "&") : "".concat(n2, "?");
- c2.url = "".concat(l2, 198 === i2 ? "imageView2/3/w/198/h/198" : "imageView2/3/w/720/h/720");
- }
- return it(n2) ? (c2.url, g(c2, Ze)) : c2;
- }
- function Pt(e2) {
- var t2 = e2[2];
- e2[2] = e2[1], e2[1] = t2;
- for (var n2 = 0; n2 < e2.length; n2++)
- e2[n2].setType(n2);
- }
- function bt(e2) {
- var t2 = e2.servcmd;
- return t2.slice(t2.indexOf(".") + 1);
- }
- function wt(e2, t2) {
- return Math.round(Number(e2) * Math.pow(10, t2)) / Math.pow(10, t2);
- }
- function Ft(e2, t2) {
- return e2.includes(t2);
- }
- function qt(e2, t2) {
- return e2.includes(t2);
- }
- function xt(e2) {
- return e2.split(Xe)[0];
- }
- var Vt = function(e2, t2, n2) {
- if (it(t2))
- return "";
- switch (e2) {
- case E.MSG_TEXT:
- return t2.text;
- case E.MSG_IMAGE:
- return n2 ? "[Image]" : "[图片]";
- case E.MSG_LOCATION:
- return n2 ? "[Location]" : "[位置]";
- case E.MSG_AUDIO:
- return n2 ? "[Voice]" : "[语音]";
- case E.MSG_VIDEO:
- return n2 ? "[Video]" : "[视频]";
- case E.MSG_FILE:
- return n2 ? "[File]" : "[文件]";
- case E.MSG_CUSTOM:
- return n2 ? "[Custom Messages]" : "[自定义消息]";
- case E.MSG_GRP_TIP:
- return n2 ? "[Group Notification]" : "[群提示消息]";
- case E.MSG_GRP_SYS_NOTICE:
- return n2 ? "[Group System Message]" : "[群系统通知]";
- case E.MSG_FACE:
- return n2 ? "[Animated Sticker]" : "[动画表情]";
- case E.MSG_MERGER:
- return n2 ? "[Chat Record]" : "[聊天记录]";
- default:
- return "";
- }
- };
- function Bt(e2) {
- return e2 === E.MSG_TEXT || e2 === E.MSG_CUSTOM || e2 === E.MSG_LOCATION || e2 === E.MSG_FACE;
- }
- function Ht(e2) {
- var t2 = [];
- if (!nt(e2))
- return t2;
- var n2 = e2.length;
- if (0 === n2)
- return t2;
- for (var o2 = n2 - 1; o2 >= 0; o2--)
- "1" === e2[o2] && t2.push(Math.pow(2, n2 - o2 - 1));
- return t2;
- }
- function Kt() {
- return !Ie && !ae;
- }
- function Wt(e2) {
- return "the length of userIDList cannot exceed ".concat(e2);
- }
- function Yt(e2, t2) {
- if (e2) {
- var n2 = e2;
- return t2 && (e2.startsWith("http://") ? n2 = e2.replace(/^http:\/\/[^/]+/, t2) : e2.startsWith("https://") && (n2 = e2.replace(/^https:\/\/[^/]+/, t2))), n2;
- }
- }
- var jt = Object.prototype.hasOwnProperty;
- function zt(e2) {
- if (null == e2)
- return true;
- if ("boolean" == typeof e2)
- return false;
- if ("number" == typeof e2)
- return 0 === e2;
- if ("string" == typeof e2)
- return 0 === e2.length;
- if ("function" == typeof e2)
- return 0 === e2.length;
- if (Array.isArray(e2))
- return 0 === e2.length;
- if (e2 instanceof Error)
- return "" === e2.message;
- if (st(e2)) {
- for (var t2 in e2)
- if (jt.call(e2, t2))
- return false;
- return true;
- }
- return !(!Qe(e2) && (n2 = e2, "set" !== lt(n2)) && !$e(e2)) && 0 === e2.size;
- var n2;
- }
- function Jt(e2, t2, n2) {
- if (void 0 === t2)
- return true;
- var o2 = true;
- if (st(t2))
- Object.keys(t2).forEach(function(s3) {
- var a2 = 1 === e2.length ? e2[0][s3] : void 0;
- o2 = !!Xt(a2, t2[s3], n2, s3) && o2;
- });
- else if (at(t2))
- for (var s2 = 0; s2 < t2.length; s2++)
- o2 = !!Xt(e2[s2], t2[s2], n2, t2[s2].name) && o2;
- if (o2)
- return o2;
- throw new Error("Params validate failed.");
- }
- function Xt(e2, t2, n2, o2) {
- if (void 0 === t2)
- return true;
- var s2 = true;
- if (t2.required && zt(e2) && (Ve.e("[".concat(n2, '] Missing required params: "').concat(o2, '".')), s2 = false), !zt(e2)) {
- var a2 = lt(e2), i2 = t2.type.toLowerCase();
- a2 !== i2 && ("asyncfunction" === a2 && "function" === i2 || (Ve.e("[".concat(n2, '] Invalid params: type check failed for "').concat(o2, '".Expected ').concat(t2.type, ".")), s2 = false));
- }
- return t2.validator && !t2.validator(e2) && (Ve.e("[".concat(n2, "] Invalid params: custom validator check failed for params.")), s2 = false), s2;
- }
- var Zt, Qt = { UNSEND: "unSend", SUCCESS: "success", FAIL: "fail" }, $t = { NOT_START: "notStart", PENDING: "pending", RESOLVED: "resolved", REJECTED: "rejected" }, en = function(e2) {
- if (!e2)
- return false;
- if (Et(e2) || St(e2) || Lt(e2))
- return true;
- var t2 = Sn("InvalidConversationID", e2);
- return t2 && Ve.w(t2), false;
- }, tn = function(e2) {
- "" !== e2.desc && "" !== Sn("API_REFER") && Ve.w("[".concat(e2.api, "] | ").concat(e2.param, " | ").concat(e2.desc, ", ").concat(Sn("API_REFER")).concat(e2.api));
- }, nn = function() {
- return Sn("StringRequiredLog");
- }, on = function(e2) {
- return Sn("NonEmptyStringRequiredLog", e2);
- }, sn = function() {
- return Sn("NumberRequiredLog");
- }, an = function() {
- return Sn("UndefinedNotAllowedLog");
- }, rn = function() {
- return Sn("FileRequiredLog");
- }, un = function() {
- return Sn("FunctionRequiredLog");
- }, cn = function() {
- return Sn("ArrayRequiredLog");
- }, ln = function() {
- return Sn("NonEmptyArrayLog");
- }, dn = function() {
- return Sn("CallbackMissingLog");
- }, pn = function() {
- return Sn("PositiveIntegerRequiredLog");
- }, gn = function(e2, t2) {
- return Sn("StringNotLongerThanLog", e2, t2);
- }, hn = function(e2, t2) {
- return Sn("NumberLessThanLog", e2, t2);
- }, _n = function(e2) {
- return Sn("KeyValueStringRequiredLog", e2);
- }, fn = function() {
- return Sn("PlainObjectRequiredLog");
- }, vn = function() {
- return Sn("NonEmptyContentRequiredLog");
- }, mn = function() {
- return Sn("FileNotSelectedLog");
- }, Mn = function() {
- return Sn("MessageInstanceRequiredLog");
- }, yn = function() {
- return Sn("NonAnonymousFunctionLog");
- }, In = function() {
- return Sn("MessageExtensionNotAvailableLog");
- }, 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) {
- Sn = e2;
- }, login: { userID: Cn, userSig: Cn }, addToBlacklist: { userIDList: Tn }, removeFromBlacklist: { userIDList: Tn }, on: [{ name: "eventName", type: "String", validator: function(e2) {
- return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "on", param: "eventName", desc: on("eventName") }), false);
- } }, { name: "handler", type: "Function", validator: function(e2) {
- return "function" != typeof e2 ? (tn({ api: "on", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "on", param: "handler", desc: yn() }), true);
- } }], once: [{ name: "eventName", type: "String", validator: function(e2) {
- return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "once", param: "eventName", desc: on("eventName") }), false);
- } }, { name: "handler", type: "Function", validator: function(e2) {
- return "function" != typeof e2 ? (tn({ api: "once", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "once", param: "handler", desc: yn() }), true);
- } }], off: [{ name: "eventName", type: "String", validator: function(e2) {
- return "string" == typeof e2 && 0 !== e2.length || (tn({ api: "off", param: "eventName", desc: on("eventName") }), false);
- } }, { name: "handler", type: "Function", validator: function(e2) {
- return "function" != typeof e2 ? (tn({ api: "off", param: "handler", desc: un() }), false) : ("" === e2.name && tn({ api: "off", param: "handler", desc: yn() }), true);
- } }], sendMessage: [t({ name: "message" }, Dn)], setMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
- return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "setMessageExtensions", param: "message", desc: In() }), false);
- } }), t({ name: "extensions" }, Tn)], getMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
- return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "getMessageExtensions", param: "message", desc: In() }), false);
- } })], deleteMessageExtensions: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
- return e2.status === Qt.SUCCESS && true === e2.isSupportExtension || (tn({ api: "deleteMessageExtensions", param: "message", desc: In() }), false);
- } })], getMessageList: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
- return en(e2);
- } }), nextReqMessageID: { type: "String" }, count: { type: "Number", validator: function(e2) {
- return !(!it(e2) && !/^[1-9][0-9]*$/.test(e2)) || (tn({ api: "getMessageList", param: "count", desc: pn() }), false);
- } } }, getMessageListHopping: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
- return en(e2);
- } }), sequence: { type: "Number" }, time: { type: "Number" }, direction: { type: "Number", validator: function(e2) {
- return !(!it(e2) && 0 !== e2 && 1 !== e2) || (tn({ api: "getMessageListHopping", param: "direction", desc: Sn("0Or1RequiredLog") }), false);
- } }, count: { type: "Number", validator: function(e2) {
- return !(!it(e2) && !/^[1-9][0-9]*$/.test(e2)) || (tn({ api: "getMessageListHopping", param: "count", desc: pn }), false);
- } } }, setMessageRead: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
- return en(e2);
- } }) }, setAllMessageRead: { scope: { type: "String", required: false, validator: function(e2) {
- 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);
- } } }, getConversationProfile: [t(t({ name: "conversationID" }, Cn), {}, { validator: function(e2) {
- return en(e2);
- } })], clearHistoryMessage: [t(t({ name: "conversationID" }, Cn), {}, { validator: function(e2) {
- return en(e2);
- } })], pinConversation: { conversationID: t(t({}, Cn), {}, { validator: function(e2) {
- return en(e2);
- } }), isPinned: t({}, kn) }, setConversationCustomData: { conversationIDList: t({}, Tn), customData: { type: "String", validator: function(e2) {
- return nt(e2) ? !(e2.length > 256) || (tn({ api: "setConversationCustomData", param: "customData", desc: gn("customData", 256) }), false) : (tn({ api: "setConversationCustomData", param: "customData", desc: nn() }), false);
- } } }, markConversation: { conversationIDList: t({}, Tn), markType: { type: "number", validator: function(e2) {
- 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);
- var t2, n2;
- } }, enableMark: t({}, kn) }, createConversationGroup: { conversationIDList: t({}, Tn), groupName: t(t({}, Cn), {}, { validator: function(e2) {
- return !!e2 && (!(e2.length > 32) || (tn({ api: "createConversationGroup", param: "groupName", desc: gn("groupName", 32) }), false));
- } }) }, deleteConversationGroup: [t({ name: "groupName" }, Cn)], renameConversationGroup: { oldName: t({}, Cn), newName: t(t({}, Cn), {}, { validator: function(e2) {
- return !!e2 && (!(e2.length > 32) || (tn({ api: "renameConversationGroup", param: "newName", desc: gn("newName", 32) }), false));
- } }) }, 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) {
- var t2 = true;
- return Object.keys(e2).forEach(function(n2) {
- if (!nt(e2[n2]))
- return tn({ api: "initGroupAttributes", param: "groupAttributes", desc: _n("value") }), t2 = false;
- }), t2;
- } }) }, setGroupAttributes: { groupID: Cn, groupAttributes: t(t({}, Dn), {}, { validator: function(e2) {
- var t2 = true;
- return Object.keys(e2).forEach(function(n2) {
- if (!nt(e2[n2]))
- return tn({ api: "setGroupAttributes", param: "groupAttributes", desc: _n("value") }), t2 = false;
- }), t2;
- } }) }, deleteGroupAttributes: { groupID: Cn, keyList: { type: "Array", validator: function(e2) {
- if (it(e2) || !at(e2))
- return tn({ api: "deleteGroupAttributes", param: "keyList", desc: cn() }), false;
- if (!zt(e2)) {
- var t2 = true;
- return e2.forEach(function(e3) {
- if (!nt(e3))
- return tn({ api: "deleteGroupAttributes", param: "keyList", desc: Sn("StringArrayRequiredLog") }), t2 = false;
- }), t2;
- }
- return true;
- } } }, getGroupAttributes: { groupID: Cn, keyList: { type: "Array", validator: function(e2) {
- if (it(e2) || !at(e2))
- return tn({ api: "getGroupAttributes", param: "keyList", desc: cn() }), false;
- if (!zt(e2)) {
- var t2 = true;
- return e2.forEach(function(e3) {
- if (!nt(e3))
- return tn({ api: "getGroupAttributes", param: "keyList", desc: _n("key") }), t2 = false;
- }), t2;
- }
- return true;
- } } }, 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) {
- return e2 >= 0;
- } } }, setGroupMemberNameCard: { groupID: Cn, userID: { type: "String" }, nameCard: { type: "String", validator: function(e2) {
- return nt(e2) ? (e2.length, true) : (tn({ api: "setGroupMemberNameCard", param: "nameCard", desc: nn() }), false);
- } } }, setGroupMemberCustomField: { groupID: Cn, userID: { type: "String" }, memberCustomField: Tn }, deleteGroupMember: { groupID: Cn }, markGroupMemberList: { groupID: Cn, markType: { type: "number", validator: function(e2) {
- 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);
- var t2, n2;
- } }, userIDList: t({}, Tn), enableMark: t({}, kn) }, createTextMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- 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);
- } }) }, createTextAtMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- 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);
- } }) }, createCustomMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- 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);
- } }) }, createImageMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- if (!st(e2))
- return tn({ api: "createImageMessage", param: "payload", desc: fn() }), false;
- if (it(e2.file))
- return tn({ api: "createImageMessage", param: "payload.file", desc: an() }), false;
- if (ie) {
- if (!(e2.file instanceof HTMLInputElement || $e(e2.file)))
- 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);
- if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length)
- return tn({ api: "createImageMessage", param: "payload.file", desc: mn() }), false;
- }
- return true;
- }, onProgress: { type: "Function", required: false, validator: function(e2) {
- return it(e2) && tn({ api: "createImageMessage", param: "onProgress", desc: dn() }), true;
- } } }) }, createAudioMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- return !!st(e2) || (tn({ api: "createAudioMessage", param: "payload", desc: fn() }), false);
- } }), onProgress: { type: "Function", required: false, validator: function(e2) {
- return it(e2) && tn({ api: "createAudioMessage", param: "onProgress", desc: dn() }), true;
- } } }, createVideoMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- if (!st(e2))
- return tn({ api: "createVideoMessage", param: "payload", desc: fn() }), false;
- if (it(e2.file))
- return tn({ api: "createVideoMessage", param: "payload.file", desc: an() }), false;
- if (ie) {
- if (!(e2.file instanceof HTMLInputElement || $e(e2.file)))
- 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);
- if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length)
- return tn({ api: "createVideoMessage", param: "payload.file", desc: mn() }), false;
- }
- return true;
- } }), onProgress: { type: "Function", required: false, validator: function(e2) {
- return it(e2) && tn({ api: "createVideoMessage", param: "onProgress", desc: dn() }), true;
- } } }, createFaceMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- 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);
- } }) }, createFileMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- if (!st(e2))
- return tn({ api: "createFileMessage", param: "payload", desc: fn() }), false;
- if (it(e2.file))
- return tn({ api: "createFileMessage", param: "payload.file", desc: an() }), false;
- if (ie) {
- if (!(e2.file instanceof HTMLInputElement || $e(e2.file)))
- 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);
- if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length)
- return tn({ api: "createFileMessage", param: "payload.file", desc: mn() }), false;
- }
- return true;
- } }), onProgress: { type: "Function", required: false, validator: function(e2) {
- return it(e2) && tn({ api: "createFileMessage", param: "onProgress", desc: dn() }), true;
- } } }, createLocationMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- 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);
- } }) }, createMergerMessage: { to: Cn, conversationType: Cn, payload: t(t({}, Dn), {}, { validator: function(e2) {
- if (zt(e2.messageList))
- return tn({ api: "createMergerMessage", param: "payload.messageList", desc: ln() }), false;
- if (zt(e2.compatibleText))
- return tn({ api: "createMergerMessage", param: "payload.compatibleText", desc: on("compatibleText") }), false;
- var t2 = false;
- return e2.messageList.forEach(function(e3) {
- e3.status === Qt.FAIL && (t2 = true);
- }), !t2 || (tn({ api: "createMergerMessage", param: "payload.messageList", desc: Sn("MergeFailedMessageLog") }), false);
- } }) }, revokeMessage: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
- 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);
- } })], deleteMessage: [t(t({ name: "messageList" }, Tn), {}, { validator: function(e2) {
- return !zt(e2) || (tn({ api: "deleteMessage", param: "messageList", desc: ln() }), false);
- } })], translateText: { sourceTextList: Tn, sourceLanguage: Cn, targetLanguage: Cn }, modifyMessage: [t(t({ name: "message" }, Dn), {}, { validator: function(e2) {
- 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);
- } })], getUserProfile: { userIDList: { type: "Array", validator: function(e2) {
- return at(e2) ? (0 === e2.length && tn({ api: "getUserProfile", param: "userIDList", desc: ln() }), true) : (tn({ api: "getUserProfile", param: "userIDList", desc: cn() }), false);
- } } }, updateMyProfile: { profileCustomField: { type: "Array", validator: function(e2) {
- return !!it(e2) || (!!at(e2) || (tn({ api: "updateMyProfile", param: "profileCustomField", desc: cn() }), false));
- } } }, setSelfStatus: { customStatus: { type: "String", validator: function(e2) {
- return !!nt(e2) || (tn({ api: "setSelfStatus", param: "customStatus", desc: nn() }), false);
- } } }, getUserStatus: { userIDList: { type: "Array", validator: function(e2) {
- return at(e2) ? 0 !== e2.length || (tn({ api: "getUserStatus", param: "userIDList", desc: ln() }), false) : (tn({ api: "getUserStatus", param: "userIDList", desc: cn() }), false);
- } } }, subscribeUserStatus: { userIDList: { type: "Array", validator: function(e2) {
- return at(e2) ? 0 !== e2.length || (tn({ api: "subscribeUserStatus", param: "userIDList", desc: ln() }), false) : (tn({ api: "subscribeUserStatus", param: "userIDList", desc: cn() }), false);
- } } }, unsubscribeUserStatus: { userIDList: { type: "Array", validator: function(e2) {
- return !e2 || (!!at(e2) || (tn({ api: "subscribeUserStatus", param: "userIDList", desc: cn() }), false));
- } } }, addFriend: { to: Cn, source: { type: "String", required: true, validator: function(e2) {
- 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));
- } }, remark: { type: "String", required: false, validator: function(e2) {
- return !(nt(e2) && e2.length > 96) || (tn({ api: "addFriend", param: "remark", desc: gn("remark", 96) }), false);
- } } }, deleteFriend: { userIDList: Tn }, checkFriend: { userIDList: Tn }, getFriendProfile: { userIDList: Tn }, updateFriend: { userID: Cn, remark: { type: "String", required: false, validator: function(e2) {
- return !(nt(e2) && e2.length > 96) || (tn({ api: "updateFriend", param: "remark", desc: gn("remark", 96) }), false);
- } }, friendCustomField: { type: "Array", required: false, validator: function(e2) {
- if (e2) {
- if (!at(e2))
- return tn({ api: "updateFriend", param: "friendCustomField", desc: cn() }), false;
- var t2 = true;
- return e2.forEach(function(e3) {
- 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);
- }), t2;
- }
- return true;
- } } }, 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) {
- return at(e2) ? 0 !== e2.length || (tn({ api: "sendMessageReadReceipt", param: "messageList", desc: ln() }), false) : (tn({ api: "sendMessageReadReceipt", param: "messageList", desc: cn() }), false);
- } }], getMessageReadReceiptList: [{ name: "messageList", type: "Array", validator: function(e2) {
- return at(e2) ? 0 !== e2.length || (tn({ api: "getMessageReadReceiptList", param: "messageList", desc: ln() }), false) : (tn({ api: "getMessageReadReceiptList", param: "messageList", desc: cn() }), false);
- } }], createTopicInCommunity: { groupID: Cn, topicName: Cn }, deleteTopicFromCommunity: { groupID: Cn, topicIDList: { type: "Array", validator: function(e2) {
- return !e2 || (!!at(e2) || (tn({ api: "deleteTopicFromCommunity", param: "topicIDList", desc: cn() }), false));
- } } }, updateTopicProfile: { groupID: Cn, topicID: Cn }, getTopicList: { groupID: Cn, topicIDList: { type: "Array", validator: function(e2) {
- return !e2 || (!!at(e2) || (tn({ api: "getTopicList", param: "topicIDList", desc: cn() }), false));
- } } } }, 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() {
- function e2(t2) {
- o(this, e2), this._m = t2, this._n = "";
- }
- return a(e2, [{ key: "isLoggedIn", value: function() {
- return this._m.getModule(xn).isLoggedIn();
- } }, { key: "isOversea", value: function() {
- return this._m.getModule(xn).isOversea();
- } }, { key: "isPrivateNetWork", value: function() {
- return this._m.getModule(xn).isPrivateNetWork();
- } }, { key: "getFileDownloadProxy", value: function() {
- return this._m.getModule(xn).getFileDownloadProxy();
- } }, { key: "getMyUserID", value: function() {
- return this._m.getModule(xn).getUserID();
- } }, { key: "getMyTinyID", value: function() {
- return this._m.getModule(xn).getTinyID();
- } }, { key: "getSDKAppID", value: function() {
- return this._m.getModule(xn).getSDKAppID();
- } }, { key: "isIntl", value: function() {
- return this._m.getModule(xn).isIntl();
- } }, { key: "isDevMode", value: function() {
- return this._m.getModule(xn).isDevMode();
- } }, { key: "getModule", value: function(e3) {
- return this._m.getModule(e3);
- } }, { key: "getPlatform", value: function() {
- return ge;
- } }, { key: "getNetworkType", value: function() {
- return this._m.getModule(Hn).getNetworkType();
- } }, { key: "probeNetwork", value: function(e3) {
- return this._m.getModule(Hn).probe(e3);
- } }, { key: "getCloudConfig", value: function(e3) {
- return this._m.getModule(Zn).getCloudConfig(e3);
- } }, { key: "emitOuterEvent", value: function(e3, t2) {
- this._m.getOuterEmitterInstance().emit(e3, t2);
- } }, { key: "emitInnerEvent", value: function(e3, t2) {
- this._m.getInnerEmitterInstance().emit(e3, t2);
- } }, { key: "getInnerEmitterInstance", value: function() {
- return this._m.getInnerEmitterInstance();
- } }, { key: "generateTjgID", value: function(e3) {
- return this._m.getModule(xn).getTinyID() + "-" + e3.random;
- } }, { key: "filterModifiedMessage", value: function(e3) {
- if (!zt(e3)) {
- var t2 = e3.filter(function(e4) {
- return true === e4.isModified;
- });
- t2.length > 0 && this.emitOuterEvent(k.MESSAGE_MODIFIED, t2);
- }
- } }, { key: "filterUnmodifiedMessage", value: function(e3) {
- return zt(e3) ? [] : e3.filter(function(e4) {
- return false === e4.isModified;
- });
- } }, { key: "request", value: function(e3) {
- return this._m.getModule(zn).request(e3);
- } }, { key: "canIUse", value: function(e3) {
- return this._m.getModule(to).canIUse(e3);
- } }, { key: "getErrorMessage", value: function(e3, t2, n2) {
- return this._m.getErrorMessage(e3, t2, n2);
- } }, { key: "outputWarning", value: function(e3, t2, n2) {
- var o2 = this.getErrorMessage(e3, t2, n2);
- o2 && Ve.w(o2);
- } }]), e2;
- }(), 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() {
- function e2(t2) {
- 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();
- }
- return a(e2, [{ key: "updateTimeStamp", value: function() {
- this.timestamp = Pe();
- } }, { key: "start", value: function(e3) {
- return this._startts = e3, this;
- } }, { key: "end", value: function() {
- var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
- if (!this._sentFlag) {
- var n2 = Pe();
- 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() {
- e3._sentFlag = true, e3._eventStatModule && e3._eventStatModule.pushIn(e3);
- }, 0);
- }
- } }, { key: "setError", value: function(e3, t2, n2) {
- if (!(e3 instanceof Error))
- return Ve.w("".concat(this._n, ".setError value not instanceof Error, please check!")), this;
- if (this._sentFlag)
- return this;
- if (this.setNetworkType(n2), t2)
- e3.code && this.setCode(e3.code), e3.message && this.setMoreMessage(e3.message);
- else {
- var o2 = ha.NO_NETWORK;
- this.setCode(o2);
- }
- return this.setLevel("error"), this;
- } }, { key: "setCode", value: function(e3) {
- 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;
- } }, { key: "setMessage", value: function(e3) {
- return it(e3) || this._sentFlag || (et(e3) && (this.message = e3.toString()), nt(e3) && (this.message = e3)), this;
- } }, { key: "setCostTime", value: function(e3) {
- return this.costTime = e3, this;
- } }, { key: "setLevel", value: function(e3) {
- return it(e3) || this._sentFlag || (this.level = Ea[e3]), this;
- } }, { key: "setMoreMessage", value: function(e3) {
- return zt(this.moreMessage) ? this.moreMessage = "".concat(e3) : this.moreMessage += " ".concat(e3), this;
- } }, { key: "setNetworkType", value: function(e3) {
- if (it(e3))
- Ve.w("".concat(this._n, ".setNetworkType value is undefined, please check!"));
- else {
- var t2 = Sa[e3.toLowerCase()];
- it(t2) || (this.networkType = t2);
- }
- return this;
- } }, { key: "getStartTs", value: function() {
- return this._startts;
- } }, { key: "setUIPlatform", value: function(e3) {
- this.uiPlatform = e3;
- } }], [{ key: "bindEventStatModule", value: function(t2) {
- e2.prototype._eventStatModule = t2;
- } }]), e2;
- }(), Ra = function() {
- function e2(t2) {
- o(this, e2), this.type = E.MSG_TEXT, this.content = { text: t2.text || "" };
- }
- return a(e2, [{ key: "setText", value: function(e3) {
- this.content.text = e3;
- } }, { key: "sendable", value: function() {
- return 0 !== this.content.text.length;
- } }]), e2;
- }(), Na = function() {
- function e2(t2, n2) {
- 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();
- }
- return a(e2, [{ key: "_initImageInfoModel", value: function() {
- var e3 = this;
- this._ImageInfoModel = function(t2) {
- 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);
- }, this._ImageInfoModel.prototype = { setSizeType: function(e4) {
- this.sizeType = e4;
- }, setType: function(e4) {
- this.type = e4;
- }, setImageUrl: function(e4) {
- e4 && (this.imageUrl = e4);
- }, getImageUrl: function() {
- return this.imageUrl;
- } };
- } }, { key: "initImageInfoArray", value: function(e3) {
- for (var t2 = 0, n2 = null, o2 = null; t2 <= 2; )
- 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++;
- this.updateAccessSideImageInfoArray();
- } }, { key: "updateImageInfoArray", value: function(e3) {
- for (var t2, n2 = this.content.imageInfoArray.length, o2 = 0; o2 < n2; o2++)
- 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);
- } }, { key: "_autoFixUrl", value: function() {
- for (var e3 = this.content.imageInfoArray.length, t2 = "", n2 = "", o2 = ["http", "https"], s2 = null, a2 = 0; a2 < e3; a2++)
- 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("")));
- } }, { key: "updatePercent", value: function(e3) {
- this._percent = e3, this._percent > 1 && (this._percent = 1);
- } }, { key: "updateImageFormat", value: function(e3) {
- this.content.imageFormat = Be[e3.toUpperCase()] || Be.UNKNOWN;
- } }, { key: "createImageDataASURLInWeb", value: function(e3) {
- void 0 !== e3 && e3.files.length > 0 && (this._imageMemoryURL = window.URL.createObjectURL(e3.files[0]));
- } }, { key: "createImageDataASURLInWXMiniApp", value: function(e3) {
- e3 && e3.url && (this._imageMemoryURL = e3.url);
- } }, { key: "replaceImageInfo", value: function(e3, t2) {
- this.content.imageInfoArray[t2] instanceof this._ImageInfoModel || (this.content.imageInfoArray[t2] = e3);
- } }, { key: "addImageInfo", value: function(e3) {
- this.content.imageInfoArray.length >= 3 || this.content.imageInfoArray.push(e3);
- } }, { key: "updateAccessSideImageInfoArray", value: function() {
- 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;
- 0 !== o2 && 0 !== a2 && (Pt(e3), Object.assign(e3[2], Ut({ originWidth: o2, originHeight: a2, min: 720 })));
- } }, { key: "sendable", value: function() {
- return 0 !== this.content.imageInfoArray.length && ("" !== this.content.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0].size);
- } }]), e2;
- }(), Oa = function() {
- function e2(t2) {
- o(this, e2), this.type = E.MSG_FACE, this.content = t2 || null;
- }
- return a(e2, [{ key: "sendable", value: function() {
- return null !== this.content;
- } }]), e2;
- }(), Ga = function() {
- function e2(t2, n2) {
- 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 };
- }
- return a(e2, [{ key: "updatePercent", value: function(e3) {
- this._percent = e3, this._percent > 1 && (this._percent = 1);
- } }, { key: "updateAudioUrl", value: function(e3) {
- this.content.remoteAudioUrl = e3;
- } }, { key: "sendable", value: function() {
- return "" !== this.content.remoteAudioUrl;
- } }]), e2;
- }(), Ua = { from: true, groupID: true, groupName: true, to: true }, Pa = function() {
- function e2(t2) {
- o(this, e2), this.type = E.MSG_GRP_TIP, this.content = {}, this._initContent(t2);
- }
- return a(e2, [{ key: "_initContent", value: function(e3) {
- var t2 = this;
- Object.keys(e3).forEach(function(n2) {
- switch (n2) {
- case "remarkInfo":
- break;
- case "groupProfile":
- t2.content.groupProfile = {}, t2._initGroupProfile(e3[n2]);
- break;
- case "operatorInfo":
- break;
- case "memberInfoList":
- case "msgMemberInfo":
- t2._updateMemberList(e3[n2]);
- break;
- case "memberExtraInfo":
- case "onlineMemberInfo":
- break;
- case "memberNum":
- t2.content[n2] = e3[n2], t2.content.memberCount = e3[n2];
- break;
- case "newGroupProfile":
- t2.content.newGroupProfile = {}, t2._initNewGroupProfile(e3[n2]);
- break;
- default:
- t2.content[n2] = e3[n2];
- }
- }), this.content.userIDList || (this.content.userIDList = [this.content.operatorID]);
- } }, { key: "_initGroupProfile", value: function(e3) {
- for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) {
- var o2 = t2[n2];
- Ua[o2] && (this.content.groupProfile[o2] = e3[o2]);
- }
- } }, { key: "_updateMemberList", value: function(e3) {
- zt(this.content.memberList) ? this.content.memberList = e3 : this.content.memberList.forEach(function(t2) {
- e3.forEach(function(e4) {
- t2.userID === e4.userID && Object.assign(t2, e4);
- });
- });
- } }, { key: "_initNewGroupProfile", value: function(e3) {
- for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) {
- var o2 = t2[n2];
- "muteAllMembers" !== o2 ? this.content.newGroupProfile[o2] = e3[o2] : this.content.newGroupProfile[o2] = 1 === e3[o2];
- }
- } }]), e2;
- }(), ba = { from: true, groupID: true, groupName: true, to: true }, wa = function() {
- function e2(t2) {
- o(this, e2), this.type = E.MSG_GRP_SYS_NOTICE, this.content = {}, this._initContent(t2);
- }
- return a(e2, [{ key: "_initContent", value: function(e3) {
- var t2 = this;
- Object.keys(e3).forEach(function(n2) {
- switch (n2) {
- case "memberInfoList":
- break;
- case "remarkInfo":
- t2.content.handleMessage = e3[n2];
- break;
- case "groupProfile":
- t2.content.groupProfile = {}, t2._initGroupProfile(e3[n2]);
- break;
- default:
- t2.content[n2] = e3[n2];
- }
- });
- } }, { key: "_initGroupProfile", value: function(e3) {
- for (var t2 = Object.keys(e3), n2 = 0; n2 < t2.length; n2++) {
- var o2 = t2[n2];
- ba[o2] && ("groupName" === o2 ? this.content.groupProfile.name = e3[o2] : this.content.groupProfile[o2] = e3[o2]);
- }
- } }]), e2;
- }(), Fa = function() {
- function e2(t2, n2) {
- o(this, e2), this.type = E.MSG_FILE, this._percent = 0;
- var s2 = this._getFileInfo(t2);
- this.content = { downloadFlag: 2, fileUrl: Yt(t2.url, n2) || "", uuid: t2.uuid, fileName: s2.name || "", fileSize: s2.size || 0 };
- }
- return a(e2, [{ key: "_getFileInfo", value: function(e3) {
- if (!it(e3.fileName) && !it(e3.fileSize))
- return { size: e3.fileSize, name: e3.fileName };
- var t2 = e3.file.files[0];
- if (oe) {
- if (t2.path && -1 !== t2.path.indexOf(".")) {
- var n2 = t2.path.slice(t2.path.lastIndexOf(".") + 1).toLowerCase();
- t2.type = n2, t2.name || (t2.name = "".concat(_t(999999), ".").concat(n2));
- }
- 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);
- }
- return { size: t2.size, name: t2.name };
- } }, { key: "updatePercent", value: function(e3) {
- this._percent = e3, this._percent > 1 && (this._percent = 1);
- } }, { key: "updateFileUrl", value: function(e3) {
- this.content.fileUrl = e3;
- } }, { key: "sendable", value: function() {
- return "" !== this.content.fileUrl && ("" !== this.content.fileName && 0 !== this.content.fileSize);
- } }]), e2;
- }(), qa = function() {
- function e2(t2) {
- o(this, e2), this.type = E.MSG_CUSTOM, this.content = { data: t2.data || "", description: t2.description || "", extension: t2.extension || "" };
- }
- return a(e2, [{ key: "setData", value: function(e3) {
- return this.content.data = e3, this;
- } }, { key: "setDescription", value: function(e3) {
- return this.content.description = e3, this;
- } }, { key: "setExtension", value: function(e3) {
- return this.content.extension = e3, this;
- } }, { key: "sendable", value: function() {
- return 0 !== this.content.data.length || 0 !== this.content.description.length || 0 !== this.content.extension.length;
- } }]), e2;
- }(), xa = function() {
- function e2(t2, n2) {
- 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) };
- }
- return a(e2, [{ key: "updatePercent", value: function(e3) {
- this._percent = e3, this._percent > 1 && (this._percent = 1);
- } }, { key: "updateVideoUrl", value: function(e3) {
- e3 && (this.content.remoteVideoUrl = e3);
- } }, { key: "updateSnapshotInfo", value: function(e3) {
- var t2 = e3.snapshotUrl, n2 = e3.snapshotWidth, o2 = e3.snapshotHeight;
- 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));
- } }, { key: "sendable", value: function() {
- return "" !== this.content.remoteVideoUrl;
- } }]), e2;
- }(), Va = function() {
- function e2(t2) {
- o(this, e2), this.type = E.MSG_LOCATION;
- var n2 = t2.description, s2 = t2.longitude, a2 = t2.latitude;
- this.content = { description: n2, longitude: s2, latitude: a2 };
- }
- return a(e2, [{ key: "sendable", value: function() {
- return true;
- } }]), e2;
- }(), Ba = function() {
- function e2(t2, n2) {
- 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)
- 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;
- else {
- this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.messageBody = [];
- var s2 = t2.elements[0].type, a2 = t2.elements[0].content;
- 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);
- }
- }
- return a(e2, [{ key: "_patchRichMediaPayload", value: function(e3, t2) {
- e3 === E.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e4) {
- !e4.imageUrl && e4.url && (e4.imageUrl = e4.url, e4.sizeType = e4.type, 1 === e4.type ? e4.type = 0 : 3 === e4.type && (e4.type = 1));
- }) : 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);
- } }, { key: "_updateRichMediaDownloadUrl", value: function(e3, t2, n2) {
- n2 && (e3 === E.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e4) {
- e4.url = Yt(e4.url, n2);
- }) : 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)));
- } }]), e2;
- }(), Ha = function() {
- function e2(t2, n2) {
- if (o(this, e2), this.type = E.MSG_MERGER, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, t2.downloadKey) {
- var s2 = t2.downloadKey, a2 = t2.pbDownloadKey, i2 = t2.title, r2 = t2.abstractList, u2 = t2.compatibleText, c2 = t2.version;
- 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;
- } else if (zt(t2.messageList))
- 1 === t2.layersOverLimit && (this.content.layersOverLimit = true);
- else {
- var l2 = t2.messageList, d2 = t2.title, p2 = t2.abstractList, g2 = t2.compatibleText, h2 = t2.version, _2 = [];
- l2.forEach(function(e3) {
- if (!zt(e3)) {
- var t3 = new Ba(e3, n2);
- _2.push(t3);
- }
- }), this.content.messageList = _2, this.content.title = d2, this.content.abstractList = p2, this.content.compatibleText = g2, this.content.version = h2 || 0;
- }
- }
- return a(e2, [{ key: "sendable", value: function() {
- return !zt(this.content.messageList) || !zt(this.content.downloadKey);
- } }]), e2;
- }(), Ka = { 1: E.MSG_PRIORITY_HIGH, 2: E.MSG_PRIORITY_NORMAL, 3: E.MSG_PRIORITY_LOW, 4: E.MSG_PRIORITY_LOWEST }, Wa = function() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "elements", get: function() {
- return this._elements;
- } }, { key: "getElements", value: function() {
- return this._elements;
- } }, { key: "extractGroupInfo", value: function(e3) {
- if (null !== e3) {
- nt(e3.nick) && (this.nick = e3.nick), nt(e3.avatar) && (this.avatar = e3.avatar);
- var t2 = e3.messageFromAccountExtraInformation;
- st(t2) && nt(t2.nameCard) && (this.nameCard = t2.nameCard);
- }
- } }, { key: "handleGroupAtInfo", value: function(e3) {
- var t2 = this;
- e3.payload && e3.payload.atUserList && e3.payload.atUserList.forEach(function(e4) {
- 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));
- }), at(e3.groupAtInfo) && e3.groupAtInfo.forEach(function(e4) {
- 0 === e4.groupAtAllFlag ? t2.atUserList.push(e4.groupAtUserID) : 1 === e4.groupAtAllFlag && t2.atUserList.push(E.MSG_AT_ALL);
- });
- } }, { key: "getGroupAtInfoList", value: function() {
- return this._groupAtInfoList;
- } }, { key: "_initProxy", value: function() {
- this._elements[0] && (this.payload = this._elements[0].content, this.type = this._elements[0].type);
- } }, { key: "reInitialize", value: function(e3) {
- 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();
- } }, { key: "isSendable", value: function() {
- return 0 !== this._elements.length && ("function" == typeof this._elements[0].sendable && this._elements[0].sendable());
- } }, { key: "_initTo", value: function(e3) {
- this.conversationType === E.CONV_GROUP && (this.to = e3.groupID);
- } }, { key: "_initSequence", value: function(e3) {
- 0 === this.clientSequence && e3 && (this.clientSequence = function(e4) {
- if (!e4)
- return false;
- if (void 0 === Mt[e4]) {
- 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);
- Mt[e4] = parseInt([n2, o2, s2, "0001"].join("")), n2 = null, o2 = null, s2 = null, Ve.l("autoIncrementIndex start index:".concat(Mt[e4]));
- }
- return Mt[e4]++;
- }(e3)), 0 === this.sequence && this.conversationType === E.CONV_C2C && (this.sequence = this.clientSequence);
- } }, { key: "generateMessageID", value: function() {
- this.from === E.CONV_SYSTEM && (this.senderTinyID = "144115198244471703"), this.ID = "".concat(this.senderTinyID, "-").concat(this.clientTime, "-").concat(this.random);
- } }, { key: "_initFlow", value: function(e3) {
- "" !== e3 && (e3 === this.from ? (this.flow = "out", this.isRead = true) : this.flow = "in");
- } }, { key: "_concatConversationID", value: function(e3) {
- var t2 = this.to, n2 = "", o2 = this.conversationType;
- 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;
- } }, { key: "isElement", value: function(e3) {
- 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;
- } }, { key: "setElement", value: function(e3, t2) {
- var n2 = this;
- if (this.isElement(e3))
- return this._elements = [e3], void this._initProxy();
- var o2 = function(e4) {
- if (e4.type && e4.content)
- switch (e4.type) {
- case E.MSG_TEXT:
- n2.setTextElement(e4.content);
- break;
- case E.MSG_IMAGE:
- n2.setImageElement(e4.content, t2);
- break;
- case E.MSG_AUDIO:
- n2.setAudioElement(e4.content, t2);
- break;
- case E.MSG_FILE:
- n2.setFileElement(e4.content, t2);
- break;
- case E.MSG_VIDEO:
- n2.setVideoElement(e4.content, t2);
- break;
- case E.MSG_CUSTOM:
- n2.setCustomElement(e4.content);
- break;
- case E.MSG_LOCATION:
- n2.setLocationElement(e4.content);
- break;
- case E.MSG_GRP_TIP:
- n2.setGroupTipElement(e4.content);
- break;
- case E.MSG_GRP_SYS_NOTICE:
- n2.setGroupSystemNoticeElement(e4.content);
- break;
- case E.MSG_FACE:
- n2.setFaceElement(e4.content);
- break;
- case E.MSG_MERGER:
- n2.setMergerElement(e4.content, t2);
- }
- };
- if (at(e3))
- for (var s2 = 0; s2 < e3.length; s2++)
- o2(e3[s2]);
- else
- o2(e3);
- this._initProxy();
- } }, { key: "clearElement", value: function() {
- this._elements.length = 0;
- } }, { key: "setTextElement", value: function(e3) {
- var t2 = "string" == typeof e3 ? e3 : e3.text, n2 = new Ra({ text: t2 });
- this._elements.push(n2);
- } }, { key: "setImageElement", value: function(e3, t2) {
- var n2 = new Na(e3, t2);
- this._elements.push(n2);
- } }, { key: "setAudioElement", value: function(e3, t2) {
- var n2 = new Ga(e3, t2);
- this._elements.push(n2);
- } }, { key: "setFileElement", value: function(e3, t2) {
- var n2 = new Fa(e3, t2);
- this._elements.push(n2);
- } }, { key: "setVideoElement", value: function(e3, t2) {
- var n2 = new xa(e3, t2);
- this._elements.push(n2);
- } }, { key: "setLocationElement", value: function(e3) {
- var t2 = new Va(e3);
- this._elements.push(t2);
- } }, { key: "setCustomElement", value: function(e3) {
- var t2 = new qa(e3);
- this._elements.push(t2);
- } }, { key: "setGroupTipElement", value: function(e3) {
- var t2 = {}, n2 = e3.operationType;
- 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)) {
- var o2 = e3.memberExtraInfo.reason;
- e3.msgMemberInfo.forEach(function(e4) {
- e4.reason = o2;
- });
- }
- var s2 = t2, a2 = s2.nick, i2 = s2.avatar;
- nt(a2) && (this.nick = a2), nt(i2) && (this.avatar = i2);
- var r2 = new Pa(e3);
- this._elements.push(r2);
- } }, { key: "setGroupSystemNoticeElement", value: function(e3) {
- var t2 = new wa(e3);
- this._elements.push(t2);
- } }, { key: "setFaceElement", value: function(e3) {
- var t2 = new Oa(e3);
- this._elements.push(t2);
- } }, { key: "setMergerElement", value: function(e3, t2) {
- var n2 = new Ha(e3, t2);
- this._elements.push(n2);
- } }, { key: "setIsRead", value: function(e3) {
- this.isRead = e3;
- } }, { key: "setRelayFlag", value: function(e3) {
- this._relayFlag = e3;
- } }, { key: "getRelayFlag", value: function() {
- return this._relayFlag;
- } }, { key: "_computePriority", value: function(e3) {
- if (it(e3))
- return E.MSG_PRIORITY_NORMAL;
- if (nt(e3) && -1 !== Object.values(Ka).indexOf(e3))
- return e3;
- if (et(e3)) {
- var t2 = "" + e3;
- if (-1 !== Object.keys(Ka).indexOf(t2))
- return Ka[t2];
- }
- return E.MSG_PRIORITY_NORMAL;
- } }, { key: "setNickAndAvatar", value: function(e3) {
- var t2 = e3.nick, n2 = e3.avatar;
- nt(t2) && (this.nick = t2), nt(n2) && (this.avatar = n2);
- } }, { key: "setNameCard", value: function(e3) {
- nt(e3) && (this.nameCard = e3);
- } }, { key: "initC2CReadReceiptInfo", value: function(e3) {
- this.conversationType === E.CONV_C2C && true === this.needReadReceipt && (this.readReceiptInfo.isPeerRead = 1 === e3);
- } }]), e2;
- }(), Ya = function(e2) {
- return { code: 0, data: e2 || {} };
- }, ja = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- o(this, n2), s2 = t2.call(this);
- var a2 = e3.code, i2 = e3.message, r2 = e3.data;
- return s2.code = a2, s2.message = i2 || s2._getErrorMessage(s2.code), s2.data = r2 || {}, s2;
- }
- return a(n2);
- }(p(Error)), za = null, Ja = function(e2) {
- za = e2;
- }, Xa = function(e2) {
- return Promise.resolve(Ya(e2));
- }, Za = function(e2) {
- var t2 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- if (e2 instanceof ja)
- return t2 && null !== za && za.emit(k.ERROR, e2), Promise.reject(e2);
- if (e2 instanceof Error) {
- var n2 = new ja({ code: ha.UNCAUGHT_ERROR });
- return t2 && null !== za && za.emit(k.ERROR, n2), Promise.reject(n2);
- }
- if (!it(e2) && !it(e2.code)) {
- var o2 = new ja(e2);
- return t2 && null !== za && za.emit(k.ERROR, o2), Promise.reject(o2);
- }
- }, Qa = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- return o(this, s2), (t2 = n2.call(this, e3))._n = "C2CModule", t2._messageFromUnreadDBMap = /* @__PURE__ */ new Map(), t2._signalingFromUnreadDBList = [], t2;
- }
- return a(s2, [{ key: "onNewC2CMessage", value: function(e3) {
- var t2 = e3.dataList, n3 = e3.isInstantMessage, o2 = e3.C2CRemainingUnreadList, s3 = e3.C2CPairUnreadList;
- Ve.d("".concat(this._n, ".onNewC2CMessage count:").concat(t2.length, " isInstantMessage:").concat(n3));
- var a2 = this._newC2CMessageStoredAndSummary({ dataList: t2, C2CRemainingUnreadList: o2, C2CPairUnreadList: s3, isInstantMessage: n3 }), i2 = a2.conversationOptionsList, r2 = a2.messageList, u2 = a2.isUnreadC2CMessage;
- (this.filterModifiedMessage(r2), i2.length > 0) && this.getModule(qn).onNewMessage({ conversationOptionsList: i2, isInstantMessage: n3, isUnreadC2CMessage: u2 });
- var c2 = this.filterUnmodifiedMessage(r2);
- n3 && c2.length > 0 && this.emitOuterEvent(k.MESSAGE_RECEIVED, c2), r2.length = 0;
- } }, { key: "_newC2CMessageStoredAndSummary", value: function(e3) {
- 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++)
- if (this._isSignaling(t2[h2]))
- this._signalingFromUnreadDBList.push(t2[h2].eventArray[0].c2CNotifyMsgArray[0]);
- else {
- var f2 = t2[h2];
- 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 });
- var v2 = a2.conversationID;
- if (s3) {
- if (1 === this._messageFromUnreadDBMap.get(a2.ID))
- continue;
- var m2 = false;
- if (a2.from !== this.getMyUserID()) {
- var M2 = p2.getLatestMessageSentByPeer(v2);
- if (M2) {
- var y2 = M2.nick, I2 = M2.avatar;
- d2 ? a2.setNickAndAvatar({ nick: y2, avatar: I2 }) : y2 === a2.nick && I2 === a2.avatar || (m2 = true);
- }
- } else {
- var C2 = p2.getLatestMessageSentByMe(v2);
- if (C2) {
- var T2 = C2.nick, D2 = C2.avatar;
- T2 === a2.nick && D2 === a2.avatar || p2.modifyMessageSentByMe({ conversationID: v2, latestNick: a2.nick, latestAvatar: a2.avatar });
- }
- }
- var k2 = 1 === t2[h2].isModified;
- if (p2.isMessageSentByCurrentInstance(a2) ? a2.isModified = k2 : k2 = false, 0 === f2.msgLifeTime)
- a2._onlineOnlyFlag = true, p2.isMessageSentByCurrentInstance(a2) || r2.push(a2);
- else {
- if (!p2.pushIntoMessageList(r2, a2, k2))
- continue;
- m2 && (p2.modifyMessageSentByPeer({ conversationID: v2, latestNick: a2.nick, latestAvatar: a2.avatar }), p2.updateUserProfileSpecifiedKey({ conversationID: v2, nick: a2.nick, avatar: a2.avatar }));
- }
- s3 && a2.clientTime > 0 && l2.addMessageDelay(a2.clientTime);
- } else
- this._messageFromUnreadDBMap.set(a2.ID, 1);
- if (0 !== f2.msgLifeTime) {
- if (false === a2._onlineOnlyFlag) {
- var S2 = p2.getLastMessageTime(v2);
- if (et(S2) && a2.time < S2)
- continue;
- if (it(u2[v2])) {
- var L2 = 0;
- "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;
- } else {
- var A2 = u2[v2];
- i2[A2].type = a2.conversationType, i2[A2].subType = a2.conversationSubType, i2[A2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" === a2.flow && (a2._isExcludedFromUnreadCount || i2[A2].unreadCount++);
- }
- }
- } else
- a2._onlineOnlyFlag = true;
- }
- this._handleSignalingFromUnreadDB();
- var R2 = false;
- if (at(o2))
- for (var N2 = function(e4, t3) {
- if (o2[e4].unreadCount > 0) {
- R2 = true;
- var n4 = i2.find(function(t4) {
- return t4.conversationID === "C2C".concat(o2[e4].from);
- });
- n4 ? n4.unreadCount = o2[e4].unreadCount : i2.push({ conversationID: "C2C".concat(o2[e4].from), unreadCount: o2[e4].unreadCount, type: E.CONV_C2C });
- }
- }, O2 = 0, G2 = o2.length; O2 < G2; O2++)
- N2(O2);
- if (at(n3))
- for (var U2 = function(e4, t3) {
- i2.find(function(t4) {
- return t4.conversationID === "C2C".concat(n3[e4].from);
- }) || i2.push({ conversationID: "C2C".concat(n3[e4].from), type: E.CONV_C2C, lastMsgTime: n3[e4].lastMsgTime });
- }, P2 = 0, b2 = n3.length; P2 < b2; P2++)
- U2(P2);
- return { conversationOptionsList: i2, messageList: r2, isUnreadC2CMessage: R2 };
- } }, { key: "_isSignaling", value: function(e3) {
- var t2 = e3.eventArray;
- return !(!at(t2) || 10 !== t2[0].event);
- } }, { key: "_handleSignalingFromUnreadDB", value: function() {
- var e3 = this._signalingFromUnreadDBList.length;
- if (Ve.l("".concat(this._n, "._handleSignalingFromUnreadDB signalingCount:").concat(e3)), 0 !== e3) {
- var t2 = [];
- this._signalingFromUnreadDBList.forEach(function(e4) {
- e4.hasOwnProperty("c2cMessageRevokedNotify") && t2.push(e4);
- }), this.onC2CMessageRevoked({ dataList: t2 }), this._signalingFromUnreadDBList.length = 0, t2.length = 0;
- }
- } }, { key: "onC2CMessageRevoked", value: function(e3) {
- var t2 = this, n3 = this.getModule(qn), o2 = [], s3 = null, a2 = true;
- e3.dataList.forEach(function(e4) {
- if (e4.c2cMessageRevokedNotify) {
- var i2 = e4.c2cMessageRevokedNotify.revokedInfos;
- it(i2) || i2.forEach(function(e5) {
- var i3 = t2.getMyUserID() === e5.from ? "".concat(E.CONV_C2C).concat(e5.to) : "".concat(E.CONV_C2C).concat(e5.from);
- s3 = n3.revoke(i3, e5.sequence, e5.random);
- var r2 = e5.revokerInfo && e5.revokerInfo.revoker;
- if (s3)
- s3.revoker || (s3.revoker = r2, o2.push(s3));
- else {
- var u2 = { conversationID: i3, sequence: e5.sequence, time: e5.time, revoker: r2 };
- n3.isLastMessageRevoked(u2) && (o2.push(u2), a2 = false);
- }
- });
- }
- }), 0 !== o2.length && (n3.onMessageRevoked(o2), true === a2 && (Ve.l("".concat(this._n, ".onC2CMessageRevoked count:").concat(o2.length)), this.emitOuterEvent(k.MESSAGE_REVOKED, o2)));
- } }, { key: "onC2CMessageReadReceipt", value: function(e3) {
- var t2 = this;
- e3.dataList.forEach(function(e4) {
- if (!zt(e4.c2cMessageReadReceipt)) {
- var n3 = e4.c2cMessageReadReceipt.to;
- e4.c2cMessageReadReceipt.uinPairReadArray.forEach(function(e5) {
- var o2 = e5.peerReadTime;
- Ve.d("".concat(t2._n, "._onC2CMessageReadReceipt to:").concat(n3, " peerReadTime:").concat(o2));
- var s3 = "".concat(E.CONV_C2C).concat(n3), a2 = t2.getModule(qn);
- a2.recordPeerReadTime(s3, o2), a2.updateMessageIsPeerReadProperty(s3, o2);
- });
- }
- });
- } }, { key: "onC2CMessageReadNotice", value: function(e3) {
- var t2 = this;
- e3.dataList.forEach(function(e4) {
- if (!zt(e4.c2cMessageReadNotice)) {
- var n3 = t2.getModule(qn);
- e4.c2cMessageReadNotice.uinPairReadArray.forEach(function(e5) {
- var o2 = e5.from, s3 = e5.peerReadTime;
- Ve.d("".concat(t2._n, ".onC2CMessageReadNotice from:").concat(o2, " lastReadTime:").concat(s3));
- var a2 = "".concat(E.CONV_C2C).concat(o2);
- n3.updateIsReadAfterReadReport({ conversationID: a2, lastMessageTime: s3 }), n3.updateUnreadCount(a2);
- });
- }
- });
- } }, { key: "onC2CMessageModified", value: function(e3) {
- Ve.d("".concat(this._n, ".onC2CMessageModified options:"), JSON.stringify(e3));
- var n3 = this.getModule(qn);
- e3.dataList.forEach(function(e4) {
- n3.onMessageModified(t(t({}, e4), {}, { conversationType: E.CONV_C2C }));
- });
- } }, { key: "onReadReceiptList", value: function(e3) {
- Ve.d("".concat(this._n, ".onReadReceiptList options:"), JSON.stringify(e3));
- var t2 = e3.dataList, n3 = t2.userID, o2 = t2.readReceiptList;
- this.getModule(qn).updateReadReceiptInfo({ userID: n3, readReceiptList: o2 });
- } }, { key: "sendMessage", value: function(e3, t2) {
- var n3 = this._createC2CMessagePack(e3, t2);
- return this.request(n3);
- } }, { key: "_createC2CMessagePack", value: function(e3, t2) {
- var n3 = null;
- t2 && (t2.offlinePushInfo && (n3 = t2.offlinePushInfo), true === t2.onlineUserOnly && (n3 ? n3.disablePush = true : n3 = { disablePush: true }));
- var o2 = "";
- nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (o2 = e3.cloudCustomData);
- var s3 = [];
- if (st(t2) && st(t2.messageControlInfo)) {
- var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
- true === i2 && s3.push("NoUnread"), true === r2 && s3.push("NoLastMsg"), true === u2 && s3.push("NoMsgCheck");
- }
- var c2 = this.isOnlineMessage(e3, t2) ? 0 : void 0;
- 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 } };
- } }, { key: "_isVoipPush", value: function(e3) {
- var t2 = void 0;
- return it(e3.disableVoipPush) || (t2 = false === e3.disableVoipPush ? 1 : 0), t2;
- } }, { key: "isOnlineMessage", value: function(e3, t2) {
- return !(!t2 || true !== t2.onlineUserOnly);
- } }, { key: "revokeMessage", value: function(e3) {
- return this.request({ protocolName: To, requestData: { msgInfo: { fromAccount: e3.from, toAccount: e3.to, msgSeq: e3.sequence, msgRandom: e3.random, msgTimeStamp: e3.time } } });
- } }, { key: "deleteMessage", value: function(e3) {
- var t2 = e3.to, n3 = e3.keyList;
- 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 } });
- } }, { key: "modifyRemoteMessage", value: function(e3) {
- 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;
- 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 } });
- } }, { key: "setMessageRead", value: function(e3) {
- var t2 = this, n3 = e3.conversationID, o2 = e3.lastMessageTime, s3 = "".concat(this._n, ".setMessageRead");
- Ve.l("".concat(s3, " conversationID:").concat(n3, " lastMessageTime:").concat(o2)), et(o2) || this.outputWarning("DoNotModifyLastTime");
- var a2 = new Aa("setC2CMessageRead");
- 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() {
- a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok"));
- var e4 = t2.getModule(qn);
- return e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageTime: o2 }), e4.updateUnreadCount(n3), Ya();
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(e4, o3, s4).end();
- }), Ve.l("".concat(s3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getRoamingMessage", value: function(e3) {
- 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);
- Ve.l("".concat(n3, " ").concat(u2));
- var c2 = new Aa("getC2CRoamingMessages");
- return this.request({ protocolName: So, requestData: { peerAccount: o2, count: a2 || 15, lastMessageTime: i2 || 0, messageKey: r2 } }).then(function(e4) {
- var o3 = e4.data, a3 = o3.complete, i3 = o3.messageList, r3 = o3.messageKey, l2 = o3.lastMessageTime;
- 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();
- var d2 = t2.getModule(qn);
- 1 === a3 && d2.setCompleted(s3);
- var p2 = d2.onRoamingMessage(i3, s3);
- d2.modifyMessageList(s3), d2.updateIsRead(s3), d2.updateRoamingMessageKeyAndTime(s3, r3, l2);
- var g2 = d2.getPeerReadTime(s3);
- if (Ve.l("".concat(n3, " update isPeerRead property. conversationID:").concat(s3, " peerReadTime:").concat(g2)), g2)
- d2.updateMessageIsPeerReadProperty(s3, g2);
- else {
- var h2 = s3.replace(E.CONV_C2C, "");
- t2.getRemotePeerReadTime([h2]).then(function() {
- d2.updateMessageIsPeerReadProperty(s3, d2.getPeerReadTime(s3));
- });
- }
- var _2 = "";
- if (p2.length > 0)
- _2 = p2[0].ID;
- else {
- var f2 = d2.getLocalOldestMessage(s3);
- f2 && (_2 = f2.ID);
- }
- return Ve.l("".concat(n3, " nextReqID:").concat(_2, " stored message count:").concat(p2.length)), { nextReqID: _2, storedMessageList: p2 };
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- c2.setMessage(u2).setError(e4, o3, s4).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getRoamingMessagesHopping", value: function(e3) {
- 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);
- Ve.l("".concat(n3, " ").concat(c2));
- var l2 = new Aa("getC2CRoamingMessagesHopping");
- return this.request({ protocolName: So, requestData: { peerAccount: o2, count: i2 + 1, lastMessageTime: a2, direction: r2 } }).then(function(e4) {
- var o3 = e4.data, s4 = o3.complete, a3 = o3.messageList, i3 = void 0 === a3 ? [] : a3, d2 = o3.lastMessageTime;
- 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());
- var p2 = t2.getModule(qn).onRoamingMessage(i3, u2, false);
- t2._modifyMessageList(u2, p2);
- var g2 = t2._computeResult({ complete: s4, lastMessageTime: d2, resultList: p2 });
- return Ya(g2);
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- l2.setMessage(c2).setError(e4, o3, s4).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_computeResult", value: function(e3) {
- 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: "" };
- return 1 === n3 ? (a2.isCompleted = true, a2) : (a2.nextMessageTime = o2, a2);
- } }, { key: "_modifyMessageList", value: function(e3, t2) {
- var n3 = this.getModule(qn).getLocalConversation(e3);
- if (n3)
- 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--) {
- var c2 = t2[u2];
- "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 }));
- }
- } }, { key: "getRemotePeerReadTime", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".getRemotePeerReadTime");
- if (zt(e3))
- return Ve.w("".concat(n3, " userIDList is empty!")), Promise.resolve();
- var o2 = new Aa("getPeerReadTime");
- return Ve.l("".concat(n3, " userIDList:").concat(e3)), this.request({ protocolName: Lo, requestData: { userIDList: e3 } }).then(function(s3) {
- var a2 = s3.data.peerReadTimeList;
- Ve.l("".concat(n3, " ok. peerReadTimeList:").concat(a2));
- for (var i2 = "", r2 = t2.getModule(qn), u2 = 0; u2 < e3.length; u2++)
- i2 += "".concat(e3[u2], "-").concat(a2[u2], " "), a2[u2] > 0 && r2.recordPeerReadTime("C2C".concat(e3[u2]), a2[u2]);
- o2.setNetworkType(t2.getNetworkType()).setMessage(i2).end();
- }).catch(function(e4) {
- t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1];
- o2.setError(e4, s3, a2).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4);
- });
- } }, { key: "sendReadReceipt", value: function(e3) {
- var t2 = this, n3 = e3[0].conversationID.replace(E.CONV_C2C, ""), o2 = new Aa("sendC2CReadReceipt");
- o2.setMessage("peerAccount:".concat(n3));
- var s3 = this.getMyUserID(), a2 = e3.filter(function(e4) {
- return e4.from !== s3 && true === e4.needReadReceipt;
- }).map(function(e4) {
- return { fromAccount: e4.from, toAccount: e4.to, sequence: e4.sequence, random: e4.random, time: e4.time, clientTime: e4.clientTime };
- });
- if (0 === a2.length)
- return Za({ code: ha.READ_RECEIPT_MESSAGE_LIST_EMPTY });
- var i2 = "".concat(this._n, ".sendReadReceipt");
- 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) {
- return o2.end(), Ve.l("".concat(i2, " ok")), Ya();
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), s4 = n4[0], a3 = n4[1];
- o2.setError(e4, s4, a3).end();
- }), Ve.w("".concat(i2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getReadReceiptList", value: function(e3) {
- var t2 = "".concat(this._n, ".getReadReceiptList"), n3 = this.getMyUserID(), o2 = e3.filter(function(e4) {
- return e4.from === n3 && true === e4.needReadReceipt;
- });
- return Ve.l("".concat(t2, " userID:").concat(n3, " messageList length:").concat(o2.length)), Xa({ messageList: o2 });
- } }, { key: "getMessageExtensions", value: function(e3, t2) {
- 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 } });
- } }, { key: "modifyMessageExtensions", value: function(e3, t2) {
- var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
- 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 } });
- } }, { key: "_getMessageKey", value: function(e3) {
- var t2 = e3.clientSequence, n3 = e3.random, o2 = e3.time;
- return "".concat(t2, "_").concat(n3, "_").concat(o2);
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._messageFromUnreadDBMap.clear(), this._signalingFromUnreadDBList.length = 0;
- } }]), s2;
- }(uo), $a = function() {
- function e2() {
- o(this, e2), this.list = /* @__PURE__ */ new Map(), this._n = "MessageListHandler", this._latestMessageSentByPeerMap = /* @__PURE__ */ new Map(), this._latestMessageSentByMeMap = /* @__PURE__ */ new Map();
- }
- return a(e2, [{ key: "getLocalOldestMessageByConversationID", value: function(e3) {
- if (!e3)
- return null;
- if (!this.list.has(e3))
- return null;
- var t2 = this.list.get(e3).values();
- return t2 ? t2.next().value : null;
- } }, { key: "pushIn", value: function(e3) {
- var t2 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], n2 = e3.conversationID, o2 = true;
- this.list.has(n2) || this.list.set(n2, /* @__PURE__ */ new Map());
- var s2 = this._getUniqueIDOfMessage(e3), a2 = this.list.get(n2).has(s2);
- if (a2) {
- var i2 = this.list.get(n2).get(s2);
- if (!t2 || true === i2.isModified)
- return o2 = false;
- }
- return this.list.get(n2).set(s2, e3), this._setLatestMessageSentByPeer(n2, e3), this._setLatestMessageSentByMe(n2, e3), o2;
- } }, { key: "unshift", value: function(e3, t2) {
- var n2;
- 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)) {
- var o2 = Array.from(this.list.get(n2).values()), s2 = o2.length;
- if (0 === s2)
- return;
- for (var a2 = s2 - 1; a2 >= 0; a2--)
- if ("out" === o2[a2].flow) {
- this._setLatestMessageSentByMe(n2, o2[a2]);
- break;
- }
- for (var i2 = s2 - 1; i2 >= 0; i2--)
- if ("in" === o2[i2].flow) {
- this._setLatestMessageSentByPeer(n2, o2[i2]);
- break;
- }
- }
- } }, { key: "_unshiftSingleMessage", value: function(e3, t2) {
- var n2 = e3.conversationID, o2 = this._getUniqueIDOfMessage(e3);
- if (!this.list.has(n2))
- return this.list.set(n2, /* @__PURE__ */ new Map()), this.list.get(n2).set(o2, e3), void t2.push(e3);
- var s2 = this.list.get(n2), a2 = Array.from(s2);
- s2.has(o2) || (a2.unshift([o2, e3]), this.list.set(n2, new Map(a2)), t2.push(e3));
- } }, { key: "_unshiftMultipleMessages", value: function(e3, t2) {
- 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++) {
- var u2 = this._getUniqueIDOfMessage(e3[r2]);
- a2 && a2.has(u2) || (o2.push([u2, e3[r2]]), t2.push(e3[r2]));
- }
- this.list.set(s2, new Map(o2.concat(i2)));
- } }, { key: "remove", value: function(e3) {
- var t2 = e3.conversationID, n2 = this._getUniqueIDOfMessage(e3);
- this.list.has(t2) && this.list.get(t2).delete(n2);
- } }, { key: "revoke", value: function(e3, t2, n2) {
- if (Ve.d("revoke message", e3, t2, n2), this.list.has(e3)) {
- var o2, s2 = D(this.list.get(e3));
- try {
- for (s2.s(); !(o2 = s2.n()).done; ) {
- var a2 = v(o2.value, 2)[1];
- if (a2.sequence === t2 && (it(n2) || a2.random === n2))
- return a2.isRevoked || (a2.isRevoked = true), a2;
- }
- } catch (i2) {
- s2.e(i2);
- } finally {
- s2.f();
- }
- }
- return null;
- } }, { key: "removeByConversationID", value: function(e3) {
- this.list.has(e3) && (this.list.delete(e3), this._latestMessageSentByPeerMap.delete(e3), this._latestMessageSentByMeMap.delete(e3));
- } }, { key: "findMessage", value: function(e3) {
- var t2, n2 = null, o2 = D(this.list);
- try {
- for (o2.s(); !(t2 = o2.n()).done; )
- for (var s2 = m(v(t2.value, 2)[1].values()), a2 = s2.length, i2 = 0; i2 < a2; i2++)
- if (s2[i2].ID === e3) {
- n2 = s2[i2];
- break;
- }
- } catch (r2) {
- o2.e(r2);
- } finally {
- o2.f();
- }
- return n2;
- } }, { key: "updateMessageIsPeerReadProperty", value: function(e3, t2) {
- var n2 = [];
- if (this.list.has(e3)) {
- var o2, s2 = D(this.list.get(e3));
- try {
- for (s2.s(); !(o2 = s2.n()).done; ) {
- var a2 = v(o2.value, 2)[1];
- a2.time <= t2 && !a2.isPeerRead && "out" === a2.flow && (a2.isPeerRead = true, n2.push(a2));
- }
- } catch (i2) {
- s2.e(i2);
- } finally {
- s2.f();
- }
- Ve.l("".concat(this._n, ".updateMessageIsPeerReadProperty conversationID:").concat(e3, " peerReadTime:").concat(t2, " count:").concat(n2.length));
- }
- return n2;
- } }, { key: "updateMessageIsModifiedProperty", value: function(e3) {
- var t2 = e3.conversationID;
- if (this.list.has(t2)) {
- var n2 = this._getUniqueIDOfMessage(e3), o2 = this.list.get(t2).get(n2);
- o2 && (o2.isModified = true);
- }
- } }, { key: "hasLocalMessageList", value: function(e3) {
- return this.list.has(e3);
- } }, { key: "getLocalMessageList", value: function(e3) {
- return this.hasLocalMessageList(e3) ? m(this.list.get(e3).values()) : [];
- } }, { key: "hasLocalMessage", value: function(e3, t2) {
- for (var n2 = false, o2 = this.getLocalMessageList(e3), s2 = o2.length, a2 = 0; a2 < s2; a2++)
- o2[a2].ID === t2 && (n2 = true);
- return n2;
- } }, { key: "getLocalMessage", value: function(e3, t2) {
- for (var n2 = null, o2 = this.getLocalMessageList(e3), s2 = o2.length, a2 = 0; a2 < s2; a2++)
- if (o2[a2].ID === t2) {
- n2 = o2[a2];
- break;
- }
- return n2;
- } }, { key: "getLocalLastMessage", value: function(e3) {
- var t2 = this.getLocalMessageList(e3);
- return t2[t2.length - 1];
- } }, { key: "getLocalOldestMessage", value: function(e3) {
- return this.getLocalMessageList(e3)[0];
- } }, { key: "_setLatestMessageSentByPeer", value: function(e3, t2) {
- e3.startsWith(E.CONV_C2C) && "in" === t2.flow && this._latestMessageSentByPeerMap.set(e3, t2);
- } }, { key: "_setLatestMessageSentByMe", value: function(e3, t2) {
- e3.startsWith(E.CONV_C2C) && "out" === t2.flow && this._latestMessageSentByMeMap.set(e3, t2);
- } }, { key: "getLatestMessageSentByPeer", value: function(e3) {
- return this._latestMessageSentByPeerMap.get(e3);
- } }, { key: "getLatestMessageSentByMe", value: function(e3) {
- return this._latestMessageSentByMeMap.get(e3);
- } }, { key: "modifyMessageSentByPeer", value: function(e3) {
- var t2 = e3.conversationID, n2 = e3.latestNick, o2 = e3.latestAvatar, s2 = this.list.get(t2);
- if (!zt(s2)) {
- var a2 = Array.from(s2.values()), i2 = a2.length;
- if (0 !== i2) {
- for (var r2 = null, u2 = 0, c2 = false, l2 = i2 - 1; l2 >= 0; l2--)
- "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));
- Ve.l("".concat(this._n, ".modifyMessageSentByPeer conversationID:").concat(t2, " count:").concat(u2));
- }
- }
- } }, { key: "modifyMessageSentByMe", value: function(e3) {
- var t2 = e3.conversationID, n2 = e3.latestNick, o2 = e3.latestAvatar, s2 = this.list.get(t2);
- if (!zt(s2)) {
- var a2 = Array.from(s2.values()), i2 = a2.length;
- if (0 !== i2) {
- for (var r2 = null, u2 = 0, c2 = false, l2 = i2 - 1; l2 >= 0; l2--)
- "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));
- Ve.l("".concat(this._n, ".modifyMessageSentByMe conversationID:").concat(t2, " count:").concat(u2));
- }
- }
- } }, { key: "getTopicConversationIDList", value: function(e3) {
- return m(this.list.keys()).filter(function(t2) {
- return t2.startsWith("".concat(E.CONV_GROUP).concat(e3));
- });
- } }, { key: "traversal", value: function() {
- if (0 !== this.list.size && -1 === Ve.getLevel()) {
- console.group("conversationID-messageCount");
- var e3, t2 = D(this.list);
- try {
- for (t2.s(); !(e3 = t2.n()).done; ) {
- var n2 = v(e3.value, 2), o2 = n2[0], s2 = n2[1];
- formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", "".concat(o2, "-").concat(s2.size));
- }
- } catch (a2) {
- t2.e(a2);
- } finally {
- t2.f();
- }
- console.groupEnd();
- }
- } }, { key: "onMessageModified", value: function(e3, t2) {
- if (!this.list.has(e3))
- return { isUpdated: false, message: null };
- var n2 = this._getUniqueIDOfMessage(t2), o2 = this.list.get(e3).has(n2);
- if (Ve.d("".concat(this._n, ".onMessageModified conversationID:").concat(e3, " uniqueID:").concat(n2, " has:").concat(o2)), o2) {
- var s2 = this.list.get(e3).get(n2), a2 = t2.messageVersion, i2 = t2.elements, r2 = t2.cloudCustomData;
- 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 };
- }
- return { isUpdated: false, message: null };
- } }, { key: "_getUniqueIDOfMessage", value: function(e3) {
- var t2 = e3.from, n2 = e3.to, o2 = e3.random, s2 = e3.sequence, a2 = e3.time;
- return "".concat(t2, "-").concat(n2, "-").concat(o2, "-").concat(s2, "-").concat(a2);
- } }, { key: "reset", value: function() {
- this.list.clear(), this._latestMessageSentByPeerMap.clear(), this._latestMessageSentByMeMap.clear();
- } }]), e2;
- }(), ei = "_a2KeyAndTinyIDUpdated", ti = "_cloudConfigUpdated", ni = "_profileUpdated";
- function oi(e2) {
- this.mixin(e2);
- }
- oi.mixin = function(e2) {
- var t2 = e2.prototype || e2;
- t2._isReady = false, t2.ready = function(e3) {
- var t3 = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- if (e3)
- return this._isReady ? void (t3 ? e3.call(this) : setTimeout(e3, 1)) : (this._readyQueue = this._readyQueue || [], void this._readyQueue.push(e3));
- }, t2.triggerReady = function() {
- var e3 = this;
- this._isReady = true, setTimeout(function() {
- var t3 = e3._readyQueue;
- e3._readyQueue = [], t3 && t3.length > 0 && t3.forEach(function(e4) {
- e4.call(this);
- }, e3);
- }, 1);
- }, t2.resetReady = function() {
- this._isReady = false, this._readyQueue = [];
- }, t2.isReady = function() {
- return this._isReady;
- };
- };
- var si = ["jpg", "jpeg", "gif", "png", "bmp", "image", "webp"], ai = ["mp4", "quicktime", "mov"], ii = 1, ri = 2, ui = 3, ci = 255, li = function() {
- function e2(t2) {
- var n2 = this;
- 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) {
- n2.profileCustomField.push({ key: e3.key, value: e3.value });
- }));
- }
- return a(e2, [{ key: "validate", value: function(e3) {
- var t2 = true, n2 = "";
- if (zt(e3))
- return { valid: false, tips: "empty options" };
- if (e3.profileCustomField)
- for (var o2 = e3.profileCustomField.length, s2 = null, a2 = 0; a2 < o2; a2++) {
- if (s2 = e3.profileCustomField[a2], !nt(s2.key) || -1 === s2.key.indexOf("Tag_Profile_Custom"))
- return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" };
- if (!nt(s2.value))
- return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" };
- }
- for (var i2 in e3)
- if (Object.prototype.hasOwnProperty.call(e3, i2)) {
- if ("profileCustomField" === i2)
- continue;
- if (zt(e3[i2]) && !nt(e3[i2]) && !et(e3[i2])) {
- n2 = "key:" + i2 + ", invalid value:" + e3[i2], t2 = false;
- continue;
- }
- switch (i2) {
- case "nick":
- 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);
- break;
- case "gender":
- mt(Ke, e3.gender) || (n2 = "key:gender, invalid value:" + e3.gender, t2 = false);
- break;
- case "birthday":
- et(e3.birthday) || (n2 = "birthday must be a number", t2 = false);
- break;
- case "location":
- nt(e3.location) || (n2 = "location must be a string", t2 = false);
- break;
- case "selfSignature":
- nt(e3.selfSignature) || (n2 = "selfSignature must be a string", t2 = false);
- break;
- case "allowType":
- mt(Ye, e3.allowType) || (n2 = "key:allowType, invalid value:" + e3.allowType, t2 = false);
- break;
- case "language":
- et(e3.language) || (n2 = "language must be a number", t2 = false);
- break;
- case "avatar":
- nt(e3.avatar) || (n2 = "avatar must be a string", t2 = false);
- break;
- case "messageSettings":
- 0 !== e3.messageSettings && 1 !== e3.messageSettings && (n2 = "messageSettings must be 0 or 1", t2 = false);
- break;
- case "adminForbidType":
- mt(We, e3.adminForbidType) || (n2 = "key:adminForbidType, invalid value:" + e3.adminForbidType, t2 = false);
- break;
- case "level":
- et(e3.level) || (n2 = "level must be a number", t2 = false);
- break;
- case "role":
- et(e3.role) || (n2 = "role must be a number", t2 = false);
- break;
- default:
- n2 = "unknown key:" + i2 + " " + e3[i2], t2 = false;
- }
- }
- return { valid: t2, tips: n2 };
- } }]), e2;
- }(), di = a(function e2(t2) {
- o(this, e2), this.value = t2, this.next = null;
- }), pi = function() {
- function e2(t2) {
- o(this, e2), this.MAX_LENGTH = t2, this.pTail = null, this.pNodeToDel = null, this.map = /* @__PURE__ */ new Map();
- }
- return a(e2, [{ key: "set", value: function(e3) {
- var t2 = new di(e3);
- if (this.map.size < this.MAX_LENGTH)
- null === this.pTail ? (this.pTail = t2, this.pNodeToDel = t2) : (this.pTail.next = t2, this.pTail = t2), this.map.set(e3, 1);
- else {
- var n2 = this.pNodeToDel;
- 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);
- }
- } }, { key: "has", value: function(e3) {
- return this.map.has(e3);
- } }, { key: "delete", value: function(e3) {
- this.has(e3) && this.map.delete(e3);
- } }, { key: "tail", value: function() {
- return this.pTail;
- } }, { key: "size", value: function() {
- return this.map.size;
- } }, { key: "data", value: function() {
- return Array.from(this.map.keys());
- } }, { key: "reset", value: function() {
- for (var e3; null !== this.pNodeToDel; )
- e3 = this.pNodeToDel, this.pNodeToDel = this.pNodeToDel.next, e3.next = null, e3 = null;
- this.pTail = null, this.map.clear();
- } }]), e2;
- }(), 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() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "memberNum", get: function() {
- return this.memberCount;
- }, set: function(e3) {
- } }, { key: "maxMemberNum", get: function() {
- return this.maxMemberCount;
- }, set: function(e3) {
- } }, { key: "_initGroup", value: function(e3) {
- for (var t2 in e3)
- 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]));
- } }, { key: "updateGroup", value: function(e3) {
- var t2 = this;
- e3.appid = void 0, e3.grossTopicNextMsgSeq = void 0, e3.selfInfo && (e3.selfInfo.grossTopicReadSeq = void 0);
- var n2 = JSON.parse(JSON.stringify(e3));
- 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) {
- e4.userID === t2.selfInfo.userID && pt(t2.selfInfo, e4, ["sequence"]);
- });
- } }, { key: "updateSelfInfo", value: function(e3) {
- var n2 = { nameCard: e3.nameCard, joinTime: e3.joinTime, role: e3.role, messageRemindType: e3.messageRemindType, readedSequence: e3.readedSequence, excludedUnreadSequenceList: e3.excludedUnreadSequenceList };
- pt(this.selfInfo, t({}, n2), [], ["", null, void 0, 0, NaN]);
- } }, { key: "setSelfNameCard", value: function(e3) {
- this.selfInfo.nameCard = e3;
- } }]), e2;
- }(), _i = function(e2, n2) {
- 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) });
- }, fi = function() {
- function e2(t2, n2) {
- 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);
- }
- return a(e2, [{ key: "toAccount", get: function() {
- 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, "") : "";
- } }, { key: "subType", get: function() {
- return this.groupProfile ? this.groupProfile.type : "";
- } }, { key: "_initProfile", value: function(e3) {
- var t2 = this;
- Object.keys(e3).forEach(function(n2) {
- switch (n2) {
- case "userProfile":
- t2.userProfile = e3.userProfile;
- break;
- case "groupProfile":
- t2.groupProfile = e3.groupProfile;
- }
- }), 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", "") }));
- } }, { key: "updateUnreadCount", value: function(e3) {
- var t2 = e3.nextUnreadCount, n2 = e3.isFromGetConversations, o2 = e3.isUnreadC2CMessage;
- 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);
- } }, { key: "updateLastMessage", value: function(e3) {
- this.lastMessage = _i(e3);
- } }, { key: "updateGroupAtInfoList", value: function(e3) {
- if (!this._isNeedMergeGroupAtInfo(e3)) {
- var t2, n2 = (M(t2 = e3.groupAtType) || y(t2) || I(t2) || T()).slice(0);
- -1 !== n2.indexOf(E.CONV_AT_ME) && -1 !== n2.indexOf(E.CONV_AT_ALL) && (n2 = [E.CONV_AT_ALL_AT_ME]);
- var o2 = { from: e3.from, groupID: e3.groupID, topicID: e3.topicID, messageSequence: e3.sequence, atTypeArray: n2, __random: e3.__random, __sequence: e3.__sequence };
- this.groupAtInfoList.push(o2);
- }
- } }, { key: "_isNeedMergeGroupAtInfo", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.sequence;
- if (!Dt({ groupID: t2 }))
- return false;
- var o2 = false;
- return this.groupAtInfoList.forEach(function(t3) {
- 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);
- }), o2;
- } }, { key: "clearGroupAtInfoList", value: function() {
- this.groupAtInfoList.length = 0;
- } }, { key: "reduceUnreadCount", value: function() {
- return this.unreadCount >= 1 && (this.unreadCount -= 1, true);
- } }, { key: "isLastMessageRevoked", value: function(e3) {
- var t2 = e3.sequence, n2 = e3.time;
- return this.type === E.CONV_C2C && t2 === this.lastMessage.lastSequence && n2 === this.lastMessage.lastTime || this.type === E.CONV_GROUP && t2 === this.lastMessage.lastSequence;
- } }, { key: "setLastMessageRevoked", value: function(e3) {
- this.lastMessage.isRevoked = e3;
- } }, { key: "setLastMessageRevoker", value: function(e3) {
- this.lastMessage.revoker = e3;
- } }]), e2;
- }(), vi = function() {
- function e2(t2) {
- o(this, e2), this._conversationModule = t2, this._n = "MessageRemindHandler", this._updateSequence = 0;
- }
- return a(e2, [{ key: "getC2CMessageRemindType", value: function() {
- var e3 = this, t2 = "".concat(this._n, ".getC2CMessageRemindType");
- return this._conversationModule.request({ protocolName: Eo, updateSequence: this._updateSequence }).then(function(n2) {
- Ve.l("".concat(t2, " ok"));
- var o2 = n2.data, s2 = o2.updateSequence, a2 = o2.muteFlagList;
- e3._updateSequence = s2, e3._patchC2CMessageRemindType(a2);
- }).catch(function(e4) {
- Ve.e("".concat(t2, " failed. error:"), e4);
- });
- } }, { key: "_patchC2CMessageRemindType", value: function(e3) {
- var t2 = this, n2 = 0, o2 = "";
- at(e3) && e3.length > 0 && e3.forEach(function(e4) {
- var s2 = e4.userID, a2 = e4.muteFlag;
- 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);
- }), Ve.l("".concat(this._n, "._patchC2CMessageRemindType count:").concat(n2));
- } }, { key: "set", value: function(e3) {
- return e3.groupID ? this._setGroupMessageRemindType(e3) : at(e3.userIDList) ? this._setC2CMessageRemindType(e3) : void 0;
- } }, { key: "_setGroupMessageRemindType", value: function(e3) {
- 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");
- return i2.setMessage(a2), this._getModule(wn).modifyGroupMemberInfo({ groupID: o2, messageRemindType: s2, userID: this._conversationModule.getMyUserID() }).then(function() {
- i2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok. ").concat(a2));
- var o3 = t2.onGroupMessageRemindTypeUpdated(e3);
- return t2._conversationModule.emitTotalUnreadMessageCountUpdate(), Ya(o3);
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- i2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "onGroupMessageRemindTypeUpdated", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.messageRemindType, o2 = this._getModule(Pn).getLocalGroupProfile(t2);
- if (o2 && (o2.selfInfo.messageRemindType = n2), kt(t2)) {
- var s2 = t2, a2 = xt(s2), i2 = this._getModule(Fn).getLocalTopic(a2, s2);
- return i2 && (i2.updateSelfInfo({ messageRemindType: n2 }), this._conversationModule.emitOuterEvent(k.TOPIC_UPDATED, { groupID: a2, topic: i2 })), { topic: i2 };
- }
- return this._conversationModule.patchMessageRemindType({ ID: t2, isC2CConversation: false, messageRemindType: n2 }) && this._emitConversationUpdate(), { group: o2 };
- } }, { key: "_setC2CMessageRemindType", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, "._setC2CMessageRemindType"), o2 = e3.userIDList, s2 = e3.messageRemindType, a2 = o2.slice(0, 30), i2 = 0;
- s2 === E.MSG_REMIND_DISCARD ? i2 = 1 : s2 === E.MSG_REMIND_ACPT_NOT_NOTE && (i2 = 2);
- var r2 = "userIDList:".concat(a2, " messageRemindType:").concat(s2), u2 = new Aa("setMessageRemindType");
- return u2.setMessage(r2), this._conversationModule.request({ protocolName: ko, requestData: { userIDList: a2, muteFlag: i2 } }).then(function(e4) {
- u2.setNetworkType(t2._conversationModule.getNetworkType()).end();
- var o3 = e4.data, i3 = o3.updateSequence, r3 = o3.errorList;
- t2._updateSequence = i3;
- var c2 = [], l2 = [];
- at(r3) && r3.forEach(function(e5) {
- c2.push(e5.userID), l2.push({ userID: e5.userID, code: e5.errorCode });
- });
- var d2 = a2.filter(function(e5) {
- return -1 === c2.indexOf(e5);
- });
- Ve.l("".concat(n2, " ok. successUserIDList:").concat(d2, " failureUserIDList:").concat(JSON.stringify(l2)));
- var p2 = 0;
- return d2.forEach(function(e5) {
- t2._conversationModule.patchMessageRemindType({ ID: e5, isC2CConversation: true, messageRemindType: s2 }) && (p2 += 1);
- }), p2 >= 1 && t2._emitConversationUpdate(), a2.length = c2.length = 0, t2._conversationModule.emitTotalUnreadMessageCountUpdate(), Xa({ successUserIDList: d2.map(function(e5) {
- return { userID: e5 };
- }), failureUserIDList: l2 });
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- u2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_getModule", value: function(e3) {
- return this._conversationModule.getModule(e3);
- } }, { key: "_emitConversationUpdate", value: function() {
- this._conversationModule.emitConversationUpdate(true, false);
- } }, { key: "setUpdateSequence", value: function(e3) {
- this._updateSequence = e3;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._updateSequence = 0;
- } }]), e2;
- }(), mi = function() {
- function e2(t2) {
- o(this, e2), this._conversationModule = t2, this._n = "ConvGroupHandler", this._convGroupMap = /* @__PURE__ */ new Map(), this._startIndex = 0, this._pagingStatus = $t.NOT_START;
- }
- return a(e2, [{ key: "setConvCustomData", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".").concat("setConvCustomData"), o2 = e3.conversationIDList, s2 = e3.customData;
- Ve.l("".concat(n2, " options:"), e3);
- var a2 = new Aa("setConvCustomData");
- a2.setMessage(JSON.stringify(e3));
- var i2 = { fromAccount: this._getMyUserID(), itemList: [] }, r2 = [], u2 = [];
- return o2.forEach(function(e4) {
- if (!t2._hasLocalConversation(e4))
- return t2._onConversationNotFound(u2, e4), true;
- if (!Et(e4) && !St(e4))
- return t2._onConversationIDInvalid(u2, e4), true;
- var n3 = { operationType: 2, contactItem: void 0, customMark: s2 };
- 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);
- }), u2.length === o2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: qo, requestData: i2 }).then(function(e4) {
- a2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var o3 = e4.data.resultItem;
- if (at(o3)) {
- var i3, c2, l2 = false;
- o3.forEach(function(e5) {
- 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 });
- }), true === l2 && t2._emitConversationUpdate();
- }
- return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- a2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "markConversation", value: function(e3) {
- var t2 = this;
- if (!this._conversationModule.canIUse(B.CONV_MARK))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".").concat("markConversation"), o2 = e3.conversationIDList, s2 = e3.markType, a2 = e3.enableMark;
- Ve.l("".concat(n2, " options:"), e3);
- var i2 = new Aa("markConversation");
- i2.setMessage(JSON.stringify(e3));
- var r2 = void 0, u2 = void 0, c2 = this._getFlagBit(s2);
- true === a2 ? u2 = [c2] : r2 = [c2];
- var l2 = { fromAccount: this._getMyUserID(), itemList: [] }, d2 = [], p2 = [];
- return o2.forEach(function(e4) {
- if (!t2._hasLocalConversation(e4))
- return t2._onConversationNotFound(p2, e4), true;
- if (!Et(e4) && !St(e4))
- return t2._onConversationIDInvalid(p2, e4), true;
- var n3 = { operationType: 1, contactItem: void 0, clearMark: r2, setMark: u2 };
- 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);
- }), p2.length === o2.length ? Xa({ successConversationIDList: d2, failureConversationIDList: p2 }) : this._conversationModule.request({ protocolName: xo, requestData: l2 }).then(function(e4) {
- i2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var o3 = e4.data.resultItem;
- if (at(o3)) {
- var r3, u3, c3 = false;
- o3.forEach(function(e5) {
- if (r3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode) {
- if (d2.push(r3), u3 = t2._getLocalConversation(r3)) {
- var n3 = u3.markList.indexOf(s2);
- true === a2 ? -1 === n3 && (u3.markList.push(s2), c3 = true) : -1 !== n3 && (u3.markList.splice(n3, 1), c3 = true);
- }
- } else
- p2.push({ conversationID: r3, code: e5.resultCode, message: e5.resultInfo });
- }), true === c3 && t2._emitConversationUpdate();
- }
- return Ya({ successConversationIDList: d2, failureConversationIDList: p2 });
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- i2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getLocalConvGroupList", value: function() {
- var e3 = this;
- return Ve.l("".concat(this._n, ".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === $t.REJECTED ? this.getRemoteConvGroupList().then(function() {
- return Ya(m(e3._convGroupMap.values()));
- }) : Xa(m(this._convGroupMap.values()));
- } }, { key: "getRemoteConvGroupList", value: function() {
- var e3 = this, t2 = "".concat(this._n, ".getRemoteConvGroupList");
- return this._pagingStatus = $t.PENDING, this._conversationModule.request({ protocolName: Yo, requestData: { fromAccount: this._getMyUserID(), startIndex: this._startIndex, startTime: we() } }).then(function(n2) {
- var o2, s2, a2 = n2.data, i2 = a2.completeFlag, r2 = a2.contactItem, u2 = a2.nextStartIndex, c2 = void 0 === u2 ? 0 : u2, l2 = a2.groupItem;
- (e3._startIndex = c2, Ve.l("".concat(t2, " completeFlag:").concat(i2, " nextStartIndex:").concat(c2)), at(l2) && l2.forEach(function(t3) {
- var n3 = t3.convGroupID, o3 = t3.groupName;
- e3._convGroupMap.set(n3, o3);
- }), at(r2)) && r2.forEach(function(t3) {
- var n3 = t3.standardMark, a3 = t3.customData, i3 = t3.convGroupIDList;
- if (o2 = e3._concatConversationID(t3), (s2 = e3._getLocalConversation(o2)) && (s2.markList = Ht(n3), s2.customData = a3 || "", at(i3))) {
- var r3 = [];
- i3.forEach(function(t4) {
- e3._convGroupMap.has(t4) && r3.push(e3._convGroupMap.get(t4));
- }), s2.conversationGroupList = [].concat(r3), r3.length = 0;
- }
- });
- if (0 === i2)
- return e3.getRemoteConvGroupList();
- 1 === i2 && (e3._pagingStatus = $t.RESOLVED, e3._emitConversationUpdate(), e3._emitConvGroupListUpdate());
- }).catch(function(n2) {
- e3._pagingStatus = $t.REJECTED, Ve.w("".concat(t2, " failed. error:"), n2);
- });
- } }, { key: "createConvGroup", value: function(e3) {
- var t2 = this;
- if (!this._conversationModule.canIUse(B.CONV_GROUP))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".").concat("createConvGroup");
- Ve.l("".concat(n2, " options:"), e3);
- var o2 = new Aa("createConvGroup");
- o2.setMessage(JSON.stringify(e3));
- var s2 = e3.groupName, a2 = e3.conversationIDList, i2 = { fromAccount: this._getMyUserID(), itemList: [{ groupName: s2, contactItem: [] }] }, r2 = [], u2 = [];
- return a2.forEach(function(e4) {
- 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);
- }), u2.length === a2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Vo, requestData: i2 }).then(function(e4) {
- o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var a3 = e4.data.groupResultItem[0], i3 = a3.groupItem, c2 = a3.resultItem;
- if (st(i3) && (t2._convGroupMap.set(i3.convGroupID, i3.groupName), t2._emitConvGroupListUpdate()), at(c2)) {
- var l2, d2, p2 = false;
- c2.forEach(function(e5) {
- 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 });
- }), true === p2 && (t2._emitConversationUpdate(), t2._emitConvGroupListUpdate());
- }
- return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
- o2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "deleteConvGroup", value: function(e3) {
- var t2 = this;
- if (!this._conversationModule.canIUse(B.CONV_GROUP))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".").concat("deleteConvGroup");
- Ve.l("".concat(n2, " groupName:").concat(e3));
- var o2 = new Aa("deleteConvGroup");
- return o2.setMessage(e3), this._conversationModule.request({ protocolName: Bo, requestData: { fromAccount: this._getMyUserID(), groupName: [e3] } }).then(function(s2) {
- o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var a2 = s2.data.groupItem;
- if (at(a2)) {
- var i2 = false;
- a2.forEach(function(e4) {
- t2._convGroupMap.has(e4.convGroupID) && (t2._convGroupMap.delete(e4.convGroupID), i2 = true);
- }), true === i2 && t2._emitConvGroupListUpdate();
- }
- t2._eraseFromConversationGroupList([e3]);
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s2 = n3[0], a2 = n3[1];
- o2.setError(e4, s2, a2).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "renameConvGroup", value: function(e3) {
- var t2 = this;
- if (!this._conversationModule.canIUse(B.CONV_GROUP))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".").concat("renameConvGroup");
- Ve.l("".concat(n2, " options:"), e3);
- var o2 = new Aa("renameConvGroup");
- o2.setMessage(JSON.stringify(e3));
- var s2 = e3.oldName, a2 = e3.newName;
- return this._conversationModule.request({ protocolName: Ho, requestData: { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 1, oldName: s2, newName: a2 } } }).then(function(e4) {
- o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var i2 = e4.data.updateGroupResult.convGroupID;
- t2._convGroupMap.set(i2, a2), t2._emitConvGroupListUpdate();
- var r2, u2, c2 = t2._conversationModule.getLocalConversationList(), l2 = false;
- c2.forEach(function(e5) {
- r2 = e5.conversationGroupList, -1 !== (u2 = r2.indexOf(s2)) && (r2.splice(u2, 1, a2), l2 = true);
- }), true === l2 && t2._emitConversationUpdate();
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
- o2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "addConvsToGroup", value: function(e3) {
- var t2 = this;
- if (!this._conversationModule.canIUse(B.CONV_GROUP))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".").concat("addConvsToGroup");
- Ve.l("".concat(n2, " options:"), e3);
- var o2 = new Aa("addConvsToGroup");
- o2.setMessage(JSON.stringify(e3));
- var s2 = e3.conversationIDList, a2 = e3.groupName, i2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a2, updateItem: [] } }, r2 = [], u2 = [];
- return s2.forEach(function(e4) {
- 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);
- }), u2.length === s2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Ko, requestData: i2 }).then(function(e4) {
- o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var s3 = e4.data.updateGroupResult.contactResultItem;
- if (at(s3)) {
- var i3, c2, l2 = false;
- s3.forEach(function(e5) {
- 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 });
- }), true === l2 && (t2._emitConversationUpdate(), t2._emitConvInGroupUpdate(a2));
- }
- return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
- o2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "deleteConvsFromGroup", value: function(e3) {
- var t2 = this;
- if (!this._conversationModule.canIUse(B.CONV_GROUP))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".").concat("deleteConvsFromGroup");
- Ve.l("".concat(n2, " options:"), e3);
- var o2 = new Aa("deleteConvsFromGroup");
- o2.setMessage(JSON.stringify(e3));
- var s2 = e3.conversationIDList, a2 = e3.groupName, i2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: a2, updateItem: [] } }, r2 = [], u2 = [];
- return s2.forEach(function(e4) {
- 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);
- }), u2.length === s2.length ? Xa({ successConversationIDList: r2, failureConversationIDList: u2 }) : this._conversationModule.request({ protocolName: Wo, requestData: i2 }).then(function(e4) {
- o2.setNetworkType(t2._conversationModule.getNetworkType()).end(), Ve.l("".concat(n2, " ok"));
- var s3 = e4.data.updateGroupResult.contactResultItem;
- if (at(s3)) {
- var i3, c2, l2 = false;
- s3.forEach(function(e5) {
- if (i3 = t2._concatConversationID(e5.contactItem), 0 === e5.resultCode) {
- if (c2 = t2._getLocalConversation(i3)) {
- var n3 = c2.conversationGroupList.indexOf(a2);
- -1 !== n3 && (c2.conversationGroupList.splice(n3, 1), r2.push(i3), l2 = true);
- }
- } else
- u2.push({ conversationID: i3, code: e5.resultCode, message: e5.resultInfo });
- }), true === l2 && (t2._emitConversationUpdate(), t2._emitConvInGroupUpdate(a2));
- }
- return Ya({ successConversationIDList: r2, failureConversationIDList: u2 });
- }).catch(function(e4) {
- return t2._conversationModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
- o2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "onConvMarkUpdated", value: function(e3) {
- var t2 = this;
- if (!zt(e3)) {
- var n2, o2;
- Ve.d("".concat(this._n, ".onConvMarkUpdated markItemList:"), e3);
- var s2 = false;
- e3.forEach(function(e4) {
- var a2 = e4.recentContactItem, i2 = e4.optType, r2 = e4.standardMark, u2 = e4.customMark;
- if (n2 = t2._concatConversationID(a2), o2 = t2._getLocalConversation(n2))
- if (1 === i2) {
- var c2 = Ht(r2);
- true !== function(e5, t3) {
- if (e5 === t3)
- return true;
- if (!e5 || !t3)
- return false;
- if (e5.length !== t3.length)
- return false;
- for (var n3 = 0, o3 = e5.length; n3 < o3; n3++)
- if (e5[n3] !== t3[n3])
- return false;
- return true;
- }(o2.markList, c2) && (o2.markList = c2, s2 = true);
- } else
- 2 === i2 && o2.customData !== u2 && void 0 !== u2 && (o2.customData = u2, s2 = true);
- }), true === s2 && this._emitConversationUpdate();
- }
- } }, { key: "onConvGroupCreated", value: function(e3) {
- var t2 = this;
- Ve.d("".concat(this._n, ".onConvGroupCreated resultList:"), e3);
- var n2 = false, o2 = false;
- at(e3) && (e3.forEach(function(e4) {
- var s2 = e4.msgGroupItem, a2 = s2.groupID, i2 = s2.groupName;
- t2._convGroupMap.get(a2) !== i2 && (t2._convGroupMap.set(a2, i2), o2 = true);
- var r2, u2, c2 = e4.msgRecentContactItem;
- at(c2) && c2.forEach(function(e5) {
- r2 = t2._concatConversationID(e5), (u2 = t2._getLocalConversation(r2)) && -1 === u2.conversationGroupList.indexOf(i2) && (u2.conversationGroupList.push(i2), n2 = true);
- });
- }), true === n2 && this._emitConversationUpdate(), true === o2 && this._emitConvGroupListUpdate());
- } }, { key: "onConvGroupDeleted", value: function(e3) {
- var t2 = this;
- Ve.d("".concat(this._n, ".onConvGroupDeleted groupItemList:"), e3);
- var n2 = [];
- if (at(e3)) {
- var o2 = false;
- e3.forEach(function(e4) {
- var s2 = e4.groupID, a2 = e4.groupName;
- t2._convGroupMap.has(s2) && (t2._convGroupMap.delete(s2), o2 = true, n2.push(a2));
- }), true === o2 && this._emitConvGroupListUpdate();
- }
- this._eraseFromConversationGroupList(n2);
- } }, { key: "_eraseFromConversationGroupList", value: function(e3) {
- zt(e3) || (this._conversationModule.getLocalConversationList().forEach(function(t2) {
- t2.conversationGroupList = t2.conversationGroupList.filter(function(t3) {
- return !e3.includes(t3);
- });
- }), this._emitConversationUpdate());
- } }, { key: "onConvGroupNameUpdated", value: function(e3) {
- Ve.d("".concat(this._n, ".onConvGroupNameUpdated options:"), e3);
- var t2 = e3.groupID, n2 = e3.groupName, o2 = e3.oldGroupName;
- if (this._convGroupMap.get(t2) !== n2) {
- this._convGroupMap.set(t2, n2), this._emitConvGroupListUpdate();
- var s2, a2, i2 = this._conversationModule.getLocalConversationList(), r2 = false;
- i2.forEach(function(e4) {
- s2 = e4.conversationGroupList, -1 !== (a2 = s2.indexOf(o2)) && (s2.splice(a2, 1, n2), r2 = true);
- }), true === r2 && this._emitConversationUpdate();
- }
- } }, { key: "onConvInGroupUpdated", value: function(e3) {
- var t2 = this;
- Ve.d("".concat(this._n, ".onConvInGroupUpdated options:"), e3);
- var n2 = e3.oldGroupName, o2 = e3.recentContactUpdateGroupItem;
- if (at(o2)) {
- var s2, a2, i2, r2 = false;
- o2.forEach(function(e4) {
- var o3 = e4.contactOptType, u2 = e4.recentContactItem;
- 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));
- }), true === r2 && (this._emitConversationUpdate(), this._emitConvInGroupUpdate(n2));
- }
- } }, { key: "onConvAddedToOrDeletedFromGroup", value: function(e3) {
- var t2 = this;
- Ve.d("".concat(this._n, ".onConvAddedToOrDeletedFromGroup options:"), e3);
- var n2 = e3.msgRecentContactItem, o2 = e3.msgRecentContactUpdateContactItem, s2 = this._concatConversationID(n2), a2 = this._getLocalConversation(s2);
- if (a2 && at(o2)) {
- var i2, r2 = false;
- o2.forEach(function(e4) {
- var n3 = e4.groupOptType, o3 = e4.recentContactGroupItem.groupName;
- 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);
- }), true === r2 && this._emitConversationUpdate();
- }
- } }, { key: "onConvGroupListSynced", value: function(e3) {
- var t2 = this;
- at(e3) && 0 !== e3.length && (Ve.l("".concat(this._n, ".onConvGroupListSynced groupItemList:"), e3), e3.forEach(function(e4) {
- t2._convGroupMap.set(e4.convGroupID, e4.groupName);
- }));
- } }, { key: "getConvGroupListByID", value: function(e3) {
- var t2 = this;
- if (!zt(e3)) {
- var n2 = [];
- return e3.forEach(function(e4) {
- t2._convGroupMap.has(e4) && n2.push(t2._convGroupMap.get(e4));
- }), n2;
- }
- } }, { key: "_onConversationNotFound", value: function(e3, t2) {
- e3.push({ conversationID: t2, code: ha.CONVERSATION_NOT_FOUND, message: this._conversationModule.getErrorMessage(ha.CONVERSATION_NOT_FOUND) });
- } }, { key: "_onConversationIDInvalid", value: function(e3, t2) {
- e3.push({ conversationID: t2, code: ha.INVALID_CONVERSATION_ID, message: this._conversationModule.getErrorMessage(ha.INVALID_CONVERSATION_ID) });
- } }, { key: "_getFlagBit", value: function(e3) {
- for (var t2 = e3.toString(2), n2 = t2.length, o2 = n2 - 1; o2 >= 0; o2--)
- if ("1" === t2[o2])
- return n2 - o2 - 1;
- } }, { key: "_concatConversationID", value: function(e3) {
- var t2, n2 = e3.type, o2 = e3.to, s2 = e3.groupID, a2 = e3.userID;
- 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;
- } }, { key: "_getMyUserID", value: function() {
- return this._conversationModule.getMyUserID();
- } }, { key: "_insertConversationGroup", value: function(e3, t2) {
- var n2 = this._getLocalConversation(e3);
- if (n2) {
- var o2 = n2.conversationGroupList;
- -1 === o2.indexOf(t2) && o2.push(t2);
- }
- } }, { key: "_getLocalConversation", value: function(e3) {
- return this._conversationModule.getLocalConversation(e3);
- } }, { key: "_hasLocalConversation", value: function(e3) {
- return this._conversationModule.hasLocalConversation(e3);
- } }, { key: "_emitConversationUpdate", value: function() {
- this._conversationModule.emitConversationUpdate(true, false);
- } }, { key: "_emitConvGroupListUpdate", value: function() {
- this._conversationModule.emitOuterEvent(k.CONVERSATION_GROUP_LIST_UPDATED, m(this._convGroupMap.values()));
- } }, { key: "_emitConvInGroupUpdate", value: function(e3) {
- var t2 = { groupName: e3, conversationList: [] }, n2 = this._conversationModule.getLocalConversationList();
- t2.conversationList = n2.filter(function(t3) {
- return t3.conversationGroupList.includes(e3);
- }), this._conversationModule.emitOuterEvent(k.CONVERSATION_IN_GROUP_UPDATED, t2);
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._convGroupMap.clear(), this._startIndex = 0, this._pagingStatus = $t.NOT_START;
- } }]), e2;
- }(), Mi = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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;
- }
- return a(s2, [{ key: "_initListeners", value: function() {
- var e3 = this.getInnerEmitterInstance();
- e3.on(ei, this._initLocalConversationList, this), e3.on(ni, this._onProfileUpdated, this);
- } }, { key: "onCheckTimer", value: function(e3) {
- e3 % 60 == 0 && this._messageListHandler.traversal();
- } }, { key: "_initLocalConversationList", value: function() {
- var e3 = this, t2 = new Aa("_initLocalConversationList");
- Ve.l("".concat(this._n, ".").concat("_initLocalConversationList"));
- var n3 = "", o2 = this._getStorageConversationList(), s3 = this.isIntl();
- if (o2) {
- for (var a2 = o2.length, i2 = 0; i2 < a2; i2++) {
- var r2 = o2[i2];
- if (r2) {
- if (r2.conversationID === "".concat(E.CONV_C2C, "@TLS#ERROR") || r2.conversationID === "".concat(E.CONV_C2C, "@TLS#NOT_FOUND"))
- continue;
- if (r2.groupProfile) {
- var u2 = r2.groupProfile.type;
- if (Tt(u2))
- continue;
- }
- }
- this._conversationMap.set(o2[i2].conversationID, new fi(o2[i2], s3));
- }
- this.emitConversationUpdate(true, false), n3 = "count:".concat(a2);
- } else
- n3 = "count:0";
- t2.setNetworkType(this.getNetworkType()).setMessage(n3).end(), this.getModule(Un) || this.triggerReady(), this.ready(function() {
- e3._tmpGroupList.length > 0 && (e3.updateConversationGroupProfile(e3._tmpGroupList), e3._tmpGroupList.length = 0);
- }), this.syncConversationList();
- } }, { key: "onMessageSent", value: function(e3) {
- this._onSendOrReceiveMessage({ conversationOptionsList: e3.conversationOptionsList, isInstantMessage: true });
- } }, { key: "onNewMessage", value: function(e3) {
- this._onSendOrReceiveMessage(e3);
- } }, { key: "_onSendOrReceiveMessage", value: function(e3) {
- 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;
- 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) {
- return [e4.conversationID, 1];
- })))), this._diffAndDeleteConversation()), this._setStorageConversationList(), n3.filter(function(e4) {
- return e4.type === E.CONV_TOPIC;
- }).length > 0 || this.emitConversationUpdate()) : this.ready(function() {
- t2._onSendOrReceiveMessage(e3);
- });
- } }, { key: "updateConversationGroupProfile", value: function(e3) {
- var t2 = this;
- if (!at(e3) || 0 !== e3.length)
- if (0 !== this._conversationMap.size) {
- var n3 = false;
- e3.forEach(function(e4) {
- var o2 = "GROUP".concat(e4.groupID);
- if (t2._conversationMap.has(o2)) {
- n3 = true;
- var s3 = t2._conversationMap.get(o2);
- s3.groupProfile = JSON.parse(JSON.stringify(e4)), s3.lastMessage.lastSequence < e4.nextMessageSeq && (s3.lastMessage.lastSequence = e4.nextMessageSeq - 1), s3.subType || (s3.subType = e4.type);
- }
- }), n3 && this.emitConversationUpdate(true, false);
- } else
- this._tmpGroupList = e3;
- } }, { key: "_updateConversationUserProfile", value: function(e3) {
- var t2 = this;
- e3.data.forEach(function(e4) {
- var n3 = "C2C".concat(e4.userID);
- t2._conversationMap.has(n3) && (t2._conversationMap.get(n3).userProfile = e4);
- }), this.emitConversationUpdate(true, false);
- } }, { key: "onMessageRevoked", value: function(e3) {
- var t2 = this;
- if (0 !== e3.length) {
- var n3 = null, o2 = false, s3 = [];
- e3.forEach(function(e4) {
- (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)));
- }), this.getModule(Fn).onMessageRevoked(s3), o2 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate());
- }
- } }, { key: "isLastMessageRevoked", value: function(e3) {
- var t2 = false, n3 = e3.conversationID, o2 = e3.sequence, s3 = e3.time, a2 = this._conversationMap.get(n3);
- 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 }));
- return Ve.l("".concat(this._n, ".isLastMessageRevoked options:").concat(JSON.stringify(e3), " ret:").concat(t2)), t2;
- } }, { key: "onMessageDeleted", value: function(e3) {
- var t2 = this;
- if (0 !== e3.length) {
- var n3 = null;
- e3.forEach(function(e4) {
- (n3 = t2._messageListHandler.getLocalMessage(e4.conversationID, e4.ID)) && (n3.isDeleted = true), e4 !== n3 && (e4.isDeleted = true);
- });
- for (var o2 = e3[0].conversationID, s3 = this._messageListHandler.getLocalMessageList(o2), a2 = {}, i2 = s3.length - 1; i2 >= 0; i2--)
- if (!s3[i2].isDeleted) {
- a2 = s3[i2];
- break;
- }
- var r2 = this._conversationMap.get(o2);
- if (r2) {
- var u2 = false;
- 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);
- }
- }
- } }, { key: "onMessageModified", value: function(e3) {
- 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);
- o2 === c2 && t2 === E.CONV_C2C && (l2 = "".concat(t2).concat(n3));
- var d2 = this._messageListHandler.onMessageModified(l2, e3), p2 = d2.isUpdated, g2 = d2.message;
- true === p2 && this.emitOuterEvent(k.MESSAGE_MODIFIED, [g2]);
- var h2 = this._isTopicConversation(l2);
- if (Ve.l("".concat(this._n, ".onMessageModified isUpdated:").concat(p2, " isTopicMessage:").concat(h2, " from:").concat(n3, " to:").concat(o2)), h2) {
- this.getModule(Fn).onMessageModified(e3);
- } else {
- var _2 = this._conversationMap.get(l2);
- if (_2) {
- var f2 = _2.lastMessage;
- 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));
- }
- }
- return g2;
- } }, { key: "onNewGroupAtTips", value: function(e3) {
- var n3 = this, o2 = e3.dataList, s3 = null;
- o2.forEach(function(e4) {
- 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);
- }), Ve.d("".concat(this._n, ".onNewGroupAtTips isReady:").concat(this._isReady), this._tmpGroupAtTipsList), this._isReady && this._handleGroupAtTipsList();
- } }, { key: "_handleGroupAtTipsList", value: function() {
- var e3 = this;
- if (0 !== this._tmpGroupAtTipsList.length) {
- var t2 = false;
- this._tmpGroupAtTipsList.forEach(function(n3) {
- 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;
- if (s3 !== e3.getMyUserID())
- if (it(i2)) {
- var c2 = e3._conversationMap.get("".concat(E.CONV_GROUP).concat(o2));
- c2 && (c2.updateGroupAtInfoList(n3), t2 = true);
- } else {
- var l2 = e3._conversationMap.get("".concat(E.CONV_GROUP).concat(i2));
- if (l2) {
- l2.updateGroupAtInfoList(n3);
- var d2 = e3.getModule(Fn), p2 = l2.groupAtInfoList;
- d2.onConversationProxy({ topicID: i2, groupAtInfoList: p2 });
- }
- if (zt(l2) && u2)
- e3.updateTopicConversation([{ conversationID: "".concat(E.CONV_GROUP).concat(i2), type: E.CONV_TOPIC }]), e3._conversationMap.get("".concat(E.CONV_GROUP).concat(i2)).updateGroupAtInfoList(n3);
- }
- }), t2 && this.emitConversationUpdate(true, false), this._tmpGroupAtTipsList.length = 0;
- }
- } }, { key: "_getC2CPeerReadTime", value: function(e3) {
- var t2 = this, n3 = [];
- if (e3.forEach(function(e4) {
- t2._conversationMap.has(e4.conversationID) || e4.type !== E.CONV_C2C || n3.push(e4.conversationID.replace(E.CONV_C2C, ""));
- }), n3.length > 0) {
- Ve.d("".concat(this._n, "._getC2CPeerReadTime userIDList:").concat(n3));
- var o2 = this.getModule(Un);
- o2 && o2.getRemotePeerReadTime(n3);
- }
- } }, { key: "_getStorageConversationList", value: function() {
- return this.getModule(Vn).getItem("conversationMap");
- } }, { key: "_setStorageConversationList", value: function() {
- var e3 = this.getLocalConversationList().filter(function(e4) {
- return e4.type === E.CONV_C2C || e4.type === E.CONV_GROUP && e4.lastMessage.type !== E.MSG_GRP_TIP;
- }).slice(0, 20).map(function(e4) {
- return { conversationID: e4.conversationID, type: e4.type, subType: e4.subType, lastMessage: e4.lastMessage, groupProfile: e4.groupProfile, userProfile: e4.userProfile };
- });
- this.getModule(Vn).setItem("conversationMap", e3);
- } }, { key: "emitConversationUpdate", value: function() {
- var e3 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConversationList();
- if (t2) {
- var o2 = this.getModule(Pn);
- o2 && o2.updateGroupLastMessage(n3);
- }
- e3 && this.emitOuterEvent(k.CONVERSATION_LIST_UPDATED);
- } }, { key: "getLocalConversationList", value: function() {
- return m(this._conversationMap.values()).filter(function(e3) {
- return e3.type !== E.CONV_TOPIC;
- });
- } }, { key: "getLocalConversation", value: function(e3) {
- return this._conversationMap.get(e3);
- } }, { key: "hasLocalConversation", value: function(e3) {
- return this._conversationMap.has(e3);
- } }, { key: "getLocalOldestMessage", value: function(e3) {
- return this._messageListHandler.getLocalOldestMessage(e3);
- } }, { key: "syncConversationList", value: function() {
- var e3 = this, t2 = new Aa("syncConversationList");
- return this._pagingStatus === $t.NOT_START && this._conversationMap.clear(), this._pagingGetConversationList().then(function(n3) {
- var o2 = function(e4) {
- if (at(e4) && 0 !== e4.length) {
- var t3 = 0;
- return e4.forEach(function(e5) {
- t3 += e5;
- }), (t3 / e4.length).toFixed(0);
- }
- }(e3._pagingGetCostList);
- return Ve.l("".concat(e3._n, ".").concat("syncConversationList", ". sum ").concat(function(e4) {
- if (at(e4) && 0 !== e4.length) {
- var t3 = 0;
- return e4.forEach(function(e5) {
- t3 += e5;
- }), t3.toFixed(0);
- }
- }(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;
- }).catch(function(n3) {
- return e3._pagingStatus = $t.REJECTED, t2.setMessage(e3._pagingTimeStamp), e3.probeNetwork().then(function(e4) {
- var o2 = v(e4, 2), s3 = o2[0], a2 = o2[1];
- t2.setError(n3, s3, a2).end();
- }), Za(n3);
- });
- } }, { key: "_diffAndDeleteConversation", value: function() {
- var e3 = this;
- if (this._isSyncCompleted()) {
- var t2 = [];
- this._conversationMap.forEach(function(n3, o2) {
- !e3._pagingConvIDMap.has(o2) && e3._convIDFromUnreadDBMap.has(o2) && (e3._conversationMap.delete(o2), t2.push(o2));
- }), Ve.l("".concat(this._n, "._diffAndDeleteConversation list:").concat(t2));
- }
- } }, { key: "_patchConversationProperties", value: function() {
- var e3 = this, t2 = Date.now(), n3 = this.checkAndPatchRemark(), o2 = this._messageRemindHandler.getC2CMessageRemindType(), s3 = this.getModule(Pn).getGroupList();
- Promise.all([n3, o2, s3]).then(function() {
- var n4 = Date.now() - t2;
- Ve.l("".concat(e3._n, "._patchConversationProperties ok. cost ").concat(n4, " ms")), e3.emitConversationUpdate(true, false), e3.emitTotalUnreadMessageCountUpdate();
- });
- } }, { key: "_pagingGetConversationList", value: function() {
- var e3 = this, t2 = "".concat(this._n, "._pagingGetConversationList");
- Ve.l("".concat(t2, " timeStamp:").concat(this._pagingTimeStamp, " startIndex:").concat(this._pagingStartIndex) + " pinnedTimeStamp:".concat(this._pagingPinnedTimeStamp, " pinnedStartIndex:").concat(this._pagingPinnedStartIndex));
- var n3 = Date.now();
- 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) {
- 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;
- 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) {
- var h2 = e3._getConversationOptions(r2);
- e3._pagingConvIDMap = new Map([].concat(m(e3._pagingConvIDMap), m(h2.map(function(e4) {
- return [e4.conversationID, 1];
- })))), e3._updateLocalConversationList({ conversationOptionsList: h2, isFromGetConversations: true }), e3.isLoggedIn() && e3.emitConversationUpdate();
- }
- if (!e3._isReady) {
- if (!e3.isLoggedIn())
- return Xa();
- e3.triggerReady();
- }
- return e3._pagingTimeStamp = u2, e3._pagingStartIndex = c2, e3._pagingPinnedTimeStamp = l2, e3._pagingPinnedStartIndex = d2, 1 !== a2 ? e3._pagingGetConversationList() : (e3._handleGroupAtTipsList(), e3._convGroupHandler.getRemoteConvGroupList(), Xa());
- }).catch(function(n4) {
- throw e3.isLoggedIn() && (e3._isReady || (Ve.w("".concat(t2, " failed. error:"), n4), e3.triggerReady())), n4;
- });
- } }, { key: "_updateLocalConversationList", value: function(e3) {
- var t2, n3 = e3.isFromGetConversations, o2 = e3.isInstantMessage, s3 = Date.now();
- 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"));
- } }, { key: "_getTmpConversationListMapping", value: function(e3) {
- 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++) {
- var h2 = new fi(t2[p2], d2), _2 = h2.conversationID;
- if (_2 !== "".concat(E.CONV_C2C, "@TLS#ERROR") && _2 !== "".concat(E.CONV_C2C, "@TLS#NOT_FOUND"))
- if (this._conversationMap.has(_2)) {
- var f2 = this._conversationMap.get(_2), v2 = ["unreadCount", "allowType", "adminForbidType", "payload", "isPinned"];
- false === o2 && v2.push("lastMessage");
- var m2 = t2[p2].lastMessage, M2 = !it(m2);
- 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]);
- } else {
- if (h2.type === E.CONV_GROUP && c2) {
- var y2 = h2.groupProfile.groupID, I2 = c2.getLocalGroupProfile(y2);
- I2 && (h2.groupProfile = I2, true === i2 && h2.updateUnreadCount({ nextUnreadCount: 0 }));
- } else if (h2.type === E.CONV_C2C) {
- var C2 = _2.replace(E.CONV_C2C, "");
- l2 && l2.isMyFriend(C2) && (h2.remark = l2.getFriendRemark(C2));
- }
- u2.push(h2), r2.push([_2, h2]);
- }
- }
- var T2 = this.getModule(Fn);
- return r2.forEach(function(e4) {
- if (e4[1].type === E.CONV_TOPIC) {
- var t3 = e4[1], n4 = t3.conversationID, o3 = t3.unreadCount, s4 = t3.groupAtInfoList;
- T2.onConversationProxy({ topicID: n4.replace(E.CONV_GROUP, ""), unreadCount: o3, groupAtInfoList: zt(s4) ? void 0 : s4 });
- }
- }), { toBeUpdatedConversationList: r2, newConversationList: u2 };
- } }, { key: "_onLastMessageNotExist", value: function(e3) {
- new Aa("lastMessageNotExist").setMessage("".concat(JSON.stringify(e3))).setNetworkType(this.getNetworkType()).end();
- } }, { key: "_sortConversationList", value: function(e3) {
- var t2 = [], n3 = [], o2 = [], s3 = [];
- return e3.forEach(function(e4) {
- 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);
- }), t2.sort(function(e4, t3) {
- return t3[1].lastMessage.lastTime - e4[1].lastMessage.lastTime;
- }).concat(n3).concat(o2.sort(function(e4, t3) {
- return t3[1].lastMessage.lastTime - e4[1].lastMessage.lastTime;
- })).concat(s3);
- } }, { key: "_sortConversationListAndEmitEvent", value: function() {
- this._conversationMap = new Map(this._sortConversationList(m(this._conversationMap))), this.emitConversationUpdate(true, false);
- } }, { key: "_updateUserOrGroupProfile", value: function(e3) {
- var t2 = this;
- if (0 !== e3.length) {
- var n3 = [], o2 = [], s3 = this.getModule(Gn), a2 = this.getModule(Pn);
- e3.forEach(function(e4) {
- if (e4.type === E.CONV_C2C)
- n3.push(e4.toAccount);
- else if (e4.type === E.CONV_GROUP) {
- var t3 = e4.toAccount;
- a2.hasLocalGroup(t3) ? e4.groupProfile = a2.getLocalGroupProfile(t3) : o2.push(t3);
- }
- }), Ve.l("".concat(this._n, "._updateUserOrGroupProfile c2cUserIDList:").concat(n3, " groupIDList:").concat(o2)), n3.length > 0 && s3.getUserProfile({ userIDList: n3 }).then(function(e4) {
- var n4 = e4.data;
- at(n4) ? n4.forEach(function(e5) {
- t2._doUpdateUserProfile("C2C".concat(e5.userID), e5);
- }) : t2._doUpdateUserProfile("C2C".concat(n4.userID), n4);
- }), o2.length > 0 && a2.getGroupProfileAdvance({ groupIDList: o2, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "FaceUrl"] } }).then(function(e4) {
- e4.data.successGroupList.forEach(function(e5) {
- var n4 = "GROUP".concat(e5.groupID);
- if (t2._conversationMap.has(n4)) {
- var o3 = t2._conversationMap.get(n4);
- pt(o3.groupProfile, e5, [], [null, void 0, "", 0, NaN]), !o3.subType && e5.type && (o3.subType = e5.type);
- }
- });
- });
- }
- } }, { key: "_doUpdateUserProfile", value: function(e3, t2) {
- this.hasLocalConversation(e3) && (this.getLocalConversation(e3).userProfile = t2);
- } }, { key: "_getConversationOptions", value: function(e3) {
- var n3 = this, o2 = [], s3 = e3.filter(function(e4) {
- var t2 = e4.type, n4 = e4.userID;
- return 1 === t2 && "@TLS#NOT_FOUND" !== n4 && "@TLS#ERROR" !== n4 || 2 === t2;
- }), a2 = this.getMyUserID(), i2 = s3.map(function(e4) {
- if (it(e4.lastMsg) && (e4.lastMsg = { elements: [] }), 1 === e4.type) {
- var s4 = { userID: e4.userID, nick: e4.peerNick, avatar: e4.peerAvatar };
- 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) };
- }
- 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) };
- });
- o2.length > 0 && this.getModule(Gn).onConversationsProfileUpdated(o2);
- return i2;
- } }, { key: "_patchTypeAndPayload", value: function(e3) {
- 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;
- if (!it(s3) && !zt(u2)) {
- var c2 = new Wa(u2);
- c2.setElement({ type: E.MSG_GRP_TIP, content: t(t({}, u2.elements), {}, { groupProfile: u2.groupProfile }) });
- var l2 = JSON.parse(JSON.stringify(c2.payload));
- return c2 = null, { type: E.MSG_GRP_TIP, payload: l2 };
- }
- return { type: i2[0] ? i2[0].type : null, payload: i2[0] ? this._amendLayersOverLimitProperty(i2[0].content) : null };
- } }, { key: "_amendLayersOverLimitProperty", value: function(e3) {
- var t2 = e3.layersOverLimit;
- return 0 === t2 ? e3.layersOverLimit = false : 1 === t2 && (e3.layersOverLimit = true), e3;
- } }, { key: "getLocalMessageList", value: function(e3) {
- return this._messageListHandler.getLocalMessageList(e3);
- } }, { key: "deleteLocalMessage", value: function(e3) {
- e3 instanceof Wa && this._messageListHandler.remove(e3);
- } }, { key: "onConversationDeleted", value: function(e3) {
- if (at(e3)) {
- var t2 = e3.map(function(e4) {
- var t3 = e4.type, n3 = e4.userID, o2 = e4.groupID;
- return 1 === t3 ? "".concat(E.CONV_C2C).concat(n3) : 2 === t3 ? "".concat(E.CONV_GROUP).concat(o2) : void 0;
- });
- Ve.l("".concat(this._n, ".onConversationDeleted conversationIDList:").concat(t2)), this.deleteLocalConversationList(t2);
- }
- } }, { key: "onConversationPinned", value: function(e3) {
- var t2 = this;
- if (at(e3)) {
- var n3 = false;
- e3.forEach(function(e4) {
- var o2, s3 = e4.type, a2 = e4.userID, i2 = e4.groupID;
- 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));
- }), n3 && this._sortConversationListAndEmitEvent();
- }
- } }, { key: "onConversationUnpinned", value: function(e3) {
- var t2 = this;
- if (at(e3)) {
- var n3 = false;
- e3.forEach(function(e4) {
- var o2, s3 = e4.type, a2 = e4.userID, i2 = e4.groupID;
- 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));
- }), n3 && this._sortConversationListAndEmitEvent();
- }
- } }, { key: "getMessageList", value: function(e3) {
- var t2 = this, n3 = e3.conversationID, o2 = e3.nextReqMessageID, s3 = e3.count, a2 = "".concat(this._n, ".getMessageList"), i2 = this.getLocalConversation(n3), r2 = "";
- if (i2 && i2.groupProfile && (r2 = i2.groupProfile.type), Tt(r2))
- return Ve.l("".concat(a2, " not available in avchatroom. conversationID:").concat(n3)), Xa({ messageList: [], nextReqMessageID: "", isCompleted: true });
- (it(s3) || s3 > 15) && (s3 = 15), !o2 && this._isNotInCommunity(n3) && (this._messageListHandler.removeByConversationID(n3), this._completedMap.delete(n3), this._roamingMessageSequenceMap.delete(n3));
- var u2 = this._computeRemainingCount({ conversationID: n3, nextReqMessageID: o2 }), c2 = this._completedMap.has(n3);
- 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 }))
- return this.getHistoryMessages({ conversationID: n3, nextReqMessageID: o2, count: 20 }).then(function(e4) {
- var o3 = e4.nextReqID, s4 = e4.storedMessageList, i3 = t2._completedMap.has(n3), r3 = s4;
- u2 > 0 && (r3 = t2._messageListHandler.getLocalMessageList(n3).slice(0, s4.length + u2));
- var c3 = { nextReqMessageID: i3 ? "" : o3, messageList: r3, isCompleted: i3 };
- return Ve.l("".concat(a2, " ret.nextReqMessageID:").concat(c3.nextReqMessageID, " ret.isCompleted:").concat(c3.isCompleted, " ret.length:").concat(r3.length)), Ya(c3);
- });
- this.modifyMessageList(n3);
- var l2 = this._getMessageListFromMemory({ conversationID: n3, nextReqMessageID: o2, count: s3 });
- return Xa(l2);
- } }, { key: "_getMessageListFromMemory", value: function(e3) {
- 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: [] };
- return n3 ? (r2 = a2.findIndex(function(e4) {
- return e4.ID === n3;
- })) > 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;
- } }, { key: "getMessageListHopping", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.sequence, o2 = e3.time, s3 = e3.count, a2 = e3.direction, i2 = void 0 === a2 ? 0 : a2;
- if ((it(s3) || s3 > 15) && (s3 = 15), t2.startsWith(E.CONV_C2C)) {
- var r2 = this.getModule(Un), u2 = t2.replace(E.CONV_C2C, "");
- return r2.getRoamingMessagesHopping({ peerAccount: u2, time: o2, count: s3, direction: i2 });
- }
- if (t2.startsWith(E.CONV_GROUP)) {
- var c2 = this.getModule(Pn), l2 = t2.replace(E.CONV_GROUP, "");
- return c2.getRoamingMessagesHopping({ groupID: l2, sequence: n3, count: s3, direction: i2 });
- }
- } }, { key: "_computeRemainingCount", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.nextReqMessageID, o2 = this._messageListHandler.getLocalMessageList(t2), s3 = o2.length;
- if (!n3)
- return s3;
- var a2 = 0;
- return Et(t2) ? a2 = o2.findIndex(function(e4) {
- return e4.ID === n3;
- }) : St(t2) && (a2 = -1 !== n3.indexOf("-") ? o2.findIndex(function(e4) {
- return e4.ID === n3;
- }) : o2.findIndex(function(e4) {
- return e4.sequence === n3;
- })), -1 === a2 && (a2 = 0), a2;
- } }, { key: "_getMessageListSize", value: function(e3) {
- return this._messageListHandler.getLocalMessageList(e3).length;
- } }, { key: "_needGetHistory", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.remainingCount, o2 = e3.count, s3 = this.getLocalConversation(t2), a2 = "";
- 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)));
- } }, { key: "_isTopicConversation", value: function(e3) {
- var t2 = e3.replace(E.CONV_GROUP, "");
- return kt(t2);
- } }, { key: "getHistoryMessages", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.count;
- if (t2 === E.CONV_SYSTEM)
- return Xa();
- var o2 = 15;
- n3 > 20 && (o2 = 20);
- var s3 = null;
- if (Et(t2)) {
- var a2 = this._roamingMessageKeyAndTimeMap.has(t2);
- 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 });
- }
- if (St(t2)) {
- if (!(s3 = this.getModule(Pn)))
- return Za({ code: ha.CANNOT_FIND_MODULE });
- var i2 = null;
- this._conversationMap.has(t2) && (i2 = this._conversationMap.get(t2).lastMessage);
- var r2 = 0;
- i2 && (r2 = i2.lastSequence);
- var u2 = this._roamingMessageSequenceMap.get(t2);
- return s3.getRoamingMessage({ conversationID: t2, groupID: t2.replace(E.CONV_GROUP, ""), count: o2, sequence: u2 || r2 });
- }
- return Xa();
- } }, { key: "patchConversationLastMessage", value: function(e3) {
- var t2 = this.getLocalConversation(e3);
- if (t2) {
- var n3 = t2.lastMessage, o2 = n3.messageForShow, s3 = n3.payload;
- if (zt(o2) || zt(s3)) {
- var a2 = this._messageListHandler.getLocalMessageList(e3);
- if (0 === a2.length)
- return;
- var i2 = a2[a2.length - 1];
- Ve.l("".concat(this._n, ".patchConversationLastMessage conversationID:").concat(e3, " payload:"), i2.payload), t2.updateLastMessage(i2);
- }
- }
- } }, { key: "onRoamingMessage", value: function() {
- 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() {
- u2 = d2 ? e3.length - 1 : 0, c2 = d2 ? 0 : e3.length;
- }, _2 = function() {
- d2 ? --u2 : ++u2;
- }, f2 = function() {
- return d2 ? u2 >= c2 : u2 < c2;
- };
- for (h2(); f2(); _2())
- if (d2 && 1 === e3[u2].sequence && o2 && this.setCompleted(n3), 1 !== e3[u2].isPlaceMessage)
- 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)) {
- var v2 = new Aa("emptyMessageBody");
- 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();
- } else
- a2.setElement(l2, g2), a2.reInitialize(this.getMyUserID()), i2.push(a2);
- return h2 = _2 = f2 = null, o2 ? (this._messageListHandler.unshift(i2, r2), i2 = null, r2) : (r2 = null, i2);
- } }, { key: "findMessage", value: function(e3) {
- return this._messageListHandler.findMessage(e3);
- } }, { key: "_isNotInCommunity", value: function(e3) {
- var t2 = false;
- if (e3.startsWith(E.CONV_GROUP) && this._isTopicConversation(e3)) {
- var n3 = xt(e3.replace(E.CONV_GROUP, ""));
- this.getModule(Pn).hasLocalGroup(n3) || (t2 = true);
- }
- return t2;
- } }, { key: "deleteTopicRoamingMessageInfo", value: function(e3) {
- var t2 = this;
- Dt({ groupID: e3 }) && this._messageListHandler.getTopicConversationIDList(e3).forEach(function(e4) {
- t2._messageListHandler.removeByConversationID(e4), t2._completedMap.delete(e4), t2._roamingMessageSequenceMap.delete(e4);
- });
- } }, { key: "deleteGroupRomaingMessageInfo", value: function(e3) {
- var t2 = "".concat(E.CONV_GROUP).concat(e3);
- this._messageListHandler.removeByConversationID(t2), this._completedMap.delete(t2), this._roamingMessageSequenceMap.delete(t2);
- } }, { key: "setMessageRead", value: function(e3) {
- var t2 = e3.conversationID, n3 = this.getLocalConversation(t2);
- if (Ve.l("".concat(this._n, ".setMessageRead conversationID:").concat(t2, " unreadCount:").concat(n3 ? n3.unreadCount : 0)), !n3)
- return Xa();
- if (n3.type !== E.CONV_GROUP && n3.type !== E.CONV_TOPIC || zt(n3.groupAtInfoList) || this.deleteGroupAtTips(t2), 0 === n3.unreadCount)
- return Xa();
- if (n3.type === E.CONV_GROUP && !this._hasLocalGroup(t2))
- return 0 !== n3.unreadCount && (n3.unreadCount = 0, this.emitConversationUpdate(true, false)), Xa();
- var o2 = this._messageListHandler.getLocalLastMessage(t2), s3 = n3.lastMessage.lastTime;
- o2 && s3 < o2.time && (s3 = o2.time);
- var a2 = n3.lastMessage.lastSequence;
- if (o2 && a2 < o2.sequence && (a2 = o2.sequence), n3.type === E.CONV_TOPIC && it(o2)) {
- var i2 = this.getModule(Fn), r2 = t2.replace(E.CONV_GROUP, ""), u2 = xt(r2), c2 = i2.getLocalTopic(u2, r2);
- c2 && (a2 = c2.nextMessageSeq - 1);
- }
- var l2 = null;
- switch (n3.type) {
- case E.CONV_C2C:
- return (l2 = this.getModule(Un)) ? l2.setMessageRead({ conversationID: t2, lastMessageTime: s3 }) : Za({ code: ha.CANNOT_FIND_MODULE });
- case E.CONV_GROUP:
- case E.CONV_TOPIC:
- return (l2 = this.getModule(Pn)) ? l2.setMessageRead({ conversationID: t2, lastMessageSeq: a2 }) : Za({ code: ha.CANNOT_FIND_MODULE });
- case E.CONV_SYSTEM:
- return n3.unreadCount = 0, this.emitConversationUpdate(true, false), Xa();
- default:
- return Xa();
- }
- } }, { key: "setAllMessageRead", value: function() {
- var e3 = this, t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n3 = "setAllMessageRead", o2 = "".concat(this._n, ".").concat(n3);
- t2.scope || (t2.scope = E.READ_ALL_MSG), Ve.l("".concat(o2, " options:"), t2);
- var s3 = this._createSetAllMessageReadPack(t2);
- if (0 === s3.readAllC2CMessage && 0 === s3.groupMessageReadInfoList.length)
- return Xa();
- var a2 = new Aa(n3);
- return this.request({ protocolName: us, requestData: s3 }).then(function(n4) {
- var o3 = n4.data, s4 = e3._handleAllMessageRead(o3);
- return a2.setMessage("scope:".concat(t2.scope, " failureGroups:").concat(JSON.stringify(s4))).setNetworkType(e3.getNetworkType()).end(), Xa();
- }).catch(function(t3) {
- return e3.probeNetwork().then(function(e4) {
- var n4 = v(e4, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(t3, o3, s4).end();
- }), 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 });
- });
- } }, { key: "setConversationCustomData", value: function(e3) {
- return this._convGroupHandler.setConvCustomData(e3);
- } }, { key: "markConversation", value: function(e3) {
- return this._convGroupHandler.markConversation(e3);
- } }, { key: "getConversationGroupList", value: function() {
- return this._convGroupHandler.getLocalConvGroupList();
- } }, { key: "createConversationGroup", value: function(e3) {
- return this._convGroupHandler.createConvGroup(e3);
- } }, { key: "deleteConversationGroup", value: function(e3) {
- return this._convGroupHandler.deleteConvGroup(e3);
- } }, { key: "renameConversationGroup", value: function(e3) {
- return this._convGroupHandler.renameConvGroup(e3);
- } }, { key: "addConversationsToGroup", value: function(e3) {
- return this._convGroupHandler.addConvsToGroup(e3);
- } }, { key: "deleteConversationsFromGroup", value: function(e3) {
- return this._convGroupHandler.deleteConvsFromGroup(e3);
- } }, { key: "onConversationMarkUpdated", value: function(e3) {
- this._convGroupHandler.onConvMarkUpdated(e3);
- } }, { key: "onConversationGroupCreated", value: function(e3) {
- this._convGroupHandler.onConvGroupCreated(e3);
- } }, { key: "onConversationGroupDeleted", value: function(e3) {
- this._convGroupHandler.onConvGroupDeleted(e3);
- } }, { key: "onConversationGroupNameUpdated", value: function(e3) {
- this._convGroupHandler.onConvGroupNameUpdated(e3);
- } }, { key: "onConversationInGroupUpdated", value: function(e3) {
- this._convGroupHandler.onConvInGroupUpdated(e3);
- } }, { key: "onConversationAddedToOrDeletedFromGroup", value: function(e3) {
- this._convGroupHandler.onConvAddedToOrDeletedFromGroup(e3);
- } }, { key: "_getConversationLastMessageSequence", value: function(e3) {
- var t2 = this._messageListHandler.getLocalLastMessage(e3.conversationID), n3 = e3.lastMessage.lastSequence;
- return t2 && n3 < t2.sequence && (n3 = t2.sequence), n3;
- } }, { key: "_getConversationLastMessageTime", value: function(e3) {
- var t2 = this._messageListHandler.getLocalLastMessage(e3.conversationID), n3 = e3.lastMessage.lastTime;
- return t2 && n3 < t2.time && (n3 = t2.time), n3;
- } }, { key: "_createSetAllMessageReadPack", value: function(e3) {
- var t2, n3 = { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, o2 = e3.scope, s3 = D(this._conversationMap);
- try {
- for (s3.s(); !(t2 = s3.n()).done; ) {
- var a2 = v(t2.value, 2)[1];
- if (a2.unreadCount > 0) {
- if (a2.type === E.CONV_C2C && 0 === n3.readAllC2CMessage) {
- if (o2 === E.READ_ALL_MSG)
- n3.readAllC2CMessage = 1;
- else if (o2 === E.READ_ALL_C2C_MSG) {
- n3.readAllC2CMessage = 1;
- break;
- }
- } else if (a2.type === E.CONV_GROUP && (o2 === E.READ_ALL_GROUP_MSG || o2 === E.READ_ALL_MSG)) {
- var i2 = this._getConversationLastMessageSequence(a2);
- n3.groupMessageReadInfoList.push({ groupID: a2.groupProfile.groupID, messageSequence: i2 });
- }
- }
- }
- } catch (r2) {
- s3.e(r2);
- } finally {
- s3.f();
- }
- return n3;
- } }, { key: "onPushedAllMessageRead", value: function(e3) {
- this._handleAllMessageRead(e3);
- } }, { key: "_handleAllMessageRead", value: function(e3) {
- var t2 = e3.groupMessageReadInfoList, n3 = e3.readAllC2CMessage, o2 = this._parseGroupReadInfo(t2);
- return this._updateAllConversationUnreadCount({ readAllC2CMessage: n3 }) >= 1 && (this.emitConversationUpdate(true, false), this.emitTotalUnreadMessageCountUpdate()), o2;
- } }, { key: "_parseGroupReadInfo", value: function(e3) {
- var t2 = [];
- if (e3 && e3.length)
- for (var n3 = 0, o2 = e3.length; n3 < o2; n3++) {
- var s3 = e3[n3], a2 = s3.groupID, i2 = s3.sequence, r2 = s3.retCode, u2 = s3.lastMessageSeq;
- it(r2) ? this._remoteGroupReadSequenceMap.set(a2, u2) : (this._remoteGroupReadSequenceMap.set(a2, i2), 0 !== r2 && t2.push("".concat(a2, "-").concat(i2, "-").concat(r2)));
- }
- return t2;
- } }, { key: "_updateAllConversationUnreadCount", value: function(e3) {
- var t2, n3 = e3.readAllC2CMessage, o2 = 0, s3 = D(this._conversationMap);
- try {
- for (s3.s(); !(t2 = s3.n()).done; ) {
- var a2 = v(t2.value, 2), i2 = a2[0], r2 = a2[1];
- if (r2.unreadCount >= 1) {
- if (1 === n3 && r2.type === E.CONV_C2C) {
- var u2 = this._getConversationLastMessageTime(r2);
- this.updateIsReadAfterReadReport({ conversationID: i2, lastMessageTime: u2 });
- } else if (r2.type === E.CONV_GROUP) {
- var c2 = i2.replace(E.CONV_GROUP, "");
- if (this._remoteGroupReadSequenceMap.has(c2)) {
- var l2 = this._remoteGroupReadSequenceMap.get(c2), d2 = this._getConversationLastMessageSequence(r2);
- this.updateIsReadAfterReadReport({ conversationID: i2, remoteReadSequence: l2 }), d2 >= l2 && this._remoteGroupReadSequenceMap.delete(c2);
- }
- }
- this.updateUnreadCount(i2, false) && (o2 += 1);
- }
- }
- } catch (p2) {
- s3.e(p2);
- } finally {
- s3.f();
- }
- return o2;
- } }, { key: "isRemoteRead", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.sequence, o2 = t2.replace(E.CONV_GROUP, ""), s3 = false;
- if (this._remoteGroupReadSequenceMap.has(o2)) {
- var a2 = this._remoteGroupReadSequenceMap.get(o2);
- 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);
- }
- return s3;
- } }, { key: "updateIsReadAfterReadReport", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.lastMessageSeq, o2 = e3.lastMessageTime, s3 = this._messageListHandler.getLocalMessageList(t2);
- if (0 !== s3.length) {
- for (var a2, i2 = s3.length - 1; i2 >= 0; i2--)
- if (a2 = s3[i2], !(o2 && a2.time > o2 || n3 && a2.sequence > n3)) {
- if ("in" === a2.flow && a2.isRead)
- break;
- a2.setIsRead(true);
- }
- }
- } }, { key: "updateUnreadCount", value: function(e3) {
- var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = false, o2 = this.getLocalConversation(e3), s3 = this._messageListHandler.getLocalMessageList(e3);
- if (o2) {
- var a2 = o2.unreadCount, i2 = s3.filter(function(e4) {
- return !e4.isRead && !e4._onlineOnlyFlag && !e4.isDeleted;
- }).length;
- 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) {
- var r2 = o2.unreadCount, u2 = this.getModule(Fn), c2 = e3.replace(E.CONV_GROUP, "");
- u2.onConversationProxy({ topicID: c2, unreadCount: r2 });
- }
- return n3;
- }
- } }, { key: "clearGroupAtInfoList", value: function(e3) {
- var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalConversation(e3);
- if (n3 && n3.groupAtInfoList.length > 0) {
- if (n3.clearGroupAtInfoList(), Ve.l("".concat(this._n, ".clearGroupAtInfoList conversationID:").concat(e3)), n3.type === E.CONV_TOPIC) {
- var o2 = n3.groupAtInfoList, s3 = this.getModule(Fn), a2 = e3.replace(E.CONV_GROUP, "");
- s3.onConversationProxy({ topicID: a2, groupAtInfoList: o2 });
- }
- true === t2 && this.emitConversationUpdate(true, false);
- }
- } }, { key: "updateReadReceiptInfo", value: function(e3) {
- 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;
- if (!zt(i2)) {
- var r2 = [];
- if (it(o2)) {
- if (!it(a2)) {
- var u2 = "".concat(E.CONV_GROUP).concat(a2);
- i2.forEach(function(e4) {
- 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 };
- d2 && (et(i3) && (d2.readReceiptInfo.readCount = i3, p2.readCount = i3), et(c3) && (d2.readReceiptInfo.unreadCount = c3, p2.unreadCount = c3), r2.push(p2));
- });
- }
- } else {
- var c2 = "".concat(E.CONV_C2C).concat(o2);
- i2.forEach(function(e4) {
- var n4 = e4.tinyID, s4 = e4.clientTime, a3 = e4.random, i3 = "".concat(n4, "-").concat(s4, "-").concat(a3), u3 = t2._messageListHandler.getLocalMessage(c2, i3);
- if (u3) {
- u3.readReceiptInfo.isPeerRead = true;
- var l2 = { userID: o2, messageID: i3, isPeerRead: true };
- r2.push(l2);
- }
- });
- }
- r2.length > 0 && this.emitOuterEvent(k.MESSAGE_READ_RECEIPT_RECEIVED, r2);
- }
- } }, { key: "recomputeGroupUnreadCount", value: function(e3) {
- var t2 = e3.conversationID, n3 = e3.count, o2 = this.getLocalConversation(t2);
- if (o2) {
- var s3 = o2.unreadCount, a2 = s3 - n3;
- a2 < 0 && (a2 = 0), o2.unreadCount = a2, Ve.l("".concat(this._n, ".recomputeGroupUnreadCount from ").concat(s3, " to ").concat(a2, ", conversationID:").concat(t2));
- }
- } }, { key: "updateIsRead", value: function(e3) {
- var t2 = this.getLocalConversation(e3), n3 = this.getLocalMessageList(e3);
- if (t2 && 0 !== n3.length && !Lt(t2.type)) {
- for (var o2 = [], s3 = 0, a2 = n3.length; s3 < a2; s3++)
- "in" !== n3[s3].flow ? "out" !== n3[s3].flow || n3[s3].isRead || n3[s3].setIsRead(true) : o2.push(n3[s3]);
- var i2 = 0;
- if (t2.type === E.CONV_C2C) {
- var r2 = o2.slice(-t2.unreadCount).filter(function(e4) {
- return e4.isRevoked;
- }).length;
- i2 = o2.length - t2.unreadCount - r2;
- } else
- i2 = o2.length - t2.unreadCount;
- for (var u2 = 0; u2 < i2 && !o2[u2].isRead; u2++)
- o2[u2].setIsRead(true);
- }
- } }, { key: "deleteGroupAtTips", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".deleteGroupAtTips");
- Ve.l("".concat(n3));
- var o2 = this._conversationMap.get(e3);
- if (!o2)
- return Promise.resolve();
- var s3 = o2.groupAtInfoList;
- if (0 === s3.length)
- return Promise.resolve();
- var a2 = void 0;
- e3.startsWith(E.CONV_GROUP) && (a2 = e3.replace(E.CONV_GROUP, ""));
- var i2 = m(s3);
- if ((Dt({ groupID: a2 }) || kt(a2)) && 0 === (i2 = s3.filter(function(e4) {
- return !e4.atTypeArray.includes(E.CONV_AT_ALL);
- })).length)
- return this.clearGroupAtInfoList(e3, false), Promise.resolve();
- var r2 = this.getMyUserID();
- return this.request({ protocolName: Fo, requestData: { messageListToDelete: i2.map(function(e4) {
- return { from: e4.from, to: r2, messageSeq: e4.__sequence, messageRandom: e4.__random, groupID: it(e4.topicID) ? e4.groupID : e4.topicID };
- }) } }).then(function() {
- return Ve.l("".concat(n3, " ok. count:").concat(s3.length)), t2.clearGroupAtInfoList(e3, false), Promise.resolve();
- }).catch(function(e4) {
- return Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "appendToMessageList", value: function(e3) {
- this._messageListHandler.pushIn(e3);
- } }, { key: "setMessageRandom", value: function(e3) {
- this.singlyLinkedList.set(e3.random);
- } }, { key: "deleteMessageRandom", value: function(e3) {
- this.singlyLinkedList.delete(e3.random);
- } }, { key: "pushIntoMessageList", value: function(e3, t2, n3) {
- return !(!this._messageListHandler.pushIn(t2, n3) || this._isMessageFromCurrentInstance(t2) && !n3) && (e3.push(t2), true);
- } }, { key: "_isMessageFromCurrentInstance", value: function(e3) {
- return this.singlyLinkedList.has(e3.random);
- } }, { key: "revoke", value: function(e3, t2, n3) {
- return this._messageListHandler.revoke(e3, t2, n3);
- } }, { key: "getPeerReadTime", value: function(e3) {
- return this._peerReadTimeMap.get(e3);
- } }, { key: "recordPeerReadTime", value: function(e3, t2) {
- this._peerReadTimeMap.has(e3) ? this._peerReadTimeMap.get(e3) < t2 && this._peerReadTimeMap.set(e3, t2) : this._peerReadTimeMap.set(e3, t2);
- } }, { key: "updateMessageIsPeerReadProperty", value: function(e3, t2) {
- if (e3.startsWith(E.CONV_C2C) && t2 > 0) {
- var n3 = this._messageListHandler.updateMessageIsPeerReadProperty(e3, t2);
- if (n3.length > 0 && this.emitOuterEvent(k.MESSAGE_READ_BY_PEER, n3), this._conversationMap.has(e3)) {
- var o2 = this._conversationMap.get(e3).lastMessage;
- zt(o2) || o2.fromAccount === this.getMyUserID() && o2.lastTime <= t2 && !o2.isPeerRead && (o2.isPeerRead = true, this.emitConversationUpdate(true, false));
- }
- }
- } }, { key: "updateMessageIsModifiedProperty", value: function(e3) {
- this._messageListHandler.updateMessageIsModifiedProperty(e3);
- } }, { key: "setCompleted", value: function(e3) {
- Ve.l("".concat(this._n, ".setCompleted. conversationID:").concat(e3)), this._completedMap.set(e3, true);
- } }, { key: "updateRoamingMessageKeyAndTime", value: function(e3, t2, n3) {
- this._roamingMessageKeyAndTimeMap.set(e3, { messageKey: t2, lastMessageTime: n3 });
- } }, { key: "updateRoamingMessageSequence", value: function(e3, t2) {
- this._roamingMessageSequenceMap.set(e3, t2);
- } }, { key: "getConversationList", value: function(e3) {
- 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);
- if (Ve.l("".concat(o2, ". ").concat(s3)), this._pagingStatus === $t.REJECTED) {
- var a2 = new Aa(n3);
- return a2.setMessage(s3), this.syncConversationList().then(function() {
- a2.setNetworkType(t2.getNetworkType()).end();
- var n4 = t2._getConversationList(e3);
- return Ya({ conversationList: n4, isSyncCompleted: t2._isSyncCompleted() });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- }
- if (0 === this._conversationMap.size) {
- var i2 = new Aa(n3);
- return i2.setMessage(s3), this.syncConversationList().then(function() {
- i2.setNetworkType(t2.getNetworkType()).end();
- var n4 = t2._getConversationList(e3);
- return Ya({ conversationList: n4, isSyncCompleted: t2._isSyncCompleted() });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- }
- var r2 = this._getConversationList(e3);
- return Ve.l("".concat(o2, ". returned conversation count:").concat(r2.length)), Xa({ conversationList: r2, isSyncCompleted: this._isSyncCompleted() });
- } }, { key: "_getConversationList", value: function(e3) {
- if (it(e3))
- return this.getLocalConversationList();
- if (at(e3))
- return 0 === e3.length ? [] : this.getLocalConversationList().filter(function(t3) {
- return e3.includes(t3.conversationID);
- });
- if (st(e3)) {
- var t2 = e3.type, n3 = e3.markType, o2 = e3.groupName;
- return this.getLocalConversationList().filter(function(e4) {
- return (t2 !== E.CONV_C2C && t2 !== E.CONV_GROUP || e4.type === t2) && (!nt(o2) || e4.conversationGroupList.includes(o2)) && (!et(n3) || e4.markList.includes(n3));
- });
- }
- return [];
- } }, { key: "_handleC2CPeerReadTime", value: function() {
- var e3, t2 = D(this._conversationMap);
- try {
- for (t2.s(); !(e3 = t2.n()).done; ) {
- var n3 = v(e3.value, 2), o2 = n3[0], s3 = n3[1];
- s3.type === E.CONV_C2C && (Ve.d("".concat(this._n, "._handleC2CPeerReadTime conversationID:").concat(o2, " peerReadTime:").concat(s3.peerReadTime)), this.recordPeerReadTime(o2, s3.peerReadTime));
- }
- } catch (a2) {
- t2.e(a2);
- } finally {
- t2.f();
- }
- } }, { key: "_isPagingGetGroupListCompleted", value: function() {
- return this.getModule(Pn).isPagingGetCompleted();
- } }, { key: "_getLocalGroupCount", value: function() {
- return this.getModule(Pn).getLocalGroupList().length;
- } }, { key: "_hasLocalGroup", value: function(e3) {
- return this.getModule(Pn).hasLocalGroup(e3.replace(E.CONV_GROUP, ""));
- } }, { key: "getConversationProfile", value: function(e3) {
- var t2, n3 = this;
- 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)
- return Xa({ conversation: t2 });
- if (St(e3) && !this._hasLocalGroup(e3))
- return Xa({ conversation: t2 });
- var o2 = "".concat(this._n, ".").concat("getConversationProfile"), s3 = new Aa("getConversationProfile");
- return Ve.l("".concat(o2, ". conversationID:").concat(e3, " remark:").concat(t2.remark, " lastMessage:"), t2.lastMessage), this._updateUserOrGroupProfileCompletely(t2).then(function(a2) {
- s3.setNetworkType(n3.getNetworkType()).setMessage("conversationID:".concat(e3, " unreadCount:").concat(a2.data.conversation.unreadCount)).end();
- var i2 = n3.getModule(bn);
- if (i2 && t2.type === E.CONV_C2C) {
- var r2 = e3.replace(E.CONV_C2C, "");
- if (i2.isMyFriend(r2)) {
- var u2 = i2.getFriendRemark(r2);
- t2.remark !== u2 && (t2.remark = u2, Ve.l("".concat(o2, ". conversationID:").concat(e3, " patch remark:").concat(t2.remark)));
- }
- }
- return Ve.l("".concat(o2, " ok. conversationID:").concat(e3)), a2;
- }).catch(function(t3) {
- return n3.probeNetwork().then(function(n4) {
- var o3 = v(n4, 2), a2 = o3[0], i2 = o3[1];
- s3.setError(t3, a2, i2).setMessage("conversationID:".concat(e3)).end();
- }), Ve.e("".concat(o2, " failed. error:"), t3), Za(t3);
- });
- } }, { key: "_updateUserOrGroupProfileCompletely", value: function(e3) {
- var t2 = this;
- return e3.type === E.CONV_C2C ? this.getModule(Gn).getUserProfile({ userIDList: [e3.toAccount] }).then(function(n3) {
- var o2 = n3.data;
- 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 }));
- }) : this.getModule(Pn).getGroupProfile({ groupID: e3.toAccount }).then(function(n3) {
- return e3.groupProfile = n3.data.group, e3._isInfoCompleted = true, t2._unshiftConversation(e3), Xa({ conversation: e3 });
- });
- } }, { key: "_unshiftConversation", value: function(e3) {
- 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));
- } }, { key: "_onProfileUpdated", value: function(e3) {
- var t2 = this;
- e3.data.forEach(function(e4) {
- var n3 = e4.userID;
- if (n3 === t2.getMyUserID())
- t2._onMyProfileModified({ latestNick: e4.nick, latestAvatar: e4.avatar });
- else {
- var o2 = t2._conversationMap.get("".concat(E.CONV_C2C).concat(n3));
- o2 && (o2.userProfile = e4);
- }
- });
- } }, { key: "_isSyncCompleted", value: function() {
- return this._pagingStatus === $t.RESOLVED;
- } }, { key: "_errorLog", value: function(e3, t2, n3, o2) {
- var s3 = new Error("Params validate failed."), a2 = "".concat(this.getErrorMessage("API_REFER")).concat(e3);
- 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;
- } }, { key: "_isValidConversationID", value: function(e3) {
- return Et(e3) || St(e3) || Lt(e3);
- } }, { key: "deleteConversation", value: function(e3) {
- var t2 = this, n3 = "deleteConversation";
- 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) {
- t2._isValidConversationID(e4) || t2._errorLog(n3, "conversationIDList", "InvalidConversationID", e4);
- }), "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));
- } }, { key: "deleteConversationList", value: function(e3) {
- 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");
- Ve.l("".concat(u2, " conversationIDList.length:").concat(o2.length, " clearHistoryMessage:").concat(a2));
- var c2 = new Aa("deleteConversationList");
- return c2.setMessage("conversationIDList:".concat(o2)), Promise.all([this.rmLocalOnlyConversationList(o2), this.rmLocalAndRemoteConversationList(o2, a2)]).then(function(e4) {
- c2.setNetworkType(t2.getNetworkType()).end();
- var n4 = [].concat(m(e4[0]), m(e4[1]));
- 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 }));
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- c2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(u2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "rmLocalOnlyConversationList", value: function(e3) {
- var t2 = this;
- return e3.filter(function(e4) {
- if (!t2._conversationMap.has(e4))
- return false;
- var n3 = t2.getLocalConversation(e4).type;
- 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);
- });
- } }, { key: "rmLocalAndRemoteConversationList", value: function(e3, t2) {
- var n3 = this, o2 = { fromAccount: this.getMyUserID(), conversationList: [], clearHistoryMessage: t2 ? 1 : 0 };
- return e3.forEach(function(e4) {
- if (n3._conversationMap.has(e4)) {
- var t3 = n3.getLocalConversation(e4).type;
- 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 });
- }
- }), 0 === o2.conversationList.length ? [] : this.request({ protocolName: Po, requestData: o2 }).then(function(e4) {
- var t3 = [];
- return e4.data.resultList.length > 0 && e4.data.resultList.map(function(e5) {
- if (0 === e5.code) {
- var n4 = 1 === e5.type ? "".concat(E.CONV_C2C).concat(e5.to) : "".concat(E.CONV_GROUP).concat(e5.groupID);
- t3.push(n4);
- }
- }), n3.deleteLocalConversationList(t3), t3;
- });
- } }, { key: "clearHistoryMessage", value: function(e3) {
- var t2 = this, n3 = { fromAccount: this.getMyUserID(), toAccount: void 0, type: void 0, toGroupID: void 0 };
- if (!this._conversationMap.has(e3))
- return Za({ code: ha.CONVERSATION_NOT_FOUND });
- var o2 = this._conversationMap.get(e3).type;
- if (o2 === E.CONV_C2C)
- n3.type = 1, n3.toAccount = e3.replace(E.CONV_C2C, "");
- else {
- if (o2 !== E.CONV_GROUP)
- return o2 === E.CONV_SYSTEM ? (this.getModule(Pn).deleteGroupSystemNotice({ messageList: this._messageListHandler.getLocalMessageList(e3) }), Xa({ conversationID: e3 })) : Za({ code: ha.CONVERSATION_UN_RECORDED_TYPE });
- n3.type = 2, n3.toGroupID = e3.replace(E.CONV_GROUP, "");
- }
- var s3 = "".concat(this._n, ".").concat("clearHistoryMessage"), a2 = new Aa("clearHistoryMessage");
- return a2.setMessage("conversationID:".concat(e3)), Ve.l("".concat(s3, ". conversationID:").concat(e3)), this.setMessageRead({ conversationID: e3 }).then(function() {
- return t2.request({ protocolName: bo, requestData: n3 });
- }).then(function() {
- a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok")), t2._messageListHandler.removeByConversationID(e3), t2.setCompleted(e3);
- var n4 = t2.getLocalConversation(e3);
- return n4 && (n4.updateLastMessage(), t2._sortConversationListAndEmitEvent()), Xa({ conversationID: e3 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(s3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "pinConversation", value: function(e3) {
- var t2 = this, n3 = e3.conversationID, o2 = e3.isPinned;
- if (!this._conversationMap.has(n3))
- return Za({ code: ha.CONVERSATION_NOT_FOUND });
- var s3 = this.getLocalConversation(n3);
- if (s3.isPinned === o2)
- return Xa({ conversationID: n3 });
- var a2 = "".concat(this._n, ".").concat("pinConversation"), i2 = new Aa("pinConversation");
- i2.setMessage("conversationID:".concat(n3, " isPinned:").concat(o2)), Ve.l("".concat(a2, ". conversationID:").concat(n3, " isPinned:").concat(o2));
- var r2 = null;
- 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() {
- return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok")), s3.isPinned !== o2 && (s3.isPinned = o2, t2._sortConversationListAndEmitEvent()), Ya({ conversationID: n3 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "setMessageRemindType", value: function(e3) {
- return this._messageRemindHandler.set(e3);
- } }, { key: "patchMessageRemindType", value: function(e3) {
- 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));
- return a2 && a2.messageRemindType !== o2 && (a2.messageRemindType = o2, s3 = true), Ve.d("".concat(this._n, ".patchMessageRemindType options:"), e3, "ret:".concat(s3)), s3;
- } }, { key: "onC2CMessageRemindTypeSynced", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".onC2CMessageRemindTypeSynced");
- Ve.d(n3, e3), e3.dataList.forEach(function(e4) {
- if (!zt(e4.muteNotificationsSync)) {
- var o2, s3 = e4.muteNotificationsSync, a2 = s3.to, i2 = s3.updateSequence, r2 = s3.muteFlag;
- 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);
- var u2 = 0;
- t2.patchMessageRemindType({ ID: a2, isC2CConversation: true, messageRemindType: o2 }) && (u2 += 1), Ve.l("".concat(n3, " updateCount:").concat(u2)), u2 >= 1 && t2.emitConversationUpdate(true, false);
- }
- });
- } }, { key: "onGroupMessageRemindTypeSynced", value: function(e3) {
- Ve.d("".concat(this._n, ".onGroupMessageRemindTypeSynced options:"), e3), this._messageRemindHandler.onGroupMessageRemindTypeUpdated(e3);
- } }, { key: "deleteLocalConversation", value: function(e3) {
- var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this._conversationMap.has(e3);
- 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)) {
- var o2 = !this._isTopicConversation(e3);
- this.emitConversationUpdate(o2, false);
- }
- } }, { key: "deleteLocalConversationList", value: function(e3) {
- var t2 = this, n3 = 0, o2 = false;
- e3.forEach(function(e4) {
- t2._conversationMap.has(e4) && (n3 += t2._conversationMap.get(e4).unreadCount || 0, t2.deleteLocalConversation(e4, false), o2 = true);
- }), Ve.l("".concat(this._n, ".deleteLocalConversationList conversationIDList.length:").concat(e3.length, " isConvIDExisted:").concat(o2)), o2 && (this.emitConversationUpdate(true, false), n3 > 0 && this.emitTotalUnreadMessageCountUpdate());
- } }, { key: "isMessageSentByCurrentInstance", value: function(e3) {
- return !(!this._messageListHandler.hasLocalMessage(e3.conversationID, e3.ID) && !this.singlyLinkedList.has(e3.random));
- } }, { key: "modifyMessageList", value: function(e3) {
- if (e3.startsWith(E.CONV_C2C) && this._conversationMap.has(e3)) {
- var t2 = this._conversationMap.get(e3), n3 = Date.now();
- this._messageListHandler.modifyMessageSentByPeer({ conversationID: e3, latestNick: t2.userProfile.nick, latestAvatar: t2.userProfile.avatar });
- var o2 = this.getModule(Gn).getNickAndAvatarByUserID(this.getMyUserID());
- 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"));
- }
- } }, { key: "updateUserProfileSpecifiedKey", value: function(e3) {
- Ve.l("".concat(this._n, ".updateUserProfileSpecifiedKey options:"), e3);
- var t2 = e3.conversationID, n3 = e3.nick, o2 = e3.avatar;
- if (this._conversationMap.has(t2)) {
- var s3 = this._conversationMap.get(t2).userProfile;
- nt(n3) && s3.nick !== n3 && (s3.nick = n3), nt(o2) && s3.avatar !== o2 && (s3.avatar = o2), this.emitConversationUpdate(true, false);
- }
- } }, { key: "_onMyProfileModified", value: function(e3) {
- var n3 = this, o2 = this.getLocalConversationList(), s3 = Date.now();
- o2.forEach(function(o3) {
- n3.modifyMessageSentByMe(t({ conversationID: o3.conversationID }, e3));
- }), Ve.l("".concat(this._n, "._onMyProfileModified. modify all messages sent by me, cost ").concat(Date.now() - s3, " ms"));
- } }, { key: "modifyMessageSentByMe", value: function(e3) {
- this._messageListHandler.modifyMessageSentByMe(e3);
- } }, { key: "getLatestMessageSentByMe", value: function(e3) {
- return this._messageListHandler.getLatestMessageSentByMe(e3);
- } }, { key: "modifyMessageSentByPeer", value: function(e3) {
- this._messageListHandler.modifyMessageSentByPeer(e3);
- } }, { key: "getLatestMessageSentByPeer", value: function(e3) {
- return this._messageListHandler.getLatestMessageSentByPeer(e3);
- } }, { key: "pushIntoNoticeResult", value: function(e3, t2) {
- return !(!this._messageListHandler.pushIn(t2) || this.singlyLinkedList.has(t2.random)) && (e3.push(t2), true);
- } }, { key: "getLocalLastMessage", value: function(e3) {
- return this._messageListHandler.getLocalLastMessage(e3);
- } }, { key: "checkAndPatchRemark", value: function() {
- var e3 = Promise.resolve();
- if (0 === this._conversationMap.size)
- return e3;
- var t2 = this.getModule(bn);
- if (!t2)
- return e3;
- var n3 = m(this._conversationMap.values()).filter(function(e4) {
- return e4.type === E.CONV_C2C;
- });
- if (0 === n3.length)
- return e3;
- var o2 = 0;
- return n3.forEach(function(e4) {
- var n4 = e4.conversationID.replace(E.CONV_C2C, "");
- if (t2.isMyFriend(n4)) {
- var s3 = t2.getFriendRemark(n4);
- e4.remark !== s3 && (e4.remark = s3, o2 += 1);
- }
- }), Ve.l("".concat(this._n, ".checkAndPatchRemark. c2c conversation count:").concat(n3.length, ", patched count:").concat(o2)), e3;
- } }, { key: "updateTopicConversation", value: function(e3) {
- this._updateLocalConversationList({ conversationOptionsList: e3, isFromGetConversations: true });
- } }, { key: "sendReadReceipt", value: function(e3) {
- var t2 = e3[0], n3 = null;
- 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 });
- } }, { key: "getReadReceiptList", value: function(e3) {
- var t2 = e3[0], n3 = null;
- 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 });
- } }, { key: "getLastMessageTime", value: function(e3) {
- var t2 = this.getLocalConversation(e3);
- return t2 ? t2.lastMessage.lastTime : 0;
- } }, { key: "getTotalUnreadMessageCount", value: function() {
- var e3 = this.getLocalConversationList(), t2 = 0;
- return e3.forEach(function(e4) {
- e4.type !== E.CONV_SYSTEM && ("" !== e4.messageRemindType && e4.messageRemindType !== E.MSG_REMIND_ACPT_AND_NOTE || (t2 += e4.unreadCount));
- }), t2;
- } }, { key: "emitTotalUnreadMessageCountUpdate", value: function() {
- var e3 = this.getTotalUnreadMessageCount();
- 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));
- } }, { key: "reset", value: function() {
- 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();
- } }]), s2;
- }(uo), yi = function() {
- function e2(t2) {
- 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();
- }
- return a(e2, [{ key: "onCheckTimer", value: function(e3) {
- e3 % 1 == 0 && this._cachedGroupTipsMap.size > 0 && this._checkCachedGroupTips();
- } }, { key: "_checkCachedGroupTips", value: function() {
- var e3 = this;
- this._cachedGroupTipsMap.forEach(function(t2, n2) {
- var o2 = e3._checkCountMap.get(n2), s2 = e3._groupModule.hasLocalGroup(n2);
- 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));
- });
- } }, { key: "onNewGroupTips", value: function(e3) {
- Ve.d("".concat(this._n, ".onReceiveGroupTips count:").concat(e3.dataList.length));
- var t2 = this.newGroupTipsStoredAndSummary(e3), n2 = t2.eventDataList, o2 = t2.result, s2 = t2.AVChatRoomMessageList;
- (s2.length > 0 && this._groupModule.onAVChatRoomMessage(s2), n2.length > 0) && (this._groupModule.updateNextMessageSeq(n2), this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: n2, isInstantMessage: true }));
- o2.length > 0 && (this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, o2), this.handleMessageList(o2));
- } }, { key: "newGroupTipsStoredAndSummary", value: function(e3) {
- for (var n2 = this, o2 = e3.event, s2 = e3.dataList, a2 = null, i2 = [], r2 = [], u2 = {}, c2 = [], l2 = function(e4, l3) {
- var d3 = It(s2[e4]);
- if (6 === o2) {
- if (n2._groupModule.isGroupAttributesUpdatedNotice(d3))
- return "continue";
- if (n2._groupModule.isGroupCountersNotice(d3))
- return "continue";
- }
- 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);
- if (y2) {
- M2 = E.CONV_TOPIC, d3.to = v2;
- var I2 = n2._groupModule.getModule(Fn);
- I2.hasLocalTopic(g2, v2) || n2._getTopicPendingMap.has(v2) || (n2._getTopicPendingMap.set(v2, 1), I2.getTopicList({ groupID: g2, topicIDList: [v2] }).finally(function() {
- n2._getTopicPendingMap.delete(v2);
- }));
- }
- var C2 = n2._groupModule.hasLocalGroup(g2);
- if (!C2 && n2._groupModule.isUnjoinedAVChatRoom(g2))
- return "continue";
- if (!C2 && !y2)
- return n2._cacheGroupTipsAndProbe({ groupID: g2, event: o2, item: d3 }), "continue";
- if (n2._groupModule.isMessageFromOrToAVChatroom(g2))
- return d3.event = o2, c2.push(d3), "continue";
- 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)
- return n2._qualityStat(a2), "continue";
- var T2 = n2._groupModule.getModule(qn), D2 = a2, k2 = D2.conversationID, S2 = D2.sequence;
- if (6 === o2)
- a2._onlineOnlyFlag = true, r2.push(a2);
- else if (!T2.pushIntoNoticeResult(r2, a2))
- return "continue";
- if (n2._groupModule.isMessageFromCommunityOfTopic(_2, v2))
- return "continue";
- if (6 === o2 && T2.getLocalConversation(k2))
- return "continue";
- 6 !== o2 && n2._qualityStat(a2);
- var L2 = T2.isRemoteRead({ conversationID: k2, sequence: S2 });
- if (it(u2[k2])) {
- var A2 = 0;
- "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;
- } else {
- var R2 = u2[k2];
- 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++);
- }
- }, d2 = 0, p2 = s2.length; d2 < p2; d2++)
- l2(d2);
- return { eventDataList: i2, result: r2, AVChatRoomMessageList: c2 };
- } }, { key: "_qualityStat", value: function(e3) {
- this._groupModule.getModule(eo).addMessageSequence({ key: Ca, message: e3 });
- } }, { key: "handleMessageList", value: function(e3) {
- var t2 = this;
- e3.forEach(function(e4) {
- switch (e4.payload.operationType) {
- case 1:
- t2._onNewMemberComeIn(e4);
- break;
- case 2:
- t2._onMemberQuit(e4);
- break;
- case 3:
- t2._onMemberKickedOut(e4);
- break;
- case 4:
- t2._onMemberSetAdmin(e4);
- break;
- case 5:
- t2._onMemberCancelledAdmin(e4);
- break;
- case 6:
- t2._onGroupProfileModified(e4);
- break;
- case 7:
- t2._onMemberInfoModified(e4);
- break;
- case 8:
- t2._onTopicProfileUpdated(e4);
- break;
- default:
- Ve.w("".concat(t2._n, ".handleMessageList unknown operationType:").concat(e4.payload.operationType));
- }
- });
- } }, { key: "_onNewMemberComeIn", value: function(e3) {
- var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2);
- s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2));
- } }, { key: "_onMemberQuit", value: function(e3) {
- var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2);
- s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)), this._groupModule.getModule(wn).deleteLocalGroupMembers(o2, e3.payload.userIDList);
- } }, { key: "_onMemberKickedOut", value: function(e3) {
- var t2 = e3.payload, n2 = t2.memberNum, o2 = t2.groupProfile.groupID, s2 = this._groupModule.getLocalGroupProfile(o2);
- s2 && et(n2) && s2.memberCount !== n2 && (s2.memberCount = n2, this._updateConversationGroupProfile(s2)), this._groupModule.getModule(wn).deleteLocalGroupMembers(o2, e3.payload.userIDList);
- } }, { key: "_updateConversationGroupProfile", value: function(e3) {
- this._groupModule.getModule(qn).updateConversationGroupProfile([e3]);
- } }, { key: "_onMemberSetAdmin", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.userIDList, o2 = this._groupModule.getModule(wn);
- n2.forEach(function(e4) {
- var n3 = o2.getLocalGroupMemberInfo(t2, e4);
- n3 && n3.updateRole(E.GRP_MBR_ROLE_ADMIN);
- });
- } }, { key: "_onMemberCancelledAdmin", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.userIDList, o2 = this._groupModule.getModule(wn);
- n2.forEach(function(e4) {
- var n3 = o2.getLocalGroupMemberInfo(t2, e4);
- n3 && n3.updateRole(E.GRP_MBR_ROLE_MEMBER);
- });
- } }, { key: "_onGroupProfileModified", value: function(e3) {
- var t2 = this, n2 = e3.payload, o2 = n2.newGroupProfile, s2 = n2.groupProfile.groupID, a2 = this._groupModule.getLocalGroupProfile(s2);
- Object.keys(o2).forEach(function(e4) {
- switch (e4) {
- case "ownerID":
- t2._ownerChanged(a2, o2);
- break;
- case "groupName":
- a2.name = o2[e4];
- break;
- default:
- a2[e4] = o2[e4];
- }
- });
- var i2 = !a2.isSupportTopic;
- this._groupModule.emitGroupListUpdate(true, i2);
- } }, { key: "_ownerChanged", value: function(e3, t2) {
- var n2 = e3.groupID, o2 = this._groupModule.getLocalGroupProfile(n2), s2 = this._groupModule.getMyUserID();
- if (s2 === t2.ownerID) {
- o2.updateGroup({ selfInfo: { role: E.GRP_MBR_ROLE_OWNER } });
- var a2 = this._groupModule.getModule(wn), i2 = a2.getLocalGroupMemberInfo(n2, s2), r2 = this._groupModule.getLocalGroupProfile(n2).ownerID, u2 = a2.getLocalGroupMemberInfo(n2, r2);
- i2 && i2.updateRole(E.GRP_MBR_ROLE_OWNER), u2 && u2.updateRole(E.GRP_MBR_ROLE_MEMBER);
- }
- } }, { key: "_onMemberInfoModified", value: function(e3) {
- var t2 = e3.to, n2 = e3.payload, o2 = n2.groupProfile, s2 = n2.memberList, a2 = o2.groupID;
- kt(t2) && this._updateTopicMuteTime(e3);
- var i2 = this._groupModule.getModule(wn);
- s2.forEach(function(e4) {
- var t3 = i2.getLocalGroupMemberInfo(a2, e4.userID);
- t3 && et(e4.muteTime) && t3.updateMuteUntil(e4.muteTime);
- });
- } }, { key: "_updateTopicMuteTime", value: function(e3) {
- 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);
- if (u2) {
- for (var c2 = false, l2 = 0; l2 < a2.length; l2++) {
- var d2 = a2[l2];
- if (d2.userID === this._groupModule.getMyUserID() && d2.muteTime >= 0) {
- u2.updateSelfInfo({ muteTime: d2.muteTime }), c2 = true;
- break;
- }
- }
- c2 && this._groupModule.emitOuterEvent(k.TOPIC_UPDATED, { groupID: r2, topic: u2 });
- }
- } }, { key: "_onTopicProfileUpdated", value: function(e3) {
- var n2 = e3.payload, o2 = n2.groupProfile.groupID, s2 = n2.newTopicInfo;
- this._groupModule.getModule(Fn).onTopicProfileUpdated(t({ groupID: o2, topicID: e3.to }, s2));
- } }, { key: "_cacheGroupTips", value: function(e3, t2) {
- this._cachedGroupTipsMap.has(e3) || this._cachedGroupTipsMap.set(e3, []), this._cachedGroupTipsMap.get(e3).push(t2);
- } }, { key: "_deleteCachedGroupTips", value: function(e3) {
- this._cachedGroupTipsMap.has(e3) && this._cachedGroupTipsMap.delete(e3);
- } }, { key: "_notifyCachedGroupTips", value: function(e3) {
- var t2 = this, n2 = this._cachedGroupTipsMap.get(e3) || [];
- n2.forEach(function(e4) {
- t2.onNewGroupTips(e4);
- }), this._deleteCachedGroupTips(e3), Ve.l("".concat(this._n, "._notifyCachedGroupTips groupID:").concat(e3, " count:").concat(n2.length));
- } }, { key: "_cacheGroupTipsAndProbe", value: function(e3) {
- var t2 = this, n2 = e3.groupID, o2 = e3.event, s2 = e3.item;
- this._cacheGroupTips(n2, { event: o2, dataList: [s2] }), this._groupModule.getGroupSimplifiedInfo(n2).then(function(e4) {
- e4.type === E.GRP_AVCHATROOM ? t2._groupModule.hasLocalGroup(n2) ? t2._notifyCachedGroupTips(n2) : t2._groupModule.setUnjoinedAVChatRoom(n2) : (t2._groupModule.updateGroupMap([e4]), t2._notifyCachedGroupTips(n2));
- }), this._checkCountMap.has(n2) || this._checkCountMap.set(n2, 0), Ve.l("".concat(this._n, "._cacheGroupTipsAndProbe groupID:").concat(n2));
- } }, { key: "reset", value: function() {
- this._cachedGroupTipsMap.clear(), this._checkCountMap.clear(), this._getTopicPendingMap.clear();
- } }]), e2;
- }(), Ii = function() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "onCheckTimer", value: function(e3) {
- e3 % 1 == 0 && this._cachedGroupMessageMap.size > 0 && this._checkCachedGroupMessage();
- } }, { key: "_checkCachedGroupMessage", value: function() {
- var e3 = this;
- this._cachedGroupMessageMap.forEach(function(t2, n2) {
- var o2 = e3._checkCountMap.get(n2), s2 = e3._groupModule.hasLocalGroup(n2);
- 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));
- });
- } }, { key: "_initGroupList", value: function() {
- var e3 = this;
- Ve.l("".concat(this._n, "._initGroupList"));
- var t2 = new Aa("getGroupListInStorage"), n2 = this._groupModule.getStorageGroupList();
- if (at(n2) && n2.length > 0) {
- n2.forEach(function(t3) {
- e3._groupModule.initGroupMap(t3);
- }), this._groupModule.emitGroupListUpdate(true, false);
- var o2 = this._groupModule.getLocalGroupList().length;
- t2.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:".concat(o2)).end();
- } else
- t2.setNetworkType(this._groupModule.getNetworkType()).setMessage("group count:0").end();
- Ve.l("".concat(this._n, "._initGroupList ok"));
- } }, { key: "handleUpdateGroupLastMessage", value: function(e3) {
- var n2 = "".concat(this._n, ".handleUpdateGroupLastMessage");
- if (Ve.l("".concat(n2, " conversation count:").concat(e3.length, ", local group count:").concat(this._groupModule.getLocalGroupList().length)), 0 !== this._groupModule.getGroupMap().size) {
- for (var o2, s2, a2, i2 = false, r2 = 0, u2 = e3.length; r2 < u2; r2++)
- (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));
- i2 && (this._groupModule.sortLocalGroupList(), this._groupModule.emitGroupListUpdate(true, false));
- } else
- this.tempConversationList = e3;
- } }, { key: "onNewGroupMessage", value: function(e3) {
- Ve.d("".concat(this._n, ".onNewGroupMessage count:").concat(e3.dataList.length));
- var t2 = this._newGroupMessageStoredAndSummary(e3), n2 = t2.conversationOptionsList, o2 = t2.messageList, s2 = t2.AVChatRoomMessageList;
- (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 }));
- var a2 = this._groupModule.filterUnmodifiedMessage(o2);
- a2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, a2), o2.length = 0;
- } }, { key: "_newGroupMessageStoredAndSummary", value: function(e3) {
- 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;
- p2 > 1 && n2.sort(function(e4, t3) {
- return e4.sequence - t3.sequence;
- });
- for (var g2 = function(e4) {
- 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);
- if (I2) {
- y2 = E.CONV_TOPIC, p3.to = m2;
- var C2 = t2._groupModule.getModule(Fn);
- C2.hasLocalTopic(h3, m2) || t2._getTopicPendingMap.has(m2) || (t2._getTopicPendingMap.set(m2, 1), C2.getTopicList({ groupID: h3, topicIDList: [m2] }).finally(function() {
- t2._getTopicPendingMap.delete(m2);
- }));
- }
- var T2 = t2._groupModule.hasLocalGroup(h3);
- if (!T2 && t2._groupModule.isUnjoinedAVChatRoom(h3))
- return "continue";
- if (!T2 && !I2)
- return t2._cacheGroupMessageAndProbe({ groupID: h3, event: o2, item: p3 }), "continue";
- if (t2._groupModule.isMessageFromOrToAVChatroom(h3))
- return p3.event = o2, u2.push(p3), "continue";
- 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)
- return t2._qualityStat(s2, a2), "continue";
- var D2 = 1 === n2[e4].isModified, k2 = t2._groupModule.getModule(qn);
- if (k2.isMessageSentByCurrentInstance(a2) ? a2.isModified = D2 : D2 = false, 1 === p3.onlineOnlyFlag)
- a2._onlineOnlyFlag = true, k2.isMessageSentByCurrentInstance(a2) || r2.push(a2);
- else {
- if (t2._groupModule.isMessageFromCommunityOfTopic(f2, m2))
- return r2.push(a2), "continue";
- if (!k2.pushIntoMessageList(r2, a2, D2))
- return "continue";
- t2._qualityStat(s2, a2);
- var S2 = a2, L2 = S2.conversationID, A2 = S2.sequence, R2 = k2.isRemoteRead({ conversationID: L2, sequence: A2 });
- if (it(c2[L2])) {
- var N2 = 0;
- "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;
- } else {
- var O2 = c2[L2];
- 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++);
- }
- }
- }, h2 = 0; h2 < p2; h2++)
- g2(h2);
- return { conversationOptionsList: i2, messageList: r2, AVChatRoomMessageList: u2 };
- } }, { key: "_qualityStat", value: function(e3, t2) {
- var n2 = this._groupModule.getModule(eo);
- n2.addMessageSequence({ key: Ca, message: t2 }), e3 && t2.clientTime > 0 && n2.addMessageDelay(t2.clientTime);
- } }, { key: "onGroupMessageRevoked", value: function(e3) {
- var t2 = this._groupModule.getModule(qn), n2 = [], o2 = null, s2 = true;
- e3.dataList.forEach(function(e4) {
- var a2 = e4.elements.revokedInfos;
- it(a2) || a2.forEach(function(e5) {
- var a3 = zt(e5.topicID) ? "GROUP".concat(e5.groupID) : "GROUP".concat(e5.topicID);
- o2 = t2.revoke(a3, e5.sequence, e5.random);
- var i2 = e5.revokerInfo && e5.revokerInfo.revoker;
- if (o2)
- o2.revoker = i2, n2.push(o2);
- else {
- var r2 = { conversationID: a3, to: e5.topicID || "", sequence: e5.sequence, time: e5.time, revoker: i2 };
- t2.isLastMessageRevoked(r2) && (n2.push(r2), s2 = false);
- }
- });
- }), 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)));
- } }, { key: "_groupListTreeShaking", value: function(e3) {
- for (var t2 = new Map(m(this._groupModule.getGroupMap())), n2 = 0, o2 = e3.length; n2 < o2; n2++)
- t2.delete(e3[n2].groupID);
- this._groupModule.hasJoinedAVChatRoom() && this._groupModule.getJoinedAVChatRoom().forEach(function(e4) {
- t2.delete(e4);
- });
- this._groupModule.getGroupMap().forEach(function(e4, n3) {
- e4.isSupportTopic && t2.delete(n3);
- });
- for (var s2 = m(t2.keys()), a2 = 0, i2 = s2.length; a2 < i2; a2++)
- this._groupModule.deleteGroup(s2[a2]);
- } }, { key: "getGroupList", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".").concat("getGroupList"), o2 = new Aa("getGroupList");
- Ve.l("".concat(n2));
- 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 = [];
- e3 && e3.groupProfileFilter && e3.groupProfileFilter.forEach(function(e4) {
- s2[e4] && a2.push(s2[e4]);
- });
- var r2 = (e3 || {}).isGroupWithTopicOnly, u2 = void 0 !== r2 && r2;
- return this._pagingGetGroupList({ limit: 50, offset: 0, groupBaseInfoFilter: a2, groupList: i2, isGroupWithTopicOnly: u2 }).then(function() {
- Ve.l("".concat(n2, " ok. count:").concat(i2.length, " isGroupWithTopicOnly:").concat(u2)), u2 || t2._groupListTreeShaking(i2), t2._groupModule.updateGroupMap(i2);
- var e4 = t2._groupModule.getLocalGroupList().length;
- 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);
- var s3 = t2._groupModule.getLocalGroupList();
- if (u2) {
- var a3 = s3.filter(function(e5) {
- return true === e5.isSupportTopic;
- });
- return Ya({ groupList: a3 });
- }
- return t2._isPagingGetCompleted = true, Ya({ groupList: s3 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
- o2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "isPagingGetCompleted", value: function() {
- return this._isPagingGetCompleted;
- } }, { key: "_pagingGetGroupList", value: function(e3) {
- 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;
- if (i2)
- return this._pagingGetGroupListWithTopic({ limit: r2, offset: u2, groupBaseInfoFilter: c2, groupList: l2 });
- var d2 = new Aa("_pagingGetGroupList");
- 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) {
- var o3 = e4.data, a3 = o3.groups, i3 = void 0 === a3 ? [] : a3, p2 = o3.totalCount;
- l2.push.apply(l2, m(i3)), t2._handleGroupAtInfoWithoutTopic(s2, i3);
- var g2 = u2 + r2, h2 = !(p2 > g2), _2 = "offset:".concat(u2, " totalCount:").concat(p2, " isCompleted:").concat(h2, " ") + "currentCount:".concat(l2.length, " isCommunityRelay:").concat(s2);
- 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 }));
- }).catch(function(e4) {
- return 11e3 !== e4.code && t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], a3 = n3[1];
- d2.setMessage("isCommunityRelay:".concat(s2)).setError(e4, o3, a3).end();
- }), s2 ? (11e3 === e4.code && (d2 = null, Ve.l("".concat(n2, " ok. community unavailable"))), Xa({ groupList: l2 })) : Za(e4);
- });
- } }, { key: "_pagingGetGroupListWithTopic", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, "._pagingGetGroupListWithTopic"), o2 = e3.limit, s2 = e3.offset, a2 = e3.groupBaseInfoFilter, i2 = e3.groupList, r2 = new Aa("pagingGetGroupListWithTopic");
- 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) {
- var u2 = e4.data, c2 = u2.groups, l2 = void 0 === c2 ? [] : c2, d2 = u2.totalCount;
- i2.push.apply(i2, m(l2));
- var p2 = s2 + o2, g2 = !(d2 > p2), h2 = "offset:".concat(s2, " totalCount:").concat(d2, " isCompleted:").concat(g2, " ") + "currentCount:".concat(i2.length);
- 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 }));
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- r2.setError(e4, o3, s3).end();
- }), Za(e4);
- });
- } }, { key: "_cacheGroupMessage", value: function(e3, t2) {
- this._cachedGroupMessageMap.has(e3) || this._cachedGroupMessageMap.set(e3, []), this._cachedGroupMessageMap.get(e3).push(t2);
- } }, { key: "_deleteCachedGroupMessage", value: function(e3) {
- this._cachedGroupMessageMap.has(e3) && this._cachedGroupMessageMap.delete(e3);
- } }, { key: "_notifyCachedGroupMessage", value: function(e3) {
- var t2 = this, n2 = this._cachedGroupMessageMap.get(e3) || [];
- n2.forEach(function(e4) {
- t2.onNewGroupMessage(e4);
- }), this._deleteCachedGroupMessage(e3), Ve.l("".concat(this._n, "._notifyCachedGroupMessage groupID:").concat(e3, " count:").concat(n2.length));
- } }, { key: "_cacheGroupMessageAndProbe", value: function(e3) {
- var t2 = this, n2 = e3.groupID, o2 = e3.event, s2 = e3.item;
- this._cacheGroupMessage(n2, { event: o2, dataList: [s2] }), this._groupModule.getGroupSimplifiedInfo(n2).then(function(e4) {
- e4.type === E.GRP_AVCHATROOM ? t2._groupModule.hasLocalGroup(n2) ? t2._notifyCachedGroupMessage(n2) : t2._groupModule.setUnjoinedAVChatRoom(n2) : (t2._groupModule.updateGroupMap([e4]), t2._notifyCachedGroupMessage(n2));
- }), this._checkCountMap.has(n2) || this._checkCountMap.set(n2, 0), Ve.l("".concat(this._n, "._cacheGroupMessageAndProbe groupID:").concat(n2));
- } }, { key: "_handleGroupAtInfoWithoutTopic", value: function(e3, n2) {
- var o2 = this;
- e3 && 0 !== n2.length && n2.forEach(function(e4) {
- var n3 = e4.groupID, s2 = e4.groupAtInfoList, a2 = [];
- it(s2) || (s2.forEach(function(e5) {
- a2.push(t(t({}, e5), {}, { groupID: n3 }));
- }), o2._groupModule.getModule(qn).onNewGroupAtTips({ dataList: a2 }));
- });
- } }, { key: "reset", value: function() {
- this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._getTopicPendingMap.clear(), this._isPagingGetCompleted = false, this._groupModule.getInnerEmitterInstance().once(ei, this._initGroupList, this);
- } }]), e2;
- }(), Ci = 1, Ti = 2, Di = 3, ki = 4, Ei = 5, Si = function() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
- var e3 = this._groupModule.getCloudConfig("grp_attr_cache_time");
- it(e3) || (this.CACHE_EXPIRE_TIME = Number(e3));
- } }, { key: "updateLocalMainSequenceOnReconnected", value: function() {
- this._groupAttributesMap.forEach(function(e3) {
- e3.localMainSequence = 0;
- });
- } }, { key: "isGroupAttributesUpdatedNotice", value: function(e3) {
- var t2 = e3.to, n2 = e3.elements.newGroupProfile, o2 = !it(n2) && !zt(n2.groupAttributeOption);
- return o2 && this._onGroupAttributesUpdated({ groupID: t2, groupAttributeOption: n2.groupAttributeOption }), o2;
- } }, { key: "_onGroupAttributesUpdated", value: function(e3) {
- 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;
- if (Ve.l("".concat(this._n, ".onGroupAttributesUpdated. ") + "groupID:".concat(n2, " isWithChangedAttributeInfo:").concat(a2, " operationType:").concat(u2)), !it(u2)) {
- this._groupAttributesCopy = this._getCachedAttributes({ groupID: n2 });
- var c2 = s2 - this._getLocalGroupAttributes(n2).localMainSequence;
- if (0 !== c2) {
- if (1 === a2 && 1 === c2)
- return this._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: s2, groupAttributeList: r2, operationType: u2 }), void this._emitGroupAttributesUpdated(n2);
- if (this._hasLocalGroupAttributes(n2)) {
- var l2 = this._getLocalGroupAttributes(n2).avChatRoomKey;
- this._getGroupAttributes({ groupID: n2, avChatRoomKey: l2 }).then(function() {
- t2._emitGroupAttributesUpdated(n2);
- });
- }
- }
- }
- } }, { key: "initGroupAttributesCache", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.avChatRoomKey, o2 = void 0 === n2 ? void 0 : n2;
- 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));
- } }, { key: "initGroupAttributes", value: function(e3) {
- var t2 = this, n2 = e3.groupID, o2 = e3.groupAttributes, s2 = this._getLocalGroupAttributes(n2), a2 = s2.remoteMainSequence, i2 = s2.avChatRoomKey, r2 = new Aa("initGroupAttributes");
- 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) {
- Ve.l("".concat(t2._n, ".").concat("initGroupAttributes", " ok. groupID:").concat(n2));
- var s3 = e4.data, a3 = s3.mainSequence, i3 = m(s3.groupAttributeList);
- return i3.forEach(function(e5) {
- e5.value = o2[e5.key];
- }), 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 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- r2.setError(e4, o3, s3).end();
- }), Za(e4);
- });
- } }, { key: "setGroupAttributes", value: function(e3) {
- 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);
- c2.forEach(function(e4) {
- var t3 = e4.key;
- e4.sequence = 0, u2.has(t3) && (e4.sequence = u2.get(t3).sequence);
- });
- var l2 = new Aa("setGroupAttributes");
- 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) {
- Ve.l("".concat(n2, " ok."));
- var a3 = e4.data, i3 = a3.mainSequence, r3 = m(a3.groupAttributeList);
- return r3.forEach(function(e5) {
- e5.value = s2[e5.key];
- }), 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 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- l2.setError(e4, o3, s3).end();
- }), Za(e4);
- });
- } }, { key: "deleteGroupAttributes", value: function(e3) {
- 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 = [];
- s2.length > 0 && (c2 = [], l2 = Ts, d2 = ki, s2.forEach(function(e4) {
- var t3 = 0;
- u2.has(e4) && (t3 = u2.get(e4).sequence, c2.push(e4)), g2.push({ key: e4, sequence: t3 });
- }), p2.groupAttributeList = g2);
- var h2 = new Aa("deleteGroupAttributes");
- 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) {
- Ve.l("".concat(t2._n, ".").concat("deleteGroupAttributes", " ok. groupID:").concat(n2));
- var o3 = e4.data.mainSequence;
- 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 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- h2.setError(e4, o3, s3).end();
- }), Za(e4);
- });
- } }, { key: "getGroupAttributes", value: function(e3) {
- 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");
- 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)
- return this._getGroupAttributes({ groupID: o2, avChatRoomKey: a2 }).then(function(s3) {
- c2.setMoreMessage("get attributes from remote. count:".concat(s3.length)).setNetworkType(t2._groupModule.getNetworkType()).end(), Ve.l("".concat(n2, " from remote. groupID:").concat(o2));
- var a3 = t2._getCachedAttributes(e3);
- return Ya({ groupAttributes: a3 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- c2.setError(e4, o3, s3).end();
- }), Za(e4);
- });
- c2.setMoreMessage("get attributes from cache").setNetworkType(this._groupModule.getNetworkType()).end(), Ve.l("".concat(n2, " from cache. groupID:").concat(o2));
- var l2 = this._getCachedAttributes(e3);
- return Xa({ groupAttributes: l2 });
- } }, { key: "_getGroupAttributes", value: function(e3) {
- var n2 = this, o2 = 0;
- return it(e3.avChatRoomKey) || (o2 = 1), this._groupModule.request({ protocolName: ks, requestData: t(t({}, e3), {}, { groupType: o2 }) }).then(function(t2) {
- Ve.l("".concat(n2._n, "._getGroupAttributes ok. groupID:").concat(e3.groupID));
- var o3 = t2.data, s2 = o3.mainSequence, a2 = o3.groupAttributeList, i2 = m(a2);
- return it(s2) || n2._refreshCachedGroupAttributes({ groupID: e3.groupID, remoteMainSequence: s2, groupAttributeList: i2, operationType: Ei }), a2;
- }).catch(function(e4) {
- return Za(e4);
- });
- } }, { key: "_refreshCachedGroupAttributes", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.remoteMainSequence, o2 = e3.groupAttributeList, s2 = e3.operationType;
- if (this._hasLocalGroupAttributes(t2)) {
- var a2 = this._getLocalGroupAttributes(t2), i2 = a2.localMainSequence;
- if (s2 === Ei || n2 - i2 == 1)
- a2.remoteMainSequence = n2, a2.localMainSequence = n2, a2.lastUpdateTime = Date.now(), this._updateCachedAttributes({ groupAttributes: a2, groupAttributeList: o2, operationType: s2 });
- else {
- if (i2 === n2)
- return;
- a2.remoteMainSequence = n2;
- }
- this._groupAttributesMap.set(t2, a2);
- var r2 = "operationType:".concat(s2, " localMainSequence:").concat(i2, " remoteMainSequence:").concat(n2);
- Ve.l("".concat(this._n, "._refreshCachedGroupAttributes. ").concat(r2));
- }
- } }, { key: "_getCachedAttributes", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.keyList, o2 = void 0 === n2 ? [] : n2, s2 = {};
- if (this._hasLocalGroupAttributes(t2)) {
- var a2 = this._getLocalGroupAttributes(t2).attributes;
- if (o2.length > 0)
- o2.forEach(function(e4) {
- a2.has(e4) && (s2[e4] = a2.get(e4).value);
- });
- else {
- var i2, r2 = D(a2.keys());
- try {
- for (r2.s(); !(i2 = r2.n()).done; ) {
- var u2 = i2.value;
- s2[u2] = a2.get(u2).value;
- }
- } catch (c2) {
- r2.e(c2);
- } finally {
- r2.f();
- }
- }
- }
- return s2;
- } }, { key: "_updateCachedAttributes", value: function(e3) {
- var t2 = e3.groupAttributes, n2 = e3.groupAttributeList, o2 = e3.operationType;
- o2 !== Di ? o2 !== ki ? (o2 === Ci && t2.attributes.clear(), n2.forEach(function(e4) {
- var n3 = e4.key, o3 = e4.value, s2 = e4.sequence;
- t2.attributes.set(n3, { value: o3, sequence: s2 });
- })) : n2.forEach(function(e4) {
- t2.attributes.delete(e4.key);
- }) : t2.attributes.clear();
- } }, { key: "_hasLocalGroupAttributes", value: function(e3) {
- return this._groupAttributesMap.has(e3);
- } }, { key: "_getLocalGroupAttributes", value: function(e3) {
- return this._hasLocalGroupAttributes(e3) || this.initGroupAttributesCache({ groupID: e3 }), this._groupAttributesMap.get(e3);
- } }, { key: "_transformGroupAttributes", value: function(e3) {
- var t2 = [];
- return Object.keys(e3).forEach(function(n2) {
- t2.push({ key: n2, value: e3[n2] });
- }), t2;
- } }, { key: "_emitGroupAttributesUpdated", value: function(e3) {
- var t2 = this._getCachedAttributes({ groupID: e3 }), n2 = this._computeAttrChangedInfo(t2), o2 = n2.updatedKeyList, s2 = n2.deletedKeyList;
- 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 });
- } }, { key: "_computeAttrChangedInfo", value: function(e3) {
- var t2 = this, n2 = [], o2 = [];
- return Object.keys(e3).forEach(function(o3) {
- e3[o3] !== t2._groupAttributesCopy[o3] && n2.push(o3);
- }), Object.keys(this._groupAttributesCopy).forEach(function(t3) {
- it(e3[t3]) && o2.push(t3);
- }), this._groupAttributesCopy = {}, { updatedKeyList: n2, deletedKeyList: o2 };
- } }, { key: "deleteLocalGroupAttributes", value: function(e3) {
- this._hasLocalGroupAttributes(e3) && this._groupAttributesMap.delete(e3);
- } }, { key: "reset", value: function() {
- this._groupAttributesMap.clear(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4;
- } }]), e2;
- }(), Li = "Set", Ai = "Increase", Ri = "Decrease", Ni = function() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
- var e3 = this._groupModule.getCloudConfig("grp_counter_expire_time");
- it(e3) || (this.EXPIRE_TIME = Number(e3));
- } }, { key: "isGroupCountersNotice", value: function(e3) {
- var t2 = e3.to, n2 = e3.elements.groupCounterInfo, o2 = false;
- return zt(n2) || (this._onGroupCountersUpdated({ groupID: t2, groupCounterInfo: n2 }), o2 = true), o2;
- } }, { key: "_onGroupCountersUpdated", value: function(e3) {
- var t2 = this, n2 = e3.groupID;
- e3.groupCounterInfo.forEach(function(e4) {
- var o2 = e4.type, s2 = e4.groupCounterSeq, a2 = e4.counterList, i2 = void 0 === a2 ? [] : a2;
- 0 !== o2 && 2 !== o2 || (t2._updateLocalGroupCounters({ groupID: n2, groupCounterSeq: s2, counterList: i2 }), i2.forEach(function(e5) {
- t2._groupModule.emitOuterEvent(k.GROUP_COUNTER_UPDATED, { groupID: n2, key: e5.key, value: e5.value });
- })), 1 === o2 && t2._deleteLocalGroupCounters({ groupID: n2, groupCounterSeq: s2, counterList: i2 });
- }), Ve.l("".concat(this._n, "._onGroupCountersUpdated groupID:").concat(n2));
- } }, { key: "initGroupCountersCache", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.avChatRoomKey;
- 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));
- } }, { key: "setGroupCounters", value: function(e3) {
- var t2 = this;
- if (!this._groupModule.canIUse(B.GRP_COUNTER))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- 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");
- return u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2)), this._updateGroupCounters({ groupID: o2, counterList: a2, avChatRoomKey: i2, mode: Li }).then(function(e4) {
- return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- u2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "increaseGroupCounter", value: function(e3) {
- var t2 = this;
- if (!this._groupModule.canIUse(B.GRP_COUNTER))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- 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");
- u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2));
- var c2 = [{ key: s2, value: a2 }];
- return this._updateGroupCounters({ groupID: o2, counterList: c2, avChatRoomKey: i2, mode: Ai }).then(function(e4) {
- return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- u2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "decreaseGroupCounter", value: function(e3) {
- var t2 = this;
- if (!this._groupModule.canIUse(B.GRP_COUNTER))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- 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");
- u2.setMessage("".concat(r2)), Ve.l("".concat(n2, ". ").concat(r2));
- var c2 = [{ key: s2, value: a2 }];
- return this._updateGroupCounters({ groupID: o2, counterList: c2, avChatRoomKey: i2, mode: Ri }).then(function(e4) {
- return u2.end(), Ve.l("".concat(n2, " ok.")), Ya({ counters: e4 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- u2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getGroupCounters", value: function(e3) {
- var t2 = this;
- if (!this._groupModule.canIUse(B.GRP_COUNTER))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- 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");
- if (c2.setMessage("groupID:".concat(o2)), Date.now() - u2 >= this.EXPIRE_TIME)
- return this._getRemoteGroupCounters({ groupID: o2, avChatRoomKey: r2 }).then(function(e4) {
- c2.setMoreMessage("from remote. count:".concat(e4.length)).end(), Ve.l("".concat(n2, " from remote. groupID:").concat(o2));
- var s3 = t2._getLocalCounters(o2, a2);
- return Ya({ counters: s3 });
- }).catch(function(e4) {
- return t2._groupModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- c2.setError(e4, o3, s3).end();
- }), Za(e4);
- });
- c2.setMoreMessage("from cache").end(), Ve.l("".concat(n2, " from cache. groupID:").concat(o2));
- var l2 = this._getLocalCounters(o2, a2);
- return Xa({ counters: l2 });
- } }, { key: "_getRemoteGroupCounters", value: function(e3) {
- var n2 = this;
- return this._groupModule.request({ protocolName: Rs, requestData: t({}, e3) }).then(function(t2) {
- var o2 = t2.data, s2 = o2.counterList, a2 = void 0 === s2 ? [] : s2, i2 = o2.groupCounterSeq;
- return n2._updateLocalGroupCounters({ groupID: e3.groupID, counterList: a2, groupCounterSeq: i2 }), Ve.l("".concat(n2._n, "._getRemoteGroupCounters ok. groupID:").concat(e3.groupID)), a2;
- }).catch(function(e4) {
- return Za(e4);
- });
- } }, { key: "_convertObjectToList", value: function(e3) {
- var t2 = [];
- return Object.keys(e3).forEach(function(n2) {
- t2.push({ key: n2, value: e3[n2] });
- }), t2;
- } }, { key: "_updateGroupCounters", value: function(e3) {
- var n2 = "".concat(this._n, "._updateGroupCounters"), o2 = e3.groupID, s2 = e3.avChatRoomKey, a2 = e3.mode;
- 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) {
- Ve.l("".concat(n2, " ok."));
- var t2 = e4.data.counterList, o3 = {};
- return (void 0 === t2 ? [] : t2).forEach(function(e5) {
- var t3 = e5.key, n3 = e5.value;
- o3[t3] = n3;
- }), o3;
- }).catch(function(e4) {
- return Za(e4);
- });
- } }, { key: "_hasLocalGroupCounters", value: function(e3) {
- return this._groupCountersMap.has(e3);
- } }, { key: "_getLocalGroupCounters", value: function(e3) {
- return this._hasLocalGroupCounters(e3) || this.initGroupCountersCache({ groupID: e3 }), this._groupCountersMap.get(e3);
- } }, { key: "_updateLocalGroupCounters", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.counterList, o2 = void 0 === n2 ? [] : n2, s2 = e3.groupCounterSeq;
- if (this._hasLocalGroupCounters(t2)) {
- var a2 = this._getLocalGroupCounters(t2), i2 = a2.counters, r2 = a2.avChatRoomKey, u2 = a2.groupCounterSeq;
- if (s2 > 0 && s2 < u2)
- return;
- o2.forEach(function(e4) {
- var t3 = e4.key, n3 = e4.value;
- i2.set(t3, n3);
- }), this._groupCountersMap.set(t2, { lastUpdateTime: Date.now(), groupCounterSeq: s2, counters: i2, avChatRoomKey: r2 });
- }
- } }, { key: "_deleteLocalGroupCounters", value: function(e3) {
- var t2 = e3.groupID, n2 = e3.counterList, o2 = void 0 === n2 ? [] : n2, s2 = e3.groupCounterSeq;
- if (this._hasLocalGroupCounters(t2)) {
- var a2 = this._getLocalGroupCounters(t2), i2 = a2.counters, r2 = a2.avChatRoomKey;
- o2.forEach(function(e4) {
- i2.delete(e4.key);
- }), this._groupCountersMap.set(t2, { lastUpdateTime: Date.now(), groupCounterSeq: s2, counters: i2, avChatRoomKey: r2 });
- }
- } }, { key: "_getLocalCounters", value: function(e3, t2) {
- var n2 = {};
- if (!this._hasLocalGroupCounters(e3))
- return n2;
- var o2 = this._getLocalGroupCounters(e3).counters;
- if (t2.length > 0)
- t2.forEach(function(e4) {
- o2.has(e4) && (n2[e4] = o2.get(e4));
- });
- else {
- var s2, a2 = D(o2.keys());
- try {
- for (a2.s(); !(s2 = a2.n()).done; ) {
- var i2 = s2.value;
- n2[i2] = o2.get(i2);
- }
- } catch (r2) {
- a2.e(r2);
- } finally {
- a2.f();
- }
- }
- return n2;
- } }, { key: "reset", value: function() {
- this._groupCountersMap.clear(), this.EXPIRE_TIME = 3e4;
- } }]), e2;
- }(), Oi = function() {
- function e2(t2) {
- o(this, e2);
- var n2 = t2.manager, s2 = t2.groupID, a2 = t2.onInit, i2 = t2.onSuccess, r2 = t2.onFail;
- 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;
- }
- return a(e2, [{ key: "start", value: function() {
- var e3 = this._groupModule.isLoggedIn();
- e3 || (this._protocolName = vs), Ve.l("".concat(this._n, ".start pollingInterval:").concat(this._manager.getPollingInterval(), " isLoggedIn:").concat(e3)), this._isRunning = true, this._request();
- } }, { key: "isRunning", value: function() {
- return this._isRunning;
- } }, { key: "_request", value: function() {
- var e3 = this, t2 = this._onInit(this._groupID);
- this._groupModule.request({ protocolName: this._protocolName, requestData: t2 }).then(function(t3) {
- e3._onSuccess(e3._groupID, t3), e3.isRunning() && (clearTimeout(e3._timeoutID), e3._timeoutID = setTimeout(e3._request.bind(e3), e3._manager.getPollingInterval()));
- }).catch(function(t3) {
- e3._onFail(e3._groupID, t3), e3.isRunning() && (clearTimeout(e3._timeoutID), e3._timeoutID = setTimeout(e3._request.bind(e3), e3._manager.MAX_POLLING_INTERVAL));
- });
- } }, { key: "stop", value: function() {
- Ve.l("".concat(this._n, ".stop")), this._timeoutID > 0 && (clearTimeout(this._timeoutID), this._timeoutID = -1), this._isRunning = false;
- } }, { key: "getPollingTimerID", value: function() {
- return this._timeoutID;
- } }]), e2;
- }(), Gi = { 3: true, 4: true, 5: true, 6: true, 17: true }, Ui = function() {
- function e2(t2) {
- 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;
- }
- return a(e2, [{ key: "hasJoinedAVChatRoom", value: function() {
- return this._joinedGroupMap.size > 0;
- } }, { key: "checkJoinedAVChatRoomByID", value: function(e3) {
- return this._joinedGroupMap.has(e3);
- } }, { key: "getJoinedAVChatRoom", value: function() {
- return this._joinedGroupMap.size > 0 ? m(this._joinedGroupMap.keys()) : null;
- } }, { key: "_updateRequestData", value: function(e3) {
- var n2 = this._pollingRequestInfoMap.get(e3);
- 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 });
- } }, { key: "_handleSuccess", value: function(e3, t2) {
- var n2 = t2.data, o2 = n2.key, s2 = n2.nextSeq, a2 = n2.rspMsgList, i2 = n2.errorCode, r2 = n2.nextBroadcastSeq, u2 = n2.broadcastMessageList;
- if (0 !== i2) {
- var c2 = this._pollingRequestInfoMap.get(e3), l2 = new Aa("longPollingAVError"), d2 = c2 ? "".concat(c2.key, "-").concat(c2.startSeq) : "requestInfo is undefined";
- l2.setMessage("".concat(e3, "-").concat(d2, "-").concat(t2.errorInfo)).setCode(t2.errorCode).setNetworkType(this._groupModule.getNetworkType()).end(true);
- } else {
- if (!this.checkJoinedAVChatRoomByID(e3))
- return;
- 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) {
- e4.to = e4.groupID;
- }), 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);
- }
- } }, { key: "_handleFailure", value: function(e3, t2) {
- } }, { key: "onMessage", value: function(e3) {
- if (at(e3) && 0 !== e3.length) {
- 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL);
- var t2 = null, n2 = [], o2 = this._getModule(qn), s2 = this._getModule(eo), a2 = e3.length;
- a2 > 1 && e3.sort(function(e4, t3) {
- return e4.sequence - t3.sequence;
- });
- for (var i2 = this._getModule(xn), r2 = 0; r2 < a2; r2++) {
- var u2 = this.restoreMessageFromSimplified(e3[r2]);
- if (Gi[u2.event]) {
- if (6 === u2.event) {
- if (this._groupModule.isGroupAttributesUpdatedNotice(u2))
- continue;
- if (this._groupModule.isGroupCountersNotice(u2))
- continue;
- }
- this.receivedMessageCount += 1, t2 = this.packMessage(u2, u2.event);
- var c2 = 1 === u2.isModified, l2 = 1 === u2.isHistoryMessage;
- if ((i2.isUnlimitedAVChatRoom() || !this.sequencesLinkedList.has(t2.sequence)) && !this.messageIDLinkedList.has(t2.ID)) {
- var d2 = t2.conversationID;
- 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()) {
- var p2 = this.sequencesLinkedList.tail().value, g2 = t2.sequence - p2;
- 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);
- }
- this.sequencesLinkedList.set(t2.sequence), this.messageIDLinkedList.set(t2.ID);
- var h2 = false;
- if (this._isMessageSentByCurrentInstance(t2) ? c2 && (h2 = true, t2.isModified = c2, o2.updateMessageIsModifiedProperty(t2)) : h2 = true, h2) {
- if (t2.conversationType === E.CONV_SYSTEM && 5 === t2.payload.operationType && this._onGroupDismissed(t2.payload.groupProfile.groupID), !l2 && t2.conversationType !== E.CONV_SYSTEM) {
- var _2 = t2.conversationID.replace(E.CONV_GROUP, "");
- 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 }));
- }
- n2.push(t2);
- }
- }
- } else
- Ve.w("".concat(this._n, ".onMessage unknown event:").concat(u2.event));
- }
- if (0 !== n2.length) {
- this._groupModule.filterModifiedMessage(n2);
- var f2 = this.packConversationOption(n2);
- if (f2.length > 0)
- this._getModule(qn).onNewMessage({ conversationOptionsList: f2, isInstantMessage: true });
- Ve.d("".concat(this._n, ".onMessage count:").concat(n2.length)), this._checkMessageStacked(n2);
- var v2 = this._groupModule.filterUnmodifiedMessage(n2);
- v2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, v2), n2.length = 0;
- }
- }
- } }, { key: "isBroadcastOrNormal", value: function(e3) {
- return 3 === e3 || 17 === e3;
- } }, { key: "isGroupTip", value: function(e3) {
- return 4 === e3 || 6 === e3;
- } }, { key: "isGroupSystemNotice", value: function(e3) {
- return 5 === e3;
- } }, { key: "restoreGroupTipElements", value: function() {
- var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- e3.groupJoinType || (e3.groupJoinType = 1);
- 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;
- e3.operatorInfo = { userID: r2, avatar: c2, nick: d2 };
- var p2 = a2.map(function(e4) {
- return { userID: e4 };
- });
- return e3.memberInfoList = e3.memberInfoList || p2, e3;
- } }, { key: "restoreMessageFromSimplified", value: function(e3) {
- var n2 = e3.event;
- if (this.isBroadcastOrNormal(n2) && (e3.cloudCustomData = e3.cloudCustomData || "", e3.elements = e3.elements.map(function(e4) {
- if (e4.type === E.MSG_CUSTOM) {
- var n3 = e4.content, o3 = void 0 === n3 ? {} : n3;
- e4.content = t({ data: "", description: "", extension: "" }, o3);
- }
- return e4;
- })), (this.isGroupTip(n2) || this.isGroupSystemNotice(n2)) && (e3.from = e3.from || "@TIM#SYSTEM"), this.isGroupTip(n2)) {
- e3.elements = this.restoreGroupTipElements(e3.elements);
- var o2 = e3.elements, s2 = void 0 === o2 ? {} : o2, a2 = s2.operationType, r2 = s2.operatorInfo;
- if (1 === a2) {
- var u2 = [{ userID: (void 0 === r2 ? {} : r2).userID }];
- s2.memberInfoList = s2.memberInfoList || u2;
- }
- }
- if (this.isGroupSystemNotice(n2)) {
- var c2 = e3.elements, l2 = c2.memberInfoList, d2 = c2.operatorInfo;
- 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);
- var p2 = Object.keys(e3.elements).filter(function(e4) {
- return "operatorInfo" !== e4;
- }).reduce(function(n3, o3) {
- return t(t({}, n3), {}, i({}, o3, e3.elements[o3]));
- }, {});
- e3.elements = p2;
- }
- return e3;
- } }, { key: "_onGroupDismissed", value: function(e3) {
- Ve.l("".concat(this._n, "._onGroupDismissed groupID:").concat(e3)), this._groupModule.deleteLocalGroupAndConversation(e3), this.reset(e3);
- } }, { key: "_checkMessageStacked", value: function(e3) {
- var t2 = "MessageStacked", n2 = e3.length;
- 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));
- } }, { key: "_isMessageSentByCurrentInstance", value: function(e3) {
- return !!this._getModule(qn).isMessageSentByCurrentInstance(e3);
- } }, { key: "packMessage", value: function(e3, t2) {
- e3.currentUser = this._groupModule.getMyUserID(), e3.conversationType = 5 === t2 ? E.CONV_SYSTEM : E.CONV_GROUP, e3.isSystemMessage = !!e3.isSystemMessage;
- var n2 = new Wa(e3), o2 = this.packElements(e3, t2);
- return n2.setElement(o2, this._groupModule.getFileDownloadProxy()), n2;
- } }, { key: "packElements", value: function(e3, n2) {
- 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);
- } }, { key: "packConversationOption", value: function(e3) {
- for (var t2 = /* @__PURE__ */ new Map(), n2 = 0; n2 < e3.length; n2++) {
- var o2 = e3[n2], s2 = o2.conversationID;
- if (t2.has(s2)) {
- var a2 = t2.get(s2);
- a2.lastMessage = o2, "in" === o2.flow && a2.unreadCount++;
- } else
- t2.set(s2, { conversationID: o2.conversationID, unreadCount: "out" === o2.flow ? 0 : 1, type: o2.conversationType, subType: o2.conversationSubType, lastMessage: o2 });
- }
- return m(t2.values());
- } }, { key: "_updateMemberCountByGroupTips", value: function(e3) {
- var t2 = e3.groupProfile.groupID, n2 = e3.elements.onlineMemberInfo, o2 = void 0 === n2 ? void 0 : n2;
- if (!zt(o2)) {
- 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();
- 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);
- }
- } }, { key: "_onBroadcastMessage", value: function(e3) {
- if (!zt(e3)) {
- for (var t2 = [], n2 = e3.length, o2 = null, s2 = 0; s2 < n2; s2++) {
- var a2 = this.restoreMessageFromSimplified(e3[s2]);
- 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));
- }
- t2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, t2);
- }
- } }, { key: "start", value: function(e3) {
- if (this._pollingInstanceMap.has(e3)) {
- var t2 = this._pollingInstanceMap.get(e3);
- t2.isRunning() || t2.start();
- } else {
- var n2 = new Oi({ manager: this, groupID: e3, onInit: this._updateRequestData.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) });
- n2.start(), this._pollingInstanceMap.set(e3, n2), Ve.l("".concat(this._n, ".start groupID:").concat(e3));
- }
- } }, { key: "handleJoinResult", value: function(e3) {
- var t2 = this;
- return this._preCheck().then(function() {
- var n2 = e3.longPollingKey, o2 = e3.group, s2 = o2.groupID;
- 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();
- });
- } }, { key: "startRunLoop", value: function(e3) {
- var t2 = this;
- return this.handleJoinResult(e3).then(function() {
- var n2 = e3.longPollingKey, o2 = e3.group, s2 = e3.startSeq, a2 = void 0 === s2 ? 0 : s2, i2 = o2.groupID;
- return t2._pollingRequestInfoMap.set(i2, { key: n2, startSeq: a2 }), t2.start(i2), t2._groupModule.isLoggedIn() ? Xa({ status: je, group: o2 }) : Xa({ status: je });
- });
- } }, { key: "_preCheck", value: function() {
- if (this._getModule(xn).isUnlimitedAVChatRoom())
- return Promise.resolve();
- if (!this.hasJoinedAVChatRoom())
- return Promise.resolve();
- var e3 = v(this._joinedGroupMap.entries().next().value, 2), t2 = e3[0], n2 = e3[1];
- if (this._groupModule.isLoggedIn()) {
- if (!(n2.selfInfo.role === E.GRP_MBR_ROLE_OWNER || n2.ownerID === this._groupModule.getMyUserID()))
- return this._groupModule.quitGroup(t2);
- this._groupModule.deleteLocalGroupAndConversation(t2);
- } else
- this._groupModule.deleteLocalGroupAndConversation(t2);
- return this.reset(t2), Promise.resolve();
- } }, { key: "joinWithoutAuth", value: function(e3) {
- var t2 = this, n2 = e3.groupID, o2 = "".concat(this._n, ".").concat("joinWithoutAuth"), s2 = new Aa("joinWithoutAuth");
- return this._groupModule.request({ protocolName: $o, requestData: e3 }).then(function(e4) {
- var a2 = e4.data.longPollingKey;
- if (t2._groupModule.probeNetwork().then(function(e5) {
- var t3 = v(e5, 2);
- t3[0];
- var o3 = t3[1];
- s2.setNetworkType(o3).setMessage("groupID:".concat(n2, " longPollingKey:").concat(a2)).end(true);
- }), it(a2))
- return Za({ code: ha.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN });
- Ve.l("".concat(o2, " ok. groupID:").concat(n2)), t2._getModule(qn).setCompleted("".concat(E.CONV_GROUP).concat(n2));
- var i2 = new hi({ groupID: n2 });
- return t2.startRunLoop({ group: i2, longPollingKey: a2 }), Ya({ status: je });
- }).catch(function(e4) {
- return Ve.e("".concat(o2, " failed. groupID:").concat(n2, " error:"), e4), t2._groupModule.probeNetwork().then(function(t3) {
- var o3 = v(t3, 2), a2 = o3[0], i2 = o3[1];
- s2.setError(e4, a2, i2).setMessage("groupID:".concat(n2)).end(true);
- }), Za(e4);
- }).finally(function() {
- t2._groupModule.getModule(Bn).reportAtOnce();
- });
- } }, { key: "getGroupOnlineMemberCount", value: function(e3) {
- var t2 = this._onlineMemberCountMap.get(e3) || {}, n2 = Date.now();
- 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) {
- return Ya({ memberCount: e4.memberCount });
- }).catch(function(e4) {
- return Za(e4);
- })) : Xa({ memberCount: t2.memberCount });
- } }, { key: "_getGroupOnlineMemberCount", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".").concat("_getGroupOnlineMemberCount");
- return this._groupModule.request({ protocolName: ms, requestData: { groupID: e3 } }).then(function(o2) {
- 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;
- Ve.l("".concat(n2, " ok. groupID:").concat(e3, " memberCount:").concat(r2, " expireTime:").concat(c2));
- var l2 = Date.now();
- return zt(s2) && (s2.lastReqTime = l2), t2._onlineMemberCountMap.set(e3, Object.assign(s2, { lastSyncTime: l2, latestUpdateTime: l2, memberCount: r2, expireTime: c2 })), { memberCount: r2 };
- }).catch(function(o2) {
- 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);
- });
- } }, { key: "_getModule", value: function(e3) {
- return this._groupModule.getModule(e3);
- } }, { key: "setPollingInterval", value: function(e3) {
- it(e3) || (et(e3) ? this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = e3 : this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = parseInt(e3, 10));
- } }, { key: "setPollingIntervalPlus", value: function(e3) {
- it(e3) || (et(e3) ? this.DEFAULT_POLLING_INTERVAL_PLUS = e3 : this.DEFAULT_POLLING_INTERVAL_PLUS = parseInt(e3, 10));
- } }, { key: "setPollingNoMessageCount", value: function(e3) {
- it(e3) || (et(e3) ? this.DEFAULT_POLLING_NO_MESSAGE_COUNT = e3 : this.DEFAULT_POLLING_NO_MESSAGE_COUNT = parseInt(e3, 10));
- } }, { key: "setPollingSimplifiedMessage", value: function(e3) {
- it(e3) || "0" !== e3 && "1" !== e3 || (this.DEFAULT_POLLING_SIMPLIFIED_MSG = parseInt(e3, 10));
- } }, { key: "getPollingInterval", value: function() {
- return this._pollingInterval;
- } }, { key: "onAVChatRoomMemberBanned", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID;
- Ve.l("".concat(this._n, ".onAVChatRoomMemberBanned groupID:").concat(t2)), this._groupModule.deleteLocalGroupAndConversation(t2), this.reset(t2);
- } }, { key: "restartPolling", value: function() {
- Ve.l("".concat(this._n, ".restartPolling count:").concat(this._pollingInstanceMap.size));
- var e3, t2 = D(this._pollingInstanceMap.values());
- try {
- for (t2.s(); !(e3 = t2.n()).done; ) {
- var n2 = e3.value;
- n2.stop(), n2.start();
- }
- } catch (o2) {
- t2.e(o2);
- } finally {
- t2.f();
- }
- } }, { key: "getPollingTimerID", value: function(e3) {
- if (!this._pollingInstanceMap.has(e3))
- return -1;
- var t2 = this._pollingInstanceMap.get(e3).getPollingTimerID();
- return Ve.l("".concat(this._n, ".getPollingTimerID groupID:").concat(e3, " timerID:").concat(t2)), t2;
- } }, { key: "reset", value: function(e3) {
- if (e3) {
- Ve.l("".concat(this._n, ".reset groupID:").concat(e3));
- var t2 = this._pollingInstanceMap.get(e3);
- t2 && t2.stop(), this._pollingInstanceMap.delete(e3), this._joinedGroupMap.delete(e3), this._pollingRequestInfoMap.delete(e3), this._onlineMemberCountMap.delete(e3);
- } else {
- Ve.l("".concat(this._n, ".reset all"));
- var n2, o2 = D(this._pollingInstanceMap.values());
- try {
- for (o2.s(); !(n2 = o2.n()).done; ) {
- n2.value.stop();
- }
- } catch (s2) {
- o2.e(s2);
- } finally {
- o2.f();
- }
- this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this._pollingRequestInfoMap.clear(), this._onlineMemberCountMap.clear(), this._broadcastMessageIDMap.clear();
- }
- 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;
- } }]), e2;
- }(), Pi = 1, bi = 15, wi = function() {
- function e2(t2) {
- o(this, e2), this._groupModule = t2, this._n = "GroupSystemNoticeHandler", this.pendencyMap = /* @__PURE__ */ new Map();
- }
- return a(e2, [{ key: "onNewGroupSystemNotice", value: function(e3) {
- var t2 = e3.dataList, n2 = e3.isSyncingEnded, o2 = e3.isInstantMessage;
- Ve.d("".concat(this._n, ".onReceiveSystemNotice count:").concat(t2.length));
- var s2 = this.newSystemNoticeStoredAndSummary({ notifiesList: t2, isInstantMessage: o2 }), a2 = s2.eventDataList, i2 = s2.result;
- a2.length > 0 && (this._groupModule.getModule(qn).onNewMessage({ conversationOptionsList: a2, isInstantMessage: o2 }), this._onReceivedGroupSystemNotice({ result: i2, isInstantMessage: o2 }));
- o2 ? i2.length > 0 && this._groupModule.emitOuterEvent(k.MESSAGE_RECEIVED, i2) : true === n2 && this._clearGroupSystemNotice();
- } }, { key: "newSystemNoticeStoredAndSummary", value: function(e3) {
- 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 };
- for (i2 = 0; i2 < a2; i2++) {
- 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;
- if (!(2 !== p2 || zt(h2) && zt(v2))) {
- if ([17, 18, 20].includes(m2)) {
- this._handleTopicSystemNotice(c2);
- continue;
- }
- zt(h2) || (c2.to = h2);
- }
- if (c2.elements.operationType !== bi)
- 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);
- }
- return u2.lastMessage = r2[r2.length - 1], { eventDataList: r2.length > 0 ? [u2] : [], result: r2 };
- } }, { key: "_clearGroupSystemNotice", value: function() {
- var e3 = this;
- this._getPendencyList().then(function(t2) {
- t2.forEach(function(t3) {
- e3.pendencyMap.set("".concat(t3.from, "_").concat(t3.groupID, "_").concat(t3.to), t3);
- });
- var n2 = e3._groupModule.getModule(qn).getLocalMessageList(E.CONV_SYSTEM), o2 = [];
- n2.forEach(function(t3) {
- var n3 = t3.payload, s2 = n3.operatorID, a2 = n3.operationType, i2 = n3.groupProfile;
- if (a2 === Pi) {
- var r2 = "".concat(s2, "_").concat(i2.groupID, "_").concat(i2.to), u2 = e3.pendencyMap.get(r2);
- u2 && et(u2.handled) && 0 !== u2.handled && o2.push(t3);
- }
- }), e3.deleteGroupSystemNotice({ messageList: o2 });
- });
- } }, { key: "deleteGroupSystemNotice", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".deleteGroupSystemNotice");
- return at(e3.messageList) && 0 !== e3.messageList.length ? (Ve.l("".concat(n2, " ") + e3.messageList.map(function(e4) {
- return e4.ID;
- })), this._groupModule.request({ protocolName: _s, requestData: { messageListToDelete: e3.messageList.map(function(e4) {
- return { from: E.CONV_SYSTEM, messageSeq: e4.clientSequence, messageRandom: e4.random };
- }) } }).then(function() {
- Ve.l("".concat(n2, " ok"));
- var o2 = t2._groupModule.getModule(qn);
- return e3.messageList.forEach(function(e4) {
- o2.deleteLocalMessage(e4);
- }), Ya();
- }).catch(function(e4) {
- return Ve.e("".concat(n2, " error:"), e4), Za(e4);
- })) : Xa();
- } }, { key: "_getPendencyList", value: function() {
- 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;
- return this._groupModule.request({ protocolName: hs, requestData: { type: o2, startTime: a2, limit: r2, handleAccount: this._groupModule.getMyUserID() } }).then(function(t3) {
- var n3 = t3.data.pendencyList;
- return 0 !== t3.data.nextStartTime ? e3._getPendencyList({ startTime: t3.data.nextStartTime }).then(function(e4) {
- return [].concat(m(n3), m(e4));
- }) : n3;
- });
- } }, { key: "getGroupApplicationList", value: function() {
- var e3 = this;
- return this._getPendencyList().then(function(t2) {
- return e3._getPendencyList({ type: E.GRP_COMMUNITY }).then(function(n2) {
- return t2.push.apply(t2, m(n2)), e3._handlePendencyResult(t2);
- }).catch(function(n2) {
- return e3._handlePendencyResult(t2);
- });
- });
- } }, { key: "_handlePendencyResult", value: function(e3) {
- var t2 = this, n2 = [];
- return e3.forEach(function(e4) {
- 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 });
- }), Xa({ applicationList: n2 });
- } }, { key: "_onReceivedGroupSystemNotice", value: function(e3) {
- var t2 = this, n2 = e3.result;
- e3.isInstantMessage && n2.forEach(function(e4) {
- switch (e4.payload.operationType) {
- case 1:
- break;
- case 2:
- t2._onApplyGroupRequestAgreed(e4);
- break;
- case 3:
- break;
- case 4:
- t2._onMemberKicked(e4);
- break;
- case 5:
- t2._onGroupDismissed(e4);
- break;
- case 6:
- break;
- case 7:
- t2._onInviteGroup(e4);
- break;
- case 8:
- t2._onQuitGroup(e4);
- break;
- case 9:
- t2._onSetManager(e4);
- break;
- case 10:
- t2._onDeleteManager(e4);
- break;
- case 11:
- case 12:
- case 15:
- break;
- case 20:
- t2._onMessageRemindTypeSynced(e4);
- break;
- case 21:
- t2._groupModule.onAVChatRoomMemberBanned(e4);
- }
- });
- } }, { key: "_onApplyGroupRequestAgreed", value: function(e3) {
- var t2 = this, n2 = e3.payload.groupProfile.groupID;
- this._groupModule.hasLocalGroup(n2) || this._groupModule.getGroupProfile({ groupID: n2 }).then(function(e4) {
- var n3 = e4.data.group;
- if (n3) {
- t2._groupModule.updateGroupMap([n3]);
- var o2 = !n3.isSupportTopic;
- t2._groupModule.emitGroupListUpdate(true, o2);
- }
- });
- } }, { key: "_onMemberKicked", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID;
- this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2);
- } }, { key: "_onGroupDismissed", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID;
- this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2);
- var n2 = this._groupModule._AVChatRoomHandler;
- n2 && n2.checkJoinedAVChatRoomByID(t2) && n2.reset(t2);
- } }, { key: "_onInviteGroup", value: function(e3) {
- var t2 = this, n2 = e3.payload.groupProfile.groupID;
- this._groupModule.hasLocalGroup(n2) || this._groupModule.getGroupProfile({ groupID: n2 }).then(function(e4) {
- var n3 = e4.data.group;
- n3 && (t2._groupModule.updateGroupMap([n3]), t2._groupModule.emitGroupListUpdate());
- });
- } }, { key: "_onQuitGroup", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID;
- this._groupModule.hasLocalGroup(t2) && this._groupModule.deleteLocalGroupAndConversation(t2);
- } }, { key: "_onSetManager", value: function(e3) {
- var t2 = e3.payload.groupProfile, n2 = t2.to, o2 = t2.groupID, s2 = this._groupModule.getModule(wn).getLocalGroupMemberInfo(o2, n2);
- s2 && s2.updateRole(E.GRP_MBR_ROLE_ADMIN);
- } }, { key: "_onDeleteManager", value: function(e3) {
- var t2 = e3.payload.groupProfile, n2 = t2.to, o2 = t2.groupID, s2 = this._groupModule.getModule(wn).getLocalGroupMemberInfo(o2, n2);
- s2 && s2.updateRole(E.GRP_MBR_ROLE_MEMBER);
- } }, { key: "_onMessageRemindTypeSynced", value: function(e3) {
- var t2 = e3.payload.groupProfile.groupID, n2 = e3.payload.messageRemindType;
- this._groupModule.getModule(qn).onGroupMessageRemindTypeSynced({ groupID: t2, messageRemindType: n2 });
- } }, { key: "_handleTopicSystemNotice", value: function(e3) {
- 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);
- 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 });
- } }, { key: "reset", value: function() {
- this.pendencyMap.clear();
- } }]), e2;
- }(), Fi = ["relayFlag"], qi = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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;
- }
- return a(s2, [{ key: "_onCloudConfigUpdated", value: function() {
- 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");
- 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));
- } }, { key: "onCheckTimer", value: function(e3) {
- this.isLoggedIn() && (this._commonGroupHandler.onCheckTimer(e3), this._groupTipsHandler.onCheckTimer(e3));
- } }, { key: "guardForAVChatRoom", value: function(e3) {
- var t2 = this;
- if (e3.conversationType === E.CONV_GROUP) {
- var n3 = kt(e3.to) ? xt(e3.to) : e3.to;
- return this.hasLocalGroup(n3) ? Xa() : this.getGroupProfile({ groupID: n3 }).then(function(o2) {
- var s3 = o2.data.group.type;
- if (Ve.l("".concat(t2._n, ".guardForAVChatRoom. groupID:").concat(n3, " type:").concat(s3)), s3 === E.GRP_AVCHATROOM) {
- var a2 = ha.MESSAGE_SEND_FAIL_NOT_IN_AVCHATROOM;
- return Za(new ja({ code: a2, message: t2.getErrorMessage(a2, e3.from, n3), data: { message: e3 } }));
- }
- return Xa();
- });
- }
- return Xa();
- } }, { key: "checkJoinedAVChatRoomByID", value: function(e3) {
- return !!this._AVChatRoomHandler && this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3);
- } }, { key: "onNewGroupMessage", value: function(e3) {
- this._commonGroupHandler && this._commonGroupHandler.onNewGroupMessage(e3);
- } }, { key: "updateNextMessageSeq", value: function(e3) {
- var t2 = this;
- if (at(e3)) {
- var n3 = this.getModule(Fn);
- e3.forEach(function(e4) {
- var o2 = e4.conversationID.replace(E.CONV_GROUP, "");
- kt(o2) && n3.updateLastMessage(o2, e4.lastMessage), t2.groupMap.has(o2) && (t2.groupMap.get(o2).nextMessageSeq = e4.lastMessage.sequence + 1);
- });
- }
- } }, { key: "onNewGroupTips", value: function(e3) {
- this._groupTipsHandler && this._groupTipsHandler.onNewGroupTips(e3);
- } }, { key: "onGroupMessageRevoked", value: function(e3) {
- this._commonGroupHandler && this._commonGroupHandler.onGroupMessageRevoked(e3);
- } }, { key: "onNewGroupSystemNotice", value: function(e3) {
- this._groupSystemNoticeHandler && this._groupSystemNoticeHandler.onNewGroupSystemNotice(e3);
- } }, { key: "onGroupMessageReadNotice", value: function(e3) {
- var t2 = this;
- e3.dataList.forEach(function(e4) {
- var n3 = e4.elements.groupMessageReadNotice;
- if (!it(n3)) {
- var o2 = t2.getModule(qn);
- n3.forEach(function(e5) {
- var n4 = e5.groupID, s3 = e5.topicID, a2 = void 0 === s3 ? void 0 : s3, i2 = e5.lastMessageSeq;
- Ve.d("".concat(t2._n, ".onGroupMessageReadNotice groupID:").concat(n4, " lastMessageSeq:").concat(i2));
- var r2 = "".concat(E.CONV_GROUP).concat(n4), u2 = true;
- 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);
- });
- }
- });
- } }, { key: "onReadReceiptList", value: function(e3) {
- var t2 = this;
- Ve.d("".concat(this._n, ".onReadReceiptList options:"), JSON.stringify(e3)), e3.dataList.forEach(function(e4) {
- var n3 = e4.groupProfile, o2 = e4.elements, s3 = n3.groupID, a2 = t2.getModule(qn), i2 = o2.readReceiptList;
- a2.updateReadReceiptInfo({ groupID: s3, readReceiptList: i2 });
- });
- } }, { key: "onGroupMessageModified", value: function(e3) {
- Ve.d("".concat(this._n, ".onGroupMessageModified options:"), JSON.stringify(e3));
- var n3 = this.getModule(qn);
- e3.dataList.forEach(function(e4) {
- n3.onMessageModified(t(t({}, e4), {}, { conversationType: E.CONV_GROUP, to: e4.topicID ? e4.topicID : e4.groupID }));
- });
- } }, { key: "deleteGroupSystemNotice", value: function(e3) {
- this._groupSystemNoticeHandler && this._groupSystemNoticeHandler.deleteGroupSystemNotice(e3);
- } }, { key: "initGroupMap", value: function(e3) {
- this.groupMap.set(e3.groupID, new hi(e3));
- } }, { key: "deleteGroup", value: function(e3) {
- this.groupMap.delete(e3);
- } }, { key: "updateGroupMap", value: function(e3) {
- var t2, n3 = this, o2 = this.getModule(qn);
- e3.forEach(function(e4) {
- t2 = e4.groupID, n3.groupMap.has(t2) ? n3.groupMap.get(t2).updateGroup(e4) : (n3.groupMap.set(t2, new hi(e4)), o2.deleteGroupRomaingMessageInfo(t2));
- });
- var s3, a2 = this.getMyUserID(), i2 = D(this.groupMap);
- try {
- for (i2.s(); !(s3 = i2.n()).done; ) {
- var r2 = v(s3.value, 2)[1];
- r2.selfInfo.userID = a2, "Owner" === r2.selfInfo.role && (r2.ownerID = a2);
- }
- } catch (u2) {
- i2.e(u2);
- } finally {
- i2.f();
- }
- this._setStorageGroupList();
- } }, { key: "getStorageGroupList", value: function() {
- return this.getModule(Vn).getItem("groupMap");
- } }, { key: "_setStorageGroupList", value: function() {
- var e3 = this.getLocalGroupList().filter(function(e4) {
- var t2 = e4.type;
- return !Tt(t2);
- }).filter(function(e4) {
- return !e4.isSupportTopic;
- }).slice(0, 20).map(function(e4) {
- return { groupID: e4.groupID, name: e4.name, avatar: e4.avatar, type: e4.type };
- });
- this.getModule(Vn).setItem("groupMap", e3);
- } }, { key: "getGroupMap", value: function() {
- return this.groupMap;
- } }, { key: "getLocalGroupList", value: function() {
- return m(this.groupMap.values());
- } }, { key: "getLocalGroupProfile", value: function(e3) {
- return this.groupMap.get(e3);
- } }, { key: "sortLocalGroupList", value: function() {
- var e3 = m(this.groupMap).filter(function(e4) {
- var t2 = v(e4, 2);
- return t2[0], !zt(t2[1].lastMessage);
- });
- e3.sort(function(e4, t2) {
- return t2[1].lastMessage.lastTime - e4[1].lastMessage.lastTime;
- }), this.groupMap = new Map(m(e3));
- } }, { key: "updateGroupLastMessage", value: function(e3) {
- this._commonGroupHandler && this._commonGroupHandler.handleUpdateGroupLastMessage(e3);
- } }, { key: "emitGroupListUpdate", value: function() {
- var e3 = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = this.getLocalGroupList();
- if (e3 && this.emitOuterEvent(k.GROUP_LIST_UPDATED), t2) {
- var o2 = JSON.parse(JSON.stringify(n3)), s3 = this.getModule(qn);
- s3.updateConversationGroupProfile(o2);
- }
- } }, { key: "patchGroupMessageRemindType", value: function() {
- var e3 = this.getLocalGroupList(), t2 = this.getModule(qn), n3 = 0;
- e3.forEach(function(e4) {
- true === t2.patchMessageRemindType({ ID: e4.groupID, isC2CConversation: false, messageRemindType: e4.selfInfo.messageRemindType }) && (n3 += 1);
- }), Ve.l("".concat(this._n, ".patchGroupMessageRemindType count:").concat(n3));
- } }, { key: "recomputeUnreadCount", value: function() {
- var e3 = this.getLocalGroupList(), t2 = this.getModule(qn);
- e3.forEach(function(e4) {
- var n3 = e4.groupID, o2 = e4.selfInfo, s3 = o2.excludedUnreadSequenceList, a2 = o2.readedSequence;
- if (at(s3)) {
- var i2 = 0;
- s3.forEach(function(t3) {
- t3 >= a2 && t3 <= e4.nextMessageSeq - 1 && (i2 += 1);
- }), i2 >= 1 && t2.recomputeGroupUnreadCount({ conversationID: "".concat(E.CONV_GROUP).concat(n3), count: i2 });
- }
- });
- } }, { key: "getMyNameCardByGroupID", value: function(e3) {
- var t2 = this.getLocalGroupProfile(e3);
- return t2 ? t2.selfInfo.nameCard : "";
- } }, { key: "isPagingGetCompleted", value: function() {
- return !!this._commonGroupHandler && this._commonGroupHandler.isPagingGetCompleted();
- } }, { key: "getGroupList", value: function(e3) {
- return this._commonGroupHandler ? this._commonGroupHandler.getGroupList(e3) : Xa();
- } }, { key: "getGroupProfile", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("getGroupProfile"), o2 = new Aa("getGroupProfile"), s3 = e3.groupID, a2 = e3.groupCustomFieldFilter;
- Ve.l("".concat(n3, " groupID:").concat(s3));
- 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"] } };
- return this.getGroupProfileAdvance(i2).then(function(e4) {
- var a3, i3 = e4.data, r2 = i3.successGroupList, u2 = i3.failureGroupList;
- if (Ve.l("".concat(n3, " ok")), u2.length > 0)
- return Za(u2[0]);
- (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]);
- 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 });
- }).catch(function(s4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), a3 = n4[0], i3 = n4[1];
- o2.setError(s4, a3, i3).setMessage("groupID:".concat(e3.groupID)).end();
- }), Ve.e("".concat(n3, " failed. error:"), s4), Za(s4);
- });
- } }, { key: "getGroupProfileAdvance", value: function(e3) {
- var n3 = "".concat(this._n, ".getGroupProfileAdvance"), o2 = e3.groupIDList;
- at(o2) && o2.length > 50 && (this.outputWarning("GetGroupProfileLimit"), o2.length = 50);
- var s3 = [], a2 = [];
- o2.forEach(function(e4) {
- Dt({ groupID: e4 }) ? a2.push(e4) : s3.push(e4);
- });
- var i2 = [];
- if (s3.length > 0) {
- var r2 = this._getGroupProfileAdvance(t(t({}, e3), {}, { groupIDList: s3 }));
- i2.push(r2);
- }
- if (a2.length > 0) {
- var u2 = this._getGroupProfileAdvance(t(t({}, e3), {}, { groupIDList: a2, relayFlag: s3.length > 0 }));
- i2.push(u2);
- }
- return Promise.all(i2).then(function(e4) {
- var t2 = [], n4 = [];
- return e4.forEach(function(e5) {
- t2.push.apply(t2, m(e5.successGroupList)), n4.push.apply(n4, m(e5.failureGroupList));
- }), Ya({ successGroupList: t2, failureGroupList: n4 });
- }).catch(function(e4) {
- return Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_getGroupProfileAdvance", value: function(e3) {
- var t2 = this, n3 = e3.relayFlag, o2 = void 0 !== n3 && n3, s3 = g(e3, Fi);
- return this.request({ protocolName: zo, requestData: s3 }).then(function(e4) {
- Ve.l("".concat(t2._n, "._getGroupProfileAdvance ok."));
- var n4 = e4.data.groups;
- return { successGroupList: n4.filter(function(e5) {
- return it(e5.errorCode) || 0 === e5.errorCode;
- }), failureGroupList: n4.filter(function(e5) {
- return e5.errorCode && 0 !== e5.errorCode;
- }).map(function(e5) {
- return new ja({ code: e5.errorCode, message: e5.errorInfo, data: { groupID: e5.groupID } });
- }) };
- }).catch(function(t3) {
- return o2 && Dt({ groupID: e3.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : Za(t3);
- });
- } }, { key: "createGroup", value: function(e3) {
- var n3 = this, o2 = "".concat(this._n, ".").concat("createGroup"), s3 = e3.type, a2 = e3.groupID;
- if (e3.name && false === this._filterProfanity("name", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.introduction && false === this._filterProfanity("introduction", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.notification && false === this._filterProfanity("notification", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (!["Public", "Private", "ChatRoom", "AVChatRoom", "Community"].includes(s3))
- return Za({ code: ha.ILLEGAL_GROUP_TYPE });
- if (!Dt({ type: s3 })) {
- if (!zt(a2) && Dt({ groupID: a2 }))
- return Za({ code: ha.ILLEGAL_GROUP_ID });
- e3.isSupportTopic = void 0;
- }
- 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 })) {
- if (!zt(a2) && !Dt({ groupID: a2 }))
- return Za({ code: ha.ILLEGAL_GROUP_ID });
- e3.isSupportTopic = true === e3.isSupportTopic ? 1 : 0;
- }
- var i2 = new Aa("createGroup");
- Ve.l("".concat(o2, " options:"), e3);
- var r2 = null, u2 = [];
- return this.request({ protocolName: Jo, requestData: t(t({}, e3), {}, { ownerID: this.getMyUserID(), webPushFlag: 1 }) }).then(function(s4) {
- var a3 = s4.data, c2 = a3.groupID, l2 = a3.overLimitUserIDList, d2 = void 0 === l2 ? [] : l2;
- 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)
- return n3.getGroupProfile({ groupID: c2 });
- if (e3.type === E.GRP_COMMUNITY && 1 === e3.isSupportTopic)
- return n3.getGroupProfile({ groupID: c2 });
- zt(e3.memberList) || zt(d2) || (e3.memberList = e3.memberList.filter(function(e4) {
- return -1 === d2.indexOf(e4.userID);
- })), n3.updateGroupMap([t(t({}, e3), {}, { groupID: c2 })]);
- 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(), "创建群组") } });
- return p2.sendMessageInstance(g2), n3.emitGroupListUpdate(), n3.getGroupProfile({ groupID: c2 });
- }).then(function(e4) {
- var t2 = e4.data.group, n4 = t2.selfInfo, o3 = n4.nameCard, s4 = n4.joinTime;
- 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 });
- }).catch(function(s4) {
- if (i2.setMessage("groupType:".concat(e3.type)), n3.probeNetwork().then(function(e4) {
- var t2 = v(e4, 2), n4 = t2[0], o3 = t2[1];
- i2.setError(s4, n4, o3).end();
- }), 10010 === s4.code || 10007 === s4.code) {
- n3.updateGroupMap([t(t({}, e3), {}, { groupID: r2 })]);
- var a3 = n3.getLocalGroupProfile(r2);
- return Ve.l("".concat(o2, " success, but failed to get group profile.")), Ya({ group: a3, overLimitUserIDList: u2 });
- }
- return Ve.e("".concat(o2, " failed. error:"), s4), Za(s4);
- });
- } }, { key: "dismissGroup", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("dismissGroup");
- if (this.hasLocalGroup(e3) && this.getLocalGroupProfile(e3).type === E.GRP_WORK)
- return Za(new ja({ code: ha.CANNOT_DISMISS_WORK }));
- var o2 = new Aa("dismissGroup");
- return o2.setMessage("groupID:".concat(e3)), Ve.l("".concat(n3, " groupID:").concat(e3)), this.request({ protocolName: Xo, requestData: { groupID: e3 } }).then(function() {
- 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 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1];
- o2.setError(e4, s3, a2).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "updateGroupProfile", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("updateGroupProfile");
- if (this.hasLocalGroup(e3.groupID)) {
- var o2 = this.getLocalGroupProfile(e3.groupID).type;
- this._canIUseJoinOption(o2) || it(e3.joinOption) || (Ve.w("".concat(n3, " joinOption is unavailable for Work/Meeting/AVChatRoom")), e3.joinOption = void 0);
- }
- if (it(e3.muteAllMembers) || (e3.muteAllMembers ? e3.muteAllMembers = "On" : e3.muteAllMembers = "Off"), e3.name && false === this._filterProfanity("name", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.introduction && false === this._filterProfanity("introduction", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.notification && false === this._filterProfanity("notification", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var s3 = new Aa("updateGroupProfile");
- return s3.setMessage(JSON.stringify(e3)), Ve.l("".concat(n3, " groupID:").concat(e3.groupID)), this.request({ protocolName: Zo, requestData: e3 }).then(function() {
- (s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.hasLocalGroup(e3.groupID)) && (t2.groupMap.get(e3.groupID).updateGroup(e3), t2._setStorageGroupList());
- return Ya({ group: t2.groupMap.get(e3.groupID) });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1];
- s3.setError(e4, o3, a2).end();
- }), Ve.l("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_filterProfanity", value: function(e3, t2) {
- var n3 = this.getModule(oo);
- if (!n3)
- return true;
- var o2 = n3.filterText(t2[e3], z), s3 = o2.isAllowedToSend, a2 = o2.modifiedText;
- return true === s3 && (t2[e3] = a2, true);
- } }, { key: "joinGroup", value: function(e3) {
- var t2 = this, n3 = e3.groupID, o2 = e3.type, s3 = "".concat(this._n, ".joinGroup");
- if (o2 === E.GRP_WORK)
- return Za({ code: ha.CANNOT_JOIN_WORK });
- if (this.deleteUnjoinedAVChatRoom(n3), this.hasLocalGroup(n3)) {
- if (!this.isLoggedIn())
- return Xa({ status: E.JOIN_STATUS_ALREADY_IN_GROUP });
- var a2 = new Aa("applyJoinGroup");
- return this.getGroupProfile({ groupID: n3 }).then(function() {
- 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 });
- }).catch(function(o3) {
- 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);
- });
- }
- return Ve.l("".concat(s3, " groupID:").concat(n3)), this.isLoggedIn() ? this.applyJoinGroup(e3) : this._AVChatRoomHandler.joinWithoutAuth(e3);
- } }, { key: "applyJoinGroup", value: function(e3) {
- var n3 = this, o2 = "".concat(this._n, ".").concat("applyJoinGroup"), s3 = e3.groupID;
- if (!zt(e3.applyMessage) && false === this._filterProfanity("applyMessage", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var a2 = new Aa("applyJoinGroup"), i2 = t({}, e3), r2 = this.canIUse(B.AVCHATROOM_HISTORY_MSG);
- return r2 && (i2.historyMessageFlag = 1), this.getModule(qn).deleteTopicRoamingMessageInfo(s3), this.request({ protocolName: Qo, requestData: i2 }).then(function(e4) {
- 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);
- switch (a2.setNetworkType(n3.getNetworkType()).setMessage("".concat(g2)).end(), Ve.l("".concat(o2, " ok. ").concat(g2)), i3) {
- case ze:
- return Ya({ status: ze });
- case je:
- return n3.getGroupProfile({ groupID: s3 }).then(function(e5) {
- var t3 = e5.data.group;
- return n3._handleJoinResult({ group: t3, avChatRoomFlag: l2, longPollingKey: u2, startSeq: c2, avChatRoomKey: d2, messageList: p2 });
- }).catch(function() {
- var e5 = new hi({ groupID: s3 });
- return n3._handleJoinResult({ group: e5, avChatRoomFlag: l2, longPollingKey: u2, startSeq: c2, avChatRoomKey: d2, messageList: p2 });
- });
- default:
- var h2 = new ja({ code: ha.JOIN_GROUP_FAIL });
- return Ve.e("".concat(o2, " failed. error:"), h2), Za(h2);
- }
- }).catch(function(e4) {
- return a2.setMessage("groupID:".concat(s3)), n3.probeNetwork().then(function(t2) {
- var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_handleJoinResult", value: function(e3) {
- 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;
- 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() {
- n3._onAVChatRoomHistoryMessage(u2);
- }), t2) : (this.emitGroupListUpdate(true, false), Ya({ status: je, group: o2 }));
- } }, { key: "quitGroup", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("quitGroup");
- Ve.l("".concat(n3, " groupID:").concat(e3));
- var o2 = this.checkJoinedAVChatRoomByID(e3);
- if (!o2 && !this.hasLocalGroup(e3))
- return Za({ code: ha.MEMBER_NOT_IN_GROUP });
- if (o2 && !this.isLoggedIn())
- return Ve.l("".concat(n3, " anonymously ok. groupID:").concat(e3)), this.deleteLocalGroupAndConversation(e3), this._AVChatRoomHandler.reset(e3), Xa({ groupID: e3 });
- var s3 = new Aa("quitGroup");
- return s3.setMessage("groupID:".concat(e3)), this.request({ protocolName: es, requestData: { groupID: e3 } }).then(function() {
- 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 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1];
- s3.setError(e4, o3, a2).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "searchGroupByID", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("searchGroupByID"), o2 = { groupIDList: [e3] }, s3 = new Aa("searchGroupByID");
- return s3.setMessage("groupID:".concat(e3)), Ve.l("".concat(n3, " groupID:").concat(e3)), this.request({ protocolName: ts, requestData: o2 }).then(function(e4) {
- var o3 = e4.data.groupProfile;
- if (0 !== o3[0].errorCode)
- throw new ja({ code: o3[0].errorCode, message: o3[0].errorInfo });
- return s3.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), Ya({ group: new hi(o3[0]) });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], a2 = n4[1];
- s3.setError(e4, o3, a2).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "changeGroupOwner", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("changeGroupOwner");
- if (this.hasLocalGroup(e3.groupID) && this.getLocalGroupProfile(e3.groupID).type === E.GRP_AVCHATROOM)
- return Za({ code: ha.CANNOT_CHANGE_OWNER_IN_AVCHATROOM });
- if (e3.newOwnerID === this.getMyUserID())
- return Za({ code: ha.CANNOT_CHANGE_OWNER_TO_SELF });
- var o2 = new Aa("changeGroupOwner");
- 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() {
- o2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok"));
- var s3 = e3.groupID, a2 = e3.newOwnerID;
- t2.groupMap.get(s3).ownerID = a2;
- var i2 = t2.getModule(wn).getLocalGroupMemberList(s3);
- if (i2 instanceof Map) {
- var r2 = i2.get(t2.getMyUserID());
- it(r2) || (r2.updateRole("Member"), t2.groupMap.get(s3).selfInfo.role = "Member");
- var u2 = i2.get(a2);
- it(u2) || u2.updateRole("Owner");
- }
- return t2.emitGroupListUpdate(true, false), Ya({ group: t2.groupMap.get(s3) });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), s3 = n4[0], a2 = n4[1];
- o2.setError(e4, s3, a2).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getGroupApplicationList", value: function() {
- return this._groupSystemNoticeHandler.getGroupApplicationList();
- } }, { key: "handleGroupApplication", value: function(e3) {
- 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;
- 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);
- var p2 = os2;
- d2 && 2 === d2.applicationType && (p2 = ss, a2 = d2.userID);
- var g2 = new Aa("handleGroupApplication");
- 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() {
- return g2.setNetworkType(i2.getNetworkType()).end(), Ve.l("".concat(r2, " ok")), l2 && i2._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), Ya({ group: i2.getLocalGroupProfile(n3) });
- }).catch(function(e4) {
- return i2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- g2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(r2, " failed. error"), e4), Za(e4);
- });
- } }, { key: "handleGroupInvitation", value: function(e3) {
- 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");
- 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() {
- return l2.setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e3.message] }), Ya({ group: n3.getLocalGroupProfile(a2) });
- }).catch(function(e4) {
- return n3.probeNetwork().then(function(t2) {
- var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
- l2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(o2, " failed. error"), e4), Za(e4);
- });
- } }, { key: "getGroupOnlineMemberCount", value: function(e3) {
- return this._AVChatRoomHandler ? this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3) ? this._AVChatRoomHandler.getGroupOnlineMemberCount(e3) : Xa({ memberCount: 0 }) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "hasLocalGroup", value: function(e3) {
- return this.groupMap.has(e3);
- } }, { key: "deleteLocalGroupAndConversation", value: function(e3) {
- var t2 = this.checkJoinedAVChatRoomByID(e3);
- (Ve.l("".concat(this._n, ".deleteLocalGroupAndConversation isJoinedAVChatRoom:").concat(t2)), t2) && this.getModule(qn).deleteLocalConversation("".concat(E.CONV_GROUP).concat(e3));
- if (Dt({ groupID: e3 })) {
- var n3 = this.getLocalGroupProfile(e3);
- if (n3 && true === n3.isSupportTopic)
- this.getModule(Fn).deleteTopicListInCommunity(e3);
- }
- this._deleteLocalGroup(e3), this.emitGroupListUpdate(true, false);
- } }, { key: "_deleteLocalGroup", value: function(e3) {
- this.groupMap.delete(e3), this.getModule(wn).deleteGroupMemberList(e3), this._setStorageGroupList();
- } }, { key: "sendMessage", value: function(e3, t2) {
- if (at(e3._receiverList) && e3._receiverList.length > 0 && !this.canIUse(B.MSG_TO_SPECIFIED_GRP_MBR))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n3 = this.createGroupMessagePack(e3, t2);
- return this.request(n3);
- } }, { key: "createGroupMessagePack", value: function(e3, t2) {
- var n3 = null;
- t2 && t2.offlinePushInfo && (n3 = t2.offlinePushInfo);
- var o2 = "";
- nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (o2 = e3.cloudCustomData);
- var s3 = [];
- if (st(t2) && st(t2.messageControlInfo)) {
- var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
- true === i2 && s3.push("NoUnread"), true === r2 && s3.push("NoLastMsg"), true === u2 && s3.push("NoMsgCheck");
- }
- var c2 = void 0;
- at(e3._receiverList) && e3._receiverList.length > 0 && (c2 = e3._receiverList, e3._receiverList.length > 50 && (c2 = e3._receiverList.slice(0, 50), this.outputWarning("ReceiverListLimit")));
- 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 };
- return kt(e3.to) && (p2.groupID = xt(e3.to), p2.topicID = e3.to), { protocolName: vo, tjgID: this.generateTjgID(e3), requestData: p2 };
- } }, { key: "_isVoipPush", value: function(e3) {
- var t2 = void 0;
- return it(e3.disableVoipPush) || (t2 = false === e3.disableVoipPush ? 1 : 0), t2;
- } }, { key: "revokeMessage", value: function(e3) {
- var t2 = { groupID: e3.to, msgSeqList: [{ msgSeq: e3.sequence }] };
- return kt(e3.to) && (t2.groupID = xt(e3.to), t2.topicID = e3.to), this.request({ protocolName: is, requestData: t2 });
- } }, { key: "deleteMessage", value: function(e3) {
- var t2 = e3.to, n3 = e3.keyList;
- Ve.l("".concat(this._n, ".deleteMessage groupID:").concat(t2, " count:").concat(n3.length));
- var o2 = { groupID: t2, deleter: this.getMyUserID(), keyList: n3 };
- return kt(t2) && (o2.groupID = xt(t2), o2.topicID = t2), this.request({ protocolName: Ms, requestData: o2 });
- } }, { key: "modifyRemoteMessage", value: function(e3) {
- 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;
- kt(t2) && (u2 = xt(t2), c2 = t2);
- var l2 = void 0;
- 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 } });
- } }, { key: "getRoamingMessage", value: function(e3) {
- 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;
- return kt(s3) && (s3 = xt(u2 = s3)), this._computeLastSequence({ groupID: s3, topicID: u2, sequence: a2 }).then(function(e4) {
- 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 } });
- }).then(function(e4) {
- var a3 = e4.data, c2 = a3.messageList, l2 = a3.complete, d2 = a3.invisibleSequenceList, p2 = void 0 === d2 ? [] : d2;
- 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));
- var g2 = t2._getMinSequence(p2, c2) - 1;
- i2.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(s3, " topicID:").concat(u2, " startSequence:").concat(r2, " complete:").concat(l2, " nextSequence:").concat(g2)).end();
- var h2 = t2.getModule(qn), _2 = [];
- 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 };
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], a3 = n4[1];
- i2.setError(e4, o3, a3).setMessage("groupID:".concat(s3, " topicID:").concat(u2, " startSequence:").concat(r2)).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_getGroupIDOfMessage", value: function(e3) {
- return e3.conversationID.replace(E.CONV_GROUP, "");
- } }, { key: "_getMinSequence", value: function(e3, t2) {
- var n3 = 0;
- zt(t2) || (n3 = t2[t2.length - 1].sequence);
- var o2 = 0;
- zt(e3) || (o2 = e3[e3.length - 1]);
- return Ve.l("".concat(this._n, "._getMinSequence minVisibleSequence:").concat(n3, " minInvisibleSequence:").concat(o2)), o2 > 0 && o2 < n3 ? o2 : n3;
- } }, { key: "getReadReceiptList", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("getReadReceiptList"), o2 = this._getGroupIDOfMessage(e3[0]), s3 = this.getMyUserID(), a2 = e3.filter(function(e4) {
- return e4.from === s3 && true === e4.needReadReceipt;
- }).map(function(e4) {
- return { sequence: e4.sequence };
- });
- if (Ve.l("".concat(n3, " groupID:").concat(o2, " sequenceList:").concat(JSON.stringify(a2))), 0 === a2.length)
- return Xa({ messageList: e3 });
- var i2 = new Aa("getReadReceiptList");
- return i2.setMessage("groupID:".concat(o2)), this.request({ protocolName: ls, requestData: { groupID: o2, sequenceList: a2 } }).then(function(t3) {
- i2.end(), Ve.l("".concat(n3, " ok"));
- var o3 = t3.data.readReceiptList;
- return at(o3) && o3.forEach(function(t4) {
- e3.forEach(function(e4) {
- 0 === t4.code && t4.sequence === e4.sequence && (e4.readReceiptInfo.readCount = t4.readCount, e4.readReceiptInfo.unreadCount = t4.unreadCount);
- });
- }), Ya({ messageList: e3 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "sendReadReceipt", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("sendReadReceipt"), o2 = this._getGroupIDOfMessage(e3[0]), s3 = new Aa("sendReadReceipt");
- s3.setMessage("groupID:".concat(o2));
- var a2 = this.getMyUserID(), i2 = e3.filter(function(e4) {
- return e4.from !== a2 && true === e4.needReadReceipt;
- }).map(function(e4) {
- return { sequence: e4.sequence };
- });
- 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) {
- return s3.end(), Ve.l("".concat(n3, " ok")), Ya();
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], a3 = n4[1];
- s3.setError(e4, o3, a3).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- }));
- } }, { key: "getReadReceiptDetail", value: function(e3) {
- 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);
- Ve.l("".concat(c2, " ").concat(h2));
- var _2 = { cursor: "", isCompleted: false, messageID: r2, unreadUserIDList: [], readUserIDList: [] }, f2 = new Aa("getReadReceiptDetail");
- return f2.setMessage(h2), this.request({ protocolName: gs, requestData: { groupID: i2, sequence: u2, flag: d2, cursor: p2, count: g2 } }).then(function(e4) {
- f2.end();
- var n4 = e4.data, o3 = n4.cursor, s4 = n4.isCompleted, a3 = n4.unreadUserIDList, i3 = n4.readUserIDList;
- return _2.cursor = o3, 1 === s4 && (_2.isCompleted = true, t2._receiptDetailCompleteMap.set(r2, true)), 0 === d2 ? _2.readUserIDList = i3.map(function(e5) {
- return e5.userID;
- }) : 1 === d2 && (_2.unreadUserIDList = a3.map(function(e5) {
- return e5.userID;
- })), Ve.l("".concat(c2, " ok")), Ya(_2);
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- f2.setError(e4, o3, s4).end();
- }), Ve.w("".concat(c2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getRoamingMessagesHopping", value: function(e3) {
- 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;
- 1 === r2 && (u2 = i2 + a2 - 1);
- var c2 = void 0;
- kt(s3) && (s3 = xt(c2 = s3));
- var l2 = "".concat(c2 ? "topicID:".concat(c2) : "groupID:".concat(s3), " sequence:").concat(i2, " direction:").concat(r2);
- return Ve.l("".concat(n3, " ").concat(l2)), this.request({ protocolName: cs, requestData: { groupID: s3, topicID: c2, count: a2, sequence: u2 } }).then(function(s4) {
- var a3 = s4.data, u3 = a3.messageList, c3 = a3.complete, d2 = "complete:".concat(c3, " count:").concat(u3 ? u3.length : 0);
- if (Ve.l("".concat(n3, " ok. ").concat(d2)), o2.setNetworkType(t2.getNetworkType()).setMessage("".concat(l2, " ").concat(d2)).end(), 2 === c3 || zt(u3)) {
- var p2 = t2._computeResult();
- return Ya(p2);
- }
- 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 });
- return Ya(_2);
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), r3 = n4[0], u3 = n4[1];
- o2.setError(e4, r3, u3).setMessage("groupID:".concat(s3, " sequence:").concat(i2, " count:").concat(a2)).end();
- }), Ve.w("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_computeResult", value: function(e3) {
- var t2 = { messageList: [], isCompleted: false, nextMessageSeq: "" };
- if (it(e3))
- return t2.isCompleted = true, t2;
- 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;
- return 1 === n3 ? (t2.nextMessageSeq = a2[0].sequence + 1, r2.forEach(function(e4) {
- e4.sequence >= o2 && t2.messageList.push(e4);
- }), 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);
- } }, { key: "setMessageRead", value: function(e3) {
- var t2 = this, n3 = e3.conversationID, o2 = e3.lastMessageSeq, s3 = "".concat(this._n, ".setMessageRead");
- Ve.l("".concat(s3, " conversationID:").concat(n3, " lastMessageSeq:").concat(o2)), et(o2) || this.outputWarning("DoNotModifyLastSeq");
- var a2 = new Aa("setGroupMessageRead");
- a2.setMessage("".concat(n3, "-").concat(o2));
- var i2 = n3.replace(E.CONV_GROUP, ""), r2 = void 0;
- return kt(i2) && (i2 = xt(r2 = i2)), this.request({ protocolName: rs, requestData: { groupID: i2, topicID: r2, messageReadSeq: o2 } }).then(function() {
- a2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(s3, " ok."));
- var e4 = t2.getModule(qn);
- e4.updateIsReadAfterReadReport({ conversationID: n3, lastMessageSeq: o2 });
- var u2 = true;
- if (!it(r2)) {
- u2 = false;
- var c2 = t2.getModule(Fn).getLocalTopic(i2, r2);
- c2 && c2.updateSelfInfo({ readedSequence: o2 });
- }
- return e4.updateUnreadCount(n3, u2), Ya();
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(e4, o3, s4).end();
- }), Ve.l("".concat(s3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_computeLastSequence", value: function(e3) {
- var t2 = e3.groupID, n3 = e3.topicID, o2 = void 0 === n3 ? void 0 : n3, s3 = e3.sequence;
- 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);
- } }, { key: "getGroupLastSequence", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("getGroupLastSequence"), o2 = new Aa("getGroupLastSequence"), s3 = 0, a2 = "";
- if (this.hasLocalGroup(e3)) {
- var i2 = this.getLocalGroupProfile(e3), r2 = i2.lastMessage;
- if (r2.lastSequence > 0 && false === r2.onlineOnlyFlag)
- 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);
- if (i2.nextMessageSeq > 1)
- 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);
- }
- var u2 = "GROUP".concat(e3), c2 = this.getModule(qn).getLocalConversation(u2);
- if (c2 && c2.lastMessage.lastSequence && false === c2.lastMessage.onlineOnlyFlag)
- 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);
- var l2 = { groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } };
- return this.getGroupProfileAdvance(l2).then(function(i3) {
- var r3 = i3.data.successGroupList;
- 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;
- }).catch(function(s4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), a3 = n4[0], i3 = n4[1];
- o2.setError(s4, a3, i3).setMessage("get lastSequence failed from getGroupProfileAdvance. groupID:".concat(e3)).end();
- }), Ve.w("".concat(n3, " failed. error:"), s4), Za(s4);
- });
- } }, { key: "getTopicLastSequence", value: function(e3) {
- 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);
- 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) {
- var n4 = e4.data.successTopicList;
- 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;
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), s4 = n4[0], i3 = n4[1];
- a2.setError(e4, s4, i3).setMessage("get lastSequence failed from getTopicList. topicID:".concat(o2)).end();
- }), Ve.w("".concat(s3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "isMessageFromOrToAVChatroom", value: function(e3) {
- return !!this._AVChatRoomHandler && this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e3);
- } }, { key: "hasJoinedAVChatRoom", value: function() {
- return this._AVChatRoomHandler ? this._AVChatRoomHandler.hasJoinedAVChatRoom() : 0;
- } }, { key: "getJoinedAVChatRoom", value: function() {
- return this._AVChatRoomHandler ? this._AVChatRoomHandler.getJoinedAVChatRoom() : [];
- } }, { key: "isOnlineMessage", value: function(e3, t2) {
- return !(!this._canIUseOnlineOnlyFlag(e3) || !t2 || true !== t2.onlineUserOnly);
- } }, { key: "_canIUseOnlineOnlyFlag", value: function(e3) {
- var t2 = this.getJoinedAVChatRoom();
- return !t2 || !t2.includes(e3.to) || e3.conversationType !== E.CONV_GROUP;
- } }, { key: "_onAVChatRoomHistoryMessage", value: function(e3) {
- if (!zt(e3)) {
- Ve.l("".concat(this._n, "._onAVChatRoomHistoryMessage count:").concat(e3.length));
- var n3 = [];
- e3.forEach(function(e4) {
- n3.push(t(t({}, e4), {}, { isHistoryMessage: 1 }));
- }), this.onAVChatRoomMessage(n3);
- }
- } }, { key: "onAVChatRoomMessage", value: function(e3) {
- this._AVChatRoomHandler && this._AVChatRoomHandler.onMessage(e3);
- } }, { key: "onAVChatRoomMemberBanned", value: function(e3) {
- this._AVChatRoomHandler && this._AVChatRoomHandler.onAVChatRoomMemberBanned(e3);
- } }, { key: "getGroupSimplifiedInfo", value: function(e3) {
- var t2 = this, n3 = new Aa("getGroupSimplifiedInfo"), o2 = { groupIDList: [e3], responseFilter: { groupBaseInfoFilter: ["Type", "Name"] } };
- return this.getGroupProfileAdvance(o2).then(function(o3) {
- var s3 = o3.data.successGroupList;
- return n3.setNetworkType(t2.getNetworkType()).setMessage("groupID:".concat(e3, " type:").concat(s3[0].type)).end(), s3[0];
- }).catch(function(o3) {
- t2.probeNetwork().then(function(t3) {
- var s3 = v(t3, 2), a2 = s3[0], i2 = s3[1];
- n3.setError(o3, a2, i2).setMessage("groupID:".concat(e3)).end();
- });
- });
- } }, { key: "setUnjoinedAVChatRoom", value: function(e3) {
- this._unjoinedAVChatRoomList.set(e3, 1);
- } }, { key: "deleteUnjoinedAVChatRoom", value: function(e3) {
- this._unjoinedAVChatRoomList.has(e3) && this._unjoinedAVChatRoomList.delete(e3);
- } }, { key: "isUnjoinedAVChatRoom", value: function(e3) {
- return this._unjoinedAVChatRoomList.has(e3);
- } }, { key: "isGroupAttributesUpdatedNotice", value: function(e3) {
- return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e3);
- } }, { key: "updateLocalMainSequenceOnReconnected", value: function() {
- this._groupAttributesHandler.updateLocalMainSequenceOnReconnected();
- } }, { key: "initGroupAttributes", value: function(e3) {
- return this._groupAttributesHandler.initGroupAttributes(e3);
- } }, { key: "setGroupAttributes", value: function(e3) {
- return this._groupAttributesHandler.setGroupAttributes(e3);
- } }, { key: "deleteGroupAttributes", value: function(e3) {
- return this._groupAttributesHandler.deleteGroupAttributes(e3);
- } }, { key: "getGroupAttributes", value: function(e3) {
- return this._groupAttributesHandler.getGroupAttributes(e3);
- } }, { key: "isMessageFromTopic", value: function(e3, t2) {
- return 2 === e3 && !zt(t2);
- } }, { key: "isMessageFromCommunityOfTopic", value: function(e3, t2) {
- return 2 === e3 && zt(t2);
- } }, { key: "getMessageExtensions", value: function(e3, t2) {
- return Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.request({ protocolName: Ss, requestData: { groupID: e3.to, messageSequence: e3.sequence, startSequence: t2 } });
- } }, { key: "modifyMessageExtensions", value: function(e3, t2) {
- var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
- 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 } });
- } }, { key: "getGroupNotify", value: function(e3) {
- var n3 = this;
- if (this.hasLocalGroup(e3)) {
- var o2 = this.getLocalGroupProfile(e3), s3 = o2.type, a2 = o2.isSupportTopic;
- if (!Tt(s3) && !a2) {
- var i2 = "".concat(this._n, ".getGroupNotify"), r2 = this._getGroupLastRevokedTime(e3), u2 = 1e3 * Pe();
- 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) {
- var s4 = o3.data, a3 = s4.nextRevokedTime, r3 = s4.notifyList;
- Ve.l("".concat(i2, " ok. groupID:").concat(e3, " nextRevokedTime:").concat(a3));
- var u3 = { dataList: [{ elements: { revokedInfos: [] } }] };
- at(r3) && r3.forEach(function(n4) {
- u3.dataList[0].elements.revokedInfos.push({ groupID: e3, sequence: n4.sequence, random: n4.random, revokerInfo: t({}, n4.revokerInfo) });
- }), n3.onGroupMessageRevoked(u3), 0 !== a3 ? (n3._setGroupLastRevokedTime(e3, a3), n3.getGroupNotify(e3)) : n3._setGroupLastRevokedTime(e3, 1e3 * Pe());
- }).catch(function(e4) {
- Ve.e("".concat(i2, " failed. error:"), e4);
- });
- }
- }
- } }, { key: "_getGroupLastRevokedTime", value: function(e3) {
- return this.hasLocalGroup(e3) ? this.getLocalGroupProfile(e3)._lastRevokedTime : 0;
- } }, { key: "_setGroupLastRevokedTime", value: function(e3, t2) {
- this.hasLocalGroup(e3) && (this.getLocalGroupProfile(e3)._lastRevokedTime = t2);
- } }, { key: "isGroupCountersNotice", value: function(e3) {
- return this._groupCountersHandler.isGroupCountersNotice(e3);
- } }, { key: "setGroupCounters", value: function(e3) {
- return this._groupCountersHandler.setGroupCounters(e3);
- } }, { key: "increaseGroupCounter", value: function(e3) {
- return this._groupCountersHandler.increaseGroupCounter(e3);
- } }, { key: "decreaseGroupCounter", value: function(e3) {
- return this._groupCountersHandler.decreaseGroupCounter(e3);
- } }, { key: "getGroupCounters", value: function(e3) {
- return this._groupCountersHandler.getGroupCounters(e3);
- } }, { key: "restartPolling", value: function() {
- this._AVChatRoomHandler && this._AVChatRoomHandler.restartPolling();
- } }, { key: "getPollingTimerID", value: function(e3) {
- if (!e3)
- return -1;
- var t2 = this.getLocalGroupProfile(e3);
- return t2 && Tt(t2.type) ? this._AVChatRoomHandler.getPollingTimerID(e3) : -1;
- } }, { key: "_canIUseJoinOption", value: function(e3) {
- return function(e4) {
- return e4 === E.GRP_PUBLIC;
- }(e3) || Dt({ type: e3 });
- } }, { key: "reset", value: function() {
- 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();
- } }]), s2;
- }(uo), xi = function() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "_initMember", value: function(e3) {
- this.updateMember(e3);
- } }, { key: "updateMember", value: function(e3) {
- var t2 = [null, void 0, "", 0, NaN];
- e3.memberCustomField && Ct(this.memberCustomField, e3.memberCustomField), pt(this, e3, ["memberCustomField", "marks"], t2);
- } }, { key: "updateRole", value: function(e3) {
- ["Owner", "Admin", "Member"].indexOf(e3) < 0 || (this.role = e3);
- } }, { key: "updateMuteUntil", value: function(e3) {
- it(e3) || (this.muteUntil = Math.floor((Date.now() + 1e3 * e3) / 1e3));
- } }, { key: "updateNameCard", value: function(e3) {
- it(e3) || (this.nameCard = e3);
- } }, { key: "updateMemberCustomField", value: function(e3) {
- e3 && Ct(this.memberCustomField, e3);
- } }]), e2;
- }(), Vi = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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;
- }
- return a(s2, [{ key: "_onProfileUpdated", value: function(e3) {
- for (var t2 = this, n3 = e3.data, o2 = function(e4) {
- var o3 = n3[e4];
- t2.groupMemberListMap.forEach(function(e5) {
- e5.has(o3.userID) && e5.get(o3.userID).updateMember({ nick: o3.nick, avatar: o3.avatar });
- });
- }, s3 = 0; s3 < n3.length; s3++)
- o2(s3);
- } }, { key: "deleteGroupMemberList", value: function(e3) {
- this.groupMemberListMap.delete(e3);
- } }, { key: "getGroupMemberList", value: function(e3) {
- 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);
- if (Ve.l("".concat(c2, " groupID:").concat(n3, " offset:").concat(s3, " count:").concat(i2, " hasLocalGroup:").concat(d2)), !d2)
- return Xa({ memberList: [], offset: 0 });
- if (l2.getLocalGroupProfile(n3).type === E.GRP_AVCHATROOM) {
- if (this.canIUse(B.AVCHATROOM_MBR_LIST))
- return this._getAVChatRoomMemberList({ groupID: n3, offset: s3, filter: u2 });
- this.outputWarning("LiveOnlineMember");
- }
- var p2 = new Aa("getGroupMemberList"), g2 = 0, h2 = { groupID: n3, limit: i2 > 100 ? 100 : i2 };
- Dt({ groupID: n3 }) ? h2.next = "".concat(s3) : (h2.offset = s3, g2 = s3 + i2);
- var _2 = [];
- return this.request({ protocolName: Ns, requestData: h2 }).then(function(e4) {
- var o3 = e4.data, s4 = o3.members, a3 = o3.memberNum, i3 = o3.next, r3 = void 0 === i3 ? void 0 : i3;
- if (it(r3) || (g2 = zt(r3) ? 0 : r3), !at(s4) || 0 === s4.length)
- return g2 = 0, Promise.resolve([]);
- var u3 = t2.getModule(Pn);
- return u3.hasLocalGroup(n3) && (u3.getLocalGroupProfile(n3).memberNum = a3), _2 = t2._updateLocalGroupMemberMap(n3, s4), t2.getModule(Gn).getUserProfile({ userIDList: s4.map(function(e5) {
- return e5.userID;
- }), tagList: [He.NICK, He.AVATAR] });
- }).then(function(e4) {
- var o3 = e4.data;
- if (!at(o3) || 0 === o3.length)
- return Xa({ memberList: [], offset: g2 });
- var a3 = o3.map(function(e5) {
- return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar };
- });
- 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 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- p2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(c2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_getAVChatRoomMemberList", value: function(e3) {
- var t2 = this, n3 = e3.groupID, o2 = e3.offset, s3 = e3.filter, a2 = "".concat(this._n, ".").concat("_getAVChatRoomMemberList"), i2 = new Aa("_getAVChatRoomMemberList");
- 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) {
- var o3 = e4.data, s4 = o3.memberList, r2 = void 0 === s4 ? [] : s4, u2 = o3.offset, c2 = void 0 === u2 ? 0 : u2;
- i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok. member count:").concat(r2.length, ", next request timestamp:").concat(c2));
- var l2 = t2._updateLocalGroupMemberMap(n3, r2);
- return Ya({ memberList: l2, offset: c2 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getGroupMemberProfile", value: function(e3) {
- var n3 = this, o2 = "".concat(this._n, ".").concat("getGroupMemberProfile"), s3 = new Aa("getGroupMemberProfile");
- 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));
- var a2 = e3.groupID, i2 = e3.userIDList;
- return this._getGroupMemberProfileAdvance(t(t({}, e3), {}, { userIDList: i2 })).then(function(e4) {
- var t2 = e4.data.members;
- return at(t2) && 0 !== t2.length ? (n3._updateLocalGroupMemberMap(a2, t2), n3.getModule(Gn).getUserProfile({ userIDList: t2.map(function(e5) {
- return e5.userID;
- }), tagList: [He.NICK, He.AVATAR] })) : Xa([]);
- }).then(function(e4) {
- var t2 = e4.data.map(function(e5) {
- return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar };
- });
- n3._updateLocalGroupMemberMap(a2, t2);
- var o3 = i2.filter(function(e5) {
- return n3.hasLocalGroupMember(a2, e5);
- }).map(function(e5) {
- return n3.getLocalGroupMemberInfo(a2, e5);
- });
- return s3.setNetworkType(n3.getNetworkType()).end(), Ya({ memberList: o3 });
- });
- } }, { key: "addGroupMember", value: function(e3) {
- 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");
- if (i2.setMessage("groupID:".concat(o2, " groupType:").concat(a2)), Tt(a2)) {
- var r2 = new ja({ code: ha.CANNOT_ADD_MEMBER_IN_AVCHATROOM });
- return i2.setError(r2, true, this.getNetworkType()).end(), Za(r2);
- }
- return e3.userIDList = e3.userIDList.map(function(e4) {
- return { userID: e4 };
- }), Ve.l("".concat(n3, " groupID:").concat(o2)), this.request({ protocolName: Us, requestData: e3 }).then(function(o3) {
- var a3 = o3.data.members;
- Ve.l("".concat(n3, " ok"));
- var r3 = a3.filter(function(e4) {
- return 1 === e4.result;
- }).map(function(e4) {
- return e4.userID;
- }), u2 = a3.filter(function(e4) {
- return 0 === e4.result;
- }).map(function(e4) {
- return e4.userID;
- }), c2 = a3.filter(function(e4) {
- return 2 === e4.result;
- }).map(function(e4) {
- return e4.userID;
- }), l2 = a3.filter(function(e4) {
- return 4 === e4.result;
- }).map(function(e4) {
- return e4.userID;
- }), d2 = "groupID:".concat(e3.groupID, ", ") + "successUserIDList:".concat(r3, ", ") + "failureUserIDList:".concat(u2, ", ") + "existedUserIDList:".concat(c2, ", ") + "overLimitUserIDList:".concat(l2);
- 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 }));
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "deleteGroupMember", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("deleteGroupMember"), o2 = e3.groupID, s3 = e3.userIDList, a2 = this.getModule(Pn).getLocalGroupProfile(o2);
- if (it(a2))
- return Za({ code: ha.CANNOT_FIND_GROUP });
- if (Tt(a2.type))
- return this.canIUse(B.AVCHATROOM_BAN_MBR) ? this._banAVChatRoomMember(e3) : Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var i2 = new Aa("deleteGroupMember"), r2 = "groupID:".concat(o2, " ").concat(s3.length > 5 ? "userIDList.length:".concat(s3.length) : "userIDList:".concat(s3));
- return i2.setMessage(r2), Ve.l("".concat(n3, " groupID:").concat(o2, " userIDList:"), s3), this.request({ protocolName: Ps, requestData: e3 }).then(function() {
- 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 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_updateConversationGroupProfile", value: function(e3) {
- this.getModule(qn).updateConversationGroupProfile([e3]);
- } }, { key: "_banAVChatRoomMember", value: function(e3) {
- 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");
- i2.setMessage(a2), Ve.l("".concat(n3, " groupID:").concat(o2, " userIDList:"), s3);
- var r2 = this.getModule(Pn).getLocalGroupProfile(o2);
- return it(e3.duration) || 0 === e3.duration ? Za({ code: ha.BAN_DURATION_INVALID }) : this.request({ protocolName: bs, requestData: e3 }).then(function() {
- return i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), t2.deleteLocalGroupMembers(o2, s3), Ya({ group: r2, userIDList: s3 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "setGroupMemberMuteTime", value: function(e3) {
- var t2 = this, n3 = e3.groupID, o2 = e3.userID, s3 = e3.muteTime, a2 = "".concat(this._n, ".").concat("setGroupMemberMuteTime");
- if (o2 === this.getMyUserID())
- return Za(new ja({ code: ha.CANNOT_MUTE_SELF }));
- Ve.l("".concat(a2, " groupID:").concat(n3, " userID:").concat(o2));
- var i2 = new Aa("setGroupMemberMuteTime");
- return i2.setMessage("groupID:".concat(n3, " userID:").concat(o2, " muteTime:").concat(s3)), this.modifyGroupMemberInfo({ groupID: n3, userID: o2, muteTime: s3 }).then(function(e4) {
- i2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(a2, " ok"));
- var o3 = t2.getModule(Pn);
- return Ya({ group: o3.getLocalGroupProfile(n3), member: e4 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(a2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "setGroupMemberRole", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberRole"), o2 = e3.groupID, s3 = e3.userID, a2 = e3.role, i2 = this.getModule(Pn).getLocalGroupProfile(o2);
- if (i2.selfInfo.role !== E.GRP_MBR_ROLE_OWNER)
- return Za({ code: ha.NOT_OWNER });
- if ([E.GRP_WORK, E.GRP_AVCHATROOM].includes(i2.type))
- return Za({ code: ha.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM });
- var r2 = [E.GRP_MBR_ROLE_ADMIN, E.GRP_MBR_ROLE_MEMBER];
- if (Dt({ groupID: o2 }) && r2.push(E.GRP_MBR_ROLE_CUSTOM), r2.indexOf(a2) < 0)
- return Za({ code: ha.INVALID_MEMBER_ROLE });
- if (s3 === this.getMyUserID())
- return Za({ code: ha.CANNOT_SET_SELF_MEMBER_ROLE });
- var u2 = new Aa("setGroupMemberRole");
- 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) {
- return u2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok")), Ya({ group: i2, member: e4 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- u2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_filterProfanity", value: function(e3, t2) {
- var n3 = this.getModule(oo);
- if (!n3)
- return true;
- var o2 = n3.filterText(t2[e3], J), s3 = o2.isAllowedToSend, a2 = o2.modifiedText;
- return true === s3 && (t2[e3] = a2, true);
- } }, { key: "setGroupMemberNameCard", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("setGroupMemberNameCard");
- if (e3.nameCard && false === this._filterProfanity("nameCard", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var o2 = e3.groupID, s3 = e3.userID, a2 = void 0 === s3 ? this.getMyUserID() : s3, i2 = e3.nameCard;
- Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(a2));
- var r2 = new Aa("setGroupMemberNameCard");
- return r2.setMessage("groupID:".concat(o2, " userID:").concat(a2, " nameCard:").concat(i2)), this.modifyGroupMemberInfo({ groupID: o2, userID: a2, nameCard: i2 }).then(function(e4) {
- Ve.l("".concat(n3, " ok")), r2.setNetworkType(t2.getNetworkType()).end();
- var s4 = t2.getModule(Pn).getLocalGroupProfile(o2);
- return a2 === t2.getMyUserID() && s4 && s4.setSelfNameCard(i2), Ya({ group: s4, member: e4 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- r2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "setGroupMemberCustomField", value: function(e3) {
- 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;
- Ve.l("".concat(n3, " groupID:").concat(o2, " userID:").concat(a2));
- var r2 = new Aa("setGroupMemberCustomField");
- 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) {
- r2.setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(n3, " ok"));
- var s4 = t2.getModule(Pn).getLocalGroupProfile(o2);
- return Ya({ group: s4, member: e4 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- r2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "modifyGroupMemberInfo", value: function(e3) {
- var n3 = this, o2 = e3.groupID, s3 = e3.userID, a2 = void 0;
- return kt(o2) && (o2 = xt(a2 = o2)), this.request({ protocolName: ws, requestData: t(t({}, e3), {}, { groupID: o2, topicID: a2 }) }).then(function() {
- if (n3.hasLocalGroupMember(o2, s3)) {
- var t2 = n3.getLocalGroupMemberInfo(o2, s3);
- 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;
- }
- return n3.getGroupMemberProfile({ groupID: o2, userIDList: [s3] }).then(function(e4) {
- return v(e4.data.memberList, 1)[0];
- });
- });
- } }, { key: "markGroupMemberList", value: function(e3) {
- 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);
- Ve.l("".concat(n3, " ").concat(u2));
- var c2 = 2, l2 = [];
- true === a2 && (c2 = 1);
- var d2 = m(r2);
- r2.length > 500 && (d2 = r2.slice(0, 500), Ve.w("".concat(n3, " ").concat(Wt(500)))), d2.forEach(function(e4) {
- l2.push({ userID: e4, markType: [s3] });
- }), d2 = null;
- var p2 = new Aa("markGroupMemberList");
- return p2.setMessage("".concat(u2)), this.request({ protocolName: Fs, requestData: { groupID: o2, operationType: c2, memberList: l2 } }).then(function(e4) {
- var o3 = e4.data.memberList, s4 = void 0 === o3 ? [] : o3, a3 = [], i3 = [];
- s4.length === r2.length ? a3.push.apply(a3, m(r2)) : (s4.forEach(function(e5) {
- a3.push(e5.userID);
- }), r2.forEach(function(e5) {
- a3.includes(e5) || i3.push(e5);
- }));
- var u3 = "success count:".concat(a3.length, " fail count:").concat(i3.length);
- return p2.setNetworkType(t2.getNetworkType()).setMessage(u3).end(), Ve.l("".concat(n3, " ok. ").concat(u3)), Ya({ successUserIDList: a3, failureUserIDList: i3 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- p2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_getGroupMemberProfileAdvance", value: function(e3) {
- return this.request({ protocolName: Gs, requestData: t(t({}, e3), {}, { memberInfoFilter: e3.memberInfoFilter ? e3.memberInfoFilter : ["Role", "JoinTime", "NameCard", "ShutUpUntil"] }) });
- } }, { key: "_updateLocalGroupMemberMap", value: function(e3, t2) {
- var n3 = this;
- return at(t2) && 0 !== t2.length ? t2.map(function(t3) {
- return n3.hasLocalGroupMember(e3, t3.userID) ? n3.getLocalGroupMemberInfo(e3, t3.userID).updateMember(t3) : n3.setLocalGroupMember(e3, new xi(t3)), n3.getLocalGroupMemberInfo(e3, t3.userID);
- }) : [];
- } }, { key: "deleteLocalGroupMembers", value: function(e3, t2) {
- var n3 = this.groupMemberListMap.get(e3);
- n3 && t2.forEach(function(e4) {
- n3.delete(e4);
- });
- } }, { key: "getLocalGroupMemberInfo", value: function(e3, t2) {
- return this.groupMemberListMap.has(e3) ? this.groupMemberListMap.get(e3).get(t2) : null;
- } }, { key: "setLocalGroupMember", value: function(e3, t2) {
- if (this.groupMemberListMap.has(e3))
- this.groupMemberListMap.get(e3).set(t2.userID, t2);
- else {
- var n3 = (/* @__PURE__ */ new Map()).set(t2.userID, t2);
- this.groupMemberListMap.set(e3, n3);
- }
- } }, { key: "getLocalGroupMemberList", value: function(e3) {
- return this.groupMemberListMap.get(e3);
- } }, { key: "hasLocalGroupMember", value: function(e3, t2) {
- return this.groupMemberListMap.has(e3) && this.groupMemberListMap.get(e3).has(t2);
- } }, { key: "hasLocalGroupMemberMap", value: function(e3) {
- return this.groupMemberListMap.has(e3);
- } }, { key: "reset", value: function() {
- this.groupMemberListMap.clear();
- } }]), s2;
- }(uo), Bi = ["topicID", "topicName", "avatar", "introduction", "notification", "unreadCount", "muteAllMembers", "customData", "groupAtInfoList", "nextMessageSeq", "selfInfo"], Hi = function(e2, t2) {
- 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 };
- }, Ki = function() {
- function e2(t2, n2) {
- 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);
- }
- return a(e2, [{ key: "_initTopic", value: function(e3) {
- for (var t2 in e3)
- Bi.indexOf(t2) < 0 || ("selfInfo" === t2 ? this.updateSelfInfo(e3[t2]) : this[t2] = "muteAllMembers" === t2 ? 1 === e3[t2] : e3[t2]);
- } }, { key: "updateUnreadCount", value: function() {
- var e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
- this.unreadCount = e3;
- } }, { key: "updateNextMessageSeq", value: function(e3) {
- this.nextMessageSeq = e3;
- } }, { key: "updateLastMessage", value: function(e3) {
- this.lastMessage = Hi(e3);
- } }, { key: "updateGroupAtInfoList", value: function(e3) {
- this.groupAtInfoList = JSON.parse(JSON.stringify(e3));
- } }, { key: "updateTopic", value: function(e3) {
- it(e3.selfInfo) || this.updateSelfInfo(e3.selfInfo), it(e3.muteAllMembers) || (this.muteAllMembers = 1 === e3.muteAllMembers), pt(this, e3, ["groupID", "lastMessageTime", "selfInfo", "muteAllMembers", "lastMsg"]);
- } }, { key: "updateSelfInfo", value: function(e3) {
- return 0 !== pt(this.selfInfo, e3, [], [""]);
- } }, { key: "reduceUnreadCount", value: function() {
- return this.unreadCount >= 1 && (this.unreadCount -= 1, true);
- } }, { key: "isLastMessageRevoked", value: function(e3) {
- return e3.sequence === this.lastMessage.lastSequence;
- } }, { key: "setLastMessageRevoked", value: function(e3) {
- this.lastMessage.isRevoked = e3;
- } }, { key: "setLastMessageRevoker", value: function(e3) {
- this.lastMessage.revoker = e3;
- } }]), e2;
- }(), Wi = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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;
- }
- return a(s2, [{ key: "_onCloudConfigUpdated", value: function() {
- var e3 = this.getCloudConfig("topic_cache_time"), t2 = this.getCloudConfig("topic_last_active_time");
- it(e3) || (this.TOPIC_CACHE_TIME = Number(e3)), it(t2) || (this.TOPIC_LAST_ACTIVE_TIME = Number(t2));
- } }, { key: "onTopicCreated", value: function(e3) {
- var t2 = e3.groupID;
- this.resetGetTopicTime(t2), this.emitOuterEvent(k.TOPIC_CREATED, e3);
- } }, { key: "onTopicDeleted", value: function(e3) {
- var t2 = this, n3 = e3.groupID, o2 = e3.topicIDList;
- (void 0 === o2 ? [] : o2).forEach(function(e4) {
- t2._deleteLocalTopic(n3, e4);
- }), this.emitOuterEvent(k.TOPIC_DELETED, e3);
- } }, { key: "onTopicMessageRemindTypeUpdated", value: function(e3) {
- var t2 = e3.groupID, n3 = e3.topicID, o2 = e3.messageRemindType, s3 = this.getLocalTopic(t2, n3);
- if (s3) {
- var a2 = s3.updateSelfInfo({ messageRemindType: o2 });
- 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));
- }
- } }, { key: "onTopicProfileUpdated", value: function(e3) {
- var t2 = e3.groupID, n3 = e3.topicID, o2 = this.getLocalTopic(t2, n3);
- o2 && (o2.updateTopic(e3), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: o2 }));
- } }, { key: "onConversationProxy", value: function(e3) {
- var t2 = e3.topicID, n3 = e3.unreadCount, o2 = e3.groupAtInfoList, s3 = xt(t2), a2 = this.getLocalTopic(s3, t2), i2 = false;
- 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 });
- } }, { key: "onMessageSent", value: function(e3) {
- var t2 = e3.groupID, n3 = e3.topicID, o2 = e3.lastMessage, s3 = this.getLocalTopic(t2, n3);
- s3 && (s3.nextMessageSeq += 1, s3.updateLastMessage(o2), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: t2, topic: s3 }));
- } }, { key: "onMessageModified", value: function(e3) {
- 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);
- if (u2) {
- var c2 = u2.lastMessage;
- 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 }));
- }
- } }, { key: "onMessageRevoked", value: function(e3) {
- var t2 = this;
- if (0 !== e3.length) {
- var n3 = null, o2 = null, s3 = false;
- e3.forEach(function(e4) {
- var a2 = e4.to;
- o2 = xt(a2), (n3 = t2.getLocalTopic(o2, a2)) && (n3.reduceUnreadCount() && (s3 = true), n3.isLastMessageRevoked(e4) && (n3.setLastMessageRevoked(true), n3.setLastMessageRevoker(e4.revoker), s3 = true));
- }), s3 && this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: o2, topic: n3 });
- }
- } }, { key: "isLastMessageRevoked", value: function(e3) {
- var t2 = e3.topicID, n3 = e3.sequence, o2 = xt(t2), s3 = this.getLocalTopic(o2, t2), a2 = false;
- return s3 && (a2 = s3.isLastMessageRevoked({ sequence: n3 })), a2;
- } }, { key: "getJoinedCommunityList", value: function() {
- return this.getModule(Pn).getGroupList({ isGroupWithTopicOnly: true }).then(function(e3) {
- var t2 = e3.data.groupList;
- return Ya({ groupList: void 0 === t2 ? [] : t2 });
- }).catch(function(e3) {
- return Za(e3);
- });
- } }, { key: "createTopicInCommunity", value: function(e3) {
- var n3 = this, o2 = "".concat(this._n, ".").concat("createTopicInCommunity"), s3 = e3.topicID;
- if (!it(s3) && !kt(s3))
- return Za({ code: ha.ILLEGAL_TOPIC_ID });
- if (e3.topicName && false === this._filterProfanity("topicName", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.introduction && false === this._filterProfanity("introduction", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.notification && false === this._filterProfanity("notification", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var a2 = new Aa("createTopicInCommunity");
- return this.request({ protocolName: ta, requestData: t({}, e3) }).then(function(s4) {
- var i2 = s4.data.topicID;
- 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 });
- }).catch(function(e4) {
- return n3.probeNetwork().then(function(t2) {
- var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
- a2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "deleteTopicFromCommunity", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("deleteTopicFromCommunity"), o2 = e3.groupID, s3 = e3.topicIDList, a2 = void 0 === s3 ? [] : s3, i2 = new Aa("deleteTopicFromCommunity");
- return i2.setMessage("groupID:".concat(o2, " topicIDList:").concat(a2)), this.request({ protocolName: na, requestData: { groupID: o2, topicIDList: a2 } }).then(function(e4) {
- var n4 = e4.data.resultList, s4 = [], a3 = [];
- (void 0 === n4 ? [] : n4).forEach(function(e5) {
- var t3 = e5.topicID, n5 = e5.errorCode, o3 = e5.errorInfo;
- 0 === n5 ? s4.push({ topicID: t3 }) : a3.push({ topicID: t3, code: n5, message: o3 });
- });
- var r2 = "success count:".concat(s4.length, ", fail count:").concat(a3.length);
- return i2.setMoreMessage("".concat(r2)).setNetworkType(t2.getNetworkType()).end(), Ve.l("".concat(r2)), s4.forEach(function(e5) {
- t2._deleteLocalTopic(o2, e5.topicID);
- }), Ya({ successTopicList: s4, failureTopicList: a3 });
- }).catch(function(e4) {
- return t2.probeNetwork().then(function(t3) {
- var n4 = v(t3, 2), o3 = n4[0], s4 = n4[1];
- i2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "updateTopicProfile", value: function(e3) {
- var n3 = this, o2 = "".concat(this._n, ".").concat("updateTopicProfile");
- if (Ve.l("".concat(o2, " options:"), e3), e3.topicName && false === this._filterProfanity("topicName", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.introduction && false === this._filterProfanity("introduction", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.notification && false === this._filterProfanity("notification", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var s3 = new Aa("updateTopicProfile");
- 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() {
- return s3.setNetworkType(n3.getNetworkType()).end(), Ve.l("".concat(o2, " ok")), n3._updateTopicMap([e3]), Ya({ topic: n3.getLocalTopic(e3.groupID, e3.topicID) });
- }).catch(function(e4) {
- return n3.probeNetwork().then(function(t2) {
- var n4 = v(t2, 2), o3 = n4[0], a2 = n4[1];
- s3.setError(e4, o3, a2).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getTopicList", value: function(e3) {
- 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");
- if (u2.setMessage("groupID:".concat(s3)), this._getTopicTimeMap.has(s3)) {
- var c2 = this._getTopicTimeMap.get(s3), l2 = c2.isGetAll, d2 = c2.time;
- if ((l2 || !l2 && !r2) && Date.now() - d2 < 1e3 * this.TOPIC_CACHE_TIME) {
- var p2 = this._getLocalTopicList(s3, i2);
- if (r2 || p2.length === i2.length)
- 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: [] });
- }
- }
- return this.request({ protocolName: sa, requestData: { groupID: s3, topicIDList: i2 } }).then(function(e4) {
- var a3 = e4.data.topicInfoList, i3 = [], c3 = [], l3 = [];
- (void 0 === a3 ? [] : a3).forEach(function(e5) {
- var n4 = e5.topic, o3 = e5.selfInfo, s4 = e5.errorCode, a4 = e5.errorInfo, r3 = n4.topicID;
- 0 === s4 ? (i3.push(t(t({}, n4), {}, { selfInfo: o3 })), c3.push(r3)) : l3.push({ topicID: r3, code: s4, message: a4 });
- }), n3._updateTopicMap(i3), n3._handleTopicAtInfo(i3);
- var d3 = "success count:".concat(c3.length, ", fail count:").concat(l3.length);
- u2.setNetworkType(n3.getNetworkType()).setMoreMessage("".concat(d3)).end(), Ve.l("".concat(o2, " groupID:").concat(s3, " from remote, ").concat(d3));
- var p3 = [];
- return zt(c3) || (n3._getTopicTimeMap.set(s3, { time: Date.now(), isGetAll: r2 }), p3 = n3._getLocalTopicList(s3, c3)), Ya({ successTopicList: p3, failureTopicList: l3 });
- }).catch(function(e4) {
- return n3.probeNetwork(e4).then(function(t2) {
- var n4 = v(t2, 2), o3 = n4[0], s4 = n4[1];
- u2.setError(e4, o3, s4).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "hasLocalTopic", value: function(e3, t2) {
- return !!this._topicMap.has(e3) && this._topicMap.get(e3).has(t2);
- } }, { key: "getLocalTopic", value: function(e3, t2) {
- var n3 = null;
- return this._topicMap.has(e3) && (n3 = this._topicMap.get(e3).get(t2)), n3;
- } }, { key: "_getLocalTopicList", value: function(e3) {
- var t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], n3 = this._topicMap.get(e3), o2 = [];
- return n3 && (o2 = m(n3.values())), 0 === t2.length ? o2 : o2.filter(function(e4) {
- return t2.includes(e4.topicID);
- });
- } }, { key: "_deleteLocalTopic", value: function(e3, t2) {
- this._topicMap.has(e3) && (this._topicMap.get(e3).delete(t2), Ve.l("".concat(this._n, "._deleteLocalTopic groupID:").concat(e3, " topicID:").concat(t2)));
- } }, { key: "_updateTopicMap", value: function(e3) {
- var t2 = this, n3 = [];
- (e3.forEach(function(e4) {
- var o2 = e4.groupID, s3 = e4.topicID, a2 = null;
- 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));
- var i2 = t2._computeUnreadCount(a2);
- a2.updateUnreadCount(i2), n3.push({ conversationID: "".concat(E.CONV_GROUP).concat(s3), type: E.CONV_TOPIC, unreadCount: i2 });
- }), n3.length > 0) && this.getModule(qn).updateTopicConversation(n3);
- } }, { key: "resetGetTopicTime", value: function(e3) {
- var t2 = this;
- it(e3) ? m(this._getTopicTimeMap.keys()).forEach(function(e4) {
- t2._getTopicTimeMap.set(e4, 0);
- }) : this._getTopicTimeMap.set(e3, 0);
- } }, { key: "getTopicListOnReconnected", value: function() {
- var e3 = this, t2 = m(this._topicMap.keys()), n3 = [];
- t2.forEach(function(t3) {
- var o2 = [];
- e3._getLocalTopicList(t3).forEach(function(t4) {
- var n4 = t4.lastMessage.lastTime, s3 = void 0 === n4 ? 0 : n4;
- Date.now() - 1e3 * s3 < 1e3 * e3.TOPIC_LAST_ACTIVE_TIME && o2.push(t4.topicID);
- }), o2.length > 0 && n3.push({ groupID: t3, topicIDList: o2 });
- }), Ve.l("".concat(this._n, ".getTopicListOnReconnected. active community count:").concat(n3.length)), this._relayGetTopicList(n3);
- } }, { key: "_relayGetTopicList", value: function(e3) {
- var t2 = this;
- if (0 !== e3.length) {
- var n3 = e3.shift(), o2 = n3.topicIDList.length > 5 ? "topicIDList.length:".concat(n3.topicIDList.length) : "topicIDList:".concat(n3.topicIDList), s3 = new Aa("relayGetTopicList");
- s3.setMessage(o2), Ve.l("".concat(this._n, "._relayGetTopicList. ").concat(o2)), this.getTopicList(n3).then(function() {
- s3.setNetworkType(t2.getNetworkType()).end(), t2._relayGetTopicList(e3);
- }).catch(function(n4) {
- t2.probeNetwork().then(function(e4) {
- var t3 = v(e4, 2), o3 = t3[0], a2 = t3[1];
- s3.setError(n4, o3, a2).end();
- }), t2._relayGetTopicList(e3);
- });
- }
- } }, { key: "_handleTopicAtInfo", value: function(e3) {
- var n3 = this;
- 0 !== e3.length && e3.forEach(function(e4) {
- var o2 = e4.groupID, s3 = e4.topicID, a2 = e4.groupAtInfoList, i2 = [];
- it(a2) || (a2.forEach(function(e5) {
- i2.push(t(t({}, e5), {}, { groupID: o2, topicID: s3 }));
- }), n3.getModule(qn).onNewGroupAtTips({ dataList: i2 }));
- });
- } }, { key: "_getTopicLastMessage", value: function(e3) {
- if (!it(e3.lastMsg)) {
- 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 };
- e3.lastMessage = t2;
- }
- } }, { key: "deleteTopicListInCommunity", value: function(e3) {
- var t2 = this, n3 = this._getLocalTopicList(e3), o2 = this.getModule(qn);
- n3.forEach(function(n4) {
- var s3 = n4.topicID;
- t2._deleteLocalTopic(e3, s3), t2._getTopicTimeMap.delete(e3), o2.deleteLocalConversation("".concat(E.CONV_GROUP).concat(s3));
- });
- } }, { key: "_computeUnreadCount", value: function(e3) {
- var t2 = e3.selfInfo, n3 = t2.excludedUnreadSequenceList, o2 = t2.readedSequence, s3 = e3.nextMessageSeq - e3.selfInfo.readedSequence - 1;
- if (at(n3)) {
- var a2 = 0;
- n3.forEach(function(t3) {
- t3 >= o2 && t3 <= e3.nextMessageSeq - 1 && (a2 += 1);
- }), a2 >= 1 && (s3 -= a2);
- }
- return s3 < 0 ? 0 : s3;
- } }, { key: "_filterProfanity", value: function(e3, t2) {
- var n3 = this.getModule(oo);
- if (!n3)
- return true;
- var o2 = n3.filterText(t2[e3], z), s3 = o2.isAllowedToSend, a2 = o2.modifiedText;
- return true === s3 && (t2[e3] = a2, true);
- } }, { key: "updateLastMessage", value: function(e3, t2) {
- var n3 = xt(e3), o2 = this.getLocalTopic(n3, e3);
- if (o2) {
- var s3 = t2.sequence + 1;
- o2.updateNextMessageSeq(s3), o2.updateLastMessage(t2), this.emitOuterEvent(k.TOPIC_UPDATED, { groupID: n3, topic: o2 });
- }
- } }, { key: "getMessageExtensions", value: function(e3, t2) {
- Ve.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2));
- var n3 = xt(e3.to);
- return this.request({ protocolName: Ss, requestData: { groupID: n3, topicID: e3.to, messageSequence: e3.sequence, startSequence: t2 } });
- } }, { key: "modifyMessageExtensions", value: function(e3, t2) {
- var n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
- Ve.l("".concat(this._n, ".modifyMessageExtensions operateType:").concat(n3));
- var o2 = xt(e3.to);
- return this.request({ protocolName: Es, requestData: { groupID: o2, topicID: e3.to, messageSequence: e3.sequence, extensionList: t2, operateType: n3 } });
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._topicMap.clear(), this._getTopicTimeMap.clear(), this.TOPIC_CACHE_TIME = 300, this.TOPIC_LAST_ACTIVE_TIME = 3600;
- } }]), s2;
- }(uo), Yi = function() {
- function e2(t2) {
- o(this, e2), this._userModule = t2, this._n = "ProfileHandler", this.TAG = "profile", this.accountProfileMap = /* @__PURE__ */ new Map(), this.expirationTime = 864e5;
- }
- return a(e2, [{ key: "setExpirationTime", value: function(e3) {
- this.expirationTime = e3;
- } }, { key: "getUserProfile", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".").concat("getUserProfile"), o2 = e3.userIDList;
- e3.fromAccount = this._userModule.getMyAccount(), o2.length > 100 && (Ve.w("".concat(n2, " ").concat(Wt(100))), o2.length = 100);
- for (var s2, a2 = [], i2 = [], r2 = 0, u2 = o2.length; r2 < u2; r2++)
- s2 = o2[r2], this._userModule.isMyFriend(s2) && this._contains(s2) ? i2.push(this._getProfileFromMap(s2)) : a2.push(s2);
- if (0 === a2.length)
- return Xa(i2);
- e3.toAccount = a2;
- var c2 = e3.bFromGetMyProfile || false, l2 = [];
- e3.toAccount.forEach(function(e4) {
- l2.push({ toAccount: e4, standardSequence: 0, customSequence: 0 });
- }), e3.userItem = l2;
- var d2 = new Aa("getUserProfile");
- return d2.setMessage(o2.length > 5 ? "userIDList.length:".concat(o2.length) : "userIDList:".concat(o2)), this._userModule.request({ protocolName: mo, requestData: e3 }).then(function(e4) {
- d2.setNetworkType(t2._userModule.getNetworkType()).end(), Ve.i("".concat(n2, " ok"));
- var o3 = t2._handleResponse(e4).concat(i2);
- return Ya(c2 ? o3[0] : o3);
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- d2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getMyProfile", value: function() {
- var e3 = this._userModule.getMyAccount(), t2 = "".concat(this._n, ".getMyProfile");
- if (Ve.l("".concat(t2, " myAccount:").concat(e3)), this._fill(), this._contains(e3)) {
- var n2 = this._getProfileFromMap(e3);
- return Ve.d("".concat(t2, " from cache, myProfile:").concat(JSON.stringify(n2))), Xa(n2);
- }
- return this.getUserProfile({ fromAccount: e3, userIDList: [e3], bFromGetMyProfile: true });
- } }, { key: "_handleResponse", value: function(e3) {
- var t2 = e3.data.userProfileItem;
- if (!at(t2))
- return [];
- for (var n2 = [], o2 = Date.now(), s2 = 0, a2 = t2.length; s2 < a2; s2++) {
- var i2 = t2[s2], r2 = i2.to, u2 = i2.profileItem;
- if ("@TLS#NOT_FOUND" !== r2 && "" !== r2) {
- var c2 = this._update(r2, this._getLatestProfileFromResponse(r2, u2)).latestProfile;
- n2.push(c2);
- }
- }
- return Ve.l("".concat(this._n, "._handleResponse cost ").concat(Date.now() - o2, " ms")), n2;
- } }, { key: "_getLatestProfileFromResponse", value: function(e3, t2) {
- var n2 = { userID: e3, profileCustomField: [] };
- if (!zt(t2))
- for (var o2 = 0, s2 = t2.length; o2 < s2; o2++)
- if (t2[o2].tag.indexOf("Tag_Profile_Custom") > -1)
- n2.profileCustomField.push({ key: t2[o2].tag, value: t2[o2].value });
- else
- switch (t2[o2].tag) {
- case He.NICK:
- n2.nick = t2[o2].value;
- break;
- case He.GENDER:
- n2.gender = t2[o2].value;
- break;
- case He.BIRTHDAY:
- n2.birthday = t2[o2].value;
- break;
- case He.LOCATION:
- n2.location = t2[o2].value;
- break;
- case He.SELFSIGNATURE:
- n2.selfSignature = t2[o2].value;
- break;
- case He.ALLOWTYPE:
- n2.allowType = t2[o2].value;
- break;
- case He.LANGUAGE:
- n2.language = t2[o2].value;
- break;
- case He.AVATAR:
- n2.avatar = t2[o2].value;
- break;
- case He.MESSAGESETTINGS:
- n2.messageSettings = t2[o2].value;
- break;
- case He.ADMINFORBIDTYPE:
- n2.adminForbidType = t2[o2].value;
- break;
- case He.LEVEL:
- n2.level = t2[o2].value;
- break;
- case He.ROLE:
- n2.role = t2[o2].value;
- break;
- default:
- Ve.w("".concat(this._n, "._getLatestProfileFromResponse unknown tag:"), t2[o2].tag, t2[o2].value);
- }
- return n2;
- } }, { key: "updateMyProfile", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".").concat("updateMyProfile");
- if (e3.nick && false === this._userModule.filterProfanity("nick", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- if (e3.selfSignature && false === this._userModule.filterProfanity("selfSignature", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var o2 = new Aa("updateMyProfile");
- o2.setMessage(JSON.stringify(e3));
- var s2 = new li().validate(e3);
- if (!s2.valid)
- 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 });
- var a2 = [];
- for (var i2 in e3)
- Object.prototype.hasOwnProperty.call(e3, i2) && ("profileCustomField" === i2 ? e3.profileCustomField.forEach(function(e4) {
- a2.push({ tag: e4.key, value: e4.value });
- }) : a2.push({ tag: He[i2.toUpperCase()], value: e3[i2] }));
- if (0 === a2.length) {
- var r2 = new ja({ code: ha.UPDATE_PROFILE_NO_KEY });
- return o2.setError(r2, true, this._userModule.getNetworkType()).end(), Ve.e("".concat(n2, " failed. error:"), r2), Za(r2);
- }
- var u2 = this._userModule.getMyAccount();
- return this._userModule.request({ protocolName: Mo, requestData: { fromAccount: u2, profileItem: a2 } }).then(function(s3) {
- o2.setNetworkType(t2._userModule.getNetworkType()).end(), Ve.i("".concat(n2, " ok"));
- var a3 = t2._update(u2, e3), i3 = a3.isProfileUpdated, r3 = a3.latestProfile;
- return true === i3 && t2._userModule.emitOuterEvent(k.PROFILE_UPDATED, [r3]), Xa(r3);
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a3 = n3[1];
- o2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "onProfileModified", value: function(e3) {
- var t2 = e3.dataList;
- if (!zt(t2)) {
- var n2, o2 = t2.length;
- Ve.d("".concat(this._n, ".onProfileModified count:").concat(o2, " dataList:"), e3.dataList);
- for (var s2 = [], a2 = 0; a2 < o2; a2++) {
- n2 = t2[a2].userID;
- var i2 = this._update(n2, this._getLatestProfileFromResponse(n2, t2[a2].profileList)), r2 = i2.isProfileUpdated, u2 = i2.latestProfile;
- true === r2 && s2.push(u2);
- }
- s2.length > 0 && (this._userModule.emitInnerEvent(ni, s2), this._userModule.emitOuterEvent(k.PROFILE_UPDATED, s2));
- }
- } }, { key: "_fill", value: function() {
- if (0 === this.accountProfileMap.size) {
- for (var e3 = this._getCachedProfiles(), t2 = Date.now(), n2 = 0, o2 = e3.length; n2 < o2; n2++)
- t2 - e3[n2].lastUpdatedTime < this.expirationTime && this.accountProfileMap.set(e3[n2].userID, e3[n2]);
- Ve.l("".concat(this._n, "._fill from cache, size:").concat(this.accountProfileMap.size));
- }
- } }, { key: "_update", value: function(e3, t2) {
- var n2, o2 = false, s2 = Date.now();
- 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)));
- return this._flush(e3 === this._userModule.getMyAccount()), Ve.l("".concat(this._n, "._update account:").concat(e3, " isProfileUpdated:").concat(o2)), { isProfileUpdated: o2, latestProfile: n2 };
- } }, { key: "_flush", value: function(e3) {
- var t2 = m(this.accountProfileMap.values()), n2 = this._userModule.getStorageModule();
- Ve.d("".concat(this._n, "._flush length:").concat(t2.length, " flushAtOnce:").concat(e3)), n2.setItem(this.TAG, t2, e3);
- } }, { key: "_contains", value: function(e3) {
- return this.accountProfileMap.has(e3);
- } }, { key: "_getProfileFromMap", value: function(e3) {
- return this.accountProfileMap.get(e3);
- } }, { key: "_getCachedProfiles", value: function() {
- var e3 = this._userModule.getStorageModule().getItem(this.TAG);
- return zt(e3) ? [] : e3;
- } }, { key: "onConversationsProfileUpdated", value: function(e3) {
- for (var t2, n2, o2, s2 = [], a2 = 0, i2 = e3.length; a2 < i2; a2++)
- 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));
- 0 !== s2.length && (Ve.i("".concat(this._n, ".onConversationsProfileUpdated toAccountList:").concat(s2)), this.getUserProfile({ userIDList: s2 }));
- } }, { key: "getNickAndAvatarByUserID", value: function(e3) {
- if (this._contains(e3)) {
- var t2 = this._getProfileFromMap(e3);
- return { nick: t2.nick, avatar: t2.avatar };
- }
- return { nick: "", avatar: "" };
- } }, { key: "reset", value: function() {
- this._flush(true), this.accountProfileMap.clear();
- } }]), e2;
- }(), ji = a(function e2(t2) {
- o(this, e2), zt || (this.userID = t2.userID || "", this.timeStamp = t2.timeStamp || 0);
- }), zi = function() {
- function e2(t2) {
- o(this, e2), this._userModule = t2, this._n = "BlacklistHandler", this._blacklistMap = /* @__PURE__ */ new Map(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0;
- }
- return a(e2, [{ key: "getLocalBlacklist", value: function() {
- return m(this._blacklistMap.keys());
- } }, { key: "getBlacklist", value: function() {
- 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");
- return this._userModule.request({ protocolName: yo, requestData: n2 }).then(function(n3) {
- var s2 = n3.data, a2 = s2.blackListItem, i2 = s2.currentSequence, r2 = zt(a2) ? 0 : a2.length;
- 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()));
- }).catch(function(n3) {
- return e3._userModule.probeNetwork().then(function(e4) {
- var t3 = v(e4, 2), s2 = t3[0], a2 = t3[1];
- o2.setError(n3, s2, a2).end();
- }), Ve.e("".concat(t2, " failed. error:"), n3), Za(n3);
- });
- } }, { key: "addBlacklist", value: function(e3) {
- var t2 = this, n2 = new Aa("addToBlacklist"), o2 = "".concat(this._n, ".addBlacklist"), s2 = this._userModule.getMyAccount();
- if (1 === e3.userIDList.length && e3.userIDList[0] === s2) {
- var a2 = ha.CANNOT_ADD_SELF_TO_BLACKLIST, i2 = this._userModule.getErrorMessage(a2);
- n2.setCode(a2).setMessage(i2).setNetworkType(this._userModule.getNetworkType()).end();
- var r2 = new ja({ code: a2 });
- return Ve.e("".concat(o2, " failed. error:"), r2), Za(r2);
- }
- return e3.userIDList.includes(s2) && (e3.userIDList = e3.userIDList.filter(function(e4) {
- return e4 !== s2;
- })), e3.fromAccount = this._userModule.getMyAccount(), e3.toAccount = e3.userIDList, this._userModule.request({ protocolName: Io, requestData: e3 }).then(function(s3) {
- 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()));
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var o3 = v(t3, 2), s3 = o3[0], a3 = o3[1];
- n2.setError(e4, s3, a3).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_handleResponse", value: function(e3, t2) {
- if (!zt(e3))
- for (var n2, o2, s2, a2 = 0, i2 = e3.length; a2 < i2; a2++)
- 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)));
- Ve.l("".concat(this._n, "._handleResponse total:").concat(this._blacklistMap.size, " bAdd:").concat(t2));
- } }, { key: "deleteBlacklist", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".deleteBlacklist"), o2 = new Aa("removeFromBlacklist");
- return e3.fromAccount = this._userModule.getMyAccount(), e3.toAccount = e3.userIDList, this._userModule.request({ protocolName: Co, requestData: e3 }).then(function(s2) {
- 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()));
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s2 = n3[0], a2 = n3[1];
- o2.setError(e4, s2, a2).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "onAccountDeleted", value: function(e3) {
- for (var t2, n2 = [], o2 = 0, s2 = e3.length; o2 < s2; o2++)
- t2 = e3[o2], this._blacklistMap.has(t2) && (this._blacklistMap.delete(t2), n2.push(t2));
- 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())));
- } }, { key: "onAccountAdded", value: function(e3) {
- for (var t2, n2 = [], o2 = 0, s2 = e3.length; o2 < s2; o2++)
- t2 = e3[o2], this._blacklistMap.has(t2) || (this._blacklistMap.set(t2, new ji({ userID: t2 })), n2.push(t2));
- 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())));
- } }, { key: "reset", value: function() {
- this._blacklistMap.clear(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0;
- } }]), e2;
- }(), Ji = function(e2) {
- var t2 = String(e2).replace(/[=]+$/, ""), n2 = "";
- if (t2.length % 4 == 1)
- return "";
- 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)
- s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s2);
- try {
- return decodeURIComponent(escape(n2));
- } catch (r2) {
- return "";
- }
- }, Xi = function() {
- function e2(t2) {
- 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);
- }
- return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
- var e3 = this._userModule.getCloudConfig("status_query_count"), t2 = this._userModule.getCloudConfig("status_sub_count"), n2 = this._userModule.getCloudConfig("status_unsub_count");
- 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));
- } }, { key: "onUserStatusUpdated", value: function(e3) {
- var t2 = e3.dataList, n2 = this._userModule.getMyUserID(), o2 = this._userModule.getModule(xn), s2 = t2.map(function(e4) {
- var t3 = e4.to, s3 = e4.statusType, a2 = e4.customStatus, i2 = Ji(a2);
- return t3 === n2 && o2.setCustomStatus(i2), { userID: t3, statusType: s3, customStatus: i2 };
- });
- this._userModule.emitOuterEvent(k.USER_STATUS_UPDATED, s2);
- } }, { key: "setSelfStatus", value: function(e3) {
- var t2 = this, n2 = "".concat(this._n, ".setSelfStatus");
- if (false === this._userModule.filterProfanity("customStatus", e3))
- return Za({ code: ha.PROFANITY_FOUND });
- var o2 = new Aa("setSelfStatus"), s2 = e3.customStatus;
- return this._userModule.request({ protocolName: aa, requestData: { customStatus: s2 } }).then(function(e4) {
- 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 });
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), s3 = n3[0], a2 = n3[1];
- o2.setError(e4, s3, a2).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getUserStatus", value: function(e3) {
- 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);
- if (u2 > -1) {
- i2.splice(u2, 1);
- var c2 = this._userModule.getModule(xn).getCustomStatus();
- r2 = { userID: a2, statusType: 1, customStatus: c2 };
- }
- if (0 === i2.length)
- return Xa({ successUserList: [r2], failureUserList: [] });
- if (!this._userModule.canIUse(B.USER_STATUS))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- 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));
- var l2 = new Aa("getUserStatus");
- return this._userModule.request({ protocolName: ia, requestData: { userIDList: i2 } }).then(function(e4) {
- 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) {
- var t3 = e5.userID, n3 = e5.statusType, o4 = e5.customStatus;
- return { userID: t3, statusType: n3, customStatus: Ji(o4) };
- }), p2 = c3.map(function(e5) {
- var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s3 = e5.errorInfo;
- return { userID: zt(n3) ? t3 : n3, code: o4, message: s3 };
- });
- it(r2) || d2.unshift(r2);
- var g2 = "userID count:".concat(s2.length, ", success count:").concat(d2.length, ", fail count:").concat(p2.length);
- return l2.setNetworkType(t2._userModule.getNetworkType()).setMessage("".concat(g2)).end(), Ve.l("".concat(n2, " ok. ").concat(g2, ".")), Ya({ successUserList: d2, failureUserList: p2 });
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], a3 = n3[1];
- l2.setMessage("userID count:".concat(s2.length)).setError(e4, o3, a3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "subscribeUserStatus", value: function(e3) {
- var t2 = this;
- if (!this._userModule.canIUse(B.USER_STATUS))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".subscribeUserStatus"), o2 = e3.userIDList, s2 = void 0 === o2 ? [] : o2, a2 = m(s2);
- 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));
- var i2 = new Aa("subscribeUserStatus"), r2 = "userID count:".concat(s2.length);
- return Ve.l("".concat(n2, " ").concat(r2)), this._userModule.request({ protocolName: ra, requestData: { userIDList: a2 } }).then(function(e4) {
- var o3 = e4.data.failureUserList, s3 = (void 0 === o3 ? [] : o3).map(function(e5) {
- var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s4 = e5.errorInfo;
- return { userID: zt(n3) ? t3 : n3, code: o4, message: s4 };
- });
- 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 });
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- i2.setMessage("".concat(r2)).setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "unsubscribeUserStatus", value: function(e3) {
- var t2 = this;
- if (!this._userModule.canIUse(B.USER_STATUS))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var n2 = "".concat(this._n, ".unsubscribeUserStatus"), o2 = (e3 || {}).userIDList, s2 = void 0 === o2 ? [] : o2, a2 = m(s2);
- 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));
- var i2 = new Aa("unsubscribeUserStatus"), r2 = "userID count:".concat(s2.length);
- Ve.l("".concat(n2, " ").concat(r2));
- var u2 = { userIDList: a2 };
- return 0 === a2.length && (u2.userIDList = void 0, u2.unsubscribeAll = 1), this._userModule.request({ protocolName: ua, requestData: u2 }).then(function(e4) {
- var o3 = e4.data.failureUserList, s3 = (void 0 === o3 ? [] : o3).map(function(e5) {
- var t3 = e5.userID, n3 = e5.invalidUserID, o4 = e5.errorCode, s4 = e5.errorInfo;
- return { userID: zt(n3) ? t3 : n3, code: o4, message: s4 };
- });
- 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 });
- }).catch(function(e4) {
- return t2._userModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- i2.setMessage("".concat(r2)).setError(e4, o3, s3).end();
- }), Ve.e("".concat(n2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "reset", value: function() {
- this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100;
- } }]), e2;
- }(), Zi = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "onContextUpdated", value: function(e3) {
- this._profileHandler.getMyProfile(), this._blacklistHandler.getBlacklist();
- } }, { key: "onProfileModified", value: function(e3) {
- this._profileHandler.onProfileModified(e3);
- } }, { key: "onRelationChainModified", value: function(e3) {
- var t3 = e3.dataList;
- if (!zt(t3)) {
- var n3 = [];
- t3.forEach(function(e4) {
- e4.blackListDelAccount && n3.push.apply(n3, m(e4.blackListDelAccount));
- }), n3.length > 0 && this._blacklistHandler.onAccountDeleted(n3);
- var o2 = [];
- t3.forEach(function(e4) {
- e4.blackListAddAccount && o2.push.apply(o2, m(e4.blackListAddAccount));
- }), o2.length > 0 && this._blacklistHandler.onAccountAdded(o2);
- }
- } }, { key: "onConversationsProfileUpdated", value: function(e3) {
- this._profileHandler.onConversationsProfileUpdated(e3);
- } }, { key: "getMyAccount", value: function() {
- return this.getMyUserID();
- } }, { key: "getMyProfile", value: function() {
- return this._profileHandler.getMyProfile();
- } }, { key: "getStorageModule", value: function() {
- return this.getModule(Vn);
- } }, { key: "filterProfanity", value: function(e3, t3) {
- var n3 = this.getModule(oo);
- if (!n3)
- return true;
- var o2 = n3.filterText(t3[e3], j), s2 = o2.isAllowedToSend, a2 = o2.modifiedText;
- return true === s2 && (t3[e3] = a2, true);
- } }, { key: "isMyFriend", value: function(e3) {
- var t3 = this.getModule(bn);
- return !!t3 && t3.isMyFriend(e3);
- } }, { key: "getUserProfile", value: function(e3) {
- return this._profileHandler.getUserProfile(e3);
- } }, { key: "updateMyProfile", value: function(e3) {
- return this._profileHandler.updateMyProfile(e3);
- } }, { key: "getNickAndAvatarByUserID", value: function(e3) {
- return this._profileHandler.getNickAndAvatarByUserID(e3);
- } }, { key: "getLocalBlacklist", value: function() {
- var e3 = this._blacklistHandler.getLocalBlacklist();
- return Xa(e3);
- } }, { key: "addBlacklist", value: function(e3) {
- return this._blacklistHandler.addBlacklist(e3);
- } }, { key: "deleteBlacklist", value: function(e3) {
- return this._blacklistHandler.deleteBlacklist(e3);
- } }, { key: "onUserStatusUpdated", value: function(e3) {
- this._userStatusHandler.onUserStatusUpdated(e3);
- } }, { key: "setSelfStatus", value: function(e3) {
- return this._userStatusHandler.setSelfStatus(e3);
- } }, { key: "getUserStatus", value: function(e3) {
- return this._userStatusHandler.getUserStatus(e3);
- } }, { key: "subscribeUserStatus", value: function(e3) {
- return this._userStatusHandler.subscribeUserStatus(e3);
- } }, { key: "unsubscribeUserStatus", value: function(e3) {
- return this._userStatusHandler.unsubscribeUserStatus(e3);
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._profileHandler.reset(), this._blacklistHandler.reset(), this._userStatusHandler.reset();
- } }]), n2;
- }(uo), Qi = function() {
- function e2(t2, n2) {
- 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;
- }
- return a(e2, [{ key: "isLoggedIn", value: function() {
- return this._isLoggedIn;
- } }, { key: "isOversea", value: function() {
- return this._oversea;
- } }, { key: "isPrivateNetWork", value: function() {
- return this._proxyServer;
- } }, { key: "isDevMode", value: function() {
- return this._isDevMode;
- } }, { key: "isSingaporeSite", value: function() {
- return this._SDKAppID >= 2e7 && this._SDKAppID < 3e7 || this._SDKAppID >= 172e7 && this._SDKAppID < 173e7;
- } }, { key: "isKoreaSite", value: function() {
- return this._SDKAppID >= 3e7 && this._SDKAppID < 4e7 || this._SDKAppID >= 173e7 && this._SDKAppID < 174e7;
- } }, { key: "isGermanySite", value: function() {
- return this._SDKAppID >= 4e7 && this._SDKAppID < 5e7 || this._SDKAppID >= 174e7 && this._SDKAppID < 175e7;
- } }, { key: "isIndiaSite", value: function() {
- return this._SDKAppID >= 5e7 && this._SDKAppID < 6e7 || this._SDKAppID >= 175e7 && this._SDKAppID < 176e7;
- } }, { key: "isJapanSite", value: function() {
- return this._SDKAppID >= 6e7 && this._SDKAppID < 7e7 || this._SDKAppID >= 176e7 && this._SDKAppID < 177e7;
- } }, { key: "isUSASite", value: function() {
- return this._SDKAppID >= 7e7 && this._SDKAppID < 8e7 || this._SDKAppID >= 177e7 && this._SDKAppID < 178e7;
- } }, { key: "isIntl", value: function() {
- return 0 === (e3 = this._SDKAppID) || e3 >= 2e7 && e3 < 8e7 || e3 >= 172e7 && e3 < 178e7;
- var e3;
- } }, { key: "isUnlimitedAVChatRoom", value: function() {
- return this._unlimitedAVChatRoom;
- } }, { key: "setUserID", value: function(e3) {
- this._userID = e3;
- } }, { key: "getUserID", value: function() {
- return this._userID;
- } }, { key: "setUserSig", value: function(e3) {
- this._userSig = e3;
- } }, { key: "getUserSig", value: function() {
- return this._userSig;
- } }, { key: "getSDKAppID", value: function() {
- return this._SDKAppID;
- } }, { key: "setTinyID", value: function(e3) {
- this._tinyID = e3, this._isLoggedIn = true;
- } }, { key: "getTinyID", value: function() {
- return this._tinyID;
- } }, { key: "setCustomStatus", value: function(e3) {
- this._customStatus = e3;
- } }, { key: "getCustomStatus", value: function() {
- return this._customStatus;
- } }, { key: "getScene", value: function() {
- return Ae ? window.tencent_cloud_im_csig_flutter_for_web_25F_cy : this._isTUIKit() ? "tuikit" : this._scene;
- } }, { key: "getInstanceID", value: function() {
- return this._instanceID;
- } }, { key: "getStatusInstanceID", value: function() {
- return this._statusInstanceID;
- } }, { key: "setStatusInstanceID", value: function(e3) {
- this._statusInstanceID = e3;
- } }, { key: "getVersion", value: function() {
- return this._version;
- } }, { key: "getA2Key", value: function() {
- return this._a2Key;
- } }, { key: "setA2Key", value: function(e3) {
- this._a2Key = e3;
- } }, { key: "getContentType", value: function() {
- return this._contentType;
- } }, { key: "getProxyServer", value: function() {
- return this._proxyServer;
- } }, { key: "getFileUploadProxy", value: function() {
- return this._fileUploadProxy;
- } }, { key: "getFileDownloadProxy", value: function() {
- return this._fileDownloadProxy;
- } }, { key: "_isTUIKit", value: function() {
- var e3 = false, t2 = false, n2 = false, o2 = false, s2 = [];
- ae && (s2 = Object.keys(re)), ie && (s2 = se ? Object.keys(uni) : Object.keys(window));
- for (var a2 = 0, i2 = s2.length; a2 < i2; a2++)
- if (s2[a2].toLowerCase().includes("uikit")) {
- e3 = true;
- break;
- }
- if (s2 = null, ae && !ut(re.createGamePortal) && ut(getApp) && !it(getApp())) {
- var r2 = getApp().globalData;
- st(r2) && true === r2.isTUIKit && (t2 = true);
- }
- true === this._m.getModule(Vn).getStorageSync("TIM_".concat(this._SDKAppID, "_isTUIKit")) && (n2 = true);
- var u2 = null;
- if (X && !$ && "undefined" == typeof uni && __wxConfig && (u2 = __wxConfig.pages), Q && "undefined" == typeof uni && __qqConfig && (u2 = __qqConfig.pages), at(u2) && u2.length > 0) {
- for (var c2 = 0, l2 = u2.length; c2 < l2; c2++)
- if (u2[c2].toLowerCase().includes("tui")) {
- o2 = true;
- break;
- }
- u2 = null;
- }
- return e3 || t2 || n2 || o2;
- } }, { key: "reset", value: function() {
- this._isLoggedIn = false, this._userSig = "", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._statusInstanceID = 0;
- } }]), e2;
- }(), $i = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "onCheckTimer", value: function(e3) {
- this.isLoggedIn() && e3 % this._helloInterval == 0 && this._hello();
- } }, { key: "login", value: function(e3) {
- var t3 = "";
- if (this.isLoggedIn()) {
- var n3 = this.getMyUserID();
- return (t3 = this.getErrorMessage("RepeatLogin", n3)) && Ve.w(t3), Xa({ actionStatus: "OK", errorCode: 0, errorInfo: t3, repeatLogin: true });
- }
- if (Date.now() - this._lastLoginTs <= 15e3)
- return this.outputWarning("LoggingIn", e3.userID), Za({ code: ha.REPEAT_LOGIN });
- Ve.l("".concat(this._n, ".login userID:").concat(e3.userID));
- var o2 = this._checkLoginInfo(e3);
- if (0 !== o2.code)
- return Za(o2);
- var s2 = this.getModule(xn), a2 = e3.userID, i2 = e3.userSig;
- return s2.setUserID(a2), s2.setUserSig(i2), this.getModule(zn).updateProtocolConfig(), this._login();
- } }, { key: "_login", value: function() {
- var e3 = this, t3 = this.getModule(xn), n3 = t3.getScene(), o2 = 0, s2 = new Aa("login");
- 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));
- var a2 = this.getModule(no);
- if (a2.canIUseOfflinePush()) {
- this._isWebUniapp = a2.getUniAppPlatform();
- var i2 = this._getStatusInstanceID();
- t3.setStatusInstanceID(i2), this.getModule(zn).updateProtocolConfig(), o2 = a2.getDeviceBrand();
- }
- var r2 = "".concat(this._n, "._login");
- return this._lastLoginTs = Date.now(), this.request({ protocolName: co, requestData: { deviceBrand: o2, isWebUniapp: this._isWebUniapp } }).then(function(o3) {
- e3._lastLoginTs = 0;
- 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;
- Ve.l("".concat(r2, " ok. scene:").concat(n3, " helloInterval:").concat(d2, " instanceID:").concat(p2, " timeStamp:").concat(g2));
- var v2 = 1e3 * g2, m2 = a3 - s2.getStartTs(), M2 = v2 + parseInt(m2 / 2) - a3, y2 = s2.getStartTs() + M2;
- if (s2.start(y2), function(e4, t4) {
- Ue = t4;
- var n4 = /* @__PURE__ */ new Date();
- n4.setTime(e4), Ve.i("baseTime from server:".concat(n4, " offset:").concat(Ue));
- }(v2, M2), !l2)
- throw i3 = new ja({ code: ha.NO_TINYID }), s2.setError(i3, true, e3.getNetworkType()).end(), i3;
- if (!c2)
- throw i3 = new ja({ code: ha.NO_A2KEY }), s2.setError(i3, true, e3.getNetworkType()).end(), i3;
- var I2 = Ji(_2);
- (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 });
- e3.getModule(zn).updateProtocolConfig(), e3.emitInnerEvent(ei), e3._helloInterval = d2, e3.triggerReady();
- var C2 = e3.getModule(no);
- return C2.canIUseOfflinePush() && (uni.setStorageSync("timUniAppInstanceID", p2), C2.init()), e3._fetchCloudControlConfig(), e3.getModule(oo).init(), o3;
- }).catch(function(t4) {
- return e3.probeNetwork().then(function(e4) {
- var n4 = v(e4, 2), o3 = n4[0], a3 = n4[1];
- s2.setError(t4, o3, a3).end(true);
- }), e3._m.setNotReadyReason(ha.LOGIN_FAILED), Ve.e("".concat(r2, " failed. error:"), t4), e3._lastLoginTs = 0, e3._m.onLoginFailed(), Za(t4);
- });
- } }, { key: "logout", value: function() {
- var e3 = this, t3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
- if (!this.isLoggedIn())
- return Za({ code: ha.USER_NOT_LOGGED_IN });
- var n3 = new Aa("logout");
- n3.setNetworkType(this.getNetworkType()).setMessage("identifier:".concat(this.getMyUserID())).end(true);
- var o2 = "".concat(this._n, ".logout");
- 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() {
- return e3.resetReady(), Xa({});
- }).catch(function(t4) {
- return Ve.e("".concat(o2, " error:"), t4), e3.resetReady(), Xa({});
- });
- } }, { key: "_fetchCloudControlConfig", value: function() {
- this.getModule(Zn).fetchConfig();
- } }, { key: "_getStatusInstanceID", value: function() {
- return uni.getStorageSync("timUniAppInstanceID");
- } }, { key: "_hello", value: function() {
- var e3 = this;
- this._lastWsHelloTs = Date.now(), this.request({ protocolName: po, requestData: { isWebUniapp: this._isWebUniapp } }).catch(function(t3) {
- Ve.w("".concat(e3._n, "._hello error:"), t3);
- });
- } }, { key: "getLastWsHelloTs", value: function() {
- return this._lastWsHelloTs;
- } }, { key: "_checkLoginInfo", value: function(e3) {
- var t3 = 0;
- 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 };
- } }, { key: "_isReactUIKit", value: function() {
- return ie && void 0 !== window.tencent_cloud_im_csig_react_uikit_23F_xa;
- } }, { key: "onMultipleAccountKickedOut", value: function(e3) {
- var t3 = this;
- 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() {
- t3.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_MULT_ACCOUNT }), t3._m.setNotReadyReason(ha.KICKED_OUT_MULT_ACCOUNT), t3._m.reset();
- });
- } }, { key: "onMultipleDeviceKickedOut", value: function(e3) {
- var t3 = this;
- 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() {
- t3.emitOuterEvent(k.KICKED_OUT, { type: E.KICKED_OUT_MULT_DEVICE }), t3._m.setNotReadyReason(ha.KICKED_OUT_MULT_DEVICE), t3._m.reset();
- });
- } }, { key: "onUserSigExpired", value: function() {
- 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());
- } }, { key: "onRestApiKickedOut", value: function(e3) {
- (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());
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this.resetReady(), this._helloInterval = 120, this._lastLoginTs = 0, this._lastWsHelloTs = 0, this._isWebUniapp = 0;
- } }]), n2;
- }(uo);
- function er() {
- return null;
- }
- var tr = function() {
- function e2(t2) {
- o(this, e2), this._m = t2, this._n = "StorageModule", this._storageQueue = /* @__PURE__ */ new Map(), this._errorTolerantHandle();
- }
- return a(e2, [{ key: "_errorTolerantHandle", value: function() {
- ae || !it(window) && this._canIUseCookies() || (this.getItem = er, this.setItem = er, this.removeItem = er, this.clear = er);
- } }, { key: "onCheckTimer", value: function(e3) {
- if (e3 % 20 == 0) {
- if (0 === this._storageQueue.size)
- return;
- this._doFlush();
- }
- } }, { key: "_doFlush", value: function() {
- try {
- var e3, t2 = D(this._storageQueue);
- try {
- for (t2.s(); !(e3 = t2.n()).done; ) {
- var n2 = v(e3.value, 2), o2 = n2[0], s2 = n2[1];
- this._setStorageSync(this._getKey(o2), s2);
- }
- } catch (a2) {
- t2.e(a2);
- } finally {
- t2.f();
- }
- this._storageQueue.clear();
- } catch (i2) {
- Ve.w("".concat(this._n, "._doFlush error:"), i2);
- }
- } }, { key: "_getPrefix", value: function() {
- var e3 = this._m.getModule(xn);
- return "TIM_".concat(e3.getSDKAppID(), "_").concat(e3.getUserID(), "_");
- } }, { key: "_getKey", value: function(e3) {
- return "".concat(this._getPrefix()).concat(e3);
- } }, { key: "getItem", value: function(e3) {
- var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
- try {
- var n2 = t2 ? this._getKey(e3) : e3;
- return this.getStorageSync(n2);
- } catch (o2) {
- return Ve.w("".concat(this._n, ".getItem error:"), o2), {};
- }
- } }, { key: "setItem", value: function(e3, t2) {
- var n2 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], o2 = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3];
- if (n2) {
- var s2 = o2 ? this._getKey(e3) : e3;
- this._setStorageSync(s2, t2);
- } else
- this._storageQueue.set(e3, t2);
- } }, { key: "clear", value: function() {
- try {
- ae ? re.clearStorageSync() : this._canIUseCookies() && localStorage.clear();
- } catch (e3) {
- Ve.w("".concat(this._n, ".clear error:"), e3);
- }
- } }, { key: "removeItem", value: function(e3) {
- var t2 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
- try {
- var n2 = t2 ? this._getKey(e3) : e3;
- this._removeStorageSync(n2);
- } catch (o2) {
- Ve.w("".concat(this._n, ".removeItem error:"), o2);
- }
- } }, { key: "getSize", value: function(e3) {
- var t2 = this, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "b";
- try {
- var o2 = { size: 0, limitSize: 5242880, unit: n2 };
- if (Object.defineProperty(o2, "leftSize", { enumerable: true, get: function() {
- return o2.limitSize - o2.size;
- } }), ae && (o2.limitSize = 1024 * re.getStorageInfoSync().limitSize), e3)
- o2.size = JSON.stringify(this.getItem(e3)).length + this._getKey(e3).length;
- else if (ae) {
- var s2 = re.getStorageInfoSync(), a2 = s2.keys;
- a2.forEach(function(e4) {
- o2.size += JSON.stringify(t2.getStorageSync(e4)).length + t2._getKey(e4).length;
- });
- } else if (this._canIUseCookies())
- for (var i2 in localStorage)
- localStorage.hasOwnProperty(i2) && (o2.size += localStorage.getItem(i2).length + i2.length);
- return this._convertUnit(o2);
- } catch (r2) {
- Ve.w("".concat(this._n, " error:"), r2);
- }
- } }, { key: "_convertUnit", value: function(e3) {
- var t2 = {}, n2 = e3.unit;
- for (var o2 in t2.unit = n2, e3)
- "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]);
- return t2;
- } }, { key: "_setStorageSync", value: function(e3, t2) {
- ae ? te ? my.setStorageSync({ key: e3, data: t2 }) : re.setStorageSync(e3, t2) : this._canIUseCookies() && localStorage.setItem(e3, JSON.stringify(t2));
- } }, { key: "getStorageSync", value: function(e3) {
- return ae ? te ? my.getStorageSync({ key: e3 }).data : re.getStorageSync(e3) : this._canIUseCookies() ? JSON.parse(localStorage.getItem(e3)) : {};
- } }, { key: "_removeStorageSync", value: function(e3) {
- ae ? te ? my.removeStorageSync({ key: e3 }) : re.removeStorageSync(e3) : this._canIUseCookies() && localStorage.removeItem(e3);
- } }, { key: "_canIUseCookies", value: function() {
- return navigator && navigator.cookieEnabled && localStorage;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._doFlush();
- } }]), e2;
- }(), nr = function() {
- function e2(t2) {
- o(this, e2), this._n = "SSOLogBody", this._report = [];
- }
- return a(e2, [{ key: "pushIn", value: function(e3) {
- Ve.d("".concat(this._n, ".pushIn"), this._report.length, e3), this._report.push(e3);
- } }, { key: "backfill", value: function(e3) {
- var t2;
- at(e3) && 0 !== e3.length && (Ve.d("".concat(this._n, ".backfill"), this._report.length, e3.length), (t2 = this._report).unshift.apply(t2, m(e3)));
- } }, { key: "getLogsNumInMemory", value: function() {
- return this._report.length;
- } }, { key: "isEmpty", value: function() {
- return 0 === this._report.length;
- } }, { key: "_reset", value: function() {
- this._report.length = 0, this._report = [];
- } }, { key: "getLogsInMemory", value: function() {
- var e3 = this._report.slice();
- return this._reset(), e3;
- } }]), e2;
- }(), or = function(e2) {
- var t2 = e2.getModule(xn);
- return { SDKType: 10, SDKAppID: t2.getSDKAppID(), SDKVersion: t2.getVersion(), tinyID: Number(t2.getTinyID()), userID: t2.getUserID(), platform: e2.getPlatform(), instanceID: t2.getInstanceID(), traceID: Pe() };
- }, sr = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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();
- var a2 = t2.getInnerEmitterInstance();
- return a2.on(ei, t2._onLoginSuccess, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
- }
- return a(s2, [{ key: "reportAtOnce", value: function() {
- Ve.d("".concat(this._n, ".reportAtOnce")), this._report();
- } }, { key: "_onLoginSuccess", value: function() {
- var e3 = this, t2 = this.getModule(Vn), n3 = t2.getItem(this.TAG, false);
- !zt(n3) && ut(n3.forEach) && (Ve.l("".concat(this._n, "._onLoginSuccess get ssolog in storage, count:").concat(n3.length)), n3.forEach(function(t3) {
- e3._reportBody.pushIn(t3);
- }), t2.removeItem(this.TAG, false));
- } }, { key: "_onCloudConfigUpdated", value: function() {
- 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");
- it(e3) || (this.MIN_THRESHOLD = Number(e3)), it(t2) || (this.WAITING_TIME = Number(t2)), it(n3) || (this.REPORT_LEVEL = n3.split(",").map(function(e4) {
- return Number(e4);
- })), it(o2) || (this.REPORT_SDKAPPID_BLACKLIST = o2.split(",").map(function(e4) {
- return Number(e4);
- })), it(s3) || (this.REPORT_TINYID_WHITELIST = s3.split(","));
- } }, { key: "pushIn", value: function(e3) {
- e3 instanceof Aa && (e3.updateTimeStamp(), this._reportBody.pushIn(e3), this._reportBody.getLogsNumInMemory() >= this.MIN_THRESHOLD && this._report());
- } }, { key: "onCheckTimer", value: function() {
- Date.now() < this._lastReportTime + this.WAITING_TIME || this._reportBody.isEmpty() || this._report();
- } }, { key: "_filterLogs", value: function(e3) {
- var t2 = this, n3 = this.getModule(xn), o2 = n3.getSDKAppID(), s3 = n3.getTinyID();
- return Ft(this.REPORT_SDKAPPID_BLACKLIST, o2) && !qt(this.REPORT_TINYID_WHITELIST, s3) ? [] : e3.filter(function(e4) {
- return t2.REPORT_LEVEL.includes(e4.level);
- });
- } }, { key: "_report", value: function() {
- var e3 = this;
- if (!this._reportBody.isEmpty()) {
- var n3 = this._reportBody.getLogsInMemory(), o2 = this._filterLogs(n3);
- if (0 !== o2.length) {
- var s3 = { header: or(this), event: o2 };
- this.request({ protocolName: Bs, requestData: t({}, s3) }).then(function() {
- e3._lastReportTime = Date.now();
- }).catch(function(t2) {
- 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();
- });
- } else
- this._lastReportTime = Date.now();
- }
- } }, { key: "_flushAtOnce", value: function() {
- var e3 = this.getModule(Vn), t2 = e3.getItem(this.TAG, false), n3 = this._reportBody.getLogsInMemory(), o2 = "".concat(this._n, "._flushAtOnce");
- if (zt(t2))
- Ve.l("".concat(o2, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false);
- else {
- var s3 = n3.concat(t2);
- 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);
- }
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._lastReportTime = 0, this._report(), this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [];
- } }]), s2;
- }(uo), ar = "none", ir = "online", rr = [ha.OVER_FREQUENCY_LIMIT, ha.OPEN_SERVICE_OVERLOAD_ERROR], ur = function() {
- function e2(t2) {
- 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;
- }
- return a(e2, [{ key: "start", value: function() {
- var e3 = this;
- ae ? (re.getNetworkType({ success: function(t2) {
- 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));
- } }), 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)));
- } }, { key: "_onWebOnline", value: function() {
- this._onNetworkStatusChange({ isConnected: true, networkType: ir });
- } }, { key: "_onWebOffline", value: function() {
- this._onNetworkStatusChange({ isConnected: false, networkType: ar });
- } }, { key: "_onNetworkStatusChange", value: function(e3) {
- var t2 = e3.isConnected, n2 = e3.networkType, o2 = "".concat(this._n, "._onNetworkStatusChange"), s2 = false;
- 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());
- s2 && (new Aa("networkChange").setMessage("isConnected:".concat(t2, " previousNetworkType:").concat(this._networkType, " networkType:").concat(n2)).end(), this._networkType = n2);
- } }, { key: "probe", value: function(e3) {
- var t2 = this;
- if (!it(e3) && rr.includes(e3.code))
- return Promise.resolve([true, this._networkType]);
- var n2 = "".concat(this._n, ".probe");
- return new Promise(function(e4, o2) {
- ae ? re.getNetworkType({ success: function(o3) {
- 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]));
- } }) : t2._networkType === ar ? e4([false, ar]) : e4([true, ir]);
- });
- } }, { key: "getNetworkType", value: function() {
- return this._networkType;
- } }, { key: "reset", value: function() {
- 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));
- } }]), e2;
- }();
- function cr(e2, t2) {
- return e2(t2 = { exports: {} }, t2.exports), t2.exports;
- }
- var lr = cr(function(e2) {
- var t2 = Object.prototype.hasOwnProperty, n2 = "~";
- function o2() {
- }
- function s2(e3, t3, n3) {
- this.fn = e3, this.context = t3, this.once = n3 || false;
- }
- function a2(e3, t3, o3, a3, i3) {
- if ("function" != typeof o3)
- throw new TypeError("The listener must be a function");
- var r3 = new s2(o3, a3 || e3, i3), u2 = n2 ? n2 + t3 : t3;
- 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;
- }
- function i2(e3, t3) {
- 0 == --e3._eventsCount ? e3._events = new o2() : delete e3._events[t3];
- }
- function r2() {
- this._events = new o2(), this._eventsCount = 0;
- }
- Object.create && (o2.prototype = /* @__PURE__ */ Object.create(null), new o2().__proto__ || (n2 = false)), r2.prototype.eventNames = function() {
- var e3, o3, s3 = [];
- if (0 === this._eventsCount)
- return s3;
- for (o3 in e3 = this._events)
- t2.call(e3, o3) && s3.push(n2 ? o3.slice(1) : o3);
- return Object.getOwnPropertySymbols ? s3.concat(Object.getOwnPropertySymbols(e3)) : s3;
- }, r2.prototype.listeners = function(e3) {
- var t3 = n2 ? n2 + e3 : e3, o3 = this._events[t3];
- if (!o3)
- return [];
- if (o3.fn)
- return [o3.fn];
- for (var s3 = 0, a3 = o3.length, i3 = new Array(a3); s3 < a3; s3++)
- i3[s3] = o3[s3].fn;
- return i3;
- }, r2.prototype.listenerCount = function(e3) {
- var t3 = n2 ? n2 + e3 : e3, o3 = this._events[t3];
- return o3 ? o3.fn ? 1 : o3.length : 0;
- }, r2.prototype.emit = function(e3, t3, o3, s3, a3, i3) {
- var r3 = n2 ? n2 + e3 : e3;
- if (!this._events[r3])
- return false;
- var u2, c2, l2 = this._events[r3], d2 = arguments.length;
- if (l2.fn) {
- switch (l2.once && this.removeListener(e3, l2.fn, void 0, true), d2) {
- case 1:
- return l2.fn.call(l2.context), true;
- case 2:
- return l2.fn.call(l2.context, t3), true;
- case 3:
- return l2.fn.call(l2.context, t3, o3), true;
- case 4:
- return l2.fn.call(l2.context, t3, o3, s3), true;
- case 5:
- return l2.fn.call(l2.context, t3, o3, s3, a3), true;
- case 6:
- return l2.fn.call(l2.context, t3, o3, s3, a3, i3), true;
- }
- for (c2 = 1, u2 = new Array(d2 - 1); c2 < d2; c2++)
- u2[c2 - 1] = arguments[c2];
- l2.fn.apply(l2.context, u2);
- } else {
- var p2, g2 = l2.length;
- for (c2 = 0; c2 < g2; c2++)
- switch (l2[c2].once && this.removeListener(e3, l2[c2].fn, void 0, true), d2) {
- case 1:
- l2[c2].fn.call(l2[c2].context);
- break;
- case 2:
- l2[c2].fn.call(l2[c2].context, t3);
- break;
- case 3:
- l2[c2].fn.call(l2[c2].context, t3, o3);
- break;
- case 4:
- l2[c2].fn.call(l2[c2].context, t3, o3, s3);
- break;
- default:
- if (!u2)
- for (p2 = 1, u2 = new Array(d2 - 1); p2 < d2; p2++)
- u2[p2 - 1] = arguments[p2];
- l2[c2].fn.apply(l2[c2].context, u2);
- }
- }
- return true;
- }, r2.prototype.on = function(e3, t3, n3) {
- return a2(this, e3, t3, n3, false);
- }, r2.prototype.once = function(e3, t3, n3) {
- return a2(this, e3, t3, n3, true);
- }, r2.prototype.removeListener = function(e3, t3, o3, s3) {
- var a3 = n2 ? n2 + e3 : e3;
- if (!this._events[a3])
- return this;
- if (!t3)
- return i2(this, a3), this;
- var r3 = this._events[a3];
- if (r3.fn)
- r3.fn !== t3 || s3 && !r3.once || o3 && r3.context !== o3 || i2(this, a3);
- else {
- for (var u2 = 0, c2 = [], l2 = r3.length; u2 < l2; u2++)
- (r3[u2].fn !== t3 || s3 && !r3[u2].once || o3 && r3[u2].context !== o3) && c2.push(r3[u2]);
- c2.length ? this._events[a3] = 1 === c2.length ? c2[0] : c2 : i2(this, a3);
- }
- return this;
- }, r2.prototype.removeAllListeners = function(e3) {
- var t3;
- return e3 ? (t3 = n2 ? n2 + e3 : e3, this._events[t3] && i2(this, t3)) : (this._events = new o2(), this._eventsCount = 0), this;
- }, r2.prototype.off = r2.prototype.removeListener, r2.prototype.addListener = r2.prototype.on, r2.prefixed = n2, r2.EventEmitter = r2, e2.exports = r2;
- }), dr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "_getAuthKey", value: function() {
- var e3 = this;
- this.isIntl() || this.request({ protocolName: _o }).then(function(t3) {
- t3.data.authKey && (e3._authKey = t3.data.authKey, e3._expireTime = parseInt(t3.data.expireTime));
- });
- } }, { key: "_isFromOlderVersion", value: function(e3) {
- return !(!e3.content || 2 === e3.content.downloadFlag);
- } }, { key: "parseElements", value: function(e3, t3) {
- if (!at(e3) || !t3)
- return [];
- for (var n3 = [], o2 = null, s2 = 0; s2 < e3.length; s2++)
- o2 = e3[s2], this._needParse(o2) ? n3.push(this._parseElement(o2, t3)) : n3.push(e3[s2]);
- return n3;
- } }, { key: "_needParse", value: function(e3) {
- return !e3.cloudCustomData && !(!this._isFromOlderVersion(e3) || e3.type !== E.MSG_AUDIO && e3.type !== E.MSG_FILE && e3.type !== E.MSG_VIDEO);
- } }, { key: "_parseElement", value: function(e3, t3) {
- switch (e3.type) {
- case E.MSG_AUDIO:
- return this._parseAudioElement(e3, t3);
- case E.MSG_FILE:
- return this._parseFileElement(e3, t3);
- case E.MSG_VIDEO:
- return this._parseVideoElement(e3, t3);
- }
- } }, { key: "_parseAudioElement", value: function(e3, t3) {
- return e3.content.url = this._genAudioUrl(e3.content.uuid, t3), e3;
- } }, { key: "_parseFileElement", value: function(e3, t3) {
- return e3.content.url = this._genFileUrl(e3.content.uuid, t3, e3.content.fileName), e3;
- } }, { key: "_parseVideoElement", value: function(e3, t3) {
- return e3.content.url = this._genVideoUrl(e3.content.uuid, t3), e3;
- } }, { key: "_genAudioUrl", value: function(e3, t3) {
- if ("" === this._authKey)
- return "";
- var n3 = this.getModule(xn).getSDKAppID();
- 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");
- } }, { key: "_genFileUrl", value: function(e3, t3, n3) {
- if ("" === this._authKey)
- return "";
- n3 || (n3 = "".concat(Math.floor(1e5 * Math.random()), "-").concat(Date.now()));
- var o2 = this.getModule(xn).getSDKAppID();
- 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));
- } }, { key: "_genVideoUrl", value: function(e3, t3) {
- if ("" === this._authKey)
- return "";
- var n3 = this.getModule(xn).getSDKAppID();
- 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");
- } }, { key: "reset", value: function() {
- this._authKey = "", this.expireTime = 0;
- } }]), n2;
- }(uo), pr = ["requestSnapshotUrl"], gr = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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 };
- var a2 = t2.getInnerEmitterInstance();
- return a2.on(ei, t2._init, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
- }
- return a(s2, [{ key: "_init", value: function() {
- var e3 = this.getModule(Yn);
- if (this.TIMUploadPlugin = e3.getPlugin("tim-upload-plugin"), this.TIMUploadPlugin)
- this._initUploaderMethod();
- else {
- var t2 = ae ? "cos-wx-sdk" : "cos-js-sdk";
- this.COSSDK = e3.getPlugin(t2), this.COSSDK ? (this._getAuthorizationKey(), this.outputWarning("CosReplacement", t2)) : this.outputWarning("PluginUndetected");
- }
- } }, { key: "_onCloudConfigUpdated", value: function() {
- var e3 = "".concat(this._n, "._onCloudConfigUpdated"), t2 = this.getCloudConfig("upload_size_limit");
- if (Ve.l("".concat(e3, " uploadSizeLimit:").concat(t2)), !it(t2))
- try {
- var n3 = JSON.parse(t2);
- 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 };
- } catch (o2) {
- Ve.e("".concat(e3, " JSON parse error. uploadSizeLimit:"), t2);
- }
- } }, { key: "_getAuthorizationKey", value: function() {
- var e3 = this, t2 = "".concat(this._n, ".").concat("_getAuthorizationKey"), n3 = new Aa("_getAuthorizationKey"), o2 = Math.ceil(Date.now() / 1e3);
- this.request({ protocolName: qs, requestData: { duration: this.expiredTimeLimit } }).then(function(s3) {
- var a2 = s3.data;
- Ve.l("".concat(t2, " ok. data:"), a2);
- var i2 = a2.expiredTime - o2;
- 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();
- }).catch(function(o3) {
- e3.probeNetwork().then(function(e4) {
- var t3 = v(e4, 2), s3 = t3[0], a2 = t3[1];
- n3.setError(o3, s3, a2).end();
- }), Ve.w("".concat(t2, " failed. error:"), o3);
- });
- } }, { key: "_getCosPreSigUrl", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, ".").concat("_getCosPreSigUrl"), o2 = Math.ceil(Date.now() / 1e3), s3 = new Aa("_getCosPreSigUrl");
- return this.request({ protocolName: xs, requestData: { fileType: e3.fileType, fileName: e3.fileName, uploadMethod: e3.uploadMethod, duration: e3.duration } }).then(function(e4) {
- t2.tryCount = 0;
- var a2 = e4.data || {}, i2 = a2.expiredTime - o2;
- 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;
- }).catch(function(o3) {
- return -1 === o3.code && (o3.code = ha.COS_GET_SIG_FAIL), t2.probeNetwork().then(function(e4) {
- var t3 = v(e4, 2), n4 = t3[0], a2 = t3[1];
- s3.setError(o3, n4, a2).end();
- }), 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 }));
- });
- } }, { key: "_initUploaderMethod", value: function() {
- var e3 = this;
- if (this.TIMUploadPlugin)
- return this.timUploadPlugin = new this.TIMUploadPlugin(), void (this._cosUploadMethod = function(t2, n3) {
- e3.timUploadPlugin.uploadFile(t2, n3);
- });
- 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) {
- e3.cos.postObject(t2, n3);
- } : function(t2, n3) {
- e3.cos.uploadFiles(t2, n3);
- });
- } }, { key: "onCheckTimer", value: function(e3) {
- this.COSSDK && (this.TIMUploadPlugin || this.isLoggedIn() && e3 % 60 == 0 && Math.ceil(Date.now() / 1e3) >= this.cosOptions.expiredTime - 120 && this._getAuthorizationKey());
- } }, { key: "_getAuthorization", value: function(e3, t2) {
- t2({ TmpSecretId: this.cosOptions.secretId, TmpSecretKey: this.cosOptions.secretKey, XCosSecurityToken: this.cosOptions.sessionToken, ExpiredTime: this.cosOptions.expiredTime });
- } }, { key: "upload", value: function(e3) {
- if (true === e3.getRelayFlag())
- return Promise.resolve();
- var t2 = this.getModule(eo);
- switch (e3.type) {
- case E.MSG_IMAGE:
- return t2.addTotalCount(Ia), this._uploadImage(e3);
- case E.MSG_FILE:
- return t2.addTotalCount(Ia), this._uploadFile(e3);
- case E.MSG_AUDIO:
- return t2.addTotalCount(Ia), this._uploadAudio(e3);
- case E.MSG_VIDEO:
- return t2.addTotalCount(Ia), this._uploadVideo(e3);
- default:
- return Promise.resolve();
- }
- } }, { key: "_uploadImage", value: function(e3) {
- var n3 = this, o2 = this.getModule(Nn), s3 = e3.getElements()[0], a2 = o2.getMessageOption(e3.clientSequence);
- return this.doUploadImage({ file: a2.payload.file, to: a2.to, onProgress: function(e4) {
- if (s3.updatePercent(e4), ut(a2.onProgress))
- try {
- a2.onProgress(e4);
- } catch (t2) {
- return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
- }
- } }).then(function(o3) {
- 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);
- 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;
- });
- } }, { key: "_uploadFile", value: function(e3) {
- var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence);
- return this.doUploadFile({ file: s3.payload.file, to: s3.to, onProgress: function(e4) {
- if (o2.updatePercent(e4), ut(s3.onProgress))
- try {
- s3.onProgress(e4);
- } catch (t3) {
- return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
- }
- } }).then(function(n4) {
- var s4 = n4.location, a2 = t2.isPrivateNetWork() ? s4 : yt(s4);
- return o2.updateFileUrl(a2), e3;
- });
- } }, { key: "_uploadAudio", value: function(e3) {
- var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence);
- return this.doUploadAudio({ file: s3.payload.file, to: s3.to, onProgress: function(e4) {
- if (o2.updatePercent(e4), ut(s3.onProgress))
- try {
- s3.onProgress(e4);
- } catch (t3) {
- return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
- }
- } }).then(function(n4) {
- var s4 = n4.location, a2 = t2.isPrivateNetWork() ? s4 : yt(s4);
- return o2.updateAudioUrl(a2), e3;
- });
- } }, { key: "_uploadVideo", value: function(e3) {
- var t2 = this, n3 = this.getModule(Nn), o2 = e3.getElements()[0], s3 = n3.getMessageOption(e3.clientSequence);
- return this.doUploadVideo({ file: s3.payload.file, to: s3.to, onProgress: function(e4) {
- if (o2.updatePercent(e4), ut(s3.onProgress))
- try {
- s3.onProgress(e4);
- } catch (t3) {
- return Za({ code: ha.MESSAGE_ONPROGRESS_FUNCTION_ERROR });
- }
- } }).then(function(n4) {
- var s4 = n4.location, a2 = n4.snapshotInfo, i2 = t2.isPrivateNetWork() ? s4 : yt(s4);
- return o2.updateVideoUrl(i2), zt(a2) || o2.updateSnapshotInfo(a2), e3;
- });
- } }, { key: "_checkSizeError", value: function(e3) {
- return Za({ code: ha["MESSAGE_".concat(e3, "_SIZE_LIMIT")], message: this.getErrorMessage("UploadSizeLimit", e3.toLowerCase(), "".concat(this.UPLOAD_SIZE_LIMIT[e3] / 1048576, " MB")) });
- } }, { key: "doUploadImage", value: function(e3) {
- var t2 = this;
- if (!e3.file)
- return Za({ code: ha.MESSAGE_IMAGE_SELECT_FILE_FIRST });
- var n3 = this._checkImageType(e3.file);
- if (true !== n3)
- return n3;
- var o2 = this._checkImageSize(e3.file);
- if (true !== o2)
- return o2;
- var s3 = null;
- return this._setUploadFileType(ii), this.uploadByCOS(e3).then(function(e4) {
- return s3 = e4, t2.isPrivateNetWork() ? Rt(e4.location) : Rt("https://".concat(e4.location));
- }).then(function(e4) {
- return s3.width = e4.width, s3.height = e4.height, Promise.resolve(s3);
- });
- } }, { key: "_checkImageType", value: function(e3) {
- var t2 = "";
- 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 });
- } }, { key: "_checkImageSize", value: function(e3) {
- var t2 = 0;
- 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");
- } }, { key: "doUploadFile", value: function(e3) {
- 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 });
- } }, { key: "doUploadVideo", value: function(e3) {
- 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);
- } }, { key: "handleVideoUpload", value: function(e3) {
- var t2 = this;
- return new Promise(function(n3, o2) {
- t2.uploadByCOS(e3).then(function(e4) {
- n3(e4);
- }).catch(function() {
- t2.uploadByCOS(e3).then(function(e4) {
- n3(e4);
- }).catch(function() {
- o2(new ja({ code: ha.MESSAGE_VIDEO_UPLOAD_FAIL }));
- });
- });
- });
- } }, { key: "doUploadAudio", value: function(e3) {
- 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 });
- } }, { key: "uploadByCOS", value: function(e3) {
- var t2 = this;
- if (!ut(this._cosUploadMethod))
- return this.outputWarning("PluginUndetected"), Za({ code: ha.COS_UNDETECTED });
- if (this.timUploadPlugin)
- return this._uploadWithPreSigUrl(e3);
- var n3 = new Aa("upload"), o2 = "".concat(this._n, ".uploadByCOS"), s3 = Date.now(), a2 = this._getFile(e3);
- return new Promise(function(i2, r2) {
- var u2 = ae ? t2._createCosOptionsWXMiniApp(e3) : t2._createCosOptionsWeb(e3), c2 = t2;
- t2._cosUploadMethod(u2, function(e4, u3) {
- var l2 = /* @__PURE__ */ Object.create(null);
- if (u3) {
- if (e4 || at(u3.files) && u3.files[0].error) {
- var d2 = new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL });
- 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);
- }
- 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;
- 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);
- Ve.l("".concat(o2, " success. name:").concat(a2.name, " ").concat(_2)), i2(l2);
- var f2 = t2.getModule(eo);
- return f2.addCost(Ia, p2), f2.addFileSize(Ia, a2.size), void n3.setNetworkType(t2.getNetworkType()).setMessage(_2).end();
- }
- var v2 = new ja({ code: ha.MESSAGE_FILE_UPLOAD_FAIL });
- 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);
- });
- });
- } }, { key: "_uploadWithPreSigUrl", value: function(e3) {
- var t2 = this, n3 = "".concat(this._n, "._uploadWithPreSigUrl"), o2 = this._getFile(e3);
- return this._createCosOptionsPreSigUrl(e3).then(function(e4) {
- return new Promise(function(s3, a2) {
- var i2 = new Aa("upload"), r2 = e4.requestSnapshotUrl, u2 = void 0 === r2 ? void 0 : r2, c2 = g(e4, pr), l2 = Date.now();
- t2._cosUploadMethod(c2, function(e5, r3) {
- if (e5 || 403 === r3.statusCode)
- 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 }));
- var d2 = /* @__PURE__ */ Object.create(null), p2 = r3.data.location || "";
- 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;
- 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));
- Ve.l("".concat(n3, " success name:").concat(o2.name, ",").concat(f2)), i2.setNetworkType(t2.getNetworkType()).setMessage(f2).end();
- var v2 = t2.getModule(eo);
- v2.addCost(Ia, g2), v2.addFileSize(Ia, o2.size);
- var m2 = [];
- 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)
- return Promise.all(m2).then(function() {
- s3(d2);
- });
- s3(d2);
- });
- });
- });
- } }, { key: "_getRawOrUploadProxyUrl", value: function(e3) {
- var t2 = this.getModule(xn).getFileUploadProxy(), n3 = e3;
- return t2 && (n3 = e3.replace(/^https:\/\/[^/]+/, t2)), n3;
- } }, { key: "_getFile", value: function(e3) {
- var t2;
- return at(e3.file.files) || (t2 = e3.file.files, "filelist" === lt(t2)) ? e3.file.files[0] : e3.file;
- } }, { key: "_formatFileSize", value: function(e3) {
- return e3 < 1024 ? e3 + "B" : e3 < 1048576 ? Math.floor(e3 / 1024) + "KB" : Math.floor(e3 / 1048576) + "MB";
- } }, { key: "_formatSpeed", value: function(e3) {
- return e3 <= 1048576 ? wt(e3 / 1024, 1) + "KB/s" : wt(e3 / 1048576, 1) + "MB/s";
- } }, { key: "_createCosOptionsWeb", value: function(e3) {
- var t2 = this._getFile(e3), n3 = t2.name, o2 = n3.slice(n3.lastIndexOf(".")), s3 = this._genFileName("".concat(_t(999999)).concat(o2));
- 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) {
- if ("function" == typeof e3.onProgress)
- try {
- e3.onProgress(t3.percent);
- } catch (n4) {
- Ve.w("onProgress callback error:", n4);
- }
- }, onFileFinish: function(e4, t3, n4) {
- } };
- } }, { key: "_createCosOptionsWXMiniApp", value: function(e3) {
- var t2 = this._getFile(e3), n3 = this._genFileName(t2.name), o2 = t2.url;
- return { Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(n3), FilePath: o2, onProgress: function(t3) {
- if (Ve.l(JSON.stringify(t3)), "function" == typeof e3.onProgress)
- try {
- e3.onProgress(t3.percent);
- } catch (n4) {
- Ve.w("onProgress callback error:", n4);
- }
- } };
- } }, { key: "_createCosOptionsPreSigUrl", value: function(e3) {
- var t2 = this, n3 = "", o2 = "", s3 = 0, a2 = this._getFile(e3);
- if (ae)
- n3 = this._genFileName(a2.name), o2 = a2.url, s3 = 1;
- else {
- var i2 = a2.name, r2 = i2.slice(i2.lastIndexOf("."));
- n3 = this._genFileName("".concat(_t(999999)).concat(r2)), o2 = a2, s3 = 0;
- }
- return this._getCosPreSigUrl({ fileType: this.uploadFileType, fileName: n3, uploadMethod: s3, duration: this.duration }).then(function(s4) {
- var a3 = s4.uploadUrl, i3 = s4.downloadUrl, r3 = s4.requestSnapshotUrl, u2 = void 0 === r3 ? void 0 : r3, c2 = s4.thumbUrl, l2 = s4.largeUrl;
- return { url: t2._getRawOrUploadProxyUrl(a3), fileType: t2.uploadFileType, fileName: n3, resources: o2, downloadUrl: i3, requestSnapshotUrl: u2, thumbUrl: c2, largeUrl: l2, onProgress: function(t3) {
- if ("function" == typeof e3.onProgress)
- try {
- e3.onProgress(t3.percent);
- } catch (n4) {
- Ve.w("onProgress callback error:", n4), Ve.e(n4);
- }
- } };
- });
- } }, { key: "_genFileName", value: function(e3) {
- return "".concat(Nt(), "-").concat(e3);
- } }, { key: "_setUploadFileType", value: function(e3) {
- this.uploadFileType = e3;
- } }, { key: "_getSnapshotInfoByUrl", value: function(e3, t2) {
- var n3 = this, o2 = new Aa("getSnapshotInfo");
- return this.request({ protocolName: Vs, requestData: { platform: this.getPlatform(), coverName: this._genFileName(_t(99999)), requestSnapshotUrl: e3 } }).then(function(e4) {
- var n4 = (e4.data || {}).snapshotUrl;
- return o2.setMessage("snapshotUrl:".concat(n4)).end(), zt(n4) ? {} : Rt(n4).then(function(e5) {
- t2.snapshotInfo = { snapshotUrl: n4, snapshotWidth: e5.width, snapshotHeight: e5.height };
- });
- }).catch(function(e4) {
- return Ve.w("".concat(n3._n, "._getSnapshotInfoByUrl failed. error:"), e4), o2.setCode(e4.errorCode).setMessage(e4.errorInfo).end(), {};
- });
- } }, { key: "_getSmallImageInfoByUrl", value: function(e3, t2) {
- return Rt(e3).then(function(n3) {
- t2.smallImageUrl = e3, t2.smallImageWidth = n3.width, t2.smallImageHeight = n3.height;
- });
- } }, { key: "_getLargeImageInfoByUrl", value: function(e3, t2) {
- return Rt(e3).then(function(n3) {
- t2.largeImageUrl = e3, t2.largeImageWidth = n3.width, t2.largeImageHeight = n3.height;
- });
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset"));
- } }]), s2;
- }(uo), hr = ["downloadKey", "pbDownloadKey", "messageList"], _r = function() {
- function e2(t2) {
- o(this, e2), this._n = "MergerMessageHandler", this._messageModule = t2;
- }
- return a(e2, [{ key: "uploadMergerMessage", value: function(e3, t2) {
- var n2 = this, o2 = "".concat(this._n, ".").concat("uploadMergerMessage");
- Ve.d("".concat(o2, " message:"), e3, "messageBytes:".concat(t2));
- var s2 = e3.payload.messageList, a2 = s2.length, i2 = new Aa("uploadMergerMessage");
- return this._messageModule.request({ protocolName: zs, requestData: { messageList: s2 } }).then(function(e4) {
- Ve.d("".concat(o2, " ok. response:"), e4.data);
- var s3 = e4.data, r2 = s3.pbDownloadKey, u2 = s3.downloadKey, c2 = { pbDownloadKey: r2, downloadKey: u2, messageNumber: a2 };
- return i2.setNetworkType(n2._messageModule.getNetworkType()).setMessage("".concat(a2, "-").concat(t2, "-").concat(u2)).end(), c2;
- }).catch(function(e4) {
- throw Ve.w("".concat(o2, " failed. error:"), e4), n2._messageModule.probeNetwork().then(function(t3) {
- var n3 = v(t3, 2), o3 = n3[0], s3 = n3[1];
- i2.setError(e4, o3, s3).end();
- }), e4;
- });
- } }, { key: "downloadMergerMessage", value: function(e3) {
- var n2 = this, o2 = "".concat(this._n, ".").concat("downloadMergerMessage");
- Ve.d("".concat(o2, " message:"), e3);
- var s2 = e3.payload.downloadKey, a2 = this._messageModule.getFileDownloadProxy(), i2 = new Aa("downloadMergerMessage");
- return i2.setMessage("downloadKey:".concat(s2)), this._messageModule.request({ protocolName: Js, requestData: { downloadKey: s2 } }).then(function(s3) {
- if (Ve.d("".concat(o2, " ok. response:"), s3.data), ut(e3.clearElement)) {
- var r2 = e3.payload;
- r2.downloadKey, r2.pbDownloadKey, r2.messageList;
- var u2 = g(r2, hr);
- e3.clearElement(), e3.setElement({ type: e3.type, content: t({ messageList: s3.data.messageList }, u2) }, a2);
- } else {
- var c2 = [];
- s3.data.messageList.forEach(function(e4) {
- if (!zt(e4)) {
- var t2 = new Ba(e4, a2);
- c2.push(t2);
- }
- }), e3.payload.messageList = c2, e3.payload.downloadKey = "", e3.payload.pbDownloadKey = "";
- }
- return i2.setNetworkType(n2._messageModule.getNetworkType()).end(), e3;
- }).catch(function(e4) {
- throw Ve.w("".concat(o2, " failed. key:").concat(s2, " error:"), e4), n2._messageModule.probeNetwork().then(function(t2) {
- var n3 = v(t2, 2), o3 = n3[0], s3 = n3[1];
- i2.setError(e4, o3, s3).end();
- }), e4;
- });
- } }, { key: "createMergerMessagePack", value: function(e3, t2, n2) {
- return e3.conversationType === E.CONV_C2C ? this._createC2CMergerMessagePack(e3, t2, n2) : this._createGroupMergerMessagePack(e3, t2, n2);
- } }, { key: "_createC2CMergerMessagePack", value: function(e3, t2, n2) {
- var o2 = null;
- t2 && (t2.offlinePushInfo && (o2 = t2.offlinePushInfo), true === t2.onlineUserOnly && (o2 ? o2.disablePush = true : o2 = { disablePush: true }));
- var s2 = [];
- if (st(t2) && st(t2.messageControlInfo)) {
- var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
- true === i2 && s2.push("NoUnread"), true === r2 && s2.push("NoLastMsg"), true === u2 && s2.push("NoMsgCheck");
- }
- var c2 = "";
- nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (c2 = e3.cloudCustomData);
- 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;
- 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 } };
- } }, { key: "_createGroupMergerMessagePack", value: function(e3, t2, n2) {
- var o2 = null;
- t2 && t2.offlinePushInfo && (o2 = t2.offlinePushInfo);
- var s2 = [];
- if (st(t2) && st(t2.messageControlInfo)) {
- var a2 = t2.messageControlInfo, i2 = a2.excludedFromUnreadCount, r2 = a2.excludedFromLastMessage, u2 = a2.excludedFromContentModeration;
- true === i2 && s2.push("NoUnread"), true === r2 && s2.push("NoLastMsg"), true === u2 && s2.push("NoMsgCheck");
- }
- var c2 = "";
- nt(e3.cloudCustomData) && e3.cloudCustomData.length > 0 && (c2 = e3.cloudCustomData);
- 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;
- 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 } };
- } }]), e2;
- }(), 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];
- function mr(e2) {
- var t2 = false;
- return Object.values(fr).includes(e2) && (t2 = true), (e2 >= 120001 && e2 <= 13e4 || e2 >= 10100 && e2 <= 10200) && (t2 = true), t2;
- }
- var Mr = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- return o(this, s2), (t2 = n2.call(this, e3))._n = "MessageModule", t2._messageOptionsMap = /* @__PURE__ */ new Map(), t2._mergerMessageHandler = new _r(h(t2)), t2;
- }
- return a(s2, [{ key: "createTextMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
- var n3 = new Wa(e3), o2 = "string" == typeof e3.payload ? e3.payload : e3.payload.text, s3 = new Ra({ text: o2 }), a2 = this._getNickAndAvatarByUserID(t2);
- return n3.setElement(s3), n3.setNickAndAvatar(a2), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
- } }, { key: "createImageMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
- var n3 = new Wa(e3);
- if (ae) {
- var o2 = e3.payload.file;
- if ($e(o2))
- return void this.outputWarning("FileUnsupportedInMP", "createImageMessage");
- 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() };
- e3.payload.file = a2;
- } else if (ie) {
- if ($e(e3.payload.file)) {
- var i2 = e3.payload.file;
- e3.payload.file = { files: [i2] };
- } else if (st(e3.payload.file) && "undefined" != typeof uni) {
- var r2 = e3.payload.file.tempFiles[0];
- e3.payload.file = { files: [r2] };
- }
- }
- var u2 = new Na({ imageFormat: Be.UNKNOWN, uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), c2 = this._getNickAndAvatarByUserID(t2);
- return n3.setElement(u2), n3.setNickAndAvatar(c2), n3.setNameCard(this._getNameCardByGroupID(n3)), this._messageOptionsMap.set(n3.clientSequence, e3), n3;
- } }, { key: "createAudioMessage", value: function(e3) {
- var t2 = e3.payload.file;
- if (ae) {
- 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() };
- e3.payload.file = n3;
- }
- var o2 = this.getMyUserID();
- e3.currentUser = o2, e3.senderTinyID = this.getMyTinyID();
- 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);
- return s3.setElement(a2), s3.setNickAndAvatar(i2), s3.setNameCard(this._getNameCardByGroupID(s3)), this._messageOptionsMap.set(s3.clientSequence, e3), s3;
- } }, { key: "createVideoMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID(), e3.payload.file.thumbUrl = "", e3.payload.file.thumbSize = 0;
- var n3 = {};
- if (ae) {
- if (te)
- return void this.outputWarning("VideoUnsupportedInAlipay");
- if ($e(e3.payload.file))
- return void this.outputWarning("FileUnsupportedInMP", "createVideoMessage");
- var o2 = e3.payload.file;
- 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();
- } else if (ie) {
- if ($e(e3.payload.file)) {
- var s3 = e3.payload.file;
- e3.payload.file.files = [s3];
- } else if (st(e3.payload.file) && "undefined" != typeof uni) {
- var a2 = e3.payload.file.tempFile;
- e3.payload.file.files = [a2];
- }
- var i2 = e3.payload.file;
- 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];
- }
- e3.payload.file.videoFile = n3;
- 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);
- return r2.setElement(u2), r2.setNickAndAvatar(c2), r2.setNameCard(this._getNameCardByGroupID(r2)), this._messageOptionsMap.set(r2.clientSequence, e3), r2;
- } }, { key: "createCustomMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
- var n3 = new Wa(e3), o2 = new qa({ data: e3.payload.data, description: e3.payload.description, extension: e3.payload.extension }), s3 = this._getNickAndAvatarByUserID(t2);
- return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
- } }, { key: "createFaceMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
- var n3 = new Wa(e3), o2 = new Oa(e3.payload), s3 = this._getNickAndAvatarByUserID(t2);
- return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
- } }, { key: "createMergerMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
- var n3 = this._getNickAndAvatarByUserID(t2), o2 = new Wa(e3), s3 = new Ha(e3.payload);
- return o2.setElement(s3), o2.setNickAndAvatar(n3), o2.setNameCard(this._getNameCardByGroupID(o2)), o2.setRelayFlag(true), o2;
- } }, { key: "createForwardMessage", value: function(e3) {
- 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);
- if (s3.type === E.MSG_GRP_TIP)
- return Za({ code: ha.MESSAGE_FORWARD_TYPE_INVALID });
- 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);
- return l2.setElement(s3.getElements()[0]), l2.setNickAndAvatar(u2), l2.setNameCard(this._getNameCardByGroupID(s3)), l2.setRelayFlag(true), l2;
- } }, { key: "downloadMergerMessage", value: function(e3) {
- return this._mergerMessageHandler.downloadMergerMessage(e3);
- } }, { key: "createFileMessage", value: function(e3) {
- if (ae) {
- if (!X && !Q && !oe)
- return;
- var n3 = re.getSystemInfoSync().SDKVersion;
- if (X && Gt(n3, "2.5.0") < 0)
- return void this.outputWarning("WXChooseMessageFile");
- if (Q && Gt(n3, "1.18.0") < 0)
- return void this.outputWarning("QQChooseMessageFile");
- }
- if (ie || oe) {
- if ($e(e3.payload.file)) {
- var o2 = e3.payload.file;
- e3.payload.file = { files: [o2] };
- } else if (st(e3.payload.file) && "undefined" != typeof uni) {
- var s3 = e3.payload.file, a2 = s3.tempFiles, i2 = s3.files, r2 = null;
- at(a2) ? r2 = a2[0] : at(i2) && (r2 = i2[0]), e3.payload.file = { files: [r2] };
- }
- } else if (X || Q) {
- var u2 = e3.payload.file.tempFiles, c2 = t(t({}, u2[0]), {}, { url: u2[0].path });
- e3.payload.file = { files: [c2] };
- }
- var l2 = this.getMyUserID();
- e3.currentUser = l2, e3.senderTinyID = this.getMyTinyID();
- var d2 = new Wa(e3), p2 = new Fa({ uuid: this._generateUUID(e3.payload.file), file: e3.payload.file }), g2 = this._getNickAndAvatarByUserID(l2);
- return d2.setElement(p2), d2.setNickAndAvatar(g2), d2.setNameCard(this._getNameCardByGroupID(d2)), this._messageOptionsMap.set(d2.clientSequence, e3), d2;
- } }, { key: "createLocationMessage", value: function(e3) {
- var t2 = this.getMyUserID();
- e3.currentUser = t2, e3.senderTinyID = this.getMyTinyID();
- var n3 = new Wa(e3), o2 = new Va(e3.payload), s3 = this._getNickAndAvatarByUserID(t2);
- return n3.setElement(o2), n3.setNickAndAvatar(s3), n3.setNameCard(this._getNameCardByGroupID(n3)), n3;
- } }, { key: "_onCannotFindModule", value: function() {
- return Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "sendMessageInstance", value: function(e3, t2) {
- var n3 = this;
- if (false === this.getModule(oo).filterMessage(e3, t2))
- return this._onSendMessageFailed(e3, new ja({ code: ha.PROFANITY_FOUND }));
- var o2, s3 = null;
- switch (e3.conversationType) {
- case E.CONV_C2C:
- if (!(s3 = this.getModule(Un)))
- return this._onCannotFindModule();
- break;
- case E.CONV_GROUP:
- if (!(s3 = this.getModule(Pn)))
- return this._onCannotFindModule();
- if (Dt({ groupID: e3.to })) {
- var a2 = s3.getLocalGroupProfile(e3.to);
- if (a2 && a2.isSupportTopic)
- return Za({ code: ha.MESSAGE_SEND_GROUP_WITH_TOPIC_FAIL });
- }
- break;
- default:
- return Za({ code: ha.MESSAGE_SEND_INVALID_CONVERSATION_TYPE });
- }
- var i2 = this.getModule(Wn), r2 = this.getModule(Pn);
- return i2.upload(e3).then(function() {
- n3._getSendMessageSpecifiedKey(e3) === ya && n3.getModule(eo).addSuccessCount(Ia);
- return r2.guardForAVChatRoom(e3).then(function() {
- if (!e3.isSendable())
- return Za({ code: ha.MESSAGE_FILE_URL_IS_EMPTY });
- n3._addSendMessageTotalCount(e3), o2 = Date.now();
- var a3 = function(e4) {
- var t3 = "utf-8";
- ie && document && (t3 = document.charset.toLowerCase());
- var n4, o3, s4 = 0;
- if (o3 = e4.length, "utf-8" === t3 || "utf8" === t3)
- for (var a4 = 0; a4 < o3; a4++)
- (n4 = e4.codePointAt(a4)) <= 127 ? s4 += 1 : n4 <= 2047 ? s4 += 2 : n4 <= 65535 ? s4 += 3 : (s4 += 4, a4++);
- else if ("utf-16" === t3 || "utf16" === t3)
- for (var i3 = 0; i3 < o3; i3++)
- (n4 = e4.codePointAt(i3)) <= 65535 ? s4 += 2 : (s4 += 4, i3++);
- else
- s4 = e4.replace(/[^\x00-\xff]/g, "aa").length;
- return s4;
- }(JSON.stringify(e3));
- return e3.type === E.MSG_MERGER && a3 > 11264 ? n3._mergerMessageHandler.uploadMergerMessage(e3, a3).then(function(o3) {
- var s4 = n3._mergerMessageHandler.createMergerMessagePack(e3, t2, o3);
- return n3.request(s4);
- }) : (n3.getModule(qn).setMessageRandom(e3), e3.conversationType === E.CONV_C2C || e3.conversationType === E.CONV_GROUP ? s3.sendMessage(e3, t2) : void 0);
- }).then(function(a3) {
- var i3 = a3.data, r3 = i3.time, u2 = i3.sequence, c2 = i3.readReceiptCode;
- 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))));
- n3._addSendMessageSuccessCount(e3, o2), n3._messageOptionsMap.delete(e3.clientSequence);
- var l2 = n3.getModule(qn);
- e3.status = Qt.SUCCESS, e3.time = r3;
- var d2 = false;
- if (e3.conversationType === E.CONV_GROUP)
- e3.sequence = u2;
- else if (e3.conversationType === E.CONV_C2C) {
- var p2 = l2.getLatestMessageSentByMe(e3.conversationID);
- if (p2) {
- var g2 = p2.nick, h2 = p2.avatar;
- g2 === e3.nick && h2 === e3.avatar || (d2 = true);
- }
- }
- if (d2 && l2.modifyMessageSentByMe({ conversationID: e3.conversationID, latestNick: e3.nick, latestAvatar: e3.avatar }), s3.isOnlineMessage(e3, t2))
- e3._onlineOnlyFlag = true;
- else {
- l2.appendToMessageList(e3);
- var _2 = e3;
- st(t2) && st(t2.messageControlInfo) && (true === t2.messageControlInfo.excludedFromLastMessage && (e3._isExcludedFromLastMessage = true, _2 = ""), true === t2.messageControlInfo.excludedFromUnreadCount && (e3._isExcludedFromUnreadCount = true));
- var f2 = e3.conversationType;
- if (kt(e3.to))
- f2 = E.CONV_TOPIC, n3.getModule(Fn).onMessageSent({ groupID: xt(e3.to), topicID: e3.to, lastMessage: _2 });
- l2.onMessageSent({ conversationOptionsList: [{ conversationID: e3.conversationID, unreadCount: 0, type: f2, subType: e3.conversationSubType, lastMessage: _2 }] });
- }
- return e3.getRelayFlag() || "TIMImageElem" !== e3.type || Pt(e3.payload.imageInfoArray), Ya({ message: e3 });
- });
- }).catch(function(t3) {
- return n3._onSendMessageFailed(e3, t3);
- });
- } }, { key: "_onSendMessageFailed", value: function(e3, t2) {
- e3.status = Qt.FAIL, this.getModule(qn).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t2);
- var n3 = new Aa("sendMessage");
- 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) {
- var o2 = v(e4, 2), s3 = o2[0], a2 = o2[1];
- n3.setError(t2, s3, a2).end();
- }), 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 } }));
- } }, { key: "_getSendMessageSpecifiedKey", value: function(e3) {
- if ([E.MSG_IMAGE, E.MSG_AUDIO, E.MSG_VIDEO, E.MSG_FILE].includes(e3.type))
- return ya;
- if (e3.conversationType === E.CONV_C2C)
- return va;
- if (e3.conversationType === E.CONV_GROUP) {
- var t2 = this.getModule(Pn).getLocalGroupProfile(e3.to);
- if (!t2)
- return;
- var n3 = t2.type;
- return Tt(n3) ? Ma : ma;
- }
- } }, { key: "_addSendMessageTotalCount", value: function(e3) {
- var t2 = this._getSendMessageSpecifiedKey(e3);
- t2 && this.getModule(eo).addTotalCount(t2);
- } }, { key: "_addSendMessageSuccessCount", value: function(e3, t2) {
- var n3 = Math.abs(Date.now() - t2), o2 = this._getSendMessageSpecifiedKey(e3);
- if (o2) {
- var s3 = this.getModule(eo);
- s3.addSuccessCount(o2), s3.addCost(o2, n3);
- }
- } }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t2) {
- var n3, o2, s3 = t2.code, a2 = void 0 === s3 ? -1 : s3, i2 = this.getModule(eo), r2 = this._getSendMessageSpecifiedKey(e3);
- r2 === ya && (n3 = a2, o2 = false, vr.includes(n3) && (o2 = true), o2) ? i2.addFailedCountOfUserSide(Ia) : mr(a2) && r2 && i2.addFailedCountOfUserSide(r2);
- } }, { key: "resendMessage", value: function(e3) {
- return e3.isResend = true, e3.status = Qt.UNSEND, this.sendMessageInstance(e3);
- } }, { key: "revokeMessage", value: function(e3) {
- var t2 = this, n3 = null;
- if (e3.conversationType === E.CONV_C2C ? n3 = this.getModule(Un) : e3.conversationType === E.CONV_GROUP && (n3 = this.getModule(Pn)), !n3)
- return this._onCannotFindModule();
- var o2 = new Aa("revokeMessage");
- o2.setMessage("tjg_id:".concat(this.generateTjgID(e3), " type:").concat(e3.type, " from:").concat(e3.from, " to:").concat(e3.to));
- var s3 = "".concat(this._n, ".").concat("revokeMessage");
- return n3.revokeMessage(e3).then(function(n4) {
- var a2 = n4.data.recallRetList;
- if (!zt(a2) && 0 !== a2[0].retCode) {
- var i2 = new ja({ code: a2[0].retCode, data: { message: e3 } });
- return o2.setCode(i2.code).setMoreMessage(i2.message).end(), Za(i2);
- }
- return Ve.i("".concat(s3, " ok. ID:").concat(e3.ID)), e3.isRevoked = true, o2.end(), t2.getModule(qn).onMessageRevoked([e3]), Ya({ message: e3 });
- }).catch(function(n4) {
- t2.probeNetwork().then(function(e4) {
- var t3 = v(e4, 2), s4 = t3[0], a3 = t3[1];
- o2.setError(n4, s4, a3).end();
- });
- 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 } });
- return Ve.w("".concat(s3, " failed. error:"), n4), Za(a2);
- });
- } }, { key: "deleteMessage", value: function(e3) {
- var t2 = this, n3 = null, o2 = e3[0], s3 = o2.conversationID, a2 = "", i2 = [], r2 = [];
- if (o2.conversationType === E.CONV_C2C)
- n3 = this.getModule(Un), a2 = s3.replace(E.CONV_C2C, ""), e3.forEach(function(e4) {
- e4 && e4.status === Qt.SUCCESS && e4.conversationID === s3 && (e4._onlineOnlyFlag || i2.push("".concat(e4.sequence, "_").concat(e4.random, "_").concat(e4.time)), r2.push(e4));
- });
- else if (o2.conversationType === E.CONV_GROUP)
- n3 = this.getModule(Pn), a2 = s3.replace(E.CONV_GROUP, ""), e3.forEach(function(e4) {
- e4 && e4.status === Qt.SUCCESS && e4.conversationID === s3 && (e4._onlineOnlyFlag || i2.push("".concat(e4.sequence)), r2.push(e4));
- });
- else if (o2.conversationType === E.CONV_SYSTEM)
- return Za({ code: ha.CANNOT_DELETE_GROUP_SYSTEM_NOTICE });
- if (!n3)
- return this._onCannotFindModule();
- if (0 === i2.length)
- return this._onMessageDeleted(r2);
- i2.length > 30 && (i2 = i2.slice(0, 30), r2 = r2.slice(0, 30));
- var u2 = new Aa("deleteMessage");
- u2.setMessage("to:".concat(a2, " count:").concat(i2.length));
- var c2 = "".concat(this._n, ".").concat("deleteMessage");
- return n3.deleteMessage({ to: a2, keyList: i2 }).then(function(e4) {
- return u2.end(), Ve.i("".concat(c2, " ok")), t2._onMessageDeleted(r2);
- }).catch(function(e4) {
- t2.probeNetwork().then(function(t3) {
- var n5 = v(t3, 2), o3 = n5[0], s4 = n5[1];
- u2.setError(e4, o3, s4).end();
- }), Ve.w("".concat(c2, " failed. error:"), e4);
- var n4 = new ja({ code: e4 && e4.code ? e4.code : ha.MESSAGE_DELETE_FAIL, message: e4 && e4.message ? e4.message : void 0 });
- return Za(n4);
- });
- } }, { key: "_onMessageDeleted", value: function(e3) {
- return this.getModule(qn).onMessageDeleted(e3), Xa({ messageList: e3 });
- } }, { key: "translateText", value: function(e3) {
- var n3 = "".concat(this._n, ".").concat("translateText"), o2 = e3.sourceTextList, s3 = e3.sourceLanguage, a2 = e3.targetLanguage, i2 = new Aa("translateText");
- 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) {
- var o3 = e4.data, s4 = o3.error, a3 = o3.requestID, r2 = o3.translatedTextList;
- if (0 === s4.code)
- return i2.end(), Ve.i("".concat(n3, " ok. requestID:").concat(a3)), Ya({ translatedTextList: r2 });
- throw t(t({}, s4), {}, { requestID: a3 });
- }).catch(function(e4) {
- return i2.setCode(e4.code).setMoreMessage(e4.requestID).end(), Ve.w("".concat(n3, " failed. error:"), e4), Za({ code: ha.TRANSLATE_TEXT_FAIL });
- });
- } }, { key: "modifyRemoteMessage", value: function(e3) {
- var t2 = this, n3 = null, o2 = e3.conversationType, s3 = e3.to;
- if (this.getModule(Pn).isMessageFromOrToAVChatroom(s3))
- return Za({ code: ha.MESSAGE_MODIFY_DISABLED_IN_AVCHATROOM, data: { message: e3 } });
- if (false === this.getModule(oo).filterMessage(e3))
- return Za({ code: ha.PROFANITY_FOUND, data: { message: e3 } });
- o2 === E.CONV_C2C ? n3 = this.getModule(Un) : o2 === E.CONV_GROUP && (n3 = this.getModule(Pn));
- var a2 = new Aa("modifyMessage");
- a2.setMessage("to:".concat(s3));
- var i2 = "".concat(this._n, ".modifyRemoteMessage");
- return n3.modifyRemoteMessage(e3).then(function(n4) {
- a2.end(), Ve.i("".concat(i2, " ok"));
- var o3 = t2._onModifyRemoteMessageResp(e3, n4.data);
- return Ya({ message: o3 });
- }).catch(function(n4) {
- if (a2.setCode(n4.code).setMoreMessage(n4.message).end(), Ve.w("".concat(i2, " failed. error:"), n4), 20027 === n4.code) {
- var o3 = t2._onModifyRemoteMessageResp(e3, n4.data);
- return Za({ code: ha.MESSAGE_MODIFY_CONFLICT, data: { message: o3 } });
- }
- return Za({ code: n4.code, message: n4.message, data: { message: e3 } });
- });
- } }, { key: "_onModifyRemoteMessageResp", value: function(e3, t2) {
- Ve.d("".concat(this._n, "._onModifyRemoteMessageResp options:"), t2);
- 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;
- return this.getModule(qn).onMessageModified({ conversationType: n3, from: o2, to: s3, time: r2, random: a2, sequence: i2, elements: u2, cloudCustomData: d2, messageVersion: c2 });
- } }, { key: "_generateUUID", value: function(e3) {
- var t2 = this.getModule(xn), n3 = "".concat(t2.getSDKAppID(), "-").concat(t2.getUserID(), "-").concat(function() {
- for (var e4 = "", t3 = 32; t3 > 0; --t3)
- e4 += ft[Math.floor(Math.random() * vt)];
- return e4;
- }()), o2 = e3.name || e3.value || e3.url || e3.tempFilePath, s3 = o2 && o2.slice(o2.lastIndexOf(".") + 1);
- return s3 && (n3 = "".concat(n3, ".").concat(s3)), n3;
- } }, { key: "getMessageOption", value: function(e3) {
- return this._messageOptionsMap.get(e3);
- } }, { key: "_getNickAndAvatarByUserID", value: function(e3) {
- return this.getModule(Gn).getNickAndAvatarByUserID(e3);
- } }, { key: "_getNameCardByGroupID", value: function(e3) {
- if (e3.conversationType === E.CONV_GROUP) {
- var t2 = this.getModule(Pn);
- if (t2)
- return t2.getMyNameCardByGroupID(e3.to);
- }
- return "";
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._messageOptionsMap.clear();
- } }]), s2;
- }(uo), yr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "onMessageExtensionNotify", value: function(e3) {
- 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 = [];
- Ve.l("".concat(this._n, ".onMessageExtensionNotify messageID:").concat(l2, " operateType:").concat(s2, " globalSequence:").concat(r2)), this._updateGlobalSequence(l2, r2);
- var g2 = false, h2 = false;
- a2.forEach(function(e4) {
- var n4 = e4.extensions, o3 = void 0 === n4 ? [] : n4, a3 = e4.clearSequence;
- if (1 === s2)
- g2 = true, o3.forEach(function(e5) {
- d2.push({ key: e5.key, value: e5.value });
- }), t3._updateLocalExtension(l2, o3);
- else if (2 === s2)
- h2 = true, o3.forEach(function(e5) {
- p2.push(e5.key);
- }), t3._updateLocalExtension(l2, o3);
- else if (3 === s2) {
- if (h2 = true, t3._hasLocalExtension(l2))
- t3._getLocalExtension(l2).forEach(function(e5, t4) {
- e5.seq <= a3 && !zt(e5.value) && p2.push(t4);
- });
- t3._clearLocalExtension(l2, a3);
- }
- }), g2 && this.emitOuterEvent(k.MESSAGE_EXTENSIONS_UPDATED, { messageID: l2, extensions: d2 }), h2 && this.emitOuterEvent(k.MESSAGE_EXTENSIONS_DELETED, { messageID: l2, keyList: p2 });
- } }, { key: "setMessageExtensions", value: function(e3, t3) {
- var n3 = this;
- if (!this.canIUse(B.MSG_EXT))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var o2 = "".concat(this._n, ".").concat("setMessageExtensions"), s2 = e3.ID, a2 = e3.conversationID, i2 = e3.sequence, r2 = e3.time, u2 = m(t3);
- t3.length > 20 && (u2 = t3.slice(0, 20), Ve.w("".concat(o2, ". the length of extensions cannot exceed 20.")));
- var c2 = "conversationID:".concat(a2, " messageID:").concat(s2, " sequence:").concat(i2, " time:").concat(r2, " count:").concat(u2.length), l2 = new Aa("setMessageExtensions");
- return l2.setMessage(c2), Ve.l("".concat(o2, " ").concat(c2)), this._modifyMessageExtensions(e3, u2).then(function(e4) {
- var t4 = e4.resultList, n4 = e4.successCount, s3 = e4.failureCount, a3 = "success count:".concat(n4, " fail count:").concat(s3);
- return l2.setMoreMessage(a3).end(), Ve.l("".concat(o2, " ok. ").concat(a3)), Ya({ extensions: t4 });
- }).catch(function(e4) {
- return n3.probeNetwork().then(function(t4) {
- var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
- l2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "getMessageExtensions", value: function(e3) {
- var t3 = this;
- if (!this.canIUse(B.MSG_EXT))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- 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");
- u2.setMessage(r2), Ve.l("".concat(n3, " ").concat(r2));
- var c2 = void 0;
- return this.getMessageExtensionsMap.has(o2) && (c2 = this._getGlobalSequence(o2)), this._getMessageExtensions(e3, c2).then(function(e4) {
- 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 });
- }).catch(function(e4) {
- return t3.probeNetwork().then(function(t4) {
- var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
- u2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "deleteMessageExtensions", value: function(e3, t3) {
- var n3 = this;
- if (!this.canIUse(B.MSG_EXT))
- return Za({ code: ha.CANNOT_USE_COMMERCIAL_ABILITY });
- var o2 = "".concat(this._n, ".").concat("deleteMessageExtensions"), s2 = [], a2 = 3;
- zt(t3) || (a2 = 2, t3.forEach(function(e4) {
- s2.push({ key: e4, value: "", seq: 0 });
- }));
- 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");
- return d2.setMessage(l2), Ve.l("".concat(o2, " ").concat(l2)), this._modifyMessageExtensions(e3, s2, a2).then(function(e4) {
- var t4 = e4.resultList, n4 = e4.successCount, s3 = e4.failureCount, i3 = "";
- 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 });
- }).catch(function(e4) {
- return n3.probeNetwork().then(function(t4) {
- var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
- d2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(o2, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_modifyMessageExtensions", value: function(e3, t3) {
- 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;
- 3 !== o2 && (a2 = this._getRequestExtensions(e3, t3));
- var i2 = null;
- switch (s2) {
- case E.CONV_C2C:
- i2 = this.getModule(Un);
- break;
- case E.CONV_GROUP:
- i2 = this.getModule(Pn);
- break;
- case E.CONV_TOPIC:
- i2 = this.getModule(Fn);
- break;
- default:
- return Za({ code: ha.CANNOT_FIND_MODULE });
- }
- return i2.modifyMessageExtensions(e3, a2, o2).then(function(t4) {
- var o3 = t4.data, s3 = o3.extensions, a3 = o3.seq, i3 = [], r2 = 0, u2 = 0, c2 = [];
- return (s3 = zt(s3) ? [] : s3).forEach(function(e4) {
- var t5 = e4.errorCode, n4 = e4.extension, o4 = n4.key, s4 = n4.value, a4 = n4.seq;
- i3.push({ code: t5, key: o4, value: s4 }), 0 === t5 ? r2++ : u2++, c2.push({ key: o4, value: s4, seq: a4 });
- }), n3._updateGlobalSequence(e3.ID, a3), c2.length > 0 && (n3._updateLocalExtension(e3.ID, c2), c2 = null), { resultList: i3, successCount: r2, failureCount: u2 };
- }).catch(function(e4) {
- return Za(e4);
- });
- } }, { key: "_getRequestExtensions", value: function(e3, t3) {
- var n3 = [];
- if (this._hasLocalExtension(e3.ID)) {
- var o2 = this._getLocalExtension(e3.ID);
- return t3.forEach(function(e4) {
- var t4 = e4.key, s2 = e4.value, a2 = 0;
- o2.has(t4) && (a2 = o2.get(t4).seq), n3.push({ key: t4, value: s2, seq: a2 });
- }), n3;
- }
- return t3.forEach(function(e4) {
- var t4 = e4.key, o3 = e4.value;
- n3.push({ key: t4, value: o3, seq: 0 });
- }), n3;
- } }, { key: "_getMessageExtensions", value: function(e3, t3) {
- var n3 = this, o2 = "".concat(this._n, "._getMessageExtensions"), s2 = e3.ID, a2 = e3.to, i2 = null;
- switch (kt(a2) ? E.CONV_TOPIC : e3.conversationType) {
- case E.CONV_C2C:
- i2 = this.getModule(Un);
- break;
- case E.CONV_GROUP:
- i2 = this.getModule(Pn);
- break;
- case E.CONV_TOPIC:
- i2 = this.getModule(Fn);
- break;
- default:
- return Za({ code: ha.CANNOT_FIND_MODULE });
- }
- return i2.getMessageExtensions(e3, t3).then(function(t4) {
- var a3 = t4.data, i3 = a3.extensions, r2 = a3.completeFlag, u2 = a3.globalSequence, c2 = a3.clearSequence;
- 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) {
- var l2 = i3.slice(-1)[0].seq + 1;
- return n3._getMessageExtensions(e3, l2);
- }
- return n3._getLocalExtensions(s2);
- }).catch(function(e4) {
- return Za(e4);
- });
- } }, { key: "_hasLocalExtension", value: function(e3) {
- return this.messageExtensionMap.has(e3);
- } }, { key: "_getLocalExtension", value: function(e3) {
- return this.messageExtensionMap.get(e3);
- } }, { key: "_updateLocalExtension", value: function(e3, t3) {
- this._hasLocalExtension(e3) || this.messageExtensionMap.set(e3, /* @__PURE__ */ new Map());
- var n3 = this._getLocalExtension(e3);
- t3.forEach(function(e4) {
- var t4 = e4.key, o2 = e4.value, s2 = void 0 === o2 ? "" : o2, a2 = e4.seq;
- n3.set(t4, { value: s2, seq: a2 });
- });
- } }, { key: "_clearLocalExtension", value: function(e3, t3) {
- if (!(t3 <= 0) && this._hasLocalExtension(e3)) {
- var n3 = this._getLocalExtension(e3);
- n3.forEach(function(e4, o2) {
- e4.seq <= t3 && n3.delete(o2);
- });
- }
- } }, { key: "_getLocalExtensions", value: function(e3) {
- var t3 = [];
- this._hasLocalExtension(e3) && this._getLocalExtension(e3).forEach(function(e4, n3) {
- var o2 = e4.value;
- zt(o2) || t3.push({ key: n3, value: o2 });
- });
- return t3;
- } }, { key: "_getGlobalSequence", value: function(e3) {
- return this.globalSeqMap.get(e3);
- } }, { key: "_updateGlobalSequence", value: function(e3, t3) {
- this.globalSeqMap.set(e3, t3);
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this.messageExtensionMap.clear(), this.globalSeqMap.clear(), this.getMessageExtensionsMap.clear();
- } }]), n2;
- }(uo), Ir = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- return o(this, n2), (s2 = t2.call(this, e3))._n = "ComboMessageModule", s2;
- }
- return a(n2, [{ key: "sendMessage", value: function(e3) {
- var t3 = this, n3 = this._constructMessageInstance(e3);
- if (null === n3)
- return Za({ code: ha.MESSAGE_SEND_FAIL });
- this._addSendMessageTotalCount(n3);
- var o2 = Date.now();
- return this.getModule(qn).setMessageRandom(n3), this._sendComboMessage(n3, e3).then(function(e4) {
- var s2 = e4.data, a2 = s2.time, i2 = s2.sequence, r2 = s2.readReceiptCode;
- 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))));
- t3._addSendMessageSuccessCount(n3, o2);
- var u2 = t3.getModule(qn);
- n3.status = Qt.SUCCESS, n3.time = a2, n3.conversationType === E.CONV_GROUP && (n3.sequence = i2), u2.appendToMessageList(n3);
- var c2 = n3;
- return true === n3._isExcludedFromLastMessage && (c2 = ""), u2.onMessageSent({ conversationOptionsList: [{ conversationID: n3.conversationID, unreadCount: 0, type: n3.conversationType, subType: n3.conversationSubType, lastMessage: c2 }] }), Ya({ message: n3 });
- }).catch(function(e4) {
- return t3._onSendMessageFailed(n3, e4);
- });
- } }, { key: "_sendComboMessage", value: function(e3, t3) {
- var n3 = this._m.getModule(zn), o2 = "";
- 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 });
- } }, { key: "_constructMessageInstance", value: function(e3) {
- var t3 = "".concat(this._n, "._constructMessageInstance"), n3 = null;
- try {
- var o2 = this.getMyUserID(), s2 = {};
- 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) {
- var a2 = e3.To_Account;
- 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);
- }
- 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);
- for (var i2, r2 = e3.MsgBody.length, u2 = 0; u2 < r2; u2++)
- "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 });
- var c2 = n3.getElements();
- n3.payload = c2[0].content, n3.type = c2[0].type;
- } catch (l2) {
- n3 = null, Ve.e("".concat(t3, " failed. error:"), l2);
- }
- return n3;
- } }, { key: "_onSendMessageFailed", value: function(e3, t3) {
- e3.status = Qt.FAIL, this.getModule(qn).deleteMessageRandom(e3), this._addSendMessageFailCountOnUser(e3, t3);
- var n3 = new Aa("sendMessage");
- 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) {
- var o2 = v(e4, 2), s2 = o2[0], a2 = o2[1];
- n3.setError(t3, s2, a2).end();
- }), 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 } }));
- } }, { key: "_getSendMessageSpecifiedKey", value: function(e3) {
- if (e3.conversationType === E.CONV_C2C)
- return va;
- if (e3.conversationType === E.CONV_GROUP) {
- var t3 = this.getModule(Pn).getLocalGroupProfile(e3.to);
- if (!t3)
- return;
- var n3 = t3.type;
- return Tt(n3) ? Ma : ma;
- }
- } }, { key: "_addSendMessageTotalCount", value: function(e3) {
- var t3 = this._getSendMessageSpecifiedKey(e3);
- t3 && this.getModule(eo).addTotalCount(t3);
- } }, { key: "_addSendMessageSuccessCount", value: function(e3, t3) {
- var n3 = Math.abs(Date.now() - t3), o2 = this._getSendMessageSpecifiedKey(e3);
- if (o2) {
- var s2 = this.getModule(eo);
- s2.addSuccessCount(o2), s2.addCost(o2, n3);
- }
- } }, { key: "_addSendMessageFailCountOnUser", value: function(e3, t3) {
- var n3 = t3.code, o2 = void 0 === n3 ? -1 : n3, s2 = this.getModule(eo), a2 = this._getSendMessageSpecifiedKey(e3);
- mr(o2) && a2 && s2.addFailedCountOfUserSide(a2);
- } }]), n2;
- }(uo), Cr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- return o(this, n2), (s2 = t2.call(this, e3))._n = "PluginModule", s2.plugins = {}, s2;
- }
- return a(n2, [{ key: "registerPlugin", value: function(e3) {
- var t3 = this;
- Object.keys(e3).forEach(function(n3) {
- t3.plugins[n3] = e3[n3];
- }), new Aa("registerPlugin").setMessage("".concat(Object.keys(e3))).end();
- } }, { key: "getPlugin", value: function(e3) {
- return this.plugins[e3];
- } }, { key: "reset", value: function() {
- } }]), n2;
- }(uo), Tr = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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;
- }
- return a(s2, [{ key: "_onLoginSuccess", value: function(e3) {
- this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 });
- } }, { key: "_startSync", value: function(e3) {
- var n3 = this, o2 = e3.cookie, s3 = e3.syncFlag, a2 = e3.isOnlineSync, i2 = "".concat(this._n, "._startSync");
- 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) {
- var o3 = e4.data, s4 = o3.cookie, a3 = o3.syncFlag;
- 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 })));
- }).catch(function(e4) {
- Ve.e("".concat(i2, " failed. error:"), e4);
- });
- } }, { key: "_dispatchUnreadMessage", value: function(e3) {
- e3.eventArray && this.getModule(zn).onMessage({ head: {}, body: { eventArray: e3.eventArray, isInstantMessage: this._onlineSyncFlag, isSyncingEnded: e3.isSyncingEnded } });
- this.getModule(Un).onNewC2CMessage({ dataList: e3.messageList, isInstantMessage: !!e3.isSyncingEnded && this._onlineSyncFlag, C2CRemainingUnreadList: e3.C2CRemainingUnreadList, C2CPairUnreadList: e3.C2CPairUnreadList });
- } }, { key: "startOnlineSync", value: function() {
- Ve.l("".concat(this._n, ".startOnlineSync")), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 1 });
- } }, { key: "startSyncOnReconnected", value: function() {
- Ve.l("".concat(this._n, ".startSyncOnReconnected.")), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 });
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._onlineSyncFlag = false, this._cookie = "";
- } }]), s2;
- }(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"] };
- function kr(e2, t2) {
- if ("string" != typeof e2 && !Array.isArray(e2))
- throw new TypeError("Expected the input to be `string | string[]`");
- t2 = Object.assign({ pascalCase: false }, t2);
- var n2;
- return 0 === (e2 = Array.isArray(e2) ? e2.map(function(e3) {
- return e3.trim();
- }).filter(function(e3) {
- return e3.length;
- }).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) {
- return t3.toUpperCase();
- }).replace(/\d+(\w|$)/g, function(e3) {
- return e3.toUpperCase();
- }), n2 = e2, t2.pascalCase ? n2.charAt(0).toUpperCase() + n2.slice(1) : n2);
- }
- var Er = function(e2) {
- for (var t2 = false, n2 = false, o2 = false, s2 = 0; s2 < e2.length; s2++) {
- var a2 = e2[s2];
- 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);
- }
- return e2;
- };
- function Sr(e2, t2) {
- var n2 = 0;
- return function e3(t3, o2) {
- if (++n2 > 100)
- return n2--, t3;
- if (at(t3)) {
- var s2 = t3.map(function(t4) {
- return ot(t4) ? e3(t4, o2) : t4;
- });
- return n2--, s2;
- }
- if (ot(t3)) {
- var a2 = (i2 = t3, r2 = function(e4, t4) {
- if (!dt(t4))
- return false;
- if ((s3 = t4) !== kr(s3))
- for (var n3 = 0; n3 < Dr.ignoreKeyWord.length && !t4.includes(Dr.ignoreKeyWord[n3]); n3++)
- ;
- var s3;
- return it(o2[t4]) ? function(e5) {
- return "OPPOChannelID" === e5 ? e5 : e5[0].toUpperCase() + kr(e5).slice(1);
- }(t4) : o2[t4];
- }, u2 = /* @__PURE__ */ Object.create(null), Object.keys(i2).forEach(function(e4) {
- var t4 = r2(i2[e4], e4);
- t4 && (u2[t4] = i2[e4]);
- }), u2);
- return a2 = At(a2, function(t4, n3) {
- return at(t4) || ot(t4) ? e3(t4, o2) : t4;
- }), n2--, a2;
- }
- var i2, r2, u2;
- }(e2, t2);
- }
- function Lr(e2, t2) {
- if (at(e2))
- return e2.map(function(e3) {
- return ot(e3) ? Lr(e3, t2) : e3;
- });
- if (ot(e2)) {
- var n2 = (o2 = e2, s2 = function(e3, n3) {
- return it(t2[n3]) ? kr(n3) : t2[n3];
- }, a2 = {}, Object.keys(o2).forEach(function(e3) {
- a2[s2(o2[e3], e3)] = o2[e3];
- }), a2);
- return n2 = At(n2, function(e3) {
- return at(e3) || ot(e3) ? Lr(e3, t2) : e3;
- });
- }
- var o2, s2, a2;
- }
- var Ar = String.fromCharCode, Rr = function(e2) {
- var t2 = 0 | e2.charCodeAt(0);
- if (55296 <= t2)
- if (t2 < 56320) {
- var n2 = 0 | e2.charCodeAt(1);
- if (56320 <= n2 && n2 <= 57343) {
- if ((t2 = (t2 << 10) + n2 - 56613888 | 0) > 65535)
- return Ar(240 | t2 >>> 18, 128 | t2 >>> 12 & 63, 128 | t2 >>> 6 & 63, 128 | 63 & t2);
- } else
- t2 = 65533;
- } else
- t2 <= 57343 && (t2 = 65533);
- return t2 <= 2047 ? Ar(192 | t2 >>> 6, 128 | 63 & t2) : Ar(224 | t2 >>> 12, 128 | t2 >>> 6 & 63, 128 | 63 & t2);
- }, Nr = function(e2) {
- 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)
- o2[s2] = 0 | t2.charCodeAt(s2);
- return o2;
- }, Or = function() {
- function e2(t2) {
- o(this, e2), this._handler = t2;
- var n2 = t2.getURL();
- if (this._socket = null, this._workerSocket = null, this._id = _t(), this._handler.getIsWorkerEnabled()) {
- 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" }));
- this._workerSocket = new Worker(s2);
- var a2 = this;
- this._workerSocket.onmessage = function(e3) {
- var t3 = e3.data, n3 = t3.callback, o2 = t3.e, s3 = t3.extensions;
- "onOpen" === n3 ? a2._onOpen(s3) : "onClose" === n3 ? a2._onClose(o2) : "onError" === n3 ? a2._onError(o2) : "onMessage" === n3 && a2._onMessage(e3.data);
- }, this._workerSocket.postMessage({ cmd: "start", id: this._id, url: n2 });
- } else
- 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() {
- } }), 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));
- this._canIUseBinaryFrame = t2.canIUseBinaryFrame();
- }
- return a(e2, [{ key: "getID", value: function() {
- return this._id;
- } }, { key: "_onOpen", value: function(e3) {
- this._handler.onOpen({ id: this._id, res: JSON.stringify(e3) });
- } }, { key: "_onClose", value: function(e3) {
- this._handler.onClose({ id: this._id, e: e3 });
- } }, { key: "_onMessage", value: function(e3) {
- var t2;
- t2 = this._canIUseBinaryFrame ? this._isAppCompressedData(e3.data) ? this._handler.inflate(e3.data) : function(e4) {
- for (var t3 = new Uint8Array(e4), n2 = "", o2 = 0, s2 = t3.length; o2 < s2; ) {
- var a2 = t3[o2], i2 = 0, r2 = 0;
- 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)
- for (var u2 = 0; u2 < i2; )
- r2 = r2 << 6 | 63 & (a2 = t3[o2 + u2 + 1]), u2 += 1;
- else
- r2 = 65533, i2 = s2 - o2;
- n2 += String.fromCodePoint(r2), o2 += i2 + 1;
- }
- return n2;
- }(e3.data) : e3.data, this._handler.onMessage({ data: t2 });
- } }, { key: "_isAppCompressedData", value: function(e3) {
- var t2 = new Uint8Array(e3);
- return 67 === t2[0] && 79 === t2[1] && 77 === t2[2] && 80 === t2[3];
- } }, { key: "_onError", value: function(e3) {
- this._handler.onError({ id: this._id, e: e3 });
- } }, { key: "setIsWorkerEnabled", value: function(e3) {
- this._isWorkerEnabled = true;
- } }, { key: "close", value: function(e3) {
- if (this._workerSocket && (this._workerSocket.postMessage({ cmd: "stop", code: e3 }), this._workerSocket.terminate(), this._workerSocket = null), te)
- return re.offSocketClose(), re.offSocketMessage(), re.offSocketOpen(), re.offSocketError(), void re.closeSocket();
- this._socket && (ae ? (this._socket.onClose(function() {
- }), this._socket.onOpen(function() {
- }), this._socket.onMessage(function() {
- }), this._socket.onError(function() {
- })) : 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);
- } }, { key: "send", value: function(e3) {
- if (this._workerSocket)
- this._workerSocket.postMessage({ cmd: "sendMessage", data: this._canIUseBinaryFrame ? Nr(e3.data).buffer : e3.data });
- else {
- if (te)
- return void re.sendSocketMessage({ data: e3.data, fail: function() {
- e3.fail && e3.requestID && e3.fail(e3.requestID);
- } });
- this._socket && (ae ? this._socket.send({ data: this._canIUseBinaryFrame ? Nr(e3.data).buffer : e3.data, fail: function() {
- e3.fail && e3.requestID && e3.fail(e3.requestID);
- } }) : ie && this._socket.send(this._canIUseBinaryFrame ? Nr(e3.data) : e3.data));
- }
- } }]), e2;
- }(), Gr = 4e3, Ur = 4001, Pr = ["keyMap"], br = ["keyMap"], wr = "connected", Fr = "connecting", qr = "disconnected", xr = function() {
- function e2(t2) {
- 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();
- }
- return a(e2, [{ key: "_setWebsocketHost", value: function() {
- var e3 = this._channelModule.getModule(xn), t2 = G;
- 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);
- } }, { key: "_initConnection", value: function() {
- 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);
- var e3 = this._channelModule.getModule(xn).getProxyServer();
- zt(e3) || (this._url = e3), this._connect(), this._nextPingTs = 0;
- } }, { key: "_canIUseAnyCast", value: function() {
- return ie && V.HOST.CURRENT.ANYCAST;
- } }, { key: "onCheckTimer", value: function(e3) {
- e3 % 1 == 0 && this._checkPromiseMap();
- } }, { key: "_checkPromiseMap", value: function() {
- var e3 = this;
- 0 !== this._promiseMap.size && this._promiseMap.forEach(function(t2, n2) {
- var o2 = t2.reject, s2 = t2.timestamp, a2 = 15e3;
- -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));
- });
- } }, { key: "onOpen", value: function(e3) {
- if ("" !== this._readyState) {
- this._onOpenTs = Date.now();
- var t2 = e3.id, n2 = e3.res;
- this._socketID = t2;
- var o2 = Date.now() - this._startTs, s2 = "socketID:".concat(t2, " res:").concat(n2);
- 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());
- }
- } }, { key: "onClose", value: function(e3) {
- 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;
- 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());
- } }, { key: "onError", value: function(e3) {
- var t2 = e3.id, n2 = e3.e, o2 = "sourceSocketID:".concat(t2, " currentSocketID:").concat(this._socketID);
- 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());
- } }, { key: "onMessage", value: function(e3) {
- var t2;
- try {
- t2 = JSON.parse(e3.data);
- } catch (c2) {
- new Aa("jsonParseError").setMessage(e3.data).end();
- }
- if (t2 && t2.head) {
- var n2 = this._getRequestIDFromHead(t2.head), o2 = t2.body;
- if (!this._isTRTCCommand(n2)) {
- var s2 = bt(t2.head);
- o2 = Lr(t2.body, this._getResponseKeyMap(s2));
- }
- 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)) {
- var a2 = this._promiseMap.get(n2), i2 = a2.resolve, r2 = a2.reject, u2 = a2.timestamp;
- 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)));
- }
- this._channelModule.onMessage({ head: t2.head, body: o2 });
- }
- } }, { key: "_isTRTCCommand", value: function(e3) {
- for (var t2 = this._channelModule.getModule(so).getCommandList(), n2 = false, o2 = 0; o2 < t2.length; o2++)
- if (e3.startsWith(t2[o2])) {
- n2 = true;
- break;
- }
- return n2;
- } }, { key: "_calcRTT", value: function(e3) {
- var t2 = Date.now() - e3;
- this._channelModule.getModule(eo).addRTT(t2);
- } }, { key: "_connect", value: function() {
- 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();
- } }, { key: "getURL", value: function() {
- this._channelModule.isDevMode() && (this._canIUseBinaryFrame = false);
- var e3 = Ot();
- (te || X && "windows" === e3 || oe) && (this._canIUseBinaryFrame = false);
- var t2 = -1;
- "ios" === e3 ? t2 = me || -1 : "android" === e3 && (t2 = ye || -1);
- 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");
- 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);
- } }, { key: "_closeConnection", value: function(e3) {
- 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);
- } }, { key: "_resend", value: function() {
- var e3 = this;
- 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) {
- var o3 = t3.uplinkData, s3 = t3.resolve, a3 = t3.reject;
- e3._promiseMap.set(n3, { resolve: s3, reject: a3, timestamp: Date.now(), uplinkData: o3 }), e3._execute(n3, o3);
- }), this._simpleRequestMap.size > 0) {
- var t2, n2 = D(this._simpleRequestMap);
- try {
- for (n2.s(); !(t2 = n2.n()).done; ) {
- var o2 = v(t2.value, 2), s2 = o2[0], a2 = o2[1];
- this._execute(s2, a2);
- }
- } catch (i2) {
- n2.e(i2);
- } finally {
- n2.f();
- }
- this._simpleRequestMap.clear();
- }
- } }, { key: "send", value: function(e3) {
- var t2 = this;
- e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap;
- var n2 = g(e3, Pr), o2 = this._getRequestIDFromHead(e3.head), s2 = JSON.stringify(n2);
- return new Promise(function(e4, a2) {
- (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());
- });
- } }, { key: "simplySend", value: function(e3) {
- e3.head.seq = this._getSequence(), e3.head.reqtime = Math.floor(Date.now() / 1e3), e3.keyMap;
- var t2 = g(e3, br), n2 = this._getRequestIDFromHead(e3.head), o2 = JSON.stringify(t2);
- 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);
- } }, { key: "_execute", value: function(e3, t2) {
- this._socket.send({ data: t2, fail: ae ? this._onSendFail.bind(this) : void 0, requestID: e3 });
- } }, { key: "_onSendFail", value: function(e3) {
- Ve.l("".concat(this._n, "._onSendFail requestID:").concat(e3));
- } }, { key: "_getSequence", value: function() {
- var e3;
- if (this._startSequence < 2415919103)
- return e3 = this._startSequence, this._startSequence += 1, 2415919103 === this._startSequence && (this._startSequence = _t()), e3;
- } }, { key: "_getRequestIDFromHead", value: function(e3) {
- return e3.servcmd + e3.seq;
- } }, { key: "_getResponseKeyMap", value: function(e3) {
- var n2 = this._channelModule.getKeyMap(e3);
- return t(t({}, Dr.response), n2.response);
- } }, { key: "_reConnect", value: function() {
- this._readyState !== wr && this._readyState !== Fr && this.forcedReconnect();
- } }, { key: "forcedReconnect", value: function() {
- var e3 = this, t2 = "".concat(this._n, ".forcedReconnect");
- 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) {
- var o2 = v(n2, 2), s2 = o2[0];
- o2[1], s2 ? (Ve.w("".concat(t2, " disconnected from wsserver but network is ok, continue...")), e3._closeConnection(Ur), e3._initConnection()) : e3._channelModule.onReconnectFailed();
- }));
- } }, { key: "getReconnectFlag", value: function() {
- return this._reConnectFlag;
- } }, { key: "_setNextPingTs", value: function() {
- this._nextPingTs = Date.now() + 1e4;
- } }, { key: "getNextPingTs", value: function() {
- return this._nextPingTs;
- } }, { key: "isConnected", value: function() {
- return this._readyState === wr;
- } }, { key: "canIUseBinaryFrame", value: function() {
- return this._canIUseBinaryFrame;
- } }, { key: "inflate", value: function(e3) {
- if (this._channelModule.canIUseInflate())
- return this._channelModule.getModule(ro).inflate(e3);
- } }, { key: "setIsWorkerEnabled", value: function(e3) {
- Ve.l("".concat(this._n, ".setIsWorkerEnabled flag:").concat(e3)), this._isWorkerEnabled = e3;
- } }, { key: "getIsWorkerEnabled", value: function() {
- return this._isWorkerEnabled && Se;
- } }, { key: "_getRandom", value: function() {
- return 0 === this._random && (this._random = Math.random()), this._random;
- } }, { key: "_resetRandom", value: function() {
- this._random = 0;
- } }, { key: "close", value: function() {
- 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;
- } }]), e2;
- }(), Vr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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) {
- var a2 = s2._onAppHide.bind(h(s2)), i2 = s2._onAppShow.bind(h(s2));
- "function" == typeof re.offAppHide && re.offAppHide(a2), "function" == typeof re.offAppShow && re.offAppShow(i2), re.onAppHide(a2), re.onAppShow(i2);
- }
- return s2._timerForNotLoggedIn = -1, s2._timerForNotLoggedIn = setInterval(s2.onCheckTimer.bind(h(s2)), 1e3), s2._fatalErrorFlag = false, s2;
- }
- return a(n2, [{ key: "onCheckTimer", value: function(e3) {
- this._socketHandler && (this.isLoggedIn() ? (this._timerForNotLoggedIn > 0 && (clearInterval(this._timerForNotLoggedIn), this._timerForNotLoggedIn = -1), this._socketHandler.onCheckTimer(e3)) : this._socketHandler.onCheckTimer(1), this._checkNextPing());
- } }, { key: "onErrorCodeNotZero", value: function(e3) {
- this.getModule(zn).onErrorCodeNotZero(e3);
- } }, { key: "onMessage", value: function(e3) {
- this.getModule(zn).onMessage(e3);
- } }, { key: "send", value: function(e3) {
- 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();
- } }, { key: "_sendLogViaHTTP", value: function(e3) {
- var t3 = V.HOST.CURRENT.STAT;
- return new Promise(function(n3, o2) {
- 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";
- if (ae)
- re.request({ url: s2, data: a2, method: "POST", timeout: 3e3, header: { "content-type": i2 }, success: function() {
- n3();
- }, fail: function() {
- o2(new ja({ code: ha.NETWORK_ERROR }));
- } });
- else {
- var r2 = new XMLHttpRequest(), u2 = setTimeout(function() {
- r2.abort(), o2(new ja({ code: ha.NETWORK_TIMEOUT }));
- }, 3e3);
- r2.onreadystatechange = function() {
- 4 === r2.readyState && (clearTimeout(u2), 200 === r2.status || 304 === r2.status ? n3() : o2(new ja({ code: ha.NETWORK_ERROR })));
- }, r2.open("POST", s2, true), r2.setRequestHeader("Content-type", i2), r2.send(a2);
- }
- });
- } }, { key: "simplySend", value: function(e3) {
- return this._socketHandler ? this._socketHandler.simplySend(e3) : Promise.reject();
- } }, { key: "onOpen", value: function() {
- this._ping();
- } }, { key: "onClose", value: function() {
- this._socketHandler && (this._socketHandler.getReconnectFlag() && this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED));
- this.reConnect();
- } }, { key: "onError", value: function() {
- ae && !oe && this.outputWarning("DomainNameInMP"), this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
- } }, { key: "getKeyMap", value: function(e3) {
- return this.getModule(zn).getKeyMap(e3);
- } }, { key: "_onAppHide", value: function() {
- this._isAppShowing = false;
- } }, { key: "_onAppShow", value: function() {
- this._isAppShowing = true;
- } }, { key: "onRequestTimeout", value: function(e3) {
- } }, { key: "onReconnected", value: function() {
- Ve.l("".concat(this._n, ".onReconnected")), this._m.restartTimer(), this.getModule(zn).onReconnected(), this._emitNetStateChangeEvent(E.NET_STATE_CONNECTED);
- } }, { key: "onReconnectFailed", value: function() {
- Ve.l("".concat(this._n, ".onReconnectFailed")), this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
- } }, { key: "setIsWorkerEnabled", value: function(e3) {
- this._socketHandler && this._socketHandler.setIsWorkerEnabled(false);
- } }, { key: "offline", value: function() {
- this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED);
- } }, { key: "reConnect", value: function() {
- var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], t3 = false;
- this._socketHandler && (t3 = this._socketHandler.getReconnectFlag());
- var n3 = "forcedFlag:".concat(e3, " fatalErrorFlag:").concat(this._fatalErrorFlag, " previousState:").concat(this._previousState, " reconnectFlag:").concat(t3);
- if (Ve.l("".concat(this._n, ".reConnect ").concat(n3)), !this._fatalErrorFlag && this._socketHandler) {
- if (true === e3)
- this._socketHandler.forcedReconnect();
- else {
- if (this._previousState === E.NET_STATE_CONNECTING && t3)
- return;
- this._socketHandler.forcedReconnect();
- }
- this._emitNetStateChangeEvent(E.NET_STATE_CONNECTING);
- }
- } }, { key: "_emitNetStateChangeEvent", value: function(e3) {
- 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 }));
- } }, { key: "_ping", value: function() {
- var e3 = this;
- if (true !== this._probing) {
- this._probing = true;
- var t3 = this.getModule(zn).getProtocolData({ protocolName: Hs });
- this.send(t3).then(function() {
- e3._probing = false;
- }).catch(function(t4) {
- if (Ve.w("".concat(e3._n, "._ping failed. error:"), t4), e3._probing = false, t4 && 60002 === t4.code)
- 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);
- e3.probeNetwork().then(function(t5) {
- var n3 = v(t5, 2), o2 = n3[0], s2 = n3[1];
- 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);
- });
- });
- }
- } }, { key: "_checkNextPing", value: function() {
- this._socketHandler && (this._socketHandler.isConnected() && Date.now() >= this._socketHandler.getNextPingTs() && this._ping());
- } }, { key: "canIUseInflate", value: function() {
- return this._m.canIUseInflate();
- } }, { key: "dealloc", value: function() {
- this._socketHandler && (this._socketHandler.close(), this._socketHandler = null), this._timerForNotLoggedIn > -1 && clearInterval(this._timerForNotLoggedIn);
- } }, { key: "onRestApiKickedOut", value: function() {
- this._socketHandler && (this._socketHandler.close(), this.reConnect(true));
- } }, { key: "reset", value: function() {
- 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);
- } }]), n2;
- }(uo), Br = ["a2", "tinyid"], Hr = ["a2", "tinyid"], Kr = function() {
- function e2(t2) {
- o(this, e2), this._n = "ProtocolHandler", this._sessionModule = t2, this._configMap = /* @__PURE__ */ new Map(), this._fillConfigMap();
- }
- return a(e2, [{ key: "_fillConfigMap", value: function() {
- this._configMap.clear();
- var e3 = this._sessionModule.genCommonHead(), n2 = this._sessionModule.genCosSpecifiedHead(), o2 = this._sessionModule.genSSOReportHead(), s2 = this._sessionModule.isIntl();
- this._configMap.set(co, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(lo, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.LOGOUT) }), body: { type: 0 }, keyMap: { request: { type: "wslogout_type" } } };
- }(e3)), this._configMap.set(po, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.HELLO) }), body: { isWebUniapp: 0 }, keyMap: { response: { NewInstInfo: "newInstanceInfo" } } };
- }(e3)), this._configMap.set(go, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.STAT_SERVICE, ".").concat(V.CMD.KICK_OTHER) }), body: {} };
- }(e3)), this._configMap.set(qs, function(e4) {
- 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" } } };
- }(n2)), this._configMap.set(xs, function(e4) {
- 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" } } };
- }(n2)), this._configMap.set(Vs, function(e4) {
- 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" } } };
- }(n2)), this._configMap.set(Qs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set($s, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Xs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Zs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ea, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OVERLOAD_PUSH, ".").concat(V.CMD.OVERLOAD_NOTIFY) }), body: {}, keyMap: { response: { OverLoadServCmd: "overloadCommand", DelaySecs: "waitingTime" } } };
- }(e3)), this._configMap.set(ho, function(e4) {
- 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" } } };
- }(e3)), s2 || (this._configMap.set(_o, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.OPEN_IM, ".").concat(V.CMD.BIG_DATA_HALLWAY_AUTH_KEY) }), body: {} };
- }(e3)), this._configMap.set(pa, function(e4) {
- 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" } } };
- }(e3))), this._configMap.set(fo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(vo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(To, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(is, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(So, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ro, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(cs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Do, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ko, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Eo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(rs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(us, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ao, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ms, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ga, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ys, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ls, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ps, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ds, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(gs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(No, function(e4) {
- 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 } };
- }(e3)), this._configMap.set(Oo, function(e4) {
- 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 } };
- }(e3)), this._configMap.set(Es, function(e4) {
- 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 } };
- }(e3)), this._configMap.set(Ss, function(e4) {
- 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 } };
- }(e3)), this._configMap.set(Lo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Uo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Go, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Po, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(bo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(wo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Fo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(qo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(xo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Vo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Bo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ho, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ko, function(e4) {
- 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: {} } };
- }(e3)), this._configMap.set(Wo, function(e4) {
- 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: {} } };
- }(e3)), this._configMap.set(Yo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(mo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Mo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(yo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Io, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.ADD_BLACKLIST) }), body: { fromAccount: "", toAccount: [] } };
- }(e3)), this._configMap.set(Co, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.FRIEND, ".").concat(V.CMD.DELETE_BLACKLIST) }), body: { fromAccount: "", toAccount: [] } };
- }(e3)), this._configMap.set(aa, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.SET_SELF_STATUS) }), body: { customStatus: "" }, keyMap: {} };
- }(e3)), this._configMap.set(ia, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ra, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ua, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(jo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(zo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Jo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Xo, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.DESTROY_GROUP) }), body: { groupID: void 0 } };
- }(e3)), this._configMap.set(Zo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Qo, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set($o, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(es, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.QUIT_GROUP) }), body: { groupID: void 0 } };
- }(e3)), this._configMap.set(ts, function(e4) {
- 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: {} } };
- }(e3)), this._configMap.set(ns, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(os2, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ss, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(as, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(hs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(_s, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(fs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(vs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ms, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.GROUP, ".").concat(V.CMD.GET_ONLINE_MEMBER_NUM) }), body: { groupID: void 0 } };
- }(e3)), this._configMap.set(Is, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Cs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ts, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ds, function(e4) {
- 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"] } };
- }(e3)), this._configMap.set(ks, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ls, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(As, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Rs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ta, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(na, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(oa, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(sa, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ns, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Os, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Gs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Us, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ps, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(bs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(ws, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Fs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Bs, function(e4) {
- 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" } } };
- }(o2)), this._configMap.set(Hs, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.HEARTBEAT, ".").concat(V.CMD.ALIVE) }), body: {} };
- }(e3)), this._configMap.set(Ks, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ws, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Ys, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(js, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(Js, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(zs, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(da, function(e4) {
- 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" } } };
- }(e3)), this._configMap.set(la, function(e4) {
- return { head: t(t({}, e4), {}, { servcmd: "".concat(V.NAME.IM_OPEN_STATUS, ".").concat(V.CMD.STAT_FOREGROUND) }), body: { isWebUniapp: 0 } };
- }(e3)), this._configMap.set(ca, function(e4) {
- 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" } } };
- }(e3));
- } }, { key: "has", value: function(e3) {
- return this._configMap.has(e3);
- } }, { key: "get", value: function(e3) {
- return this._configMap.get(e3);
- } }, { key: "update", value: function() {
- this._fillConfigMap();
- } }, { key: "getKeyMap", value: function(e3) {
- return this.has(e3) ? this.get(e3).keyMap || {} : (Ve.w("".concat(this._n, ".getKeyMap unknown protocolName:").concat(e3)), {});
- } }, { key: "getProtocolData", value: function(e3) {
- var t2 = e3.protocolName, n2 = e3.requestData, o2 = this.get(t2), s2 = null;
- if (n2) {
- var a2 = this._simpleDeepCopy(o2), i2 = this._updateService(n2, a2), r2 = i2.body, u2 = /* @__PURE__ */ Object.create(null);
- for (var c2 in r2)
- if (Object.prototype.hasOwnProperty.call(r2, c2)) {
- if (u2[c2] = r2[c2], void 0 === n2[c2])
- continue;
- u2[c2] = n2[c2];
- }
- i2.body = u2, s2 = this._getUplinkData(i2);
- } else
- s2 = this._getUplinkData(o2);
- return s2;
- } }, { key: "_getUplinkData", value: function(e3) {
- var t2 = this._requestDataCleaner(e3), n2 = bt(t2.head), o2 = Sr(t2.body, this._getRequestKeyMap(n2));
- return t2.body = o2, t2;
- } }, { key: "_updateService", value: function(e3, t2) {
- var n2 = bt(t2.head);
- if (this._isFromGroupRequest(t2)) {
- var o2 = e3.type, s2 = e3.groupID, a2 = void 0 === s2 ? void 0 : s2, i2 = e3.groupIDList, r2 = void 0 === i2 ? [] : i2;
- it(a2) && (a2 = r2[0] || ""), Dt({ type: o2, groupID: a2 }) && (t2.head.servcmd = "".concat(V.NAME.GROUP_COMMUNITY, ".").concat(n2));
- }
- return t2;
- } }, { key: "_isFromGroupRequest", value: function(e3) {
- return e3.head.servcmd.includes(V.NAME.GROUP) || e3.head.servcmd.includes(V.NAME.GROUP_ATTR);
- } }, { key: "_getRequestKeyMap", value: function(e3) {
- var n2 = this.getKeyMap(e3);
- return t(t({}, Dr.request), n2.request);
- } }, { key: "_requestDataCleaner", value: function(e3) {
- var t2 = Array.isArray(e3) ? [] : /* @__PURE__ */ Object.create(null);
- for (var o2 in e3)
- 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]));
- return t2;
- } }, { key: "_simpleDeepCopy", value: function(e3) {
- for (var t2, n2 = Object.keys(e3), o2 = {}, s2 = 0, a2 = n2.length; s2 < a2; s2++)
- 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];
- return o2;
- } }]), e2;
- }(), Wr = [Ys], Yr = function() {
- function e2(t2) {
- 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());
- }
- return a(e2, [{ key: "_c2cMessageArrayHandler", value: function(e3) {
- var t2 = this._sessionModule.getModule(Un);
- if (t2) {
- if (e3.dataList.forEach(function(e4) {
- if (1 === e4.isSyncMessage) {
- var t3 = e4.from;
- e4.from = e4.to, e4.to = t3;
- }
- }), 1 === e3.needSync)
- this._sessionModule.getModule(jn).startOnlineSync();
- t2.onNewC2CMessage({ dataList: e3.dataList, isInstantMessage: true });
- }
- } }, { key: "_c2cMessageModifiedHandler", value: function(e3) {
- var t2 = this._sessionModule.getModule(Un);
- t2 && t2.onC2CMessageModified(e3);
- } }, { key: "_groupMessageArrayHandler", value: function(e3) {
- var t2 = this._sessionModule.getModule(Pn);
- t2 && t2.onNewGroupMessage({ event: e3.event, dataList: e3.dataList, isInstantMessage: true });
- } }, { key: "_groupMessageModifiedHandler", value: function(e3) {
- var t2 = this._sessionModule.getModule(Pn);
- t2 && t2.onGroupMessageModified(e3);
- } }, { key: "_groupTipsHandler", value: function(e3) {
- var t2 = this._sessionModule.getModule(Pn);
- if (t2) {
- var n2 = e3.event, o2 = e3.dataList, s2 = e3.isInstantMessage, a2 = void 0 === s2 || s2, i2 = e3.isSyncingEnded;
- switch (n2) {
- case 4:
- case 6:
- t2.onNewGroupTips({ event: n2, dataList: o2 });
- break;
- case 5:
- for (var r2 = 0; r2 < o2.length; r2++)
- if (at(o2[r2].elements.revokedInfos))
- t2.onGroupMessageRevoked({ dataList: o2 });
- else if (at(o2[r2].elements.groupMessageReadNotice))
- t2.onGroupMessageReadNotice({ dataList: o2 });
- else {
- if (!at(o2[r2].elements.readReceiptList)) {
- t2.onNewGroupSystemNotice({ dataList: o2, isInstantMessage: a2, isSyncingEnded: i2 });
- break;
- }
- t2.onReadReceiptList({ dataList: o2 });
- }
- break;
- case 12:
- this._sessionModule.getModule(qn).onNewGroupAtTips({ dataList: o2 });
- break;
- default:
- Ve.l("".concat(this._n, "._groupTipsHandler unknown event:").concat(n2, " dataList:"), o2);
- }
- }
- } }, { key: "_C2CNotifyMessageArrayHandler", value: function(e3) {
- var t2 = this, n2 = e3.dataList;
- if (at(n2)) {
- var o2 = this._sessionModule.getModule(Un);
- n2.forEach(function(e4) {
- if (st(e4)) {
- if (e4.hasOwnProperty("kickoutMsgNotify")) {
- var s2 = e4.kickoutMsgNotify, a2 = s2.kickType, i2 = s2.newInstanceInfo, r2 = void 0 === i2 ? {} : i2;
- 1 === a2 ? t2._sessionModule.onMultipleAccountKickedOut(r2) : 2 === a2 ? t2._sessionModule.onMultipleDeviceKickedOut(r2) : 3 === a2 && t2._sessionModule.onRestApiKickedOut(r2);
- } else if (e4.hasOwnProperty("c2cMessageRevokedNotify"))
- o2 && o2.onC2CMessageRevoked({ dataList: n2 });
- else if (e4.hasOwnProperty("c2cMessageReadReceipt"))
- o2 && o2.onC2CMessageReadReceipt({ dataList: n2 });
- else if (e4.hasOwnProperty("c2cMessageReadNotice"))
- o2 && o2.onC2CMessageReadNotice({ dataList: n2 });
- else if (e4.hasOwnProperty("muteNotificationsSync")) {
- t2._sessionModule.getModule(qn).onC2CMessageRemindTypeSynced({ dataList: n2 });
- }
- }
- });
- }
- } }, { key: "_C2CReadReceiptArrayHandler", value: function(e3) {
- this._sessionModule.getModule(Un).onReadReceiptList(e3);
- } }, { key: "_profileHandler", value: function(e3) {
- this._sessionModule.getModule(Gn).onProfileModified({ dataList: e3.dataList });
- var t2 = this._sessionModule.getModule(bn);
- t2 && t2.onFriendProfileModified({ dataList: e3.dataList });
- } }, { key: "_relationChainHandler", value: function(e3) {
- this._sessionModule.getModule(Gn).onRelationChainModified({ dataList: e3.dataList });
- var t2 = this._sessionModule.getModule(bn);
- t2 && t2.onRelationChainModified({ dataList: e3.dataList });
- } }, { key: "_recentContactHandler", value: function(e3) {
- var t2 = e3.dataList;
- if (at(t2)) {
- var n2 = this._sessionModule.getModule(qn);
- n2 && t2.forEach(function(e4) {
- var t3 = e4.pushType;
- if (1 === t3) {
- var o2 = e4.recentContactDeleteItem;
- n2.onConversationDeleted(o2.recentContactList);
- } else if (2 === t3) {
- var s2 = e4.recentContactTopItem;
- n2.onConversationPinned(s2.recentContactList);
- } else if (3 === t3) {
- var a2 = e4.recentContactTopItem;
- n2.onConversationUnpinned(a2.recentContactList);
- } else if (4 === t3) {
- var i2 = e4.recentContactMarkContact;
- n2.onConversationMarkUpdated(i2.recentContactMarkContactItem);
- } else if (5 === t3) {
- var r2 = e4.recentContactCreateContactGroup;
- n2.onConversationGroupCreated(r2.msgContactGroupContactItem);
- } else if (6 === t3) {
- var u2 = e4.recentContactDelContactGroup;
- n2.onConversationGroupDeleted(u2.msgGroupItem);
- } else if (7 === t3) {
- var c2 = e4.recentContactUpdateContactGroup, l2 = c2.updateType, d2 = c2.msgUpdateGroup, p2 = c2.msgUpdateContact;
- if (1 === l2) {
- var g2 = d2.updateGroupType;
- 1 === g2 ? n2.onConversationGroupNameUpdated(d2) : 2 === g2 && n2.onConversationInGroupUpdated(d2);
- } else
- 2 === l2 && n2.onConversationAddedToOrDeletedFromGroup(p2);
- }
- });
- }
- } }, { key: "_allMessageReadHandler", value: function(e3) {
- var t2 = e3.dataList, n2 = this._sessionModule.getModule(qn);
- n2 && n2.onPushedAllMessageRead(t2);
- } }, { key: "_userStatusListHandler", value: function(e3) {
- this._sessionModule.getModule(Gn).onUserStatusUpdated(e3);
- } }, { key: "_messageExtensionNotifyHandler", value: function(e3) {
- this._sessionModule.getModule(On).onMessageExtensionNotify(e3);
- } }, { key: "onMessage", value: function(e3) {
- var t2 = this, n2 = e3.body;
- if (this._filterMessageFromIMOpenPush(e3)) {
- var o2 = n2.eventArray, s2 = n2.isInstantMessage, a2 = n2.isSyncingEnded, i2 = n2.needSync;
- if (at(o2))
- for (var r2 = null, u2 = null, c2 = 0, l2 = 0, d2 = o2.length; l2 < d2; l2++) {
- c2 = (r2 = o2[l2]).event;
- var p2 = Object.keys(r2).find(function(e4) {
- return -1 !== t2._keys.indexOf(e4);
- });
- 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));
- }
- }
- } }, { key: "_filterMessageFromIMOpenPush", value: function(e3) {
- var t2 = e3.head, n2 = e3.body, o2 = t2.servcmd, s2 = false;
- if (it(o2) || (s2 = o2.includes(V.NAME.IM_CONFIG_MANAGER) || o2.includes(V.NAME.OVERLOAD_PUSH) || o2.includes(V.NAME.STAT_SERVICE)), !s2)
- return true;
- if (o2.includes(V.CMD.PUSHED_CLOUD_CONTROL_CONFIG))
- this._sessionModule.getModule(Zn).onPushedCloudControlConfig(n2);
- else if (o2.includes(V.CMD.PUSHED_COMMERCIAL_CONFIG)) {
- this._sessionModule.getModule(to).onPushedConfig(n2);
- } else if (o2.includes(V.CMD.OVERLOAD_NOTIFY))
- this._sessionModule.onPushedServerOverload(n2);
- else if (o2.includes(V.CMD.KICK_OTHER)) {
- var a2 = Date.now();
- this._sessionModule.reLoginOnKickOther();
- var i2 = new Aa("kickOther"), r2 = this._sessionModule.getModule(Rn).getLastWsHelloTs(), u2 = a2 - r2;
- i2.setMessage("last wshello time:".concat(r2, " diff:").concat(u2, "ms")).setNetworkType(this._sessionModule.getNetworkType()).end();
- }
- return false;
- } }]), e2;
- }(), 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) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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;
- }
- return a(s2, [{ key: "_init", value: function() {
- this._updateCommandFrequencyLimitMap(jr);
- } }, { key: "_onCloudConfigUpdated", value: function() {
- var e3 = this.getCloudConfig("cmd_frequency_limit");
- it(e3) || (e3 = JSON.parse(e3), this._updateCommandFrequencyLimitMap(e3));
- } }, { key: "_updateCommandFrequencyLimitMap", value: function(e3) {
- var t2 = this;
- e3.forEach(function(e4) {
- t2._commandFrequencyLimitMap.set(e4.cmd, { interval: e4.interval, count: e4.count });
- });
- } }, { key: "updateProtocolConfig", value: function() {
- this._protocolHandler.update();
- } }, { key: "request", value: function(e3) {
- Ve.d("".concat(this._n, ".request options:"), e3);
- var t2 = e3.protocolName, n3 = e3.tjgID;
- if (!this._protocolHandler.has(t2))
- return Ve.w("".concat(this._n, ".request unknown protocol:").concat(t2)), Za({ code: ha.CANNOT_FIND_PROTOCOL });
- var o2 = this.getProtocolData(e3), s3 = o2.head.servcmd;
- if (this._isFrequencyOverLimit(s3))
- return Za({ code: ha.OVER_FREQUENCY_LIMIT });
- if (this._isServerOverload(s3))
- return Za({ code: ha.OPEN_SERVICE_OVERLOAD_ERROR });
- zt(n3) || (o2.head.tjgID = n3);
- var a2 = this.getModule(Jn);
- return Wr.includes(t2) ? a2.simplySend(o2) : a2.send(o2);
- } }, { key: "getKeyMap", value: function(e3) {
- return this._protocolHandler.getKeyMap(e3);
- } }, { key: "genCommonHead", value: function() {
- var e3 = this.getModule(xn);
- 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: "" };
- } }, { key: "genCosSpecifiedHead", value: function() {
- var e3 = this.getModule(xn);
- 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 };
- } }, { key: "genSSOReportHead", value: function() {
- var e3 = this.getModule(xn);
- return { ver: "v4", platform: this._platform, websdkappid: O, websdkversion: N, sdkappid: e3.getSDKAppID(), contenttype: "", reqtime: 0, identifier: "", usersig: "", status_instid: e3.getStatusInstanceID(), sdkability: 192371 };
- } }, { key: "getProtocolData", value: function(e3) {
- return this._protocolHandler.getProtocolData(e3);
- } }, { key: "trans", value: function(e3) {
- var n3 = e3.servcmd, o2 = e3.data, s3 = { head: t(t({}, this.genCommonHead()), {}, { servcmd: n3 }), body: o2 };
- return this.getModule(Jn).send(s3);
- } }, { key: "sendComboMessage", value: function(e3) {
- var n3 = e3.servcmd, o2 = e3.data, s3 = { head: t(t({}, this.genCommonHead()), {}, { servcmd: n3 }), body: o2 };
- return this.getModule(Jn).send(s3);
- } }, { key: "onErrorCodeNotZero", value: function(e3) {
- var t2 = e3.errorCode;
- if (t2 === ha.HELLO_ANSWER_KICKED_OUT) {
- var n3 = e3.kickType, o2 = e3.newInstanceInfo, s3 = void 0 === o2 ? {} : o2;
- 1 === n3 ? this.onMultipleAccountKickedOut(s3) : 2 === n3 ? this.onMultipleDeviceKickedOut(s3) : 3 === n3 && this.onRestApiKickedOut(s3);
- }
- t2 !== ha.MESSAGE_A2KEY_EXPIRED && t2 !== ha.ACCOUNT_A2KEY_EXPIRED || (this._onUserSigExpired(), this.getModule(Jn).reConnect());
- } }, { key: "onMessage", value: function(e3) {
- var t2 = e3.body, n3 = t2.needAck, o2 = void 0 === n3 ? 0 : n3, s3 = t2.sessionData;
- 1 === o2 && this._sendACK(s3), this._messageDispatcher.onMessage(e3);
- } }, { key: "onReconnected", value: function() {
- this._reLoginOnReconnected();
- } }, { key: "reLoginOnKickOther", value: function() {
- Ve.l("".concat(this._n, ".reLoginOnKickOther")), this._reLogin();
- } }, { key: "_reLoginOnReconnected", value: function() {
- Ve.l("".concat(this._n, "._reLoginOnReconnected")), this._reLogin();
- } }, { key: "_reLogin", value: function() {
- var e3 = this;
- if (this.isLoggedIn()) {
- var t2 = 0, n3 = this.getModule(no);
- n3.canIUseOfflinePush() && (t2 = n3.getUniAppPlatform()), this.request({ protocolName: co, requestData: { isWebUniapp: t2 } }).then(function(t3) {
- var n4 = t3.data.instanceID;
- e3.getModule(xn).setStatusInstanceID(n4), Ve.l("".concat(e3._n, "._reLogin ok.")), e3.getModule(qn).syncConversationList().then(function() {
- Ve.l("".concat(e3._n, "._reLogin, sync conversation list ok.")), e3.getModule($n).start();
- }), e3.getModule(Pn).updateLocalMainSequenceOnReconnected();
- var o2 = e3.getModule(Fn);
- o2.resetGetTopicTime(), o2.getTopicListOnReconnected();
- });
- }
- } }, { key: "onMultipleAccountKickedOut", value: function(e3) {
- this.getModule(Rn).onMultipleAccountKickedOut(e3);
- } }, { key: "onMultipleDeviceKickedOut", value: function(e3) {
- this.getModule(Rn).onMultipleDeviceKickedOut(e3);
- } }, { key: "_onUserSigExpired", value: function() {
- this.getModule(Rn).onUserSigExpired();
- } }, { key: "onRestApiKickedOut", value: function(e3) {
- this.getModule(Rn).onRestApiKickedOut(e3);
- } }, { key: "_sendACK", value: function(e3) {
- this.request({ protocolName: Ys, requestData: { sessionData: e3 } });
- } }, { key: "_isFrequencyOverLimit", value: function(e3) {
- var t2 = e3.split(".")[1];
- if (!this._commandFrequencyLimitMap.has(t2))
- return false;
- if (!this._commandRequestInfoMap.has(t2))
- return this._commandRequestInfoMap.set(t2, { startTime: Date.now(), requestCount: 1 }), false;
- var n3 = this._commandFrequencyLimitMap.get(t2), o2 = n3.count, s3 = n3.interval, a2 = this._commandRequestInfoMap.get(t2), i2 = a2.startTime, r2 = a2.requestCount;
- if (Date.now() - i2 > 1e3 * s3)
- return this._commandRequestInfoMap.set(t2, { startTime: Date.now(), requestCount: 1 }), false;
- r2 += 1, this._commandRequestInfoMap.set(t2, { startTime: i2, requestCount: r2 });
- var u2 = false;
- return r2 > o2 && (u2 = true), u2;
- } }, { key: "_isServerOverload", value: function(e3) {
- if (!this._serverOverloadInfoMap.has(e3))
- return false;
- var t2 = this._serverOverloadInfoMap.get(e3), n3 = t2.overloadTime, o2 = t2.waitingTime, s3 = false;
- return Date.now() - n3 <= 1e3 * o2 ? s3 = true : (this._serverOverloadInfoMap.delete(e3), s3 = false), s3;
- } }, { key: "onPushedServerOverload", value: function(e3) {
- var t2 = e3.overloadCommand, n3 = e3.waitingTime;
- this._serverOverloadInfoMap.set(t2, { overloadTime: Date.now(), waitingTime: n3 }), Ve.w("".concat(this._n, ".onPushedServerOverload waitingTime:").concat(n3, "s"));
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._updateCommandFrequencyLimitMap(jr), this._commandRequestInfoMap.clear(), this._serverOverloadInfoMap.clear();
- } }]), s2;
- }(uo), Jr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- return o(this, n2), (s2 = t2.call(this, e3))._n = "MessageLossDetectionModule", s2._maybeLostSequencesMap = /* @__PURE__ */ new Map(), s2._firstRoundRet = [], s2;
- }
- return a(n2, [{ key: "onMessageMaybeLost", value: function(e3, t3, n3) {
- this._maybeLostSequencesMap.has(e3) || this._maybeLostSequencesMap.set(e3, []);
- for (var o2 = this._maybeLostSequencesMap.get(e3), s2 = 0; s2 < n3; s2++)
- -1 === o2.indexOf(t3 + s2) && o2.push(t3 + s2);
- } }, { key: "detectFirstRound", value: function(e3, t3) {
- var n3 = this._maybeLostSequencesMap.get(e3);
- if (!zt(n3) && !zt(t3)) {
- var o2 = n3.filter(function(e4) {
- return -1 === t3.indexOf(e4);
- });
- 0 === o2.length ? Ve.i("".concat(this._n, ".detectFirstRound no message loss. conversationID:").concat(e3)) : this._firstRoundRet = this._firstRoundRet.concat(o2), n3.length = 0;
- }
- } }, { key: "detectSecondRound", value: function(e3, t3) {
- if (!zt(this._firstRoundRet) && !zt(t3)) {
- var n3 = this._firstRoundRet.filter(function(e4) {
- return -1 === t3.indexOf(e4);
- });
- this._firstRoundRet.length = 0;
- var o2, s2 = n3.length;
- if (0 !== s2)
- s2 <= 5 ? o2 = e3 + "-" + n3.join("-") : (n3.sort(function(e4, t4) {
- return e4 - t4;
- }), 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));
- }
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._maybeLostSequencesMap.clear(), this._firstRoundRet.length = 0;
- } }]), n2;
- }(uo), Xr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "getCloudConfig", value: function(e3) {
- return it(e3) ? this._cloudConfig : this._cloudConfig.has(e3) ? this._cloudConfig.get(e3) : void 0;
- } }, { key: "_canFetchConfig", value: function() {
- return this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime;
- } }, { key: "fetchConfig", value: function() {
- var e3 = this, t3 = this._canFetchConfig();
- if (Ve.l("".concat(this._n, ".fetchConfig canFetchConfig:").concat(t3)), t3) {
- var n3 = new Aa("fetchCloudControlConfig"), o2 = this.getModule(xn).getSDKAppID();
- this._isFetching = true, this.request({ protocolName: Xs, requestData: { SDKAppID: o2, version: this._version } }).then(function(t4) {
- 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);
- }).catch(function(t4) {
- e3._isFetching = false, e3.probeNetwork().then(function(e4) {
- var o3 = v(e4, 2), s2 = o3[0], a2 = o3[1];
- n3.setError(t4, s2, a2).end();
- }), Ve.l("".concat(e3._n, ".fetchConfig failed. error:"), t4), e3._setExpiredTimeOnResponseError(12e4);
- });
- }
- } }, { key: "onPushedCloudControlConfig", value: function(e3) {
- 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);
- } }, { key: "onCheckTimer", value: function(e3) {
- this._canFetchConfig() && this.fetchConfig();
- } }, { key: "_parseCloudControlConfig", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, "._parseCloudControlConfig"), o2 = e3.errorCode, s2 = e3.errorMessage, a2 = e3.cloudControlConfig, i2 = e3.version, r2 = e3.expiredTime;
- if (0 === o2) {
- if (this._version !== i2) {
- var u2 = null;
- try {
- u2 = JSON.parse(a2);
- } catch (c2) {
- this.isPrivateNetWork() || Ve.e("".concat(n3, " JSON parse error. cloudControlConfig:"), a2);
- }
- u2 && (this._cloudConfig.clear(), Object.keys(u2).forEach(function(e4) {
- t3._cloudConfig.set(e4, u2[e4]);
- }), this._version = i2, this.emitInnerEvent(ti));
- }
- this._expiredTime = Date.now() + 1e3 * r2;
- } else
- 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));
- } }, { key: "_setExpiredTimeOnResponseError", value: function(e3) {
- this._expiredTime = Date.now() + e3;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._cloudConfig.clear(), this._expiredTime = 0, this._version = 0, this._isFetching = false;
- } }]), n2;
- }(uo), Zr = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- return o(this, n2), (s2 = t2.call(this, e3))._n = "RecoverMessageModule", s2.PULL_LIMIT_COUNT = 15, s2;
- }
- return a(n2, [{ key: "start", value: function() {
- this._recoverGroupChat(), this._recoverC2CChat();
- } }, { key: "_recoverGroupChat", value: function() {
- var e3, t3, n3 = this, o2 = this._getLocalConversationList().filter(function(e4) {
- return e4.type === E.CONV_GROUP && e4.groupProfile.type !== E.GRP_AVCHATROOM;
- }), s2 = this.getModule(qn), a2 = 0, i2 = 0, r2 = 0;
- o2.forEach(function(o3) {
- var u2 = o3.conversationID, c2 = o3.lastMessage;
- 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);
- });
- } }, { key: "_recoverC2CChat", value: function() {
- var e3, t3 = this, n3 = this._getLocalConversationList().filter(function(e4) {
- return e4.type === E.CONV_C2C;
- }), o2 = this.getModule(qn), s2 = 0, a2 = 0, i2 = 0, r2 = [Promise.resolve()];
- n3.forEach(function(n4) {
- var u2 = n4.conversationID, c2 = n4.lastMessage;
- 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 })));
- }), Promise.all(r2).then(function() {
- Ve.l("".concat(t3._n, "._recoverC2CChat all promise fulfilled, start to sync unread messages")), t3.getModule(jn).startSyncOnReconnected();
- });
- } }, { key: "_getLocalConversationList", value: function() {
- return this.getModule(qn).getLocalConversationList();
- } }, { key: "_recoverGroupMessage", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, "._recoverGroupMessage");
- Ve.l("".concat(n3, " options:"), e3);
- var o2 = e3.groupID, s2 = e3.localLastMessageSequence, a2 = e3.remoteLastMessageSequence;
- this._getGroupRomaingMessage({ groupID: o2, sequence: s2 }).then(function(e4) {
- var s3 = e4.data, i2 = s3.complete, r2 = s3.messageList;
- if (!it(r2)) {
- var u2 = r2[0].sequence;
- 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();
- var c2 = t3.getModule(Pn);
- r2.length > 1 && r2.sort(function(e5, t4) {
- return e5.sequence - t4.sequence;
- });
- for (var l2 = 0; l2 < r2.length; l2++) {
- var d2 = r2[l2];
- d2.from !== E.CONV_SYSTEM ? c2.onNewGroupMessage({ dataList: [d2], isInstantMessage: false, updateUnreadCount: false }) : c2.onNewGroupTips({ event: d2.event, dataList: [d2] });
- }
- t3._getGroupNotify(o2);
- }
- });
- } }, { key: "_getGroupNotify", value: function(e3) {
- this.getModule(Pn).getGroupNotify(e3);
- } }, { key: "_getGroupRomaingMessage", value: function(e3) {
- var t3 = e3.groupID, n3 = e3.sequence;
- return this.request({ protocolName: cs, requestData: { groupID: t3, count: this.PULL_LIMIT_COUNT, sequence: n3 + this.PULL_LIMIT_COUNT - 1 } });
- } }, { key: "_recoverC2CMessage", value: function(e3) {
- var t3 = this, n3 = "".concat(this._n, "._recoverC2CMessage");
- Ve.l("".concat(this._n, "._recoverC2CMessage options:"), e3);
- var o2 = e3.conversationID, s2 = e3.localLastMessageTime, a2 = e3.remoteLastMessageTime;
- return this._getC2CRoamingMessage({ conversationID: o2, time: s2 }).then(function(e4) {
- var s3 = e4.data, i2 = s3.complete, r2 = s3.messageList;
- if (!it(r2)) {
- var u2 = r2.length;
- 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 });
- var c2 = r2[u2 - 1].time;
- if (Ve.l("".concat(n3, " pkgLastMessageTime:").concat(c2, " complete:").concat(i2)), c2 < a2 && 1 !== i2)
- return t3._recoverC2CMessage({ conversationID: o2, localLastMessageTime: c2, remoteLastMessageTime: a2 });
- }
- });
- } }, { key: "_getC2CRoamingMessage", value: function(e3) {
- var t3 = e3.conversationID, n3 = e3.time;
- return this.request({ protocolName: So, requestData: { peerAccount: t3.replace(E.CONV_C2C, ""), count: this.PULL_LIMIT_COUNT + 1, lastMessageTime: n3, direction: 1 } });
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset"));
- } }]), n2;
- }(uo), Qr = function() {
- function e2() {
- o(this, e2), this._n = "AvgE2EDelay", this._e2eDelayArray = [];
- }
- return a(e2, [{ key: "addMessageDelay", value: function(e3) {
- var t2 = we() - e3;
- t2 >= 0 && this._e2eDelayArray.push(t2);
- } }, { key: "_calcAvg", value: function(e3, t2) {
- if (0 === t2)
- return 0;
- var n2 = 0;
- return e3.forEach(function(e4) {
- n2 += e4;
- }), wt(n2 / t2, 1);
- } }, { key: "_calcCountWithLimit", value: function(e3) {
- var t2 = e3.e2eDelayArray, n2 = e3.min, o2 = e3.max;
- return t2.filter(function(e4) {
- return n2 <= e4 && e4 < o2;
- }).length;
- } }, { key: "_calcPercent", value: function(e3, t2) {
- var n2 = wt(e3 / t2 * 100, 2);
- return n2 > 100 && (n2 = 100), n2;
- } }, { key: "_checkE2EDelayException", value: function(e3, t2) {
- var n2 = e3.filter(function(e4) {
- return e4 > t2;
- });
- if (n2.length > 0) {
- 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);
- if (r2 > 50)
- new Aa("messageE2EDelayException").setMessage("count:".concat(o2, " min:").concat(s2, " max:").concat(a2, " avg:").concat(i2, " percent:").concat(r2)).setLevel("warning").end();
- }
- } }, { key: "getStatResult", value: function() {
- var e3 = this._e2eDelayArray.length;
- if (0 === e3)
- return null;
- 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);
- return this._checkE2EDelayException(t2, 3), t2.length = 0, this.reset(), { totalCount: e3, countLessThan1Second: n2, percentOfCountLessThan1Second: s2, countLessThan3Second: o2, percentOfCountLessThan3Second: a2, avgDelay: i2 };
- } }, { key: "reset", value: function() {
- this._e2eDelayArray.length = 0;
- } }]), e2;
- }(), $r = function() {
- function e2() {
- o(this, e2), this._n = "AvgRTT", this._requestCount = 0, this._rttArray = [];
- }
- return a(e2, [{ key: "addRequestCount", value: function() {
- this._requestCount += 1;
- } }, { key: "addRTT", value: function(e3) {
- this._rttArray.push(e3);
- } }, { key: "_calcTotalCount", value: function() {
- return this._requestCount;
- } }, { key: "_calcRTTCount", value: function(e3) {
- return e3.length;
- } }, { key: "_calcSuccessRateOfRequest", value: function(e3, t2) {
- if (0 === t2)
- return 0;
- var n2 = wt(e3 / t2 * 100, 2);
- return n2 > 100 && (n2 = 100), n2;
- } }, { key: "_calcAvg", value: function(e3, t2) {
- if (0 === t2)
- return 0;
- var n2 = 0;
- return e3.forEach(function(e4) {
- n2 += e4;
- }), parseInt(n2 / t2);
- } }, { key: "_calcMax", value: function() {
- return Math.max.apply(Math, m(this._rttArray));
- } }, { key: "_calcMin", value: function() {
- return Math.min.apply(Math, m(this._rttArray));
- } }, { key: "getStatResult", value: function() {
- var e3 = this._calcTotalCount(), t2 = m(this._rttArray);
- if (0 === e3)
- return null;
- var n2 = this._calcRTTCount(t2), o2 = this._calcSuccessRateOfRequest(n2, e3), s2 = this._calcAvg(t2, n2);
- 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 };
- } }, { key: "reset", value: function() {
- this._requestCount = 0, this._rttArray.length = 0;
- } }]), e2;
- }(), eu = function() {
- function e2() {
- o(this, e2), this._map = /* @__PURE__ */ new Map();
- }
- return a(e2, [{ key: "initMap", value: function(e3) {
- var t2 = this;
- e3.forEach(function(e4) {
- t2._map.set(e4, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] });
- });
- } }, { key: "addTotalCount", value: function(e3) {
- return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).totalCount += 1, true);
- } }, { key: "addSuccessCount", value: function(e3) {
- return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).successCount += 1, true);
- } }, { key: "addFailedCountOfUserSide", value: function(e3) {
- return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).failedCountOfUserSide += 1, true);
- } }, { key: "addCost", value: function(e3, t2) {
- return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).costArray.push(t2), true);
- } }, { key: "addFileSize", value: function(e3, t2) {
- return !(it(e3) || !this._map.has(e3)) && (this._map.get(e3).fileSizeArray.push(t2), true);
- } }, { key: "_calcSuccessRateOfBusiness", value: function(e3) {
- if (it(e3) || !this._map.has(e3))
- return -1;
- var t2 = this._map.get(e3), n2 = wt(t2.successCount / t2.totalCount * 100, 2);
- return n2 > 100 && (n2 = 100), n2;
- } }, { key: "_calcSuccessRateOfPlatform", value: function(e3) {
- if (it(e3) || !this._map.has(e3))
- return -1;
- var t2 = this._map.get(e3), n2 = this._calcSuccessCountOfPlatform(e3) / t2.totalCount * 100;
- return (n2 = wt(n2, 2)) > 100 && (n2 = 100), n2;
- } }, { key: "_calcTotalCount", value: function(e3) {
- return it(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).totalCount;
- } }, { key: "_calcSuccessCountOfBusiness", value: function(e3) {
- return it(e3) || !this._map.has(e3) ? -1 : this._map.get(e3).successCount;
- } }, { key: "_calcSuccessCountOfPlatform", value: function(e3) {
- if (it(e3) || !this._map.has(e3))
- return -1;
- var t2 = this._map.get(e3);
- return t2.successCount + t2.failedCountOfUserSide;
- } }, { key: "_calcAvg", value: function(e3) {
- return it(e3) || !this._map.has(e3) ? -1 : e3 === Ia ? this._calcAvgSpeed(e3) : this._calcAvgCost(e3);
- } }, { key: "_calcAvgCost", value: function(e3) {
- var t2 = this._map.get(e3).costArray.length;
- if (0 === t2)
- return 0;
- var n2 = 0;
- return this._map.get(e3).costArray.forEach(function(e4) {
- n2 += e4;
- }), parseInt(n2 / t2);
- } }, { key: "_calcAvgSpeed", value: function(e3) {
- var t2 = 0, n2 = 0;
- return this._map.get(e3).costArray.forEach(function(e4) {
- t2 += e4;
- }), this._map.get(e3).fileSizeArray.forEach(function(e4) {
- n2 += e4;
- }), parseInt(1e3 * n2 / t2);
- } }, { key: "getStatResult", value: function(e3) {
- var t2 = this._calcTotalCount(e3);
- if (0 === t2)
- return null;
- var n2 = this._calcSuccessCountOfBusiness(e3), o2 = this._calcSuccessRateOfBusiness(e3), s2 = this._calcSuccessCountOfPlatform(e3), a2 = this._calcSuccessRateOfPlatform(e3), i2 = this._calcAvg(e3);
- return this.reset(e3), { totalCount: t2, successCountOfBusiness: n2, successRateOfBusiness: o2, successCountOfPlatform: s2, successRateOfPlatform: a2, avgValue: i2 };
- } }, { key: "reset", value: function(e3) {
- it(e3) ? this._map.clear() : this._map.set(e3, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] });
- } }]), e2;
- }(), tu = function() {
- function e2() {
- o(this, e2), this._lastMap = /* @__PURE__ */ new Map(), this._currentMap = /* @__PURE__ */ new Map();
- }
- return a(e2, [{ key: "initMap", value: function(e3) {
- var t2 = this;
- e3.forEach(function(e4) {
- t2._lastMap.set(e4, /* @__PURE__ */ new Map()), t2._currentMap.set(e4, /* @__PURE__ */ new Map());
- });
- } }, { key: "addMessageSequence", value: function(e3) {
- var t2 = e3.key, n2 = e3.message;
- if (it(t2) || !this._lastMap.has(t2) || !this._currentMap.has(t2))
- return false;
- var o2 = n2.conversationID, s2 = n2.sequence, a2 = o2.replace(E.CONV_GROUP, "");
- if (0 === this._lastMap.get(t2).size)
- this._addCurrentMap(e3);
- else if (this._lastMap.get(t2).has(a2)) {
- var i2 = this._lastMap.get(t2).get(a2), r2 = i2.length - 1;
- s2 > i2[0] && s2 < i2[r2] ? (i2.push(s2), i2.sort(), this._lastMap.get(t2).set(a2, i2)) : this._addCurrentMap(e3);
- } else
- this._addCurrentMap(e3);
- return true;
- } }, { key: "_addCurrentMap", value: function(e3) {
- var t2 = e3.key, n2 = e3.message, o2 = n2.conversationID, s2 = n2.sequence, a2 = o2.replace(E.CONV_GROUP, "");
- this._currentMap.get(t2).has(a2) || this._currentMap.get(t2).set(a2, []), this._currentMap.get(t2).get(a2).push(s2);
- } }, { key: "_copyData", value: function(e3) {
- if (!it(e3)) {
- this._lastMap.set(e3, /* @__PURE__ */ new Map());
- var t2, n2 = this._lastMap.get(e3), o2 = D(this._currentMap.get(e3));
- try {
- for (o2.s(); !(t2 = o2.n()).done; ) {
- var s2 = v(t2.value, 2), a2 = s2[0], i2 = s2[1];
- n2.set(a2, i2);
- }
- } catch (r2) {
- o2.e(r2);
- } finally {
- o2.f();
- }
- n2 = null, this._currentMap.set(e3, /* @__PURE__ */ new Map());
- }
- } }, { key: "getStatResult", value: function(e3) {
- if (it(this._currentMap.get(e3)) || it(this._lastMap.get(e3)))
- return null;
- if (0 === this._lastMap.get(e3).size)
- return this._copyData(e3), null;
- var t2 = 0, n2 = 0;
- if (this._lastMap.get(e3).forEach(function(e4, o3) {
- var s2 = m(e4.values()), a2 = s2.length, i2 = s2[a2 - 1] - s2[0] + 1;
- t2 += i2, n2 += a2;
- }), 0 === t2)
- return null;
- var o2 = wt(n2 / t2 * 100, 2);
- return o2 > 100 && (o2 = 100), this._copyData(e3), { totalCount: t2, successCountOfMessageReceived: n2, successRateOfMessageReceived: o2 };
- } }, { key: "reset", value: function() {
- this._currentMap.clear(), this._lastMap.clear();
- } }]), e2;
- }(), nu = function(e2) {
- r(s2, e2);
- var n2 = f(s2);
- function s2(e3) {
- var t2;
- 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();
- var a2 = t2.getInnerEmitterInstance();
- return a2.on(ei, t2._onLoginSuccess, h(t2)), a2.on(ti, t2._onCloudConfigUpdated, h(t2)), t2;
- }
- return a(s2, [{ key: "_onLoginSuccess", value: function() {
- var e3 = this;
- this._rateMessageSent.initMap(this._messageSentItems), this._rateMessageReceived.initMap(this._messageReceivedItems);
- var t2 = this.getModule(Vn), n3 = t2.getItem(this.TAG, false);
- !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) {
- e3._statInfoArr.push(t3);
- }), t2.removeItem(this.TAG, false));
- } }, { key: "_onCloudConfigUpdated", value: function() {
- var e3 = this.getCloudConfig("q_rpt_interval"), t2 = this.getCloudConfig("q_rpt_sdkappid_bl"), n3 = this.getCloudConfig("q_rpt_tinyid_wl");
- it(e3) || (this.REPORT_INTERVAL = Number(e3)), it(t2) || (this.REPORT_SDKAPPID_BLACKLIST = t2.split(",").map(function(e4) {
- return Number(e4);
- })), it(n3) || (this.REPORT_TINYID_WHITELIST = n3.split(","));
- } }, { key: "onCheckTimer", value: function(e3) {
- this.isLoggedIn() && e3 % this.REPORT_INTERVAL == 0 && (this.wholePeriod = true, this._report());
- } }, { key: "addRequestCount", value: function() {
- this._avgRTT.addRequestCount();
- } }, { key: "addRTT", value: function(e3) {
- this._avgRTT.addRTT(e3);
- } }, { key: "addMessageDelay", value: function(e3) {
- this._avgE2EDelay.addMessageDelay(e3);
- } }, { key: "addTotalCount", value: function(e3) {
- this._rateMessageSent.addTotalCount(e3) || Ve.w("".concat(this._n, ".addTotalCount invalid key:"), e3);
- } }, { key: "addSuccessCount", value: function(e3) {
- this._rateMessageSent.addSuccessCount(e3) || Ve.w("".concat(this._n, ".addSuccessCount invalid key:"), e3);
- } }, { key: "addFailedCountOfUserSide", value: function(e3) {
- this._rateMessageSent.addFailedCountOfUserSide(e3) || Ve.w("".concat(this._n, ".addFailedCountOfUserSide invalid key:"), e3);
- } }, { key: "addCost", value: function(e3, t2) {
- this._rateMessageSent.addCost(e3, t2) || Ve.w("".concat(this._n, ".addCost invalid key or cost:"), e3, t2);
- } }, { key: "addFileSize", value: function(e3, t2) {
- this._rateMessageSent.addFileSize(e3, t2) || Ve.w("".concat(this._n, ".addFileSize invalid key or size:"), e3, t2);
- } }, { key: "addMessageSequence", value: function(e3) {
- this._rateMessageReceived.addMessageSequence(e3) || Ve.w("".concat(this._n, ".addMessageSequence invalid key:"), e3.key);
- } }, { key: "_getQualityItem", value: function(e3) {
- var n3 = {}, o2 = Sa[this.getNetworkType()];
- it(o2) && (o2 = 8);
- var s3 = { qualityType: ka[e3], timestamp: Pe(), networkType: o2, extension: "" };
- switch (e3) {
- case _a:
- n3 = this._avgRTT.getStatResult();
- break;
- case fa:
- n3 = this._avgE2EDelay.getStatResult();
- break;
- case va:
- case ma:
- case Ma:
- case ya:
- case Ia:
- n3 = this._rateMessageSent.getStatResult(e3);
- break;
- case Ca:
- case Ta:
- case Da:
- n3 = this._rateMessageReceived.getStatResult(e3);
- }
- return null === n3 ? null : t(t({}, s3), n3);
- } }, { key: "_report", value: function(e3) {
- var t2 = this, n3 = [], o2 = null;
- it(e3) ? this._qualityItems.forEach(function(e4) {
- null !== (o2 = t2._getQualityItem(e4)) && (o2.reportIndex = t2.reportIndex, o2.wholePeriod = t2.wholePeriod, n3.push(o2));
- }) : 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 = []);
- var s3 = this.getModule(xn), a2 = s3.getSDKAppID(), i2 = s3.getTinyID();
- Ft(this.REPORT_SDKAPPID_BLACKLIST, a2) && !qt(this.REPORT_TINYID_WHITELIST, i2) && (n3 = []), n3.length > 0 && this._doReport(n3);
- } }, { key: "_doReport", value: function(e3) {
- var n3 = this, o2 = { header: or(this), quality: e3 };
- this.request({ protocolName: Bs, requestData: t({}, o2) }).then(function() {
- n3.reportIndex++, n3.wholePeriod = false;
- }).catch(function(t2) {
- Ve.w("".concat(n3._n, "._doReport, online:").concat(n3.getNetworkType(), " error:"), t2), n3._statInfoArr = n3._statInfoArr.concat(e3), n3._flushAtOnce();
- });
- } }, { key: "_flushAtOnce", value: function() {
- var e3 = this.getModule(Vn), t2 = e3.getItem(this.TAG, false), n3 = this._statInfoArr, o2 = "".concat(this._n, "._flushAtOnce");
- if (zt(t2))
- Ve.l("".concat(o2, " count:").concat(n3.length)), e3.setItem(this.TAG, n3, true, false);
- else {
- var s3 = n3.concat(t2);
- s3.length > 10 && (s3 = s3.slice(0, 10)), Ve.l("".concat(o2, " count:").concat(s3.length)), e3.setItem(this.TAG, s3, true, false);
- }
- this._statInfoArr = [];
- } }, { key: "reset", value: function() {
- 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();
- } }]), s2;
- }(uo), ou = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "isWorkerEnabled", value: function() {
- return this._isWorkerEnabled && Se;
- } }, { key: "startWorkerTimer", value: function() {
- Ve.l("".concat(this._n, ".startWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("start");
- } }, { key: "stopWorkerTimer", value: function() {
- Ve.l("".concat(this._n, ".stopWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("stop");
- } }, { key: "_init", value: function() {
- if (Se) {
- 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" }));
- this._workerTimer = new Worker(e3);
- var t3 = this;
- this._workerTimer.onmessage = function(e4) {
- e4.data ? (t3._timerID = e4.data, Ve.l("".concat(t3._n, "._init seed:").concat(t3._timerID))) : t3._m.onCheckTimer();
- };
- }
- } }, { key: "_onCloudConfigUpdated", value: function() {
- var e3 = this.getCloudConfig("enable_worker");
- 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());
- } }, { key: "terminate", value: function() {
- Ve.l("".concat(this._n, ".terminate")), this._workerTimer && (this._workerTimer.terminate(), this._workerTimer = null, this._timerID = -1);
- } }, { key: "getTimerID", value: function() {
- return this._timerID;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset"));
- } }]), n2;
- }(uo), su = function() {
- function e2() {
- o(this, e2), this._n = "PurchasedFeatureHandler", this._purchasedFeatureMap = /* @__PURE__ */ new Map();
- }
- return a(e2, [{ key: "isValidPurchaseBits", value: function(e3) {
- return e3 && "string" == typeof e3 && e3.length >= 1 && e3.length <= 64 && /[01]{1,64}/.test(e3);
- } }, { key: "parsePurchaseBits", value: function(e3) {
- if (this.isValidPurchaseBits(e3)) {
- this._purchasedFeatureMap.clear();
- for (var t2 = null, n2 = e3.length - 1, o2 = 0; n2 >= 0; n2--, o2++)
- 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);
- } else
- Ve.w("".concat(this._n, ".parsePurchaseBits invalid purchasebits:").concat(e3));
- } }, { key: "hasPurchasedFeature", value: function(e3) {
- return !!this._purchasedFeatureMap.get(e3);
- } }, { key: "isFeatureEnabled", value: function(e3) {
- for (var t2 = parseInt(e3).toString(2), n2 = void 0, o2 = true, s2 = t2.length - 1, a2 = 0; s2 >= 0; s2--, a2++)
- 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))) {
- o2 = false;
- break;
- }
- return Ve.l("".concat(this._n, ".isFeatureEnabled decimalNumber:").concat(e3, " binaryString:").concat(t2, " ret:").concat(o2)), Xa({ enabled: o2 });
- } }, { key: "clear", value: function() {
- this._purchasedFeatureMap.clear();
- } }]), e2;
- }(), au = function() {
- function e2(t2) {
- o(this, e2), this._m = t2, this._n = "CommercialConfigModule", this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler = new su();
- }
- return a(e2, [{ key: "_canFetch", value: function() {
- return this._getModule(xn).isLoggedIn() ? !this._isFetching && Date.now() >= this._expiredTime : (this._expiredTime = Date.now() + 2e3, false);
- } }, { key: "onCheckTimer", value: function(e3) {
- this._canFetch() && this.fetchConfig();
- } }, { key: "fetchConfig", value: function() {
- var e3 = this, t2 = this._canFetch(), n2 = "".concat(this._n, ".fetchConfig");
- if (Ve.l("".concat(n2, " canFetch:").concat(t2)), t2) {
- var o2 = this._getModule(Hn), s2 = new Aa("fetchCommercialConfig");
- s2.setNetworkType(o2.getNetworkType());
- var a2 = this._getModule(xn).getSDKAppID(), i2 = this._getModule(zn);
- this._isFetching = true, i2.request({ protocolName: Qs, requestData: { SDKAppID: a2 } }).then(function(t3) {
- s2.setMessage("purchaseBits:".concat(t3.data.purchaseBits)).end(), Ve.l("".concat(n2, " ok.")), e3._parseConfig(t3.data), e3._isFetching = false;
- }).catch(function(t3) {
- o2.probe().then(function(e4) {
- var n3 = v(e4, 2), o3 = n3[0], a3 = n3[1];
- s2.setError(t3, o3, a3).end();
- }), e3._isFetching = false;
- });
- }
- } }, { key: "onPushedConfig", value: function(e3) {
- var t2 = "".concat(this._n, ".onPushedConfig data:").concat(JSON.stringify(e3));
- Ve.l("".concat(t2)), new Aa("pushedCommercialConfig").setNetworkType(this._getModule(Hn).getNetworkType()).setMessage("purchaseBits:".concat(e3.purchaseBits)).end(), this._parseConfig(e3);
- } }, { key: "_parseConfig", value: function(e3) {
- var t2 = "".concat(this._n, "._parseConfig"), n2 = e3.errorCode, o2 = e3.errorMessage, s2 = e3.purchaseBits, a2 = e3.expiredTime;
- 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));
- } }, { key: "_setExpiredTimeOnResponseError", value: function(e3) {
- this._expiredTime = Date.now() + e3;
- } }, { key: "canIUse", value: function(e3) {
- return this._purchasedFeatureHandler.hasPurchasedFeature(e3);
- } }, { key: "isFeatureEnabled", value: function(e3) {
- return this._purchasedFeatureHandler.isFeatureEnabled(e3);
- } }, { key: "_getModule", value: function(e3) {
- return this._m.getModule(e3);
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler.clear();
- } }]), e2;
- }(), iu = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "registerPlugin", value: function(e3) {
- if (oe) {
- this._offlinePushPlugin = e3["tim-offline-push-plugin"];
- 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;
- 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();
- } else
- this.outputWarning("OfflinePushInUniapp");
- } }, { key: "init", value: function() {
- this._isWebUniapp = this.getUniAppPlatform(), this._getDeviceToken();
- } }, { key: "_getDeviceToken", value: function() {
- var e3 = this, t3 = "".concat(this._n, ".").concat("_getDeviceToken");
- if (ut(this._offlinePushPlugin.getDeviceToken)) {
- var n3 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), ", iosBusinessID:").concat(this._iosBusinessID);
- Ve.l("".concat(t3, " start. ").concat(n3)), new Aa("_getDeviceToken").setMessage("".concat(n3)).end(true), this._offlinePushPlugin.getDeviceToken(this._androidPushConfig, function(o2) {
- var s2 = new Aa("getDeviceTokenRes"), a2 = o2.code, i2 = o2.msg;
- if (0 === a2) {
- var r2 = o2.data, u2 = r2.deviceToken, c2 = r2.deviceBrand, l2 = r2.deviceType, d2 = r2.bussinessId;
- 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();
- } else
- s2.setMessage("code:".concat(a2, ", msg:").concat(i2)).end(true), Ve.e("".concat(t3, " failed. error:"), o2);
- });
- } else
- Ve.e("".concat(t3, " getDeviceToken is not a function"));
- } }, { key: "canIUseOfflinePush", value: function() {
- return oe && !it(this._offlinePushPlugin);
- } }, { key: "_setAppShowListener", value: function() {
- var e3 = this, t3 = "".concat(this._n, ".").concat("_setAppShowListener");
- 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) {
- var o2 = (n3 || {}).appShow;
- 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());
- })) : Ve.e("".concat(t3, " setAppShowListener is not a function"));
- } }, { key: "getDeviceBrand", value: function() {
- if (!it(this._offlinePushPlugin) && ut(this._offlinePushPlugin.getDeviceType)) {
- var e3 = (this._offlinePushPlugin.getDeviceType() || {}).deviceType;
- return Ve.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e3)), e3;
- }
- } }, { key: "_setToken", value: function() {
- var e3, t3 = this, n3 = "".concat(this._n, "._setToken"), o2 = this.getModule(xn), s2 = 1, a2 = "", i2 = "";
- zt(this._deviceToken) && (s2 = 0);
- var r2 = this.getUniAppPlatform(), u2 = this.getDeviceBrand();
- r2 === R.IOS || r2 === R.IPAD || r2 === R.MAC ? i2 = this._deviceToken : r2 === R.ANDROID && (a2 = this._deviceToken);
- var c2 = new Aa("offlinePushSetToken");
- 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) {
- return c2.end(), Ve.l("".concat(n3, " ok")), e4;
- }).catch(function(e4) {
- return t3.probeNetwork().then(function(t4) {
- var n4 = v(t4, 2), o3 = n4[0], s3 = n4[1];
- c2.setError(e4, o3, s3).end();
- }), Ve.e("".concat(n3, " failed. error:"), e4), Za(e4);
- });
- } }, { key: "_getConvUnreadCount", value: function() {
- var e3 = this;
- this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this.getModule(qn).getLocalConversationList().forEach(function(t3) {
- t3.type === E.CONV_C2C && (e3._c2cUnreadCount += t3.unreadCount), t3.type === E.CONV_GROUP && (e3._groupUnreadCount += t3.unreadCount);
- });
- } }, { key: "_onBackground", value: function() {
- var e3 = this, t3 = "".concat(this._n, ".").concat("_onBackground"), n3 = new Aa("_onBackground");
- this.request({ protocolName: ca, requestData: { c2cUnreadCount: this._c2cUnreadCount, groupUnreadCount: this._groupUnreadCount, isWebUniapp: this._isWebUniapp } }).then(function(o2) {
- return n3.setMessage("c2cUnreadCount: ".concat(e3._c2cUnreadCount, ", groupUnreadCount: ").concat(e3._groupUnreadCount)).end(), Ve.l("".concat(t3, " ok")), o2;
- }).catch(function(o2) {
- e3.probeNetwork().then(function(e4) {
- var t4 = v(e4, 2), s2 = t4[0], a2 = t4[1];
- n3.setError(o2, s2, a2).end();
- }), Ve.e("".concat(t3, " failed. error:"), o2);
- });
- } }, { key: "_onForeground", value: function() {
- var e3 = this, t3 = "".concat(this._n, ".").concat("_onForeground"), n3 = new Aa("_onForeground");
- this.request({ protocolName: la, requestData: { isWebUniapp: this._isWebUniapp } }).then(function(e4) {
- return n3.end(), Ve.l("".concat(t3, " ok")), e4;
- }).catch(function(o2) {
- e3.probeNetwork().then(function(e4) {
- var t4 = v(e4, 2), s2 = t4[0], a2 = t4[1];
- n3.setError(o2, s2, a2).end();
- }), Ve.e("".concat(t3, " failed. error:"), o2);
- });
- } }, { key: "getUniAppPlatform", value: function() {
- var e3 = uni.getSystemInfoSync().platform, t3 = this.getDeviceBrand();
- return "ios" === e3 ? R.IOS : "android" === e3 ? R.ANDROID : 1002 === t3 ? R.IPAD : 1001 === t3 ? R.MAC : void 0;
- } }, { key: "reset", value: function() {
- this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, Ve.l("".concat(this._n, ".reset"));
- } }]), n2;
- }(uo), ru = function(e2) {
- r(n2, e2);
- var t2 = f(n2);
- function n2(e3) {
- var s2;
- 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;
- }
- return a(n2, [{ key: "init", value: function() {
- var e3 = this.getModule(Yn).getPlugin("tim-profanity-filter-plugin");
- e3 ? (this._plugin = new e3({ logger: Ve, isArray: at, isMap: Qe, isDevMode: this.isDevMode() }), this._getLexicon()) : this.outputWarning("ProfanityPluginNotFound");
- } }, { key: "onCheckTimer", value: function() {
- this._plugin && this._canIUseLexicon && this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime && this._getLexicon();
- } }, { key: "filterMessage", value: function(e3, t3) {
- var n3 = true;
- if (!this._plugin || !this._canIUseLexicon)
- return n3;
- if (t3 && t3.messageControlInfo && true === t3.messageControlInfo.excludedFromContentModeration)
- return n3;
- var o2 = e3.type, s2 = e3.conversationType;
- if (o2 !== E.MSG_TEXT && o2 !== E.MSG_CUSTOM)
- return n3;
- var a2, i2 = "".concat(this._n, ".filterMessage");
- if (Ve.l("".concat(i2)), o2 === E.MSG_TEXT) {
- if (s2 === E.CONV_C2C ? a2 = H : s2 === E.CONV_GROUP && (a2 = W), !this._isConfigOn(a2))
- return n3;
- var r2 = this._plugin.filter(e3.payload.text), u2 = r2.type, c2 = r2.modifiedText;
- 1 === u2 ? n3 = false : 2 === u2 && (e3.payload.text = c2);
- } else if (o2 === E.MSG_CUSTOM) {
- if (s2 === E.CONV_C2C ? a2 = K : s2 === E.CONV_GROUP && (a2 = Y), !this._isConfigOn(a2))
- return n3;
- var l2 = this._plugin.filter(e3.payload.data), d2 = this._plugin.filter(e3.payload.description), p2 = this._plugin.filter(e3.payload.extension);
- 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));
- }
- return Ve.l("".concat(i2, " done. isAllowedToSend:").concat(n3)), n3;
- } }, { key: "filterText", value: function(e3, t3) {
- var n3 = "".concat(this._n, ".filterText"), o2 = { isAllowedToSend: true, modifiedText: e3 };
- if (!this._plugin || !this._canIUseLexicon)
- return o2;
- if (!this._isConfigOn(t3))
- return o2;
- Ve.l("".concat(n3));
- var s2 = this._plugin.filter(e3), a2 = s2.type, i2 = s2.modifiedText;
- return 1 === a2 ? o2.isAllowedToSend = false : 2 === a2 && (o2.modifiedText = i2), Ve.l("".concat(n3, " done. ret:"), o2), o2;
- } }, { key: "_getLexicon", value: function() {
- var e3 = this, t3 = new Aa("profanityFilter"), n3 = "".concat(this._n, "._getLexicon");
- this._isFetching = true, this.request({ protocolName: pa, requestData: { startIndex: this._startIndex, version: this._version } }).then(function(o2) {
- 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;
- 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()));
- }).catch(function(o2) {
- e3.probeNetwork().then(function(e4) {
- var n4 = v(e4, 2), s2 = n4[0], a2 = n4[1];
- t3.setError(o2, s2, a2).end();
- }), e3._isFetching = false, Ve.l("".concat(n3, " failed. error:"), o2);
- });
- } }, { key: "_onFilterConfig", value: function(e3) {
- var t3 = this;
- zt(e3) || (this._filterConfigMap.clear(), Object.keys(e3).forEach(function(n3) {
- t3._filterConfigMap.set(n3, e3[n3]);
- }), Ve.l("".concat(this._n, "._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys()), " values:").concat(Array.from(this._filterConfigMap.values()))));
- } }, { key: "_isConfigOn", value: function(e3) {
- return 1 === this._filterConfigMap.get(e3);
- } }, { key: "_getToken", value: function(e3) {
- if (nt(e3)) {
- var t3 = e3.length, n3 = "";
- if (t3 % 2 == 0)
- for (var o2 = 0; o2 <= t3 - 1; o2 += 2)
- n3 += e3[o2 + 1], n3 += e3[o2];
- else {
- for (var s2 = 0; s2 < t3 - 1; s2 += 2)
- n3 += e3[s2 + 1], n3 += e3[s2];
- n3 += e3[t3 - 1];
- }
- this._plugin.onToken(n3);
- }
- } }, { key: "reset", value: function() {
- 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;
- } }]), n2;
- }(uo), uu = function() {
- function e2(t2) {
- o(this, e2), this._m = t2, this._n = "TransCmdModule", this._TRTCCommandList = ["tui_room_svr.*"], this._m.getInnerEmitterInstance().on(ti, this._onCloudConfigUpdated, this);
- }
- return a(e2, [{ key: "_onCloudConfigUpdated", value: function() {
- var e3 = this, t2 = this._m.getModule(Zn).getCloudConfig("rtc_cmd");
- it(t2) || (t2 = JSON.parse(t2)).forEach(function(t3) {
- e3._TRTCCommandList.includes(t3) || e3._TRTCCommandList.push(t3);
- });
- } }, { key: "sendTRTCCustomData", value: function(e3) {
- var t2 = e3.serviceCommand, n2 = e3.data, o2 = "".concat(V.NAME.TUIROOM_SVR, ".*");
- return it(t2) || (o2 = t2), this._TRTCCommandList.includes(o2) ? this._trans({ servcmd: o2, data: n2 }) : Za({ code: ha.INVALID_TRTC_CMD });
- } }, { key: "_trans", value: function(e3) {
- Ve.d("".concat(this._n, "._trans. options:").concat(JSON.stringify(e3)));
- var t2 = e3.servcmd, n2 = e3.data;
- return this._m.getModule(zn).trans({ servcmd: t2, data: nt(n2) ? JSON.parse(n2) : n2 });
- } }, { key: "getCommandList", value: function() {
- return this._TRTCCommandList;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset"));
- } }]), e2;
- }(), cu = function() {
- function e2(t2) {
- 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();
- }
- return a(e2, [{ key: "_init", value: function() {
- var e3 = this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE, false);
- if (e3) {
- var t2;
- try {
- t2 = JSON.parse(e3);
- } catch (n2) {
- this._getStorageModule().removeItem(this.TIM_ERROR_ASSISTANCE, false), Ve.w("".concat(this._n, "._init error:"), n2);
- }
- t2 && (this._needToUpdate(t2) ? this._fetch() : this._fillMap(t2.message));
- } else
- this._fetch();
- } }, { key: "_needToUpdate", value: function(e3) {
- var t2 = e3.localSavedTime, n2 = e3.localSavedVersion, o2 = t2 && (/* @__PURE__ */ new Date()).getTime() - t2 >= this.STORAGE_EXPIRES_TIME, s2 = !n2 || "2.27.6" !== n2;
- return Ve.l("".concat(this._n, "._needToUpdate isTimeout:").concat(o2, " isDifferentVersion:").concat(s2)), o2 || s2;
- } }, { key: "_fetch", value: function() {
- if (!this._m.getModule(xn).isPrivateNetWork()) {
- 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;
- if (ae)
- re.request({ url: e3, method: "GET", timeout: 3e3, header: { "content-type": t2 }, dataType: "text", success: function(e4) {
- o2._fillAndSave(e4.data), Ve.l("".concat(n2, " mini program"));
- }, fail: function() {
- } });
- else {
- var s2 = new XMLHttpRequest(), a2 = setTimeout(function() {
- s2.abort();
- }, 3e3);
- s2.onreadystatechange = function() {
- 4 === s2.readyState && (clearTimeout(a2), 200 !== s2.status && 304 !== s2.status || (Ve.l("".concat(n2, " browser")), o2._fillAndSave(s2.responseText)));
- }, s2.open("GET", e3, true), s2.setRequestHeader("Content-type", t2), s2.send();
- }
- }
- } }, { key: "_fillAndSave", value: function(e3) {
- 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);
- } }, { key: "_getStorageModule", value: function() {
- return this._m.getModule(Vn);
- } }, { key: "_fillMap", value: function(e3) {
- this._map.clear();
- for (var t2, n2, o2, s2 = e3.split(";\n"), a2 = s2.length, i2 = new RegExp(/'/g), r2 = 0; r2 < a2; r2++)
- if (t2 = s2[r2].indexOf(":"), n2 = s2[r2].slice(0, t2), o2 = s2[r2].slice(t2 + 1, s2[r2].length), !n2.startsWith("//")) {
- if (it(o2))
- continue;
- this._map.set(n2, o2.replace(i2, ""));
- }
- } }, { key: "get", value: function(e3) {
- var t2 = e3.isIntl, n2 = e3.key, o2 = e3.replacement1, s2 = e3.replacement2, a2 = "".concat(n2, t2 ? "_en" : "_cn");
- !this._map.has(a2) && this._map.has(n2) && (a2 = n2);
- var i2 = "";
- 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;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset"));
- } }]), e2;
- }(), lu = cr(function(e2, t2) {
- var o2 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
- function s2(e3, t3) {
- return Object.prototype.hasOwnProperty.call(e3, t3);
- }
- t2.assign = function(e3) {
- for (var t3 = Array.prototype.slice.call(arguments, 1); t3.length; ) {
- var o3 = t3.shift();
- if (o3) {
- if ("object" !== n(o3))
- throw new TypeError(o3 + "must be non-object");
- for (var a3 in o3)
- s2(o3, a3) && (e3[a3] = o3[a3]);
- }
- }
- return e3;
- }, t2.shrinkBuf = function(e3, t3) {
- return e3.length === t3 ? e3 : e3.subarray ? e3.subarray(0, t3) : (e3.length = t3, e3);
- };
- var a2 = { arraySet: function(e3, t3, n2, o3, s3) {
- if (t3.subarray && e3.subarray)
- e3.set(t3.subarray(n2, n2 + o3), s3);
- else
- for (var a3 = 0; a3 < o3; a3++)
- e3[s3 + a3] = t3[n2 + a3];
- }, flattenChunks: function(e3) {
- var t3, n2, o3, s3, a3, i3;
- for (o3 = 0, t3 = 0, n2 = e3.length; t3 < n2; t3++)
- o3 += e3[t3].length;
- for (i3 = new Uint8Array(o3), s3 = 0, t3 = 0, n2 = e3.length; t3 < n2; t3++)
- a3 = e3[t3], i3.set(a3, s3), s3 += a3.length;
- return i3;
- } }, i2 = { arraySet: function(e3, t3, n2, o3, s3) {
- for (var a3 = 0; a3 < o3; a3++)
- e3[s3 + a3] = t3[n2 + a3];
- }, flattenChunks: function(e3) {
- return [].concat.apply([], e3);
- } };
- t2.setTyped = function(e3) {
- 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));
- }, t2.setTyped(o2);
- });
- lu.assign, lu.shrinkBuf, lu.setTyped, lu.Buf8, lu.Buf16, lu.Buf32;
- var du = function(e2, t2, n2, o2) {
- for (var s2 = 65535 & e2 | 0, a2 = e2 >>> 16 & 65535 | 0, i2 = 0; 0 !== n2; ) {
- n2 -= i2 = n2 > 2e3 ? 2e3 : n2;
- do {
- a2 = a2 + (s2 = s2 + t2[o2++] | 0) | 0;
- } while (--i2);
- s2 %= 65521, a2 %= 65521;
- }
- return s2 | a2 << 16 | 0;
- };
- var pu = function() {
- for (var e2, t2 = [], n2 = 0; n2 < 256; n2++) {
- e2 = n2;
- for (var o2 = 0; o2 < 8; o2++)
- e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
- t2[n2] = e2;
- }
- return t2;
- }();
- var gu = function(e2, t2, n2, o2) {
- var s2 = pu, a2 = o2 + n2;
- e2 ^= -1;
- for (var i2 = o2; i2 < a2; i2++)
- e2 = e2 >>> 8 ^ s2[255 & (e2 ^ t2[i2])];
- return -1 ^ e2;
- }, hu = function(e2, t2) {
- 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;
- 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;
- e:
- do {
- h2 < 15 && (g2 += k2[o2++] << h2, h2 += 8, g2 += k2[o2++] << h2, h2 += 8), M2 = _2[g2 & v2];
- t:
- for (; ; ) {
- if (g2 >>>= y2 = M2 >>> 24, h2 -= y2, 0 === (y2 = M2 >>> 16 & 255))
- E2[a2++] = 65535 & M2;
- else {
- if (!(16 & y2)) {
- if (0 == (64 & y2)) {
- M2 = _2[(65535 & M2) + (g2 & (1 << y2) - 1)];
- continue t;
- }
- if (32 & y2) {
- n2.mode = 12;
- break e;
- }
- e2.msg = "invalid literal/length code", n2.mode = 30;
- break e;
- }
- 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];
- n:
- for (; ; ) {
- if (g2 >>>= y2 = M2 >>> 24, h2 -= y2, !(16 & (y2 = M2 >>> 16 & 255))) {
- if (0 == (64 & y2)) {
- M2 = f2[(65535 & M2) + (g2 & (1 << y2) - 1)];
- continue n;
- }
- e2.msg = "invalid distance code", n2.mode = 30;
- break e;
- }
- 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) {
- e2.msg = "invalid distance too far back", n2.mode = 30;
- break e;
- }
- if (g2 >>>= y2, h2 -= y2, C2 > (y2 = a2 - i2)) {
- if ((y2 = C2 - y2) > l2 && n2.sane) {
- e2.msg = "invalid distance too far back", n2.mode = 30;
- break e;
- }
- if (T2 = 0, D2 = p2, 0 === d2) {
- if (T2 += c2 - y2, y2 < I2) {
- I2 -= y2;
- do {
- E2[a2++] = p2[T2++];
- } while (--y2);
- T2 = a2 - C2, D2 = E2;
- }
- } else if (d2 < y2) {
- if (T2 += c2 + d2 - y2, (y2 -= d2) < I2) {
- I2 -= y2;
- do {
- E2[a2++] = p2[T2++];
- } while (--y2);
- if (T2 = 0, d2 < I2) {
- I2 -= y2 = d2;
- do {
- E2[a2++] = p2[T2++];
- } while (--y2);
- T2 = a2 - C2, D2 = E2;
- }
- }
- } else if (T2 += d2 - y2, y2 < I2) {
- I2 -= y2;
- do {
- E2[a2++] = p2[T2++];
- } while (--y2);
- T2 = a2 - C2, D2 = E2;
- }
- for (; I2 > 2; )
- E2[a2++] = D2[T2++], E2[a2++] = D2[T2++], E2[a2++] = D2[T2++], I2 -= 3;
- I2 && (E2[a2++] = D2[T2++], I2 > 1 && (E2[a2++] = D2[T2++]));
- } else {
- T2 = a2 - C2;
- do {
- E2[a2++] = E2[T2++], E2[a2++] = E2[T2++], E2[a2++] = E2[T2++], I2 -= 3;
- } while (I2 > 2);
- I2 && (E2[a2++] = E2[T2++], I2 > 1 && (E2[a2++] = E2[T2++]));
- }
- break;
- }
- }
- break;
- }
- } while (o2 < s2 && a2 < r2);
- 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;
- }, _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) {
- 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;
- for (m2 = 0; m2 <= 15; m2++)
- R2[m2] = 0;
- for (M2 = 0; M2 < o2; M2++)
- R2[t2[n2 + M2]]++;
- for (C2 = v2, I2 = 15; I2 >= 1 && 0 === R2[I2]; I2--)
- ;
- if (C2 > I2 && (C2 = I2), 0 === I2)
- return s2[a2++] = 20971520, s2[a2++] = 20971520, r2.bits = 1, 0;
- for (y2 = 1; y2 < I2 && 0 === R2[y2]; y2++)
- ;
- for (C2 < y2 && (C2 = y2), k2 = 1, m2 = 1; m2 <= 15; m2++)
- if (k2 <<= 1, (k2 -= R2[m2]) < 0)
- return -1;
- if (k2 > 0 && (0 === e2 || 1 !== I2))
- return -1;
- for (N2[1] = 0, m2 = 1; m2 < 15; m2++)
- N2[m2 + 1] = N2[m2] + R2[m2];
- for (M2 = 0; M2 < o2; M2++)
- 0 !== t2[n2 + M2] && (i2[N2[t2[n2 + M2]]++] = M2);
- 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)
- return 1;
- for (; ; ) {
- 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;
- do {
- s2[p2 + (S2 >> D2) + (c2 -= u2)] = h2 << 24 | _2 << 16 | f2 | 0;
- } while (0 !== c2);
- for (u2 = 1 << m2 - 1; S2 & u2; )
- u2 >>= 1;
- if (0 !== u2 ? (S2 &= u2 - 1, S2 += u2) : S2 = 0, M2++, 0 == --R2[m2]) {
- if (m2 === I2)
- break;
- m2 = t2[n2 + i2[M2]];
- }
- if (m2 > C2 && (S2 & d2) !== l2) {
- for (0 === D2 && (D2 = C2), p2 += y2, k2 = 1 << (T2 = m2 - D2); T2 + D2 < I2 && !((k2 -= R2[T2 + D2]) <= 0); )
- T2++, k2 <<= 1;
- if (E2 += 1 << T2, 1 === e2 && E2 > 852 || 2 === e2 && E2 > 592)
- return 1;
- s2[l2 = S2 & d2] = C2 << 24 | T2 << 16 | p2 - a2 | 0;
- }
- }
- return 0 !== S2 && (s2[p2 + S2] = m2 - D2 << 24 | 64 << 16 | 0), r2.bits = C2, 0;
- };
- function yu(e2) {
- return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
- }
- function Iu() {
- 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;
- }
- function Cu(e2) {
- var t2;
- 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;
- }
- function Tu(e2) {
- var t2;
- return e2 && e2.state ? ((t2 = e2.state).wsize = 0, t2.whave = 0, t2.wnext = 0, Cu(e2)) : -2;
- }
- function Du(e2, t2) {
- var n2, o2;
- 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;
- }
- function ku(e2, t2) {
- var n2, o2;
- return e2 ? (o2 = new Iu(), e2.state = o2, o2.window = null, 0 !== (n2 = Du(e2, t2)) && (e2.state = null), n2) : -2;
- }
- var Eu, Su, Lu = true;
- function Au(e2) {
- if (Lu) {
- var t2;
- for (Eu = new lu.Buf32(512), Su = new lu.Buf32(32), t2 = 0; t2 < 144; )
- e2.lens[t2++] = 8;
- for (; t2 < 256; )
- e2.lens[t2++] = 9;
- for (; t2 < 280; )
- e2.lens[t2++] = 7;
- for (; t2 < 288; )
- e2.lens[t2++] = 8;
- for (Mu(1, e2.lens, 0, 288, Eu, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; )
- e2.lens[t2++] = 5;
- Mu(2, e2.lens, 0, 32, Su, 0, e2.work, { bits: 5 }), Lu = false;
- }
- e2.lencode = Eu, e2.lenbits = 9, e2.distcode = Su, e2.distbits = 5;
- }
- function Ru(e2, t2, n2, o2) {
- var s2, a2 = e2.state;
- 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;
- }
- var Nu = { inflateReset: Tu, inflateReset2: Du, inflateResetKeep: Cu, inflateInit: function(e2) {
- return ku(e2, 15);
- }, inflateInit2: ku, inflate: function(e2, t2) {
- 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];
- if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in)
- return -2;
- 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;
- e:
- for (; ; )
- switch (n2.mode) {
- case 1:
- if (0 === n2.wrap) {
- n2.mode = 13;
- break;
- }
- for (; l2 < 16; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (2 & n2.wrap && 35615 === c2) {
- 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;
- break;
- }
- if (n2.flags = 0, n2.head && (n2.head.done = false), !(1 & n2.wrap) || (((255 & c2) << 8) + (c2 >> 8)) % 31) {
- e2.msg = "incorrect header check", n2.mode = 30;
- break;
- }
- if (8 != (15 & c2)) {
- e2.msg = "unknown compression method", n2.mode = 30;
- break;
- }
- if (l2 -= 4, C2 = 8 + (15 & (c2 >>>= 4)), 0 === n2.wbits)
- n2.wbits = C2;
- else if (C2 > n2.wbits) {
- e2.msg = "invalid window size", n2.mode = 30;
- break;
- }
- n2.dmax = 1 << C2, e2.adler = n2.check = 1, n2.mode = 512 & c2 ? 10 : 12, c2 = 0, l2 = 0;
- break;
- case 2:
- for (; l2 < 16; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (n2.flags = c2, 8 != (255 & n2.flags)) {
- e2.msg = "unknown compression method", n2.mode = 30;
- break;
- }
- if (57344 & n2.flags) {
- e2.msg = "unknown header flags set", n2.mode = 30;
- break;
- }
- 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;
- case 3:
- for (; l2 < 32; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- 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;
- case 4:
- for (; l2 < 16; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- 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;
- case 5:
- if (1024 & n2.flags) {
- for (; l2 < 16; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- 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;
- } else
- n2.head && (n2.head.extra = null);
- n2.mode = 6;
- case 6:
- 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))
- break e;
- n2.length = 0, n2.mode = 7;
- case 7:
- if (2048 & n2.flags) {
- if (0 === r2)
- break e;
- g2 = 0;
- do {
- C2 = o2[a2 + g2++], n2.head && C2 && n2.length < 65536 && (n2.head.name += String.fromCharCode(C2));
- } while (C2 && g2 < r2);
- if (512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, C2)
- break e;
- } else
- n2.head && (n2.head.name = null);
- n2.length = 0, n2.mode = 8;
- case 8:
- if (4096 & n2.flags) {
- if (0 === r2)
- break e;
- g2 = 0;
- do {
- C2 = o2[a2 + g2++], n2.head && C2 && n2.length < 65536 && (n2.head.comment += String.fromCharCode(C2));
- } while (C2 && g2 < r2);
- if (512 & n2.flags && (n2.check = gu(n2.check, o2, g2, a2)), r2 -= g2, a2 += g2, C2)
- break e;
- } else
- n2.head && (n2.head.comment = null);
- n2.mode = 9;
- case 9:
- if (512 & n2.flags) {
- for (; l2 < 16; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (c2 !== (65535 & n2.check)) {
- e2.msg = "header crc mismatch", n2.mode = 30;
- break;
- }
- c2 = 0, l2 = 0;
- }
- n2.head && (n2.head.hcrc = n2.flags >> 9 & 1, n2.head.done = true), e2.adler = n2.check = 0, n2.mode = 12;
- break;
- case 10:
- for (; l2 < 32; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- e2.adler = n2.check = yu(c2), c2 = 0, l2 = 0, n2.mode = 11;
- case 11:
- if (0 === n2.havedict)
- return e2.next_out = i2, e2.avail_out = u2, e2.next_in = a2, e2.avail_in = r2, n2.hold = c2, n2.bits = l2, 2;
- e2.adler = n2.check = 1, n2.mode = 12;
- case 12:
- if (5 === t2 || 6 === t2)
- break e;
- case 13:
- if (n2.last) {
- c2 >>>= 7 & l2, l2 -= 7 & l2, n2.mode = 27;
- break;
- }
- for (; l2 < 3; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- switch (n2.last = 1 & c2, l2 -= 1, 3 & (c2 >>>= 1)) {
- case 0:
- n2.mode = 14;
- break;
- case 1:
- if (Au(n2), n2.mode = 20, 6 === t2) {
- c2 >>>= 2, l2 -= 2;
- break e;
- }
- break;
- case 2:
- n2.mode = 17;
- break;
- case 3:
- e2.msg = "invalid block type", n2.mode = 30;
- }
- c2 >>>= 2, l2 -= 2;
- break;
- case 14:
- for (c2 >>>= 7 & l2, l2 -= 7 & l2; l2 < 32; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if ((65535 & c2) != (c2 >>> 16 ^ 65535)) {
- e2.msg = "invalid stored block lengths", n2.mode = 30;
- break;
- }
- if (n2.length = 65535 & c2, c2 = 0, l2 = 0, n2.mode = 15, 6 === t2)
- break e;
- case 15:
- n2.mode = 16;
- case 16:
- if (g2 = n2.length) {
- if (g2 > r2 && (g2 = r2), g2 > u2 && (g2 = u2), 0 === g2)
- break e;
- lu.arraySet(s2, o2, a2, g2, i2), r2 -= g2, a2 += g2, u2 -= g2, i2 += g2, n2.length -= g2;
- break;
- }
- n2.mode = 12;
- break;
- case 17:
- for (; l2 < 14; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- 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) {
- e2.msg = "too many length or distance symbols", n2.mode = 30;
- break;
- }
- n2.have = 0, n2.mode = 18;
- case 18:
- for (; n2.have < n2.ncode; ) {
- for (; l2 < 3; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- n2.lens[L2[n2.have++]] = 7 & c2, c2 >>>= 3, l2 -= 3;
- }
- for (; n2.have < 19; )
- n2.lens[L2[n2.have++]] = 0;
- 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) {
- e2.msg = "invalid code lengths set", n2.mode = 30;
- break;
- }
- n2.have = 0, n2.mode = 19;
- case 19:
- for (; n2.have < n2.nlen + n2.ndist; ) {
- for (; v2 = (E2 = n2.lencode[c2 & (1 << n2.lenbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (m2 < 16)
- c2 >>>= f2, l2 -= f2, n2.lens[n2.have++] = m2;
- else {
- if (16 === m2) {
- for (k2 = f2 + 2; l2 < k2; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (c2 >>>= f2, l2 -= f2, 0 === n2.have) {
- e2.msg = "invalid bit length repeat", n2.mode = 30;
- break;
- }
- C2 = n2.lens[n2.have - 1], g2 = 3 + (3 & c2), c2 >>>= 2, l2 -= 2;
- } else if (17 === m2) {
- for (k2 = f2 + 3; l2 < k2; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- l2 -= f2, C2 = 0, g2 = 3 + (7 & (c2 >>>= f2)), c2 >>>= 3, l2 -= 3;
- } else {
- for (k2 = f2 + 7; l2 < k2; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- l2 -= f2, C2 = 0, g2 = 11 + (127 & (c2 >>>= f2)), c2 >>>= 7, l2 -= 7;
- }
- if (n2.have + g2 > n2.nlen + n2.ndist) {
- e2.msg = "invalid bit length repeat", n2.mode = 30;
- break;
- }
- for (; g2--; )
- n2.lens[n2.have++] = C2;
- }
- }
- if (30 === n2.mode)
- break;
- if (0 === n2.lens[256]) {
- e2.msg = "invalid code -- missing end-of-block", n2.mode = 30;
- break;
- }
- 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) {
- e2.msg = "invalid literal/lengths set", n2.mode = 30;
- break;
- }
- 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) {
- e2.msg = "invalid distances set", n2.mode = 30;
- break;
- }
- if (n2.mode = 20, 6 === t2)
- break e;
- case 20:
- n2.mode = 21;
- case 21:
- if (r2 >= 6 && u2 >= 258) {
- 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);
- break;
- }
- for (n2.back = 0; v2 = (E2 = n2.lencode[c2 & (1 << n2.lenbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (v2 && 0 == (240 & v2)) {
- 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); ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- c2 >>>= M2, l2 -= M2, n2.back += M2;
- }
- if (c2 >>>= f2, l2 -= f2, n2.back += f2, n2.length = m2, 0 === v2) {
- n2.mode = 26;
- break;
- }
- if (32 & v2) {
- n2.back = -1, n2.mode = 12;
- break;
- }
- if (64 & v2) {
- e2.msg = "invalid literal/length code", n2.mode = 30;
- break;
- }
- n2.extra = 15 & v2, n2.mode = 22;
- case 22:
- if (n2.extra) {
- for (k2 = n2.extra; l2 < k2; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- n2.length += c2 & (1 << n2.extra) - 1, c2 >>>= n2.extra, l2 -= n2.extra, n2.back += n2.extra;
- }
- n2.was = n2.length, n2.mode = 23;
- case 23:
- for (; v2 = (E2 = n2.distcode[c2 & (1 << n2.distbits) - 1]) >>> 16 & 255, m2 = 65535 & E2, !((f2 = E2 >>> 24) <= l2); ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (0 == (240 & v2)) {
- 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); ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- c2 >>>= M2, l2 -= M2, n2.back += M2;
- }
- if (c2 >>>= f2, l2 -= f2, n2.back += f2, 64 & v2) {
- e2.msg = "invalid distance code", n2.mode = 30;
- break;
- }
- n2.offset = m2, n2.extra = 15 & v2, n2.mode = 24;
- case 24:
- if (n2.extra) {
- for (k2 = n2.extra; l2 < k2; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- n2.offset += c2 & (1 << n2.extra) - 1, c2 >>>= n2.extra, l2 -= n2.extra, n2.back += n2.extra;
- }
- if (n2.offset > n2.dmax) {
- e2.msg = "invalid distance too far back", n2.mode = 30;
- break;
- }
- n2.mode = 25;
- case 25:
- if (0 === u2)
- break e;
- if (g2 = p2 - u2, n2.offset > g2) {
- if ((g2 = n2.offset - g2) > n2.whave && n2.sane) {
- e2.msg = "invalid distance too far back", n2.mode = 30;
- break;
- }
- g2 > n2.wnext ? (g2 -= n2.wnext, h2 = n2.wsize - g2) : h2 = n2.wnext - g2, g2 > n2.length && (g2 = n2.length), _2 = n2.window;
- } else
- _2 = s2, h2 = i2 - n2.offset, g2 = n2.length;
- g2 > u2 && (g2 = u2), u2 -= g2, n2.length -= g2;
- do {
- s2[i2++] = _2[h2++];
- } while (--g2);
- 0 === n2.length && (n2.mode = 21);
- break;
- case 26:
- if (0 === u2)
- break e;
- s2[i2++] = n2.length, u2--, n2.mode = 21;
- break;
- case 27:
- if (n2.wrap) {
- for (; l2 < 32; ) {
- if (0 === r2)
- break e;
- r2--, c2 |= o2[a2++] << l2, l2 += 8;
- }
- 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) {
- e2.msg = "incorrect data check", n2.mode = 30;
- break;
- }
- c2 = 0, l2 = 0;
- }
- n2.mode = 28;
- case 28:
- if (n2.wrap && n2.flags) {
- for (; l2 < 32; ) {
- if (0 === r2)
- break e;
- r2--, c2 += o2[a2++] << l2, l2 += 8;
- }
- if (c2 !== (4294967295 & n2.total)) {
- e2.msg = "incorrect length check", n2.mode = 30;
- break;
- }
- c2 = 0, l2 = 0;
- }
- n2.mode = 29;
- case 29:
- T2 = 1;
- break e;
- case 30:
- T2 = -3;
- break e;
- case 31:
- return -4;
- case 32:
- default:
- return -2;
- }
- 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;
- }, inflateEnd: function(e2) {
- if (!e2 || !e2.state)
- return -2;
- var t2 = e2.state;
- return t2.window && (t2.window = null), e2.state = null, 0;
- }, inflateGetHeader: function(e2, t2) {
- var n2;
- return e2 && e2.state ? 0 == (2 & (n2 = e2.state).wrap) ? -2 : (n2.head = t2, t2.done = false, 0) : -2;
- }, inflateSetDictionary: function(e2, t2) {
- var n2, o2 = t2.length;
- 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;
- }, inflateInfo: "pako inflate (from Nodeca project)" }, Ou = true, Gu = true;
- try {
- String.fromCharCode.apply(null, [0]);
- } catch (ac) {
- Ou = false;
- }
- try {
- String.fromCharCode.apply(null, new Uint8Array(1));
- } catch (ac) {
- Gu = false;
- }
- for (var Uu = new lu.Buf8(256), Pu = 0; Pu < 256; Pu++)
- Uu[Pu] = Pu >= 252 ? 6 : Pu >= 248 ? 5 : Pu >= 240 ? 4 : Pu >= 224 ? 3 : Pu >= 192 ? 2 : 1;
- Uu[254] = Uu[254] = 1;
- function bu(e2, t2) {
- if (t2 < 65534 && (e2.subarray && Gu || !e2.subarray && Ou))
- return String.fromCharCode.apply(null, lu.shrinkBuf(e2, t2));
- for (var n2 = "", o2 = 0; o2 < t2; o2++)
- n2 += String.fromCharCode(e2[o2]);
- return n2;
- }
- var wu = function(e2) {
- var t2, n2, o2, s2, a2, i2 = e2.length, r2 = 0;
- for (s2 = 0; s2 < i2; s2++)
- 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;
- for (t2 = new lu.Buf8(r2), a2 = 0, s2 = 0; a2 < r2; s2++)
- 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);
- return t2;
- }, Fu = function(e2) {
- for (var t2 = new lu.Buf8(e2.length), n2 = 0, o2 = t2.length; n2 < o2; n2++)
- t2[n2] = e2.charCodeAt(n2);
- return t2;
- }, qu = function(e2, t2) {
- var n2, o2, s2, a2, i2 = t2 || e2.length, r2 = new Array(2 * i2);
- for (o2 = 0, n2 = 0; n2 < i2; )
- if ((s2 = e2[n2++]) < 128)
- r2[o2++] = s2;
- else if ((a2 = Uu[s2]) > 4)
- r2[o2++] = 65533, n2 += a2 - 1;
- else {
- for (s2 &= 2 === a2 ? 31 : 3 === a2 ? 15 : 7; a2 > 1 && n2 < i2; )
- s2 = s2 << 6 | 63 & e2[n2++], a2--;
- a2 > 1 ? r2[o2++] = 65533 : s2 < 65536 ? r2[o2++] = s2 : (s2 -= 65536, r2[o2++] = 55296 | s2 >> 10 & 1023, r2[o2++] = 56320 | 1023 & s2);
- }
- return bu(r2, o2);
- }, xu = function(e2, t2) {
- var n2;
- for ((t2 = t2 || e2.length) > e2.length && (t2 = e2.length), n2 = t2 - 1; n2 >= 0 && 128 == (192 & e2[n2]); )
- n2--;
- return n2 < 0 || 0 === n2 ? t2 : n2 + Uu[e2[n2]] > t2 ? n2 : t2;
- }, 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" };
- var Hu = function() {
- 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;
- };
- var Ku = function() {
- 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;
- }, Wu = Object.prototype.toString;
- function Yu(e2) {
- if (!(this instanceof Yu))
- return new Yu(e2);
- this.options = lu.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e2 || {});
- var t2 = this.options;
- 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;
- var n2 = Nu.inflateInit2(this.strm, t2.windowBits);
- if (n2 !== Vu.Z_OK)
- throw new Error(Bu[n2]);
- 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))
- throw new Error(Bu[n2]);
- }
- function ju(e2, t2) {
- var n2 = new Yu(t2);
- if (n2.push(e2, true), n2.err)
- throw n2.msg || Bu[n2.err];
- return n2.result;
- }
- Yu.prototype.push = function(e2, t2) {
- var n2, o2, s2, a2, i2, r2 = this.strm, u2 = this.options.chunkSize, c2 = this.options.dictionary, l2 = false;
- if (this.ended)
- return false;
- 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;
- do {
- 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)
- return this.onEnd(n2), this.ended = true, false;
- 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);
- } while ((r2.avail_in > 0 || 0 === r2.avail_out) && n2 !== Vu.Z_STREAM_END);
- 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);
- }, Yu.prototype.onData = function(e2) {
- this.chunks.push(e2);
- }, Yu.prototype.onEnd = function(e2) {
- 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;
- };
- var zu = { Inflate: Yu, inflate: ju, inflateRaw: function(e2, t2) {
- return (t2 = t2 || {}).raw = true, ju(e2, t2);
- }, ungzip: ju }, Ju = {};
- (0, lu.assign)(Ju, zu, Vu);
- var Xu = Ju, Zu = function() {
- function e2(t2) {
- o(this, e2), this._m = t2, this._n = "InflateModule", this._bLogForInflateOK = false, this._bLogForInflateError = false;
- }
- return a(e2, [{ key: "inflate", value: function(e3) {
- var t2, n2 = new Uint8Array(e3).slice(4), o2 = Date.now();
- try {
- t2 = Xu.inflate(n2, { to: "string" }), this._bLogForInflateOK || (this._bLogForInflateOK = true, new Aa("inflateOK").end());
- } catch (i2) {
- if (this._bLogForInflateError)
- return;
- return this._bLogForInflateError = true, void new Aa("inflateError").setMessage(i2).end();
- }
- var s2 = n2.length + 4, a2 = t2.length;
- 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;
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), this._bLogForInflateOK = false, this._bLogForInflateError = false;
- } }]), e2;
- }(), Qu = function() {
- function e2(t2) {
- o(this, e2);
- var n2 = new Aa("sdkConstruct");
- 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();
- 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);
- Aa.bindEventStatModule(this._moduleMap.get(Bn)), n2.setMessage("".concat(r2, " ").concat(function() {
- var e3 = "";
- if (ae)
- try {
- var t3 = re.getSystemInfoSync(), n3 = t3.model, o2 = t3.version, s3 = t3.system, a3 = t3.platform, i3 = t3.SDKVersion;
- e3 = "model:".concat(n3, " version:").concat(o2, " system:").concat(s3, " platform:").concat(a3, " SDKVersion:").concat(i3);
- } catch (r3) {
- e3 = "";
- }
- return e3;
- }())).end(), Ve.i("SDK ".concat(r2)), ja.prototype._getErrorMessage = this.getErrorMessage.bind(this), this._readyList = void 0, this._ssoLogForReady = null, this._initReadyList();
- }
- return a(e2, [{ key: "_startTimer", value: function() {
- var e3 = this._moduleMap.get(Qn), t2 = e3.isWorkerEnabled();
- Ve.l("".concat(this._n, ".startTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e3.startWorkerTimer() : this._startMainThreadTimer();
- } }, { key: "_startMainThreadTimer", value: function() {
- this._checkTimer < 0 && (this._checkTimer = setInterval(this.onCheckTimer.bind(this), 1e3)), Ve.l("".concat(this._n, "._startMainThreadTimer seed:").concat(this._checkTimer));
- } }, { key: "stopTimer", value: function() {
- var e3 = this._moduleMap.get(Qn), t2 = e3.isWorkerEnabled();
- Ve.l("".concat(this._n, ".stopTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e3.stopWorkerTimer() : this._stopMainThreadTimer();
- } }, { key: "_stopMainThreadTimer", value: function() {
- Ve.l("".concat(this._n, "._stopMainThreadTimer")), this._checkTimer > 0 && (clearInterval(this._checkTimer), this._checkTimer = -1, this._checkCount = 0);
- } }, { key: "_stopMainThreadSocket", value: function() {
- Ve.l("".concat(this._n, "._stopMainThreadSocket"));
- var e3 = this._moduleMap.get(Jn);
- e3.setIsWorkerEnabled(true), e3.reConnect();
- } }, { key: "_startMainThreadSocket", value: function() {
- Ve.l("".concat(this._n, "._startMainThreadSocket"));
- var e3 = this._moduleMap.get(Jn);
- e3.setIsWorkerEnabled(false), e3.reConnect();
- } }, { key: "onWorkerTimerEnabled", value: function() {
- Ve.l("".concat(this._n, ".onWorkerTimerEnabled, disable main thread timer and socket")), this._stopMainThreadTimer(), this._stopMainThreadSocket();
- } }, { key: "onWorkerTimerDisabled", value: function() {
- Ve.l("".concat(this._n, ".onWorkerTimerDisabled, enable main thread timer and socket")), this._startMainThreadTimer(), this._startMainThreadSocket();
- } }, { key: "onCheckTimer", value: function() {
- this._checkCount += 1;
- var e3, t2 = D(this._moduleMap);
- try {
- for (t2.s(); !(e3 = t2.n()).done; ) {
- var n2 = v(e3.value, 2)[1];
- n2.onCheckTimer && n2.onCheckTimer(this._checkCount);
- }
- } catch (o2) {
- t2.e(o2);
- } finally {
- t2.f();
- }
- } }, { key: "_initReadyList", value: function() {
- var e3 = this;
- this._readyList = [this._moduleMap.get(Rn), this._moduleMap.get(qn)], this._readyList.forEach(function(t2) {
- t2.ready(function() {
- return e3._onModuleReady();
- });
- });
- } }, { key: "_onModuleReady", value: function() {
- var e3 = true;
- if (this._readyList.forEach(function(t3) {
- t3.isReady() || (e3 = false);
- }), e3 && !this._isReady) {
- this._isReady = true, this._outerEmitter.emit(k.SDK_READY);
- var t2 = Date.now() - this._startLoginTs;
- Ve.w("SDK is ready. cost ".concat(t2, " ms")), this._startLoginTs = Date.now();
- var n2 = this._moduleMap.get(Hn).getNetworkType(), o2 = this._ssoLogForReady.getStartTs() + Ue;
- this._ssoLogForReady.setNetworkType(n2).setMessage(t2).start(o2).end();
- }
- } }, { key: "login", value: function() {
- 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);
- } }, { key: "onLoginFailed", value: function() {
- this._startLoginTs = 0;
- } }, { key: "getOuterEmitterInstance", value: function() {
- return null === this._outerEmitter && (this._outerEmitter = new lr(), Ja(this._outerEmitter), this._outerEmitter._emit = this._outerEmitter.emit, this._outerEmitter.emit = (function(e3, t2) {
- var n2 = this;
- if (e3 === k.CONVERSATION_LIST_UPDATED || e3 === k.FRIEND_LIST_UPDATED || e3 === k.GROUP_LIST_UPDATED || e3 === k.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED)
- if (this._eventThrottleMap.has(e3)) {
- var o2 = Date.now(), s2 = this._eventThrottleMap.get(e3);
- o2 - s2.last <= 1e3 ? (s2.timeoutID && clearTimeout(s2.timeoutID), s2.timeoutID = setTimeout(function() {
- s2.last = Date.now(), n2._outerEmitter._emit.apply(n2._outerEmitter, [e3, { name: e3, data: n2._getEventData(e3) }]);
- }, 1e3)) : (s2.last = o2, this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: this._getEventData(e3) }]));
- } else
- this._eventThrottleMap.set(e3, { last: Date.now(), timeoutID: -1 }), this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: this._getEventData(e3) }]);
- else
- this._outerEmitter._emit.apply(this._outerEmitter, [e3, { name: e3, data: arguments[1] }]);
- }).bind(this)), this._outerEmitter;
- } }, { key: "_getEventData", value: function(e3) {
- 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;
- } }, { key: "getInnerEmitterInstance", value: function() {
- return null === this._innerEmitter && (this._innerEmitter = new lr(), this._innerEmitter._emit = this._innerEmitter.emit, this._innerEmitter.emit = (function(e3, t2) {
- var n2;
- 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);
- }).bind(this)), this._innerEmitter;
- } }, { key: "hasModule", value: function(e3) {
- return this._moduleMap.has(e3);
- } }, { key: "getModule", value: function(e3) {
- return this._moduleMap.get(e3);
- } }, { key: "canIUseInflate", value: function() {
- return !!this._moduleMap.get(ro);
- } }, { key: "isReady", value: function() {
- return this._isReady;
- } }, { key: "isIntl", value: function() {
- return this.getModule(xn).isIntl();
- } }, { key: "getNotReadyReason", value: function() {
- return this._reason;
- } }, { key: "setNotReadyReason", value: function(e3) {
- this._reason = e3;
- } }, { key: "getErrorMessage", value: function(e3, t2, n2) {
- return this._moduleMap.get(io).get({ key: e3, replacement1: t2, replacement2: n2, isIntl: this.isIntl() });
- } }, { key: "outputWarning", value: function(e3, t2, n2) {
- var o2 = this.getErrorMessage(e3, t2, n2);
- o2 && Ve.w(o2);
- } }, { key: "onError", value: function(e3) {
- var t2 = "code:".concat(e3.code, " message:").concat(e3.message);
- Ve.w("Oops! ".concat(t2)), new Aa("error").setMessage(t2).setNetworkType(this.getModule(Hn).getNetworkType()).setLevel("error").end(), this.getOuterEmitterInstance().emit(k.ERROR, e3);
- } }, { key: "restartTimer", value: function() {
- Ve.l("".concat(this._n, ".restartTimer")), this.stopTimer(), this._startTimer(), this.getModule(Pn).restartPolling();
- } }, { key: "getTimerID", value: function() {
- var e3 = this._moduleMap.get(Qn);
- return e3.isWorkerEnabled() ? e3.getTimerID() : this._checkTimer;
- } }, { key: "getPollingTimerID", value: function(e3) {
- return this._moduleMap.get(Pn).getPollingTimerID(e3);
- } }, { key: "reset", value: function() {
- Ve.l("".concat(this._n, ".reset")), be();
- var e3, t2 = D(this._moduleMap);
- try {
- for (t2.s(); !(e3 = t2.n()).done; ) {
- var n2 = v(e3.value, 2)[1];
- n2.reset && n2.reset();
- }
- } catch (i2) {
- t2.e(i2);
- } finally {
- t2.f();
- }
- this._startLoginTs = 0, this._initReadyList(), this._isReady = false, this.stopTimer(), this._outerEmitter.emit(k.SDK_NOT_READY);
- var o2, s2 = D(this._eventThrottleMap);
- try {
- for (s2.s(); !(o2 = s2.n()).done; ) {
- var a2 = v(o2.value, 2)[1];
- a2.timeoutID && clearTimeout(a2.timeoutID);
- }
- } catch (i2) {
- s2.e(i2);
- } finally {
- s2.f();
- }
- this._eventThrottleMap.clear();
- } }]), e2;
- }(), $u2 = function() {
- function e2(t2) {
- o(this, e2), this._funcMap = /* @__PURE__ */ new Map(), this._m = t2;
- }
- return a(e2, [{ key: "defense", value: function(e3, t2) {
- var n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0;
- if ("string" != typeof e3)
- return null;
- if (0 === e3.length)
- return null;
- if ("function" != typeof t2)
- return null;
- if (this._funcMap.has(e3) && this._funcMap.get(e3).has(t2))
- return this._funcMap.get(e3).get(t2);
- this._funcMap.has(e3) || this._funcMap.set(e3, /* @__PURE__ */ new Map());
- var o2 = null;
- 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;
- } }, { key: "defenseOnce", value: function(e3, t2) {
- var n2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0;
- return "function" != typeof t2 ? null : this._pack(e3, t2, n2);
- } }, { key: "find", value: function(e3, t2) {
- 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);
- } }, { key: "delete", value: function(e3, t2) {
- 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)));
- } }, { key: "_pack", value: function(e3, t2, n2) {
- var o2 = this;
- return function() {
- try {
- t2.apply(n2, Array.from(arguments));
- } catch (u2) {
- var s2 = Object.values(k).indexOf(e3), a2 = "CallbackError";
- if (-1 !== s2) {
- var i2 = Object.keys(k)[s2];
- o2._m.outputWarning(a2, i2, u2);
- }
- var r2 = new Aa(a2);
- r2.setMessage("eventName:".concat(e3)).setMoreMessage(u2.message).end();
- }
- };
- } }]), e2;
- }(), ec = function() {
- function e2(t2) {
- o(this, e2);
- 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 };
- this._m = new Qu(n2), this._safetyCallbackFactory = new $u2(this._m);
- }
- return a(e2, [{ key: "onError", value: function(e3) {
- this._m.onError(e3);
- } }, { key: "login", value: function(e3) {
- return this._m.login(), this._getModule(Rn).login(e3);
- } }, { key: "logout", value: function() {
- var e3 = this;
- return this._getModule(Rn).logout().then(function(t2) {
- return e3._m.reset(), t2;
- });
- } }, { key: "isReady", value: function() {
- return this._m.isReady();
- } }, { key: "isIntl", value: function() {
- return this._m.isIntl();
- } }, { key: "getNotReadyReason", value: function() {
- return this._m.getNotReadyReason();
- } }, { key: "getErrorMessage", value: function(e3, t2, n2) {
- return this._m.getErrorMessage(e3, t2, n2);
- } }, { key: "_getModule", value: function(e3) {
- return this._m.getModule(e3);
- } }, { key: "destroy", value: function() {
- var e3 = this;
- return this.logout().finally(function() {
- e3._m.stopTimer(), e3._getModule(Qn).terminate(), e3._getModule(Jn).dealloc();
- var t2 = e3._m.getOuterEmitterInstance(), n2 = e3._getModule(xn);
- t2.emit(k.SDK_DESTROY, { SDKAppID: n2.getSDKAppID() });
- });
- } }, { key: "on", value: function(e3, t2, n2) {
- Ve.d("on", "eventName:".concat(e3)), this._m.getOuterEmitterInstance().on(e3, this._safetyCallbackFactory.defense(e3, t2, n2), n2);
- } }, { key: "once", value: function(e3, t2, n2) {
- Ve.d("once", "eventName:".concat(e3)), this._m.getOuterEmitterInstance().once(e3, this._safetyCallbackFactory.defenseOnce(e3, t2, n2), n2 || this);
- } }, { key: "off", value: function(e3, t2, n2, o2) {
- Ve.d("off", "eventName:".concat(e3));
- var s2 = this._safetyCallbackFactory.find(e3, t2);
- null !== s2 && (this._m.getOuterEmitterInstance().off(e3, s2, n2, o2), this._safetyCallbackFactory.delete(e3, t2));
- } }, { key: "registerPlugin", value: function(e3) {
- it(e3["tim-offline-push-plugin"]) ? this._getModule(Yn).registerPlugin(e3) : this._getModule(no).registerPlugin(e3);
- } }, { key: "setLogLevel", value: function(e3) {
- if (e3 <= 0) {
- var t2 = this.getErrorMessage("TIM_ASCII_ART");
- t2 && formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", t2);
- var n2 = this.getErrorMessage("API_REFER");
- if (n2) {
- 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);
- }
- var o2 = this.getErrorMessage("DOCS_GUIDE");
- o2 && formatAppLog("log", "at node_modules/tim-wx-sdk/tim-wx.js:1", o2);
- }
- Ve.setLevel(e3);
- } }, { key: "createTextMessage", value: function(e3) {
- return this._getModule(Nn).createTextMessage(e3);
- } }, { key: "createTextAtMessage", value: function(e3) {
- return this._getModule(Nn).createTextMessage(e3);
- } }, { key: "createImageMessage", value: function(e3) {
- return this._getModule(Nn).createImageMessage(e3);
- } }, { key: "createAudioMessage", value: function(e3) {
- return this._getModule(Nn).createAudioMessage(e3);
- } }, { key: "createVideoMessage", value: function(e3) {
- return this._getModule(Nn).createVideoMessage(e3);
- } }, { key: "createCustomMessage", value: function(e3) {
- return this._getModule(Nn).createCustomMessage(e3);
- } }, { key: "createFaceMessage", value: function(e3) {
- return this._getModule(Nn).createFaceMessage(e3);
- } }, { key: "createFileMessage", value: function(e3) {
- return this._getModule(Nn).createFileMessage(e3);
- } }, { key: "createLocationMessage", value: function(e3) {
- return this._getModule(Nn).createLocationMessage(e3);
- } }, { key: "createMergerMessage", value: function(e3) {
- return this._getModule(Nn).createMergerMessage(e3);
- } }, { key: "downloadMergerMessage", value: function(e3) {
- 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) {
- return Za({ code: ha.MESSAGE_MERGER_DOWNLOAD_FAIL });
- });
- } }, { key: "createForwardMessage", value: function(e3) {
- return this._getModule(Nn).createForwardMessage(e3);
- } }, { key: "sendMessage", value: function(e3, t2) {
- return e3 instanceof Wa ? this._getModule(Nn).sendMessageInstance(e3, t2) : Za({ code: ha.MESSAGE_SEND_NEED_MESSAGE_INSTANCE });
- } }, { key: "callExperimentalAPI", value: function(e3, t2) {
- 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 });
- } }, { key: "revokeMessage", value: function(e3) {
- return this._getModule(Nn).revokeMessage(e3);
- } }, { key: "resendMessage", value: function(e3) {
- return this._getModule(Nn).resendMessage(e3);
- } }, { key: "deleteMessage", value: function(e3) {
- return this._getModule(Nn).deleteMessage(e3);
- } }, { key: "translateText", value: function(e3) {
- return this._getModule(Nn).translateText(e3);
- } }, { key: "setMessageExtensions", value: function(e3, t2) {
- return this._getModule(On).setMessageExtensions(e3, t2);
- } }, { key: "getMessageExtensions", value: function(e3) {
- return this._getModule(On).getMessageExtensions(e3);
- } }, { key: "deleteMessageExtensions", value: function(e3, t2) {
- return this._getModule(On).deleteMessageExtensions(e3, t2);
- } }, { key: "modifyMessage", value: function(e3) {
- return this._getModule(Nn).modifyRemoteMessage(e3);
- } }, { key: "getMessageList", value: function(e3) {
- return this._getModule(qn).getMessageList(e3);
- } }, { key: "getMessageListHopping", value: function(e3) {
- return this._getModule(qn).getMessageListHopping(e3);
- } }, { key: "sendMessageReadReceipt", value: function(e3) {
- return this._getModule(qn).sendReadReceipt(e3);
- } }, { key: "getMessageReadReceiptList", value: function(e3) {
- return this._getModule(qn).getReadReceiptList(e3);
- } }, { key: "getGroupMessageReadMemberList", value: function(e3) {
- return this._getModule(Pn).getReadReceiptDetail(e3);
- } }, { key: "findMessage", value: function(e3) {
- return this._getModule(qn).findMessage(e3);
- } }, { key: "setMessageRead", value: function(e3) {
- return this._getModule(qn).setMessageRead(e3);
- } }, { key: "getConversationList", value: function(e3) {
- return this._getModule(qn).getConversationList(e3);
- } }, { key: "getConversationProfile", value: function(e3) {
- return this._getModule(qn).getConversationProfile(e3);
- } }, { key: "deleteConversation", value: function(e3) {
- return this._getModule(qn).deleteConversation(e3);
- } }, { key: "clearHistoryMessage", value: function(e3) {
- return this._getModule(qn).clearHistoryMessage(e3);
- } }, { key: "pinConversation", value: function(e3) {
- return this._getModule(qn).pinConversation(e3);
- } }, { key: "setAllMessageRead", value: function(e3) {
- return this._getModule(qn).setAllMessageRead(e3);
- } }, { key: "setMessageRemindType", value: function(e3) {
- return this._getModule(qn).setMessageRemindType(e3);
- } }, { key: "getTotalUnreadMessageCount", value: function() {
- return this._getModule(qn).getTotalUnreadMessageCount();
- } }, { key: "setConversationCustomData", value: function(e3) {
- return this._getModule(qn).setConversationCustomData(e3);
- } }, { key: "markConversation", value: function(e3) {
- return this._getModule(qn).markConversation(e3);
- } }, { key: "getConversationGroupList", value: function() {
- return this._getModule(qn).getConversationGroupList();
- } }, { key: "createConversationGroup", value: function(e3) {
- return this._getModule(qn).createConversationGroup(e3);
- } }, { key: "deleteConversationGroup", value: function(e3) {
- return this._getModule(qn).deleteConversationGroup(e3);
- } }, { key: "renameConversationGroup", value: function(e3) {
- return this._getModule(qn).renameConversationGroup(e3);
- } }, { key: "addConversationsToGroup", value: function(e3) {
- return this._getModule(qn).addConversationsToGroup(e3);
- } }, { key: "deleteConversationsFromGroup", value: function(e3) {
- return this._getModule(qn).deleteConversationsFromGroup(e3);
- } }, { key: "getMyProfile", value: function() {
- return this._getModule(Gn).getMyProfile();
- } }, { key: "getUserProfile", value: function(e3) {
- return this._getModule(Gn).getUserProfile(e3);
- } }, { key: "updateMyProfile", value: function(e3) {
- return this._getModule(Gn).updateMyProfile(e3);
- } }, { key: "getBlacklist", value: function() {
- return this._getModule(Gn).getLocalBlacklist();
- } }, { key: "addToBlacklist", value: function(e3) {
- return this._getModule(Gn).addBlacklist(e3);
- } }, { key: "removeFromBlacklist", value: function(e3) {
- return this._getModule(Gn).deleteBlacklist(e3);
- } }, { key: "setSelfStatus", value: function(e3) {
- return this._getModule(Gn).setSelfStatus(e3);
- } }, { key: "getUserStatus", value: function(e3) {
- return this._getModule(Gn).getUserStatus(e3);
- } }, { key: "subscribeUserStatus", value: function(e3) {
- return this._getModule(Gn).subscribeUserStatus(e3);
- } }, { key: "unsubscribeUserStatus", value: function(e3) {
- return this._getModule(Gn).unsubscribeUserStatus(e3);
- } }, { key: "getFriendList", value: function() {
- var e3 = this._getModule(bn);
- return e3 ? e3.getLocalFriendList() : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "addFriend", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.addFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "deleteFriend", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.deleteFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "checkFriend", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.checkFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "getFriendProfile", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.getFriendProfile(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "updateFriend", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.updateFriend(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "getFriendApplicationList", value: function() {
- var e3 = this._getModule(bn);
- return e3 ? e3.getLocalFriendApplicationList() : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "acceptFriendApplication", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.acceptFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "refuseFriendApplication", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.refuseFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "deleteFriendApplication", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.deleteFriendApplication(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "setFriendApplicationRead", value: function() {
- var e3 = this._getModule(bn);
- return e3 ? e3.setFriendApplicationRead() : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "getFriendGroupList", value: function() {
- var e3 = this._getModule(bn);
- return e3 ? e3.getLocalFriendGroupList() : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "createFriendGroup", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.createFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "deleteFriendGroup", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.deleteFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "addToFriendGroup", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.addToFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "removeFromFriendGroup", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.removeFromFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "renameFriendGroup", value: function(e3) {
- var t2 = this._getModule(bn);
- return t2 ? t2.renameFriendGroup(e3) : Za({ code: ha.CANNOT_FIND_MODULE });
- } }, { key: "getGroupList", value: function(e3) {
- return this._getModule(Pn).getGroupList(e3);
- } }, { key: "getGroupProfile", value: function(e3) {
- return this._getModule(Pn).getGroupProfile(e3);
- } }, { key: "createGroup", value: function(e3) {
- return this._getModule(Pn).createGroup(e3);
- } }, { key: "dismissGroup", value: function(e3) {
- return this._getModule(Pn).dismissGroup(e3);
- } }, { key: "updateGroupProfile", value: function(e3) {
- return this._getModule(Pn).updateGroupProfile(e3);
- } }, { key: "joinGroup", value: function(e3) {
- return this._getModule(Pn).joinGroup(e3);
- } }, { key: "quitGroup", value: function(e3) {
- return this._getModule(Pn).quitGroup(e3);
- } }, { key: "searchGroupByID", value: function(e3) {
- return this._getModule(Pn).searchGroupByID(e3);
- } }, { key: "getGroupOnlineMemberCount", value: function(e3) {
- return this._getModule(Pn).getGroupOnlineMemberCount(e3);
- } }, { key: "changeGroupOwner", value: function(e3) {
- return this._getModule(Pn).changeGroupOwner(e3);
- } }, { key: "getGroupApplicationList", value: function() {
- return this._getModule(Pn).getGroupApplicationList();
- } }, { key: "handleGroupApplication", value: function(e3) {
- return this._getModule(Pn).handleGroupApplication(e3);
- } }, { key: "initGroupAttributes", value: function(e3) {
- return this._getModule(Pn).initGroupAttributes(e3);
- } }, { key: "setGroupAttributes", value: function(e3) {
- return this._getModule(Pn).setGroupAttributes(e3);
- } }, { key: "deleteGroupAttributes", value: function(e3) {
- return this._getModule(Pn).deleteGroupAttributes(e3);
- } }, { key: "getGroupAttributes", value: function(e3) {
- return this._getModule(Pn).getGroupAttributes(e3);
- } }, { key: "setGroupCounters", value: function(e3) {
- return this._getModule(Pn).setGroupCounters(e3);
- } }, { key: "increaseGroupCounter", value: function(e3) {
- return this._getModule(Pn).increaseGroupCounter(e3);
- } }, { key: "decreaseGroupCounter", value: function(e3) {
- return this._getModule(Pn).decreaseGroupCounter(e3);
- } }, { key: "getGroupCounters", value: function(e3) {
- return this._getModule(Pn).getGroupCounters(e3);
- } }, { key: "getGroupMemberList", value: function(e3) {
- return this._getModule(wn).getGroupMemberList(e3);
- } }, { key: "getGroupMemberProfile", value: function(e3) {
- return this._getModule(wn).getGroupMemberProfile(e3);
- } }, { key: "addGroupMember", value: function(e3) {
- return this._getModule(wn).addGroupMember(e3);
- } }, { key: "deleteGroupMember", value: function(e3) {
- return this._getModule(wn).deleteGroupMember(e3);
- } }, { key: "setGroupMemberMuteTime", value: function(e3) {
- return this._getModule(wn).setGroupMemberMuteTime(e3);
- } }, { key: "setGroupMemberRole", value: function(e3) {
- return this._getModule(wn).setGroupMemberRole(e3);
- } }, { key: "setGroupMemberNameCard", value: function(e3) {
- return this._getModule(wn).setGroupMemberNameCard(e3);
- } }, { key: "setGroupMemberCustomField", value: function(e3) {
- return this._getModule(wn).setGroupMemberCustomField(e3);
- } }, { key: "markGroupMemberList", value: function(e3) {
- return this._getModule(wn).markGroupMemberList(e3);
- } }, { key: "getJoinedCommunityList", value: function() {
- return this._getModule(Fn).getJoinedCommunityList();
- } }, { key: "createTopicInCommunity", value: function(e3) {
- return this._getModule(Fn).createTopicInCommunity(e3);
- } }, { key: "deleteTopicFromCommunity", value: function(e3) {
- return this._getModule(Fn).deleteTopicFromCommunity(e3);
- } }, { key: "updateTopicProfile", value: function(e3) {
- return this._getModule(Fn).updateTopicProfile(e3);
- } }, { key: "getTopicList", value: function(e3) {
- return this._getModule(Fn).getTopicList(e3);
- } }]), e2;
- }(), tc = { login: 1, logout: 1, destroy: 1, on: 1, off: 1, ready: 1, setLogLevel: 1, joinGroup: 1, quitGroup: 1, registerPlugin: 1, getGroupOnlineMemberCount: 1 };
- function nc(e2, t2) {
- if (e2.isReady() || 1 === tc[t2])
- return true;
- var n2 = e2.getNotReadyReason(), o2 = { code: n2, message: "".concat(e2.getErrorMessage(n2), " | ").concat(t2, " | ").concat(e2.getErrorMessage(ha.SDK_IS_NOT_READY)) };
- return e2.onError(o2), o2;
- }
- var oc = {}, sc = {};
- return sc.create = function(e2) {
- var n2 = 0, o2 = e2.SDKAppID;
- if (et(o2))
- n2 = o2;
- else if (n2 = parseInt(o2), isNaN(o2))
- return Ve.e("".concat("TIM.create", " failed. Failed to parse the SDKAppID, please check the arguments")), null;
- if (n2 && oc[n2])
- return oc[n2];
- Ve.l("".concat("TIM.create"));
- var s2 = new ec(t(t({}, e2), {}, { SDKAppID: n2 }));
- s2.on(k.SDK_DESTROY, function(e3) {
- oc[e3.data.SDKAppID] = null, delete oc[e3.data.SDKAppID];
- });
- var a2 = function(e3) {
- var t2 = /* @__PURE__ */ Object.create(null);
- return Object.keys(An).forEach(function(n3) {
- if (e3[n3]) {
- var o3 = new S();
- t2[n3] = function() {
- var t3 = Array.from(arguments);
- return o3.use(function(t4, o4) {
- var s3 = nc(e3, n3);
- return true === s3 ? o4() : Za(s3);
- }).use(function(e4, t4) {
- if (true === Jt(e4, Ln[n3], n3))
- return t4();
- }).use(function(t4, o4) {
- return e3[n3].apply(e3, t4);
- }), o3.run(t3);
- };
- }
- }), t2;
- }(s2);
- return oc[n2] = a2, Ln.hookGetAPITips(s2.getErrorMessage.bind(s2)), Ve.l("".concat("TIM.create", " ok")), a2;
- }, sc.TYPES = E, sc.EVENT = k, sc.VERSION = "2.27.6", Ve.l("TIM.VERSION:".concat(sc.VERSION)), sc;
- });
- })(timWx);
- var timWxExports = timWx.exports;
- const TIM = /* @__PURE__ */ getDefaultExportFromCjs(timWxExports);
- var timUploadPlugin = { exports: {} };
- (function(module, exports) {
- var factory;
- factory = function() {
- function e(e2, t2) {
- var n2 = Object.keys(e2);
- if (Object.getOwnPropertySymbols) {
- var o2 = Object.getOwnPropertySymbols(e2);
- t2 && (o2 = o2.filter(function(t3) {
- return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
- })), n2.push.apply(n2, o2);
- }
- return n2;
- }
- function t(t2) {
- for (var n2 = 1; n2 < arguments.length; n2++) {
- var o2 = null != arguments[n2] ? arguments[n2] : {};
- n2 % 2 ? e(Object(o2), true).forEach(function(e2) {
- s(t2, e2, o2[e2]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(o2)) : e(Object(o2)).forEach(function(e2) {
- Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(o2, e2));
- });
- }
- return t2;
- }
- function n(e2) {
- return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
- return typeof e3;
- } : function(e3) {
- return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
- })(e2);
- }
- function o(e2, t2) {
- if (!(e2 instanceof t2))
- throw new TypeError("Cannot call a class as a function");
- }
- function r(e2, t2) {
- for (var n2 = 0; n2 < t2.length; n2++) {
- var o2 = t2[n2];
- o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2);
- }
- }
- function a(e2, t2, n2) {
- return t2 && r(e2.prototype, t2), n2 && r(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2;
- }
- function s(e2, t2, n2) {
- return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2;
- }
- function i(e2, t2) {
- if (null == e2)
- return {};
- var n2, o2, r2 = function(e3, t3) {
- if (null == e3)
- return {};
- var n3, o3, r3 = {}, a3 = Object.keys(e3);
- for (o3 = 0; o3 < a3.length; o3++)
- n3 = a3[o3], t3.indexOf(n3) >= 0 || (r3[n3] = e3[n3]);
- return r3;
- }(e2, t2);
- if (Object.getOwnPropertySymbols) {
- var a2 = Object.getOwnPropertySymbols(e2);
- for (o2 = 0; o2 < a2.length; o2++)
- n2 = a2[o2], t2.indexOf(n2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, n2) && (r2[n2] = e2[n2]);
- }
- return r2;
- }
- 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) {
- if ("object" !== n(e2) || null === e2)
- return false;
- var t2 = Object.getPrototypeOf(e2);
- if (null === t2)
- return true;
- for (var o2 = t2; null !== Object.getPrototypeOf(o2); )
- o2 = Object.getPrototypeOf(o2);
- return t2 === o2;
- };
- function v(e2) {
- if (null == e2)
- return true;
- if ("boolean" == typeof e2)
- return false;
- if ("number" == typeof e2)
- return 0 === e2;
- if ("string" == typeof e2)
- return 0 === e2.length;
- if ("function" == typeof e2)
- return 0 === e2.length;
- if (Array.isArray(e2))
- return 0 === e2.length;
- if (e2 instanceof Error)
- return "" === e2.message;
- if (h(e2)) {
- for (var t2 in e2)
- if (Object.prototype.hasOwnProperty.call(e2, t2))
- return false;
- return true;
- }
- return false;
- }
- var b = function() {
- function e2() {
- o(this, e2);
- }
- return a(e2, [{ key: "request", value: function(e3, t2) {
- var n2 = this, o2 = e3.downloadUrl || "", r2 = (e3.method || "PUT").toUpperCase(), a2 = e3.url;
- if (e3.qs) {
- var s2 = function(e4) {
- var t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "&", n3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "=";
- return v(e4) ? "" : h(e4) ? Object.keys(e4).map(function(o3) {
- var r3 = encodeURIComponent(o3) + n3;
- return Array.isArray(e4[o3]) ? e4[o3].map(function(e5) {
- return r3 + encodeURIComponent(e5);
- }).join(t3) : r3 + encodeURIComponent(e4[o3]);
- }).filter(Boolean).join(t3) : void 0;
- }(e3.qs);
- s2 && (a2 += "".concat(-1 === a2.indexOf("?") ? "?" : "&").concat(s2));
- }
- var i2 = new XMLHttpRequest();
- i2.open(r2, a2, true), i2.responseType = e3.dataType || "text";
- var f2 = e3.headers || {};
- if (!v(f2))
- for (var u2 in f2)
- f2.hasOwnProperty(u2) && "content-length" !== u2.toLowerCase() && "user-agent" !== u2.toLowerCase() && "origin" !== u2.toLowerCase() && "host" !== u2.toLowerCase() && i2.setRequestHeader(u2, f2[u2]);
- return i2.onload = function() {
- if (200 === i2.status)
- t2(null, n2._xhrRes(i2, n2._xhrBody(i2, o2)));
- else {
- var e4 = { code: i2.status, message: JSON.stringify(i2.responseText) };
- t2(e4, n2._xhrRes(i2, n2._xhrBody(i2)));
- }
- }, i2.onerror = function(e4) {
- var o3 = n2._xhrBody(i2), r3 = { code: i2.status, message: JSON.stringify(i2.responseText) };
- o3 || i2.statusText || 0 !== i2.status || (e4.message = "CORS blocked or network error"), t2(r3, n2._xhrRes(i2, o3)), r3 = null;
- }, e3.onProgress && i2.upload && (i2.upload.onprogress = function(t3) {
- var n3 = t3.total, o3 = t3.loaded, r3 = Math.floor(100 * o3 / n3);
- e3.onProgress({ total: n3, loaded: o3, percent: (r3 >= 100 ? 100 : r3) / 100 });
- }), i2.send(e3.resources), i2;
- } }, { key: "_xhrRes", value: function(e3, t2) {
- var n2 = {};
- return e3.getAllResponseHeaders().trim().split("\n").forEach(function(e4) {
- if (e4) {
- var t3 = e4.indexOf(":"), o2 = e4.substr(0, t3).trim().toLowerCase(), r2 = e4.substr(t3 + 1).trim();
- n2[o2] = r2;
- }
- }), { statusCode: e3.status, statusMessage: e3.statusText, headers: n2, data: t2 };
- } }, { key: "_xhrBody", value: function(e3, t2) {
- return 200 === e3.status && t2 ? { location: t2 } : { response: e3.responseText };
- } }]), e2;
- }(), O = ["unknown", "image", "video", "audio", "log"], w = ["name"], S = function() {
- function e2() {
- o(this, e2);
- }
- return a(e2, [{ key: "request", value: function(e3, n2) {
- 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 = {};
- if (p) {
- var C = u2.split("?sign=");
- if (C.length > 1) {
- var P = C[1];
- d2 = "".concat(C[0], "?sign=").concat(encodeURIComponent("".concat(P))), S2.sign = decodeURIComponent(P), S2.signature = decodeURIComponent(P);
- }
- }
- var j = { url: d2, header: f2, name: "file", filePath: a2, formData: t(t({}, b2), S2), timeout: e3.timeout || 3e5 };
- if (y) {
- var x = j;
- x.name, j = t(t({}, i(x, w)), {}, { fileName: "file", fileType: O[e3.fileType] });
- }
- return (g2 = m.uploadFile(t(t({}, j), {}, { success: function(e4) {
- o2._handleResponse({ response: e4, downloadUrl: c2, callback: n2 });
- }, fail: function(e4) {
- o2._handleResponse({ response: e4, downloadUrl: c2, callback: n2 });
- } }))).onProgressUpdate && g2.onProgressUpdate(function(t2) {
- e3.onProgress && e3.onProgress({ total: t2.totalBytesExpectedToSend, loaded: t2.totalBytesSent, percent: Math.floor(t2.progress) / 100 });
- }), g2;
- } }, { key: "_handleResponse", value: function(e3) {
- var n2 = e3.downloadUrl, o2 = e3.response, r2 = e3.callback, a2 = o2.header, s2 = {};
- if (a2)
- for (var i2 in a2)
- a2.hasOwnProperty(i2) && (s2[i2.toLowerCase()] = a2[i2]);
- var f2 = +o2.statusCode;
- 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 });
- } }]), e2;
- }();
- return function() {
- function e2() {
- 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();
- }
- return a(e2, [{ key: "uploadFile", value: function(e3, t2) {
- var n2 = this;
- return this.httpRequest.request(e3, function(o2, r2) {
- o2 && n2.tryCount < n2.retry && n2.allowRetry(o2) ? (n2.tryCount++, n2.uploadFile(e3, t2)) : (n2.tryCount = 0, t2(o2, r2));
- });
- } }, { key: "allowRetry", value: function(e3) {
- var t2 = false, n2 = false;
- if (e3) {
- var o2 = e3.headers && (e3.headers.date || e3.headers.Date) || e3.error && e3.error.ServerTime;
- try {
- var r2 = e3.error && e3.error.Code, a2 = e3.error && e3.error.Message;
- ("RequestTimeTooSkewed" === r2 || "AccessDenied" === r2 && "Request has expired" === a2) && (n2 = true);
- } catch (f2) {
- }
- if (n2 && o2) {
- var s2 = Date.now(), i2 = Date.parse(o2);
- Math.abs(s2 + this.systemClockOffset - i2) >= 3e4 && (this.systemClockOffset = i2 - s2, t2 = true);
- } else
- 5 === Math.floor(e3.statusCode / 100) && (t2 = true);
- }
- return t2;
- } }]), e2;
- }();
- }, module.exports = factory();
- })(timUploadPlugin);
- var timUploadPluginExports = timUploadPlugin.exports;
- const TIMUploadPlugin = /* @__PURE__ */ getDefaultExportFromCjs(timUploadPluginExports);
- var aegis_min = { exports: {} };
- (function(module, exports) {
- !function(e, t) {
- module.exports = t();
- }(commonjsGlobal, function() {
- var n = function(e2, t2) {
- return (n = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? function(e3, t3) {
- e3.__proto__ = t3;
- } : function(e3, t3) {
- for (var n2 in t3)
- Object.prototype.hasOwnProperty.call(t3, n2) && (e3[n2] = t3[n2]);
- }))(e2, t2);
- }, u = function() {
- return (u = Object.assign || function(e2) {
- for (var t2, n2 = 1, o2 = arguments.length; n2 < o2; n2++)
- for (var i2 in t2 = arguments[n2])
- Object.prototype.hasOwnProperty.call(t2, i2) && (e2[i2] = t2[i2]);
- return e2;
- }).apply(this, arguments);
- };
- function s(e2, s2, l2, a2) {
- return new (l2 = l2 || Promise)(function(n2, t2) {
- function o2(e3) {
- try {
- r2(a2.next(e3));
- } catch (e4) {
- t2(e4);
- }
- }
- function i2(e3) {
- try {
- r2(a2.throw(e3));
- } catch (e4) {
- t2(e4);
- }
- }
- function r2(e3) {
- var t3;
- e3.done ? n2(e3.value) : ((t3 = e3.value) instanceof l2 ? t3 : new l2(function(e4) {
- e4(t3);
- })).then(o2, i2);
- }
- r2((a2 = a2.apply(e2, s2 || [])).next());
- });
- }
- function f(o2, i2) {
- var r2, s2, l2, a2 = { label: 0, sent: function() {
- if (1 & l2[0])
- throw l2[1];
- return l2[1];
- }, trys: [], ops: [] }, e2 = { next: t2(0), throw: t2(1), return: t2(2) };
- return "function" == typeof Symbol && (e2[Symbol.iterator] = function() {
- return this;
- }), e2;
- function t2(n2) {
- return function(e3) {
- var t3 = [n2, e3];
- if (r2)
- throw new TypeError("Generator is already executing.");
- for (; a2; )
- try {
- 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)
- return l2;
- switch (s2 = 0, (t3 = l2 ? [2 & t3[0], l2.value] : t3)[0]) {
- case 0:
- case 1:
- l2 = t3;
- break;
- case 4:
- return a2.label++, { value: t3[1], done: false };
- case 5:
- a2.label++, s2 = t3[1], t3 = [0];
- continue;
- case 7:
- t3 = a2.ops.pop(), a2.trys.pop();
- continue;
- default:
- if (!((l2 = 0 < (l2 = a2.trys).length && l2[l2.length - 1]) || 6 !== t3[0] && 2 !== t3[0])) {
- a2 = 0;
- continue;
- }
- if (3 === t3[0] && (!l2 || t3[1] > l2[0] && t3[1] < l2[3]))
- a2.label = t3[1];
- else if (6 === t3[0] && a2.label < l2[1])
- a2.label = l2[1], l2 = t3;
- else {
- if (!(l2 && a2.label < l2[2])) {
- l2[2] && a2.ops.pop(), a2.trys.pop();
- continue;
- }
- a2.label = l2[2], a2.ops.push(t3);
- }
- }
- t3 = i2.call(o2, a2);
- } catch (e4) {
- t3 = [6, e4], s2 = 0;
- } finally {
- r2 = l2 = 0;
- }
- if (5 & t3[0])
- throw t3[1];
- return { value: t3[0] ? t3[1] : void 0, done: true };
- };
- }
- }
- function l() {
- for (var e2 = 0, t2 = 0, n2 = arguments.length; t2 < n2; t2++)
- e2 += arguments[t2].length;
- for (var o2 = Array(e2), i2 = 0, t2 = 0; t2 < n2; t2++)
- for (var r2 = arguments[t2], s2 = 0, l2 = r2.length; s2 < l2; s2++, i2++)
- o2[i2] = r2[s2];
- return o2;
- }
- Object.assign || Object.defineProperty(Object, "assign", { enumerable: false, configurable: true, writable: true, value: function(e2) {
- if (null == e2)
- throw new TypeError("Cannot convert first argument to object");
- for (var t2 = Object(e2), n2 = 1; n2 < arguments.length; n2++)
- if (null != (o2 = arguments[n2]))
- for (var o2 = Object(o2), i2 = Object.keys(Object(o2)), r2 = 0, s2 = i2.length; r2 < s2; r2++) {
- var l2 = i2[r2], a2 = Object.getOwnPropertyDescriptor(o2, l2);
- null != a2 && a2.enumerable && (t2[l2] = o2[l2]);
- }
- return t2;
- } });
- 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) {
- for (var n2 = 0; n2 < e2.length; n2++)
- if (e2[n2].callback === t2)
- return n2;
- return -1;
- }, e.prototype.on = function(e2, t2, n2) {
- var o2;
- if (void 0 === n2 && (n2 = 0), this)
- 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;
- }, e.prototype.one = function(e2, t2) {
- this.on(e2, t2, 1);
- }, e.prototype.remove = function(e2, t2) {
- if (this) {
- var n2 = this.eventsList[e2];
- if (n2) {
- if (t2)
- return n2.length && (t2 = this.indexOf(n2, t2), n2.splice(t2, 1)), this;
- try {
- delete this.eventsList[e2];
- } catch (e3) {
- }
- }
- return null;
- }
- }, e.prototype.clear = function() {
- this.eventsList = {};
- }, e), F = function(e2) {
- if (!e2 || 0 === e2.length)
- return "{}";
- e2 = Array.isArray(e2) ? e2 : [e2];
- var t2 = Object.keys(e2[0]), n2 = {}, o2 = (t2.forEach(function(t3) {
- n2[t3] = e2.map(function(e3) {
- return e3[t3];
- });
- }), n2.count = e2.length, n2);
- if ("string" == typeof o2)
- return o2;
- try {
- return JSON.stringify(o2, i()) || "undefined";
- } catch (o3) {
- return "error happen when aegis stringify: \n " + o3.message + " \n " + o3.stack;
- }
- };
- function e() {
- var s2 = this;
- this.emit = function(e2, t2) {
- if (s2) {
- var n2;
- if (null != (o2 = s2.eventsList[e2]) && o2.length)
- for (var o2 = o2.slice(), i2 = 0; i2 < o2.length; i2++) {
- n2 = o2[i2];
- try {
- var r2 = n2.callback.apply(s2, [t2]);
- if (1 === n2.type && s2.remove(e2, n2.callback), false === r2)
- break;
- } catch (e3) {
- throw e3;
- }
- }
- return s2;
- }
- }, this.eventsList = {};
- }
- (r = o = o || {})[r.number = -1] = "number", r.string = "";
- function d(e2) {
- return "string" == typeof e2 && /^\//.test(e2) ? "https:" === (null === location || void 0 === location ? void 0 : location.protocol) : /^https/.test(e2);
- }
- function h(e2, t2, n2) {
- try {
- var o2 = "function" == typeof t2 ? t2(e2, null == n2 ? void 0 : n2.url) || "" : e2;
- return x(o2).slice(0, 102400);
- } catch (e3) {
- return "";
- }
- }
- function g(t2, e2) {
- return "string" != typeof t2 || !t2 || e2 && -1 < t2.indexOf(e2) || X.test(t2) || q.some(function(e3) {
- return -1 < t2.indexOf(e3);
- });
- }
- function m(n2, o2) {
- var i2, r2 = [], s2 = n2.config;
- return n2.lifeCycle.on("destroy", function() {
- r2.length = 0;
- }), function(e2, t2) {
- 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() {
- i2 = null, 0 < (r2 = z(r2)).length && t2(r2.splice(0, r2.length));
- }, s2.delay));
- };
- }
- function B(e2, t2) {
- return Array.isArray(e2) ? t2(e2.map(function(e3) {
- return t3 = u(u({}, e3), { msg: "string" == typeof e3.msg ? e3.msg : [].concat(e3.msg).map(w).join(" ") }), p.forEach(function(e4) {
- t3[e4] || delete t3[e4];
- }), t3;
- var t3;
- })) : t2([u(u({}, e2), { msg: "string" == typeof e2.msg ? e2.msg : w(e2.msg) })]);
- }
- function H(a2, c2) {
- return function(e2, t2) {
- var n2, o2, i2, r2 = Array.isArray(e2), s2 = r2 ? e2 : [e2], l2 = (a2.lifeCycle.emit("beforeRequest", e2), a2.config.beforeRequest);
- (s2 = "function" == typeof l2 ? s2.map(function(e3) {
- try {
- var t3 = l2({ logs: e3, logType: c2 });
- return (null == t3 ? void 0 : t3.logType) === c2 && null != t3 && t3.logs ? t3.logs : false !== t3 && e3;
- } catch (t4) {
- return e3;
- }
- }).filter(function(e3) {
- return false !== e3;
- }) : 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) {
- n2.forEach(function(e3) {
- null != e3 && e3[t3] && o2.push(t3);
- });
- }), 0 < o2.length && (n2 = n2.map(function(e3) {
- var t3 = {};
- return o2.forEach(function(e4) {
- t3[e4] = "";
- }), u(u({}, t3), e3);
- }))), s2 = n2, t2(r2 ? s2 : s2[0]));
- };
- }
- function a(i2) {
- return function(e2, t2) {
- i2.lifeCycle.emit("modifyRequest", e2);
- var n2 = i2.config.modifyRequest;
- if ("function" == typeof n2)
- try {
- var o2 = n2(e2);
- "object" == typeof o2 && "url" in o2 && (e2 = o2);
- } catch (e3) {
- formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e3);
- }
- t2(e2);
- };
- }
- function c(o2) {
- return function(e2, t2) {
- null != (n2 = o2.lifeCycle) && n2.emit("afterRequest", e2);
- var n2 = (o2.config || {}).afterRequest;
- "function" == typeof n2 && false === n2(e2) || t2(e2);
- };
- }
- function y(n2) {
- if (n2 && n2.reduce && n2.length)
- return 1 === n2.length ? function(e2, t2) {
- n2[0](e2, t2 || ee);
- } : n2.reduce(function(n3, o2) {
- return function(e2, t2) {
- return void 0 === t2 && (t2 = ee), n3(e2, function(e3) {
- return null == o2 ? void 0 : o2(e3, t2);
- });
- };
- });
- throw new TypeError("createPipeline need at least one function param");
- }
- function v(t2, n2) {
- Object.getOwnPropertyNames(t2).forEach(function(e2) {
- "function" == typeof t2[e2] && "constructor" !== e2 && (n2 ? n2[e2] = "sendPipeline" === e2 ? function() {
- return function() {
- };
- } : function() {
- } : t2[e2] = function() {
- });
- });
- }
- function M(n2) {
- var t2, e2 = this, o2 = (r2 = n2.config).uin, i2 = r2.id, r2 = r2.offlineLogLimit;
- o2 && i2 && (t2 = new G({ limit: void 0 === r2 ? 2e4 : r2 }), n2.lifeCycle.on("beforeWrite", function(e3) {
- t2.save2Offline(e3 = void 0 === e3 ? [] : e3, n2.config);
- }), n2.getOfflineLog = function() {
- var e3 = t2.getLogs({ uin: o2, id: i2 });
- return t2.clearLogs(), e3;
- }, n2.uploadOfflineLogs = function(t3) {
- return s(e2, void 0, void 0, function() {
- return f(this, function(e3) {
- return t3 = Array.isArray(t3) ? t3 : [t3], [2, function(a2, c2) {
- return s(this, void 0, void 0, function() {
- var t4, n3, o3, i3, r3, s2, l2;
- return f(this, function(e4) {
- 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) {
- var t5 = (null == e5 ? void 0 : e5.data).secretKey;
- if (t5)
- try {
- 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 });
- } catch (e6) {
- formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e6);
- }
- }, function(e5) {
- formatAppLog("error", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", e5);
- }), [2]) : [2];
- });
- });
- }(n2, t3)];
- });
- });
- });
- }
- function G(e2) {
- var o2 = this, e2 = void 0 === (e2 = (void 0 === e2 ? {} : e2).limit) ? 2e4 : e2;
- this.offlineBuffer = [], this.clearLogs = function() {
- o2.offlineBuffer = [];
- }, this.save2Offline = function(e3, t2) {
- e3 = (e3 = Array.isArray(e3) ? e3 : [e3]).map(function(e4) {
- return "string" == typeof e4 && (e4 = { msg: e4 }), Object.assign({ id: t2.id, uin: t2.uin, time: +Date.now(), version: t2.version }, e4);
- });
- o2.offlineBuffer = o2.offlineBuffer.concat(e3).slice(0, o2.limitSize);
- }, this.getLogs = function(t2, e3) {
- var n2 = o2.offlineBuffer.filter(function(e4) {
- return e4.id === t2.id && e4.uin === t2.uin;
- });
- return null != e3 && e3(n2), n2;
- }, this.limitSize = e2;
- }
- function J(e2, o2) {
- return void 0 === o2 && (o2 = {}), new Promise(function(t2, n2) {
- C || n2(new Error("no available fetch found!"));
- try {
- C(u(u({}, o2), { url: e2, type: "text" }), function(e3) {
- return t2(j(e3));
- });
- } catch (e3) {
- n2(e3);
- }
- });
- }
- 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() {
- var n2 = /* @__PURE__ */ new WeakSet();
- return function(e2, t2) {
- if (t2 instanceof Error)
- return "Error.message: " + t2.message + " \n Error.stack: " + t2.stack;
- if ("object" == typeof t2 && null !== t2) {
- if (n2.has(t2))
- return "[Circular " + (e2 || "root") + "]";
- n2.add(t2);
- }
- return t2;
- };
- }, w = function(e2) {
- if ("string" == typeof e2)
- return e2;
- try {
- return e2 instanceof Error ? (JSON.stringify(e2, i(), 4) || "undefined").replace(/"/gim, "") : JSON.stringify(e2, i(), 4) || "undefined";
- } catch (e3) {
- return "error happen when aegis stringify: \n " + e3.message + " \n " + e3.stack;
- }
- }, x = function(r2, s2) {
- void 0 === s2 && (s2 = 3);
- var i2, l2, a2, c2 = "";
- return Array.isArray(r2) ? (c2 += "[", i2 = r2.length, r2.forEach(function(e2, t2) {
- var n2, o2;
- 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 ? "" : ",");
- }), c2 += "]") : r2 instanceof Object ? (c2 = "{", l2 = Object.keys(r2), a2 = l2.length, l2.forEach(function(e2, t2) {
- var n2, o2, i3;
- "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]] ? "" : ",";
- }), c2 += "}") : c2 += r2, c2;
- }, 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) {
- return e2.filter(function(n2, o2) {
- return "static" !== n2.type || !e2.find(function(e3, t2) {
- return n2.url === e3.url && 200 === n2.status && o2 < t2;
- });
- });
- }), Y = function(e2) {
- e2.level === b.INFO_ALL && (e2.level = b.INFO);
- }, E = {}, P = {}, T = function(e2) {
- return E[e2] || (E[e2] = setTimeout(function() {
- P[e2] = {}, E[e2] = null;
- }, 6e4)), E[e2];
- }, Q = function(e2) {
- return (Array.isArray(e2) ? e2 : [e2]).map(function(n2) {
- return Object.getOwnPropertyNames(n2).reduce(function(e3, t2) {
- return "ctx" !== t2 && (e3[t2] = n2[t2]), e3;
- }, { level: b.INFO, msg: "" });
- });
- }, Z = function(o2) {
- return function(e2) {
- return o2.sendPipeline([function(e3, n2) {
- 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() {
- var t2 = o2.config.onReport;
- "function" == typeof t2 && e3.forEach(function(e4) {
- t2(e4);
- }), "function" == typeof n2 && n2([]);
- } });
- }], O.LOG)(e2);
- };
- }, ee = function() {
- }, r = (Object.defineProperty(N.prototype, "__version__", { get: function() {
- return formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "__version__ has discard, please use version"), "1.36.4";
- }, enumerable: false, configurable: true }), Object.defineProperty(N.prototype, "LogType", { get: function() {
- return formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "LogType has discard, please use logType"), b;
- }, enumerable: false, configurable: true }), N.prototype.init = function(e2) {
- this.setConfig(e2);
- for (var t2 = 0; t2 < N.installedPlugins.length; t2++)
- try {
- N.installedPlugins[t2].patch(this);
- } catch (e3) {
- this.sendSDKError(e3);
- }
- this.lifeCycle.emit("onInited");
- }, N.prototype.setConfig = function(e2) {
- Object.assign(this.config, e2);
- 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;
- return this.bean.id = t2 || "", this.bean.uin = n2 || "", this.bean.version = o2 || "1.36.4", this.bean.aid = l2 || "", this.bean.env = function() {
- switch (c2) {
- case R.production:
- case R.development:
- case R.gray:
- case R.pre:
- case R.daily:
- case R.local:
- case R.test:
- case R.others:
- return 1;
- default:
- return;
- }
- }() ? 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;
- }, N.use = function(e2) {
- -1 === N.installedPlugins.indexOf(e2) && e2.aegisPlugin && N.installedPlugins.push(e2);
- }, N.unuse = function(e2) {
- e2 = N.installedPlugins.indexOf(e2);
- -1 !== e2 && N.installedPlugins.splice(e2, 1);
- }, N.prototype.info = function() {
- for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
- e2[t2] = arguments[t2];
- var n2 = { level: b.INFO, msg: e2 };
- 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.INFO }), this.normalLogPipeline(n2);
- }, N.prototype.infoAll = function() {
- for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
- e2[t2] = arguments[t2];
- var n2 = { level: b.INFO_ALL, msg: e2 };
- 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.INFO_ALL }), this.normalLogPipeline(n2);
- }, N.prototype.report = function() {
- for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
- e2[t2] = arguments[t2];
- var n2 = { level: b.REPORT, msg: e2 };
- 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0])), this.normalLogPipeline(n2);
- }, N.prototype.error = function() {
- for (var e2 = [], t2 = 0; t2 < arguments.length; t2++)
- e2[t2] = arguments[t2];
- var n2 = { level: b.ERROR, msg: e2 };
- 1 === e2.length && e2[0].msg && Object.assign(n2, u({}, e2[0]), { level: b.ERROR }), this.normalLogPipeline(n2);
- }, N.prototype.speedLogPipeline = function(e2) {
- throw new Error('You need to override "speedLogPipeline" method');
- }, N.prototype.reportPv = function(n2) {
- var o2, i2 = this;
- 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) {
- return "id" !== e2;
- }).map(function(e2) {
- return e2 + "=" + i2.bean[e2];
- }).join("&"), this.sendPipeline([function(e2, t2) {
- t2({ url: i2.config.url + "/" + n2 + "?" + o2, addBean: false, type: O.CUSTOM_PV });
- }], O.CUSTOM_PV)(null));
- }, N.prototype.reportEvent = function(e2) {
- 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"));
- }, N.prototype.reportTime = function(e2, t2) {
- if ("object" == typeof e2)
- return this.reportT(e2);
- "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");
- }, N.prototype.reportT = function(e2) {
- 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;
- if ("string" == typeof t2 && "number" == typeof n2 && "string" == typeof o2 && "string" == typeof i2 && "string" == typeof r2) {
- if (!(n2 < 0 || 6e4 < n2))
- return this.submitCustomTime(t2, n2, o2, i2, r2, void 0 === e2 ? "" : e2);
- formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: duration must between 0 and 60000");
- } else
- formatAppLog("warn", "at node_modules/aegis-weex-sdk/lib/aegis.min.js:10", "reportTime: params error");
- }, N.prototype.time = function(e2) {
- "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");
- }, N.prototype.timeEnd = function(e2) {
- "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");
- }, N.prototype.submitCustomTime = function(e2, t2, n2, o2, i2, r2) {
- 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 });
- }, N.prototype.extendBean = function(e2, t2) {
- this.bean[e2] = t2;
- }, N.prototype.sendPipeline = function(e2, t2) {
- var n2, r2 = this;
- return y(l([function(e3, t3) {
- 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)
- if (n2.isGetSample)
- n2.isHidden || t3(e3);
- else {
- if (n2.isGetSample = true, Math.random() < n2.config.random)
- return n2.isHidden = false, t3(e3);
- n2.isHidden = true;
- }
- }, H(n2 = this, t2)], e2, [a(this), function(o2, i2) {
- r2.request(o2, function() {
- for (var e3, t3 = [], n3 = 0; n3 < arguments.length; n3++)
- t3[n3] = arguments[n3];
- 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));
- }, function() {
- for (var e3, t3 = [], n3 = 0; n3 < arguments.length; n3++)
- t3[n3] = arguments[n3];
- 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));
- });
- }, c(this)]));
- }, N.prototype.send = function(e2, i2, r2) {
- var t2 = this;
- return y([a(this), function(n2, o2) {
- t2.request(n2, function() {
- for (var e3 = [], t3 = 0; t3 < arguments.length; t3++)
- e3[t3] = arguments[t3];
- o2({ isErr: false, result: e3, logType: n2.type, logs: n2.log }), null != i2 && i2.apply(void 0, e3);
- }, function() {
- for (var e3 = [], t3 = 0; t3 < arguments.length; t3++)
- e3[t3] = arguments[t3];
- o2({ isErr: true, result: e3, logType: n2.type, logs: n2.log }), null != r2 && r2.apply(void 0, e3);
- });
- }, c(this)])(e2);
- }, N.prototype.ready = function(e2, t2, n2) {
- throw new Error('You need to override "ready" method');
- }, N.prototype.request = function(e2, t2, n2) {
- throw new Error('You need to override "request" method');
- }, N.prototype.sendSDKError = function(e2) {
- var n2 = this;
- this.sendPipeline([function(e3, t2) {
- 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 });
- }], O.SDK_ERROR)(e2);
- }, N.prototype.destroy = function(e2) {
- void 0 === e2 && (e2 = false);
- var t2, n2, o2 = N.instances.indexOf(this);
- -1 !== o2 && N.instances.splice(o2, 1);
- for (var i2 = N.installedPlugins.length - 1; 0 <= i2; i2--)
- try {
- N.installedPlugins[i2].unpatch(this);
- } catch (e3) {
- this.sendSDKError(e3);
- }
- if (this.lifeCycle.emit("destroy"), this.lifeCycle.clear(), e2)
- t2 = this, n2 = Object.getOwnPropertyDescriptors(t2), Object.keys(n2).forEach(function(e3) {
- n2[e3].writable && (t2[e3] = null);
- }), Object.setPrototypeOf(this, null);
- else {
- for (var r2 = this; r2.constructor !== Object && v(r2, this), r2 = Object.getPrototypeOf(r2); )
- ;
- 0 === N.instances.length && (o2 = Object.getPrototypeOf(this).constructor, v(o2), v(N));
- }
- }, N.version = "1.36.4", N.instances = [], N.logType = b, N.environment = R, N.installedPlugins = [], N), L = (I.prototype.patch = function(e2) {
- this.canUse(e2) && this.exist(e2) && (this.instances.push(e2), this.triggerInit(e2), this.triggerOnNewAegis(e2));
- }, I.prototype.unpatch = function(e2) {
- var t2 = this.instances.indexOf(e2);
- -1 !== t2 && (this.instances.splice(t2, 1), 0 === this.instances.length) && this.uninstall(e2);
- }, I.prototype.countInstance = function() {
- return this.instances.length;
- }, I.prototype.uninstall = function(e2) {
- var t2;
- null != (t2 = null == (t2 = this.option) ? void 0 : t2.destroy) && t2.apply(this, [e2]);
- }, I.prototype.walk = function(n2) {
- var o2 = this;
- this.instances.forEach(function(e2) {
- var t2 = o2.canUse(e2);
- t2 && n2(e2, t2);
- });
- }, I.prototype.canUse = function(e2) {
- e2 = this.getConfig(e2);
- return !(!e2 || "object" != typeof e2) || !!e2;
- }, I.prototype.getConfig = function(e2) {
- return null == (e2 = e2.config) ? void 0 : e2[this.name];
- }, I.prototype.exist = function(e2) {
- return -1 === this.instances.indexOf(e2);
- }, I.prototype.triggerInit = function(e2) {
- var t2;
- this.inited || (this.inited = true, null == (t2 = null == (t2 = this.option) ? void 0 : t2.init)) || t2.call(this.option, this.getConfig(e2));
- }, I.prototype.triggerOnNewAegis = function(e2) {
- var t2;
- null != (t2 = null == (t2 = this.option) ? void 0 : t2.onNewAegis) && t2.call(this.option, e2, this.getConfig(e2));
- }, I), te = new L({ name: "offlineLog", onNewAegis: function(t2) {
- M(t2), t2.lifeCycle.on("onConfigChange", function(e2) {
- M(t2);
- });
- } }), S = "undefined" != typeof weex && (null === weex || void 0 === weex ? void 0 : weex.requireModule("stream")), C = null == S ? void 0 : S.fetch, j = function(e2) {
- var t2 = e2.ok, n2 = e2.status, o2 = e2.statusText, i2 = e2.data, r2 = e2.headers;
- return { ok: t2, status: n2, statusText: o2, body: i2, headers: r2, clone: function() {
- return j(e2);
- }, text: function() {
- return new Promise(function(e3) {
- return e3(i2);
- });
- }, json: function() {
- return new Promise(function(e3, t3) {
- try {
- e3(JSON.parse(i2));
- } catch (e4) {
- t3(new Error("response body is not JSON"));
- }
- });
- } };
- }, 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() {
- var e2 = ((null == (e2 = null == (e2 = null == (e2 = this.weex) ? void 0 : e2.config) ? void 0 : e2.env) ? void 0 : e2.osName) || "").toLowerCase();
- return "android" === e2 ? 1 : "ios" === e2 ? 2 : 100;
- }, U.prototype.initOfflineLog = function() {
- U.use(te);
- }, Object.defineProperty(U.prototype, "getBean", { get: function() {
- var t2 = this;
- return Object.getOwnPropertyNames(this.bean).map(function(e2) {
- return e2 + "=" + t2.bean[e2];
- }).join("&");
- }, enumerable: false, configurable: true }), U.prototype.reportSpeed = function(e2) {
- var t2, n2, o2, i2, r2;
- 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) {
- var t3;
- null != (t3 = i2[e3.type]) && t3.push(e3);
- }) : 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 });
- }, U.prototype.retcode = function(e2) {
- var t2 = this;
- "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() {
- t2.reportSpeed(A), A = [];
- }, 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");
- }, U.prototype.uploadLogs = function(e2, t2) {
- this.lifeCycle.emit("uploadLogs", e2 = void 0 === e2 ? {} : e2, t2 = void 0 === t2 ? {} : t2);
- }, U.prototype.getOfflineLog = function() {
- }, U.prototype.uploadOfflineLogs = function(e2) {
- }, U.prototype.getCurrentPageUrl = function(e2) {
- e2 = e2.pageUrl || (null == (e2 = null == (e2 = this.weex) ? void 0 : e2.config) ? void 0 : e2.bundleUrl) || "";
- return encodeURIComponent(e2.slice(0, 2048));
- }, U.sessionID = "session-" + Date.now(), U), S = new L({ name: "aid", onNewAegis: function(t2) {
- var e2, n2 = this;
- this.aid && true !== this.aid ? (t2.bean.aid = this.aid, t2.config.aid = this.aid) : e2 = setTimeout(function() {
- n2.getAid(function(e3) {
- n2.aid = e3, t2.bean.aid = n2.aid, t2.config.aid = n2.aid;
- }), clearTimeout(e2);
- }, 0);
- }, getAid: function(n2) {
- return s(this, void 0, void 0, function() {
- var t2;
- return f(this, function(e2) {
- switch (e2.label) {
- case 0:
- return e2.trys.push([0, 2, , 3]), [4, localStorage.getItem("AEGIS_ID")];
- case 1:
- return (t2 = e2.sent()) || (t2 = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) {
- var t3 = 16 * Math.random() | 0;
- return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16);
- }), localStorage.setItem("AEGIS_ID", t2)), null != n2 && n2(t2 || ""), [3, 3];
- case 2:
- return e2.sent(), null != n2 && n2(""), [3, 3];
- case 3:
- return [2];
- }
- });
- });
- } }), oe = new L({ name: "onError", listening: false, init: function() {
- this.startListen();
- }, startListen: function() {
- var t2 = this;
- if (!this.listening) {
- this.listening = true;
- try {
- var n2, e2 = Vue;
- void 0 !== e2 && e2 && (n2 = e2.config.errorHandler, e2.config.errorHandler = function(e3) {
- e3 && t2.publishErrorLog({ msg: e3, level: b.ERROR }), "function" == typeof n2 && n2(e3);
- });
- } catch (t3) {
- this.publishErrorLog({ msg: t3, level: b.ERROR });
- }
- }
- }, publishErrorLog: function(t2) {
- this.$walk(function(e2) {
- e2.normalLogPipeline(t2);
- });
- } }), L = new L({ name: "reportApiSpeed", override: false, fetch: null, weexFetch: null, onNewAegis: function(e2) {
- var t2, n2;
- 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);
- }, publishSpeed: function(t2) {
- this.$walk(function(e2) {
- e2.speedLogPipeline(t2);
- });
- }, publishNormalLog: function(t2) {
- this.$walk(function(e2) {
- e2.normalLogPipeline(t2);
- });
- }, overrideFetch: function(u2) {
- var e2, t2, l2, n2, f2 = this;
- if ("function" == typeof this.fetch)
- return e2 = this.fetch, t2 = this.weexFetch, l2 = function(r2, s2, l3, a2) {
- var c2, e3, t3, n3;
- 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) {
- return -1 !== String(t3).indexOf(e4);
- })) ? "static" : "fetch"), "fetch" === e3 ? r2.clone().text().then(function(e4) {
- var t4 = function(e5, t5, n5) {
- var o3, i3;
- try {
- if ("function" == typeof (null == t5 ? void 0 : t5.retCodeHandler))
- 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 };
- "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) {
- return e6.toLowerCase();
- })));
- var r3, s3 = Object.getOwnPropertyNames(e5).filter(function(e6) {
- return -1 !== $.indexOf(e6.toLowerCase());
- });
- return s3.length ? { code: "" + (r3 = e5[s3[0]]), isErr: 0 !== r3 && "0" !== r3 } : { code: "unknown", isErr: false };
- } catch (e6) {
- return { code: "unknown", isErr: false };
- }
- }(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;
- 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 });
- }) : 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));
- }, n2 = function(e3, t3, n3, o2) {
- var i2;
- 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;
- }, { fetch: function(o2, i2) {
- var r2 = Date.now();
- return e2(o2, i2).then(function(e3) {
- var t3 = Date.now() - r2, n3 = e3;
- try {
- l2(n3, t3, o2, i2);
- } catch (e4) {
- }
- return e3;
- }).catch(function(e3) {
- var t3 = Date.now() - r2;
- try {
- n2(e3, t3, o2, i2);
- } catch (e4) {
- }
- throw e3;
- });
- }, weexFetch: function(o2, i2, e3) {
- var r2 = o2.url, s2 = Date.now();
- try {
- t2(o2, function(e4) {
- var t3 = Date.now() - s2, n3 = j(e4);
- try {
- l2(n3, t3, r2, o2);
- } catch (e5) {
- }
- "function" == typeof i2 && i2(e4);
- }, e3);
- } catch (i3) {
- e3 = Date.now() - s2;
- try {
- n2(i3, e3, r2, o2);
- } catch (o3) {
- }
- throw i3;
- }
- } };
- } });
- function U(e2) {
- var s2, l2 = V.call(this, e2) || this;
- l2.weex = ne, l2.originRequest = J, l2.fetch = J, l2.weexFetch = C, l2.speedLogPipeline = y([(s2 = l2.config, function(e3, t2) {
- var n2, o2, i2, r2 = "number" == typeof s2.repeat ? s2.repeat : 60;
- !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) {
- var t3 = !o2[e4.url] || o2[e4.url] < r2;
- return t3 ? (o2[e4.url] = 1 + ~~o2[e4.url], P[n2] = o2) : E[n2] || T(n2), t3;
- })).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));
- }), m(l2), function(e3, t2) {
- l2.lifeCycle.emit("beforeReportSpeed", e3);
- var n2 = l2.config.beforeReportSpeed;
- if ((e3 = "function" == typeof n2 ? e3.filter(function(e4) {
- return false !== n2(e4);
- }) : e3).length)
- return t2(e3);
- }, function(e3) {
- l2.reportSpeed(e3);
- }]), l2.request = function(o2, i2, r2) {
- var e3, t2, n2, s3;
- 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) {
- var t3 = n2[e4];
- return e4 + "=" + ("string" == typeof t3 ? encodeURIComponent(t3) : encodeURIComponent(JSON.stringify(t3)));
- }).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) {
- var t3, n3;
- 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);
- }).catch(function(e4) {
- null != r2 && r2(e4);
- }));
- };
- try {
- 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 || ""));
- } catch (e3) {
- 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);
- }
- return l2;
- }
- function ie() {
- this.constructor = t;
- }
- function I(e2) {
- 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;
- }
- function N(e2) {
- var n2, t2, o2, i2, s2, r2, l2, a2, c2, u2, f2, p2, d2, h2, g2 = this;
- 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) {
- var o3 = n2.config;
- t3(e3 = e3.map(function(e4) {
- var t4, n3 = o3.maxLength || 102400;
- try {
- if (!e4.msg || e4.msg.length <= n3)
- return e4;
- e4.msg = null == (t4 = e4.msg) ? void 0 : t4.substring(0, n3);
- } catch (t5) {
- e4.msg = w(e4.msg).substring(0, o3.maxLength);
- }
- return e4;
- }));
- }, (h2 = (n2 = this).config, function(e3, t3) {
- var n3 = "number" == typeof h2.repeat ? h2.repeat : 60;
- if (n3 <= 0)
- return t3(e3);
- var o3 = (null == h2 ? void 0 : h2.id) + "_error", i3 = P[o3] || {};
- t3(e3.filter(function(e4) {
- 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) {
- e4 = e4.msg.slice(0, 200);
- if (i3[e4] > n3)
- return E[o3] || T(o3), false;
- i3[e4] = 1 + ~~i3[e4], P[o3] = i3;
- }
- return true;
- }));
- }), (p2 = this.lifeCycle.emit, d2 = this.config, function(e3, t3) {
- var n3, o3 = d2.logCreated;
- return "function" == typeof o3 ? (n3 = e3.filter(function(e4) {
- return false !== o3(e4);
- }), p2("beforeWrite", n3), t3(n3)) : (p2("beforeWrite", e3), t3(e3));
- }), (f2 = this, setTimeout(function() {
- 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;
- n3 && e3 !== f2.originFireUrl && (f2.sendPipeline([function(e4, t3) {
- t3({ url: n3, type: O.PV });
- }], O.PV)(null), e3) && location && (f2.originFireUrl = e3);
- }, 100), function(e3, t3) {
- t3(e3);
- }), (c2 = a2 = l2 = false, u2 = [], (s2 = this).lifeCycle.on("onConfigChange", function() {
- r2 && clearTimeout(r2), r2 = setTimeout(function() {
- var e3, n3;
- !c2 && s2.config && (c2 = true, e3 = s2.config.whiteListUrl, (n3 = void 0 === e3 ? "" : e3) && s2.sendPipeline([function(e4, t3) {
- t3({ url: n3, type: O.WHITE_LIST, success: function(e5) {
- a2 = true;
- try {
- 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() {
- }) : !s2.isWhiteList && u2.length && (u2.length = 0), s2.config.onWhitelist);
- "function" == typeof r3 && r3(l2);
- } catch (e6) {
- }
- }, fail: function() {
- a2 = true;
- } });
- }], O.WHITE_LIST)(null), c2 = false);
- }, s2.config.uin ? 50 : 500);
- }), s2.lifeCycle.on("destroy", function() {
- u2.length = 0;
- }), function(e3, t3) {
- var n3;
- l2 || null != (n3 = null == (n3 = s2.config) ? void 0 : n3.api) && n3.reportRequest ? t3(e3.concat(u2.splice(0)).map(function(e4) {
- return Y(e4), e4;
- })) : (n3 = e3.filter(function(e4) {
- return e4.level !== b.INFO && e4.level !== b.API_RESPONSE ? (Y(e4), true) : (a2 || (u2.push(e4), 200 <= u2.length && (u2.length = 200)), false);
- })).length && t3(n3);
- }), function(e3, t3) {
- try {
- var n3 = JSON.parse(JSON.stringify(e3)), o3 = (g2.lifeCycle.emit("beforeReport", n3), g2.config.beforeReport);
- (e3 = "function" == typeof o3 ? e3.filter(function(e4) {
- return false !== o3(e4);
- }) : e3).length && t3(e3);
- } catch (e4) {
- }
- }, Z(this)]), this.eventPipeline = y([m(this, 10), (i2 = this, function(e3) {
- i2.sendPipeline([function(e4, t3) {
- var n3 = e4.map(function(e5) {
- return { name: e5.name, ext1: e5.ext1 || i2.config.ext1 || "", ext2: e5.ext2 || i2.config.ext2 || "", ext3: e5.ext3 || i2.config.ext3 || "" };
- });
- t3({ url: i2.config.eventUrl + "?payload=" + encodeURIComponent(JSON.stringify(n3)), type: O.EVENT, log: e4 });
- }], O.EVENT)(e3);
- })]), this.timeMap = {}, this.failRequestCount = 0, this.customTimePipeline = y([m(this, 10), (o2 = this, function(e3) {
- return o2.sendPipeline([function(e4, t3) {
- t3({ url: o2.config.customTimeUrl + "?payload=" + encodeURIComponent(JSON.stringify({ custom: e4 })), type: O.CUSTOM, log: e4 });
- }], O.CUSTOM)(e3);
- })]), 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);
- }
- return r.use(oe), r.use(L), r.use(S), r;
- });
- })(aegis_min);
- var appId = 1400825410;
- uni.$TUIKit = TIM.create({
- SDKAppID: appId
- });
- uni.$TIM = TIM;
- uni.$TUIKit.registerPlugin({
- "tim-upload-plugin": TIMUploadPlugin
- });
- uni.$TUIKit.TUIConversationServer = new TUIConversationServer();
- uni.$TUIKit.TUIProfileServer = new TUIProfileServer();
- require("./wxcomponents/TUICallKit/TUICallKit/serve/callManager");
- const _sfc_main = {
- onLaunch: function() {
- this.bindTIMEvent();
- uni.$on("refreshIM", () => {
- this.checkLogin();
- });
- },
- onUnload() {
- },
- onShow() {
- uni.getSystemInfo({
- success: (result) => {
- result.statusBarHeight + "px";
- },
- fail: (error2) => {
- formatAppLog("log", "at App.vue:93", error2);
- }
- });
- },
- methods: {
- checkLogin() {
- checkLogin().then(
- (res) => {
- if (res.code == 200) {
- this.imLogin(res.userId);
- }
- },
- (rej) => {
- }
- );
- },
- imLogin(userId) {
- var uid = "U-" + userId;
- var data = { userId: uid };
- getTlsSig(data).then(
- (res) => {
- formatAppLog("log", "at App.vue:127", data);
- if (res.code == 200) {
- var sign = res.data;
- uni.setStorageSync("sign", sign);
- uni.$chat_SDKAppID = appId;
- uni.$chat_userID = uid;
- uni.$chat_userSig = sign;
- uni.$TUIKit.login({ userID: uid, userSig: sign }).then((res2) => {
- formatAppLog("log", "at App.vue:137", "im登录成功");
- });
- } else {
- uni.showToast({
- icon: "none",
- title: "请求失败"
- });
- }
- },
- (rej) => {
- }
- );
- },
- bindTIMEvent() {
- uni.$TUIKit.on(uni.$TIM.EVENT.SDK_READY, this.handleSDKReady);
- uni.$TUIKit.on(uni.$TIM.EVENT.SDK_NOT_READY, this.handleSDKNotReady);
- uni.$TUIKit.on(uni.$TIM.EVENT.KICKED_OUT, this.handleKickedOut);
- },
- // sdk ready 以后可调用 API
- handleSDKReady(event) {
- uni.$chat_isSDKReady = true;
- uni.getStorageSync("userId");
- var avatar = uni.getStorageSync("avatar");
- var nickName = uni.getStorageSync("nickName");
- formatAppLog("log", "at App.vue:162", avatar);
- uni.$TUIKit.updateMyProfile({
- nick: nickName,
- avatar,
- gender: TIM.TYPES.GENDER_MALE,
- selfSignature: "我的个性签名",
- allowType: TIM.TYPES.ALLOW_TYPE_ALLOW_ANY
- }).then((res) => {
- formatAppLog("log", "at App.vue:171", "个人信息修改成功");
- });
- uni.$emit("refreshMsgCount");
- },
- handleSDKNotReady(event) {
- formatAppLog("log", "at App.vue:185", "SDK没有准备" + event);
- },
- handleKickedOut(event) {
- uni.clearStorageSync();
- uni.showToast({
- title: `${this.kickedOutReason(event.data.type)}被踢出。`,
- icon: "none"
- });
- },
- kickedOutReason(type2) {
- switch (type2) {
- case uni.$TIM.TYPES.KICKED_OUT_MULT_ACCOUNT:
- return "多实例登录";
- case uni.$TIM.TYPES.KICKED_OUT_MULT_DEVICE:
- return "多设备登录";
- case uni.$TIM.TYPES.KICKED_OUT_USERSIG_EXPIRED:
- return "userSig 过期";
- case uni.$TIM.TIM.TYPES.KICKED_OUT_REST_API:
- return "REST API kick 接口踢出";
- default:
- return "";
- }
- }
- }
- };
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/Project/2023/问诊平台/his_user_app/App.vue"]]);
- const { toString } = Object.prototype;
- function isArray(val) {
- return toString.call(val) === "[object Array]";
- }
- function isObject(val) {
- return val !== null && typeof val === "object";
- }
- function isDate(val) {
- return toString.call(val) === "[object Date]";
- }
- function isURLSearchParams(val) {
- return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
- }
- function forEach(obj, fn) {
- if (obj === null || typeof obj === "undefined") {
- return;
- }
- if (typeof obj !== "object") {
- obj = [obj];
- }
- if (isArray(obj)) {
- for (let i = 0, l = obj.length; i < l; i++) {
- fn.call(null, obj[i], i, obj);
- }
- } else {
- for (const key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- fn.call(null, obj[key], key, obj);
- }
- }
- }
- }
- function isPlainObject(obj) {
- return Object.prototype.toString.call(obj) === "[object Object]";
- }
- function deepMerge$1() {
- const result = {};
- function assignValue(val, key) {
- if (typeof result[key] === "object" && typeof val === "object") {
- result[key] = deepMerge$1(result[key], val);
- } else if (typeof val === "object") {
- result[key] = deepMerge$1({}, val);
- } else {
- result[key] = val;
- }
- }
- for (let i = 0, l = arguments.length; i < l; i++) {
- forEach(arguments[i], assignValue);
- }
- return result;
- }
- function isUndefined(val) {
- return typeof val === "undefined";
- }
- function encode(val) {
- return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function buildURL(url2, params) {
- if (!params) {
- return url2;
- }
- let serializedParams;
- if (isURLSearchParams(params)) {
- serializedParams = params.toString();
- } else {
- const parts = [];
- forEach(params, (val, key) => {
- if (val === null || typeof val === "undefined") {
- return;
- }
- if (isArray(val)) {
- key = `${key}[]`;
- } else {
- val = [val];
- }
- forEach(val, (v) => {
- if (isDate(v)) {
- v = v.toISOString();
- } else if (isObject(v)) {
- v = JSON.stringify(v);
- }
- parts.push(`${encode(key)}=${encode(v)}`);
- });
- });
- serializedParams = parts.join("&");
- }
- if (serializedParams) {
- const hashmarkIndex = url2.indexOf("#");
- if (hashmarkIndex !== -1) {
- url2 = url2.slice(0, hashmarkIndex);
- }
- url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
- }
- return url2;
- }
- function isAbsoluteURL(url2) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
- }
- function combineURLs(baseURL, relativeURL) {
- return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
- }
- function buildFullPath(baseURL, requestedURL) {
- if (baseURL && !isAbsoluteURL(requestedURL)) {
- return combineURLs(baseURL, requestedURL);
- }
- return requestedURL;
- }
- function settle(resolve, reject2, response) {
- const { validateStatus } = response.config;
- const status = response.statusCode;
- if (status && (!validateStatus || validateStatus(status))) {
- resolve(response);
- } else {
- reject2(response);
- }
- }
- const mergeKeys$1 = (keys, config2) => {
- const config3 = {};
- keys.forEach((prop) => {
- if (!isUndefined(config2[prop])) {
- config3[prop] = config2[prop];
- }
- });
- return config3;
- };
- const adapter = (config2) => new Promise((resolve, reject2) => {
- const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
- const _config = {
- url: fullPath,
- header: config2.header,
- complete: (response) => {
- config2.fullPath = fullPath;
- response.config = config2;
- try {
- if (typeof response.data === "string") {
- response.data = JSON.parse(response.data);
- }
- } catch (e) {
- }
- settle(resolve, reject2, response);
- }
- };
- let requestTask;
- if (config2.method === "UPLOAD") {
- delete _config.header["content-type"];
- delete _config.header["Content-Type"];
- const otherConfig = {
- filePath: config2.filePath,
- name: config2.name
- };
- const optionalKeys = [
- "files",
- "timeout",
- "formData"
- ];
- requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
- } else if (config2.method === "DOWNLOAD") {
- if (!isUndefined(config2.timeout)) {
- _config.timeout = config2.timeout;
- }
- requestTask = uni.downloadFile(_config);
- } else {
- const optionalKeys = [
- "data",
- "method",
- "timeout",
- "dataType",
- "responseType",
- "sslVerify",
- "firstIpv4"
- ];
- requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
- }
- if (config2.getTask) {
- config2.getTask(requestTask, config2);
- }
- });
- const dispatchRequest = (config2) => adapter(config2);
- function InterceptorManager() {
- this.handlers = [];
- }
- InterceptorManager.prototype.use = function use(fulfilled, rejected) {
- this.handlers.push({
- fulfilled,
- rejected
- });
- return this.handlers.length - 1;
- };
- InterceptorManager.prototype.eject = function eject(id) {
- if (this.handlers[id]) {
- this.handlers[id] = null;
- }
- };
- InterceptorManager.prototype.forEach = function forEach2(fn) {
- this.handlers.forEach((h) => {
- if (h !== null) {
- fn(h);
- }
- });
- };
- const mergeKeys = (keys, globalsConfig, config2) => {
- const config3 = {};
- keys.forEach((prop) => {
- if (!isUndefined(config2[prop])) {
- config3[prop] = config2[prop];
- } else if (!isUndefined(globalsConfig[prop])) {
- config3[prop] = globalsConfig[prop];
- }
- });
- return config3;
- };
- const mergeConfig = (globalsConfig, config2 = {}) => {
- const method = config2.method || globalsConfig.method || "GET";
- let config3 = {
- baseURL: globalsConfig.baseURL || "",
- method,
- url: config2.url || "",
- params: config2.params || {},
- custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
- header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
- };
- const defaultToConfig2Keys = ["getTask", "validateStatus"];
- config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
- if (method === "DOWNLOAD") {
- if (!isUndefined(config2.timeout)) {
- config3.timeout = config2.timeout;
- } else if (!isUndefined(globalsConfig.timeout)) {
- config3.timeout = globalsConfig.timeout;
- }
- } else if (method === "UPLOAD") {
- delete config3.header["content-type"];
- delete config3.header["Content-Type"];
- const uploadKeys = [
- "files",
- "filePath",
- "name",
- "timeout",
- "formData"
- ];
- uploadKeys.forEach((prop) => {
- if (!isUndefined(config2[prop])) {
- config3[prop] = config2[prop];
- }
- });
- if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) {
- config3.timeout = globalsConfig.timeout;
- }
- } else {
- const defaultsKeys = [
- "data",
- "timeout",
- "dataType",
- "responseType",
- "sslVerify",
- "firstIpv4"
- ];
- config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
- }
- return config3;
- };
- const defaults = {
- baseURL: "",
- header: {},
- method: "GET",
- dataType: "json",
- responseType: "text",
- custom: {},
- timeout: 6e4,
- sslVerify: true,
- firstIpv4: false,
- validateStatus: function validateStatus(status) {
- return status >= 200 && status < 300;
- }
- };
- var clone = function() {
- function _instanceof(obj, type2) {
- return type2 != null && obj instanceof type2;
- }
- var nativeMap;
- try {
- nativeMap = Map;
- } catch (_) {
- nativeMap = function() {
- };
- }
- var nativeSet;
- try {
- nativeSet = Set;
- } catch (_) {
- nativeSet = function() {
- };
- }
- var nativePromise;
- try {
- nativePromise = Promise;
- } catch (_) {
- nativePromise = function() {
- };
- }
- function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
- if (typeof circular === "object") {
- depth = circular.depth;
- prototype = circular.prototype;
- includeNonEnumerable = circular.includeNonEnumerable;
- circular = circular.circular;
- }
- var allParents = [];
- var allChildren = [];
- var useBuffer = typeof Buffer != "undefined";
- if (typeof circular == "undefined")
- circular = true;
- if (typeof depth == "undefined")
- depth = Infinity;
- function _clone(parent2, depth2) {
- if (parent2 === null)
- return null;
- if (depth2 === 0)
- return parent2;
- var child;
- var proto;
- if (typeof parent2 != "object") {
- return parent2;
- }
- if (_instanceof(parent2, nativeMap)) {
- child = new nativeMap();
- } else if (_instanceof(parent2, nativeSet)) {
- child = new nativeSet();
- } else if (_instanceof(parent2, nativePromise)) {
- child = new nativePromise(function(resolve, reject2) {
- parent2.then(function(value2) {
- resolve(_clone(value2, depth2 - 1));
- }, function(err) {
- reject2(_clone(err, depth2 - 1));
- });
- });
- } else if (clone2.__isArray(parent2)) {
- child = [];
- } else if (clone2.__isRegExp(parent2)) {
- child = new RegExp(parent2.source, __getRegExpFlags(parent2));
- if (parent2.lastIndex)
- child.lastIndex = parent2.lastIndex;
- } else if (clone2.__isDate(parent2)) {
- child = new Date(parent2.getTime());
- } else if (useBuffer && Buffer.isBuffer(parent2)) {
- if (Buffer.from) {
- child = Buffer.from(parent2);
- } else {
- child = new Buffer(parent2.length);
- parent2.copy(child);
- }
- return child;
- } else if (_instanceof(parent2, Error)) {
- child = Object.create(parent2);
- } else {
- if (typeof prototype == "undefined") {
- proto = Object.getPrototypeOf(parent2);
- child = Object.create(proto);
- } else {
- child = Object.create(prototype);
- proto = prototype;
- }
- }
- if (circular) {
- var index2 = allParents.indexOf(parent2);
- if (index2 != -1) {
- return allChildren[index2];
- }
- allParents.push(parent2);
- allChildren.push(child);
- }
- if (_instanceof(parent2, nativeMap)) {
- parent2.forEach(function(value2, key) {
- var keyChild = _clone(key, depth2 - 1);
- var valueChild = _clone(value2, depth2 - 1);
- child.set(keyChild, valueChild);
- });
- }
- if (_instanceof(parent2, nativeSet)) {
- parent2.forEach(function(value2) {
- var entryChild = _clone(value2, depth2 - 1);
- child.add(entryChild);
- });
- }
- for (var i in parent2) {
- var attrs = Object.getOwnPropertyDescriptor(parent2, i);
- if (attrs) {
- child[i] = _clone(parent2[i], depth2 - 1);
- }
- try {
- var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
- if (objProperty.set === "undefined") {
- continue;
- }
- child[i] = _clone(parent2[i], depth2 - 1);
- } catch (e) {
- if (e instanceof TypeError) {
- continue;
- } else if (e instanceof ReferenceError) {
- continue;
- }
- }
- }
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(parent2);
- for (var i = 0; i < symbols.length; i++) {
- var symbol = symbols[i];
- var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
- if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
- continue;
- }
- child[symbol] = _clone(parent2[symbol], depth2 - 1);
- Object.defineProperty(child, symbol, descriptor);
- }
- }
- if (includeNonEnumerable) {
- var allPropertyNames = Object.getOwnPropertyNames(parent2);
- for (var i = 0; i < allPropertyNames.length; i++) {
- var propertyName = allPropertyNames[i];
- var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
- if (descriptor && descriptor.enumerable) {
- continue;
- }
- child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
- Object.defineProperty(child, propertyName, descriptor);
- }
- }
- return child;
- }
- return _clone(parent, depth);
- }
- clone2.clonePrototype = function clonePrototype(parent) {
- if (parent === null)
- return null;
- var c = function() {
- };
- c.prototype = parent;
- return new c();
- };
- function __objToStr(o) {
- return Object.prototype.toString.call(o);
- }
- clone2.__objToStr = __objToStr;
- function __isDate(o) {
- return typeof o === "object" && __objToStr(o) === "[object Date]";
- }
- clone2.__isDate = __isDate;
- function __isArray(o) {
- return typeof o === "object" && __objToStr(o) === "[object Array]";
- }
- clone2.__isArray = __isArray;
- function __isRegExp(o) {
- return typeof o === "object" && __objToStr(o) === "[object RegExp]";
- }
- clone2.__isRegExp = __isRegExp;
- function __getRegExpFlags(re) {
- var flags = "";
- if (re.global)
- flags += "g";
- if (re.ignoreCase)
- flags += "i";
- if (re.multiline)
- flags += "m";
- return flags;
- }
- clone2.__getRegExpFlags = __getRegExpFlags;
- return clone2;
- }();
- class Request {
- /**
- * @param {Object} arg - 全局配置
- * @param {String} arg.baseURL - 全局根路径
- * @param {Object} arg.header - 全局header
- * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
- * @param {String} arg.dataType = [json] - 全局默认的dataType
- * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
- * @param {Object} arg.custom - 全局默认的自定义参数
- * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
- * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
- * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
- * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
- * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
- */
- constructor(arg = {}) {
- if (!isPlainObject(arg)) {
- arg = {};
- formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object");
- }
- this.config = clone({ ...defaults, ...arg });
- this.interceptors = {
- request: new InterceptorManager(),
- response: new InterceptorManager()
- };
- }
- /**
- * @Function
- * @param {Request~setConfigCallback} f - 设置全局默认配置
- */
- setConfig(f) {
- this.config = f(this.config);
- }
- middleware(config2) {
- config2 = mergeConfig(this.config, config2);
- const chain = [dispatchRequest, void 0];
- let promise2 = Promise.resolve(config2);
- this.interceptors.request.forEach((interceptor) => {
- chain.unshift(interceptor.fulfilled, interceptor.rejected);
- });
- this.interceptors.response.forEach((interceptor) => {
- chain.push(interceptor.fulfilled, interceptor.rejected);
- });
- while (chain.length) {
- promise2 = promise2.then(chain.shift(), chain.shift());
- }
- return promise2;
- }
- /**
- * @Function
- * @param {Object} config - 请求配置项
- * @prop {String} options.url - 请求路径
- * @prop {Object} options.data - 请求参数
- * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
- * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
- * @prop {Object} [options.header = config.header] - 请求header
- * @prop {Object} [options.method = config.method] - 请求方法
- * @returns {Promise<unknown>}
- */
- request(config2 = {}) {
- return this.middleware(config2);
- }
- get(url2, options = {}) {
- return this.middleware({
- url: url2,
- method: "GET",
- ...options
- });
- }
- post(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "POST",
- ...options
- });
- }
- put(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "PUT",
- ...options
- });
- }
- delete(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "DELETE",
- ...options
- });
- }
- options(url2, data, options = {}) {
- return this.middleware({
- url: url2,
- data,
- method: "OPTIONS",
- ...options
- });
- }
- upload(url2, config2 = {}) {
- config2.url = url2;
- config2.method = "UPLOAD";
- return this.middleware(config2);
- }
- download(url2, config2 = {}) {
- config2.url = url2;
- config2.method = "DOWNLOAD";
- return this.middleware(config2);
- }
- }
- class Router {
- constructor() {
- this.config = {
- type: "navigateTo",
- url: "",
- delta: 1,
- // navigateBack页面后退时,回退的层数
- params: {},
- // 传递的参数
- animationType: "pop-in",
- // 窗口动画,只在APP有效
- animationDuration: 300,
- // 窗口动画持续时间,单位毫秒,只在APP有效
- intercept: false
- // 是否需要拦截
- };
- this.route = this.route.bind(this);
- }
- // 判断url前面是否有"/",如果没有则加上,否则无法跳转
- addRootPath(url2) {
- return url2[0] === "/" ? url2 : `/${url2}`;
- }
- // 整合路由参数
- mixinParam(url2, params) {
- url2 = url2 && this.addRootPath(url2);
- let query = "";
- if (/.*\/.*\?.*=.*/.test(url2)) {
- query = uni.$u.queryParams(params, false);
- return url2 += `&${query}`;
- }
- query = uni.$u.queryParams(params);
- return url2 += query;
- }
- // 对外的方法名称
- async route(options = {}, params = {}) {
- let mergeConfig2 = {};
- if (typeof options === "string") {
- mergeConfig2.url = this.mixinParam(options, params);
- mergeConfig2.type = "navigateTo";
- } else {
- mergeConfig2 = uni.$u.deepMerge(this.config, options);
- mergeConfig2.url = this.mixinParam(options.url, options.params);
- }
- if (mergeConfig2.url === uni.$u.page())
- return;
- if (params.intercept) {
- this.config.intercept = params.intercept;
- }
- mergeConfig2.params = params;
- mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2);
- if (typeof uni.$u.routeIntercept === "function") {
- const isNext = await new Promise((resolve, reject2) => {
- uni.$u.routeIntercept(mergeConfig2, resolve);
- });
- isNext && this.openPage(mergeConfig2);
- } else {
- this.openPage(mergeConfig2);
- }
- }
- // 执行路由跳转
- openPage(config2) {
- const {
- url: url2,
- type: type2,
- delta,
- animationType,
- animationDuration
- } = config2;
- if (config2.type == "navigateTo" || config2.type == "to") {
- uni.navigateTo({
- url: url2,
- animationType,
- animationDuration
- });
- }
- if (config2.type == "redirectTo" || config2.type == "redirect") {
- uni.redirectTo({
- url: url2
- });
- }
- if (config2.type == "switchTab" || config2.type == "tab") {
- uni.switchTab({
- url: url2
- });
- }
- if (config2.type == "reLaunch" || config2.type == "launch") {
- uni.reLaunch({
- url: url2
- });
- }
- if (config2.type == "navigateBack" || config2.type == "back") {
- uni.navigateBack({
- delta
- });
- }
- }
- }
- const route = new Router().route;
- function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
- const startRGB = hexToRgb(startColor, false);
- const startR = startRGB[0];
- const startG = startRGB[1];
- const startB = startRGB[2];
- const endRGB = hexToRgb(endColor, false);
- const endR = endRGB[0];
- const endG = endRGB[1];
- const endB = endRGB[2];
- const sR = (endR - startR) / step;
- const sG = (endG - startG) / step;
- const sB = (endB - startB) / step;
- const colorArr = [];
- for (let i = 0; i < step; i++) {
- let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
- if (i === 0)
- hex = rgbToHex(startColor);
- if (i === step - 1)
- hex = rgbToHex(endColor);
- colorArr.push(hex);
- }
- return colorArr;
- }
- function hexToRgb(sColor, str = true) {
- const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
- sColor = String(sColor).toLowerCase();
- if (sColor && reg.test(sColor)) {
- if (sColor.length === 4) {
- let sColorNew = "#";
- for (let i = 1; i < 4; i += 1) {
- sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
- }
- sColor = sColorNew;
- }
- const sColorChange = [];
- for (let i = 1; i < 7; i += 2) {
- sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
- }
- if (!str) {
- return sColorChange;
- }
- return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
- }
- if (/^(rgb|RGB)/.test(sColor)) {
- const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
- return arr.map((val) => Number(val));
- }
- return sColor;
- }
- function rgbToHex(rgb) {
- const _this = rgb;
- const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
- if (/^(rgb|RGB)/.test(_this)) {
- const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
- let strHex = "#";
- for (let i = 0; i < aColor.length; i++) {
- let hex = Number(aColor[i]).toString(16);
- hex = String(hex).length == 1 ? `${0}${hex}` : hex;
- if (hex === "0") {
- hex += hex;
- }
- strHex += hex;
- }
- if (strHex.length !== 7) {
- strHex = _this;
- }
- return strHex;
- }
- if (reg.test(_this)) {
- const aNum = _this.replace(/#/, "").split("");
- if (aNum.length === 6) {
- return _this;
- }
- if (aNum.length === 3) {
- let numHex = "#";
- for (let i = 0; i < aNum.length; i += 1) {
- numHex += aNum[i] + aNum[i];
- }
- return numHex;
- }
- } else {
- return _this;
- }
- }
- function colorToRgba(color2, alpha) {
- color2 = rgbToHex(color2);
- const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
- let sColor = String(color2).toLowerCase();
- if (sColor && reg.test(sColor)) {
- if (sColor.length === 4) {
- let sColorNew = "#";
- for (let i = 1; i < 4; i += 1) {
- sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
- }
- sColor = sColorNew;
- }
- const sColorChange = [];
- for (let i = 1; i < 7; i += 2) {
- sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
- }
- return `rgba(${sColorChange.join(",")},${alpha})`;
- }
- return sColor;
- }
- const colorGradient$1 = {
- colorGradient,
- hexToRgb,
- rgbToHex,
- colorToRgba
- };
- function email(value2) {
- return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
- }
- function mobile(value2) {
- return /^1[23456789]\d{9}$/.test(value2);
- }
- function url(value2) {
- return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2);
- }
- function date(value2) {
- if (!value2)
- return false;
- if (number(value2))
- value2 = +value2;
- return !/Invalid|NaN/.test(new Date(value2).toString());
- }
- function dateISO(value2) {
- return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
- }
- function number(value2) {
- return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
- }
- function string(value2) {
- return typeof value2 === "string";
- }
- function digits(value2) {
- return /^\d+$/.test(value2);
- }
- function idCard(value2) {
- return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
- value2
- );
- }
- function carNo(value2) {
- const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
- const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
- if (value2.length === 7) {
- return creg.test(value2);
- }
- if (value2.length === 8) {
- return xreg.test(value2);
- }
- return false;
- }
- function amount(value2) {
- return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
- }
- function chinese(value2) {
- const reg = /^[\u4e00-\u9fa5]+$/gi;
- return reg.test(value2);
- }
- function letter(value2) {
- return /^[a-zA-Z]*$/.test(value2);
- }
- function enOrNum(value2) {
- const reg = /^[0-9a-zA-Z]*$/g;
- return reg.test(value2);
- }
- function contains(value2, param) {
- return value2.indexOf(param) >= 0;
- }
- function range$1(value2, param) {
- return value2 >= param[0] && value2 <= param[1];
- }
- function rangeLength(value2, param) {
- return value2.length >= param[0] && value2.length <= param[1];
- }
- function landline(value2) {
- const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
- return reg.test(value2);
- }
- function empty(value2) {
- switch (typeof value2) {
- case "undefined":
- return true;
- case "string":
- if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
- return true;
- break;
- case "boolean":
- if (!value2)
- return true;
- break;
- case "number":
- if (value2 === 0 || isNaN(value2))
- return true;
- break;
- case "object":
- if (value2 === null || value2.length === 0)
- return true;
- for (const i in value2) {
- return false;
- }
- return true;
- }
- return false;
- }
- function jsonString(value2) {
- if (typeof value2 === "string") {
- try {
- const obj = JSON.parse(value2);
- if (typeof obj === "object" && obj) {
- return true;
- }
- return false;
- } catch (e) {
- return false;
- }
- }
- return false;
- }
- function array(value2) {
- if (typeof Array.isArray === "function") {
- return Array.isArray(value2);
- }
- return Object.prototype.toString.call(value2) === "[object Array]";
- }
- function object(value2) {
- return Object.prototype.toString.call(value2) === "[object Object]";
- }
- function code(value2, len = 6) {
- return new RegExp(`^\\d{${len}}$`).test(value2);
- }
- function func(value2) {
- return typeof value2 === "function";
- }
- function promise(value2) {
- return object(value2) && func(value2.then) && func(value2.catch);
- }
- function image(value2) {
- const newValue = value2.split("?")[0];
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
- return IMAGE_REGEXP.test(newValue);
- }
- function video(value2) {
- const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
- return VIDEO_REGEXP.test(value2);
- }
- function regExp(o) {
- return o && Object.prototype.toString.call(o) === "[object RegExp]";
- }
- const test = {
- email,
- mobile,
- url,
- date,
- dateISO,
- number,
- digits,
- idCard,
- carNo,
- amount,
- chinese,
- letter,
- enOrNum,
- contains,
- range: range$1,
- rangeLength,
- empty,
- isEmpty: empty,
- jsonString,
- landline,
- object,
- array,
- code,
- func,
- promise,
- video,
- image,
- regExp,
- string
- };
- let timeout = null;
- function debounce(func2, wait = 500, immediate = false) {
- if (timeout !== null)
- clearTimeout(timeout);
- if (immediate) {
- const callNow = !timeout;
- timeout = setTimeout(() => {
- timeout = null;
- }, wait);
- if (callNow)
- typeof func2 === "function" && func2();
- } else {
- timeout = setTimeout(() => {
- typeof func2 === "function" && func2();
- }, wait);
- }
- }
- let flag;
- function throttle(func2, wait = 500, immediate = true) {
- if (immediate) {
- if (!flag) {
- flag = true;
- typeof func2 === "function" && func2();
- setTimeout(() => {
- flag = false;
- }, wait);
- }
- } else if (!flag) {
- flag = true;
- setTimeout(() => {
- flag = false;
- typeof func2 === "function" && func2();
- }, wait);
- }
- }
- function strip(num, precision = 15) {
- return +parseFloat(Number(num).toPrecision(precision));
- }
- function digitLength(num) {
- const eSplit = num.toString().split(/[eE]/);
- const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
- return len > 0 ? len : 0;
- }
- function float2Fixed(num) {
- if (num.toString().indexOf("e") === -1) {
- return Number(num.toString().replace(".", ""));
- }
- const dLen = digitLength(num);
- return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
- }
- function checkBoundary(num) {
- {
- if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
- formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
- }
- }
- }
- function iteratorOperation(arr, operation) {
- const [num1, num2, ...others] = arr;
- let res = operation(num1, num2);
- others.forEach((num) => {
- res = operation(res, num);
- });
- return res;
- }
- function times(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, times);
- }
- const [num1, num2] = nums;
- const num1Changed = float2Fixed(num1);
- const num2Changed = float2Fixed(num2);
- const baseNum = digitLength(num1) + digitLength(num2);
- const leftValue = num1Changed * num2Changed;
- checkBoundary(leftValue);
- return leftValue / Math.pow(10, baseNum);
- }
- function divide(...nums) {
- if (nums.length > 2) {
- return iteratorOperation(nums, divide);
- }
- const [num1, num2] = nums;
- const num1Changed = float2Fixed(num1);
- const num2Changed = float2Fixed(num2);
- checkBoundary(num1Changed);
- checkBoundary(num2Changed);
- return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
- }
- function round(num, ratio) {
- const base = Math.pow(10, ratio);
- let result = divide(Math.round(Math.abs(times(num, base))), base);
- if (num < 0 && result !== 0) {
- result = times(result, -1);
- }
- return result;
- }
- function range(min = 0, max = 0, value2 = 0) {
- return Math.max(min, Math.min(max, Number(value2)));
- }
- function getPx(value2, unit = false) {
- if (test.number(value2)) {
- return unit ? `${value2}px` : Number(value2);
- }
- if (/(rpx|upx)$/.test(value2)) {
- return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2)));
- }
- return unit ? `${parseInt(value2)}px` : parseInt(value2);
- }
- function sleep(value2 = 30) {
- return new Promise((resolve) => {
- setTimeout(() => {
- resolve();
- }, value2);
- });
- }
- function os() {
- return uni.getSystemInfoSync().platform.toLowerCase();
- }
- function sys() {
- return uni.getSystemInfoSync();
- }
- function random(min, max) {
- if (min >= 0 && max > 0 && max >= min) {
- const gab = max - min + 1;
- return Math.floor(Math.random() * gab + min);
- }
- return 0;
- }
- function guid(len = 32, firstU = true, radix = null) {
- const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
- const uuid = [];
- radix = radix || chars.length;
- if (len) {
- for (let i = 0; i < len; i++)
- uuid[i] = chars[0 | Math.random() * radix];
- } else {
- let r;
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
- uuid[14] = "4";
- for (let i = 0; i < 36; i++) {
- if (!uuid[i]) {
- r = 0 | Math.random() * 16;
- uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
- }
- }
- }
- if (firstU) {
- uuid.shift();
- return `u${uuid.join("")}`;
- }
- return uuid.join("");
- }
- function $parent(name = void 0) {
- let parent = this.$parent;
- while (parent) {
- if (parent.$options && parent.$options.name !== name) {
- parent = parent.$parent;
- } else {
- return parent;
- }
- }
- return false;
- }
- function addStyle(customStyle, target = "object") {
- if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
- return customStyle;
- }
- if (target === "object") {
- customStyle = trim(customStyle);
- const styleArray = customStyle.split(";");
- const style = {};
- for (let i = 0; i < styleArray.length; i++) {
- if (styleArray[i]) {
- const item = styleArray[i].split(":");
- style[trim(item[0])] = trim(item[1]);
- }
- }
- return style;
- }
- let string2 = "";
- for (const i in customStyle) {
- const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
- string2 += `${key}:${customStyle[i]};`;
- }
- return trim(string2);
- }
- function addUnit(value2 = "auto", unit = "") {
- if (!unit) {
- unit = uni.$u.config.unit || "px";
- }
- value2 = String(value2);
- return test.number(value2) ? `${value2}${unit}` : value2;
- }
- function deepClone(obj) {
- if ([null, void 0, NaN, false].includes(obj))
- return obj;
- if (typeof obj !== "object" && typeof obj !== "function") {
- return obj;
- }
- const o = test.array(obj) ? [] : {};
- for (const i in obj) {
- if (obj.hasOwnProperty(i)) {
- o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
- }
- }
- return o;
- }
- function deepMerge(target = {}, source = {}) {
- target = deepClone(target);
- if (typeof target !== "object" || typeof source !== "object")
- return false;
- for (const prop in source) {
- if (!source.hasOwnProperty(prop))
- continue;
- if (prop in target) {
- if (typeof target[prop] !== "object") {
- target[prop] = source[prop];
- } else if (typeof source[prop] !== "object") {
- target[prop] = source[prop];
- } else if (target[prop].concat && source[prop].concat) {
- target[prop] = target[prop].concat(source[prop]);
- } else {
- target[prop] = deepMerge(target[prop], source[prop]);
- }
- } else {
- target[prop] = source[prop];
- }
- }
- return target;
- }
- function error(err) {
- {
- formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:238", `uView提示:${err}`);
- }
- }
- function randomArray(array3 = []) {
- return array3.sort(() => Math.random() - 0.5);
- }
- if (!String.prototype.padStart) {
- String.prototype.padStart = function(maxLength, fillString = " ") {
- if (Object.prototype.toString.call(fillString) !== "[object String]") {
- throw new TypeError(
- "fillString must be String"
- );
- }
- const str = this;
- if (str.length >= maxLength)
- return String(str);
- const fillLength = maxLength - str.length;
- let times2 = Math.ceil(fillLength / fillString.length);
- while (times2 >>= 1) {
- fillString += fillString;
- if (times2 === 1) {
- fillString += fillString;
- }
- }
- return fillString.slice(0, fillLength) + str;
- };
- }
- function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
- let date3;
- if (!dateTime) {
- date3 = /* @__PURE__ */ new Date();
- } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
- date3 = new Date(dateTime * 1e3);
- } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
- date3 = new Date(Number(dateTime));
- } else {
- date3 = new Date(
- typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
- );
- }
- const timeSource = {
- "y": date3.getFullYear().toString(),
- // 年
- "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
- // 月
- "d": date3.getDate().toString().padStart(2, "0"),
- // 日
- "h": date3.getHours().toString().padStart(2, "0"),
- // 时
- "M": date3.getMinutes().toString().padStart(2, "0"),
- // 分
- "s": date3.getSeconds().toString().padStart(2, "0")
- // 秒
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
- };
- for (const key in timeSource) {
- const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
- if (ret) {
- const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
- formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
- }
- }
- return formatStr;
- }
- function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
- if (timestamp == null)
- timestamp = Number(/* @__PURE__ */ new Date());
- timestamp = parseInt(timestamp);
- if (timestamp.toString().length == 10)
- timestamp *= 1e3;
- let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
- timer = parseInt(timer / 1e3);
- let tips = "";
- switch (true) {
- case timer < 300:
- tips = "刚刚";
- break;
- case (timer >= 300 && timer < 3600):
- tips = `${parseInt(timer / 60)}分钟前`;
- break;
- case (timer >= 3600 && timer < 86400):
- tips = `${parseInt(timer / 3600)}小时前`;
- break;
- case (timer >= 86400 && timer < 2592e3):
- tips = `${parseInt(timer / 86400)}天前`;
- break;
- default:
- if (format2 === false) {
- if (timer >= 2592e3 && timer < 365 * 86400) {
- tips = `${parseInt(timer / (86400 * 30))}个月前`;
- } else {
- tips = `${parseInt(timer / (86400 * 365))}年前`;
- }
- } else {
- tips = timeFormat(timestamp, format2);
- }
- }
- return tips;
- }
- function trim(str, pos = "both") {
- str = String(str);
- if (pos == "both") {
- return str.replace(/^\s+|\s+$/g, "");
- }
- if (pos == "left") {
- return str.replace(/^\s*/, "");
- }
- if (pos == "right") {
- return str.replace(/(\s*$)/g, "");
- }
- if (pos == "all") {
- return str.replace(/\s+/g, "");
- }
- return str;
- }
- function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
- const prefix = isPrefix ? "?" : "";
- const _result = [];
- if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
- arrayFormat = "brackets";
- for (const key in data) {
- const value2 = data[key];
- if (["", void 0, null].indexOf(value2) >= 0) {
- continue;
- }
- if (value2.constructor === Array) {
- switch (arrayFormat) {
- case "indices":
- for (let i = 0; i < value2.length; i++) {
- _result.push(`${key}[${i}]=${value2[i]}`);
- }
- break;
- case "brackets":
- value2.forEach((_value) => {
- _result.push(`${key}[]=${_value}`);
- });
- break;
- case "repeat":
- value2.forEach((_value) => {
- _result.push(`${key}=${_value}`);
- });
- break;
- case "comma":
- let commaStr = "";
- value2.forEach((_value) => {
- commaStr += (commaStr ? "," : "") + _value;
- });
- _result.push(`${key}=${commaStr}`);
- break;
- default:
- value2.forEach((_value) => {
- _result.push(`${key}[]=${_value}`);
- });
- }
- } else {
- _result.push(`${key}=${value2}`);
- }
- }
- return _result.length ? prefix + _result.join("&") : "";
- }
- function toast(title, duration = 2e3) {
- uni.showToast({
- title: String(title),
- icon: "none",
- duration
- });
- }
- function type2icon(type2 = "success", fill = false) {
- if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
- type2 = "success";
- let iconName = "";
- switch (type2) {
- case "primary":
- iconName = "info-circle";
- break;
- case "info":
- iconName = "info-circle";
- break;
- case "error":
- iconName = "close-circle";
- break;
- case "warning":
- iconName = "error-circle";
- break;
- case "success":
- iconName = "checkmark-circle";
- break;
- default:
- iconName = "checkmark-circle";
- }
- if (fill)
- iconName += "-fill";
- return iconName;
- }
- function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
- number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
- const n = !isFinite(+number3) ? 0 : +number3;
- const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
- const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
- const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
- let s = "";
- s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
- const re = /(-?\d+)(\d{3})/;
- while (re.test(s[0])) {
- s[0] = s[0].replace(re, `$1${sep}$2`);
- }
- if ((s[1] || "").length < prec) {
- s[1] = s[1] || "";
- s[1] += new Array(prec - s[1].length + 1).join("0");
- }
- return s.join(dec);
- }
- function getDuration(value2, unit = true) {
- const valueNum = parseInt(value2);
- if (unit) {
- if (/s$/.test(value2))
- return value2;
- return value2 > 30 ? `${value2}ms` : `${value2}s`;
- }
- if (/ms$/.test(value2))
- return valueNum;
- if (/s$/.test(value2))
- return valueNum > 30 ? valueNum : valueNum * 1e3;
- return valueNum;
- }
- function padZero(value2) {
- return `00${value2}`.slice(-2);
- }
- function formValidate(instance, event) {
- const formItem = uni.$u.$parent.call(instance, "u-form-item");
- const form = uni.$u.$parent.call(instance, "u-form");
- if (formItem && form) {
- form.validateField(formItem.prop, () => {
- }, event);
- }
- }
- function getProperty(obj, key) {
- if (!obj) {
- return;
- }
- if (typeof key !== "string" || key === "") {
- return "";
- }
- if (key.indexOf(".") !== -1) {
- const keys = key.split(".");
- let firstObj = obj[keys[0]] || {};
- for (let i = 1; i < keys.length; i++) {
- if (firstObj) {
- firstObj = firstObj[keys[i]];
- }
- }
- return firstObj;
- }
- return obj[key];
- }
- function setProperty(obj, key, value2) {
- if (!obj) {
- return;
- }
- const inFn = function(_obj, keys, v) {
- if (keys.length === 1) {
- _obj[keys[0]] = v;
- return;
- }
- while (keys.length > 1) {
- const k = keys[0];
- if (!_obj[k] || typeof _obj[k] !== "object") {
- _obj[k] = {};
- }
- keys.shift();
- inFn(_obj[k], keys, v);
- }
- };
- if (typeof key !== "string" || key === "")
- ;
- else if (key.indexOf(".") !== -1) {
- const keys = key.split(".");
- inFn(obj, keys, value2);
- } else {
- obj[key] = value2;
- }
- }
- function page() {
- const pages2 = getCurrentPages();
- return `/${pages2[pages2.length - 1].route || ""}`;
- }
- function pages() {
- const pages2 = getCurrentPages();
- return pages2;
- }
- function setConfig({
- props: props2 = {},
- config: config2 = {},
- color: color2 = {},
- zIndex: zIndex2 = {}
- }) {
- const {
- deepMerge: deepMerge2
- } = uni.$u;
- uni.$u.config = deepMerge2(uni.$u.config, config2);
- uni.$u.props = deepMerge2(uni.$u.props, props2);
- uni.$u.color = deepMerge2(uni.$u.color, color2);
- uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2);
- }
- const index = {
- range,
- getPx,
- sleep,
- os,
- sys,
- random,
- guid,
- $parent,
- addStyle,
- addUnit,
- deepClone,
- deepMerge,
- error,
- randomArray,
- timeFormat,
- timeFrom,
- trim,
- queryParams,
- toast,
- type2icon,
- priceFormat,
- getDuration,
- padZero,
- formValidate,
- getProperty,
- setProperty,
- page,
- pages,
- setConfig
- };
- const zIndex = {
- toast: 10090,
- noNetwork: 10080,
- // popup包含popup,actionsheet,keyboard,picker的值
- popup: 10075,
- mask: 10070,
- navbar: 980,
- topTips: 975,
- sticky: 970,
- indexListSticky: 965
- };
- let platform = "none";
- platform = "vue3";
- platform = "plus";
- const platform$1 = platform;
- const $u = {
- route,
- date: index.timeFormat,
- // 另名date
- colorGradient: colorGradient$1.colorGradient,
- hexToRgb: colorGradient$1.hexToRgb,
- rgbToHex: colorGradient$1.rgbToHex,
- colorToRgba: colorGradient$1.colorToRgba,
- test,
- type: ["primary", "success", "error", "warning", "info"],
- http: new Request(),
- config: config$2,
- // uView配置信息相关,比如版本号
- zIndex,
- debounce,
- throttle,
- mixin,
- mpMixin,
- props: props$y,
- ...index,
- color,
- platform: platform$1
- };
- uni.$u = $u;
- const install = (Vue2) => {
- Vue2.config.globalProperties.$u = $u;
- Vue2.config.globalProperties.$nextTick = (cb) => {
- cb();
- };
- Vue2.mixin(mixin);
- };
- const uviewPlus = {
- install
- };
- function isEmpty(obj) {
- if (obj == "undefined" || obj == null || obj == "") {
- return true;
- } else {
- return false;
- }
- }
- function isLogin() {
- return new Promise((resolve, reject2) => {
- checkLogin().then(
- (res) => {
- if (res.code == 200) {
- resolve(true);
- } else {
- resolve(false);
- }
- },
- (rej) => {
- }
- );
- });
- }
- function getDictLabelName(dicts, dictValue) {
- if (dictValue == null) {
- return "";
- }
- var name = "";
- dicts.forEach(function(item, index2, array3) {
- if (dictValue.toString() == item.dictValue.toString()) {
- name = item.dictLabel;
- }
- });
- return name;
- }
- function parseText(txt, len) {
- if (txt.length > len) {
- var text = txt.substr(0, len) + "...";
- return text;
- }
- return txt;
- }
- function parseIDCardInfo(idCard2) {
- var reg = /^\d{17}[\dXx]$/;
- if (reg.test(idCard2)) {
- var birthday = idCard2.substring(6, 14);
- var year = birthday.substring(0, 4);
- var month = birthday.substring(4, 6);
- var day = birthday.substring(6, 8);
- var currentYear = (/* @__PURE__ */ new Date()).getFullYear();
- var age = currentYear - parseInt(year);
- var genderCode = parseInt(idCard2.charAt(16));
- var gender = genderCode % 2 === 0 ? "女" : "男";
- return {
- birthday: year + "-" + month + "-" + day,
- age,
- gender
- };
- }
- return null;
- }
- function getProvider(service) {
- return new Promise((resolve, reject2) => {
- uni.getProvider({
- service: service || "oauth",
- success: function(res) {
- if (res.provider) {
- resolve(res.provider[0]);
- }
- },
- fail() {
- reject2("获取环境服务商失败");
- }
- });
- }).catch((error2) => {
- formatAppLog("log", "at utils/common.js:149", "167", error2);
- });
- }
- function parsePhone(mobile2) {
- formatAppLog("log", "at utils/common.js:154", mobile2);
- if (mobile2 != null) {
- var str = mobile2.substr(0, 3) + "****" + mobile2.substr(7);
- return str;
- }
- }
- function getAge(strBirthday) {
- 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();
- if (nowYear == birthYear) {
- returnAge = 0;
- } else {
- var ageDiff = nowYear - birthYear;
- if (ageDiff > 0) {
- if (nowMonth == birthMonth) {
- var dayDiff = nowDay - birthDay;
- if (dayDiff < 0) {
- returnAge = ageDiff - 1;
- } else {
- returnAge = ageDiff;
- }
- } else {
- var monthDiff = nowMonth - birthMonth;
- if (monthDiff < 0) {
- returnAge = ageDiff - 1;
- } else {
- returnAge = ageDiff;
- }
- }
- } else {
- returnAge = -1;
- }
- }
- return returnAge;
- }
- function parseIdCard(idCard2) {
- var str = idCard2.substr(0, 4) + "****" + idCard2.substr(8);
- return str;
- }
- function urlToObj(url2) {
- let obj = {};
- let str = url2.slice(url2.indexOf("?") + 1);
- let arr = str.split("&");
- for (let j = arr.length, i = 0; i < j; i++) {
- let arr_temp = arr[i].split("=");
- obj[arr_temp[0]] = arr_temp[1];
- }
- return obj;
- }
- function logout() {
- uni.setStorageSync("AppToken", null);
- }
- function clearHisSearch() {
- var searchList = [];
- uni.setStorageSync("hisSearch", JSON.stringify(searchList));
- }
- function getHisSearch() {
- var search = uni.getStorageSync("hisSearch");
- if (search != null && search != void 0 && search != "") {
- var search = JSON.parse(search);
- return search;
- } else {
- var data = [];
- return data;
- }
- }
- function addHisSearch(searchVal) {
- var search = uni.getStorageSync("hisSearch");
- var searchList = [];
- formatAppLog("log", "at utils/common.js:240", searchList);
- if (search != null && search != void 0 && search != "") {
- searchList = JSON.parse(search);
- }
- searchList.push(searchVal);
- const uniqueArr = [...new Set(searchList)];
- uni.setStorageSync("hisSearch", JSON.stringify(uniqueArr));
- }
- function createApp() {
- const app = vue.createVueApp(App);
- app.config.globalProperties.$getProvider = getProvider;
- app.config.globalProperties.$parsePhone = parsePhone;
- app.config.globalProperties.$isLogin = isLogin;
- app.config.globalProperties.$isEmpty = isEmpty;
- app.config.globalProperties.$getAge = getAge;
- app.config.globalProperties.$parseIdCard = parseIdCard;
- app.config.globalProperties.$getDictLabelName = getDictLabelName;
- app.config.globalProperties.$logout = logout;
- app.config.globalProperties.$clearHisSearch = clearHisSearch;
- app.config.globalProperties.$getHisSearch = getHisSearch;
- app.config.globalProperties.$addHisSearch = addHisSearch;
- app.config.globalProperties.$urlToObj = urlToObj;
- app.config.globalProperties.$parseText = parseText;
- app.config.globalProperties.$parseIDCardInfo = parseIDCardInfo;
- app.use(uviewPlus);
- return {
- app
- };
- }
- const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
- uni.Vuex = __Vuex__;
- uni.Pinia = __Pinia__;
- __app__.provide("__globalStyles", __uniConfig.styles);
- __app__._component.mpType = "app";
- __app__._component.render = () => {
- };
- __app__.mount("#app");
- })(Vue);
|