app-service.js 492 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global = uni.requireGlobal();
  15. ArrayBuffer = global.ArrayBuffer;
  16. Int8Array = global.Int8Array;
  17. Uint8Array = global.Uint8Array;
  18. Uint8ClampedArray = global.Uint8ClampedArray;
  19. Int16Array = global.Int16Array;
  20. Uint16Array = global.Uint16Array;
  21. Int32Array = global.Int32Array;
  22. Uint32Array = global.Uint32Array;
  23. Float32Array = global.Float32Array;
  24. Float64Array = global.Float64Array;
  25. BigInt64Array = global.BigInt64Array;
  26. BigUint64Array = global.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. const _export_sfc = (sfc, props) => {
  35. const target = sfc.__vccOpts || sfc;
  36. for (const [key, val] of props) {
  37. target[key] = val;
  38. }
  39. return target;
  40. };
  41. const _sfc_main$D = {
  42. name: "privacy-popup",
  43. props: {
  44. visible: {
  45. type: Boolean,
  46. default: false
  47. },
  48. title: {
  49. type: String,
  50. default: "协议标题"
  51. },
  52. content: {
  53. type: String,
  54. // 备用,主要用 slot
  55. default: ""
  56. }
  57. },
  58. methods: {
  59. close() {
  60. this.$emit("close");
  61. }
  62. }
  63. };
  64. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  65. return $props.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  66. key: 0,
  67. class: "popup-mask",
  68. onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  69. }, ["stop"]))
  70. }, [
  71. vue.createElementVNode("view", { class: "popup-content" }, [
  72. vue.createElementVNode("view", { class: "popup-header" }, [
  73. vue.createElementVNode(
  74. "text",
  75. { class: "popup-title" },
  76. vue.toDisplayString($props.title),
  77. 1
  78. /* TEXT */
  79. ),
  80. vue.createElementVNode("view", {
  81. class: "close-icon",
  82. onClick: _cache[0] || (_cache[0] = (...args) => $options.close && $options.close(...args))
  83. }, "×")
  84. ]),
  85. vue.createElementVNode("scroll-view", {
  86. "scroll-y": "",
  87. class: "popup-body"
  88. }, [
  89. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  90. vue.createElementVNode(
  91. "text",
  92. { class: "default-text" },
  93. vue.toDisplayString($props.content),
  94. 1
  95. /* TEXT */
  96. )
  97. ], true)
  98. ]),
  99. vue.createElementVNode("view", { class: "popup-footer" }, [
  100. vue.createElementVNode("button", {
  101. class: "confirm-btn",
  102. onClick: _cache[1] || (_cache[1] = (...args) => $options.close && $options.close(...args))
  103. }, "我知道了")
  104. ])
  105. ])
  106. ])) : vue.createCommentVNode("v-if", true);
  107. }
  108. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-af3fbef1"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/components/privacy-popup/privacy-popup.vue"]]);
  109. function formatAppLog(type, filename, ...args) {
  110. if (uni.__log__) {
  111. uni.__log__(type, filename, ...args);
  112. } else {
  113. console[type].apply(console, [...args, filename]);
  114. }
  115. }
  116. function resolveEasycom(component, easycom) {
  117. return typeof component === "string" ? easycom : component;
  118. }
  119. const BASE_URL = "http://192.168.1.118:8080";
  120. const CLIENT_ID = "fe63fea7be31b0200b496d08bc6b517d";
  121. const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
  122. const TOKEN_KEY = "fulfiller_token";
  123. const USER_INFO_KEY = "fulfiller_user_info";
  124. function getToken() {
  125. return uni.getStorageSync(TOKEN_KEY) || "";
  126. }
  127. function setToken(token) {
  128. uni.setStorageSync(TOKEN_KEY, token);
  129. }
  130. function removeToken() {
  131. uni.removeStorageSync(TOKEN_KEY);
  132. }
  133. function isLoggedIn() {
  134. return !!getToken();
  135. }
  136. function removeUserInfo() {
  137. uni.removeStorageSync(USER_INFO_KEY);
  138. }
  139. function clearAuth() {
  140. removeToken();
  141. removeUserInfo();
  142. }
  143. function request(options = {}) {
  144. const {
  145. url,
  146. method = "GET",
  147. data,
  148. header = {},
  149. needToken = true
  150. } = options;
  151. const headers = {
  152. "Content-Type": "application/json;charset=utf-8",
  153. "clientid": CLIENT_ID,
  154. "X-Platform-Code": PLATFORM_CODE,
  155. ...header
  156. };
  157. if (needToken) {
  158. const token = getToken();
  159. if (token) {
  160. headers["Authorization"] = "Bearer " + token;
  161. }
  162. }
  163. return new Promise((resolve, reject) => {
  164. uni.request({
  165. url: BASE_URL + url,
  166. method: method.toUpperCase(),
  167. data,
  168. header: headers,
  169. success: (res) => {
  170. formatAppLog("log", "at utils/request.js:50", res);
  171. const statusCode = res.statusCode;
  172. const code = res.data.code;
  173. const msg = res.data.msg;
  174. res.data.data;
  175. if (statusCode !== 200) {
  176. const errorMsg = msg || `请求失败(${statusCode})`;
  177. uni.showToast({ title: errorMsg, icon: "none" });
  178. return reject(new Error(errorMsg));
  179. }
  180. if (code === 401) {
  181. clearAuth();
  182. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  183. setTimeout(() => {
  184. uni.reLaunch({ url: "/pages/login/login" });
  185. }, 1500);
  186. return reject(new Error("未授权"));
  187. }
  188. if (code !== void 0 && code !== 200) {
  189. const errorMsg = msg || "操作失败";
  190. uni.showToast({ title: errorMsg, icon: "none" });
  191. return reject(new Error(errorMsg));
  192. }
  193. resolve(res.data);
  194. },
  195. fail: (err) => {
  196. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  197. reject(err);
  198. }
  199. });
  200. });
  201. }
  202. function loginByPassword(username, password) {
  203. return request({
  204. url: "/auth/login",
  205. method: "POST",
  206. needToken: false,
  207. data: {
  208. // tenantId: TENANT_ID,
  209. // platformId: PLATFORM_ID,
  210. userSource: 1,
  211. username,
  212. password,
  213. clientId: CLIENT_ID,
  214. grantType: "password",
  215. source: 1
  216. }
  217. });
  218. }
  219. function logout() {
  220. return request({
  221. url: "/auth/logout",
  222. method: "POST"
  223. });
  224. }
  225. const logic$9 = {
  226. data() {
  227. return {
  228. currentTab: 1,
  229. // 0: 免密, 1: 密码
  230. mobile: "",
  231. code: "",
  232. password: "",
  233. showPassword: false,
  234. isAgreed: false,
  235. countDown: 0,
  236. timer: null,
  237. showAgreementModal: false,
  238. agreementTitle: "",
  239. agreementContent: "",
  240. loginLoading: false
  241. };
  242. },
  243. methods: {
  244. showAgreement(type) {
  245. this.agreementTitle = type === 1 ? "用户服务协议" : "隐私政策";
  246. if (type === 1) {
  247. this.agreementContent = "1. 服务条款\n欢迎使用宠宝平台。您在使用本服务时需遵守以下条款...\n\n2. 用户责任\n用户需对自己的行为负责...\n\n3. 账号管理\n请妥善保管您的账号密码...";
  248. } else {
  249. this.agreementContent = "1. 信息收集\n为了提供服务,我们需要收集您的手机号、地理位置、设备信息等必要数据。\n\n2. 信息使用\n您的位置信息将用于订单匹配和路径规划;您的联系方式将用于接单通知和客户沟通。\n\n3. 信息保护\n我们将采取严格的安全措施保护您的个人信息,未经授权不会向第三方披露。";
  250. }
  251. this.showAgreementModal = true;
  252. },
  253. /* async getVerifyCode() {
  254. if (this.currentTab === 1) return;
  255. if (this.countDown > 0) return;
  256. if (!this.mobile || this.mobile.length !== 11) {
  257. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  258. return;
  259. }
  260. try {
  261. const res = await sendSmsCode(this.mobile);
  262. // 发送成功,启动倒计时
  263. this.countDown = 60;
  264. this.timer = setInterval(() => {
  265. this.countDown--;
  266. if (this.countDown <= 0) {
  267. clearInterval(this.timer);
  268. }
  269. }, 1000);
  270. // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
  271. const devCode = res.data;
  272. if (devCode) {
  273. this.code = devCode;
  274. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  275. } else {
  276. uni.showToast({ title: '验证码已发送', icon: 'none' });
  277. }
  278. } catch (err) {
  279. __f__('error','at pages/login/logic.js:60','发送验证码失败:', err);
  280. }
  281. }, */
  282. async handleLogin() {
  283. var _a;
  284. if (!this.isAgreed) {
  285. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  286. return;
  287. }
  288. if (!this.mobile) {
  289. uni.showToast({ title: "请输入手机号", icon: "none" });
  290. return;
  291. }
  292. if (!this.password) {
  293. uni.showToast({ title: "请输入密码", icon: "none" });
  294. return;
  295. }
  296. if (this.loginLoading)
  297. return;
  298. this.loginLoading = true;
  299. uni.showLoading({
  300. title: "登录中...",
  301. mask: true
  302. });
  303. try {
  304. let res;
  305. res = await loginByPassword(this.mobile, this.password);
  306. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  307. if (token) {
  308. setToken(token);
  309. }
  310. uni.showToast({ title: "登录成功", icon: "success" });
  311. setTimeout(() => {
  312. uni.switchTab({
  313. url: "/pages/home/index"
  314. });
  315. }, 1e3);
  316. } catch (err) {
  317. formatAppLog("error", "at pages/login/logic.js:123", "登录失败:", err);
  318. } finally {
  319. this.loginLoading = false;
  320. uni.hideLoading();
  321. }
  322. },
  323. goToRecruit() {
  324. uni.navigateTo({
  325. url: "/pages/recruit/landing"
  326. });
  327. },
  328. goToForgotPwd() {
  329. uni.navigateTo({
  330. url: "/pages/login/reset-pwd-verify"
  331. });
  332. }
  333. }
  334. };
  335. const _imports_0$3 = "/static/header.png";
  336. const _imports_1$8 = "/static/logo.png";
  337. const _sfc_main$C = {
  338. ...logic$9,
  339. components: {
  340. PrivacyPopup: __easycom_0
  341. }
  342. };
  343. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  344. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  345. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  346. vue.createElementVNode("view", { class: "banner-area" }, [
  347. vue.createElementVNode("image", {
  348. class: "banner-img",
  349. src: _imports_0$3,
  350. mode: "widthFix"
  351. })
  352. ]),
  353. vue.createElementVNode("view", { class: "content-card" }, [
  354. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  355. vue.createElementVNode("image", {
  356. class: "logo-img",
  357. src: _imports_1$8,
  358. mode: "widthFix"
  359. })
  360. ]),
  361. vue.createElementVNode("view", { class: "tabs" }, [
  362. vue.createElementVNode("view", { class: "tab-item active" }, [
  363. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  364. vue.createElementVNode("view", { class: "tab-indicator" })
  365. ])
  366. ]),
  367. vue.createElementVNode("view", { class: "form-area" }, [
  368. vue.createElementVNode("view", { class: "input-group" }, [
  369. vue.createElementVNode("view", { class: "area-code" }, [
  370. vue.createElementVNode("text", null, "+86"),
  371. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  372. ]),
  373. vue.withDirectives(vue.createElementVNode(
  374. "input",
  375. {
  376. class: "input",
  377. type: "number",
  378. placeholder: "手机号",
  379. "placeholder-style": "color: #ccc",
  380. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
  381. maxlength: "11"
  382. },
  383. null,
  384. 512
  385. /* NEED_PATCH */
  386. ), [
  387. [vue.vModelText, _ctx.mobile]
  388. ])
  389. ]),
  390. vue.createElementVNode("view", { class: "input-group" }, [
  391. vue.withDirectives(vue.createElementVNode("input", {
  392. class: "input",
  393. password: !_ctx.showPassword,
  394. type: "text",
  395. placeholder: "请输入密码",
  396. "placeholder-style": "color: #ccc",
  397. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
  398. }, null, 8, ["password"]), [
  399. [vue.vModelText, _ctx.password]
  400. ]),
  401. vue.createElementVNode("view", {
  402. class: "eye-icon",
  403. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  404. }, [
  405. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  406. key: 0,
  407. class: "svg-icon",
  408. viewBox: "0 0 24 24",
  409. fill: "none",
  410. xmlns: "http://www.w3.org/2000/svg"
  411. }, [
  412. vue.createElementVNode("path", {
  413. d: "M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",
  414. fill: "#CCCCCC"
  415. })
  416. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  417. key: 1,
  418. class: "svg-icon",
  419. viewBox: "0 0 24 24",
  420. fill: "none",
  421. xmlns: "http://www.w3.org/2000/svg"
  422. }, [
  423. vue.createElementVNode("path", {
  424. d: "M12 7C7 7 2.73 10.11 1 14.5",
  425. stroke: "#CCCCCC",
  426. "stroke-width": "2",
  427. "stroke-linecap": "round"
  428. }),
  429. vue.createElementVNode("path", {
  430. d: "M23 14.5C21.27 10.11 17 7 12 7",
  431. stroke: "#CCCCCC",
  432. "stroke-width": "2",
  433. "stroke-linecap": "round"
  434. }),
  435. vue.createElementVNode("path", {
  436. d: "M12 7V4",
  437. stroke: "#CCCCCC",
  438. "stroke-width": "2",
  439. "stroke-linecap": "round"
  440. }),
  441. vue.createElementVNode("path", {
  442. d: "M16 8L18 5",
  443. stroke: "#CCCCCC",
  444. "stroke-width": "2",
  445. "stroke-linecap": "round"
  446. }),
  447. vue.createElementVNode("path", {
  448. d: "M8 8L6 5",
  449. stroke: "#CCCCCC",
  450. "stroke-width": "2",
  451. "stroke-linecap": "round"
  452. }),
  453. vue.createElementVNode("path", {
  454. d: "M20 10L22 8",
  455. stroke: "#CCCCCC",
  456. "stroke-width": "2",
  457. "stroke-linecap": "round"
  458. }),
  459. vue.createElementVNode("path", {
  460. d: "M4 10L2 8",
  461. stroke: "#CCCCCC",
  462. "stroke-width": "2",
  463. "stroke-linecap": "round"
  464. })
  465. ]))
  466. ])
  467. ]),
  468. vue.createElementVNode("button", {
  469. class: "login-btn",
  470. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  471. }, "登 录"),
  472. vue.createElementVNode("view", { class: "agreement" }, [
  473. vue.createElementVNode(
  474. "view",
  475. {
  476. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  477. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  478. },
  479. [
  480. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  481. key: 0,
  482. class: "check-mark"
  483. }, "✓")) : vue.createCommentVNode("v-if", true)
  484. ],
  485. 2
  486. /* CLASS */
  487. ),
  488. vue.createElementVNode("text", { class: "agree-text" }, [
  489. vue.createTextVNode(" 我已经阅读并同意 "),
  490. vue.createElementVNode("text", {
  491. class: "link",
  492. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  493. }, "《用户服务协议》"),
  494. vue.createTextVNode(" 和 "),
  495. vue.createElementVNode("text", {
  496. class: "link",
  497. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  498. }, "《隐私政策》")
  499. ])
  500. ])
  501. ]),
  502. vue.createElementVNode("view", {
  503. class: "footer-recruit",
  504. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  505. }, [
  506. vue.createElementVNode("view", { class: "recruit-badge" }, [
  507. (vue.openBlock(), vue.createElementBlock("svg", {
  508. class: "svg-icon flag-icon",
  509. viewBox: "0 0 24 24",
  510. fill: "none",
  511. xmlns: "http://www.w3.org/2000/svg",
  512. style: { "width": "30rpx", "height": "30rpx" }
  513. }, [
  514. vue.createElementVNode("path", {
  515. d: "M4 14V4H18L17 9L18 14H4Z",
  516. stroke: "#FF5722",
  517. "stroke-width": "2",
  518. "stroke-linejoin": "round"
  519. }),
  520. vue.createElementVNode("path", {
  521. d: "M4 22V14",
  522. stroke: "#FF5722",
  523. "stroke-width": "2",
  524. "stroke-linecap": "round"
  525. })
  526. ])),
  527. vue.createElementVNode("text", null, " 宠宝履约者招募")
  528. ])
  529. ]),
  530. vue.createVNode(_component_privacy_popup, {
  531. visible: _ctx.showAgreementModal,
  532. title: _ctx.agreementTitle,
  533. content: _ctx.agreementContent,
  534. onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
  535. }, null, 8, ["visible", "title", "content"])
  536. ])
  537. ]);
  538. }
  539. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  540. const logic$8 = {
  541. data() {
  542. return {
  543. statusBarHeight: 20
  544. // 默认状态栏高度
  545. };
  546. },
  547. onLoad() {
  548. const sysInfo = uni.getSystemInfoSync();
  549. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  550. },
  551. methods: {
  552. goBack() {
  553. const pages = getCurrentPages();
  554. if (pages.length > 1) {
  555. uni.navigateBack();
  556. } else {
  557. uni.reLaunch({
  558. url: "/pages/login/login"
  559. });
  560. }
  561. },
  562. goToForm() {
  563. uni.navigateTo({
  564. url: "/pages/recruit/form"
  565. });
  566. }
  567. }
  568. };
  569. const _sfc_main$B = logic$8;
  570. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  571. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  572. vue.createElementVNode(
  573. "view",
  574. {
  575. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  576. },
  577. null,
  578. 4
  579. /* STYLE */
  580. ),
  581. vue.createElementVNode("view", { class: "nav-bar" }, [
  582. vue.createElementVNode("view", {
  583. class: "back-icon",
  584. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  585. }, "‹")
  586. ]),
  587. vue.createElementVNode("view", { class: "header-area" }, [
  588. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  589. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  590. ]),
  591. vue.createElementVNode("view", { class: "content-card" }, [
  592. vue.createElementVNode("view", { class: "benefit-item" }, [
  593. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  594. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  595. ]),
  596. vue.createElementVNode("view", { class: "info" }, [
  597. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  598. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  599. ])
  600. ]),
  601. vue.createElementVNode("view", { class: "benefit-item" }, [
  602. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  603. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  604. ]),
  605. vue.createElementVNode("view", { class: "info" }, [
  606. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  607. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  608. ])
  609. ]),
  610. vue.createElementVNode("view", { class: "benefit-item" }, [
  611. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  612. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  613. ]),
  614. vue.createElementVNode("view", { class: "info" }, [
  615. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  616. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  617. ])
  618. ])
  619. ]),
  620. vue.createElementVNode("view", { class: "footer-area" }, [
  621. vue.createElementVNode("button", {
  622. class: "join-btn",
  623. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  624. }, "我要加入"),
  625. vue.createElementVNode("view", { class: "faq" }, [
  626. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  627. vue.createTextVNode(" 常见问题 ")
  628. ])
  629. ])
  630. ]);
  631. }
  632. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  633. function getMyProfile() {
  634. return request({
  635. url: "/fulfiller/fulfiller/my",
  636. method: "GET"
  637. });
  638. }
  639. function submitAudit(data) {
  640. return request({
  641. url: "/fulfiller/app/audit/submit",
  642. method: "POST",
  643. needToken: false,
  644. data
  645. });
  646. }
  647. function getServiceTypes() {
  648. return request({
  649. url: "/fulfiller/app/service/list",
  650. method: "GET",
  651. needToken: false
  652. });
  653. }
  654. function getAreaChildren(parentId = 0) {
  655. return request({
  656. url: "/fulfiller/app/area/children",
  657. method: "GET",
  658. needToken: false,
  659. data: { parentId }
  660. });
  661. }
  662. function uploadFile(filePath) {
  663. return new Promise((resolve, reject) => {
  664. const token = uni.getStorageSync("fulfiller_token");
  665. uni.uploadFile({
  666. url: BASE_URL + "/fulfiller/app/upload",
  667. filePath,
  668. name: "file",
  669. header: {
  670. "clientid": CLIENT_ID,
  671. "X-Platform-Code": PLATFORM_CODE,
  672. "Authorization": token ? `Bearer ${token}` : ""
  673. },
  674. success: (res) => {
  675. try {
  676. const data = JSON.parse(res.data);
  677. if (data.code === 200) {
  678. resolve(data);
  679. } else {
  680. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  681. reject(data);
  682. }
  683. } catch (e) {
  684. reject(e);
  685. }
  686. },
  687. fail: (err) => {
  688. uni.showToast({ title: "上传失败", icon: "none" });
  689. reject(err);
  690. }
  691. });
  692. });
  693. }
  694. function updateAvatar(avatar) {
  695. return request({
  696. url: "/fulfiller/fulfiller/my/avatar",
  697. method: "PUT",
  698. data: { avatar }
  699. });
  700. }
  701. function updateName(name) {
  702. return request({
  703. url: "/fulfiller/fulfiller/my/name",
  704. method: "PUT",
  705. data: { name }
  706. });
  707. }
  708. function updateStatus(status) {
  709. return request({
  710. url: "/fulfiller/fulfiller/my/status",
  711. method: "PUT",
  712. data: { status }
  713. });
  714. }
  715. function updateCity(cityCode, cityName) {
  716. return request({
  717. url: "/fulfiller/fulfiller/my/city",
  718. method: "PUT",
  719. data: { cityCode, cityName }
  720. });
  721. }
  722. function getAuthInfo() {
  723. return request({
  724. url: "/fulfiller/fulfiller/my/auth",
  725. method: "GET"
  726. });
  727. }
  728. function updatePhone(phone, code) {
  729. return request({
  730. url: "/fulfiller/fulfiller/my/phone",
  731. method: "PUT",
  732. data: { phone, code }
  733. });
  734. }
  735. function updatePassword(oldPassword, newPassword) {
  736. return request({
  737. url: "/fulfiller/fulfiller/my/password",
  738. method: "PUT",
  739. data: { oldPassword, newPassword }
  740. });
  741. }
  742. function deleteAccount() {
  743. return request({
  744. url: "/fulfiller/fulfiller/my/account",
  745. method: "DELETE"
  746. });
  747. }
  748. function updateAuthInfo(data) {
  749. return request({
  750. url: "/fulfiller/fulfiller/my/auth",
  751. method: "POST",
  752. data
  753. });
  754. }
  755. function getPendingOrders(params) {
  756. return request({
  757. url: "/order/subOrder/listPendingAccept",
  758. method: "GET",
  759. data: params
  760. });
  761. }
  762. function acceptOrder(orderId) {
  763. return request({
  764. url: "/order/subOrder/accept",
  765. method: "PUT",
  766. data: { orderId }
  767. });
  768. }
  769. function getOrderCount() {
  770. return request({
  771. url: "/order/subOrder/count",
  772. method: "GET"
  773. });
  774. }
  775. function getOrderStats() {
  776. return request({
  777. url: "/order/subOrderLog/count",
  778. method: "GET"
  779. });
  780. }
  781. function getStatisticOrders(params) {
  782. return request({
  783. url: "/order/subOrder/listOnStatistic",
  784. method: "GET",
  785. data: params
  786. });
  787. }
  788. function getMyOrders(params) {
  789. return request({
  790. url: "/order/subOrder/listOnMyOrder",
  791. method: "GET",
  792. data: params
  793. });
  794. }
  795. function getOrderInfo(id) {
  796. return request({
  797. url: `/order/subOrder/getInfo?id=${id}`,
  798. method: "GET"
  799. });
  800. }
  801. function getOrderLogs(orderId) {
  802. return request({
  803. url: `/order/subOrderLog/list?orderId=${orderId}`,
  804. method: "GET"
  805. });
  806. }
  807. function clockIn(data) {
  808. return request({
  809. url: "/order/subOrder/clockIn",
  810. method: "PUT",
  811. data
  812. });
  813. }
  814. function uploadAnamaly(data) {
  815. return request({
  816. url: "/fulfiller/anamaly/upload",
  817. method: "POST",
  818. data
  819. });
  820. }
  821. function getAnomalyList(orderId) {
  822. return request({
  823. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  824. method: "GET"
  825. });
  826. }
  827. function submitNursingSummary(data) {
  828. return request({
  829. url: "/order/subOrder/nursingSummary",
  830. method: "PUT",
  831. data
  832. });
  833. }
  834. function listAllLevelConfigs() {
  835. return request({
  836. url: "/fulfiller/levelConfig/listAll",
  837. method: "GET"
  838. });
  839. }
  840. function listAllLevelRights() {
  841. return request({
  842. url: "/fulfiller/levelRights/listAll",
  843. method: "GET"
  844. });
  845. }
  846. function listAllService() {
  847. return request({
  848. url: "/service/list/listAll",
  849. method: "GET"
  850. });
  851. }
  852. const logic$7 = {
  853. data() {
  854. return {
  855. formData: {
  856. mobile: "",
  857. code: "",
  858. name: "",
  859. gender: 1,
  860. // 1男 2女
  861. birthday: "",
  862. password: "",
  863. serviceType: [],
  864. city: "",
  865. station: "",
  866. stationId: null
  867. },
  868. showPwd: false,
  869. isAgreed: false,
  870. serviceTypes: [],
  871. // 验证码倒计时
  872. countDown: 0,
  873. timer: null,
  874. // 日期选择器相关
  875. showPicker: false,
  876. years: [],
  877. months: [],
  878. days: [],
  879. pickerValue: [0, 0, 0],
  880. tempYear: 0,
  881. tempMonth: 0,
  882. tempDay: 0,
  883. // 城市选择器相关(从后端加载)
  884. showCityPicker: false,
  885. selectStep: 0,
  886. selectedPathway: [],
  887. currentList: [],
  888. selectedCityId: null,
  889. // 站点选择器相关(从后端加载)
  890. showStationPicker: false,
  891. stationList: [],
  892. // 协议弹窗
  893. showPrivacy: false,
  894. privacyTitle: "",
  895. privacyContent: ""
  896. };
  897. },
  898. created() {
  899. this.initDateData();
  900. this.loadServiceTypes();
  901. },
  902. beforeDestroy() {
  903. if (this.timer)
  904. clearInterval(this.timer);
  905. },
  906. methods: {
  907. initDateData() {
  908. const now = /* @__PURE__ */ new Date();
  909. const currentYear = now.getFullYear();
  910. for (let i = 1980; i <= currentYear + 5; i++) {
  911. this.years.push(i);
  912. }
  913. for (let i = 1; i <= 12; i++) {
  914. this.months.push(i);
  915. }
  916. for (let i = 1; i <= 31; i++) {
  917. this.days.push(i);
  918. }
  919. },
  920. // 打开选择器
  921. openPicker() {
  922. const dateStr = this.formData.birthday || "2000-01-01";
  923. const [y, m, d] = dateStr.split("-").map(Number);
  924. const yIndex = this.years.indexOf(y);
  925. const mIndex = this.months.indexOf(m);
  926. const dIndex = this.days.indexOf(d);
  927. this.pickerValue = [
  928. yIndex > -1 ? yIndex : 0,
  929. mIndex > -1 ? mIndex : 0,
  930. dIndex > -1 ? dIndex : 0
  931. ];
  932. this.tempYear = this.years[this.pickerValue[0]];
  933. this.tempMonth = this.months[this.pickerValue[1]];
  934. this.tempDay = this.days[this.pickerValue[2]];
  935. this.showPicker = true;
  936. },
  937. closePicker() {
  938. this.showPicker = false;
  939. },
  940. onPickerChange(e) {
  941. const val = e.detail.value;
  942. this.tempYear = this.years[val[0]];
  943. this.tempMonth = this.months[val[1]];
  944. this.tempDay = this.days[val[2]];
  945. },
  946. confirmPicker() {
  947. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  948. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  949. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  950. this.closePicker();
  951. },
  952. async loadServiceTypes() {
  953. try {
  954. const res = await listAllService();
  955. this.serviceTypes = (res.data || []).map((item) => ({
  956. id: item.id,
  957. name: item.name
  958. }));
  959. } catch (err) {
  960. formatAppLog("error", "at pages/recruit/logic.js:134", "加载服务类型失败:", err);
  961. this.serviceTypes = [];
  962. }
  963. },
  964. toggleService(item) {
  965. const idx = this.formData.serviceType.indexOf(item.id);
  966. if (idx > -1) {
  967. this.formData.serviceType.splice(idx, 1);
  968. } else {
  969. this.formData.serviceType.push(item.id);
  970. }
  971. },
  972. // 验证码
  973. /* async getVerifyCode() {
  974. if (this.countDown > 0) return;
  975. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  976. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  977. return;
  978. }
  979. try {
  980. const res = await sendSmsCode(this.formData.mobile);
  981. this.countDown = 60;
  982. this.timer = setInterval(() => {
  983. this.countDown--;
  984. if (this.countDown <= 0) clearInterval(this.timer);
  985. }, 1000);
  986. // TODO 【生产环境必须删除】开发模式自动填入验证码
  987. const devCode = res.data;
  988. if (devCode) {
  989. this.formData.code = devCode;
  990. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  991. } else {
  992. uni.showToast({ title: '验证码已发送', icon: 'none' });
  993. }
  994. } catch (err) {
  995. __f__('error','at pages/recruit/logic.js:171','发送验证码失败:', err);
  996. }
  997. }, */
  998. // 城市选择器 logic(从后端加载)
  999. async openCityPicker() {
  1000. this.showCityPicker = true;
  1001. if (this.selectedPathway.length === 0) {
  1002. await this.resetCityPicker();
  1003. }
  1004. },
  1005. async resetCityPicker() {
  1006. this.selectStep = 0;
  1007. this.selectedPathway = [];
  1008. await this.loadAreaChildren(0);
  1009. },
  1010. closeCityPicker() {
  1011. this.showCityPicker = false;
  1012. },
  1013. async loadAreaChildren(parentId) {
  1014. try {
  1015. const res = await getAreaChildren(parentId);
  1016. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  1017. id: item.id,
  1018. name: item.name,
  1019. type: item.type,
  1020. parentId: item.parentId
  1021. }));
  1022. } catch (err) {
  1023. formatAppLog("error", "at pages/recruit/logic.js:203", "加载区域数据失败:", err);
  1024. this.currentList = [];
  1025. }
  1026. },
  1027. async selectCityItem(item) {
  1028. this.selectedPathway[this.selectStep] = item;
  1029. if (item.type === 0) {
  1030. this.selectStep++;
  1031. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1032. await this.loadAreaChildren(item.id);
  1033. if (this.currentList.length === 0) {
  1034. this.selectedCityId = item.id;
  1035. this.confirmCity();
  1036. }
  1037. } else {
  1038. this.selectedCityId = item.id;
  1039. this.confirmCity();
  1040. }
  1041. },
  1042. async jumpToStep(step) {
  1043. this.selectStep = step;
  1044. if (step === 0) {
  1045. await this.loadAreaChildren(0);
  1046. } else {
  1047. const parent = this.selectedPathway[step - 1];
  1048. if (parent) {
  1049. await this.loadAreaChildren(parent.id);
  1050. }
  1051. }
  1052. },
  1053. confirmCity() {
  1054. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1055. this.formData.city = fullPath;
  1056. this.formData.station = "";
  1057. this.formData.stationId = null;
  1058. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1059. if (lastSelected) {
  1060. this.loadStations(lastSelected.id);
  1061. }
  1062. this.closeCityPicker();
  1063. },
  1064. // 站点选择器(从后端加载,只取type=2的站点)
  1065. async loadStations(parentId) {
  1066. try {
  1067. const res = await getAreaChildren(parentId);
  1068. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1069. id: item.id,
  1070. name: item.name
  1071. }));
  1072. } catch (err) {
  1073. formatAppLog("error", "at pages/recruit/logic.js:262", "加载站点数据失败:", err);
  1074. this.stationList = [];
  1075. }
  1076. },
  1077. openStationPicker() {
  1078. if (this.stationList.length === 0) {
  1079. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1080. return;
  1081. }
  1082. this.showStationPicker = true;
  1083. },
  1084. closeStationPicker() {
  1085. this.showStationPicker = false;
  1086. },
  1087. selectStation(item) {
  1088. this.formData.station = item.name;
  1089. this.formData.stationId = item.id;
  1090. this.closeStationPicker();
  1091. },
  1092. openPrivacy() {
  1093. this.privacyTitle = "宠宝履约者说明";
  1094. this.privacyContent = "1. 履约职责\n作为宠宝履约者,您需要按照平台标准完成宠物接送、喂遛或洗护服务,确保宠物安全与健康。\n\n2. 结算方式\n服务费用将根据订单类型和距离计算,定期结算至您的账户。具体结算周期请查看钱包说明。\n\n3. 行为规范\n请在这个过程中保持专业,穿着整洁,礼貌待人。严禁虐待宠物,违反者将承担法律责任。";
  1095. this.showPrivacy = true;
  1096. },
  1097. goToAuth() {
  1098. if (!this.isAgreed) {
  1099. uni.showToast({ title: "请勾选协议", icon: "none" });
  1100. return;
  1101. }
  1102. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1103. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1104. return;
  1105. }
  1106. if (!this.formData.name) {
  1107. uni.showToast({ title: "请输入姓名", icon: "none" });
  1108. return;
  1109. }
  1110. if (this.formData.serviceType.length === 0) {
  1111. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1112. return;
  1113. }
  1114. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1115. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1116. const services = JSON.stringify(selectedServices);
  1117. uni.navigateTo({
  1118. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1119. });
  1120. }
  1121. }
  1122. };
  1123. const _sfc_main$A = {
  1124. ...logic$7,
  1125. components: {
  1126. PrivacyPopup: __easycom_0
  1127. }
  1128. };
  1129. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1130. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  1131. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1132. vue.createElementVNode("view", { class: "card" }, [
  1133. vue.createElementVNode("view", { class: "form-item" }, [
  1134. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1135. vue.createElementVNode("view", { class: "input-box" }, [
  1136. vue.createElementVNode("view", { class: "prefix-area" }, [
  1137. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1138. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1139. ]),
  1140. vue.withDirectives(vue.createElementVNode(
  1141. "input",
  1142. {
  1143. class: "input",
  1144. type: "number",
  1145. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1146. },
  1147. null,
  1148. 512
  1149. /* NEED_PATCH */
  1150. ), [
  1151. [vue.vModelText, _ctx.formData.mobile]
  1152. ])
  1153. ])
  1154. ]),
  1155. vue.createElementVNode("view", { class: "form-item" }, [
  1156. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1157. vue.createElementVNode("view", { class: "input-box" }, [
  1158. vue.withDirectives(vue.createElementVNode(
  1159. "input",
  1160. {
  1161. class: "input",
  1162. type: "text",
  1163. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
  1164. },
  1165. null,
  1166. 512
  1167. /* NEED_PATCH */
  1168. ), [
  1169. [vue.vModelText, _ctx.formData.name]
  1170. ])
  1171. ])
  1172. ]),
  1173. vue.createElementVNode("view", { class: "form-item" }, [
  1174. vue.createElementVNode("text", { class: "label" }, "性别"),
  1175. vue.createElementVNode("view", { class: "gender-group" }, [
  1176. vue.createElementVNode("view", {
  1177. class: "radio-item",
  1178. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
  1179. }, [
  1180. vue.createElementVNode(
  1181. "text",
  1182. {
  1183. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1184. },
  1185. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1186. 3
  1187. /* TEXT, CLASS */
  1188. ),
  1189. vue.createElementVNode(
  1190. "text",
  1191. {
  1192. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1193. },
  1194. " 男",
  1195. 2
  1196. /* CLASS */
  1197. )
  1198. ]),
  1199. vue.createElementVNode("view", {
  1200. class: "radio-item",
  1201. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
  1202. }, [
  1203. vue.createElementVNode(
  1204. "text",
  1205. {
  1206. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1207. },
  1208. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1209. 3
  1210. /* TEXT, CLASS */
  1211. ),
  1212. vue.createElementVNode(
  1213. "text",
  1214. {
  1215. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1216. },
  1217. " 女",
  1218. 2
  1219. /* CLASS */
  1220. )
  1221. ])
  1222. ])
  1223. ]),
  1224. vue.createElementVNode("view", { class: "form-item" }, [
  1225. vue.createElementVNode("text", { class: "label" }, "生日"),
  1226. vue.createElementVNode("view", {
  1227. class: "input-box",
  1228. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1229. }, [
  1230. vue.createElementVNode(
  1231. "text",
  1232. null,
  1233. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1234. 1
  1235. /* TEXT */
  1236. ),
  1237. (vue.openBlock(), vue.createElementBlock("svg", {
  1238. class: "arrow-right",
  1239. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1240. viewBox: "0 0 1024 1024",
  1241. version: "1.1",
  1242. xmlns: "http://www.w3.org/2000/svg"
  1243. }, [
  1244. vue.createElementVNode("path", {
  1245. d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-45.056L382.592 149.312a29.12 29.12 0 0 0-41.728 0z",
  1246. fill: "#CCCCCC"
  1247. })
  1248. ]))
  1249. ])
  1250. ]),
  1251. vue.createElementVNode("view", { class: "form-item" }, [
  1252. vue.createElementVNode("text", { class: "label" }, "密码"),
  1253. vue.createElementVNode("view", { class: "input-box" }, [
  1254. vue.withDirectives(vue.createElementVNode("input", {
  1255. class: "input",
  1256. password: !_ctx.showPwd,
  1257. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
  1258. placeholder: "设置登录密码"
  1259. }, null, 8, ["password"]), [
  1260. [vue.vModelText, _ctx.formData.password]
  1261. ]),
  1262. vue.createElementVNode("view", {
  1263. class: "monkey-icon",
  1264. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1265. }, [
  1266. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1267. key: 0,
  1268. class: "svg-icon",
  1269. viewBox: "0 0 24 24",
  1270. fill: "none",
  1271. xmlns: "http://www.w3.org/2000/svg"
  1272. }, [
  1273. vue.createElementVNode("path", {
  1274. d: "M12 4.5C7 4.5 2.73 7.61 1 12C2.73 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.61 17 4.5 12 4.5ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",
  1275. fill: "#CCCCCC"
  1276. })
  1277. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1278. key: 1,
  1279. class: "svg-icon",
  1280. viewBox: "0 0 24 24",
  1281. fill: "none",
  1282. xmlns: "http://www.w3.org/2000/svg"
  1283. }, [
  1284. vue.createElementVNode("path", {
  1285. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1286. stroke: "#CCCCCC",
  1287. "stroke-width": "2",
  1288. "stroke-linecap": "round"
  1289. }),
  1290. vue.createElementVNode("path", {
  1291. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1292. stroke: "#CCCCCC",
  1293. "stroke-width": "2",
  1294. "stroke-linecap": "round"
  1295. }),
  1296. vue.createElementVNode("path", {
  1297. d: "M12 7V4",
  1298. stroke: "#CCCCCC",
  1299. "stroke-width": "2",
  1300. "stroke-linecap": "round"
  1301. }),
  1302. vue.createElementVNode("path", {
  1303. d: "M16 8L18 5",
  1304. stroke: "#CCCCCC",
  1305. "stroke-width": "2",
  1306. "stroke-linecap": "round"
  1307. }),
  1308. vue.createElementVNode("path", {
  1309. d: "M8 8L6 5",
  1310. stroke: "#CCCCCC",
  1311. "stroke-width": "2",
  1312. "stroke-linecap": "round"
  1313. }),
  1314. vue.createElementVNode("path", {
  1315. d: "M20 10L22 8",
  1316. stroke: "#CCCCCC",
  1317. "stroke-width": "2",
  1318. "stroke-linecap": "round"
  1319. }),
  1320. vue.createElementVNode("path", {
  1321. d: "M4 10L2 8",
  1322. stroke: "#CCCCCC",
  1323. "stroke-width": "2",
  1324. "stroke-linecap": "round"
  1325. })
  1326. ]))
  1327. ])
  1328. ])
  1329. ])
  1330. ]),
  1331. vue.createElementVNode("view", { class: "card" }, [
  1332. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1333. vue.createElementVNode("view", { class: "service-types" }, [
  1334. (vue.openBlock(true), vue.createElementBlock(
  1335. vue.Fragment,
  1336. null,
  1337. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1338. return vue.openBlock(), vue.createElementBlock("view", {
  1339. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1340. key: item.id,
  1341. onClick: ($event) => _ctx.toggleService(item)
  1342. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1343. }),
  1344. 128
  1345. /* KEYED_FRAGMENT */
  1346. ))
  1347. ]),
  1348. vue.createElementVNode("view", { class: "form-item" }, [
  1349. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1350. vue.createElementVNode("view", {
  1351. class: "input-box",
  1352. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1353. }, [
  1354. vue.createElementVNode(
  1355. "text",
  1356. {
  1357. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1358. },
  1359. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1360. 5
  1361. /* TEXT, STYLE */
  1362. ),
  1363. (vue.openBlock(), vue.createElementBlock("svg", {
  1364. class: "arrow-right",
  1365. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1366. viewBox: "0 0 1024 1024",
  1367. version: "1.1",
  1368. xmlns: "http://www.w3.org/2000/svg"
  1369. }, [
  1370. vue.createElementVNode("path", {
  1371. d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-45.056L382.592 149.312a29.12 29.12 0 0 0-41.728 0z",
  1372. fill: "#CCCCCC"
  1373. })
  1374. ]))
  1375. ])
  1376. ]),
  1377. vue.createElementVNode("view", { class: "form-item" }, [
  1378. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1379. vue.createElementVNode("view", {
  1380. class: "input-box",
  1381. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1382. }, [
  1383. vue.createElementVNode(
  1384. "text",
  1385. {
  1386. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1387. },
  1388. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1389. 5
  1390. /* TEXT, STYLE */
  1391. ),
  1392. (vue.openBlock(), vue.createElementBlock("svg", {
  1393. class: "arrow-right",
  1394. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1395. viewBox: "0 0 1024 1024",
  1396. version: "1.1",
  1397. xmlns: "http://www.w3.org/2000/svg"
  1398. }, [
  1399. vue.createElementVNode("path", {
  1400. d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-45.056L382.592 149.312a29.12 29.12 0 0 0-41.728 0z",
  1401. fill: "#CCCCCC"
  1402. })
  1403. ]))
  1404. ])
  1405. ])
  1406. ]),
  1407. vue.createElementVNode(
  1408. "view",
  1409. {
  1410. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1411. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1412. },
  1413. [
  1414. vue.createElementVNode("view", {
  1415. class: "picker-content",
  1416. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  1417. }, ["stop"]))
  1418. }, [
  1419. vue.createElementVNode("view", { class: "picker-header" }, [
  1420. vue.createElementVNode("text", {
  1421. class: "picker-btn-cancel",
  1422. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1423. }, "取消"),
  1424. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1425. vue.createElementVNode("text", {
  1426. class: "picker-btn-confirm",
  1427. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1428. }, "确定")
  1429. ]),
  1430. vue.createElementVNode("view", { class: "picker-body" }, [
  1431. vue.createElementVNode("view", { class: "timeline-area" }, [
  1432. (vue.openBlock(true), vue.createElementBlock(
  1433. vue.Fragment,
  1434. null,
  1435. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1436. return vue.openBlock(), vue.createElementBlock("view", {
  1437. class: "timeline-item",
  1438. key: index,
  1439. onClick: ($event) => _ctx.jumpToStep(index)
  1440. }, [
  1441. vue.createElementVNode("view", { class: "timeline-dot" }),
  1442. vue.createElementVNode(
  1443. "text",
  1444. null,
  1445. vue.toDisplayString(item.name),
  1446. 1
  1447. /* TEXT */
  1448. )
  1449. ], 8, ["onClick"]);
  1450. }),
  1451. 128
  1452. /* KEYED_FRAGMENT */
  1453. )),
  1454. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1455. key: 0,
  1456. class: "timeline-item active"
  1457. }, [
  1458. vue.createElementVNode("view", { class: "timeline-dot" }),
  1459. vue.createElementVNode("text", null, "请选择")
  1460. ])) : vue.createCommentVNode("v-if", true)
  1461. ]),
  1462. vue.createElementVNode("scroll-view", {
  1463. "scroll-y": "",
  1464. class: "list-area"
  1465. }, [
  1466. (vue.openBlock(true), vue.createElementBlock(
  1467. vue.Fragment,
  1468. null,
  1469. vue.renderList(_ctx.currentList, (item, index) => {
  1470. return vue.openBlock(), vue.createElementBlock("view", {
  1471. class: "list-item",
  1472. key: item.id,
  1473. onClick: ($event) => _ctx.selectCityItem(item)
  1474. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1475. }),
  1476. 128
  1477. /* KEYED_FRAGMENT */
  1478. )),
  1479. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1480. key: 0,
  1481. style: { "padding": "20rpx", "color": "#999" }
  1482. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1483. ])
  1484. ])
  1485. ])
  1486. ],
  1487. 2
  1488. /* CLASS */
  1489. ),
  1490. vue.createElementVNode(
  1491. "view",
  1492. {
  1493. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1494. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1495. },
  1496. [
  1497. vue.createElementVNode("view", {
  1498. class: "picker-content",
  1499. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  1500. }, ["stop"]))
  1501. }, [
  1502. vue.createElementVNode("view", {
  1503. class: "picker-header",
  1504. style: { "justify-content": "center", "position": "relative" }
  1505. }, [
  1506. vue.createElementVNode("text", {
  1507. class: "picker-btn-cancel",
  1508. style: { "position": "absolute", "left": "30rpx" },
  1509. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1510. }, "取消"),
  1511. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1512. ]),
  1513. vue.createElementVNode("scroll-view", {
  1514. "scroll-y": "",
  1515. class: "picker-list"
  1516. }, [
  1517. (vue.openBlock(true), vue.createElementBlock(
  1518. vue.Fragment,
  1519. null,
  1520. vue.renderList(_ctx.stationList, (item, index) => {
  1521. return vue.openBlock(), vue.createElementBlock("view", {
  1522. class: "station-item",
  1523. key: index,
  1524. onClick: ($event) => _ctx.selectStation(item)
  1525. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1526. }),
  1527. 128
  1528. /* KEYED_FRAGMENT */
  1529. ))
  1530. ])
  1531. ])
  1532. ],
  1533. 2
  1534. /* CLASS */
  1535. ),
  1536. vue.createElementVNode("view", { class: "footer-actions" }, [
  1537. vue.createElementVNode("view", { class: "agreement-row" }, [
  1538. vue.createElementVNode(
  1539. "view",
  1540. {
  1541. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1542. onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1543. },
  1544. [
  1545. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1546. key: 0,
  1547. class: "check-mark"
  1548. }, "✓")) : vue.createCommentVNode("v-if", true)
  1549. ],
  1550. 2
  1551. /* CLASS */
  1552. ),
  1553. vue.createElementVNode("text", { class: "agree-text" }, [
  1554. vue.createTextVNode("我已阅读并同意 "),
  1555. vue.createElementVNode("text", {
  1556. style: { "color": "#2979ff" },
  1557. onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1558. }, "《宠宝履约者说明》")
  1559. ])
  1560. ]),
  1561. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1562. vue.createElementVNode("button", {
  1563. class: "submit-btn",
  1564. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1565. }, "下一步,实名认证")
  1566. ])
  1567. ]),
  1568. vue.createElementVNode(
  1569. "view",
  1570. {
  1571. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1572. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1573. },
  1574. [
  1575. vue.createElementVNode("view", {
  1576. class: "picker-content",
  1577. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  1578. }, ["stop"]))
  1579. }, [
  1580. vue.createElementVNode("view", { class: "picker-header" }, [
  1581. vue.createElementVNode("text", {
  1582. class: "picker-btn-cancel",
  1583. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1584. }, "取消"),
  1585. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1586. vue.createElementVNode("text", {
  1587. class: "picker-btn-confirm",
  1588. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1589. }, "确定")
  1590. ]),
  1591. vue.createElementVNode("picker-view", {
  1592. class: "picker-view",
  1593. "indicator-style": "height: 50px;",
  1594. value: _ctx.pickerValue,
  1595. onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1596. }, [
  1597. vue.createElementVNode("picker-view-column", null, [
  1598. (vue.openBlock(true), vue.createElementBlock(
  1599. vue.Fragment,
  1600. null,
  1601. vue.renderList(_ctx.years, (item, index) => {
  1602. return vue.openBlock(), vue.createElementBlock(
  1603. "view",
  1604. {
  1605. class: "picker-item",
  1606. key: index
  1607. },
  1608. vue.toDisplayString(item) + "年",
  1609. 1
  1610. /* TEXT */
  1611. );
  1612. }),
  1613. 128
  1614. /* KEYED_FRAGMENT */
  1615. ))
  1616. ]),
  1617. vue.createElementVNode("picker-view-column", null, [
  1618. (vue.openBlock(true), vue.createElementBlock(
  1619. vue.Fragment,
  1620. null,
  1621. vue.renderList(_ctx.months, (item, index) => {
  1622. return vue.openBlock(), vue.createElementBlock(
  1623. "view",
  1624. {
  1625. class: "picker-item",
  1626. key: index
  1627. },
  1628. vue.toDisplayString(item) + "月",
  1629. 1
  1630. /* TEXT */
  1631. );
  1632. }),
  1633. 128
  1634. /* KEYED_FRAGMENT */
  1635. ))
  1636. ]),
  1637. vue.createElementVNode("picker-view-column", null, [
  1638. (vue.openBlock(true), vue.createElementBlock(
  1639. vue.Fragment,
  1640. null,
  1641. vue.renderList(_ctx.days, (item, index) => {
  1642. return vue.openBlock(), vue.createElementBlock(
  1643. "view",
  1644. {
  1645. class: "picker-item",
  1646. key: index
  1647. },
  1648. vue.toDisplayString(item) + "日",
  1649. 1
  1650. /* TEXT */
  1651. );
  1652. }),
  1653. 128
  1654. /* KEYED_FRAGMENT */
  1655. ))
  1656. ])
  1657. ], 40, ["value"])
  1658. ])
  1659. ],
  1660. 2
  1661. /* CLASS */
  1662. ),
  1663. vue.createVNode(_component_privacy_popup, {
  1664. visible: _ctx.showPrivacy,
  1665. title: _ctx.privacyTitle,
  1666. content: _ctx.privacyContent,
  1667. onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
  1668. }, null, 8, ["visible", "title", "content"])
  1669. ]);
  1670. }
  1671. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1672. const logic$6 = {
  1673. data() {
  1674. return {
  1675. formData: {
  1676. idType: "居民身份证",
  1677. name: "",
  1678. idNumber: "",
  1679. expiryDate: ""
  1680. },
  1681. idCardFront: "",
  1682. // 身份证正面本地预览路径
  1683. idCardBack: "",
  1684. // 身份证反面本地预览路径
  1685. idCardFrontOssId: "",
  1686. // 身份证正面 OSS ID
  1687. idCardBackOssId: "",
  1688. // 身份证反面 OSS ID
  1689. showPicker: false,
  1690. pickerValue: [0, 0, 0],
  1691. // YYYY-MM-DD
  1692. years: [],
  1693. months: [],
  1694. days: [],
  1695. tempYear: 0,
  1696. tempMonth: 0,
  1697. tempDay: 0,
  1698. serviceType: [],
  1699. // 接收上一页的服务类型
  1700. isChoosingImage: false
  1701. // 标志位:是否正在选择图片中,防止 onShow 重置数据
  1702. };
  1703. },
  1704. onLoad(options) {
  1705. if (options.services) {
  1706. try {
  1707. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1708. } catch (e) {
  1709. formatAppLog("error", "at pages/recruit/auth_logic.js:33", "Parse services failed", e);
  1710. }
  1711. }
  1712. this.initDateData();
  1713. },
  1714. onShow() {
  1715. if (this.isChoosingImage) {
  1716. this.isChoosingImage = false;
  1717. return;
  1718. }
  1719. this.resetFormData();
  1720. },
  1721. methods: {
  1722. // --- 日期选择器逻辑 ---
  1723. initDateData() {
  1724. const date = /* @__PURE__ */ new Date();
  1725. const year = date.getFullYear();
  1726. for (let i = year; i <= year + 50; i++) {
  1727. this.years.push(i);
  1728. }
  1729. for (let i = 1; i <= 12; i++) {
  1730. this.months.push(i);
  1731. }
  1732. for (let i = 1; i <= 31; i++) {
  1733. this.days.push(i);
  1734. }
  1735. },
  1736. openPicker() {
  1737. const date = /* @__PURE__ */ new Date();
  1738. const dateStr = this.formData.expiryDate || `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
  1739. const [y, m, d] = dateStr.split("-").map(Number);
  1740. let yIndex = this.years.indexOf(y);
  1741. let mIndex = this.months.indexOf(m);
  1742. let dIndex = this.days.indexOf(d);
  1743. this.pickerValue = [
  1744. yIndex > -1 ? yIndex : 0,
  1745. mIndex > -1 ? mIndex : 0,
  1746. dIndex > -1 ? dIndex : 0
  1747. ];
  1748. this.tempYear = this.years[this.pickerValue[0]];
  1749. this.tempMonth = this.months[this.pickerValue[1]];
  1750. this.tempDay = this.days[this.pickerValue[2]];
  1751. this.showPicker = true;
  1752. },
  1753. closePicker() {
  1754. this.showPicker = false;
  1755. },
  1756. onPickerChange(e) {
  1757. const val = e.detail.value;
  1758. this.tempYear = this.years[val[0]];
  1759. this.tempMonth = this.months[val[1]];
  1760. this.tempDay = this.days[val[2]];
  1761. },
  1762. confirmPicker() {
  1763. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1764. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1765. this.formData.expiryDate = `${this.tempYear}-${mStr}-${dStr}`;
  1766. this.closePicker();
  1767. },
  1768. // --- 数据持久化(防止返回上一级丢失) ---
  1769. restoreAuthData() {
  1770. try {
  1771. const saved = uni.getStorageSync("recruit_auth_data");
  1772. if (saved) {
  1773. const d = JSON.parse(saved);
  1774. this.formData.name = d.name || "";
  1775. this.formData.idNumber = d.idNumber || "";
  1776. this.formData.expiryDate = d.expiryDate || "";
  1777. this.idCardFront = d.idCardFront || "";
  1778. this.idCardBack = d.idCardBack || "";
  1779. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1780. this.idCardBackOssId = d.idCardBackOssId || "";
  1781. }
  1782. } catch (e) {
  1783. formatAppLog("error", "at pages/recruit/auth_logic.js:115", "恢复认证数据失败", e);
  1784. }
  1785. },
  1786. saveAuthData() {
  1787. try {
  1788. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1789. name: this.formData.name,
  1790. idNumber: this.formData.idNumber,
  1791. expiryDate: this.formData.expiryDate,
  1792. idCardFront: this.idCardFront,
  1793. idCardBack: this.idCardBack,
  1794. idCardFrontOssId: this.idCardFrontOssId,
  1795. idCardBackOssId: this.idCardBackOssId
  1796. }));
  1797. } catch (e) {
  1798. formatAppLog("error", "at pages/recruit/auth_logic.js:130", "保存认证数据失败", e);
  1799. }
  1800. },
  1801. // --- 重置表单数据 ---
  1802. resetFormData() {
  1803. this.formData.name = "";
  1804. this.formData.idNumber = "";
  1805. this.formData.expiryDate = "";
  1806. this.idCardFront = "";
  1807. this.idCardBack = "";
  1808. this.idCardFrontOssId = "";
  1809. this.idCardBackOssId = "";
  1810. try {
  1811. uni.removeStorageSync("recruit_auth_data");
  1812. } catch (e) {
  1813. formatAppLog("error", "at pages/recruit/auth_logic.js:147", "清除缓存失败", e);
  1814. }
  1815. },
  1816. // --- 图片上传(选择后自动上传到OSS) ---
  1817. chooseImage(side) {
  1818. this.isChoosingImage = true;
  1819. uni.chooseImage({
  1820. count: 1,
  1821. sizeType: ["compressed"],
  1822. sourceType: ["album", "camera"],
  1823. success: async (res) => {
  1824. const tempPath = res.tempFilePaths[0];
  1825. if (side === "front") {
  1826. this.idCardFront = tempPath;
  1827. } else {
  1828. this.idCardBack = tempPath;
  1829. }
  1830. try {
  1831. uni.showLoading({ title: "上传中..." });
  1832. const uploadRes = await uploadFile(tempPath);
  1833. if (side === "front") {
  1834. this.idCardFrontOssId = uploadRes.data.ossId;
  1835. } else {
  1836. this.idCardBackOssId = uploadRes.data.ossId;
  1837. }
  1838. uni.hideLoading();
  1839. this.saveAuthData();
  1840. } catch (err) {
  1841. uni.hideLoading();
  1842. formatAppLog("error", "at pages/recruit/auth_logic.js:178", "上传身份证图片失败:", err);
  1843. }
  1844. }
  1845. });
  1846. },
  1847. // --- 提交 ---
  1848. goToQualifications() {
  1849. this.saveAuthData();
  1850. try {
  1851. const stored = uni.getStorageSync("recruit_form_data");
  1852. if (stored) {
  1853. const data = JSON.parse(stored);
  1854. data.realName = this.formData.name;
  1855. data.idNumber = this.formData.idNumber;
  1856. data.expiryDate = this.formData.expiryDate;
  1857. data.idCardFrontOssId = this.idCardFrontOssId;
  1858. data.idCardBackOssId = this.idCardBackOssId;
  1859. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1860. }
  1861. } catch (e) {
  1862. formatAppLog("error", "at pages/recruit/auth_logic.js:215", "保存认证数据失败", e);
  1863. }
  1864. const services = JSON.stringify(this.serviceType);
  1865. uni.navigateTo({
  1866. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1867. });
  1868. }
  1869. }
  1870. };
  1871. const _sfc_main$z = logic$6;
  1872. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  1873. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1874. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1875. vue.createElementVNode("view", { class: "form-card" }, [
  1876. vue.createElementVNode("view", { class: "form-item" }, [
  1877. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1878. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1879. ]),
  1880. vue.createElementVNode("view", { class: "form-item" }, [
  1881. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1882. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1883. vue.withDirectives(vue.createElementVNode(
  1884. "input",
  1885. {
  1886. class: "input-area",
  1887. type: "text",
  1888. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1889. placeholder: "证件姓名",
  1890. "placeholder-class": "input-placeholder"
  1891. },
  1892. null,
  1893. 512
  1894. /* NEED_PATCH */
  1895. ), [
  1896. [vue.vModelText, _ctx.formData.name]
  1897. ])
  1898. ])
  1899. ]),
  1900. vue.createElementVNode("view", { class: "form-item" }, [
  1901. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1902. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1903. vue.withDirectives(vue.createElementVNode(
  1904. "input",
  1905. {
  1906. class: "input-area",
  1907. type: "idcard",
  1908. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1909. placeholder: "身份证号",
  1910. "placeholder-class": "input-placeholder"
  1911. },
  1912. null,
  1913. 512
  1914. /* NEED_PATCH */
  1915. ), [
  1916. [vue.vModelText, _ctx.formData.idNumber]
  1917. ])
  1918. ])
  1919. ]),
  1920. vue.createElementVNode("view", { class: "form-item" }, [
  1921. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1922. vue.createElementVNode("view", {
  1923. class: "gray-input-box",
  1924. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1925. }, [
  1926. vue.createElementVNode(
  1927. "text",
  1928. {
  1929. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1930. },
  1931. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1932. 3
  1933. /* TEXT, CLASS */
  1934. ),
  1935. (vue.openBlock(), vue.createElementBlock("svg", {
  1936. class: "arrow-right",
  1937. viewBox: "0 0 1024 1024",
  1938. version: "1.1",
  1939. xmlns: "http://www.w3.org/2000/svg"
  1940. }, [
  1941. vue.createElementVNode("path", {
  1942. d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-45.056L382.592 149.312a29.12 29.12 0 0 0-41.728 0z",
  1943. fill: "#CCCCCC"
  1944. })
  1945. ]))
  1946. ])
  1947. ])
  1948. ]),
  1949. vue.createElementVNode("view", { class: "upload-card" }, [
  1950. vue.createElementVNode("view", {
  1951. class: "upload-box",
  1952. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  1953. }, [
  1954. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  1955. key: 0,
  1956. src: _ctx.idCardFront,
  1957. class: "preview-img",
  1958. mode: "aspectFill"
  1959. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1960. vue.Fragment,
  1961. { key: 1 },
  1962. [
  1963. (vue.openBlock(), vue.createElementBlock("svg", {
  1964. class: "camera-icon",
  1965. viewBox: "0 0 24 24",
  1966. fill: "none",
  1967. xmlns: "http://www.w3.org/2000/svg"
  1968. }, [
  1969. vue.createElementVNode("path", {
  1970. d: "M12 12C14.7614 12 17 9.76142 17 7C17 4.23858 14.7614 2 12 2C9.23858 2 7 4.23858 7 7C7 9.76142 9.23858 12 12 12Z",
  1971. fill: "#E0E0E0"
  1972. }),
  1973. vue.createElementVNode("circle", {
  1974. cx: "12",
  1975. cy: "12",
  1976. r: "3",
  1977. stroke: "#CCCCCC",
  1978. "stroke-width": "2"
  1979. }),
  1980. vue.createElementVNode("path", {
  1981. d: "M20 6H17.82L16.4 4.47C15.96 4 15.34 3.73 14.68 3.73H9.32C8.66 3.73 8.04 4 7.6 4.47L6.18 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17Z",
  1982. fill: "#CCCCCC"
  1983. })
  1984. ])),
  1985. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1986. ],
  1987. 64
  1988. /* STABLE_FRAGMENT */
  1989. ))
  1990. ]),
  1991. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  1992. ]),
  1993. vue.createElementVNode("view", { class: "upload-card" }, [
  1994. vue.createElementVNode("view", {
  1995. class: "upload-box",
  1996. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  1997. }, [
  1998. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  1999. key: 0,
  2000. src: _ctx.idCardBack,
  2001. class: "preview-img",
  2002. mode: "aspectFill"
  2003. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2004. vue.Fragment,
  2005. { key: 1 },
  2006. [
  2007. (vue.openBlock(), vue.createElementBlock("svg", {
  2008. class: "camera-icon",
  2009. viewBox: "0 0 24 24",
  2010. fill: "none",
  2011. xmlns: "http://www.w3.org/2000/svg"
  2012. }, [
  2013. vue.createElementVNode("path", {
  2014. d: "M20 6H17.82L16.4 4.47C15.96 4 15.34 3.73 14.68 3.73H9.32C8.66 3.73 8.04 4 7.6 4.47L6.18 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17Z",
  2015. fill: "#CCCCCC"
  2016. })
  2017. ])),
  2018. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2019. ],
  2020. 64
  2021. /* STABLE_FRAGMENT */
  2022. ))
  2023. ]),
  2024. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  2025. ]),
  2026. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  2027. vue.createElementVNode("button", {
  2028. class: "next-btn",
  2029. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  2030. }, "下一步,完善资质")
  2031. ]),
  2032. vue.createElementVNode(
  2033. "view",
  2034. {
  2035. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  2036. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2037. },
  2038. [
  2039. vue.createElementVNode("view", {
  2040. class: "picker-content",
  2041. onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
  2042. }, ["stop"]))
  2043. }, [
  2044. vue.createElementVNode("view", { class: "picker-header" }, [
  2045. vue.createElementVNode("text", {
  2046. class: "picker-btn-cancel",
  2047. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2048. }, "取消"),
  2049. vue.createElementVNode("text", { class: "picker-title" }, "选择有效结束期限"),
  2050. vue.createElementVNode("text", {
  2051. class: "picker-btn-confirm",
  2052. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  2053. }, "确定")
  2054. ]),
  2055. vue.createElementVNode("picker-view", {
  2056. class: "picker-view",
  2057. "indicator-style": "height: 50px;",
  2058. value: _ctx.pickerValue,
  2059. onChange: _cache[8] || (_cache[8] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  2060. }, [
  2061. vue.createElementVNode("picker-view-column", null, [
  2062. (vue.openBlock(true), vue.createElementBlock(
  2063. vue.Fragment,
  2064. null,
  2065. vue.renderList(_ctx.years, (item, index) => {
  2066. return vue.openBlock(), vue.createElementBlock(
  2067. "view",
  2068. {
  2069. class: "picker-item",
  2070. key: index
  2071. },
  2072. vue.toDisplayString(item) + "年",
  2073. 1
  2074. /* TEXT */
  2075. );
  2076. }),
  2077. 128
  2078. /* KEYED_FRAGMENT */
  2079. ))
  2080. ]),
  2081. vue.createElementVNode("picker-view-column", null, [
  2082. (vue.openBlock(true), vue.createElementBlock(
  2083. vue.Fragment,
  2084. null,
  2085. vue.renderList(_ctx.months, (item, index) => {
  2086. return vue.openBlock(), vue.createElementBlock(
  2087. "view",
  2088. {
  2089. class: "picker-item",
  2090. key: index
  2091. },
  2092. vue.toDisplayString(item) + "月",
  2093. 1
  2094. /* TEXT */
  2095. );
  2096. }),
  2097. 128
  2098. /* KEYED_FRAGMENT */
  2099. ))
  2100. ]),
  2101. vue.createElementVNode("picker-view-column", null, [
  2102. (vue.openBlock(true), vue.createElementBlock(
  2103. vue.Fragment,
  2104. null,
  2105. vue.renderList(_ctx.days, (item, index) => {
  2106. return vue.openBlock(), vue.createElementBlock(
  2107. "view",
  2108. {
  2109. class: "picker-item",
  2110. key: index
  2111. },
  2112. vue.toDisplayString(item) + "日",
  2113. 1
  2114. /* TEXT */
  2115. );
  2116. }),
  2117. 128
  2118. /* KEYED_FRAGMENT */
  2119. ))
  2120. ])
  2121. ], 40, ["value"])
  2122. ])
  2123. ],
  2124. 2
  2125. /* CLASS */
  2126. )
  2127. ]);
  2128. }
  2129. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  2130. const logic$5 = {
  2131. data() {
  2132. return {
  2133. serviceTypes: [],
  2134. // 从上一页传递过来的服务类型列表
  2135. qualifications: {},
  2136. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  2137. qualOssIds: {}
  2138. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  2139. };
  2140. },
  2141. onLoad(options) {
  2142. if (options.services) {
  2143. try {
  2144. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  2145. this.serviceTypes.forEach((item) => {
  2146. this.qualifications[item.name] = [];
  2147. this.qualOssIds[item.name] = [];
  2148. });
  2149. } catch (e) {
  2150. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  2151. }
  2152. }
  2153. },
  2154. methods: {
  2155. chooseImage(serviceName) {
  2156. uni.chooseImage({
  2157. count: 9,
  2158. sizeType: ["compressed"],
  2159. sourceType: ["album", "camera"],
  2160. success: async (res) => {
  2161. if (!this.qualifications[serviceName]) {
  2162. this.qualifications[serviceName] = [];
  2163. this.qualOssIds[serviceName] = [];
  2164. }
  2165. for (const tempPath of res.tempFilePaths) {
  2166. this.qualifications[serviceName].push(tempPath);
  2167. this.$forceUpdate();
  2168. try {
  2169. const uploadRes = await uploadFile(tempPath);
  2170. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  2171. } catch (err) {
  2172. formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
  2173. }
  2174. }
  2175. }
  2176. });
  2177. },
  2178. deleteImage(serviceName, index) {
  2179. this.qualifications[serviceName].splice(index, 1);
  2180. if (this.qualOssIds[serviceName]) {
  2181. this.qualOssIds[serviceName].splice(index, 1);
  2182. }
  2183. this.$forceUpdate();
  2184. },
  2185. goBackToForm() {
  2186. const pages = getCurrentPages();
  2187. if (pages.length > 2) {
  2188. uni.navigateBack({
  2189. delta: 2
  2190. });
  2191. } else {
  2192. uni.reLaunch({
  2193. url: "/pages/recruit/form"
  2194. });
  2195. }
  2196. },
  2197. async submit() {
  2198. let recruitData = {};
  2199. try {
  2200. const stored = uni.getStorageSync("recruit_form_data");
  2201. if (stored) {
  2202. recruitData = JSON.parse(stored);
  2203. }
  2204. } catch (e) {
  2205. formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
  2206. }
  2207. const allQualOssIds = [];
  2208. Object.values(this.qualOssIds).forEach((ids) => {
  2209. allQualOssIds.push(...ids);
  2210. });
  2211. const auditData = {
  2212. name: recruitData.name || "",
  2213. phone: recruitData.mobile || "",
  2214. password: recruitData.password || "",
  2215. gender: recruitData.gender === 1 ? "0" : "1",
  2216. birthday: recruitData.birthday || "",
  2217. serviceTypes: (recruitData.serviceType || []).join(","),
  2218. // 逗号分隔的服务类型ID
  2219. city: recruitData.city || "",
  2220. stationId: recruitData.stationId || null,
  2221. realName: recruitData.realName || "",
  2222. idCard: recruitData.idNumber || "",
  2223. idValidDate: recruitData.expiryDate || "",
  2224. idCardFront: recruitData.idCardFrontOssId || null,
  2225. idCardBack: recruitData.idCardBackOssId || null,
  2226. qualifications: allQualOssIds.join(",")
  2227. // 逗号分隔的资质图片OSS ID
  2228. };
  2229. uni.showLoading({ title: "提交中..." });
  2230. try {
  2231. await submitAudit(auditData);
  2232. uni.hideLoading();
  2233. uni.reLaunch({
  2234. url: "/pages/recruit/success"
  2235. });
  2236. } catch (err) {
  2237. uni.hideLoading();
  2238. formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
  2239. }
  2240. }
  2241. }
  2242. };
  2243. const _sfc_main$y = logic$5;
  2244. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2245. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2246. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2247. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2248. key: 0,
  2249. class: "empty-state"
  2250. }, [
  2251. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2252. vue.createElementVNode("button", {
  2253. class: "back-btn",
  2254. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2255. }, "返回选择")
  2256. ])) : vue.createCommentVNode("v-if", true),
  2257. (vue.openBlock(true), vue.createElementBlock(
  2258. vue.Fragment,
  2259. null,
  2260. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2261. return vue.openBlock(), vue.createElementBlock("view", {
  2262. class: "qual-card",
  2263. key: item.id
  2264. }, [
  2265. vue.createElementVNode(
  2266. "view",
  2267. { class: "card-title" },
  2268. vue.toDisplayString(item.name) + "服务资质",
  2269. 1
  2270. /* TEXT */
  2271. ),
  2272. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2273. (vue.openBlock(true), vue.createElementBlock(
  2274. vue.Fragment,
  2275. null,
  2276. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2277. return vue.openBlock(), vue.createElementBlock("view", {
  2278. class: "img-item",
  2279. key: imgIndex
  2280. }, [
  2281. vue.createElementVNode("image", {
  2282. src: img,
  2283. class: "preview-img",
  2284. mode: "aspectFill",
  2285. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2286. }, null, 8, ["src", "onClick"]),
  2287. vue.createElementVNode("view", {
  2288. class: "delete-btn",
  2289. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2290. }, "×", 8, ["onClick"])
  2291. ]);
  2292. }),
  2293. 128
  2294. /* KEYED_FRAGMENT */
  2295. )),
  2296. vue.createElementVNode("view", {
  2297. class: "upload-box",
  2298. onClick: ($event) => _ctx.chooseImage(item.name)
  2299. }, [
  2300. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2301. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2302. ], 8, ["onClick"])
  2303. ])
  2304. ]);
  2305. }),
  2306. 128
  2307. /* KEYED_FRAGMENT */
  2308. )),
  2309. vue.createElementVNode("view", { class: "footer-actions" }, [
  2310. vue.createElementVNode("button", {
  2311. class: "submit-btn",
  2312. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2313. }, "立即提交")
  2314. ])
  2315. ]);
  2316. }
  2317. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2318. const logic$4 = {
  2319. data() {
  2320. return {
  2321. station: "民治街道第一站",
  2322. name: "张三哥",
  2323. phone: "+8613612345678"
  2324. };
  2325. },
  2326. methods: {
  2327. goHome() {
  2328. uni.reLaunch({
  2329. url: "/pages/login/login"
  2330. });
  2331. }
  2332. }
  2333. };
  2334. const _sfc_main$x = logic$4;
  2335. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2336. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2337. vue.createElementVNode("view", { class: "icon-area" }, [
  2338. (vue.openBlock(), vue.createElementBlock("svg", {
  2339. class: "success-icon",
  2340. viewBox: "0 0 1024 1024",
  2341. version: "1.1",
  2342. xmlns: "http://www.w3.org/2000/svg"
  2343. }, [
  2344. vue.createElementVNode("path", {
  2345. d: "M512 0C229.23 0 0 229.23 0 512s229.23 512 512 512 512-229.23 512-512S794.77 0 512 0z m0 960C264.58 960 64 759.42 64 512S264.58 64 512 64s448 200.58 448 448-200.58 448-448 448z",
  2346. fill: "#64D01D"
  2347. }),
  2348. vue.createElementVNode("path", {
  2349. d: "M743.08 335.78c-12.23-12.24-32.07-12.24-44.3 0L426.6 607.96 325.22 506.58c-12.24-12.24-32.07-12.24-44.3 0-12.24 12.24-12.24 32.07 0 44.3l124.58 124.58c6.12 6.12 14.14 9.17 22.15 9.17s16.03-3.05 22.15-9.17L743.08 380.08c12.24-12.24 12.24-32.07 0-44.3z",
  2350. fill: "#64D01D"
  2351. })
  2352. ])),
  2353. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2354. ]),
  2355. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2356. vue.createElementVNode("view", { class: "info-card" }, [
  2357. vue.createElementVNode("view", { class: "info-item" }, [
  2358. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2359. vue.createElementVNode(
  2360. "text",
  2361. { class: "value" },
  2362. vue.toDisplayString(_ctx.station),
  2363. 1
  2364. /* TEXT */
  2365. )
  2366. ]),
  2367. vue.createElementVNode("view", { class: "info-item" }, [
  2368. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2369. vue.createElementVNode(
  2370. "text",
  2371. { class: "value" },
  2372. vue.toDisplayString(_ctx.name),
  2373. 1
  2374. /* TEXT */
  2375. )
  2376. ]),
  2377. vue.createElementVNode("view", { class: "info-item" }, [
  2378. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2379. vue.createElementVNode(
  2380. "text",
  2381. { class: "value" },
  2382. vue.toDisplayString(_ctx.phone),
  2383. 1
  2384. /* TEXT */
  2385. )
  2386. ])
  2387. ]),
  2388. vue.createElementVNode("view", {
  2389. class: "footer-btn",
  2390. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2391. }, "我知道了")
  2392. ]);
  2393. }
  2394. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2395. const _sfc_main$w = {
  2396. data() {
  2397. return {
  2398. mobile: "",
  2399. code: "",
  2400. countDown: 0,
  2401. timer: null
  2402. };
  2403. },
  2404. computed: {
  2405. mobileMask() {
  2406. if (!this.mobile)
  2407. return "";
  2408. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2409. }
  2410. },
  2411. onLoad(options) {
  2412. if (options.mobile) {
  2413. this.mobile = options.mobile;
  2414. } else {
  2415. this.mobile = "13412346783";
  2416. }
  2417. },
  2418. methods: {
  2419. getVerifyCode() {
  2420. if (this.countDown > 0)
  2421. return;
  2422. this.countDown = 60;
  2423. this.timer = setInterval(() => {
  2424. this.countDown--;
  2425. if (this.countDown <= 0) {
  2426. clearInterval(this.timer);
  2427. }
  2428. }, 1e3);
  2429. uni.showToast({ title: "验证码已发送", icon: "none" });
  2430. },
  2431. nextStep() {
  2432. if (!this.code) {
  2433. uni.showToast({ title: "请输入验证码", icon: "none" });
  2434. return;
  2435. }
  2436. uni.navigateTo({
  2437. url: "/pages/login/reset-pwd-set"
  2438. });
  2439. }
  2440. }
  2441. };
  2442. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2443. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2444. vue.createElementVNode("view", { class: "content" }, [
  2445. vue.createElementVNode(
  2446. "view",
  2447. { class: "tip-text" },
  2448. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2449. 1
  2450. /* TEXT */
  2451. ),
  2452. vue.createElementVNode("view", { class: "input-group" }, [
  2453. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2454. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2455. vue.withDirectives(vue.createElementVNode(
  2456. "input",
  2457. {
  2458. class: "code-input",
  2459. type: "number",
  2460. maxlength: "6",
  2461. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2462. },
  2463. null,
  2464. 512
  2465. /* NEED_PATCH */
  2466. ), [
  2467. [vue.vModelText, $data.code]
  2468. ]),
  2469. vue.createElementVNode("view", {
  2470. class: "get-code-btn",
  2471. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2472. }, [
  2473. vue.createElementVNode(
  2474. "text",
  2475. { class: "btn-text" },
  2476. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2477. 1
  2478. /* TEXT */
  2479. )
  2480. ])
  2481. ])
  2482. ]),
  2483. vue.createElementVNode("button", {
  2484. class: "next-btn",
  2485. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2486. }, "下一步")
  2487. ])
  2488. ]);
  2489. }
  2490. const PagesLoginResetPwdVerify = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/reset-pwd-verify.vue"]]);
  2491. const _sfc_main$v = {
  2492. data() {
  2493. return {
  2494. pwd1: "",
  2495. pwd2: ""
  2496. };
  2497. },
  2498. methods: {
  2499. confirmReset() {
  2500. if (!this.pwd1 || !this.pwd2) {
  2501. uni.showToast({ title: "请输入密码", icon: "none" });
  2502. return;
  2503. }
  2504. if (this.pwd1 !== this.pwd2) {
  2505. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2506. return;
  2507. }
  2508. uni.showToast({ title: "重置成功", icon: "success" });
  2509. setTimeout(() => {
  2510. uni.navigateBack({
  2511. delta: 2
  2512. // 返回到登录页
  2513. });
  2514. }, 1500);
  2515. }
  2516. }
  2517. };
  2518. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2519. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2520. vue.createElementVNode("view", { class: "content" }, [
  2521. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2522. vue.createElementVNode("view", { class: "input-form" }, [
  2523. vue.createElementVNode("view", { class: "input-row" }, [
  2524. vue.withDirectives(vue.createElementVNode(
  2525. "input",
  2526. {
  2527. class: "pwd-input",
  2528. type: "text",
  2529. password: "",
  2530. placeholder: "限12-20位字母和数字组合",
  2531. "placeholder-style": "color:#ccc",
  2532. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2533. },
  2534. null,
  2535. 512
  2536. /* NEED_PATCH */
  2537. ), [
  2538. [vue.vModelText, $data.pwd1]
  2539. ])
  2540. ]),
  2541. vue.createElementVNode("view", { class: "divider" }),
  2542. vue.createElementVNode("view", { class: "input-row" }, [
  2543. vue.withDirectives(vue.createElementVNode(
  2544. "input",
  2545. {
  2546. class: "pwd-input",
  2547. type: "text",
  2548. password: "",
  2549. placeholder: "限12-20位字母和数字组合",
  2550. "placeholder-style": "color:#ccc",
  2551. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2552. },
  2553. null,
  2554. 512
  2555. /* NEED_PATCH */
  2556. ), [
  2557. [vue.vModelText, $data.pwd2]
  2558. ])
  2559. ]),
  2560. vue.createElementVNode("view", { class: "divider" })
  2561. ]),
  2562. vue.createElementVNode("button", {
  2563. class: "confirm-btn",
  2564. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2565. }, "确定")
  2566. ])
  2567. ]);
  2568. }
  2569. const PagesLoginResetPwdSet = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/reset-pwd-set.vue"]]);
  2570. function cancelOrderApi(data) {
  2571. return request({
  2572. url: "/order/subOrder/cancel",
  2573. method: "PUT",
  2574. data
  2575. });
  2576. }
  2577. function rejectOrderApi(data) {
  2578. return request({
  2579. url: "/order/subOrder/reject",
  2580. method: "PUT",
  2581. data
  2582. });
  2583. }
  2584. const _sfc_main$u = {
  2585. __name: "index",
  2586. props: {
  2587. currentPath: {
  2588. type: String,
  2589. required: true
  2590. }
  2591. },
  2592. setup(__props, { expose: __expose }) {
  2593. __expose();
  2594. const props = __props;
  2595. const list = vue.ref([
  2596. {
  2597. pagePath: "pages/home/index",
  2598. text: "任务中心",
  2599. iconPath: "/static/tabbar/home.svg",
  2600. selectedIconPath: "/static/tabbar/home-active.svg"
  2601. },
  2602. {
  2603. pagePath: "pages/orders/index",
  2604. text: "我的订单",
  2605. iconPath: "/static/tabbar/order.svg",
  2606. selectedIconPath: "/static/tabbar/order-active.svg"
  2607. },
  2608. {
  2609. pagePath: "pages/mine/index",
  2610. text: "我的",
  2611. iconPath: "/static/tabbar/mine.svg",
  2612. selectedIconPath: "/static/tabbar/mine-active.svg"
  2613. }
  2614. ]);
  2615. const switchTab = (path) => {
  2616. if (props.currentPath === path)
  2617. return;
  2618. uni.switchTab({
  2619. url: "/" + path
  2620. });
  2621. };
  2622. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2623. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2624. return __returned__;
  2625. }
  2626. };
  2627. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  2628. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2629. vue.createElementVNode("view", { class: "tabbar-border" }),
  2630. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2631. (vue.openBlock(true), vue.createElementBlock(
  2632. vue.Fragment,
  2633. null,
  2634. vue.renderList($setup.list, (item, index) => {
  2635. return vue.openBlock(), vue.createElementBlock("view", {
  2636. class: "tabbar-item",
  2637. key: index,
  2638. onClick: ($event) => $setup.switchTab(item.pagePath)
  2639. }, [
  2640. vue.createElementVNode("image", {
  2641. class: "tabbar-icon",
  2642. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2643. }, null, 8, ["src"]),
  2644. vue.createElementVNode(
  2645. "view",
  2646. {
  2647. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2648. },
  2649. vue.toDisplayString(item.text),
  2650. 3
  2651. /* TEXT, CLASS */
  2652. )
  2653. ], 8, ["onClick"]);
  2654. }),
  2655. 128
  2656. /* KEYED_FRAGMENT */
  2657. ))
  2658. ])
  2659. ]);
  2660. }
  2661. const customTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-52454e90"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/components/custom-tabbar/index.vue"]]);
  2662. const logic$3 = {
  2663. components: {
  2664. customTabbar
  2665. },
  2666. data() {
  2667. return {
  2668. taskList: [],
  2669. currentFilter: "default",
  2670. // default, distance, time
  2671. filterCondition: "筛选条件",
  2672. sortDistance: "asc",
  2673. // asc, desc
  2674. sortTime: "asc",
  2675. scrollTop: 0,
  2676. // Track scroll position
  2677. isFilterShow: false,
  2678. tempFilter: {
  2679. service: null,
  2680. distance: "全部",
  2681. amount: "全部"
  2682. },
  2683. activeFilter: {
  2684. service: null,
  2685. distance: "全部",
  2686. amount: "全部"
  2687. },
  2688. workStatus: "resting",
  2689. // resting | busy | disabled
  2690. showConfirmModal: false,
  2691. showPetModal: false,
  2692. currentPetInfo: {},
  2693. showRejectModal: false,
  2694. rejectReason: "",
  2695. currentOrder: null,
  2696. showAcceptConfirmModal: false,
  2697. showNavModal: false,
  2698. navTargetItem: null,
  2699. navTargetPointType: "",
  2700. profile: null,
  2701. profileLoading: false,
  2702. serviceList: [],
  2703. orderStats: {
  2704. total: 0,
  2705. reject: 0,
  2706. completed: 0,
  2707. price: 0
  2708. }
  2709. };
  2710. },
  2711. onPageScroll(e) {
  2712. this.scrollTop = e.scrollTop;
  2713. },
  2714. async onLoad() {
  2715. this.checkWorkStatus();
  2716. await this.loadServiceList();
  2717. this.loadTaskList();
  2718. },
  2719. onShow() {
  2720. uni.hideTabBar();
  2721. this.checkWorkStatus();
  2722. if (isLoggedIn()) {
  2723. this.loadProfile();
  2724. this.loadOrderStats();
  2725. this.loadTaskList();
  2726. this.loadServiceList();
  2727. }
  2728. },
  2729. async onPullDownRefresh() {
  2730. this.checkWorkStatus();
  2731. try {
  2732. await this.loadServiceList();
  2733. const tasks = [
  2734. this.loadTaskList()
  2735. ];
  2736. if (isLoggedIn()) {
  2737. tasks.push(this.loadProfile());
  2738. tasks.push(this.loadOrderStats());
  2739. }
  2740. await Promise.all(tasks);
  2741. } catch (err) {
  2742. formatAppLog("error", "at pages/home/logic.js:90", "刷新异常:", err);
  2743. } finally {
  2744. uni.stopPullDownRefresh();
  2745. uni.showToast({ title: "刷新成功", icon: "success" });
  2746. }
  2747. },
  2748. methods: {
  2749. async loadProfile() {
  2750. if (this.profileLoading)
  2751. return;
  2752. this.profileLoading = true;
  2753. try {
  2754. const res = await getMyProfile();
  2755. const data = res.data || null;
  2756. this.profile = data;
  2757. if (data && data.status) {
  2758. this.workStatus = data.status;
  2759. uni.setStorageSync("workStatus", data.status);
  2760. }
  2761. } catch (err) {
  2762. formatAppLog("error", "at pages/home/logic.js:110", "获取个人信息失败:", err);
  2763. } finally {
  2764. this.profileLoading = false;
  2765. }
  2766. },
  2767. async loadServiceList() {
  2768. try {
  2769. const res = await listAllService();
  2770. this.serviceList = res.data || [];
  2771. } catch (err) {
  2772. formatAppLog("error", "at pages/home/logic.js:120", "获取服务类型失败:", err);
  2773. }
  2774. },
  2775. async loadOrderStats() {
  2776. try {
  2777. const res = await getOrderCount();
  2778. this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
  2779. } catch (err) {
  2780. formatAppLog("error", "at pages/home/logic.js:128", "获取订单统计失败:", err);
  2781. }
  2782. },
  2783. checkWorkStatus() {
  2784. const status = uni.getStorageSync("workStatus");
  2785. if (status) {
  2786. this.workStatus = status;
  2787. } else {
  2788. this.workStatus = "resting";
  2789. uni.setStorageSync("workStatus", "resting");
  2790. }
  2791. },
  2792. toggleFilter() {
  2793. if (this.workStatus === "resting")
  2794. return;
  2795. this.isFilterShow = !this.isFilterShow;
  2796. },
  2797. goToWorkStatus() {
  2798. uni.navigateTo({
  2799. url: "/pages/home/work-status"
  2800. });
  2801. },
  2802. startWork() {
  2803. this.showConfirmModal = true;
  2804. },
  2805. confirmStartWork() {
  2806. this.workStatus = "busy";
  2807. uni.setStorageSync("workStatus", "busy");
  2808. this.loadTaskList();
  2809. this.showConfirmModal = false;
  2810. uni.showToast({ title: "已开始接单", icon: "success" });
  2811. },
  2812. closeConfirmModal() {
  2813. this.showConfirmModal = false;
  2814. },
  2815. showPetProfile(item) {
  2816. this.currentPetInfo = item;
  2817. this.showPetModal = true;
  2818. },
  2819. closePetProfile() {
  2820. this.showPetModal = false;
  2821. },
  2822. openRejectModal(item) {
  2823. this.currentOrder = item;
  2824. this.rejectReason = "";
  2825. this.showRejectModal = true;
  2826. },
  2827. closeRejectModal() {
  2828. this.showRejectModal = false;
  2829. this.currentOrder = null;
  2830. },
  2831. async confirmReject() {
  2832. var _a;
  2833. if (!this.rejectReason.trim()) {
  2834. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2835. return;
  2836. }
  2837. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2838. return;
  2839. try {
  2840. uni.showLoading({ title: "提交中...", mask: true });
  2841. await rejectOrderApi({
  2842. orderId: this.currentOrder.id,
  2843. rejectReason: this.rejectReason
  2844. });
  2845. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2846. this.showRejectModal = false;
  2847. this.currentOrder = null;
  2848. this.loadTaskList();
  2849. this.loadOrderStats();
  2850. } catch (err) {
  2851. formatAppLog("error", "at pages/home/logic.js:197", "拒绝接单失败:", err);
  2852. uni.showToast({ title: "操作失败", icon: "none" });
  2853. } finally {
  2854. uni.hideLoading();
  2855. }
  2856. },
  2857. openAcceptModal(item) {
  2858. this.currentOrder = item;
  2859. this.showAcceptConfirmModal = true;
  2860. },
  2861. closeAcceptModal() {
  2862. this.showAcceptConfirmModal = false;
  2863. this.currentOrder = null;
  2864. },
  2865. async confirmAccept() {
  2866. var _a;
  2867. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2868. return;
  2869. try {
  2870. await acceptOrder(this.currentOrder.id);
  2871. uni.showToast({ title: "接单成功", icon: "success" });
  2872. this.showAcceptConfirmModal = false;
  2873. this.currentOrder = null;
  2874. this.loadTaskList();
  2875. this.loadProfile();
  2876. this.loadOrderStats();
  2877. } catch (err) {
  2878. formatAppLog("error", "at pages/home/logic.js:222", "接单失败:", err);
  2879. uni.showToast({ title: "接单失败", icon: "none" });
  2880. }
  2881. },
  2882. openNavigation(item, pointType) {
  2883. this.navTargetItem = item;
  2884. this.navTargetPointType = pointType;
  2885. this.showNavModal = true;
  2886. },
  2887. closeNavModal() {
  2888. this.showNavModal = false;
  2889. },
  2890. chooseMap(mapType) {
  2891. let item = this.navTargetItem;
  2892. let pointType = this.navTargetPointType;
  2893. let name = pointType === "start" ? item.startLocation : item.endLocation;
  2894. let address = pointType === "start" ? item.startAddress : item.endAddress;
  2895. this.showNavModal = false;
  2896. uni.openLocation({
  2897. latitude: 30.52,
  2898. // Mock lat
  2899. longitude: 114.31,
  2900. // Mock lng
  2901. name: name || "目的地",
  2902. address: address || "默认地址",
  2903. success: function() {
  2904. formatAppLog("log", "at pages/home/logic.js:248", "打开导航成功: " + mapType);
  2905. }
  2906. });
  2907. },
  2908. selectService(type) {
  2909. this.tempFilter.service = type;
  2910. },
  2911. selectDistance(type) {
  2912. this.tempFilter.distance = type;
  2913. },
  2914. selectAmount(type) {
  2915. this.tempFilter.amount = type;
  2916. },
  2917. resetFilter() {
  2918. this.tempFilter = {
  2919. service: null,
  2920. distance: "全部",
  2921. amount: "全部"
  2922. };
  2923. },
  2924. confirmFilter() {
  2925. this.activeFilter = { ...this.tempFilter };
  2926. this.isFilterShow = false;
  2927. this.loadTaskList();
  2928. },
  2929. closeFilter() {
  2930. this.isFilterShow = false;
  2931. },
  2932. goToDetail(item) {
  2933. formatAppLog("log", "at pages/home/logic.js:277", "Go to detail", item);
  2934. },
  2935. async loadTaskList() {
  2936. try {
  2937. const params = {
  2938. service: this.activeFilter.service,
  2939. minPrice: this.getMinPrice(),
  2940. maxPrice: this.getMaxPrice(),
  2941. pageNum: 1,
  2942. pageSize: 20
  2943. };
  2944. const res = await getPendingOrders(params);
  2945. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  2946. } catch (err) {
  2947. formatAppLog("error", "at pages/home/logic.js:291", "获取订单列表失败:", err);
  2948. uni.showToast({ title: "加载失败", icon: "none" });
  2949. this.taskList = [];
  2950. }
  2951. },
  2952. getMinPrice() {
  2953. const amount = this.activeFilter.amount;
  2954. if (amount === "100以下")
  2955. return 0;
  2956. if (amount === "100-200")
  2957. return 1e4;
  2958. if (amount === "200-500")
  2959. return 2e4;
  2960. if (amount === "500以上")
  2961. return 5e4;
  2962. return void 0;
  2963. },
  2964. getMaxPrice() {
  2965. const amount = this.activeFilter.amount;
  2966. if (amount === "100以下")
  2967. return 1e4;
  2968. if (amount === "100-200")
  2969. return 2e4;
  2970. if (amount === "200-500")
  2971. return 5e4;
  2972. return void 0;
  2973. },
  2974. transformOrder(item) {
  2975. const service = this.serviceList.find((s) => s.id === item.service);
  2976. const serviceText = (service == null ? void 0 : service.name) || "未知";
  2977. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  2978. const mode = (service == null ? void 0 : service.mode) || 0;
  2979. const isRoundTrip = mode === 1;
  2980. return {
  2981. id: item.id,
  2982. type: isRoundTrip ? 1 : item.service,
  2983. typeText: serviceText,
  2984. typeIcon: serviceIcon,
  2985. price: (item.price / 100).toFixed(2),
  2986. timeLabel: "服务时间",
  2987. time: item.serviceTime,
  2988. petAvatar: item.petAvatar || "/static/dog.png",
  2989. petAvatarUrl: item.petAvatarUrl || "",
  2990. petName: item.petName,
  2991. petBreed: item.breed,
  2992. petGender: "M",
  2993. petAge: "",
  2994. petWeight: "",
  2995. petPersonality: "",
  2996. petHobby: "",
  2997. petRemark: "",
  2998. petTags: [],
  2999. petLogs: [],
  3000. startLocation: isRoundTrip ? item.fromAddress : "",
  3001. startAddress: isRoundTrip ? item.fromAddress : "",
  3002. startDistance: "0km",
  3003. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  3004. endAddress: item.toAddress,
  3005. endDistance: "0km",
  3006. serviceContent: "",
  3007. remark: item.remark || ""
  3008. };
  3009. },
  3010. setFilter(type) {
  3011. this.currentFilter = type;
  3012. if (type === "distance") {
  3013. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  3014. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  3015. } else if (type === "time") {
  3016. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  3017. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  3018. }
  3019. },
  3020. showFilterDropdown() {
  3021. this.toggleFilter();
  3022. }
  3023. }
  3024. };
  3025. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  3026. const _sfc_main$t = {
  3027. ...logic$3
  3028. };
  3029. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  3030. var _a, _b, _c;
  3031. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  3032. return vue.openBlock(), vue.createElementBlock(
  3033. vue.Fragment,
  3034. null,
  3035. [
  3036. vue.createElementVNode("view", { class: "container" }, [
  3037. vue.createElementVNode(
  3038. "view",
  3039. {
  3040. class: "custom-nav-bar",
  3041. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  3042. },
  3043. [
  3044. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  3045. ],
  3046. 4
  3047. /* STYLE */
  3048. ),
  3049. vue.createElementVNode("view", { class: "nav-bg" }, [
  3050. vue.createElementVNode("view", { class: "bg-circle-left" }),
  3051. vue.createElementVNode("view", { class: "bg-circle-right" })
  3052. ]),
  3053. vue.createElementVNode("view", { class: "header-section" }, [
  3054. vue.createElementVNode("view", { class: "user-info" }, [
  3055. vue.createElementVNode("image", {
  3056. class: "avatar",
  3057. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  3058. mode: "aspectFill"
  3059. }, null, 8, ["src"]),
  3060. vue.createElementVNode("view", { class: "info-content" }, [
  3061. vue.createElementVNode("view", { class: "top-row" }, [
  3062. vue.createElementVNode(
  3063. "text",
  3064. { class: "name" },
  3065. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  3066. 1
  3067. /* TEXT */
  3068. ),
  3069. vue.createElementVNode(
  3070. "view",
  3071. {
  3072. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus !== "busy" }]),
  3073. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3074. },
  3075. [
  3076. vue.createElementVNode(
  3077. "view",
  3078. {
  3079. class: vue.normalizeClass(["status-dot-bg", { "busy": _ctx.workStatus === "busy", "disabled": _ctx.workStatus === "disabled" }])
  3080. },
  3081. [
  3082. _ctx.workStatus === "busy" ? (vue.openBlock(), vue.createElementBlock("text", {
  3083. key: 0,
  3084. class: "check-mark"
  3085. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3086. key: 1,
  3087. class: "check-mark",
  3088. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3089. }, "✕"))
  3090. ],
  3091. 2
  3092. /* CLASS */
  3093. ),
  3094. vue.createElementVNode(
  3095. "text",
  3096. { class: "status-text" },
  3097. vue.toDisplayString(_ctx.workStatus === "busy" ? "接单中" : _ctx.workStatus === "resting" ? "正在休息" : "已禁用"),
  3098. 1
  3099. /* TEXT */
  3100. ),
  3101. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3102. ],
  3103. 2
  3104. /* CLASS */
  3105. )
  3106. ]),
  3107. vue.createElementVNode("view", { class: "bottom-row" }, [
  3108. vue.createElementVNode(
  3109. "text",
  3110. { class: "city-label" },
  3111. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3112. 1
  3113. /* TEXT */
  3114. ),
  3115. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3116. ])
  3117. ])
  3118. ]),
  3119. vue.createElementVNode("view", { class: "stats-card" }, [
  3120. vue.createElementVNode("view", { class: "stat-item" }, [
  3121. vue.createElementVNode(
  3122. "text",
  3123. { class: "num" },
  3124. vue.toDisplayString(_ctx.orderStats.total),
  3125. 1
  3126. /* TEXT */
  3127. ),
  3128. vue.createElementVNode("text", { class: "label" }, "全部订单")
  3129. ]),
  3130. vue.createElementVNode("view", { class: "divider" }),
  3131. vue.createElementVNode("view", { class: "stat-item" }, [
  3132. vue.createElementVNode(
  3133. "text",
  3134. { class: "num" },
  3135. vue.toDisplayString(_ctx.orderStats.reject),
  3136. 1
  3137. /* TEXT */
  3138. ),
  3139. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3140. ]),
  3141. vue.createElementVNode("view", { class: "divider" }),
  3142. vue.createElementVNode("view", { class: "stat-item" }, [
  3143. vue.createElementVNode(
  3144. "text",
  3145. { class: "num" },
  3146. vue.toDisplayString(_ctx.orderStats.completed),
  3147. 1
  3148. /* TEXT */
  3149. ),
  3150. vue.createElementVNode("text", { class: "label" }, "完成订单")
  3151. ]),
  3152. vue.createElementVNode("view", { class: "divider" }),
  3153. vue.createElementVNode("view", { class: "stat-item" }, [
  3154. vue.createElementVNode(
  3155. "text",
  3156. { class: "num" },
  3157. vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
  3158. 1
  3159. /* TEXT */
  3160. ),
  3161. vue.createElementVNode("text", { class: "label" }, "服务总得")
  3162. ])
  3163. ])
  3164. ]),
  3165. vue.createElementVNode("view", { class: "task-header" }, [
  3166. vue.createElementVNode(
  3167. "view",
  3168. {
  3169. class: "header-inner",
  3170. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3171. },
  3172. [
  3173. vue.createElementVNode("view", { class: "left-title" }, [
  3174. vue.createElementVNode("view", { class: "orange-bar" }),
  3175. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3176. vue.createElementVNode(
  3177. "text",
  3178. { class: "count" },
  3179. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3180. 1
  3181. /* TEXT */
  3182. )
  3183. ]),
  3184. vue.createElementVNode("view", { class: "filter-options" }, [
  3185. vue.createElementVNode("view", {
  3186. class: "dropdown",
  3187. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3188. }, [
  3189. vue.createElementVNode("text", null, "筛选条件"),
  3190. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3191. ])
  3192. ])
  3193. ],
  3194. 4
  3195. /* STYLE */
  3196. ),
  3197. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3198. key: 0,
  3199. class: "filter-mask",
  3200. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3201. })) : vue.createCommentVNode("v-if", true),
  3202. vue.createElementVNode(
  3203. "view",
  3204. {
  3205. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3206. },
  3207. [
  3208. vue.createElementVNode("view", { class: "filter-section" }, [
  3209. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3210. vue.createElementVNode("view", { class: "options-grid" }, [
  3211. vue.createElementVNode(
  3212. "view",
  3213. {
  3214. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3215. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3216. },
  3217. "全部",
  3218. 2
  3219. /* CLASS */
  3220. ),
  3221. (vue.openBlock(true), vue.createElementBlock(
  3222. vue.Fragment,
  3223. null,
  3224. vue.renderList(_ctx.serviceList, (item) => {
  3225. return vue.openBlock(), vue.createElementBlock("view", {
  3226. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3227. key: item.id,
  3228. onClick: ($event) => _ctx.selectService(item.id)
  3229. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3230. }),
  3231. 128
  3232. /* KEYED_FRAGMENT */
  3233. ))
  3234. ])
  3235. ]),
  3236. vue.createElementVNode("view", { class: "filter-section" }, [
  3237. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3238. vue.createElementVNode("view", { class: "options-grid" }, [
  3239. vue.createElementVNode(
  3240. "view",
  3241. {
  3242. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3243. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3244. },
  3245. "全部",
  3246. 2
  3247. /* CLASS */
  3248. ),
  3249. vue.createElementVNode(
  3250. "view",
  3251. {
  3252. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3253. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3254. },
  3255. "100以下",
  3256. 2
  3257. /* CLASS */
  3258. ),
  3259. vue.createElementVNode(
  3260. "view",
  3261. {
  3262. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3263. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3264. },
  3265. "100-200",
  3266. 2
  3267. /* CLASS */
  3268. ),
  3269. vue.createElementVNode(
  3270. "view",
  3271. {
  3272. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3273. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3274. },
  3275. "200-500",
  3276. 2
  3277. /* CLASS */
  3278. ),
  3279. vue.createElementVNode(
  3280. "view",
  3281. {
  3282. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3283. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3284. },
  3285. "500以上",
  3286. 2
  3287. /* CLASS */
  3288. )
  3289. ])
  3290. ]),
  3291. vue.createElementVNode("view", { class: "filter-actions" }, [
  3292. vue.createElementVNode("button", {
  3293. class: "action-btn reset",
  3294. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3295. }, "重置"),
  3296. vue.createElementVNode("button", {
  3297. class: "action-btn confirm",
  3298. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3299. }, "确认")
  3300. ])
  3301. ],
  3302. 2
  3303. /* CLASS */
  3304. )
  3305. ]),
  3306. vue.createElementVNode("view", { class: "task-list-container" }, [
  3307. vue.createElementVNode("view", { class: "task-list" }, [
  3308. (vue.openBlock(true), vue.createElementBlock(
  3309. vue.Fragment,
  3310. null,
  3311. vue.renderList(_ctx.taskList, (item) => {
  3312. return vue.openBlock(), vue.createElementBlock("view", {
  3313. class: "task-card",
  3314. key: item.id,
  3315. onClick: ($event) => _ctx.goToDetail(item)
  3316. }, [
  3317. vue.createElementVNode("view", { class: "card-header" }, [
  3318. vue.createElementVNode("view", { class: "type-badge" }, [
  3319. vue.createElementVNode("image", {
  3320. class: "type-icon",
  3321. src: item.typeIcon
  3322. }, null, 8, ["src"]),
  3323. vue.createElementVNode(
  3324. "text",
  3325. { class: "type-text" },
  3326. vue.toDisplayString(item.typeText),
  3327. 1
  3328. /* TEXT */
  3329. )
  3330. ]),
  3331. vue.createElementVNode(
  3332. "text",
  3333. { class: "price" },
  3334. "¥" + vue.toDisplayString(item.price),
  3335. 1
  3336. /* TEXT */
  3337. )
  3338. ]),
  3339. vue.createElementVNode("view", { class: "card-body" }, [
  3340. vue.createElementVNode("view", { class: "time-row" }, [
  3341. vue.createElementVNode(
  3342. "text",
  3343. { class: "label" },
  3344. vue.toDisplayString(item.timeLabel) + ":",
  3345. 1
  3346. /* TEXT */
  3347. ),
  3348. vue.createElementVNode(
  3349. "text",
  3350. { class: "value" },
  3351. vue.toDisplayString(item.time),
  3352. 1
  3353. /* TEXT */
  3354. )
  3355. ]),
  3356. vue.createElementVNode("view", { class: "pet-card" }, [
  3357. vue.createElementVNode("image", {
  3358. class: "pet-avatar",
  3359. src: item.petAvatarUrl || item.petAvatar,
  3360. mode: "aspectFill"
  3361. }, null, 8, ["src"]),
  3362. vue.createElementVNode("view", { class: "pet-info" }, [
  3363. vue.createElementVNode(
  3364. "text",
  3365. { class: "pet-name" },
  3366. vue.toDisplayString(item.petName),
  3367. 1
  3368. /* TEXT */
  3369. ),
  3370. vue.createElementVNode(
  3371. "text",
  3372. { class: "pet-breed" },
  3373. "品种: " + vue.toDisplayString(item.petBreed),
  3374. 1
  3375. /* TEXT */
  3376. )
  3377. ])
  3378. ]),
  3379. vue.createElementVNode("view", { class: "route-info" }, [
  3380. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3381. vue.Fragment,
  3382. { key: 0 },
  3383. [
  3384. vue.createElementVNode("view", {
  3385. class: "route-item",
  3386. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3387. }, [
  3388. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  3389. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3390. vue.createElementVNode("view", { class: "address-box" }, [
  3391. vue.createElementVNode(
  3392. "text",
  3393. { class: "addr-title" },
  3394. vue.toDisplayString(item.startLocation),
  3395. 1
  3396. /* TEXT */
  3397. ),
  3398. vue.createElementVNode(
  3399. "text",
  3400. { class: "addr-desc" },
  3401. vue.toDisplayString(item.startAddress),
  3402. 1
  3403. /* TEXT */
  3404. )
  3405. ]),
  3406. vue.createElementVNode("image", {
  3407. class: "nav-arrow",
  3408. src: _imports_3$2,
  3409. style: { "flex-shrink": "0", "align-self": "center" }
  3410. })
  3411. ], 8, ["onClick"]),
  3412. vue.createElementVNode("view", {
  3413. class: "route-item",
  3414. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3415. }, [
  3416. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  3417. vue.createElementVNode("view", { class: "address-box" }, [
  3418. vue.createElementVNode(
  3419. "text",
  3420. { class: "addr-title" },
  3421. vue.toDisplayString(item.endLocation),
  3422. 1
  3423. /* TEXT */
  3424. ),
  3425. vue.createElementVNode(
  3426. "text",
  3427. { class: "addr-desc" },
  3428. vue.toDisplayString(item.endAddress),
  3429. 1
  3430. /* TEXT */
  3431. )
  3432. ]),
  3433. vue.createElementVNode("image", {
  3434. class: "nav-arrow",
  3435. src: _imports_3$2,
  3436. style: { "flex-shrink": "0", "align-self": "center" }
  3437. })
  3438. ], 8, ["onClick"])
  3439. ],
  3440. 64
  3441. /* STABLE_FRAGMENT */
  3442. )) : (vue.openBlock(), vue.createElementBlock(
  3443. vue.Fragment,
  3444. { key: 1 },
  3445. [
  3446. vue.createElementVNode("view", {
  3447. class: "route-item",
  3448. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3449. }, [
  3450. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3451. vue.createElementVNode("view", { class: "address-box" }, [
  3452. vue.createElementVNode(
  3453. "text",
  3454. { class: "addr-title" },
  3455. vue.toDisplayString(item.endLocation),
  3456. 1
  3457. /* TEXT */
  3458. ),
  3459. vue.createElementVNode(
  3460. "text",
  3461. { class: "addr-desc" },
  3462. vue.toDisplayString(item.endAddress),
  3463. 1
  3464. /* TEXT */
  3465. )
  3466. ]),
  3467. vue.createElementVNode("image", {
  3468. class: "nav-arrow",
  3469. src: _imports_3$2,
  3470. style: { "flex-shrink": "0", "align-self": "center" }
  3471. })
  3472. ], 8, ["onClick"]),
  3473. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3474. key: 0,
  3475. class: "service-content"
  3476. }, [
  3477. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3478. vue.createElementVNode(
  3479. "text",
  3480. null,
  3481. vue.toDisplayString(item.serviceContent),
  3482. 1
  3483. /* TEXT */
  3484. )
  3485. ])) : vue.createCommentVNode("v-if", true)
  3486. ],
  3487. 64
  3488. /* STABLE_FRAGMENT */
  3489. ))
  3490. ]),
  3491. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3492. key: 0,
  3493. class: "remark-box"
  3494. }, [
  3495. vue.createElementVNode(
  3496. "text",
  3497. null,
  3498. "备注:" + vue.toDisplayString(item.remark),
  3499. 1
  3500. /* TEXT */
  3501. )
  3502. ])) : vue.createCommentVNode("v-if", true)
  3503. ]),
  3504. vue.createElementVNode("view", { class: "action-btns" }, [
  3505. vue.createElementVNode("button", {
  3506. class: "btn reject",
  3507. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3508. }, "拒绝", 8, ["onClick"]),
  3509. vue.createElementVNode("button", {
  3510. class: "btn accept",
  3511. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3512. }, "接单", 8, ["onClick"])
  3513. ])
  3514. ], 8, ["onClick"]);
  3515. }),
  3516. 128
  3517. /* KEYED_FRAGMENT */
  3518. )),
  3519. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3520. ])
  3521. ]),
  3522. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3523. key: 0,
  3524. class: "modal-mask"
  3525. }, [
  3526. vue.createElementVNode("view", { class: "custom-modal" }, [
  3527. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3528. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3529. vue.createElementVNode("view", { class: "modal-btns" }, [
  3530. vue.createElementVNode("button", {
  3531. class: "modal-btn cancel",
  3532. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3533. }, "取消"),
  3534. vue.createElementVNode("button", {
  3535. class: "modal-btn confirm",
  3536. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3537. }, "确定")
  3538. ])
  3539. ])
  3540. ])) : vue.createCommentVNode("v-if", true),
  3541. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3542. key: 1,
  3543. class: "pet-modal-mask",
  3544. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3545. }, [
  3546. vue.createElementVNode("view", {
  3547. class: "pet-modal-content",
  3548. onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
  3549. }, ["stop"]))
  3550. }, [
  3551. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3552. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3553. vue.createElementVNode("view", {
  3554. class: "close-icon-btn",
  3555. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3556. }, "×")
  3557. ]),
  3558. vue.createElementVNode("scroll-view", {
  3559. "scroll-y": "",
  3560. class: "pet-modal-scroll"
  3561. }, [
  3562. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3563. vue.createElementVNode("image", {
  3564. class: "pm-avatar",
  3565. src: _ctx.currentPetInfo.petAvatar,
  3566. mode: "aspectFill"
  3567. }, null, 8, ["src"]),
  3568. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3569. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3570. vue.createElementVNode(
  3571. "text",
  3572. { class: "pm-name" },
  3573. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3574. 1
  3575. /* TEXT */
  3576. ),
  3577. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3578. key: 0,
  3579. class: "pm-gender"
  3580. }, [
  3581. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3582. vue.createElementVNode("text", null, "公")
  3583. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3584. key: 1,
  3585. class: "pm-gender female"
  3586. }, [
  3587. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3588. vue.createElementVNode("text", null, "母")
  3589. ])) : vue.createCommentVNode("v-if", true)
  3590. ]),
  3591. vue.createElementVNode(
  3592. "text",
  3593. { class: "pm-breed" },
  3594. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3595. 1
  3596. /* TEXT */
  3597. )
  3598. ])
  3599. ]),
  3600. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3601. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3602. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3603. vue.createElementVNode(
  3604. "text",
  3605. { class: "pm-val" },
  3606. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3607. 1
  3608. /* TEXT */
  3609. )
  3610. ]),
  3611. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3612. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3613. vue.createElementVNode(
  3614. "text",
  3615. { class: "pm-val" },
  3616. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3617. 1
  3618. /* TEXT */
  3619. )
  3620. ]),
  3621. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3622. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3623. vue.createElementVNode(
  3624. "text",
  3625. { class: "pm-val" },
  3626. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3627. 1
  3628. /* TEXT */
  3629. )
  3630. ]),
  3631. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3632. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3633. vue.createElementVNode(
  3634. "text",
  3635. { class: "pm-val" },
  3636. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3637. 1
  3638. /* TEXT */
  3639. )
  3640. ]),
  3641. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3642. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3643. vue.createElementVNode(
  3644. "text",
  3645. { class: "pm-val" },
  3646. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3647. 1
  3648. /* TEXT */
  3649. )
  3650. ])
  3651. ]),
  3652. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3653. key: 0,
  3654. class: "pm-tags"
  3655. }, [
  3656. (vue.openBlock(true), vue.createElementBlock(
  3657. vue.Fragment,
  3658. null,
  3659. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3660. return vue.openBlock(), vue.createElementBlock(
  3661. "view",
  3662. {
  3663. class: "pm-tag",
  3664. key: index
  3665. },
  3666. vue.toDisplayString(tag),
  3667. 1
  3668. /* TEXT */
  3669. );
  3670. }),
  3671. 128
  3672. /* KEYED_FRAGMENT */
  3673. ))
  3674. ])) : vue.createCommentVNode("v-if", true),
  3675. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3676. vue.createElementVNode("view", { class: "orange-bar" }),
  3677. vue.createElementVNode("text", null, "备注日志")
  3678. ]),
  3679. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3680. (vue.openBlock(true), vue.createElementBlock(
  3681. vue.Fragment,
  3682. null,
  3683. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3684. return vue.openBlock(), vue.createElementBlock("view", {
  3685. class: "pm-log-item",
  3686. key: lIndex
  3687. }, [
  3688. vue.createElementVNode(
  3689. "text",
  3690. { class: "pm-log-date" },
  3691. vue.toDisplayString(log.date),
  3692. 1
  3693. /* TEXT */
  3694. ),
  3695. vue.createElementVNode(
  3696. "text",
  3697. { class: "pm-log-text" },
  3698. vue.toDisplayString(log.content),
  3699. 1
  3700. /* TEXT */
  3701. ),
  3702. vue.createElementVNode(
  3703. "text",
  3704. { class: "pm-log-recorder" },
  3705. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3706. 1
  3707. /* TEXT */
  3708. )
  3709. ]);
  3710. }),
  3711. 128
  3712. /* KEYED_FRAGMENT */
  3713. ))
  3714. ]),
  3715. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3716. vue.createElementVNode("button", {
  3717. class: "pm-bottom-close",
  3718. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3719. }, "关闭"),
  3720. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3721. ])
  3722. ])
  3723. ])) : vue.createCommentVNode("v-if", true)
  3724. ]),
  3725. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3726. key: 0,
  3727. class: "modal-mask"
  3728. }, [
  3729. vue.createElementVNode("view", { class: "custom-modal" }, [
  3730. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3731. vue.withDirectives(vue.createElementVNode(
  3732. "textarea",
  3733. {
  3734. class: "reject-textarea",
  3735. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
  3736. placeholder: "请输入拒绝理由(必填)",
  3737. maxlength: "100"
  3738. },
  3739. null,
  3740. 512
  3741. /* NEED_PATCH */
  3742. ), [
  3743. [vue.vModelText, _ctx.rejectReason]
  3744. ]),
  3745. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3746. vue.createElementVNode("button", {
  3747. class: "modal-btn cancel",
  3748. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3749. }, "取消"),
  3750. vue.createElementVNode("button", {
  3751. class: "modal-btn confirm",
  3752. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3753. }, "提交")
  3754. ])
  3755. ])
  3756. ])) : vue.createCommentVNode("v-if", true),
  3757. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3758. key: 1,
  3759. class: "modal-mask"
  3760. }, [
  3761. vue.createElementVNode("view", { class: "custom-modal" }, [
  3762. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3763. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3764. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3765. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3766. ]),
  3767. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3768. vue.createElementVNode("button", {
  3769. class: "modal-btn cancel",
  3770. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3771. }, "再想想"),
  3772. vue.createElementVNode("button", {
  3773. class: "modal-btn confirm",
  3774. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3775. }, "确认接单")
  3776. ])
  3777. ])
  3778. ])) : vue.createCommentVNode("v-if", true),
  3779. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3780. key: 2,
  3781. class: "nav-modal-mask",
  3782. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3783. }, [
  3784. vue.createElementVNode("view", {
  3785. class: "nav-action-sheet",
  3786. onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
  3787. }, ["stop"]))
  3788. }, [
  3789. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3790. vue.createElementVNode("view", {
  3791. class: "nav-sheet-item",
  3792. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
  3793. }, "高德地图"),
  3794. vue.createElementVNode("view", {
  3795. class: "nav-sheet-item",
  3796. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
  3797. }, "腾讯地图"),
  3798. vue.createElementVNode("view", {
  3799. class: "nav-sheet-item",
  3800. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
  3801. }, "百度地图"),
  3802. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3803. vue.createElementVNode("view", {
  3804. class: "nav-sheet-item cancel",
  3805. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3806. }, "取消")
  3807. ])
  3808. ])) : vue.createCommentVNode("v-if", true),
  3809. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3810. ],
  3811. 64
  3812. /* STABLE_FRAGMENT */
  3813. );
  3814. }
  3815. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3816. const _sfc_main$s = {
  3817. data() {
  3818. return {
  3819. status: "resting",
  3820. // resting | busy | disabled
  3821. loading: false
  3822. };
  3823. },
  3824. onShow() {
  3825. const savedStatus = uni.getStorageSync("workStatus");
  3826. if (savedStatus) {
  3827. this.status = savedStatus;
  3828. }
  3829. this.fetchLatestProfile();
  3830. },
  3831. methods: {
  3832. async fetchLatestProfile() {
  3833. try {
  3834. const res = await getMyProfile();
  3835. if (res.data && res.data.status) {
  3836. this.status = res.data.status;
  3837. uni.setStorageSync("workStatus", this.status);
  3838. }
  3839. } catch (err) {
  3840. formatAppLog("error", "at pages/home/work-status.vue:64", "获取状态失败:", err);
  3841. }
  3842. },
  3843. async toggleStatus() {
  3844. if (this.loading)
  3845. return;
  3846. const targetStatus = this.status === "busy" ? "resting" : "busy";
  3847. const actionText = targetStatus === "busy" ? "恢复接单" : "停止接单";
  3848. try {
  3849. uni.showLoading({ title: "处理中...", mask: true });
  3850. this.loading = true;
  3851. await updateStatus(targetStatus);
  3852. await this.fetchLatestProfile();
  3853. uni.hideLoading();
  3854. uni.showToast({ title: actionText + "成功", icon: "success" });
  3855. } catch (err) {
  3856. uni.hideLoading();
  3857. formatAppLog("error", "at pages/home/work-status.vue:88", "切换状态失败:", err);
  3858. uni.showToast({ title: "操作失败,请重试", icon: "none" });
  3859. } finally {
  3860. this.loading = false;
  3861. }
  3862. }
  3863. }
  3864. };
  3865. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  3866. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3867. vue.createElementVNode("view", { class: "signboard-container" }, [
  3868. vue.createElementVNode("view", { class: "rope" }),
  3869. vue.createElementVNode("view", { class: "nail" }),
  3870. vue.createElementVNode(
  3871. "view",
  3872. {
  3873. class: vue.normalizeClass(["board", { "resting": $data.status !== "busy" }])
  3874. },
  3875. [
  3876. vue.createElementVNode("view", { class: "screw top-left" }),
  3877. vue.createElementVNode("view", { class: "screw top-right" }),
  3878. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3879. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3880. vue.createElementVNode("view", { class: "board-inner" }, [
  3881. vue.createElementVNode(
  3882. "text",
  3883. { class: "status-text" },
  3884. vue.toDisplayString($data.status === "busy" ? "接单中" : "休息中"),
  3885. 1
  3886. /* TEXT */
  3887. )
  3888. ])
  3889. ],
  3890. 2
  3891. /* CLASS */
  3892. )
  3893. ]),
  3894. vue.createElementVNode("view", { class: "status-desc" }, [
  3895. vue.createElementVNode(
  3896. "text",
  3897. null,
  3898. vue.toDisplayString($data.status === "busy" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  3899. 1
  3900. /* TEXT */
  3901. )
  3902. ]),
  3903. vue.createElementVNode("view", { class: "action-area" }, [
  3904. vue.createElementVNode(
  3905. "button",
  3906. {
  3907. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "busy", "start": $data.status !== "busy" }]),
  3908. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  3909. },
  3910. vue.toDisplayString($data.status === "busy" ? "停止接单" : "开始接单"),
  3911. 3
  3912. /* TEXT, CLASS */
  3913. ),
  3914. vue.createElementVNode("view", { class: "tips" }, [
  3915. $data.status === "busy" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  3916. ])
  3917. ])
  3918. ]);
  3919. }
  3920. const PagesHomeWorkStatus = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/work-status.vue"]]);
  3921. const logic$2 = {
  3922. components: {
  3923. customTabbar
  3924. },
  3925. data() {
  3926. return {
  3927. currentTab: 0,
  3928. tabs: ["待接送/服务", "配送/服务中", "已完成", "已取消"],
  3929. typeFilterOptions: ["全部类型"],
  3930. currentTypeFilterIdx: 0,
  3931. activeDropdown: 0,
  3932. hasTimeFilter: false,
  3933. currentMonth: "2026年2月",
  3934. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  3935. calendarDays: [],
  3936. selectedDateRange: [],
  3937. allOrderList: [],
  3938. serviceList: [],
  3939. searchContent: "",
  3940. startServiceTime: "",
  3941. endServiceTime: "",
  3942. showPetModal: false,
  3943. currentPetInfo: {},
  3944. showNavModal: false,
  3945. navTargetItem: null,
  3946. navTargetPointType: "",
  3947. activeCallItem: null,
  3948. showRemarkInput: false,
  3949. remarkText: ""
  3950. };
  3951. },
  3952. created() {
  3953. this.initCalendar();
  3954. },
  3955. async onLoad() {
  3956. await this.loadServiceList();
  3957. await this.loadOrders();
  3958. },
  3959. onShow() {
  3960. uni.hideTabBar();
  3961. this.loadOrders();
  3962. },
  3963. async onPullDownRefresh() {
  3964. try {
  3965. await this.loadServiceList();
  3966. await this.loadOrders();
  3967. } finally {
  3968. uni.stopPullDownRefresh();
  3969. }
  3970. },
  3971. watch: {
  3972. currentTab() {
  3973. this.loadOrders();
  3974. },
  3975. currentTypeFilterIdx() {
  3976. this.loadOrders();
  3977. },
  3978. searchContent() {
  3979. this.loadOrders();
  3980. }
  3981. },
  3982. computed: {
  3983. orderList() {
  3984. return this.allOrderList;
  3985. }
  3986. },
  3987. methods: {
  3988. async loadServiceList() {
  3989. try {
  3990. const res = await listAllService();
  3991. this.serviceList = res.data || [];
  3992. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  3993. } catch (err) {
  3994. formatAppLog("error", "at pages/orders/logic.js:83", "获取服务类型失败:", err);
  3995. }
  3996. },
  3997. async loadOrders() {
  3998. var _a;
  3999. try {
  4000. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  4001. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  4002. const params = {
  4003. status: statusMap[this.currentTab],
  4004. content: this.searchContent || void 0,
  4005. service: serviceId,
  4006. startServiceTime: this.startServiceTime || void 0,
  4007. endServiceTime: this.endServiceTime || void 0
  4008. };
  4009. formatAppLog("log", "at pages/orders/logic.js:97", "订单列表请求参数:", params);
  4010. const res = await getMyOrders(params);
  4011. formatAppLog("log", "at pages/orders/logic.js:99", "订单列表响应:", res);
  4012. const orders = res.rows || [];
  4013. formatAppLog("log", "at pages/orders/logic.js:101", "订单数量:", orders.length);
  4014. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  4015. } catch (err) {
  4016. formatAppLog("error", "at pages/orders/logic.js:104", "获取订单列表失败:", err);
  4017. this.allOrderList = [];
  4018. }
  4019. },
  4020. transformOrder(order, tabIndex) {
  4021. const service = this.serviceList.find((s) => s.id === order.service);
  4022. const serviceText = (service == null ? void 0 : service.name) || "未知";
  4023. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  4024. const mode = (service == null ? void 0 : service.mode) || 0;
  4025. const isRoundTrip = mode === 1;
  4026. let statusText = "接单";
  4027. if (tabIndex === 0) {
  4028. statusText = "接单";
  4029. } else if (tabIndex === 1) {
  4030. statusText = isRoundTrip ? "出发" : "开始";
  4031. } else if (tabIndex === 2) {
  4032. statusText = "已完成";
  4033. } else if (tabIndex === 3) {
  4034. statusText = "已拒绝";
  4035. }
  4036. return {
  4037. id: order.id,
  4038. status: order.status,
  4039. // 保存原始 status 用于判断权限
  4040. type: isRoundTrip ? 1 : 2,
  4041. typeText: serviceText,
  4042. typeIcon: serviceIcon,
  4043. statusText,
  4044. price: (order.price / 100).toFixed(2),
  4045. timeLabel: "服务时间",
  4046. time: order.serviceTime || "",
  4047. petAvatar: order.petAvatar || "/static/dog.png",
  4048. petAvatarUrl: order.petAvatarUrl || "",
  4049. petName: order.petName || "",
  4050. petBreed: order.breed || "",
  4051. startLocation: order.fromAddress || "",
  4052. startAddress: order.fromAddress || "",
  4053. startDistance: "0km",
  4054. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  4055. endAddress: order.toAddress || "",
  4056. customerPhone: order.customerPhone || "",
  4057. endDistance: "0km",
  4058. serviceContent: order.remark || "",
  4059. remark: order.remark || ""
  4060. };
  4061. },
  4062. getDisplayStatus(item) {
  4063. if (item.statusText === "已完成")
  4064. return "已完成";
  4065. if (item.statusText === "已拒绝")
  4066. return "已拒绝";
  4067. if (item.statusText === "接单") {
  4068. return item.type === 1 ? "待接送" : "待服务";
  4069. }
  4070. return item.type === 1 ? "配送中" : "服务中";
  4071. },
  4072. getStatusClass(item) {
  4073. let display = this.getDisplayStatus(item);
  4074. if (display === "已完成")
  4075. return "finish";
  4076. if (display === "已拒绝")
  4077. return "reject";
  4078. if (display === "配送中" || display === "服务中")
  4079. return "processing";
  4080. return "highlight";
  4081. },
  4082. goToDetail(item) {
  4083. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4084. },
  4085. showPetProfile(item) {
  4086. this.currentPetInfo = {
  4087. ...item,
  4088. petGender: "M",
  4089. petAge: "2岁",
  4090. petWeight: "15kg",
  4091. petPersonality: "活泼亲人,精力旺盛",
  4092. petHobby: "喜欢追飞盘,爱吃肉干",
  4093. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4094. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4095. petLogs: [
  4096. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4097. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4098. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4099. ]
  4100. };
  4101. this.showPetModal = true;
  4102. },
  4103. closePetProfile() {
  4104. this.showPetModal = false;
  4105. },
  4106. openNavigation(item, pointType) {
  4107. this.navTargetItem = item;
  4108. this.navTargetPointType = pointType;
  4109. this.showNavModal = true;
  4110. },
  4111. closeNavModal() {
  4112. this.showNavModal = false;
  4113. },
  4114. chooseMap(mapType) {
  4115. let item = this.navTargetItem;
  4116. let pointType = this.navTargetPointType;
  4117. let name = pointType === "start" ? item.startLocation : item.endLocation;
  4118. let address = pointType === "start" ? item.startAddress : item.endAddress;
  4119. this.showNavModal = false;
  4120. uni.openLocation({
  4121. latitude: 30.52,
  4122. longitude: 114.31,
  4123. name: name || "目的地",
  4124. address: address || "默认地址",
  4125. success: function() {
  4126. formatAppLog("log", "at pages/orders/logic.js:210", "打开导航成功: " + mapType);
  4127. }
  4128. });
  4129. },
  4130. toggleCallMenu(item) {
  4131. if (this.activeCallItem === item) {
  4132. this.activeCallItem = null;
  4133. } else {
  4134. this.activeCallItem = item;
  4135. }
  4136. },
  4137. closeCallMenu() {
  4138. this.activeCallItem = null;
  4139. },
  4140. doCall(type, item) {
  4141. let phoneNum = "";
  4142. const targetItem = item || this.activeCallItem;
  4143. if (type === "merchant") {
  4144. phoneNum = "18900008451";
  4145. } else if (type === "customer") {
  4146. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  4147. }
  4148. if (phoneNum) {
  4149. uni.makePhoneCall({ phoneNumber: phoneNum });
  4150. }
  4151. this.activeCallItem = null;
  4152. },
  4153. reportAbnormal(item) {
  4154. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4155. },
  4156. toggleDropdown(idx) {
  4157. if (this.activeDropdown === idx) {
  4158. this.activeDropdown = 0;
  4159. } else {
  4160. this.activeDropdown = idx;
  4161. }
  4162. },
  4163. closeDropdown() {
  4164. this.activeDropdown = 0;
  4165. },
  4166. selectType(index) {
  4167. this.currentTypeFilterIdx = index;
  4168. this.closeDropdown();
  4169. },
  4170. initCalendar() {
  4171. let days = [];
  4172. for (let i = 1; i <= 28; i++) {
  4173. days.push(i);
  4174. }
  4175. this.calendarDays = days;
  4176. this.selectedDateRange = [2, 4];
  4177. },
  4178. prevMonth() {
  4179. uni.showToast({ title: "上个月", icon: "none" });
  4180. },
  4181. nextMonth() {
  4182. uni.showToast({ title: "下个月", icon: "none" });
  4183. },
  4184. selectDateItem(day) {
  4185. if (this.selectedDateRange.length === 2) {
  4186. this.selectedDateRange = [day];
  4187. } else if (this.selectedDateRange.length === 1) {
  4188. let start = this.selectedDateRange[0];
  4189. if (day > start) {
  4190. this.selectedDateRange = [start, day];
  4191. } else if (day < start) {
  4192. this.selectedDateRange = [day, start];
  4193. } else {
  4194. this.selectedDateRange = [];
  4195. }
  4196. } else {
  4197. this.selectedDateRange = [day];
  4198. }
  4199. },
  4200. getDateClass(day) {
  4201. if (this.selectedDateRange.length === 0)
  4202. return "";
  4203. if (this.selectedDateRange.length === 1) {
  4204. return day === this.selectedDateRange[0] ? "is-start" : "";
  4205. }
  4206. let start = this.selectedDateRange[0];
  4207. let end = this.selectedDateRange[1];
  4208. if (day === start)
  4209. return "is-start";
  4210. if (day === end)
  4211. return "is-end";
  4212. if (day > start && day < end)
  4213. return "is-between";
  4214. return "";
  4215. },
  4216. resetTimeFilter() {
  4217. this.hasTimeFilter = false;
  4218. this.selectedDateRange = [];
  4219. this.startServiceTime = "";
  4220. this.endServiceTime = "";
  4221. this.closeDropdown();
  4222. this.loadOrders();
  4223. },
  4224. confirmTimeFilter() {
  4225. if (this.selectedDateRange.length === 0) {
  4226. uni.showToast({ title: "请先选择日期", icon: "none" });
  4227. return;
  4228. }
  4229. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4230. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4231. const pad = (n) => String(n).padStart(2, "0");
  4232. if (this.selectedDateRange.length === 2) {
  4233. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4234. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4235. } else {
  4236. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4237. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4238. }
  4239. this.hasTimeFilter = true;
  4240. this.closeDropdown();
  4241. this.loadOrders();
  4242. },
  4243. getMainActionText(item) {
  4244. return "查看详情";
  4245. },
  4246. mainAction(item) {
  4247. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4248. },
  4249. openRemarkInput() {
  4250. this.remarkText = "";
  4251. this.showRemarkInput = true;
  4252. },
  4253. closeRemarkInput() {
  4254. this.showRemarkInput = false;
  4255. this.remarkText = "";
  4256. },
  4257. submitRemark() {
  4258. const text = this.remarkText.trim();
  4259. if (!text) {
  4260. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4261. return;
  4262. }
  4263. const now = /* @__PURE__ */ new Date();
  4264. const dateStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")} ${String(now.getHours()).padStart(2, "0")}:${String(now.getMinutes()).padStart(2, "0")}`;
  4265. if (!this.currentPetInfo.petLogs) {
  4266. this.$set(this.currentPetInfo, "petLogs", []);
  4267. }
  4268. this.currentPetInfo.petLogs.unshift({
  4269. date: dateStr,
  4270. content: text,
  4271. recorder: "我"
  4272. });
  4273. uni.showToast({ title: "备注已添加", icon: "success" });
  4274. this.closeRemarkInput();
  4275. },
  4276. /**
  4277. * 取消订单处理逻辑
  4278. * @param {Object} item - 订单项
  4279. */
  4280. handleCancelOrder(item) {
  4281. uni.showModal({
  4282. title: "提示",
  4283. content: "确认是否取消这个订单?",
  4284. success: async (res) => {
  4285. if (res.confirm) {
  4286. try {
  4287. uni.showLoading({ title: "取消中...", mask: true });
  4288. await cancelOrderApi({ orderId: item.id });
  4289. uni.showToast({ title: "订单已取消", icon: "success" });
  4290. setTimeout(() => {
  4291. this.loadOrders();
  4292. }, 1500);
  4293. } catch (err) {
  4294. formatAppLog("error", "at pages/orders/logic.js:372", "取消订单失败:", err);
  4295. uni.showToast({ title: "取消失败", icon: "none" });
  4296. } finally {
  4297. uni.hideLoading();
  4298. }
  4299. }
  4300. }
  4301. });
  4302. }
  4303. }
  4304. };
  4305. const _sfc_main$r = {
  4306. ...logic$2
  4307. };
  4308. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  4309. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4310. return vue.openBlock(), vue.createElementBlock(
  4311. vue.Fragment,
  4312. null,
  4313. [
  4314. vue.createElementVNode("view", { class: "container" }, [
  4315. vue.createElementVNode("view", { class: "sticky-header" }, [
  4316. vue.createElementVNode("view", { class: "status-tabs" }, [
  4317. (vue.openBlock(true), vue.createElementBlock(
  4318. vue.Fragment,
  4319. null,
  4320. vue.renderList(_ctx.tabs, (tab, index) => {
  4321. return vue.openBlock(), vue.createElementBlock("view", {
  4322. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4323. key: index,
  4324. onClick: ($event) => _ctx.currentTab = index
  4325. }, [
  4326. vue.createElementVNode(
  4327. "text",
  4328. null,
  4329. vue.toDisplayString(tab),
  4330. 1
  4331. /* TEXT */
  4332. ),
  4333. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4334. key: 0,
  4335. class: "indicator"
  4336. })) : vue.createCommentVNode("v-if", true)
  4337. ], 10, ["onClick"]);
  4338. }),
  4339. 128
  4340. /* KEYED_FRAGMENT */
  4341. ))
  4342. ]),
  4343. vue.createElementVNode("view", { class: "search-bar" }, [
  4344. vue.createElementVNode("view", { class: "search-input-box" }, [
  4345. vue.withDirectives(vue.createElementVNode(
  4346. "input",
  4347. {
  4348. class: "search-input",
  4349. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4350. placeholder: "搜索地址/电话/姓名",
  4351. "placeholder-class": "ph-style"
  4352. },
  4353. null,
  4354. 512
  4355. /* NEED_PATCH */
  4356. ), [
  4357. [vue.vModelText, _ctx.searchContent]
  4358. ])
  4359. ])
  4360. ]),
  4361. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4362. vue.createElementVNode("view", { class: "filter-bar" }, [
  4363. vue.createElementVNode(
  4364. "view",
  4365. {
  4366. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4367. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4368. },
  4369. [
  4370. vue.createElementVNode(
  4371. "text",
  4372. {
  4373. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4374. },
  4375. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4376. 3
  4377. /* TEXT, CLASS */
  4378. ),
  4379. vue.createElementVNode(
  4380. "view",
  4381. {
  4382. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4383. },
  4384. null,
  4385. 2
  4386. /* CLASS */
  4387. )
  4388. ],
  4389. 2
  4390. /* CLASS */
  4391. ),
  4392. vue.createElementVNode(
  4393. "view",
  4394. {
  4395. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4396. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4397. },
  4398. [
  4399. vue.createElementVNode(
  4400. "text",
  4401. {
  4402. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4403. },
  4404. "服务时间",
  4405. 2
  4406. /* CLASS */
  4407. ),
  4408. vue.createElementVNode(
  4409. "view",
  4410. {
  4411. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4412. },
  4413. null,
  4414. 2
  4415. /* CLASS */
  4416. )
  4417. ],
  4418. 2
  4419. /* CLASS */
  4420. )
  4421. ]),
  4422. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4423. key: 0,
  4424. class: "dropdown-mask",
  4425. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4426. })) : vue.createCommentVNode("v-if", true),
  4427. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4428. key: 1,
  4429. class: "dropdown-panel"
  4430. }, [
  4431. (vue.openBlock(true), vue.createElementBlock(
  4432. vue.Fragment,
  4433. null,
  4434. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4435. return vue.openBlock(), vue.createElementBlock("view", {
  4436. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4437. key: index,
  4438. onClick: ($event) => _ctx.selectType(index)
  4439. }, [
  4440. vue.createElementVNode(
  4441. "text",
  4442. null,
  4443. vue.toDisplayString(item),
  4444. 1
  4445. /* TEXT */
  4446. )
  4447. ], 10, ["onClick"]);
  4448. }),
  4449. 128
  4450. /* KEYED_FRAGMENT */
  4451. ))
  4452. ])) : vue.createCommentVNode("v-if", true),
  4453. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4454. key: 2,
  4455. class: "dropdown-panel calendar-panel"
  4456. }, [
  4457. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4458. vue.createElementVNode("view", { class: "cal-header" }, [
  4459. vue.createElementVNode("text", {
  4460. class: "cal-nav-btn",
  4461. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4462. }, "‹"),
  4463. vue.createElementVNode(
  4464. "text",
  4465. { class: "cal-title" },
  4466. vue.toDisplayString(_ctx.currentMonth),
  4467. 1
  4468. /* TEXT */
  4469. ),
  4470. vue.createElementVNode("text", {
  4471. class: "cal-nav-btn",
  4472. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4473. }, "›")
  4474. ]),
  4475. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4476. (vue.openBlock(true), vue.createElementBlock(
  4477. vue.Fragment,
  4478. null,
  4479. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4480. return vue.openBlock(), vue.createElementBlock(
  4481. "text",
  4482. {
  4483. key: idx,
  4484. class: "wk-item"
  4485. },
  4486. vue.toDisplayString(wk),
  4487. 1
  4488. /* TEXT */
  4489. );
  4490. }),
  4491. 128
  4492. /* KEYED_FRAGMENT */
  4493. ))
  4494. ]),
  4495. vue.createElementVNode("view", { class: "cal-body" }, [
  4496. (vue.openBlock(true), vue.createElementBlock(
  4497. vue.Fragment,
  4498. null,
  4499. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4500. return vue.openBlock(), vue.createElementBlock("view", {
  4501. key: idx,
  4502. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4503. onClick: ($event) => _ctx.selectDateItem(day)
  4504. }, [
  4505. vue.createElementVNode(
  4506. "view",
  4507. { class: "cal-day-text" },
  4508. vue.toDisplayString(day),
  4509. 1
  4510. /* TEXT */
  4511. )
  4512. ], 10, ["onClick"]);
  4513. }),
  4514. 128
  4515. /* KEYED_FRAGMENT */
  4516. ))
  4517. ])
  4518. ]),
  4519. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4520. vue.createElementVNode("button", {
  4521. class: "cal-btn reset",
  4522. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4523. }, "重置"),
  4524. vue.createElementVNode("button", {
  4525. class: "cal-btn confirm",
  4526. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4527. }, "确定")
  4528. ])
  4529. ])) : vue.createCommentVNode("v-if", true)
  4530. ])
  4531. ]),
  4532. vue.createElementVNode("view", { class: "order-list" }, [
  4533. (vue.openBlock(true), vue.createElementBlock(
  4534. vue.Fragment,
  4535. null,
  4536. vue.renderList(_ctx.orderList, (item, index) => {
  4537. return vue.openBlock(), vue.createElementBlock("view", {
  4538. class: "order-card",
  4539. key: index,
  4540. onClick: ($event) => _ctx.goToDetail(item)
  4541. }, [
  4542. vue.createElementVNode("view", { class: "card-header" }, [
  4543. vue.createElementVNode("view", { class: "type-badge" }, [
  4544. vue.createElementVNode("image", {
  4545. class: "type-icon",
  4546. src: item.typeIcon
  4547. }, null, 8, ["src"]),
  4548. vue.createElementVNode(
  4549. "text",
  4550. { class: "type-text" },
  4551. vue.toDisplayString(item.typeText),
  4552. 1
  4553. /* TEXT */
  4554. )
  4555. ]),
  4556. vue.createElementVNode(
  4557. "text",
  4558. {
  4559. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4560. },
  4561. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4562. 3
  4563. /* TEXT, CLASS */
  4564. )
  4565. ]),
  4566. vue.createElementVNode("view", { class: "card-body" }, [
  4567. vue.createElementVNode("view", { class: "time-row" }, [
  4568. vue.createElementVNode("view", { class: "time-col" }, [
  4569. vue.createElementVNode(
  4570. "text",
  4571. { class: "label" },
  4572. vue.toDisplayString(item.timeLabel) + ":",
  4573. 1
  4574. /* TEXT */
  4575. ),
  4576. vue.createElementVNode(
  4577. "text",
  4578. { class: "value" },
  4579. vue.toDisplayString(item.time),
  4580. 1
  4581. /* TEXT */
  4582. )
  4583. ]),
  4584. vue.createElementVNode(
  4585. "text",
  4586. { class: "price" },
  4587. "¥" + vue.toDisplayString(item.price),
  4588. 1
  4589. /* TEXT */
  4590. )
  4591. ]),
  4592. vue.createElementVNode("view", { class: "pet-card" }, [
  4593. vue.createElementVNode("image", {
  4594. class: "pet-avatar",
  4595. src: item.petAvatarUrl || item.petAvatar,
  4596. mode: "aspectFill"
  4597. }, null, 8, ["src"]),
  4598. vue.createElementVNode("view", { class: "pet-info" }, [
  4599. vue.createElementVNode(
  4600. "text",
  4601. { class: "pet-name" },
  4602. vue.toDisplayString(item.petName),
  4603. 1
  4604. /* TEXT */
  4605. ),
  4606. vue.createElementVNode(
  4607. "text",
  4608. { class: "pet-breed" },
  4609. "品种: " + vue.toDisplayString(item.petBreed),
  4610. 1
  4611. /* TEXT */
  4612. )
  4613. ])
  4614. ]),
  4615. vue.createElementVNode("view", { class: "route-info" }, [
  4616. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4617. vue.Fragment,
  4618. { key: 0 },
  4619. [
  4620. vue.createElementVNode("view", {
  4621. class: "route-item",
  4622. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4623. }, [
  4624. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  4625. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4626. vue.createElementVNode("view", { class: "address-box" }, [
  4627. vue.createElementVNode(
  4628. "text",
  4629. { class: "addr-title" },
  4630. vue.toDisplayString(item.startLocation),
  4631. 1
  4632. /* TEXT */
  4633. ),
  4634. vue.createElementVNode(
  4635. "text",
  4636. { class: "addr-desc" },
  4637. vue.toDisplayString(item.startAddress),
  4638. 1
  4639. /* TEXT */
  4640. )
  4641. ]),
  4642. vue.createElementVNode("image", {
  4643. class: "nav-arrow",
  4644. src: _imports_3$2,
  4645. style: { "flex-shrink": "0", "align-self": "center" }
  4646. })
  4647. ], 8, ["onClick"]),
  4648. vue.createElementVNode("view", {
  4649. class: "route-item",
  4650. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4651. }, [
  4652. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  4653. vue.createElementVNode("view", { class: "address-box" }, [
  4654. vue.createElementVNode(
  4655. "text",
  4656. { class: "addr-title" },
  4657. vue.toDisplayString(item.endLocation),
  4658. 1
  4659. /* TEXT */
  4660. ),
  4661. vue.createElementVNode(
  4662. "text",
  4663. { class: "addr-desc" },
  4664. vue.toDisplayString(item.endAddress),
  4665. 1
  4666. /* TEXT */
  4667. )
  4668. ]),
  4669. vue.createElementVNode("image", {
  4670. class: "nav-arrow",
  4671. src: _imports_3$2,
  4672. style: { "flex-shrink": "0", "align-self": "center" }
  4673. })
  4674. ], 8, ["onClick"])
  4675. ],
  4676. 64
  4677. /* STABLE_FRAGMENT */
  4678. )) : (vue.openBlock(), vue.createElementBlock(
  4679. vue.Fragment,
  4680. { key: 1 },
  4681. [
  4682. vue.createElementVNode("view", {
  4683. class: "route-item",
  4684. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4685. }, [
  4686. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4687. vue.createElementVNode("view", { class: "address-box" }, [
  4688. vue.createElementVNode(
  4689. "text",
  4690. { class: "addr-title" },
  4691. vue.toDisplayString(item.endLocation),
  4692. 1
  4693. /* TEXT */
  4694. ),
  4695. vue.createElementVNode(
  4696. "text",
  4697. { class: "addr-desc" },
  4698. vue.toDisplayString(item.endAddress),
  4699. 1
  4700. /* TEXT */
  4701. )
  4702. ]),
  4703. vue.createElementVNode("image", {
  4704. class: "nav-arrow",
  4705. src: _imports_3$2,
  4706. style: { "flex-shrink": "0", "align-self": "center" }
  4707. })
  4708. ], 8, ["onClick"]),
  4709. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4710. key: 0,
  4711. class: "service-content"
  4712. }, [
  4713. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4714. vue.createElementVNode(
  4715. "text",
  4716. null,
  4717. vue.toDisplayString(item.serviceContent),
  4718. 1
  4719. /* TEXT */
  4720. )
  4721. ])) : vue.createCommentVNode("v-if", true)
  4722. ],
  4723. 64
  4724. /* STABLE_FRAGMENT */
  4725. ))
  4726. ]),
  4727. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4728. key: 0,
  4729. class: "remark-box"
  4730. }, [
  4731. vue.createElementVNode(
  4732. "text",
  4733. null,
  4734. "备注:" + vue.toDisplayString(item.remark),
  4735. 1
  4736. /* TEXT */
  4737. )
  4738. ])) : vue.createCommentVNode("v-if", true)
  4739. ]),
  4740. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4741. key: 0,
  4742. class: "action-btns"
  4743. }, [
  4744. vue.createElementVNode("view", { class: "action-left" }, [
  4745. vue.createElementVNode("button", {
  4746. class: "btn normal",
  4747. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4748. }, "拨号", 8, ["onClick"])
  4749. ]),
  4750. vue.createElementVNode("view", { class: "action-right" }, [
  4751. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4752. key: 0,
  4753. class: "btn normal danger",
  4754. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4755. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4756. vue.createElementVNode("button", {
  4757. class: "btn normal",
  4758. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4759. }, "异常上报", 8, ["onClick"]),
  4760. vue.createElementVNode("button", {
  4761. class: "btn primary",
  4762. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4763. }, "打卡", 8, ["onClick"])
  4764. ])
  4765. ])) : vue.createCommentVNode("v-if", true)
  4766. ], 8, ["onClick"]);
  4767. }),
  4768. 128
  4769. /* KEYED_FRAGMENT */
  4770. )),
  4771. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4772. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4773. ]),
  4774. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4775. key: 0,
  4776. class: "call-mask",
  4777. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4778. })) : vue.createCommentVNode("v-if", true)
  4779. ]),
  4780. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4781. key: 0,
  4782. class: "pet-modal-mask",
  4783. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4784. }, [
  4785. vue.createElementVNode("view", {
  4786. class: "pet-modal-content",
  4787. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4788. }, ["stop"]))
  4789. }, [
  4790. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4791. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4792. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4793. vue.createElementVNode("view", {
  4794. class: "pm-remark-btn",
  4795. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4796. }, "备注"),
  4797. vue.createElementVNode("view", {
  4798. class: "close-icon-btn",
  4799. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4800. }, "×")
  4801. ])
  4802. ]),
  4803. vue.createElementVNode("scroll-view", {
  4804. "scroll-y": "",
  4805. class: "pet-modal-scroll"
  4806. }, [
  4807. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4808. vue.createElementVNode("image", {
  4809. class: "pm-avatar",
  4810. src: _ctx.currentPetInfo.petAvatar,
  4811. mode: "aspectFill"
  4812. }, null, 8, ["src"]),
  4813. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4814. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4815. vue.createElementVNode(
  4816. "text",
  4817. { class: "pm-name" },
  4818. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4819. 1
  4820. /* TEXT */
  4821. ),
  4822. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4823. key: 0,
  4824. class: "pm-gender"
  4825. }, [
  4826. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4827. vue.createElementVNode("text", null, "公")
  4828. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4829. key: 1,
  4830. class: "pm-gender female"
  4831. }, [
  4832. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4833. vue.createElementVNode("text", null, "母")
  4834. ])) : vue.createCommentVNode("v-if", true)
  4835. ]),
  4836. vue.createElementVNode(
  4837. "text",
  4838. { class: "pm-breed" },
  4839. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4840. 1
  4841. /* TEXT */
  4842. )
  4843. ])
  4844. ]),
  4845. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4846. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4847. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4848. vue.createElementVNode(
  4849. "text",
  4850. { class: "pm-val" },
  4851. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4852. 1
  4853. /* TEXT */
  4854. )
  4855. ]),
  4856. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4857. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  4858. vue.createElementVNode(
  4859. "text",
  4860. { class: "pm-val" },
  4861. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  4862. 1
  4863. /* TEXT */
  4864. )
  4865. ]),
  4866. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4867. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  4868. vue.createElementVNode(
  4869. "text",
  4870. { class: "pm-val" },
  4871. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  4872. 1
  4873. /* TEXT */
  4874. )
  4875. ]),
  4876. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4877. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  4878. vue.createElementVNode(
  4879. "text",
  4880. { class: "pm-val" },
  4881. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  4882. 1
  4883. /* TEXT */
  4884. )
  4885. ]),
  4886. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4887. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  4888. vue.createElementVNode(
  4889. "text",
  4890. { class: "pm-val" },
  4891. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  4892. 1
  4893. /* TEXT */
  4894. )
  4895. ])
  4896. ]),
  4897. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4898. key: 0,
  4899. class: "pm-tags"
  4900. }, [
  4901. (vue.openBlock(true), vue.createElementBlock(
  4902. vue.Fragment,
  4903. null,
  4904. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  4905. return vue.openBlock(), vue.createElementBlock(
  4906. "view",
  4907. {
  4908. class: "pm-tag",
  4909. key: index
  4910. },
  4911. vue.toDisplayString(tag),
  4912. 1
  4913. /* TEXT */
  4914. );
  4915. }),
  4916. 128
  4917. /* KEYED_FRAGMENT */
  4918. ))
  4919. ])) : vue.createCommentVNode("v-if", true),
  4920. vue.createElementVNode("view", { class: "pm-section-title" }, [
  4921. vue.createElementVNode("view", { class: "orange-bar" }),
  4922. vue.createElementVNode("text", null, "备注日志")
  4923. ]),
  4924. vue.createElementVNode("view", { class: "pm-log-list" }, [
  4925. (vue.openBlock(true), vue.createElementBlock(
  4926. vue.Fragment,
  4927. null,
  4928. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  4929. return vue.openBlock(), vue.createElementBlock("view", {
  4930. class: "pm-log-item",
  4931. key: lIndex
  4932. }, [
  4933. vue.createElementVNode(
  4934. "text",
  4935. { class: "pm-log-date" },
  4936. vue.toDisplayString(log.date),
  4937. 1
  4938. /* TEXT */
  4939. ),
  4940. vue.createElementVNode(
  4941. "text",
  4942. { class: "pm-log-text" },
  4943. vue.toDisplayString(log.content),
  4944. 1
  4945. /* TEXT */
  4946. ),
  4947. vue.createElementVNode(
  4948. "text",
  4949. { class: "pm-log-recorder" },
  4950. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  4951. 1
  4952. /* TEXT */
  4953. )
  4954. ]);
  4955. }),
  4956. 128
  4957. /* KEYED_FRAGMENT */
  4958. ))
  4959. ]),
  4960. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  4961. ])
  4962. ])
  4963. ])) : vue.createCommentVNode("v-if", true),
  4964. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  4965. key: 1,
  4966. class: "remark-mask",
  4967. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4968. }, [
  4969. vue.createElementVNode("view", {
  4970. class: "remark-sheet",
  4971. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  4972. }, ["stop"]))
  4973. }, [
  4974. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  4975. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  4976. vue.createElementVNode("view", {
  4977. class: "close-icon-btn",
  4978. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4979. }, "×")
  4980. ]),
  4981. vue.withDirectives(vue.createElementVNode(
  4982. "textarea",
  4983. {
  4984. class: "remark-textarea",
  4985. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  4986. placeholder: "请输入备注内容...",
  4987. maxlength: "500",
  4988. "auto-height": ""
  4989. },
  4990. null,
  4991. 512
  4992. /* NEED_PATCH */
  4993. ), [
  4994. [vue.vModelText, _ctx.remarkText]
  4995. ]),
  4996. vue.createElementVNode("view", {
  4997. class: "remark-submit-btn",
  4998. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  4999. }, "提交备注")
  5000. ])
  5001. ])) : vue.createCommentVNode("v-if", true),
  5002. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  5003. key: 2,
  5004. class: "nav-modal-mask",
  5005. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5006. }, [
  5007. vue.createElementVNode("view", {
  5008. class: "nav-action-sheet",
  5009. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  5010. }, ["stop"]))
  5011. }, [
  5012. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  5013. vue.createElementVNode("view", {
  5014. class: "nav-sheet-item",
  5015. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  5016. }, "高德地图"),
  5017. vue.createElementVNode("view", {
  5018. class: "nav-sheet-item",
  5019. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  5020. }, "腾讯地图"),
  5021. vue.createElementVNode("view", {
  5022. class: "nav-sheet-item",
  5023. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  5024. }, "百度地图"),
  5025. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  5026. vue.createElementVNode("view", {
  5027. class: "nav-sheet-item cancel",
  5028. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5029. }, "取消")
  5030. ])
  5031. ])) : vue.createCommentVNode("v-if", true),
  5032. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  5033. ],
  5034. 64
  5035. /* STABLE_FRAGMENT */
  5036. );
  5037. }
  5038. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  5039. function getDictDataByType(dictType) {
  5040. return request({
  5041. url: `/system/dict/data/type/${dictType}`,
  5042. method: "GET"
  5043. });
  5044. }
  5045. function getPetDetail(id) {
  5046. return request({
  5047. url: `/archieves/pet/${id}`,
  5048. method: "GET"
  5049. });
  5050. }
  5051. function submitPetRemark(data) {
  5052. return request({
  5053. url: "/archieves/pet/remark",
  5054. method: "POST",
  5055. data
  5056. });
  5057. }
  5058. function listChangeLog(params) {
  5059. return request({
  5060. url: "/archieves/changeLog/listAll",
  5061. method: "GET",
  5062. data: params
  5063. });
  5064. }
  5065. const logic$1 = {
  5066. data() {
  5067. return {
  5068. orderId: null,
  5069. pageLoading: true,
  5070. // 页面数据加载中
  5071. orderType: 1,
  5072. orderStatus: 2,
  5073. serviceId: null,
  5074. // 当前订单的服务类型ID
  5075. serviceMode: null,
  5076. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  5077. petId: null,
  5078. // 当前订单关联的宠物ID
  5079. petDetail: null,
  5080. // 宠物档案详情
  5081. // 从后端 clockInRemark 解析出的打卡步骤列表
  5082. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  5083. clockInSteps: [],
  5084. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  5085. currentClockIn: null,
  5086. currentStep: 0,
  5087. orderDetail: {
  5088. type: 1,
  5089. price: "0.00",
  5090. timeLabel: "服务时间",
  5091. time: "",
  5092. petAvatar: "/static/dog.png",
  5093. petName: "",
  5094. petBreed: "",
  5095. serviceTag: "",
  5096. startLocation: "",
  5097. startAddress: "",
  5098. endAddress: "",
  5099. customerPhone: "",
  5100. serviceContent: "",
  5101. remark: "",
  5102. orderNo: "",
  5103. createTime: "",
  5104. serviceName: "",
  5105. // 服务类型名称
  5106. progressLogs: [],
  5107. nursingSummary: ""
  5108. // 宠护小结
  5109. },
  5110. serviceList: [],
  5111. showPetModal: false,
  5112. currentPetInfo: {},
  5113. showNavModal: false,
  5114. navTargetPointType: "",
  5115. showUploadModal: false,
  5116. modalMediaList: [],
  5117. modalRemark: "",
  5118. showSumModal: false,
  5119. sumContent: "",
  5120. sumDate: "",
  5121. sumSigner: "未知",
  5122. showPetRemarkInput: false,
  5123. petRemarkText: "",
  5124. showAnomalyModal: false,
  5125. anomalyList: [],
  5126. anomalyTypeDict: [],
  5127. // 媒体预览相关
  5128. videoPlayerShow: false,
  5129. videoPlayerUrl: ""
  5130. };
  5131. },
  5132. computed: {
  5133. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  5134. steps() {
  5135. if (this.clockInSteps.length > 0) {
  5136. return this.clockInSteps.map((s) => s.title);
  5137. }
  5138. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  5139. },
  5140. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5141. progressSteps() {
  5142. return ["已接单", ...this.steps, "订单完成"];
  5143. },
  5144. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5145. progressIndex() {
  5146. return this.currentStep + 1;
  5147. },
  5148. displayStatusText() {
  5149. if (this.currentStep >= this.steps.length)
  5150. return "已完成";
  5151. if (this.currentStep > 0) {
  5152. return this.orderType === 1 ? "配送中" : "服务中";
  5153. }
  5154. return this.orderType === 1 ? "待接送" : "待服务";
  5155. },
  5156. currentStatusText() {
  5157. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5158. },
  5159. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5160. currentTaskTitle() {
  5161. if (this.currentStep >= this.steps.length)
  5162. return "订单已完成";
  5163. if (this.currentClockIn) {
  5164. return this.currentClockIn.title;
  5165. }
  5166. return this.steps[this.currentStep] || "打卡";
  5167. },
  5168. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5169. currentTaskDesc() {
  5170. if (this.currentStep >= this.steps.length)
  5171. return "感谢您的服务,请注意休息";
  5172. if (this.currentClockIn && this.currentClockIn.remark) {
  5173. return this.currentClockIn.remark;
  5174. }
  5175. return "请按要求提交照片或视频及备注";
  5176. }
  5177. },
  5178. async onLoad(options) {
  5179. if (options.id) {
  5180. this.orderId = options.id;
  5181. }
  5182. this.pageLoading = true;
  5183. try {
  5184. await this.loadAnomalyTypeDict();
  5185. await this.loadServiceList();
  5186. await this.loadOrderDetail();
  5187. } finally {
  5188. this.pageLoading = false;
  5189. }
  5190. },
  5191. methods: {
  5192. async loadServiceList() {
  5193. try {
  5194. const res = await listAllService();
  5195. this.serviceList = res.data || [];
  5196. } catch (err) {
  5197. formatAppLog("error", "at pages/orders/detail-logic.js:152", "获取服务类型失败:", err);
  5198. }
  5199. },
  5200. /**
  5201. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5202. */
  5203. /**
  5204. * 基于已加载的 serviceList 进行前端匹配,解析 clockInRemark 为打卡步骤
  5205. */
  5206. loadServiceDetail(serviceId) {
  5207. formatAppLog("log", "at pages/orders/detail-logic.js:162", "前端匹配服务详情, ID:", serviceId);
  5208. const serviceInfo = (this.serviceList || []).find((s) => s.id === serviceId);
  5209. formatAppLog("log", "at pages/orders/detail-logic.js:164", "匹配到的服务信息:", serviceInfo);
  5210. if (serviceInfo) {
  5211. this.serviceMode = serviceInfo.mode;
  5212. this.orderDetail.serviceName = serviceInfo.name;
  5213. formatAppLog("log", "at pages/orders/detail-logic.js:168", "当前服务模式(mode):", this.serviceMode);
  5214. if (serviceInfo.clockInRemark) {
  5215. try {
  5216. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5217. if (Array.isArray(parsed) && parsed.length > 0) {
  5218. this.clockInSteps = parsed;
  5219. formatAppLog("log", "at pages/orders/detail-logic.js:174", "解析打卡步骤:", this.clockInSteps);
  5220. }
  5221. } catch (parseErr) {
  5222. formatAppLog("error", "at pages/orders/detail-logic.js:177", "解析 clockInRemark 失败:", parseErr);
  5223. }
  5224. }
  5225. }
  5226. },
  5227. async loadOrderDetail() {
  5228. if (!this.orderId) {
  5229. formatAppLog("log", "at pages/orders/detail-logic.js:184", "订单ID缺失");
  5230. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5231. return;
  5232. }
  5233. try {
  5234. formatAppLog("log", "at pages/orders/detail-logic.js:189", "请求订单详情,ID:", this.orderId);
  5235. const res = await getOrderInfo(this.orderId);
  5236. formatAppLog("log", "at pages/orders/detail-logic.js:191", "订单详情响应:", res);
  5237. const order = res.data;
  5238. if (!order) {
  5239. formatAppLog("log", "at pages/orders/detail-logic.js:194", "订单数据为空");
  5240. uni.showToast({ title: "订单不存在", icon: "none" });
  5241. return;
  5242. }
  5243. formatAppLog("log", "at pages/orders/detail-logic.js:198", "订单数据:", order);
  5244. this.serviceId = order.service;
  5245. this.petId = order.usrPet || null;
  5246. this.transformOrderData(order);
  5247. formatAppLog("log", "at pages/orders/detail-logic.js:202", "解析出的 serviceId:", this.serviceId);
  5248. if (this.serviceId) {
  5249. this.loadServiceDetail(this.serviceId);
  5250. } else {
  5251. formatAppLog("warn", "at pages/orders/detail-logic.js:208", "订单中未找到 service 字段,无法加载服务步骤");
  5252. }
  5253. if (this.petId) {
  5254. await this.loadPetDetail(this.petId);
  5255. }
  5256. await this.loadOrderLogs();
  5257. } catch (err) {
  5258. formatAppLog("error", "at pages/orders/detail-logic.js:219", "获取订单详情失败:", err);
  5259. uni.showToast({ title: "加载失败", icon: "none" });
  5260. }
  5261. },
  5262. async loadOrderLogs() {
  5263. try {
  5264. const res = await getOrderLogs(this.orderId);
  5265. const logs = res.data || [];
  5266. formatAppLog("log", "at pages/orders/detail-logic.js:227", "订单日志:", logs);
  5267. const progressLogs = logs.filter((log) => log.logType === 1);
  5268. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5269. status: log.title || "",
  5270. time: log.createTime || "",
  5271. medias: log.photoUrls || [],
  5272. remark: log.content || ""
  5273. }));
  5274. const validLogs = logs.filter((log) => log.logType === 1 && log.step !== void 0 && log.step !== null).sort((a, b) => new Date(b.createTime).getTime() - new Date(a.createTime).getTime());
  5275. if (validLogs.length > 0) {
  5276. const latestLog = validLogs[0];
  5277. const latestStep = latestLog.step;
  5278. formatAppLog("log", "at pages/orders/detail-logic.js:246", "最新打卡日志 step:", latestStep);
  5279. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5280. if (stepIndex >= 0) {
  5281. this.currentStep = stepIndex + 1;
  5282. } else {
  5283. this.currentStep = Number(latestStep);
  5284. }
  5285. } else {
  5286. this.currentStep = 0;
  5287. }
  5288. this.updateCurrentClockIn();
  5289. formatAppLog("log", "at pages/orders/detail-logic.js:262", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5290. } catch (err) {
  5291. formatAppLog("error", "at pages/orders/detail-logic.js:264", "获取订单日志失败:", err);
  5292. }
  5293. },
  5294. /**
  5295. * 根据 currentStep 更新当前打卡信息
  5296. */
  5297. updateCurrentClockIn() {
  5298. if (this.currentStep < this.clockInSteps.length) {
  5299. this.currentClockIn = this.clockInSteps[this.currentStep];
  5300. } else {
  5301. this.currentClockIn = null;
  5302. }
  5303. },
  5304. transformOrderData(order) {
  5305. const mode = order.mode || 0;
  5306. const isRoundTrip = mode === 1;
  5307. this.orderType = isRoundTrip ? 1 : 2;
  5308. this.orderStatus = order.status || 2;
  5309. this.orderDetail = {
  5310. type: this.orderType,
  5311. price: (order.price / 100).toFixed(2),
  5312. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5313. time: order.serviceTime || "",
  5314. petAvatar: "/static/dog.png",
  5315. petName: order.petName || order.contact || "",
  5316. petBreed: order.breed || "",
  5317. serviceTag: order.groupPurchasePackageName || "",
  5318. startLocation: order.fromAddress || "",
  5319. startAddress: order.fromAddress || "",
  5320. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5321. endAddress: order.toAddress || "",
  5322. customerPhone: order.contactPhoneNumber || "",
  5323. ownerName: order.contact || "",
  5324. // 宠主姓名(默认使用客户姓名)
  5325. serviceContent: "",
  5326. remark: "",
  5327. orderNo: order.code || "T" + order.id,
  5328. createTime: order.serviceTime || "",
  5329. nursingSummary: order.nursingSummary || "",
  5330. fulfillerName: order.fulfillerName || "",
  5331. // 履约者/护宠师姓名
  5332. progressLogs: [
  5333. { status: "您已接单", time: order.serviceTime || "" }
  5334. ]
  5335. };
  5336. if (this.orderDetail.fulfillerName) {
  5337. this.sumSigner = this.orderDetail.fulfillerName;
  5338. }
  5339. },
  5340. /**
  5341. * 根据宠物ID获取宠物档案详情
  5342. */
  5343. async loadPetDetail(petId) {
  5344. try {
  5345. const res = await getPetDetail(petId);
  5346. const pet = res.data;
  5347. if (pet) {
  5348. this.petDetail = pet;
  5349. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5350. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5351. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5352. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5353. formatAppLog("log", "at pages/orders/detail-logic.js:329", "宠物档案:", pet);
  5354. }
  5355. } catch (err) {
  5356. formatAppLog("error", "at pages/orders/detail-logic.js:332", "获取宠物档案失败:", err);
  5357. }
  5358. },
  5359. /**
  5360. * 加载异常记录列表
  5361. */
  5362. async loadAnomalyList() {
  5363. if (!this.orderId)
  5364. return;
  5365. try {
  5366. const res = await getAnomalyList(this.orderId);
  5367. const list = res.data || [];
  5368. this.anomalyList = list.map((item) => {
  5369. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5370. return {
  5371. ...item,
  5372. typeLabel: dict ? dict.label : item.type,
  5373. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5374. photoUrls: item.photoUrls || []
  5375. };
  5376. });
  5377. } catch (err) {
  5378. formatAppLog("error", "at pages/orders/detail-logic.js:355", "获取异常列表失败:", err);
  5379. }
  5380. },
  5381. async loadAnomalyTypeDict() {
  5382. try {
  5383. const res = await getDictDataByType("flf_anamaly_type");
  5384. this.anomalyTypeDict = res.data.map((item) => ({
  5385. label: item.dictLabel,
  5386. value: item.dictValue
  5387. }));
  5388. } catch (err) {
  5389. formatAppLog("error", "at pages/orders/detail-logic.js:366", "获取异常字典失败:", err);
  5390. }
  5391. },
  5392. openAnomalyModal() {
  5393. this.showAnomalyModal = true;
  5394. this.loadAnomalyList();
  5395. },
  5396. closeAnomalyModal() {
  5397. this.showAnomalyModal = false;
  5398. },
  5399. getAnomalyStatusLabel(status) {
  5400. const map = {
  5401. 0: "待审核",
  5402. 1: "已通过",
  5403. 2: "已驳回"
  5404. };
  5405. return map[status] || "未知";
  5406. },
  5407. updateStepByStatus() {
  5408. if (this.orderStatus === 2) {
  5409. this.currentStep = 0;
  5410. } else if (this.orderStatus === 3) {
  5411. this.currentStep = 1;
  5412. } else if (this.orderStatus === 4) {
  5413. this.currentStep = this.steps.length - 1;
  5414. } else {
  5415. this.currentStep = 0;
  5416. }
  5417. },
  5418. showPetProfile() {
  5419. const pet = this.petDetail;
  5420. if (pet) {
  5421. this.currentPetInfo = {
  5422. petAvatar: pet.avatarUrl || "/static/dog.png",
  5423. petName: pet.name || "",
  5424. petBreed: pet.breed || "",
  5425. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5426. petAge: pet.age ? pet.age + "岁" : "未知",
  5427. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5428. petPersonality: pet.personality || pet.cutePersonality || "无",
  5429. petHobby: "",
  5430. petRemark: pet.remark || "无",
  5431. petTags: (pet.tags || []).map((t) => t.name),
  5432. petLogs: [],
  5433. // 额外信息
  5434. petSize: pet.size || "",
  5435. petIsSterilized: pet.isSterilized,
  5436. petHealthStatus: pet.healthStatus || "",
  5437. petAllergies: pet.allergies || "",
  5438. petMedicalHistory: pet.medicalHistory || "",
  5439. petVaccineStatus: pet.vaccineStatus || "",
  5440. ownerName: pet.ownerName || "",
  5441. ownerPhone: pet.ownerPhone || ""
  5442. };
  5443. this.loadPetChangeLogs(pet.id);
  5444. } else {
  5445. this.currentPetInfo = {
  5446. ...this.orderDetail,
  5447. petGender: "",
  5448. petAge: "未知",
  5449. petWeight: "未知",
  5450. petPersonality: "无",
  5451. petHobby: "",
  5452. petRemark: "无",
  5453. petTags: [],
  5454. petLogs: []
  5455. };
  5456. }
  5457. this.showPetModal = true;
  5458. },
  5459. async loadPetChangeLogs(petId) {
  5460. if (!petId)
  5461. return;
  5462. try {
  5463. const res = await listChangeLog({
  5464. targetId: petId,
  5465. targetType: "pet"
  5466. });
  5467. const logs = res.data || [];
  5468. this.currentPetInfo.petLogs = logs.map((item) => ({
  5469. date: item.createTime || "",
  5470. content: item.content || "",
  5471. recorder: item.operatorName || "未知"
  5472. }));
  5473. } catch (err) {
  5474. formatAppLog("error", "at pages/orders/detail-logic.js:453", "获取宠物备注列表失败:", err);
  5475. }
  5476. },
  5477. closePetProfile() {
  5478. this.showPetModal = false;
  5479. },
  5480. openPetRemarkInput() {
  5481. this.petRemarkText = "";
  5482. this.showPetRemarkInput = true;
  5483. },
  5484. closePetRemarkInput() {
  5485. this.showPetRemarkInput = false;
  5486. },
  5487. async submitPetRemark() {
  5488. if (!this.petRemarkText.trim()) {
  5489. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5490. return;
  5491. }
  5492. if (!this.petId) {
  5493. uni.showToast({ title: "宠物信息缺失", icon: "none" });
  5494. return;
  5495. }
  5496. uni.showLoading({ title: "提交中...", mask: true });
  5497. try {
  5498. await submitPetRemark({
  5499. petId: this.petId,
  5500. content: this.petRemarkText
  5501. });
  5502. uni.hideLoading();
  5503. uni.showToast({ title: "备注已添加", icon: "success" });
  5504. this.closePetRemarkInput();
  5505. this.loadPetChangeLogs(this.petId);
  5506. } catch (err) {
  5507. uni.hideLoading();
  5508. formatAppLog("error", "at pages/orders/detail-logic.js:491", "提交宠物备注失败:", err);
  5509. }
  5510. },
  5511. goToAnomaly() {
  5512. uni.navigateTo({
  5513. url: "/pages/orders/anomaly?orderId=" + (this.orderId || "")
  5514. });
  5515. },
  5516. callPhone() {
  5517. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5518. uni.makePhoneCall({ phoneNumber: phoneNum });
  5519. },
  5520. openNavigation(type) {
  5521. this.navTargetPointType = type;
  5522. this.showNavModal = true;
  5523. },
  5524. closeNavModal() {
  5525. this.showNavModal = false;
  5526. },
  5527. chooseMap(mapType) {
  5528. let pointType = this.navTargetPointType;
  5529. let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
  5530. let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
  5531. this.showNavModal = false;
  5532. uni.openLocation({
  5533. latitude: 30.52,
  5534. // Mock lat
  5535. longitude: 114.31,
  5536. // Mock lng
  5537. name: name || "目的地",
  5538. address: address || "默认地址",
  5539. success: function() {
  5540. formatAppLog("log", "at pages/orders/detail-logic.js:524", "打开导航成功: " + mapType);
  5541. }
  5542. });
  5543. },
  5544. openUploadModal() {
  5545. this.modalMediaList = [];
  5546. this.modalRemark = "";
  5547. this.showUploadModal = true;
  5548. },
  5549. closeUploadModal() {
  5550. this.showUploadModal = false;
  5551. },
  5552. handleConfirmUpload() {
  5553. formatAppLog("log", "at pages/orders/detail-logic.js:537", "handleConfirmUpload被调用");
  5554. this.confirmUploadModal();
  5555. },
  5556. async chooseModalMedia() {
  5557. formatAppLog("log", "at pages/orders/detail-logic.js:541", "chooseModalMedia被调用");
  5558. uni.chooseMedia({
  5559. count: 5 - this.modalMediaList.length,
  5560. mediaType: ["image", "video"],
  5561. sourceType: ["album", "camera"],
  5562. success: async (res) => {
  5563. formatAppLog("log", "at pages/orders/detail-logic.js:548", "选择媒体文件成功:", res.tempFiles);
  5564. uni.showLoading({ title: "上传中...", mask: true });
  5565. try {
  5566. for (const file of res.tempFiles) {
  5567. const filePath = file.tempFilePath;
  5568. const fileType = file.fileType;
  5569. formatAppLog("log", "at pages/orders/detail-logic.js:554", "开始上传文件:", filePath, "类型:", fileType);
  5570. const uploadRes = await uploadFile(filePath);
  5571. formatAppLog("log", "at pages/orders/detail-logic.js:557", "服务器响应:", uploadRes);
  5572. if (uploadRes.code === 200) {
  5573. this.modalMediaList.push({
  5574. url: uploadRes.data.url,
  5575. ossId: uploadRes.data.ossId,
  5576. localPath: filePath,
  5577. mediaType: fileType,
  5578. thumb: file.thumbTempFilePath
  5579. // 视频缩略图(如果有)
  5580. });
  5581. formatAppLog("log", "at pages/orders/detail-logic.js:567", "媒体文件添加成功");
  5582. }
  5583. }
  5584. uni.hideLoading();
  5585. uni.showToast({ title: "上传成功", icon: "success" });
  5586. } catch (err) {
  5587. uni.hideLoading();
  5588. formatAppLog("error", "at pages/orders/detail-logic.js:574", "上传失败详情:", err);
  5589. uni.showToast({ title: "上传失败", icon: "none" });
  5590. }
  5591. },
  5592. fail: (err) => {
  5593. formatAppLog("error", "at pages/orders/detail-logic.js:579", "选择媒体文件失败:", err);
  5594. }
  5595. });
  5596. },
  5597. removeModalMedia(index) {
  5598. this.modalMediaList.splice(index, 1);
  5599. },
  5600. getCurrentTime() {
  5601. const now = /* @__PURE__ */ new Date();
  5602. const y = now.getFullYear();
  5603. const m = String(now.getMonth() + 1).padStart(2, "0");
  5604. const d = String(now.getDate()).padStart(2, "0");
  5605. const h = String(now.getHours()).padStart(2, "0");
  5606. const min = String(now.getMinutes()).padStart(2, "0");
  5607. return `${y}/${m}/${d} ${h}:${min}`;
  5608. },
  5609. async confirmUploadModal() {
  5610. formatAppLog("log", "at pages/orders/detail-logic.js:597", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5611. if (this.modalMediaList.length === 0) {
  5612. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5613. return;
  5614. }
  5615. try {
  5616. uni.showLoading({ title: "提交中..." });
  5617. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5618. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5619. formatAppLog("log", "at pages/orders/detail-logic.js:608", "准备打卡,ossIds:", ossIds);
  5620. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5621. const clockInData = {
  5622. orderId: this.orderId,
  5623. photos: ossIds,
  5624. content: this.modalRemark || "",
  5625. step: clockInType,
  5626. title: this.currentTaskTitle,
  5627. startFlag: Number(clockInType) === 1,
  5628. endFlag: Number(this.currentStep) === this.steps.length - 1
  5629. };
  5630. formatAppLog("log", "at pages/orders/detail-logic.js:623", "打卡数据:", clockInData);
  5631. await clockIn(clockInData);
  5632. uni.hideLoading();
  5633. this.closeUploadModal();
  5634. uni.showToast({ title: "打卡成功", icon: "success" });
  5635. await this.loadOrderDetail();
  5636. } catch (err) {
  5637. uni.hideLoading();
  5638. formatAppLog("error", "at pages/orders/detail-logic.js:633", "打卡失败:", err);
  5639. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5640. }
  5641. },
  5642. copyOrderNo() {
  5643. uni.setClipboardData({
  5644. data: this.orderDetail.orderNo,
  5645. success: () => {
  5646. uni.showToast({ title: "复制成功", icon: "none" });
  5647. }
  5648. });
  5649. },
  5650. openSumModal() {
  5651. let displayDate = "";
  5652. if (this.orderDetail.time) {
  5653. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5654. } else {
  5655. const now = /* @__PURE__ */ new Date();
  5656. const y = now.getFullYear();
  5657. const m = String(now.getMonth() + 1).padStart(2, "0");
  5658. const d = String(now.getDate()).padStart(2, "0");
  5659. displayDate = `${y}/${m}/${d}`;
  5660. }
  5661. this.sumDate = displayDate;
  5662. if (this.orderDetail.nursingSummary) {
  5663. this.sumContent = this.orderDetail.nursingSummary;
  5664. } else if (!this.sumContent) {
  5665. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5666. }
  5667. this.showSumModal = true;
  5668. },
  5669. closeSumModal() {
  5670. this.showSumModal = false;
  5671. },
  5672. async submitSumModal() {
  5673. if (!this.sumContent.trim()) {
  5674. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5675. return;
  5676. }
  5677. uni.showLoading({ title: "提交中...", mask: true });
  5678. try {
  5679. const res = await submitNursingSummary({
  5680. orderId: this.orderId,
  5681. content: this.sumContent
  5682. });
  5683. uni.hideLoading();
  5684. if (res.code === 200) {
  5685. uni.showToast({ title: "小结已提交", icon: "success" });
  5686. this.closeSumModal();
  5687. await this.loadOrderDetail();
  5688. } else {
  5689. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5690. }
  5691. } catch (err) {
  5692. uni.hideLoading();
  5693. formatAppLog("error", "at pages/orders/detail-logic.js:701", "提交宠护小结失败:", err);
  5694. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5695. }
  5696. },
  5697. /**
  5698. * 检查是否为视频
  5699. */
  5700. isVideo(url) {
  5701. if (!url)
  5702. return false;
  5703. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5704. const lowerUrl = url.toLowerCase();
  5705. return videoExts.some((ext) => lowerUrl.includes(ext));
  5706. },
  5707. /**
  5708. * 获取视频封面图 (第一帧)
  5709. * 兼容阿里云、腾讯云等主流 OSS
  5710. */
  5711. getVideoPoster(url) {
  5712. if (!this.isVideo(url))
  5713. return url;
  5714. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5715. return url;
  5716. }
  5717. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5718. const tencent = `?ci-process=snapshot&time=1`;
  5719. if (url.includes("myqcloud.com")) {
  5720. return url + tencent;
  5721. }
  5722. return url + aliyun;
  5723. },
  5724. /**
  5725. * 统一预览媒体
  5726. */
  5727. previewMedia(medias, currentIdx) {
  5728. const url = medias[currentIdx];
  5729. if (this.isVideo(url)) {
  5730. this.videoPlayerUrl = url;
  5731. this.videoPlayerShow = true;
  5732. } else {
  5733. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5734. const currentImgUrl = url;
  5735. const newIdx = imageUrls.indexOf(currentImgUrl);
  5736. uni.previewImage({
  5737. current: newIdx >= 0 ? newIdx : 0,
  5738. urls: imageUrls
  5739. });
  5740. }
  5741. },
  5742. closeVideoPlayer() {
  5743. this.videoPlayerShow = false;
  5744. this.videoPlayerUrl = "";
  5745. }
  5746. }
  5747. };
  5748. const _imports_13 = "/static/icons/phone_orange.svg";
  5749. const _imports_1$7 = "/static/icons/clock.svg";
  5750. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5751. const _imports_4$1 = "/static/icons/file.svg";
  5752. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5753. const _imports_6$1 = "/static/icons/order_no.svg";
  5754. const _imports_7 = "/static/icons/play_circle.svg";
  5755. const _imports_8$1 = "/static/empty-rest.png";
  5756. const _sfc_main$q = {
  5757. ...logic$1
  5758. };
  5759. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  5760. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5761. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5762. key: 0,
  5763. class: "loading-container"
  5764. }, [
  5765. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5766. vue.createElementVNode("view", {
  5767. class: "skeleton-line skeleton-ani",
  5768. style: { "width": "30%", "height": "36rpx" }
  5769. }),
  5770. vue.createElementVNode("view", {
  5771. class: "skeleton-line skeleton-ani",
  5772. style: { "width": "20%", "height": "36rpx" }
  5773. })
  5774. ]),
  5775. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5776. (vue.openBlock(), vue.createElementBlock(
  5777. vue.Fragment,
  5778. null,
  5779. vue.renderList(4, (i) => {
  5780. return vue.createElementVNode("view", {
  5781. class: "skeleton-circle skeleton-ani",
  5782. key: i
  5783. });
  5784. }),
  5785. 64
  5786. /* STABLE_FRAGMENT */
  5787. ))
  5788. ]),
  5789. (vue.openBlock(), vue.createElementBlock(
  5790. vue.Fragment,
  5791. null,
  5792. vue.renderList(3, (j) => {
  5793. return vue.createElementVNode("view", {
  5794. class: "skeleton-card",
  5795. key: "c" + j
  5796. }, [
  5797. vue.createElementVNode("view", {
  5798. class: "skeleton-line skeleton-ani",
  5799. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  5800. }),
  5801. vue.createElementVNode("view", {
  5802. class: "skeleton-line skeleton-ani",
  5803. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  5804. }),
  5805. vue.createElementVNode("view", {
  5806. class: "skeleton-line skeleton-ani",
  5807. style: { "width": "75%", "height": "24rpx" }
  5808. })
  5809. ]);
  5810. }),
  5811. 64
  5812. /* STABLE_FRAGMENT */
  5813. ))
  5814. ])) : (vue.openBlock(), vue.createElementBlock(
  5815. vue.Fragment,
  5816. { key: 1 },
  5817. [
  5818. vue.createElementVNode("view", { class: "detail-header" }, [
  5819. vue.createElementVNode("view", { class: "status-row" }, [
  5820. vue.createElementVNode(
  5821. "text",
  5822. { class: "status-title" },
  5823. vue.toDisplayString(_ctx.displayStatusText),
  5824. 1
  5825. /* TEXT */
  5826. ),
  5827. vue.createElementVNode(
  5828. "text",
  5829. { class: "status-price" },
  5830. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  5831. 1
  5832. /* TEXT */
  5833. )
  5834. ]),
  5835. vue.createElementVNode("view", { class: "progress-bar" }, [
  5836. (vue.openBlock(true), vue.createElementBlock(
  5837. vue.Fragment,
  5838. null,
  5839. vue.renderList(_ctx.progressSteps, (step, index) => {
  5840. return vue.openBlock(), vue.createElementBlock(
  5841. "view",
  5842. {
  5843. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  5844. key: index
  5845. },
  5846. [
  5847. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  5848. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  5849. "view",
  5850. {
  5851. key: 0,
  5852. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  5853. },
  5854. null,
  5855. 2
  5856. /* CLASS */
  5857. )) : vue.createCommentVNode("v-if", true),
  5858. vue.createElementVNode(
  5859. "view",
  5860. { class: "step-circle" },
  5861. vue.toDisplayString(index + 1),
  5862. 1
  5863. /* TEXT */
  5864. )
  5865. ]),
  5866. vue.createElementVNode(
  5867. "text",
  5868. { class: "step-text" },
  5869. vue.toDisplayString(step),
  5870. 1
  5871. /* TEXT */
  5872. )
  5873. ],
  5874. 2
  5875. /* CLASS */
  5876. );
  5877. }),
  5878. 128
  5879. /* KEYED_FRAGMENT */
  5880. ))
  5881. ])
  5882. ]),
  5883. vue.createElementVNode("scroll-view", {
  5884. "scroll-y": "",
  5885. class: "detail-content"
  5886. }, [
  5887. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  5888. vue.createElementVNode("image", {
  5889. class: "pb-avatar",
  5890. src: _ctx.orderDetail.petAvatar,
  5891. mode: "aspectFill"
  5892. }, null, 8, ["src"]),
  5893. vue.createElementVNode("view", { class: "pb-info" }, [
  5894. vue.createElementVNode("view", { class: "pb-name-row" }, [
  5895. vue.createElementVNode(
  5896. "text",
  5897. { class: "pb-name" },
  5898. vue.toDisplayString(_ctx.orderDetail.petName),
  5899. 1
  5900. /* TEXT */
  5901. )
  5902. ]),
  5903. vue.createElementVNode("view", { class: "pb-tags" }, [
  5904. vue.createElementVNode(
  5905. "text",
  5906. { class: "pb-tag" },
  5907. vue.toDisplayString(_ctx.orderDetail.serviceName),
  5908. 1
  5909. /* TEXT */
  5910. )
  5911. ])
  5912. ]),
  5913. vue.createElementVNode("view", { class: "pb-actions" }, [
  5914. vue.createElementVNode("view", {
  5915. class: "pb-btn profile-btn",
  5916. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  5917. }, "宠物档案"),
  5918. vue.createElementVNode("view", {
  5919. class: "pb-btn phone-btn",
  5920. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  5921. }, [
  5922. vue.createElementVNode("image", {
  5923. class: "phone-icon",
  5924. src: _imports_13
  5925. })
  5926. ])
  5927. ])
  5928. ]),
  5929. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  5930. vue.createElementVNode("view", { class: "si-row time-row" }, [
  5931. vue.createElementVNode("image", {
  5932. class: "si-icon outline",
  5933. src: _imports_1$7
  5934. }),
  5935. vue.createElementVNode("view", { class: "si-content" }, [
  5936. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  5937. vue.createElementVNode(
  5938. "text",
  5939. { class: "si-val" },
  5940. vue.toDisplayString(_ctx.orderDetail.time),
  5941. 1
  5942. /* TEXT */
  5943. )
  5944. ]),
  5945. vue.createElementVNode("view", {
  5946. class: "si-action record-btn",
  5947. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  5948. }, [
  5949. vue.createElementVNode("text", null, "异常记录"),
  5950. vue.createElementVNode("image", {
  5951. class: "record-arrow",
  5952. src: _imports_0$2
  5953. })
  5954. ])
  5955. ]),
  5956. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  5957. vue.Fragment,
  5958. { key: 0 },
  5959. [
  5960. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  5961. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  5962. vue.createElementVNode("view", { class: "route-line-vertical" }),
  5963. vue.createElementVNode("view", { class: "si-content" }, [
  5964. vue.createElementVNode(
  5965. "text",
  5966. { class: "si-addr-title" },
  5967. vue.toDisplayString(_ctx.orderDetail.startLocation),
  5968. 1
  5969. /* TEXT */
  5970. ),
  5971. vue.createElementVNode(
  5972. "text",
  5973. { class: "si-addr-desc" },
  5974. vue.toDisplayString(_ctx.orderDetail.startAddress),
  5975. 1
  5976. /* TEXT */
  5977. )
  5978. ]),
  5979. vue.createElementVNode("view", {
  5980. class: "nav-btn-circle",
  5981. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  5982. }, [
  5983. vue.createElementVNode("image", {
  5984. class: "nav-arrow",
  5985. src: _imports_3$2
  5986. })
  5987. ])
  5988. ]),
  5989. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5990. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  5991. vue.createElementVNode("view", { class: "si-content" }, [
  5992. vue.createElementVNode(
  5993. "text",
  5994. { class: "si-addr-title" },
  5995. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5996. 1
  5997. /* TEXT */
  5998. ),
  5999. vue.createElementVNode(
  6000. "text",
  6001. { class: "si-addr-desc" },
  6002. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6003. 1
  6004. /* TEXT */
  6005. )
  6006. ]),
  6007. vue.createElementVNode("view", {
  6008. class: "nav-btn-circle",
  6009. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  6010. }, [
  6011. vue.createElementVNode("image", {
  6012. class: "nav-arrow",
  6013. src: _imports_3$2
  6014. })
  6015. ])
  6016. ])
  6017. ],
  6018. 64
  6019. /* STABLE_FRAGMENT */
  6020. )) : (vue.openBlock(), vue.createElementBlock("view", {
  6021. key: 1,
  6022. class: "si-row addr-row end-addr"
  6023. }, [
  6024. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  6025. vue.createElementVNode("view", { class: "si-content" }, [
  6026. vue.createElementVNode(
  6027. "text",
  6028. { class: "si-addr-title" },
  6029. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6030. 1
  6031. /* TEXT */
  6032. ),
  6033. vue.createElementVNode(
  6034. "text",
  6035. { class: "si-addr-desc" },
  6036. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6037. 1
  6038. /* TEXT */
  6039. )
  6040. ]),
  6041. vue.createElementVNode("view", {
  6042. class: "nav-btn-circle",
  6043. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  6044. }, [
  6045. vue.createElementVNode("image", {
  6046. class: "nav-arrow",
  6047. src: _imports_3$2
  6048. })
  6049. ])
  6050. ])),
  6051. vue.createElementVNode("view", { class: "si-row" }, [
  6052. vue.createElementVNode("image", {
  6053. class: "si-icon outline custom-icon-file",
  6054. src: _imports_4$1
  6055. }),
  6056. vue.createElementVNode("view", { class: "si-content" }, [
  6057. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  6058. vue.createElementVNode(
  6059. "text",
  6060. { class: "si-val" },
  6061. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  6062. 1
  6063. /* TEXT */
  6064. )
  6065. ])
  6066. ])
  6067. ]),
  6068. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  6069. key: 0,
  6070. class: "white-card task-card"
  6071. }, [
  6072. vue.createElementVNode(
  6073. "text",
  6074. { class: "tc-title" },
  6075. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  6076. 1
  6077. /* TEXT */
  6078. ),
  6079. vue.createElementVNode(
  6080. "text",
  6081. { class: "tc-desc" },
  6082. vue.toDisplayString(_ctx.currentTaskDesc),
  6083. 1
  6084. /* TEXT */
  6085. ),
  6086. vue.createElementVNode("view", {
  6087. class: "full-media-add",
  6088. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6089. }, [
  6090. vue.createElementVNode("image", {
  6091. class: "upload-icon-large",
  6092. src: _imports_1$6
  6093. }),
  6094. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  6095. ])
  6096. ])) : vue.createCommentVNode("v-if", true),
  6097. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  6098. vue.createElementVNode("view", { class: "bi-row" }, [
  6099. vue.createElementVNode("image", {
  6100. class: "si-icon outline",
  6101. src: _imports_6$1
  6102. }),
  6103. vue.createElementVNode("view", { class: "bi-content" }, [
  6104. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  6105. vue.createElementVNode("view", { class: "bi-val-row" }, [
  6106. vue.createElementVNode(
  6107. "text",
  6108. { class: "bi-val" },
  6109. vue.toDisplayString(_ctx.orderDetail.orderNo),
  6110. 1
  6111. /* TEXT */
  6112. ),
  6113. vue.createElementVNode("text", {
  6114. class: "bi-copy",
  6115. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  6116. }, "复制")
  6117. ])
  6118. ])
  6119. ]),
  6120. vue.createElementVNode("view", { class: "bi-row" }, [
  6121. vue.createElementVNode("image", {
  6122. class: "si-icon outline",
  6123. src: _imports_1$7
  6124. }),
  6125. vue.createElementVNode("view", { class: "bi-content" }, [
  6126. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  6127. vue.createElementVNode(
  6128. "text",
  6129. { class: "bi-val" },
  6130. vue.toDisplayString(_ctx.orderDetail.createTime),
  6131. 1
  6132. /* TEXT */
  6133. )
  6134. ])
  6135. ])
  6136. ]),
  6137. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  6138. vue.createElementVNode("view", { class: "tl-title-row" }, [
  6139. vue.createElementVNode("view", { class: "orange-bar" }),
  6140. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  6141. ]),
  6142. vue.createElementVNode("view", { class: "tl-list" }, [
  6143. (vue.openBlock(true), vue.createElementBlock(
  6144. vue.Fragment,
  6145. null,
  6146. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  6147. return vue.openBlock(), vue.createElementBlock("view", {
  6148. class: "tl-item",
  6149. key: idx
  6150. }, [
  6151. vue.createElementVNode("view", { class: "tl-marker active" }, [
  6152. vue.createElementVNode("view", { class: "tl-dot-inner" })
  6153. ]),
  6154. vue.createElementVNode("view", { class: "tl-content-row" }, [
  6155. vue.createElementVNode("view", { class: "tl-header" }, [
  6156. vue.createElementVNode(
  6157. "text",
  6158. { class: "tl-status" },
  6159. vue.toDisplayString(log.status),
  6160. 1
  6161. /* TEXT */
  6162. ),
  6163. vue.createElementVNode(
  6164. "text",
  6165. { class: "tl-time" },
  6166. vue.toDisplayString(log.time),
  6167. 1
  6168. /* TEXT */
  6169. )
  6170. ]),
  6171. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6172. key: 0,
  6173. class: "tl-medias"
  6174. }, [
  6175. (vue.openBlock(true), vue.createElementBlock(
  6176. vue.Fragment,
  6177. null,
  6178. vue.renderList(log.medias, (media, midx) => {
  6179. return vue.openBlock(), vue.createElementBlock("view", {
  6180. class: "tl-media-item",
  6181. key: midx,
  6182. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  6183. }, [
  6184. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  6185. key: 0,
  6186. class: "tl-img",
  6187. src: media,
  6188. mode: "aspectFill"
  6189. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6190. key: 1,
  6191. class: "tl-video-placeholder"
  6192. }, [
  6193. vue.createElementVNode("view", { class: "tl-play-icon" }),
  6194. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  6195. ]))
  6196. ], 8, ["onClick"]);
  6197. }),
  6198. 128
  6199. /* KEYED_FRAGMENT */
  6200. ))
  6201. ])) : vue.createCommentVNode("v-if", true),
  6202. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  6203. key: 1,
  6204. class: "tl-remark"
  6205. }, [
  6206. vue.createElementVNode(
  6207. "text",
  6208. null,
  6209. vue.toDisplayString(log.remark),
  6210. 1
  6211. /* TEXT */
  6212. )
  6213. ])) : vue.createCommentVNode("v-if", true)
  6214. ])
  6215. ]);
  6216. }),
  6217. 128
  6218. /* KEYED_FRAGMENT */
  6219. ))
  6220. ])
  6221. ]),
  6222. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6223. ]),
  6224. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6225. vue.createElementVNode("view", { class: "action-left" }, [
  6226. vue.createElementVNode("button", {
  6227. class: "action-btn outline grey-outline",
  6228. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6229. }, "异常上报"),
  6230. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6231. key: 0,
  6232. class: "action-btn outline orange-outline",
  6233. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6234. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6235. ]),
  6236. vue.createElementVNode("view", { class: "action-right" }, [
  6237. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6238. "button",
  6239. {
  6240. key: 0,
  6241. class: "action-btn primary",
  6242. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6243. },
  6244. vue.toDisplayString(_ctx.currentTaskTitle),
  6245. 1
  6246. /* TEXT */
  6247. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6248. key: 1,
  6249. class: "action-btn primary grey-bg"
  6250. }, "已完成"))
  6251. ])
  6252. ]),
  6253. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6254. key: 0,
  6255. class: "pet-modal-mask",
  6256. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6257. }, [
  6258. vue.createElementVNode("view", {
  6259. class: "pet-modal-content",
  6260. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6261. }, ["stop"]))
  6262. }, [
  6263. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6264. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6265. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6266. vue.createElementVNode("view", {
  6267. class: "pm-remark-btn",
  6268. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6269. }, "备注"),
  6270. vue.createElementVNode("view", {
  6271. class: "close-icon-btn",
  6272. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6273. }, "×")
  6274. ]),
  6275. vue.createElementVNode("scroll-view", {
  6276. "scroll-y": "",
  6277. class: "pet-modal-scroll"
  6278. }, [
  6279. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6280. vue.createElementVNode("image", {
  6281. class: "pm-avatar",
  6282. src: _ctx.currentPetInfo.petAvatar,
  6283. mode: "aspectFill"
  6284. }, null, 8, ["src"]),
  6285. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6286. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6287. vue.createElementVNode(
  6288. "text",
  6289. { class: "pm-name" },
  6290. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6291. 1
  6292. /* TEXT */
  6293. ),
  6294. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6295. key: 0,
  6296. class: "pm-gender"
  6297. }, [
  6298. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6299. vue.createElementVNode("text", null, "公")
  6300. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6301. key: 1,
  6302. class: "pm-gender female"
  6303. }, [
  6304. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6305. vue.createElementVNode("text", null, "母")
  6306. ])) : vue.createCommentVNode("v-if", true)
  6307. ]),
  6308. vue.createElementVNode(
  6309. "text",
  6310. { class: "pm-breed" },
  6311. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6312. 1
  6313. /* TEXT */
  6314. )
  6315. ])
  6316. ]),
  6317. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6318. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6319. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6320. vue.createElementVNode(
  6321. "text",
  6322. { class: "pm-val" },
  6323. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6324. 1
  6325. /* TEXT */
  6326. )
  6327. ]),
  6328. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6329. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6330. vue.createElementVNode(
  6331. "text",
  6332. { class: "pm-val" },
  6333. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6334. 1
  6335. /* TEXT */
  6336. )
  6337. ]),
  6338. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6339. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6340. vue.createElementVNode(
  6341. "text",
  6342. { class: "pm-val" },
  6343. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6344. 1
  6345. /* TEXT */
  6346. )
  6347. ]),
  6348. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6349. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6350. vue.createElementVNode(
  6351. "text",
  6352. { class: "pm-val" },
  6353. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6354. 1
  6355. /* TEXT */
  6356. )
  6357. ]),
  6358. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6359. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6360. vue.createElementVNode(
  6361. "text",
  6362. { class: "pm-val" },
  6363. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6364. 1
  6365. /* TEXT */
  6366. )
  6367. ])
  6368. ]),
  6369. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6370. key: 0,
  6371. class: "pm-tags-row"
  6372. }, [
  6373. (vue.openBlock(true), vue.createElementBlock(
  6374. vue.Fragment,
  6375. null,
  6376. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6377. return vue.openBlock(), vue.createElementBlock("view", {
  6378. class: "pm-tag-chip",
  6379. key: ti
  6380. }, [
  6381. vue.createElementVNode(
  6382. "text",
  6383. { class: "pm-tag-chip-text" },
  6384. vue.toDisplayString(tag),
  6385. 1
  6386. /* TEXT */
  6387. )
  6388. ]);
  6389. }),
  6390. 128
  6391. /* KEYED_FRAGMENT */
  6392. ))
  6393. ])) : vue.createCommentVNode("v-if", true),
  6394. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6395. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6396. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6397. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6398. ]),
  6399. (vue.openBlock(true), vue.createElementBlock(
  6400. vue.Fragment,
  6401. null,
  6402. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6403. return vue.openBlock(), vue.createElementBlock("view", {
  6404. class: "pm-log-item",
  6405. key: lIndex
  6406. }, [
  6407. vue.createElementVNode(
  6408. "text",
  6409. { class: "pm-log-date" },
  6410. vue.toDisplayString(log.date),
  6411. 1
  6412. /* TEXT */
  6413. ),
  6414. vue.createElementVNode(
  6415. "text",
  6416. { class: "pm-log-text" },
  6417. vue.toDisplayString(log.content),
  6418. 1
  6419. /* TEXT */
  6420. ),
  6421. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6422. "text",
  6423. {
  6424. key: 0,
  6425. class: "pm-log-recorder"
  6426. },
  6427. "记录人:" + vue.toDisplayString(log.recorder),
  6428. 1
  6429. /* TEXT */
  6430. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6431. key: 1,
  6432. class: "pm-log-recorder system"
  6433. }, "系统记录"))
  6434. ]);
  6435. }),
  6436. 128
  6437. /* KEYED_FRAGMENT */
  6438. ))
  6439. ]),
  6440. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6441. ])
  6442. ])
  6443. ])) : vue.createCommentVNode("v-if", true),
  6444. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6445. key: 1,
  6446. class: "upload-modal-mask",
  6447. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6448. }, [
  6449. vue.createElementVNode("view", {
  6450. class: "upload-modal-content",
  6451. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6452. }, ["stop"]))
  6453. }, [
  6454. vue.createElementVNode("view", { class: "um-header" }, [
  6455. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6456. ]),
  6457. vue.createElementVNode("view", { class: "um-body" }, [
  6458. vue.withDirectives(vue.createElementVNode(
  6459. "textarea",
  6460. {
  6461. class: "um-textarea",
  6462. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6463. "auto-height": "",
  6464. placeholder: "请输入宠物备注内容...",
  6465. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6466. },
  6467. null,
  6468. 512
  6469. /* NEED_PATCH */
  6470. ), [
  6471. [vue.vModelText, _ctx.petRemarkText]
  6472. ])
  6473. ]),
  6474. vue.createElementVNode("view", { class: "um-footer" }, [
  6475. vue.createElementVNode("button", {
  6476. class: "um-submit-btn active",
  6477. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6478. }, "确认提交")
  6479. ])
  6480. ])
  6481. ])) : vue.createCommentVNode("v-if", true),
  6482. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6483. key: 2,
  6484. class: "nav-modal-mask",
  6485. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6486. }, [
  6487. vue.createElementVNode("view", {
  6488. class: "nav-action-sheet",
  6489. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6490. }, ["stop"]))
  6491. }, [
  6492. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6493. vue.createElementVNode("view", {
  6494. class: "nav-sheet-item",
  6495. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6496. }, "高德地图"),
  6497. vue.createElementVNode("view", {
  6498. class: "nav-sheet-item",
  6499. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6500. }, "腾讯地图"),
  6501. vue.createElementVNode("view", {
  6502. class: "nav-sheet-item",
  6503. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6504. }, "百度地图"),
  6505. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6506. vue.createElementVNode("view", {
  6507. class: "nav-sheet-item cancel",
  6508. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6509. }, "取消")
  6510. ])
  6511. ])) : vue.createCommentVNode("v-if", true),
  6512. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6513. key: 3,
  6514. class: "upload-modal-mask",
  6515. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6516. }, [
  6517. vue.createElementVNode("view", {
  6518. class: "upload-modal-content",
  6519. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6520. }, ["stop"]))
  6521. }, [
  6522. vue.createElementVNode("view", { class: "um-header" }, [
  6523. vue.createElementVNode(
  6524. "text",
  6525. { class: "um-title" },
  6526. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6527. 1
  6528. /* TEXT */
  6529. ),
  6530. vue.createElementVNode(
  6531. "text",
  6532. { class: "um-remark-hint" },
  6533. vue.toDisplayString(_ctx.currentTaskDesc),
  6534. 1
  6535. /* TEXT */
  6536. )
  6537. ]),
  6538. vue.createElementVNode("view", { class: "um-body" }, [
  6539. vue.createElementVNode("view", { class: "um-grid" }, [
  6540. (vue.openBlock(true), vue.createElementBlock(
  6541. vue.Fragment,
  6542. null,
  6543. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6544. return vue.openBlock(), vue.createElementBlock("view", {
  6545. class: "um-item",
  6546. key: idx
  6547. }, [
  6548. vue.createElementVNode("image", {
  6549. class: "um-preview",
  6550. src: img.thumb || img.url || img.localPath || img,
  6551. mode: "aspectFill"
  6552. }, null, 8, ["src"]),
  6553. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6554. key: 0,
  6555. class: "um-video-badge"
  6556. }, [
  6557. vue.createElementVNode("image", {
  6558. class: "play-icon-small",
  6559. src: _imports_7
  6560. })
  6561. ])) : vue.createCommentVNode("v-if", true),
  6562. vue.createElementVNode("view", {
  6563. class: "um-del",
  6564. onClick: ($event) => _ctx.removeModalMedia(idx)
  6565. }, "×", 8, ["onClick"])
  6566. ]);
  6567. }),
  6568. 128
  6569. /* KEYED_FRAGMENT */
  6570. )),
  6571. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6572. key: 0,
  6573. class: "um-add",
  6574. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6575. }, [
  6576. vue.createElementVNode("image", {
  6577. class: "um-add-icon",
  6578. src: _imports_1$6
  6579. }),
  6580. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6581. ])) : vue.createCommentVNode("v-if", true)
  6582. ]),
  6583. vue.withDirectives(vue.createElementVNode(
  6584. "textarea",
  6585. {
  6586. class: "um-textarea",
  6587. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6588. placeholder: "在此输入备注信息...",
  6589. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6590. },
  6591. null,
  6592. 512
  6593. /* NEED_PATCH */
  6594. ), [
  6595. [vue.vModelText, _ctx.modalRemark]
  6596. ])
  6597. ]),
  6598. vue.createElementVNode("view", { class: "um-footer" }, [
  6599. vue.createElementVNode(
  6600. "view",
  6601. {
  6602. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6603. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6604. },
  6605. " 确认提交",
  6606. 2
  6607. /* CLASS */
  6608. )
  6609. ])
  6610. ])
  6611. ])) : vue.createCommentVNode("v-if", true),
  6612. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6613. key: 4,
  6614. class: "sum-modal-mask",
  6615. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6616. }, [
  6617. vue.createElementVNode("view", {
  6618. class: "sum-modal-card",
  6619. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6620. }, ["stop"]))
  6621. }, [
  6622. vue.createElementVNode("scroll-view", {
  6623. "scroll-y": "",
  6624. class: "sum-modal-scroll"
  6625. }, [
  6626. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6627. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6628. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6629. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6630. vue.createElementVNode(
  6631. "text",
  6632. { class: "sum-meta-val" },
  6633. vue.toDisplayString(_ctx.sumDate),
  6634. 1
  6635. /* TEXT */
  6636. )
  6637. ]),
  6638. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6639. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6640. vue.createElementVNode(
  6641. "text",
  6642. { class: "sum-meta-val" },
  6643. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6644. 1
  6645. /* TEXT */
  6646. )
  6647. ]),
  6648. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6649. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6650. vue.createElementVNode(
  6651. "text",
  6652. { class: "sum-meta-val" },
  6653. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6654. 1
  6655. /* TEXT */
  6656. )
  6657. ]),
  6658. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6659. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6660. vue.createElementVNode("image", {
  6661. class: "sum-pet-avatar",
  6662. src: _ctx.orderDetail.petAvatar,
  6663. mode: "aspectFill"
  6664. }, null, 8, ["src"]),
  6665. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6666. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6667. vue.createElementVNode(
  6668. "text",
  6669. { class: "sum-pet-name" },
  6670. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6671. 1
  6672. /* TEXT */
  6673. ),
  6674. vue.createElementVNode(
  6675. "text",
  6676. { class: "sum-pet-breed" },
  6677. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6678. 1
  6679. /* TEXT */
  6680. )
  6681. ]),
  6682. vue.createElementVNode(
  6683. "text",
  6684. { class: "sum-pet-remark" },
  6685. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6686. 1
  6687. /* TEXT */
  6688. )
  6689. ])
  6690. ]),
  6691. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6692. vue.withDirectives(vue.createElementVNode(
  6693. "textarea",
  6694. {
  6695. class: "sum-textarea",
  6696. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6697. "auto-height": "",
  6698. placeholder: "请填写服务内容...",
  6699. "placeholder-style": "color:#ccc"
  6700. },
  6701. null,
  6702. 512
  6703. /* NEED_PATCH */
  6704. ), [
  6705. [vue.vModelText, _ctx.sumContent]
  6706. ]),
  6707. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6708. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6709. vue.createElementVNode(
  6710. "text",
  6711. { class: "sum-sign-val" },
  6712. vue.toDisplayString(_ctx.sumSigner),
  6713. 1
  6714. /* TEXT */
  6715. )
  6716. ]),
  6717. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6718. ])
  6719. ]),
  6720. vue.createElementVNode("view", { class: "sum-footer" }, [
  6721. vue.createElementVNode("button", {
  6722. class: "sum-submit-btn",
  6723. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6724. }, "提交小结")
  6725. ])
  6726. ])
  6727. ])) : vue.createCommentVNode("v-if", true),
  6728. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6729. key: 5,
  6730. class: "modal-mask",
  6731. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6732. }, [
  6733. vue.createElementVNode("view", {
  6734. class: "anomaly-modal-content",
  6735. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6736. }, ["stop"]))
  6737. }, [
  6738. vue.createElementVNode("view", { class: "am-header" }, [
  6739. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6740. vue.createElementVNode("view", {
  6741. class: "close-icon-btn",
  6742. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6743. }, "×")
  6744. ]),
  6745. vue.createElementVNode("scroll-view", {
  6746. "scroll-y": "",
  6747. class: "am-scroll-list"
  6748. }, [
  6749. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6750. key: 0,
  6751. class: "empty-list"
  6752. }, [
  6753. vue.createElementVNode("image", {
  6754. class: "empty-icon",
  6755. src: _imports_8$1,
  6756. mode: "aspectFit"
  6757. }),
  6758. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6759. ])) : vue.createCommentVNode("v-if", true),
  6760. (vue.openBlock(true), vue.createElementBlock(
  6761. vue.Fragment,
  6762. null,
  6763. vue.renderList(_ctx.anomalyList, (item, index) => {
  6764. return vue.openBlock(), vue.createElementBlock("view", {
  6765. class: "am-item",
  6766. key: index
  6767. }, [
  6768. vue.createElementVNode("view", { class: "am-item-header" }, [
  6769. vue.createElementVNode(
  6770. "text",
  6771. { class: "am-item-type" },
  6772. vue.toDisplayString(item.typeLabel),
  6773. 1
  6774. /* TEXT */
  6775. ),
  6776. vue.createElementVNode(
  6777. "text",
  6778. {
  6779. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6780. },
  6781. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6782. 3
  6783. /* TEXT, CLASS */
  6784. )
  6785. ]),
  6786. vue.createElementVNode(
  6787. "text",
  6788. { class: "am-item-content" },
  6789. vue.toDisplayString(item.content),
  6790. 1
  6791. /* TEXT */
  6792. ),
  6793. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6794. key: 0,
  6795. class: "am-item-photos"
  6796. }, [
  6797. (vue.openBlock(true), vue.createElementBlock(
  6798. vue.Fragment,
  6799. null,
  6800. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  6801. return vue.openBlock(), vue.createElementBlock("view", {
  6802. class: "am-photo-item",
  6803. key: pIdx,
  6804. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  6805. }, [
  6806. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  6807. key: 0,
  6808. class: "am-photo",
  6809. src: photoUrl,
  6810. mode: "aspectFill"
  6811. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6812. key: 1,
  6813. class: "tl-video-placeholder miniaturized"
  6814. }, [
  6815. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  6816. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  6817. ]))
  6818. ], 8, ["onClick"]);
  6819. }),
  6820. 128
  6821. /* KEYED_FRAGMENT */
  6822. ))
  6823. ])) : vue.createCommentVNode("v-if", true),
  6824. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6825. key: 1,
  6826. class: "am-audit-box"
  6827. }, [
  6828. vue.createElementVNode("view", { class: "am-audit-header" }, [
  6829. vue.createElementVNode(
  6830. "text",
  6831. { class: "am-audit-label" },
  6832. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  6833. 1
  6834. /* TEXT */
  6835. ),
  6836. vue.createElementVNode(
  6837. "text",
  6838. { class: "am-audit-time" },
  6839. vue.toDisplayString(item.auditTime),
  6840. 1
  6841. /* TEXT */
  6842. )
  6843. ]),
  6844. vue.createElementVNode(
  6845. "text",
  6846. { class: "am-audit-remark" },
  6847. vue.toDisplayString(item.auditRemark || "无"),
  6848. 1
  6849. /* TEXT */
  6850. )
  6851. ])) : vue.createCommentVNode("v-if", true)
  6852. ]);
  6853. }),
  6854. 128
  6855. /* KEYED_FRAGMENT */
  6856. ))
  6857. ])
  6858. ])
  6859. ])) : vue.createCommentVNode("v-if", true),
  6860. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  6861. key: 6,
  6862. class: "video-player-mask",
  6863. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6864. }, [
  6865. vue.createElementVNode("view", {
  6866. class: "video-player-content",
  6867. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  6868. }, ["stop"]))
  6869. }, [
  6870. vue.createElementVNode("video", {
  6871. class: "v-player",
  6872. src: _ctx.videoPlayerUrl,
  6873. autoplay: "",
  6874. controls: ""
  6875. }, null, 8, ["src"]),
  6876. vue.createElementVNode("view", {
  6877. class: "v-close",
  6878. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6879. }, "×")
  6880. ])
  6881. ])) : vue.createCommentVNode("v-if", true)
  6882. ],
  6883. 64
  6884. /* STABLE_FRAGMENT */
  6885. ))
  6886. ]);
  6887. }
  6888. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  6889. const _sfc_main$p = {
  6890. data() {
  6891. return {
  6892. orderId: "",
  6893. // 已选异常类型(dictValue)
  6894. selectedTypeValue: "",
  6895. // 已选异常类型标签(dictLabel,用于显示)
  6896. selectedTypeLabel: "",
  6897. // 异常描述
  6898. anomalyDesc: "",
  6899. // 照片列表(含 url 和 ossId)
  6900. photoList: [],
  6901. // 是否显示类型选择器
  6902. showTypeSheet: false,
  6903. // 异常类型字典列表(从后端获取)
  6904. anomalyTypes: []
  6905. };
  6906. },
  6907. onLoad(options) {
  6908. if (options.orderId) {
  6909. this.orderId = options.orderId;
  6910. }
  6911. this.loadAnomalyTypes();
  6912. },
  6913. computed: {
  6914. // 当前选中的类型显示文本
  6915. selectedType() {
  6916. return this.selectedTypeLabel || "";
  6917. }
  6918. },
  6919. methods: {
  6920. /**
  6921. * 加载异常类型字典数据
  6922. */
  6923. async loadAnomalyTypes() {
  6924. try {
  6925. const res = await getDictDataByType("flf_anamaly_type");
  6926. if (res.data && Array.isArray(res.data)) {
  6927. this.anomalyTypes = res.data.map((item) => ({
  6928. label: item.dictLabel,
  6929. value: item.dictValue,
  6930. dictCode: item.dictCode
  6931. }));
  6932. formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
  6933. }
  6934. } catch (err) {
  6935. formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
  6936. }
  6937. },
  6938. // 打开类型选择器
  6939. openTypeSheet() {
  6940. this.showTypeSheet = true;
  6941. },
  6942. // 关闭类型选择器
  6943. closeTypeSheet() {
  6944. this.showTypeSheet = false;
  6945. },
  6946. // 选择异常类型
  6947. selectType(type) {
  6948. this.selectedTypeValue = type.value;
  6949. this.selectedTypeLabel = type.label;
  6950. this.closeTypeSheet();
  6951. },
  6952. // 选择照片并上传
  6953. choosePhoto() {
  6954. uni.chooseImage({
  6955. count: 5 - this.photoList.length,
  6956. sizeType: ["compressed"],
  6957. sourceType: ["album", "camera"],
  6958. success: async (res) => {
  6959. uni.showLoading({ title: "上传中..." });
  6960. try {
  6961. for (const filePath of res.tempFilePaths) {
  6962. const uploadRes = await uploadFile(filePath);
  6963. if (uploadRes.code === 200) {
  6964. this.photoList.push({
  6965. url: uploadRes.data.url,
  6966. ossId: uploadRes.data.ossId,
  6967. localPath: filePath
  6968. });
  6969. }
  6970. }
  6971. uni.hideLoading();
  6972. } catch (err) {
  6973. uni.hideLoading();
  6974. formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
  6975. uni.showToast({ title: "上传失败", icon: "none" });
  6976. }
  6977. }
  6978. });
  6979. },
  6980. // 删除照片
  6981. removePhoto(idx) {
  6982. this.photoList.splice(idx, 1);
  6983. },
  6984. // 提交上报
  6985. async submitAnomaly() {
  6986. if (!this.selectedTypeValue) {
  6987. uni.showToast({ title: "请选择异常类型", icon: "none" });
  6988. return;
  6989. }
  6990. if (this.photoList.length === 0) {
  6991. uni.showToast({ title: "请上传现场照片", icon: "none" });
  6992. return;
  6993. }
  6994. const data = {
  6995. orderId: this.orderId,
  6996. type: this.selectedTypeValue,
  6997. content: this.anomalyDesc,
  6998. photos: this.photoList.map((p) => p.ossId)
  6999. };
  7000. try {
  7001. uni.showLoading({ title: "提交中..." });
  7002. await uploadAnamaly(data);
  7003. uni.hideLoading();
  7004. uni.showToast({ title: "上报成功", icon: "success" });
  7005. setTimeout(() => {
  7006. uni.navigateBack();
  7007. }, 1500);
  7008. } catch (err) {
  7009. uni.hideLoading();
  7010. formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
  7011. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  7012. }
  7013. }
  7014. }
  7015. };
  7016. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  7017. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  7018. vue.createElementVNode("scroll-view", {
  7019. "scroll-y": "",
  7020. class: "anomaly-scroll"
  7021. }, [
  7022. vue.createElementVNode("view", { class: "ano-card" }, [
  7023. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7024. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7025. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  7026. ]),
  7027. vue.createElementVNode("view", {
  7028. class: "ano-type-row",
  7029. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  7030. }, [
  7031. vue.createElementVNode(
  7032. "text",
  7033. {
  7034. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  7035. },
  7036. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  7037. 3
  7038. /* TEXT, CLASS */
  7039. ),
  7040. vue.createElementVNode("image", {
  7041. class: "ano-right-arrow",
  7042. src: _imports_0$2
  7043. })
  7044. ])
  7045. ]),
  7046. vue.createElementVNode("view", { class: "ano-card" }, [
  7047. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7048. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7049. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  7050. ]),
  7051. vue.withDirectives(vue.createElementVNode(
  7052. "textarea",
  7053. {
  7054. class: "ano-textarea",
  7055. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  7056. placeholder: "请详细描述现场异常情况...",
  7057. "placeholder-style": "color:#ccc; font-size:28rpx;",
  7058. maxlength: "500"
  7059. },
  7060. null,
  7061. 512
  7062. /* NEED_PATCH */
  7063. ), [
  7064. [vue.vModelText, $data.anomalyDesc]
  7065. ])
  7066. ]),
  7067. vue.createElementVNode("view", { class: "ano-card" }, [
  7068. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7069. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7070. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  7071. ]),
  7072. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  7073. (vue.openBlock(true), vue.createElementBlock(
  7074. vue.Fragment,
  7075. null,
  7076. vue.renderList($data.photoList, (img, idx) => {
  7077. return vue.openBlock(), vue.createElementBlock("view", {
  7078. class: "ano-photo-item",
  7079. key: idx
  7080. }, [
  7081. vue.createElementVNode("image", {
  7082. class: "ano-photo-preview",
  7083. src: img.url || img.localPath || img,
  7084. mode: "aspectFill"
  7085. }, null, 8, ["src"]),
  7086. vue.createElementVNode("view", {
  7087. class: "ano-photo-del",
  7088. onClick: ($event) => $options.removePhoto(idx)
  7089. }, "×", 8, ["onClick"])
  7090. ]);
  7091. }),
  7092. 128
  7093. /* KEYED_FRAGMENT */
  7094. )),
  7095. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  7096. key: 0,
  7097. class: "ano-photo-add",
  7098. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  7099. }, [
  7100. vue.createElementVNode("image", {
  7101. class: "ano-add-icon",
  7102. src: _imports_1$6
  7103. }),
  7104. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  7105. ])) : vue.createCommentVNode("v-if", true)
  7106. ])
  7107. ]),
  7108. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  7109. ]),
  7110. vue.createElementVNode("view", { class: "ano-footer" }, [
  7111. vue.createElementVNode("button", {
  7112. class: "ano-submit-btn",
  7113. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  7114. }, "提交上报")
  7115. ]),
  7116. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  7117. key: 0,
  7118. class: "ano-sheet-mask",
  7119. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7120. }, [
  7121. vue.createElementVNode("view", {
  7122. class: "ano-sheet",
  7123. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  7124. }, ["stop"]))
  7125. }, [
  7126. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  7127. vue.createElementVNode("scroll-view", {
  7128. "scroll-y": "",
  7129. class: "ano-sheet-list"
  7130. }, [
  7131. (vue.openBlock(true), vue.createElementBlock(
  7132. vue.Fragment,
  7133. null,
  7134. vue.renderList($data.anomalyTypes, (type, idx) => {
  7135. return vue.openBlock(), vue.createElementBlock("view", {
  7136. class: "ano-sheet-item",
  7137. key: idx,
  7138. onClick: ($event) => $options.selectType(type)
  7139. }, [
  7140. vue.createElementVNode(
  7141. "text",
  7142. {
  7143. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  7144. },
  7145. vue.toDisplayString(type.label),
  7146. 3
  7147. /* TEXT, CLASS */
  7148. ),
  7149. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  7150. key: 0,
  7151. class: "ano-check-icon",
  7152. src: _imports_0$2
  7153. })) : vue.createCommentVNode("v-if", true)
  7154. ], 8, ["onClick"]);
  7155. }),
  7156. 128
  7157. /* KEYED_FRAGMENT */
  7158. ))
  7159. ]),
  7160. vue.createElementVNode("view", {
  7161. class: "ano-sheet-cancel",
  7162. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7163. }, "取消")
  7164. ])
  7165. ])) : vue.createCommentVNode("v-if", true)
  7166. ]);
  7167. }
  7168. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  7169. const _sfc_main$o = {
  7170. data() {
  7171. return {
  7172. tabs: ["全部", "已完成", "已拒绝"],
  7173. activeTab: 0,
  7174. stats: {
  7175. total: 0,
  7176. reject: 0,
  7177. reward: 0,
  7178. punish: 0
  7179. },
  7180. orders: [],
  7181. serviceList: [],
  7182. pageNum: 1,
  7183. pageSize: 10,
  7184. total: 0,
  7185. loading: false
  7186. };
  7187. },
  7188. computed: {
  7189. filteredOrders() {
  7190. return this.orders;
  7191. }
  7192. },
  7193. async onLoad() {
  7194. await this.loadServiceList();
  7195. this.fetchStats();
  7196. this.fetchOrders(true);
  7197. },
  7198. methods: {
  7199. async loadServiceList() {
  7200. try {
  7201. const res = await listAllService();
  7202. this.serviceList = res.data || [];
  7203. } catch (err) {
  7204. formatAppLog("error", "at pages/mine/order-stats.vue:160", "获取服务类型失败:", err);
  7205. }
  7206. },
  7207. async fetchStats() {
  7208. try {
  7209. const res = await getOrderStats();
  7210. if (res.code === 200 && res.data) {
  7211. this.stats = {
  7212. ...this.stats,
  7213. ...res.data
  7214. };
  7215. }
  7216. } catch (err) {
  7217. formatAppLog("error", "at pages/mine/order-stats.vue:173", "获取统计值失败:", err);
  7218. }
  7219. },
  7220. async fetchOrders(reset = false) {
  7221. if (reset) {
  7222. this.pageNum = 1;
  7223. this.orders = [];
  7224. }
  7225. if (this.loading)
  7226. return;
  7227. if (!reset && this.orders.length >= this.total && this.total !== 0)
  7228. return;
  7229. this.loading = true;
  7230. try {
  7231. const statusMap = { 0: void 0, 1: 4, 2: 5 };
  7232. const params = {
  7233. status: statusMap[this.activeTab],
  7234. pageNum: this.pageNum,
  7235. pageSize: this.pageSize
  7236. };
  7237. const res = await getStatisticOrders(params);
  7238. if (res.code === 200) {
  7239. this.total = res.total || 0;
  7240. const rows = res.rows || [];
  7241. const mapped = rows.map((item) => this.transformOrder(item));
  7242. this.orders = this.orders.concat(mapped);
  7243. this.pageNum++;
  7244. }
  7245. } catch (err) {
  7246. formatAppLog("error", "at pages/mine/order-stats.vue:201", "获取订单列表失败:", err);
  7247. } finally {
  7248. this.loading = false;
  7249. }
  7250. },
  7251. transformOrder(order) {
  7252. const service = this.serviceList.find((s) => s.id === order.service);
  7253. const mode = (service == null ? void 0 : service.mode) || 0;
  7254. const isRoundTrip = mode === 1;
  7255. const statusMap = {
  7256. 0: { label: "待派单", color: "#f56c6c" },
  7257. 1: { label: "待接单", color: "#e6a23c" },
  7258. 2: { label: "待服务", color: "#49a3ff" },
  7259. 3: { label: "服务中", color: "#49a3ff" },
  7260. 4: { label: "已完成", color: "#67c23a" },
  7261. 5: { label: "已取消", color: "#909399" }
  7262. };
  7263. const statusInfo = statusMap[order.status] || { label: "未知", color: "#999" };
  7264. return {
  7265. id: order.id,
  7266. orderType: isRoundTrip ? 1 : 2,
  7267. typeName: (service == null ? void 0 : service.name) || "未知",
  7268. typeIcon: (service == null ? void 0 : service.iconUrl) || "",
  7269. statusLabel: statusInfo.label,
  7270. statusColor: statusInfo.color,
  7271. finishTime: order.serviceTime || "",
  7272. serviceTime: order.serviceTime || "",
  7273. petName: order.petName || "未知",
  7274. petBreed: order.breed || "未知",
  7275. petAvatar: order.petAvatarUrl || "/static/dog.png",
  7276. price: (order.price / 100).toFixed(2),
  7277. startName: order.fromAddress || "",
  7278. startAddr: order.fromAddress || "",
  7279. endName: (order.customerName || "") + " " + (order.customerPhone || ""),
  7280. endAddr: order.toAddress || "",
  7281. serviceNote: order.remark || ""
  7282. };
  7283. },
  7284. switchTab(idx) {
  7285. this.activeTab = idx;
  7286. this.fetchOrders(true);
  7287. },
  7288. onReachBottom() {
  7289. this.fetchOrders();
  7290. },
  7291. navBack() {
  7292. uni.navigateBack();
  7293. }
  7294. }
  7295. };
  7296. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  7297. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7298. vue.createElementVNode("view", { class: "stats-banner" }, [
  7299. vue.createElementVNode("view", { class: "banner-item" }, [
  7300. vue.createElementVNode(
  7301. "text",
  7302. { class: "banner-num" },
  7303. vue.toDisplayString($data.stats.total),
  7304. 1
  7305. /* TEXT */
  7306. ),
  7307. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7308. ]),
  7309. vue.createElementVNode("view", { class: "banner-item" }, [
  7310. vue.createElementVNode(
  7311. "text",
  7312. { class: "banner-num" },
  7313. vue.toDisplayString($data.stats.reject),
  7314. 1
  7315. /* TEXT */
  7316. ),
  7317. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7318. ]),
  7319. vue.createElementVNode("view", { class: "banner-item" }, [
  7320. vue.createElementVNode(
  7321. "text",
  7322. { class: "banner-num" },
  7323. vue.toDisplayString($data.stats.reward),
  7324. 1
  7325. /* TEXT */
  7326. ),
  7327. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7328. ]),
  7329. vue.createElementVNode("view", { class: "banner-item" }, [
  7330. vue.createElementVNode(
  7331. "text",
  7332. { class: "banner-num" },
  7333. vue.toDisplayString($data.stats.punish),
  7334. 1
  7335. /* TEXT */
  7336. ),
  7337. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7338. ])
  7339. ]),
  7340. vue.createElementVNode("view", { class: "tab-bar" }, [
  7341. (vue.openBlock(true), vue.createElementBlock(
  7342. vue.Fragment,
  7343. null,
  7344. vue.renderList($data.tabs, (tab, idx) => {
  7345. return vue.openBlock(), vue.createElementBlock("view", {
  7346. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7347. key: idx,
  7348. onClick: ($event) => $options.switchTab(idx)
  7349. }, [
  7350. vue.createElementVNode(
  7351. "text",
  7352. null,
  7353. vue.toDisplayString(tab),
  7354. 1
  7355. /* TEXT */
  7356. ),
  7357. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7358. key: 0,
  7359. class: "tab-line"
  7360. })) : vue.createCommentVNode("v-if", true)
  7361. ], 10, ["onClick"]);
  7362. }),
  7363. 128
  7364. /* KEYED_FRAGMENT */
  7365. ))
  7366. ]),
  7367. vue.createElementVNode(
  7368. "scroll-view",
  7369. {
  7370. "scroll-y": "",
  7371. class: "order-scroll",
  7372. onScrolltolower: _cache[0] || (_cache[0] = (...args) => $options.onReachBottom && $options.onReachBottom(...args))
  7373. },
  7374. [
  7375. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7376. (vue.openBlock(true), vue.createElementBlock(
  7377. vue.Fragment,
  7378. null,
  7379. vue.renderList($options.filteredOrders, (order, idx) => {
  7380. return vue.openBlock(), vue.createElementBlock("view", {
  7381. class: "order-card",
  7382. key: idx
  7383. }, [
  7384. vue.createElementVNode("view", { class: "card-header" }, [
  7385. vue.createElementVNode("view", { class: "type-badge" }, [
  7386. vue.createElementVNode("image", {
  7387. class: "type-icon",
  7388. src: order.typeIcon
  7389. }, null, 8, ["src"]),
  7390. vue.createElementVNode(
  7391. "text",
  7392. { class: "type-text" },
  7393. vue.toDisplayString(order.typeName),
  7394. 1
  7395. /* TEXT */
  7396. )
  7397. ]),
  7398. vue.createElementVNode(
  7399. "text",
  7400. {
  7401. class: "status-text",
  7402. style: vue.normalizeStyle({ color: order.statusColor })
  7403. },
  7404. vue.toDisplayString(order.statusLabel),
  7405. 5
  7406. /* TEXT, STYLE */
  7407. )
  7408. ]),
  7409. vue.createElementVNode(
  7410. "text",
  7411. { class: "service-time" },
  7412. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7413. 1
  7414. /* TEXT */
  7415. ),
  7416. vue.createElementVNode("view", { class: "pet-card" }, [
  7417. vue.createElementVNode("image", {
  7418. class: "pet-avatar",
  7419. src: order.petAvatar,
  7420. mode: "aspectFill"
  7421. }, null, 8, ["src"]),
  7422. vue.createElementVNode("view", { class: "pet-info" }, [
  7423. vue.createElementVNode(
  7424. "text",
  7425. { class: "pet-name" },
  7426. vue.toDisplayString(order.petName),
  7427. 1
  7428. /* TEXT */
  7429. ),
  7430. vue.createElementVNode(
  7431. "text",
  7432. { class: "pet-breed" },
  7433. "品种: " + vue.toDisplayString(order.petBreed),
  7434. 1
  7435. /* TEXT */
  7436. )
  7437. ]),
  7438. vue.createElementVNode(
  7439. "text",
  7440. { class: "pet-price" },
  7441. "¥" + vue.toDisplayString(order.price),
  7442. 1
  7443. /* TEXT */
  7444. )
  7445. ]),
  7446. vue.createElementVNode("view", { class: "route-info" }, [
  7447. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7448. vue.Fragment,
  7449. { key: 0 },
  7450. [
  7451. vue.createElementVNode("view", { class: "route-item" }, [
  7452. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7453. vue.createElementVNode("view", { class: "route-connector" }),
  7454. vue.createElementVNode("view", { class: "address-box" }, [
  7455. vue.createElementVNode(
  7456. "text",
  7457. { class: "addr-title" },
  7458. vue.toDisplayString(order.startName),
  7459. 1
  7460. /* TEXT */
  7461. ),
  7462. vue.createElementVNode(
  7463. "text",
  7464. { class: "addr-desc" },
  7465. vue.toDisplayString(order.startAddr),
  7466. 1
  7467. /* TEXT */
  7468. )
  7469. ])
  7470. ]),
  7471. vue.createElementVNode("view", { class: "route-item" }, [
  7472. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7473. vue.createElementVNode("view", { class: "address-box" }, [
  7474. vue.createElementVNode(
  7475. "text",
  7476. { class: "addr-title" },
  7477. vue.toDisplayString(order.endName),
  7478. 1
  7479. /* TEXT */
  7480. ),
  7481. vue.createElementVNode(
  7482. "text",
  7483. { class: "addr-desc" },
  7484. vue.toDisplayString(order.endAddr),
  7485. 1
  7486. /* TEXT */
  7487. )
  7488. ])
  7489. ])
  7490. ],
  7491. 64
  7492. /* STABLE_FRAGMENT */
  7493. )) : (vue.openBlock(), vue.createElementBlock(
  7494. vue.Fragment,
  7495. { key: 1 },
  7496. [
  7497. vue.createElementVNode("view", { class: "route-item" }, [
  7498. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7499. vue.createElementVNode("view", { class: "address-box" }, [
  7500. vue.createElementVNode(
  7501. "text",
  7502. { class: "addr-title" },
  7503. vue.toDisplayString(order.endName),
  7504. 1
  7505. /* TEXT */
  7506. ),
  7507. vue.createElementVNode(
  7508. "text",
  7509. { class: "addr-desc" },
  7510. vue.toDisplayString(order.endAddr),
  7511. 1
  7512. /* TEXT */
  7513. )
  7514. ])
  7515. ]),
  7516. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7517. key: 0,
  7518. class: "service-note-row"
  7519. }, [
  7520. vue.createElementVNode(
  7521. "text",
  7522. { class: "service-note-text" },
  7523. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7524. 1
  7525. /* TEXT */
  7526. )
  7527. ])) : vue.createCommentVNode("v-if", true)
  7528. ],
  7529. 64
  7530. /* STABLE_FRAGMENT */
  7531. ))
  7532. ])
  7533. ]);
  7534. }),
  7535. 128
  7536. /* KEYED_FRAGMENT */
  7537. )),
  7538. $options.filteredOrders.length === 0 && !$data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7539. key: 0,
  7540. class: "empty-state"
  7541. }, [
  7542. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7543. ])) : vue.createCommentVNode("v-if", true),
  7544. $data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7545. key: 1,
  7546. class: "loading-more"
  7547. }, [
  7548. vue.createElementVNode("text", null, "加载中...")
  7549. ])) : vue.createCommentVNode("v-if", true),
  7550. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7551. ],
  7552. 32
  7553. /* NEED_HYDRATION */
  7554. )
  7555. ]);
  7556. }
  7557. const PagesMineOrderStats = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/order-stats.vue"]]);
  7558. function getBalanceOnApp() {
  7559. return request({
  7560. url: "/fulfiller/log/balanceOnApp",
  7561. method: "GET"
  7562. });
  7563. }
  7564. function pageBalanceOnApp(data) {
  7565. return request({
  7566. url: "/fulfiller/log/pageBalanceOnApp",
  7567. method: "GET",
  7568. data
  7569. });
  7570. }
  7571. function listBalanceOnApp(data) {
  7572. return request({
  7573. url: "/fulfiller/log/listBalanceOnApp",
  7574. method: "GET",
  7575. data
  7576. });
  7577. }
  7578. function pointsOnApp() {
  7579. return request({
  7580. url: "/fulfiller/log/pointsOnApp",
  7581. method: "GET"
  7582. });
  7583. }
  7584. function pagePointsOnApp(data) {
  7585. return request({
  7586. url: "/fulfiller/log/pagePointsOnApp",
  7587. method: "GET",
  7588. data
  7589. });
  7590. }
  7591. function listPointsOnApp(data) {
  7592. return request({
  7593. url: "/fulfiller/log/listPointsOnApp",
  7594. method: "GET",
  7595. data
  7596. });
  7597. }
  7598. function countOnAppReward(data) {
  7599. return request({
  7600. url: "/fulfiller/log/countOnAppReward",
  7601. method: "GET",
  7602. data
  7603. });
  7604. }
  7605. function listOnAppReward(data) {
  7606. return request({
  7607. url: "/fulfiller/log/listOnAppReward",
  7608. method: "GET",
  7609. data
  7610. });
  7611. }
  7612. const FlfBalanceBizType = {
  7613. admin_reward: "后台奖励",
  7614. admin_punish: "后台惩罚",
  7615. admin_adjust: "后台调整",
  7616. order_reward: "订单奖励",
  7617. order_punish: "订单惩罚",
  7618. order_finish: "订单完成",
  7619. salary: "工资发放",
  7620. withdraw: "提现"
  7621. };
  7622. const FlfPointsBizType = {
  7623. admin_reward: "后台奖励",
  7624. admin_punish: "后台惩罚",
  7625. admin_adjust: "后台调整",
  7626. order_reward: "订单奖励",
  7627. order_punish: "订单惩罚",
  7628. order_finish: "订单完成"
  7629. };
  7630. const FlfRewardBizType = {
  7631. admin_reward: "后台奖励",
  7632. admin_punish: "后台惩罚",
  7633. order_reward: "订单奖励",
  7634. order_punish: "订单惩罚",
  7635. order_finish: "订单完成"
  7636. };
  7637. const FlfActionType = {
  7638. add: "收入",
  7639. reduce: "支出"
  7640. };
  7641. const fulfillerEnum = {
  7642. FlfBalanceBizType,
  7643. FlfPointsBizType,
  7644. FlfRewardBizType,
  7645. FlfActionType
  7646. };
  7647. const bizTypeMap$5 = fulfillerEnum.FlfRewardBizType;
  7648. const _sfc_main$n = {
  7649. data() {
  7650. const now = /* @__PURE__ */ new Date();
  7651. return {
  7652. tabs: ["全部", "奖励", "惩罚"],
  7653. activeTab: 0,
  7654. selectedYear: now.getFullYear(),
  7655. selectedMonth: now.getFullYear() === 2026 && now.getMonth() < 2 ? 3 : now.getMonth() + 1,
  7656. // 默认当前月,处理一下测试数据时间
  7657. // 统计数据
  7658. stats: {
  7659. rewardCount: 0,
  7660. punishCount: 0,
  7661. rewardBalance: 0,
  7662. punishBalance: 0
  7663. },
  7664. // 月份选择器状态
  7665. showMonthPicker: false,
  7666. pickerYear: 2026,
  7667. pickerMonth: 3,
  7668. years: [2024, 2025, 2026],
  7669. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7670. yearScrollTop: 0,
  7671. monthScrollTop: 0,
  7672. // 奖惩记录列表
  7673. records: []
  7674. };
  7675. },
  7676. computed: {
  7677. filteredList() {
  7678. if (this.activeTab === 0)
  7679. return this.records;
  7680. const targetType = this.activeTab === 1 ? "reward" : "penalty";
  7681. return this.records.filter((r) => r.type === targetType);
  7682. }
  7683. },
  7684. onShow() {
  7685. if (this.selectedYear === 2026 && this.selectedMonth === 2)
  7686. ;
  7687. this.fetchData();
  7688. },
  7689. methods: {
  7690. async fetchData() {
  7691. const params = {
  7692. year: this.selectedYear,
  7693. month: this.selectedMonth
  7694. };
  7695. this.fetchStats(params);
  7696. this.fetchList(params);
  7697. },
  7698. async fetchStats(params) {
  7699. try {
  7700. const res = await countOnAppReward(params);
  7701. if (res.code === 200) {
  7702. this.stats = res.data || {
  7703. rewardCount: 0,
  7704. punishCount: 0,
  7705. rewardBalance: 0,
  7706. punishBalance: 0
  7707. };
  7708. }
  7709. } catch (err) {
  7710. formatAppLog("error", "at pages/mine/rewards.vue:196", "获取奖惩统计失败:", err);
  7711. }
  7712. },
  7713. async fetchList(params) {
  7714. try {
  7715. const res = await listOnAppReward(params);
  7716. if (res.code === 200) {
  7717. const list = res.data || [];
  7718. this.records = list.map((item) => {
  7719. const isAdd = item.type === "add";
  7720. const amountVal = Math.abs(item.amount) / 100;
  7721. let dateStr = "";
  7722. if (item.createTime) {
  7723. const datePart = item.createTime.split(" ")[0];
  7724. const parts = datePart.split("-");
  7725. if (parts.length >= 3) {
  7726. dateStr = `${parts[1]}-${parts[2]}`;
  7727. }
  7728. }
  7729. return {
  7730. ...item,
  7731. date: dateStr,
  7732. title: bizTypeMap$5[item.bizType] || item.bizType || "其他",
  7733. desc: item.reason || "",
  7734. amount: isAdd ? amountVal : -amountVal,
  7735. type: isAdd ? "reward" : "penalty",
  7736. status: isAdd ? "已入账" : "已扣款",
  7737. // 简化处理状态
  7738. statusClass: isAdd ? "credited" : "deducted"
  7739. };
  7740. });
  7741. }
  7742. } catch (err) {
  7743. formatAppLog("error", "at pages/mine/rewards.vue:231", "获取奖惩列表失败:", err);
  7744. }
  7745. },
  7746. switchTab(idx) {
  7747. this.activeTab = idx;
  7748. },
  7749. openMonthPicker() {
  7750. this.pickerYear = this.selectedYear;
  7751. this.pickerMonth = this.selectedMonth;
  7752. this.showMonthPicker = true;
  7753. },
  7754. closeMonthPicker() {
  7755. this.showMonthPicker = false;
  7756. },
  7757. confirmMonthPicker() {
  7758. this.selectedYear = this.pickerYear;
  7759. this.selectedMonth = this.pickerMonth;
  7760. this.closeMonthPicker();
  7761. this.fetchData();
  7762. },
  7763. goToAll() {
  7764. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7765. }
  7766. }
  7767. };
  7768. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  7769. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7770. vue.createElementVNode("view", { class: "top-banner" }, [
  7771. vue.createElementVNode("view", {
  7772. class: "month-btn",
  7773. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7774. }, [
  7775. vue.createElementVNode(
  7776. "text",
  7777. { class: "month-text" },
  7778. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7779. 1
  7780. /* TEXT */
  7781. )
  7782. ]),
  7783. vue.createElementVNode("view", { class: "stats-grid" }, [
  7784. vue.createElementVNode("view", { class: "stats-cell" }, [
  7785. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7786. vue.createElementVNode("text", { class: "stats-num" }, [
  7787. vue.createTextVNode(
  7788. vue.toDisplayString($data.stats.rewardCount),
  7789. 1
  7790. /* TEXT */
  7791. ),
  7792. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7793. ]),
  7794. vue.createElementVNode("view", { class: "stats-divider" }),
  7795. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7796. ]),
  7797. vue.createElementVNode("view", { class: "stats-cell" }, [
  7798. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7799. vue.createElementVNode("text", { class: "stats-num" }, [
  7800. vue.createTextVNode(
  7801. vue.toDisplayString($data.stats.punishCount),
  7802. 1
  7803. /* TEXT */
  7804. ),
  7805. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7806. ]),
  7807. vue.createElementVNode("view", { class: "stats-divider" }),
  7808. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7809. ]),
  7810. vue.createElementVNode("view", { class: "stats-cell" }, [
  7811. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  7812. vue.createElementVNode(
  7813. "text",
  7814. { class: "stats-num reward-num" },
  7815. vue.toDisplayString(($data.stats.rewardBalance / 100).toFixed(2)),
  7816. 1
  7817. /* TEXT */
  7818. ),
  7819. vue.createElementVNode("view", { class: "stats-divider" }),
  7820. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7821. ]),
  7822. vue.createElementVNode("view", { class: "stats-cell" }, [
  7823. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  7824. vue.createElementVNode(
  7825. "text",
  7826. { class: "stats-num penalty-num" },
  7827. vue.toDisplayString(($data.stats.punishBalance / 100).toFixed(2)),
  7828. 1
  7829. /* TEXT */
  7830. ),
  7831. vue.createElementVNode("view", { class: "stats-divider" }),
  7832. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7833. ])
  7834. ])
  7835. ]),
  7836. vue.createElementVNode("view", { class: "list-header" }, [
  7837. vue.createElementVNode("view", { class: "tab-bar" }, [
  7838. (vue.openBlock(true), vue.createElementBlock(
  7839. vue.Fragment,
  7840. null,
  7841. vue.renderList($data.tabs, (tab, idx) => {
  7842. return vue.openBlock(), vue.createElementBlock("view", {
  7843. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7844. key: idx,
  7845. onClick: ($event) => $options.switchTab(idx)
  7846. }, [
  7847. vue.createElementVNode(
  7848. "text",
  7849. null,
  7850. vue.toDisplayString(tab),
  7851. 1
  7852. /* TEXT */
  7853. ),
  7854. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7855. key: 0,
  7856. class: "tab-line"
  7857. })) : vue.createCommentVNode("v-if", true)
  7858. ], 10, ["onClick"]);
  7859. }),
  7860. 128
  7861. /* KEYED_FRAGMENT */
  7862. ))
  7863. ]),
  7864. vue.createElementVNode("view", {
  7865. class: "view-all-btn",
  7866. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  7867. }, [
  7868. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  7869. ])
  7870. ]),
  7871. vue.createElementVNode("view", { class: "record-list" }, [
  7872. (vue.openBlock(true), vue.createElementBlock(
  7873. vue.Fragment,
  7874. null,
  7875. vue.renderList($options.filteredList, (item, idx) => {
  7876. return vue.openBlock(), vue.createElementBlock("view", {
  7877. class: "record-item",
  7878. key: idx
  7879. }, [
  7880. vue.createElementVNode(
  7881. "view",
  7882. {
  7883. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7884. },
  7885. [
  7886. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7887. ],
  7888. 2
  7889. /* CLASS */
  7890. ),
  7891. vue.createElementVNode("view", { class: "ri-content" }, [
  7892. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7893. vue.createElementVNode(
  7894. "text",
  7895. { class: "ri-date" },
  7896. vue.toDisplayString(item.date),
  7897. 1
  7898. /* TEXT */
  7899. ),
  7900. vue.createElementVNode(
  7901. "text",
  7902. { class: "ri-title" },
  7903. vue.toDisplayString(item.title),
  7904. 1
  7905. /* TEXT */
  7906. )
  7907. ]),
  7908. vue.createElementVNode(
  7909. "text",
  7910. { class: "ri-desc" },
  7911. vue.toDisplayString(item.desc),
  7912. 1
  7913. /* TEXT */
  7914. )
  7915. ]),
  7916. vue.createElementVNode("view", { class: "ri-right" }, [
  7917. vue.createElementVNode(
  7918. "text",
  7919. {
  7920. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7921. },
  7922. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7923. 3
  7924. /* TEXT, CLASS */
  7925. ),
  7926. vue.createElementVNode(
  7927. "text",
  7928. {
  7929. class: vue.normalizeClass(["ri-status", item.statusClass])
  7930. },
  7931. vue.toDisplayString(item.status),
  7932. 3
  7933. /* TEXT, CLASS */
  7934. )
  7935. ])
  7936. ]);
  7937. }),
  7938. 128
  7939. /* KEYED_FRAGMENT */
  7940. )),
  7941. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  7942. ]),
  7943. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  7944. key: 0,
  7945. class: "picker-mask",
  7946. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7947. }, [
  7948. vue.createElementVNode("view", {
  7949. class: "picker-sheet",
  7950. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  7951. }, ["stop"]))
  7952. }, [
  7953. vue.createElementVNode("view", { class: "picker-header" }, [
  7954. vue.createElementVNode("text", {
  7955. class: "picker-cancel",
  7956. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7957. }, "取消"),
  7958. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  7959. vue.createElementVNode("text", {
  7960. class: "picker-confirm",
  7961. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  7962. }, "确定")
  7963. ]),
  7964. vue.createElementVNode("view", { class: "picker-body" }, [
  7965. vue.createElementVNode("scroll-view", {
  7966. "scroll-y": "",
  7967. class: "picker-column",
  7968. "scroll-top": $data.yearScrollTop,
  7969. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  7970. }, [
  7971. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7972. (vue.openBlock(true), vue.createElementBlock(
  7973. vue.Fragment,
  7974. null,
  7975. vue.renderList($data.years, (year) => {
  7976. return vue.openBlock(), vue.createElementBlock("view", {
  7977. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  7978. key: year,
  7979. onClick: ($event) => $data.pickerYear = year
  7980. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  7981. }),
  7982. 128
  7983. /* KEYED_FRAGMENT */
  7984. )),
  7985. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7986. ], 40, ["scroll-top"]),
  7987. vue.createElementVNode("view", { class: "picker-highlight" }),
  7988. vue.createElementVNode("scroll-view", {
  7989. "scroll-y": "",
  7990. class: "picker-column",
  7991. "scroll-top": $data.monthScrollTop,
  7992. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  7993. }, [
  7994. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7995. (vue.openBlock(true), vue.createElementBlock(
  7996. vue.Fragment,
  7997. null,
  7998. vue.renderList($data.months, (month) => {
  7999. return vue.openBlock(), vue.createElementBlock("view", {
  8000. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  8001. key: month,
  8002. onClick: ($event) => $data.pickerMonth = month
  8003. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  8004. }),
  8005. 128
  8006. /* KEYED_FRAGMENT */
  8007. )),
  8008. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8009. ], 40, ["scroll-top"])
  8010. ])
  8011. ])
  8012. ])) : vue.createCommentVNode("v-if", true)
  8013. ]);
  8014. }
  8015. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  8016. const bizTypeMap$4 = fulfillerEnum.FlfRewardBizType;
  8017. const _sfc_main$m = {
  8018. data() {
  8019. const now = /* @__PURE__ */ new Date();
  8020. return {
  8021. tabs: ["全部", "奖励", "惩罚"],
  8022. activeTab: 0,
  8023. selectedYear: now.getFullYear(),
  8024. selectedMonth: now.getMonth() + 1,
  8025. // 原始分组数据
  8026. allGroups: [],
  8027. loading: false
  8028. };
  8029. },
  8030. computed: {
  8031. currentPickerDate() {
  8032. return `${this.selectedYear}-${String(this.selectedMonth).padStart(2, "0")}`;
  8033. },
  8034. filteredGroups() {
  8035. if (this.activeTab === 0)
  8036. return this.allGroups;
  8037. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  8038. return this.allGroups.map((g) => ({
  8039. ...g,
  8040. items: g.items.filter((i) => i.type === typeKey)
  8041. })).filter((g) => g.items.length > 0);
  8042. }
  8043. },
  8044. onShow() {
  8045. this.fetchMonthData();
  8046. },
  8047. methods: {
  8048. async fetchMonthData() {
  8049. if (this.loading)
  8050. return;
  8051. this.loading = true;
  8052. try {
  8053. const params = {
  8054. year: this.selectedYear,
  8055. month: this.selectedMonth
  8056. };
  8057. const res = await listOnAppReward(params);
  8058. const data = res.data || [];
  8059. if (data.length === 0) {
  8060. this.allGroups = [];
  8061. return;
  8062. }
  8063. let credited = 0;
  8064. const items = data.map((item) => {
  8065. const isAdd = item.type === "add";
  8066. const amountVal = Math.abs(item.amount) / 100;
  8067. if (isAdd)
  8068. credited += amountVal;
  8069. let dateStr = "";
  8070. if (item.createTime) {
  8071. const datePart = item.createTime.split(" ")[0];
  8072. const parts = datePart.split("-");
  8073. if (parts.length >= 3) {
  8074. dateStr = `${parts[1]}-${parts[2]}`;
  8075. }
  8076. }
  8077. return {
  8078. ...item,
  8079. date: dateStr,
  8080. title: bizTypeMap$4[item.bizType] || item.bizType || "其他",
  8081. desc: item.reason || "",
  8082. amount: isAdd ? amountVal : -amountVal,
  8083. type: isAdd ? "reward" : "penalty",
  8084. status: isAdd ? "已入账" : "已扣款",
  8085. statusClass: isAdd ? "credited" : "deducted"
  8086. };
  8087. });
  8088. this.allGroups = [{
  8089. month: this.selectedMonth,
  8090. year: this.selectedYear,
  8091. credited,
  8092. pending: 0,
  8093. items
  8094. }];
  8095. } catch (err) {
  8096. formatAppLog("error", "at pages/mine/rewards-all.vue:151", "获取奖惩明细失败:", err);
  8097. } finally {
  8098. this.loading = false;
  8099. }
  8100. },
  8101. onDateChange(e) {
  8102. const val = e.detail.value;
  8103. const parts = val.split("-");
  8104. this.selectedYear = parseInt(parts[0]);
  8105. this.selectedMonth = parseInt(parts[1]);
  8106. this.fetchMonthData();
  8107. },
  8108. switchTab(idx) {
  8109. this.activeTab = idx;
  8110. }
  8111. }
  8112. };
  8113. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  8114. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8115. vue.createElementVNode("view", { class: "filter-header" }, [
  8116. vue.createElementVNode("view", { class: "tab-bar" }, [
  8117. (vue.openBlock(true), vue.createElementBlock(
  8118. vue.Fragment,
  8119. null,
  8120. vue.renderList($data.tabs, (tab, idx) => {
  8121. return vue.openBlock(), vue.createElementBlock("view", {
  8122. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8123. key: idx,
  8124. onClick: ($event) => $options.switchTab(idx)
  8125. }, [
  8126. vue.createElementVNode(
  8127. "text",
  8128. null,
  8129. vue.toDisplayString(tab),
  8130. 1
  8131. /* TEXT */
  8132. ),
  8133. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8134. key: 0,
  8135. class: "tab-line"
  8136. })) : vue.createCommentVNode("v-if", true)
  8137. ], 10, ["onClick"]);
  8138. }),
  8139. 128
  8140. /* KEYED_FRAGMENT */
  8141. ))
  8142. ]),
  8143. vue.createElementVNode("view", { class: "date-filter" }, [
  8144. vue.createElementVNode("picker", {
  8145. mode: "date",
  8146. fields: "month",
  8147. value: $options.currentPickerDate,
  8148. onChange: _cache[0] || (_cache[0] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  8149. }, [
  8150. vue.createElementVNode("view", { class: "picker-trigger" }, [
  8151. vue.createElementVNode(
  8152. "text",
  8153. null,
  8154. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString(String($data.selectedMonth).padStart(2, "0")) + "月",
  8155. 1
  8156. /* TEXT */
  8157. ),
  8158. vue.createElementVNode("text", { class: "arrow-icon" }, "▼")
  8159. ])
  8160. ], 40, ["value"])
  8161. ])
  8162. ]),
  8163. vue.createElementVNode("scroll-view", {
  8164. "scroll-y": "",
  8165. class: "main-scroll"
  8166. }, [
  8167. (vue.openBlock(true), vue.createElementBlock(
  8168. vue.Fragment,
  8169. null,
  8170. vue.renderList($options.filteredGroups, (group, gIdx) => {
  8171. return vue.openBlock(), vue.createElementBlock("view", {
  8172. key: gIdx,
  8173. class: "month-group"
  8174. }, [
  8175. vue.createElementVNode("view", { class: "month-header" }, [
  8176. vue.createElementVNode(
  8177. "text",
  8178. { class: "month-title" },
  8179. vue.toDisplayString(group.month) + "月",
  8180. 1
  8181. /* TEXT */
  8182. ),
  8183. vue.createElementVNode("view", { class: "month-summary" }, [
  8184. vue.createElementVNode(
  8185. "text",
  8186. { class: "month-sum-text" },
  8187. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  8188. 1
  8189. /* TEXT */
  8190. ),
  8191. vue.createElementVNode(
  8192. "text",
  8193. { class: "month-sum-text" },
  8194. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  8195. 1
  8196. /* TEXT */
  8197. )
  8198. ])
  8199. ]),
  8200. (vue.openBlock(true), vue.createElementBlock(
  8201. vue.Fragment,
  8202. null,
  8203. vue.renderList(group.items, (item, rIdx) => {
  8204. return vue.openBlock(), vue.createElementBlock("view", {
  8205. class: "record-item",
  8206. key: rIdx
  8207. }, [
  8208. vue.createElementVNode(
  8209. "view",
  8210. {
  8211. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8212. },
  8213. [
  8214. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8215. ],
  8216. 2
  8217. /* CLASS */
  8218. ),
  8219. vue.createElementVNode("view", { class: "ri-content" }, [
  8220. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8221. vue.createElementVNode(
  8222. "text",
  8223. { class: "ri-date" },
  8224. vue.toDisplayString(item.date),
  8225. 1
  8226. /* TEXT */
  8227. ),
  8228. vue.createElementVNode(
  8229. "text",
  8230. { class: "ri-title" },
  8231. vue.toDisplayString(item.title),
  8232. 1
  8233. /* TEXT */
  8234. )
  8235. ]),
  8236. vue.createElementVNode(
  8237. "text",
  8238. { class: "ri-desc" },
  8239. vue.toDisplayString(item.desc),
  8240. 1
  8241. /* TEXT */
  8242. )
  8243. ]),
  8244. vue.createElementVNode("view", { class: "ri-right" }, [
  8245. vue.createElementVNode(
  8246. "text",
  8247. {
  8248. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8249. },
  8250. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8251. 3
  8252. /* TEXT, CLASS */
  8253. ),
  8254. vue.createElementVNode(
  8255. "text",
  8256. {
  8257. class: vue.normalizeClass(["ri-status", item.statusClass])
  8258. },
  8259. vue.toDisplayString(item.status),
  8260. 3
  8261. /* TEXT, CLASS */
  8262. )
  8263. ])
  8264. ]);
  8265. }),
  8266. 128
  8267. /* KEYED_FRAGMENT */
  8268. ))
  8269. ]);
  8270. }),
  8271. 128
  8272. /* KEYED_FRAGMENT */
  8273. )),
  8274. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  8275. ])
  8276. ]);
  8277. }
  8278. const PagesMineRewardsAll = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards-all.vue"]]);
  8279. const logic = {
  8280. components: {
  8281. customTabbar
  8282. },
  8283. data() {
  8284. return {
  8285. showServicePopup: false,
  8286. showLogoutPopup: false,
  8287. profile: null,
  8288. profileLoading: false,
  8289. levelConfigs: []
  8290. // 等级配置列表
  8291. };
  8292. },
  8293. computed: {
  8294. // 根据 profile.level 匹配对应的等级名称
  8295. displayLevelName() {
  8296. if (!this.profile || !this.levelConfigs.length)
  8297. return "普通履约者";
  8298. const config = this.levelConfigs.find((c) => c.lvNo === this.profile.level);
  8299. return config ? config.name : this.profile.levelName || "普通履约者";
  8300. }
  8301. },
  8302. onShow() {
  8303. uni.hideTabBar();
  8304. if (isLoggedIn()) {
  8305. this.loadProfile();
  8306. this.loadLevelConfigs();
  8307. }
  8308. },
  8309. methods: {
  8310. async loadProfile() {
  8311. if (this.profileLoading)
  8312. return;
  8313. this.profileLoading = true;
  8314. try {
  8315. const res = await getMyProfile();
  8316. this.profile = res.data || null;
  8317. } catch (err) {
  8318. formatAppLog("error", "at pages/mine/logic.js:42", "获取个人信息失败:", err);
  8319. } finally {
  8320. this.profileLoading = false;
  8321. }
  8322. },
  8323. async loadLevelConfigs() {
  8324. try {
  8325. const res = await listAllLevelConfigs();
  8326. this.levelConfigs = res.data || [];
  8327. } catch (err) {
  8328. formatAppLog("error", "at pages/mine/logic.js:52", "加载等级配置失败:", err);
  8329. }
  8330. },
  8331. navToSettings() {
  8332. uni.navigateTo({
  8333. url: "/pages/mine/settings/index"
  8334. });
  8335. },
  8336. navToProfile() {
  8337. uni.navigateTo({
  8338. url: "/pages/mine/settings/profile/index"
  8339. });
  8340. },
  8341. navToLevel() {
  8342. uni.navigateTo({
  8343. url: "/pages/mine/level/index"
  8344. });
  8345. },
  8346. navToNotification() {
  8347. uni.navigateTo({
  8348. url: "/pages/mine/message/index"
  8349. });
  8350. },
  8351. navToWallet() {
  8352. uni.navigateTo({
  8353. url: "/pages/mine/wallet/index"
  8354. });
  8355. },
  8356. navToPoints() {
  8357. uni.navigateTo({
  8358. url: "/pages/mine/points/index"
  8359. });
  8360. },
  8361. navToOrderStats() {
  8362. uni.navigateTo({
  8363. url: "/pages/mine/order-stats"
  8364. });
  8365. },
  8366. navToRewards() {
  8367. uni.navigateTo({
  8368. url: "/pages/mine/rewards"
  8369. });
  8370. },
  8371. openServicePopup() {
  8372. this.showServicePopup = true;
  8373. },
  8374. closeServicePopup() {
  8375. this.showServicePopup = false;
  8376. },
  8377. previewQRCode() {
  8378. uni.previewImage({
  8379. urls: ["/static/logo.png"]
  8380. });
  8381. },
  8382. openOnlineService() {
  8383. uni.showToast({
  8384. title: "正在跳转企业微信客服...",
  8385. icon: "none"
  8386. });
  8387. },
  8388. callServicePhone() {
  8389. uni.makePhoneCall({
  8390. phoneNumber: "400-123-4567"
  8391. });
  8392. },
  8393. logout() {
  8394. this.showLogoutPopup = true;
  8395. },
  8396. cancelLogout() {
  8397. this.showLogoutPopup = false;
  8398. },
  8399. async confirmLogout() {
  8400. this.showLogoutPopup = false;
  8401. try {
  8402. await logout();
  8403. } catch (e) {
  8404. }
  8405. clearAuth();
  8406. uni.reLaunch({
  8407. url: "/pages/login/login"
  8408. });
  8409. }
  8410. }
  8411. };
  8412. const _imports_0$1 = "/static/icons/motorbike.svg";
  8413. const _imports_1$5 = "/static/icons/location.svg";
  8414. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  8415. const _imports_3$1 = "/static/icons/calendar.svg";
  8416. const _imports_4 = "/static/icons/settings.svg";
  8417. const _imports_1$4 = "/static/icons/crown.svg";
  8418. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  8419. const _imports_3 = "/static/icons/chevron_right.svg";
  8420. const _imports_8 = "/static/icons/money_linear.svg";
  8421. const _imports_9 = "/static/icons/headset_linear.svg";
  8422. const _imports_10 = "/static/icons/close_gray.svg";
  8423. const _imports_12 = "/static/icons/headset_green.svg";
  8424. const _imports_14 = "/static/icons/phone_green.svg";
  8425. const _sfc_main$l = {
  8426. ...logic
  8427. };
  8428. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  8429. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
  8430. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  8431. return vue.openBlock(), vue.createElementBlock(
  8432. vue.Fragment,
  8433. null,
  8434. [
  8435. vue.createElementVNode("view", { class: "container" }, [
  8436. vue.createElementVNode("view", { class: "nav-bg" }, [
  8437. vue.createElementVNode("view", { class: "bg-circle-1" }),
  8438. vue.createElementVNode("view", { class: "bg-circle-2" })
  8439. ]),
  8440. vue.createElementVNode("view", { class: "header-section" }, [
  8441. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  8442. vue.createElementVNode("view", {
  8443. class: "user-card",
  8444. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  8445. }, [
  8446. vue.createElementVNode("image", {
  8447. class: "avatar",
  8448. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  8449. mode: "aspectFill"
  8450. }, null, 8, ["src"]),
  8451. vue.createElementVNode("view", { class: "info-content" }, [
  8452. vue.createElementVNode("view", { class: "name-row" }, [
  8453. vue.createElementVNode(
  8454. "text",
  8455. { class: "name" },
  8456. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  8457. 1
  8458. /* TEXT */
  8459. ),
  8460. vue.createElementVNode("view", { class: "tags" }, [
  8461. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  8462. key: 0,
  8463. class: "tag green"
  8464. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  8465. key: 1,
  8466. class: "tag green"
  8467. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  8468. key: 2,
  8469. class: "tag",
  8470. style: { "background": "#eee", "color": "#999" }
  8471. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  8472. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  8473. key: 3,
  8474. class: "tag blue"
  8475. }, "全职")) : vue.createCommentVNode("v-if", true),
  8476. vue.createElementVNode("image", {
  8477. class: "bike-icon",
  8478. src: _imports_0$1
  8479. })
  8480. ])
  8481. ]),
  8482. vue.createElementVNode("view", { class: "detail-row" }, [
  8483. vue.createElementVNode("image", {
  8484. class: "small-icon",
  8485. src: _imports_1$5
  8486. }),
  8487. vue.createElementVNode(
  8488. "text",
  8489. null,
  8490. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  8491. 1
  8492. /* TEXT */
  8493. ),
  8494. vue.createElementVNode("image", {
  8495. class: "arrow-icon-small",
  8496. src: _imports_0
  8497. })
  8498. ]),
  8499. vue.createElementVNode("view", { class: "detail-row" }, [
  8500. vue.createElementVNode("image", {
  8501. class: "small-icon",
  8502. src: _imports_3$1
  8503. }),
  8504. vue.createElementVNode(
  8505. "text",
  8506. null,
  8507. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  8508. 1
  8509. /* TEXT */
  8510. )
  8511. ])
  8512. ]),
  8513. vue.createElementVNode("image", {
  8514. class: "settings-icon",
  8515. src: _imports_4,
  8516. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  8517. })
  8518. ]),
  8519. vue.createElementVNode("view", { class: "vip-card" }, [
  8520. vue.createElementVNode("view", { class: "vip-left" }, [
  8521. vue.createElementVNode("image", {
  8522. class: "vip-icon",
  8523. src: _imports_1$4
  8524. }),
  8525. vue.createElementVNode("view", { class: "vip-text" }, [
  8526. vue.createElementVNode(
  8527. "text",
  8528. { class: "vip-title" },
  8529. vue.toDisplayString(_ctx.displayLevelName),
  8530. 1
  8531. /* TEXT */
  8532. ),
  8533. vue.createElementVNode("text", { class: "vip-desc" }, "完成更多订单即可升级")
  8534. ])
  8535. ]),
  8536. vue.createElementVNode("view", {
  8537. class: "vip-btn",
  8538. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  8539. }, [
  8540. vue.createElementVNode("text", null, "查看权益"),
  8541. vue.createElementVNode("image", {
  8542. class: "arrow-icon-small",
  8543. src: _imports_6
  8544. })
  8545. ])
  8546. ])
  8547. ]),
  8548. vue.createElementVNode("view", { class: "stats-panel" }, [
  8549. vue.createElementVNode("view", {
  8550. class: "stat-item",
  8551. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8552. }, [
  8553. vue.createElementVNode("view", { class: "stat-header" }, [
  8554. vue.createElementVNode("view", { class: "red-bar" }),
  8555. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8556. vue.createElementVNode("image", {
  8557. class: "arrow-icon",
  8558. src: _imports_3
  8559. })
  8560. ]),
  8561. vue.createElementVNode("view", { class: "stat-value" }, [
  8562. vue.createElementVNode(
  8563. "text",
  8564. { class: "num" },
  8565. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8566. 1
  8567. /* TEXT */
  8568. ),
  8569. vue.createElementVNode("text", { class: "unit" }, "元")
  8570. ]),
  8571. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8572. ]),
  8573. vue.createElementVNode("view", { class: "divider" }),
  8574. vue.createElementVNode("view", {
  8575. class: "stat-item",
  8576. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8577. }, [
  8578. vue.createElementVNode("view", { class: "stat-header" }, [
  8579. vue.createElementVNode("view", { class: "green-bar" }),
  8580. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8581. vue.createElementVNode("image", {
  8582. class: "arrow-icon",
  8583. src: _imports_3
  8584. })
  8585. ]),
  8586. vue.createElementVNode("view", { class: "stat-value" }, [
  8587. vue.createElementVNode(
  8588. "text",
  8589. { class: "num" },
  8590. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.orderCount) || 0),
  8591. 1
  8592. /* TEXT */
  8593. ),
  8594. vue.createElementVNode("text", { class: "unit" }, "单")
  8595. ]),
  8596. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8597. ]),
  8598. vue.createElementVNode("view", { class: "divider" }),
  8599. vue.createElementVNode("view", {
  8600. class: "stat-item",
  8601. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8602. }, [
  8603. vue.createElementVNode("view", { class: "stat-header" }, [
  8604. vue.createElementVNode("view", { class: "orange-bar" }),
  8605. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8606. vue.createElementVNode("image", {
  8607. class: "arrow-icon",
  8608. src: _imports_3
  8609. })
  8610. ]),
  8611. vue.createElementVNode("view", { class: "stat-value" }, [
  8612. vue.createElementVNode(
  8613. "text",
  8614. { class: "num" },
  8615. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.points) || 0),
  8616. 1
  8617. /* TEXT */
  8618. ),
  8619. vue.createElementVNode("text", { class: "unit" }, "分")
  8620. ]),
  8621. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8622. ])
  8623. ]),
  8624. vue.createElementVNode("view", { class: "menu-list" }, [
  8625. vue.createElementVNode("view", {
  8626. class: "menu-item",
  8627. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8628. }, [
  8629. vue.createElementVNode("image", {
  8630. class: "menu-icon",
  8631. src: _imports_8
  8632. }),
  8633. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8634. vue.createElementVNode("image", {
  8635. class: "arrow-icon",
  8636. src: _imports_3
  8637. })
  8638. ]),
  8639. vue.createElementVNode("view", {
  8640. class: "menu-item",
  8641. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
  8642. }, [
  8643. vue.createElementVNode("image", {
  8644. class: "menu-icon",
  8645. src: _imports_9
  8646. }),
  8647. vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
  8648. vue.createElementVNode("image", {
  8649. class: "arrow-icon",
  8650. src: _imports_3
  8651. })
  8652. ])
  8653. ]),
  8654. vue.createElementVNode("view", {
  8655. class: "logout-btn",
  8656. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.logout && _ctx.logout(...args))
  8657. }, "退出登录"),
  8658. vue.createElementVNode("view", { class: "dev-tip" }, "本APP部分功能开发当中,请只进行修改个人信息、修改设置、完成订单流程操作"),
  8659. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8660. key: 0,
  8661. class: "service-popup-mask",
  8662. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8663. }, [
  8664. vue.createElementVNode("view", {
  8665. class: "service-popup",
  8666. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  8667. }, ["stop"]))
  8668. }, [
  8669. vue.createElementVNode("view", { class: "service-header" }, [
  8670. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8671. vue.createElementVNode("image", {
  8672. class: "close-icon",
  8673. src: _imports_10,
  8674. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8675. })
  8676. ]),
  8677. vue.createElementVNode("view", { class: "qr-section" }, [
  8678. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8679. vue.createElementVNode("image", {
  8680. class: "qr-img",
  8681. src: _imports_1$8,
  8682. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8683. }),
  8684. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8685. ]),
  8686. vue.createElementVNode("view", { class: "service-list" }, [
  8687. vue.createElementVNode("view", {
  8688. class: "service-row",
  8689. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8690. }, [
  8691. vue.createElementVNode("image", {
  8692. class: "service-row-icon",
  8693. src: _imports_12
  8694. }),
  8695. vue.createElementVNode("view", { class: "service-info" }, [
  8696. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8697. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8698. ]),
  8699. vue.createElementVNode("image", {
  8700. class: "arrow-icon-small",
  8701. src: _imports_3
  8702. })
  8703. ]),
  8704. vue.createElementVNode("view", { class: "service-row" }, [
  8705. vue.createElementVNode("image", {
  8706. class: "service-row-icon",
  8707. src: _imports_13
  8708. }),
  8709. vue.createElementVNode("view", { class: "service-info" }, [
  8710. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8711. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8712. ]),
  8713. vue.createElementVNode("view", {
  8714. class: "call-btn",
  8715. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8716. }, [
  8717. vue.createElementVNode("image", {
  8718. class: "phone-icon-small",
  8719. src: _imports_14
  8720. }),
  8721. vue.createElementVNode("text", null, "拨打")
  8722. ])
  8723. ])
  8724. ])
  8725. ])
  8726. ])) : vue.createCommentVNode("v-if", true),
  8727. vue.createElementVNode(
  8728. "view",
  8729. {
  8730. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8731. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8732. onTouchmove: _cache[19] || (_cache[19] = vue.withModifiers(() => {
  8733. }, ["stop", "prevent"]))
  8734. },
  8735. [
  8736. vue.createElementVNode("view", {
  8737. class: "popup-modal",
  8738. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  8739. }, ["stop"]))
  8740. }, [
  8741. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8742. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8743. vue.createElementVNode("view", { class: "popup-actions" }, [
  8744. vue.createElementVNode("view", {
  8745. class: "popup-btn cancel",
  8746. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8747. }, "取消"),
  8748. vue.createElementVNode("view", {
  8749. class: "popup-btn confirm",
  8750. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8751. }, "确定")
  8752. ])
  8753. ])
  8754. ],
  8755. 34
  8756. /* CLASS, NEED_HYDRATION */
  8757. )
  8758. ]),
  8759. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8760. ],
  8761. 64
  8762. /* STABLE_FRAGMENT */
  8763. );
  8764. }
  8765. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8766. const _sfc_main$k = {
  8767. data() {
  8768. return {};
  8769. },
  8770. methods: {
  8771. navBack() {
  8772. uni.navigateBack({
  8773. delta: 1
  8774. });
  8775. },
  8776. navTo(type) {
  8777. let url = "";
  8778. switch (type) {
  8779. case "profile":
  8780. url = "/pages/mine/settings/profile/index";
  8781. break;
  8782. case "auth":
  8783. url = "/pages/mine/settings/auth/index";
  8784. break;
  8785. case "bank":
  8786. url = "/pages/mine/settings/bank/index";
  8787. break;
  8788. case "security":
  8789. url = "/pages/mine/settings/security/index";
  8790. break;
  8791. case "push":
  8792. url = "/pages/mine/settings/notification/index";
  8793. break;
  8794. case "about":
  8795. url = "/pages/mine/settings/about/index";
  8796. break;
  8797. default:
  8798. formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
  8799. return;
  8800. }
  8801. uni.navigateTo({ url });
  8802. },
  8803. clearCache() {
  8804. uni.showToast({ title: "缓存已清理", icon: "none" });
  8805. }
  8806. }
  8807. };
  8808. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  8809. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8810. vue.createElementVNode("view", { class: "custom-header" }, [
  8811. vue.createElementVNode("view", {
  8812. class: "header-left",
  8813. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8814. }, [
  8815. vue.createElementVNode("image", {
  8816. class: "back-icon",
  8817. src: _imports_0,
  8818. style: { "transform": "rotate(180deg)" }
  8819. })
  8820. ]),
  8821. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  8822. vue.createElementVNode("view", { class: "header-right" })
  8823. ]),
  8824. vue.createElementVNode("view", { class: "header-placeholder" }),
  8825. vue.createElementVNode("view", { class: "group-card" }, [
  8826. vue.createElementVNode("view", {
  8827. class: "list-item",
  8828. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  8829. }, [
  8830. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  8831. vue.createElementVNode("image", {
  8832. class: "arrow-icon",
  8833. src: _imports_3
  8834. })
  8835. ]),
  8836. vue.createElementVNode("view", {
  8837. class: "list-item",
  8838. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  8839. }, [
  8840. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  8841. vue.createElementVNode("image", {
  8842. class: "arrow-icon",
  8843. src: _imports_3
  8844. })
  8845. ]),
  8846. vue.createElementVNode("view", {
  8847. class: "list-item",
  8848. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
  8849. }, [
  8850. vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
  8851. vue.createElementVNode("view", { class: "item-right" }, [
  8852. vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
  8853. vue.createElementVNode("image", {
  8854. class: "arrow-icon",
  8855. src: _imports_3
  8856. })
  8857. ])
  8858. ]),
  8859. vue.createElementVNode("view", {
  8860. class: "list-item no-border",
  8861. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
  8862. }, [
  8863. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  8864. vue.createElementVNode("image", {
  8865. class: "arrow-icon",
  8866. src: _imports_3
  8867. })
  8868. ])
  8869. ]),
  8870. vue.createElementVNode("view", { class: "group-card" }, [
  8871. vue.createElementVNode("view", {
  8872. class: "list-item",
  8873. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
  8874. }, [
  8875. vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
  8876. vue.createElementVNode("view", { class: "item-right" }, [
  8877. vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
  8878. vue.createElementVNode("image", {
  8879. class: "arrow-icon",
  8880. src: _imports_3
  8881. })
  8882. ])
  8883. ]),
  8884. vue.createElementVNode("view", { class: "list-item" }, [
  8885. vue.createElementVNode("view", { class: "item-row-left" }, [
  8886. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  8887. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  8888. ]),
  8889. vue.createElementVNode("switch", {
  8890. checked: "",
  8891. color: "#FF5722",
  8892. style: { "transform": "scale(0.8)" }
  8893. })
  8894. ]),
  8895. vue.createElementVNode("view", {
  8896. class: "list-item",
  8897. onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
  8898. }, [
  8899. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  8900. vue.createElementVNode("view", { class: "item-right" }, [
  8901. vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
  8902. vue.createElementVNode("image", {
  8903. class: "arrow-icon",
  8904. src: _imports_3
  8905. })
  8906. ])
  8907. ]),
  8908. vue.createElementVNode("view", {
  8909. class: "list-item no-border",
  8910. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
  8911. }, [
  8912. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  8913. vue.createElementVNode("view", { class: "item-right" }, [
  8914. vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
  8915. vue.createElementVNode("image", {
  8916. class: "arrow-icon",
  8917. src: _imports_3
  8918. })
  8919. ])
  8920. ])
  8921. ])
  8922. ]);
  8923. }
  8924. const PagesMineSettingsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/index.vue"]]);
  8925. const _sfc_main$j = {
  8926. data() {
  8927. return {
  8928. userInfo: {
  8929. name: "",
  8930. workType: "",
  8931. workStatus: "",
  8932. city: "",
  8933. avatar: "/static/touxiang.png",
  8934. stationName: ""
  8935. },
  8936. isStatusPickerShow: false,
  8937. isCityPickerShow: false,
  8938. // 城市级联选择器(与我要加入页面一致)
  8939. selectStep: 0,
  8940. selectedPathway: [],
  8941. currentCityList: [],
  8942. selectedCityId: null
  8943. };
  8944. },
  8945. onLoad() {
  8946. this.loadUserInfo();
  8947. uni.$on("updateName", (newName) => {
  8948. this.userInfo.name = newName;
  8949. });
  8950. },
  8951. onUnload() {
  8952. uni.$off("updateName");
  8953. },
  8954. methods: {
  8955. // 加载用户信息 @author steelwei
  8956. async loadUserInfo() {
  8957. uni.showLoading({ title: "加载中..." });
  8958. try {
  8959. const res = await getMyProfile();
  8960. if (res.code === 200) {
  8961. const data = res.data;
  8962. this.userInfo = {
  8963. name: data.realName || data.name,
  8964. workType: data.workType === "full_time" ? "全职" : "兼职",
  8965. workStatus: this.formatStatus(data.status),
  8966. city: data.cityName || "",
  8967. avatar: data.avatarUrl || "/static/touxiang.png",
  8968. stationName: data.stationName || "未分配站点"
  8969. };
  8970. } else {
  8971. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  8972. }
  8973. } catch (error) {
  8974. formatAppLog("error", "at pages/mine/settings/profile/index.vue:173", "加载用户信息失败:", error);
  8975. uni.showToast({ title: "网络错误", icon: "none" });
  8976. } finally {
  8977. uni.hideLoading();
  8978. }
  8979. },
  8980. // 格式化状态 @author steelwei
  8981. formatStatus(status) {
  8982. const statusMap = {
  8983. "busy": "接单中",
  8984. "resting": "休息中",
  8985. "disabled": "已禁用"
  8986. };
  8987. return statusMap[status] || status;
  8988. },
  8989. navBack() {
  8990. uni.navigateBack({ delta: 1 });
  8991. },
  8992. // 修改头像 @author steelwei
  8993. changeAvatar() {
  8994. uni.chooseImage({
  8995. count: 1,
  8996. success: async (res) => {
  8997. const tempFilePath = res.tempFilePaths[0];
  8998. uni.showLoading({ title: "上传中..." });
  8999. try {
  9000. const uploadRes = await uploadFile(tempFilePath);
  9001. if (uploadRes.code === 200) {
  9002. const { url, ossId } = uploadRes.data;
  9003. const result = await updateAvatar(ossId);
  9004. if (result.code === 200) {
  9005. this.userInfo.avatar = url;
  9006. uni.showToast({ title: "修改成功", icon: "success" });
  9007. } else {
  9008. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  9009. }
  9010. }
  9011. } catch (error) {
  9012. formatAppLog("error", "at pages/mine/settings/profile/index.vue:218", "修改头像失败:", error);
  9013. uni.showToast({ title: "上传失败", icon: "none" });
  9014. } finally {
  9015. uni.hideLoading();
  9016. }
  9017. }
  9018. });
  9019. },
  9020. editName() {
  9021. uni.navigateTo({
  9022. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  9023. });
  9024. },
  9025. showStatusPicker() {
  9026. this.isStatusPickerShow = true;
  9027. },
  9028. closeStatusPicker() {
  9029. this.isStatusPickerShow = false;
  9030. },
  9031. // 选择状态 @author steelwei
  9032. async selectStatus(statusText) {
  9033. const statusMap = {
  9034. "接单中": "busy",
  9035. "休息中": "resting"
  9036. };
  9037. const status = statusMap[statusText];
  9038. try {
  9039. const res = await updateStatus(status);
  9040. if (res.code === 200) {
  9041. this.userInfo.workStatus = statusText;
  9042. uni.showToast({ title: "状态已更新", icon: "success" });
  9043. } else {
  9044. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9045. }
  9046. } catch (error) {
  9047. formatAppLog("error", "at pages/mine/settings/profile/index.vue:258", "修改状态失败:", error);
  9048. uni.showToast({ title: "网络错误", icon: "none" });
  9049. } finally {
  9050. this.closeStatusPicker();
  9051. }
  9052. },
  9053. // 城市级联选择器(与我要加入页面一致) @author steelwei
  9054. async showCityPicker() {
  9055. this.isCityPickerShow = true;
  9056. if (this.selectedPathway.length === 0) {
  9057. await this.resetCityPicker();
  9058. }
  9059. },
  9060. async resetCityPicker() {
  9061. this.selectStep = 0;
  9062. this.selectedPathway = [];
  9063. await this.loadAreaChildren(0);
  9064. },
  9065. closeCityPicker() {
  9066. this.isCityPickerShow = false;
  9067. },
  9068. async loadAreaChildren(parentId) {
  9069. try {
  9070. const res = await getAreaChildren(parentId);
  9071. this.currentCityList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  9072. id: item.id,
  9073. name: item.name,
  9074. type: item.type,
  9075. parentId: item.parentId
  9076. }));
  9077. } catch (err) {
  9078. formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载区域数据失败:", err);
  9079. this.currentCityList = [];
  9080. }
  9081. },
  9082. async selectCityItem(item) {
  9083. this.selectedPathway[this.selectStep] = item;
  9084. if (item.type === 0) {
  9085. this.selectStep++;
  9086. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  9087. await this.loadAreaChildren(item.id);
  9088. if (this.currentCityList.length === 0) {
  9089. this.selectedCityId = item.id;
  9090. this.confirmCity();
  9091. }
  9092. } else {
  9093. this.selectedCityId = item.id;
  9094. this.confirmCity();
  9095. }
  9096. },
  9097. async jumpToStep(step) {
  9098. this.selectStep = step;
  9099. if (step === 0) {
  9100. await this.loadAreaChildren(0);
  9101. } else {
  9102. const parent = this.selectedPathway[step - 1];
  9103. if (parent) {
  9104. await this.loadAreaChildren(parent.id);
  9105. }
  9106. }
  9107. },
  9108. // 确认城市选择 @author steelwei
  9109. async confirmCity() {
  9110. if (this.selectedPathway.length === 0) {
  9111. uni.showToast({ title: "请选择城市", icon: "none" });
  9112. return;
  9113. }
  9114. const cityName = this.selectedPathway.map((i) => i.name).join(" ");
  9115. const cityCode = String(this.selectedCityId);
  9116. try {
  9117. const res = await updateCity(cityCode, cityName);
  9118. if (res.code === 200) {
  9119. this.userInfo.city = cityName;
  9120. uni.showToast({ title: "修改成功", icon: "success" });
  9121. this.closeCityPicker();
  9122. this.selectedPathway = [];
  9123. } else {
  9124. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9125. }
  9126. } catch (error) {
  9127. formatAppLog("error", "at pages/mine/settings/profile/index.vue:346", "修改城市失败:", error);
  9128. uni.showToast({ title: "网络错误", icon: "none" });
  9129. }
  9130. }
  9131. }
  9132. };
  9133. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  9134. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9135. vue.createElementVNode("view", { class: "custom-header" }, [
  9136. vue.createElementVNode("view", {
  9137. class: "header-left",
  9138. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9139. }, [
  9140. vue.createElementVNode("image", {
  9141. class: "back-icon",
  9142. src: _imports_0,
  9143. style: { "transform": "rotate(180deg)" }
  9144. })
  9145. ]),
  9146. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  9147. vue.createElementVNode("view", { class: "header-right" })
  9148. ]),
  9149. vue.createElementVNode("view", { class: "header-placeholder" }),
  9150. vue.createElementVNode("view", { class: "group-card" }, [
  9151. vue.createElementVNode("view", {
  9152. class: "list-item",
  9153. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  9154. }, [
  9155. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  9156. vue.createElementVNode("view", { class: "item-right" }, [
  9157. vue.createElementVNode("image", {
  9158. class: "user-avatar",
  9159. src: $data.userInfo.avatar,
  9160. mode: "aspectFill"
  9161. }, null, 8, ["src"]),
  9162. vue.createElementVNode("image", {
  9163. class: "arrow-icon",
  9164. src: _imports_3
  9165. })
  9166. ])
  9167. ]),
  9168. vue.createElementVNode("view", {
  9169. class: "list-item",
  9170. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  9171. }, [
  9172. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  9173. vue.createElementVNode("view", { class: "item-right" }, [
  9174. vue.createElementVNode(
  9175. "text",
  9176. { class: "item-value" },
  9177. vue.toDisplayString($data.userInfo.name),
  9178. 1
  9179. /* TEXT */
  9180. ),
  9181. vue.createElementVNode("image", {
  9182. class: "arrow-icon",
  9183. src: _imports_3
  9184. })
  9185. ])
  9186. ])
  9187. ]),
  9188. vue.createElementVNode("view", { class: "group-card" }, [
  9189. vue.createElementVNode("view", {
  9190. class: "list-item",
  9191. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  9192. }, [
  9193. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  9194. vue.createElementVNode("view", { class: "item-right" }, [
  9195. vue.createElementVNode(
  9196. "text",
  9197. { class: "item-value-black" },
  9198. vue.toDisplayString($data.userInfo.workStatus),
  9199. 1
  9200. /* TEXT */
  9201. ),
  9202. vue.createElementVNode("image", {
  9203. class: "arrow-icon",
  9204. src: _imports_3
  9205. })
  9206. ])
  9207. ])
  9208. ]),
  9209. vue.createElementVNode("view", { class: "group-card" }, [
  9210. vue.createElementVNode("view", {
  9211. class: "list-item",
  9212. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  9213. }, [
  9214. vue.createElementVNode("text", { class: "item-title" }, "工作城市"),
  9215. vue.createElementVNode("view", { class: "item-right" }, [
  9216. vue.createElementVNode(
  9217. "text",
  9218. { class: "item-value" },
  9219. vue.toDisplayString($data.userInfo.city),
  9220. 1
  9221. /* TEXT */
  9222. ),
  9223. vue.createElementVNode("image", {
  9224. class: "arrow-icon",
  9225. src: _imports_3
  9226. })
  9227. ])
  9228. ]),
  9229. vue.createElementVNode("view", { class: "list-item no-border" }, [
  9230. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  9231. vue.createElementVNode("view", { class: "item-right" }, [
  9232. vue.createElementVNode(
  9233. "text",
  9234. { class: "item-value" },
  9235. vue.toDisplayString($data.userInfo.stationName || "未分配站点"),
  9236. 1
  9237. /* TEXT */
  9238. )
  9239. ])
  9240. ])
  9241. ]),
  9242. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9243. key: 0,
  9244. class: "popup-mask",
  9245. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9246. }, [
  9247. vue.createElementVNode("view", {
  9248. class: "popup-content",
  9249. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  9250. }, ["stop"]))
  9251. }, [
  9252. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  9253. vue.createElementVNode("view", {
  9254. class: "popup-item",
  9255. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  9256. }, "接单中"),
  9257. vue.createElementVNode("view", {
  9258. class: "popup-item",
  9259. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  9260. }, "休息中"),
  9261. vue.createElementVNode("view", {
  9262. class: "popup-cancel",
  9263. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9264. }, "取消")
  9265. ])
  9266. ])) : vue.createCommentVNode("v-if", true),
  9267. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9268. key: 1,
  9269. class: "popup-mask",
  9270. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9271. }, [
  9272. vue.createElementVNode("view", {
  9273. class: "popup-content",
  9274. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  9275. }, ["stop"]))
  9276. }, [
  9277. vue.createElementVNode("view", { class: "popup-header-row" }, [
  9278. vue.createElementVNode("text", {
  9279. class: "popup-btn-cancel",
  9280. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9281. }, "取消"),
  9282. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市"),
  9283. vue.createElementVNode("text", {
  9284. class: "popup-btn-confirm",
  9285. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  9286. }, "确定")
  9287. ]),
  9288. vue.createElementVNode("view", { class: "picker-body" }, [
  9289. vue.createElementVNode("view", { class: "timeline-area" }, [
  9290. (vue.openBlock(true), vue.createElementBlock(
  9291. vue.Fragment,
  9292. null,
  9293. vue.renderList($data.selectedPathway, (item, index) => {
  9294. return vue.openBlock(), vue.createElementBlock("view", {
  9295. class: "timeline-item",
  9296. key: index,
  9297. onClick: ($event) => $options.jumpToStep(index)
  9298. }, [
  9299. vue.createElementVNode("view", { class: "timeline-dot" }),
  9300. vue.createElementVNode(
  9301. "text",
  9302. null,
  9303. vue.toDisplayString(item.name),
  9304. 1
  9305. /* TEXT */
  9306. )
  9307. ], 8, ["onClick"]);
  9308. }),
  9309. 128
  9310. /* KEYED_FRAGMENT */
  9311. )),
  9312. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  9313. key: 0,
  9314. class: "timeline-item active"
  9315. }, [
  9316. vue.createElementVNode("view", { class: "timeline-dot" }),
  9317. vue.createElementVNode("text", null, "请选择")
  9318. ])) : vue.createCommentVNode("v-if", true)
  9319. ]),
  9320. vue.createElementVNode("scroll-view", {
  9321. "scroll-y": "",
  9322. class: "list-area"
  9323. }, [
  9324. (vue.openBlock(true), vue.createElementBlock(
  9325. vue.Fragment,
  9326. null,
  9327. vue.renderList($data.currentCityList, (item) => {
  9328. return vue.openBlock(), vue.createElementBlock("view", {
  9329. class: "list-item",
  9330. key: item.id,
  9331. onClick: ($event) => $options.selectCityItem(item)
  9332. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  9333. }),
  9334. 128
  9335. /* KEYED_FRAGMENT */
  9336. )),
  9337. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  9338. key: 0,
  9339. style: { "padding": "20rpx", "color": "#999" }
  9340. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  9341. ])
  9342. ])
  9343. ])
  9344. ])) : vue.createCommentVNode("v-if", true)
  9345. ]);
  9346. }
  9347. const PagesMineSettingsProfileIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/profile/index.vue"]]);
  9348. const _sfc_main$i = {
  9349. data() {
  9350. return {
  9351. authInfo: {
  9352. realName: "",
  9353. idCard: "",
  9354. idCardFront: "",
  9355. idCardBack: "",
  9356. serviceTypes: [],
  9357. authId: false,
  9358. authQual: false,
  9359. pendingAudit: false,
  9360. qualImages: []
  9361. }
  9362. };
  9363. },
  9364. onLoad() {
  9365. this.loadAuthInfo();
  9366. },
  9367. methods: {
  9368. navBack() {
  9369. uni.navigateBack({
  9370. delta: 1
  9371. });
  9372. },
  9373. async loadAuthInfo() {
  9374. try {
  9375. const res = await getAuthInfo();
  9376. if (res.code === 200 && res.data) {
  9377. this.authInfo = {
  9378. realName: res.data.realName || "",
  9379. idCard: res.data.idCard || "",
  9380. idCardFront: res.data.idCardFrontUrl || "",
  9381. idCardBack: res.data.idCardBackUrl || "",
  9382. serviceTypes: res.data.serviceTypeList || [],
  9383. authId: res.data.authId || false,
  9384. authQual: res.data.authQual || false,
  9385. pendingAudit: res.data.pendingAudit || false,
  9386. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  9387. };
  9388. }
  9389. } catch (e) {
  9390. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  9391. uni.showToast({ title: "加载失败", icon: "none" });
  9392. }
  9393. },
  9394. maskIdCard(idCard) {
  9395. if (!idCard || idCard.length < 8)
  9396. return idCard;
  9397. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  9398. },
  9399. editAuth() {
  9400. uni.showModal({
  9401. title: "提示",
  9402. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9403. success: (res) => {
  9404. if (res.confirm) {
  9405. uni.navigateTo({
  9406. url: "/pages/mine/settings/auth/edit"
  9407. });
  9408. }
  9409. }
  9410. });
  9411. }
  9412. }
  9413. };
  9414. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  9415. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9416. vue.createElementVNode("view", { class: "custom-header" }, [
  9417. vue.createElementVNode("view", {
  9418. class: "header-left",
  9419. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9420. }, [
  9421. vue.createElementVNode("image", {
  9422. class: "back-icon",
  9423. src: _imports_0,
  9424. style: { "transform": "rotate(180deg)" }
  9425. })
  9426. ]),
  9427. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  9428. vue.createElementVNode("view", { class: "header-right" })
  9429. ]),
  9430. vue.createElementVNode("view", { class: "header-placeholder" }),
  9431. vue.createElementVNode("view", { class: "card" }, [
  9432. vue.createElementVNode("view", { class: "section-header" }, [
  9433. vue.createElementVNode("view", { class: "orange-bar" }),
  9434. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  9435. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  9436. key: 0,
  9437. class: "tag-orange"
  9438. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  9439. key: 1,
  9440. class: "tag-green"
  9441. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  9442. key: 2,
  9443. class: "tag-gray"
  9444. }, "未认证"))
  9445. ]),
  9446. vue.createElementVNode("view", { class: "info-row" }, [
  9447. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  9448. vue.createElementVNode(
  9449. "text",
  9450. { class: "value" },
  9451. vue.toDisplayString($data.authInfo.realName || "未设置"),
  9452. 1
  9453. /* TEXT */
  9454. )
  9455. ]),
  9456. vue.createElementVNode("view", { class: "info-row" }, [
  9457. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  9458. vue.createElementVNode(
  9459. "text",
  9460. { class: "value" },
  9461. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  9462. 1
  9463. /* TEXT */
  9464. )
  9465. ]),
  9466. vue.createElementVNode("view", { class: "id-card-row" }, [
  9467. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9468. key: 0,
  9469. class: "id-card-box green-bg"
  9470. }, [
  9471. vue.createElementVNode("image", {
  9472. class: "id-card-img",
  9473. src: $data.authInfo.idCardFront,
  9474. mode: "aspectFill"
  9475. }, null, 8, ["src"]),
  9476. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9477. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9478. key: 1,
  9479. class: "id-card-box green-bg"
  9480. }, [
  9481. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  9482. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9483. ])),
  9484. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9485. key: 2,
  9486. class: "id-card-box green-bg"
  9487. }, [
  9488. vue.createElementVNode("image", {
  9489. class: "id-card-img",
  9490. src: $data.authInfo.idCardBack,
  9491. mode: "aspectFill"
  9492. }, null, 8, ["src"]),
  9493. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9494. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9495. key: 3,
  9496. class: "id-card-box green-bg"
  9497. }, [
  9498. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  9499. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9500. ]))
  9501. ])
  9502. ]),
  9503. vue.createElementVNode("view", { class: "card" }, [
  9504. vue.createElementVNode("view", { class: "section-header" }, [
  9505. vue.createElementVNode("view", { class: "orange-bar" }),
  9506. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  9507. ]),
  9508. vue.createElementVNode("view", { class: "tags-row" }, [
  9509. (vue.openBlock(true), vue.createElementBlock(
  9510. vue.Fragment,
  9511. null,
  9512. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  9513. return vue.openBlock(), vue.createElementBlock(
  9514. "view",
  9515. {
  9516. class: "service-tag",
  9517. key: index
  9518. },
  9519. vue.toDisplayString(type),
  9520. 1
  9521. /* TEXT */
  9522. );
  9523. }),
  9524. 128
  9525. /* KEYED_FRAGMENT */
  9526. )),
  9527. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9528. key: 0,
  9529. class: "empty-text"
  9530. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9531. ])
  9532. ]),
  9533. vue.createElementVNode("view", { class: "card" }, [
  9534. vue.createElementVNode("view", { class: "section-header" }, [
  9535. vue.createElementVNode("view", { class: "orange-bar" }),
  9536. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9537. ]),
  9538. vue.createElementVNode(
  9539. "text",
  9540. { class: "sub-title" },
  9541. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9542. 1
  9543. /* TEXT */
  9544. ),
  9545. vue.createElementVNode("view", { class: "cert-row" }, [
  9546. (vue.openBlock(true), vue.createElementBlock(
  9547. vue.Fragment,
  9548. null,
  9549. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9550. return vue.openBlock(), vue.createElementBlock("view", {
  9551. class: "cert-box yellow-bg",
  9552. key: index
  9553. }, [
  9554. vue.createElementVNode("image", {
  9555. class: "cert-img",
  9556. src: img,
  9557. mode: "aspectFill"
  9558. }, null, 8, ["src"])
  9559. ]);
  9560. }),
  9561. 128
  9562. /* KEYED_FRAGMENT */
  9563. )),
  9564. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9565. key: 0,
  9566. class: "empty-text"
  9567. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9568. ])
  9569. ]),
  9570. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9571. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9572. key: 0,
  9573. class: "action-btn disabled",
  9574. disabled: ""
  9575. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9576. key: 1,
  9577. class: "action-btn",
  9578. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9579. }, "修改认证信息")),
  9580. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9581. key: 2,
  9582. class: "tips"
  9583. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9584. key: 3,
  9585. class: "tips"
  9586. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9587. ])
  9588. ]);
  9589. }
  9590. const PagesMineSettingsAuthIndex = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/auth/index.vue"]]);
  9591. const _sfc_main$h = {
  9592. data() {
  9593. return {
  9594. idCardFront: "",
  9595. idCardBack: "",
  9596. idCardFrontOssId: "",
  9597. idCardBackOssId: "",
  9598. serviceOptions: [],
  9599. selectedServices: [],
  9600. qualifications: {},
  9601. qualOssIds: {}
  9602. };
  9603. },
  9604. async onLoad() {
  9605. await this.loadServiceOptions();
  9606. this.loadAuthInfo();
  9607. },
  9608. methods: {
  9609. async loadServiceOptions() {
  9610. try {
  9611. const res = await getServiceTypes();
  9612. this.serviceOptions = (res.data || []).map((item) => ({
  9613. id: String(item.id),
  9614. name: item.name
  9615. }));
  9616. } catch (e) {
  9617. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
  9618. }
  9619. },
  9620. async loadAuthInfo() {
  9621. try {
  9622. uni.showLoading({ title: "加载中..." });
  9623. const res = await getAuthInfo();
  9624. if (res.code === 200 && res.data) {
  9625. this.idCardFront = res.data.idCardFrontUrl || "";
  9626. this.idCardBack = res.data.idCardBackUrl || "";
  9627. this.idCardFrontOssId = res.data.idCardFront || "";
  9628. this.idCardBackOssId = res.data.idCardBack || "";
  9629. let serviceIds = [];
  9630. if (res.data.serviceTypes) {
  9631. serviceIds = [...new Set(
  9632. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9633. )];
  9634. }
  9635. this.selectedServices = serviceIds;
  9636. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9637. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9638. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9639. validNames.forEach((name, idx) => {
  9640. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9641. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9642. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9643. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9644. });
  9645. }
  9646. uni.hideLoading();
  9647. } catch (e) {
  9648. uni.hideLoading();
  9649. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
  9650. uni.showToast({ title: "加载失败", icon: "none" });
  9651. }
  9652. },
  9653. navBack() {
  9654. uni.navigateBack({ delta: 1 });
  9655. },
  9656. chooseImage(side) {
  9657. uni.chooseImage({
  9658. count: 1,
  9659. sizeType: ["compressed"],
  9660. sourceType: ["album", "camera"],
  9661. success: async (res) => {
  9662. const tempPath = res.tempFilePaths[0];
  9663. if (side === "front") {
  9664. this.idCardFront = tempPath;
  9665. } else {
  9666. this.idCardBack = tempPath;
  9667. }
  9668. try {
  9669. uni.showLoading({ title: "上传中..." });
  9670. const uploadRes = await uploadFile(tempPath);
  9671. if (side === "front") {
  9672. this.idCardFrontOssId = uploadRes.data.ossId;
  9673. } else {
  9674. this.idCardBackOssId = uploadRes.data.ossId;
  9675. }
  9676. uni.hideLoading();
  9677. uni.showToast({ title: "上传成功", icon: "success" });
  9678. } catch (err) {
  9679. uni.hideLoading();
  9680. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
  9681. uni.showToast({ title: "上传失败", icon: "none" });
  9682. }
  9683. }
  9684. });
  9685. },
  9686. deleteImage(side) {
  9687. if (side === "front") {
  9688. this.idCardFront = "";
  9689. this.idCardFrontOssId = "";
  9690. } else {
  9691. this.idCardBack = "";
  9692. this.idCardBackOssId = "";
  9693. }
  9694. },
  9695. getServiceName(serviceId) {
  9696. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9697. return found ? found.name : "";
  9698. },
  9699. toggleService(service) {
  9700. const index = this.selectedServices.indexOf(service.id);
  9701. if (index > -1) {
  9702. this.selectedServices.splice(index, 1);
  9703. this.$delete(this.qualifications, service.name);
  9704. this.$delete(this.qualOssIds, service.name);
  9705. } else {
  9706. this.selectedServices.push(service.id);
  9707. this.$set(this.qualifications, service.name, []);
  9708. this.$set(this.qualOssIds, service.name, []);
  9709. }
  9710. this.$forceUpdate();
  9711. },
  9712. chooseQualImage(service) {
  9713. uni.chooseImage({
  9714. count: 9,
  9715. sizeType: ["compressed"],
  9716. sourceType: ["album", "camera"],
  9717. success: async (res) => {
  9718. if (!this.qualifications[service]) {
  9719. this.qualifications[service] = [];
  9720. this.qualOssIds[service] = [];
  9721. }
  9722. for (const tempPath of res.tempFilePaths) {
  9723. this.qualifications[service].push(tempPath);
  9724. this.$forceUpdate();
  9725. try {
  9726. uni.showLoading({ title: "上传中..." });
  9727. const uploadRes = await uploadFile(tempPath);
  9728. this.qualOssIds[service].push(uploadRes.data.ossId);
  9729. uni.hideLoading();
  9730. } catch (err) {
  9731. uni.hideLoading();
  9732. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
  9733. }
  9734. }
  9735. }
  9736. });
  9737. },
  9738. deleteQualImage(service, index) {
  9739. this.qualifications[service].splice(index, 1);
  9740. if (this.qualOssIds[service]) {
  9741. this.qualOssIds[service].splice(index, 1);
  9742. }
  9743. this.$forceUpdate();
  9744. },
  9745. previewImage(service, index) {
  9746. uni.previewImage({
  9747. urls: this.qualifications[service],
  9748. current: index
  9749. });
  9750. },
  9751. async submitAuth() {
  9752. if (!this.idCardFront || !this.idCardBack) {
  9753. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  9754. return;
  9755. }
  9756. if (this.selectedServices.length === 0) {
  9757. uni.showToast({ title: "请选择服务类型", icon: "none" });
  9758. return;
  9759. }
  9760. for (const serviceId of this.selectedServices) {
  9761. const name = this.getServiceName(serviceId);
  9762. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  9763. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  9764. return;
  9765. }
  9766. }
  9767. uni.showModal({
  9768. title: "提示",
  9769. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9770. success: (res) => {
  9771. if (res.confirm) {
  9772. this.doSubmit();
  9773. }
  9774. }
  9775. });
  9776. },
  9777. async doSubmit() {
  9778. const allQualOssIds = [];
  9779. Object.values(this.qualOssIds).forEach((ids) => {
  9780. allQualOssIds.push(...ids);
  9781. });
  9782. const submitData = {
  9783. idCardFront: this.idCardFrontOssId,
  9784. idCardBack: this.idCardBackOssId,
  9785. serviceTypes: this.selectedServices.join(","),
  9786. // 逗号分隔的服务类型ID
  9787. qualifications: allQualOssIds.join(",")
  9788. // 逗号分隔的资质图片OSS ID
  9789. };
  9790. try {
  9791. uni.showLoading({ title: "提交中..." });
  9792. await updateAuthInfo(submitData);
  9793. uni.hideLoading();
  9794. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  9795. setTimeout(() => {
  9796. uni.navigateBack({ delta: 1 });
  9797. }, 1500);
  9798. } catch (err) {
  9799. uni.hideLoading();
  9800. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
  9801. uni.showToast({ title: "提交失败", icon: "none" });
  9802. }
  9803. }
  9804. }
  9805. };
  9806. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  9807. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  9808. vue.createElementVNode("view", { class: "custom-header" }, [
  9809. vue.createElementVNode("view", {
  9810. class: "header-left",
  9811. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9812. }, [
  9813. vue.createElementVNode("image", {
  9814. class: "back-icon",
  9815. src: _imports_0,
  9816. style: { "transform": "rotate(180deg)" }
  9817. })
  9818. ]),
  9819. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  9820. vue.createElementVNode("view", { class: "header-right" })
  9821. ]),
  9822. vue.createElementVNode("view", { class: "header-placeholder" }),
  9823. vue.createElementVNode("view", { class: "warning-tip" }, [
  9824. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  9825. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  9826. ]),
  9827. vue.createElementVNode("view", { class: "section-card" }, [
  9828. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  9829. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  9830. vue.createElementVNode("view", { class: "id-card-row" }, [
  9831. vue.createElementVNode("view", {
  9832. class: "id-card-upload",
  9833. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  9834. }, [
  9835. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  9836. key: 0,
  9837. src: $data.idCardFront,
  9838. class: "id-card-img",
  9839. mode: "aspectFill"
  9840. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9841. key: 1,
  9842. class: "id-card-placeholder"
  9843. }, [
  9844. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  9845. ])),
  9846. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9847. key: 2,
  9848. class: "delete-btn",
  9849. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  9850. }, "×")) : vue.createCommentVNode("v-if", true),
  9851. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9852. ]),
  9853. vue.createElementVNode("view", {
  9854. class: "id-card-upload",
  9855. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  9856. }, [
  9857. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  9858. key: 0,
  9859. src: $data.idCardBack,
  9860. class: "id-card-img",
  9861. mode: "aspectFill"
  9862. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9863. key: 1,
  9864. class: "id-card-placeholder"
  9865. }, [
  9866. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  9867. ])),
  9868. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9869. key: 2,
  9870. class: "delete-btn",
  9871. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  9872. }, "×")) : vue.createCommentVNode("v-if", true),
  9873. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9874. ])
  9875. ])
  9876. ]),
  9877. vue.createElementVNode("view", { class: "section-card" }, [
  9878. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  9879. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  9880. vue.createElementVNode("view", { class: "service-list" }, [
  9881. (vue.openBlock(true), vue.createElementBlock(
  9882. vue.Fragment,
  9883. null,
  9884. vue.renderList($data.serviceOptions, (service, index) => {
  9885. return vue.openBlock(), vue.createElementBlock("view", {
  9886. class: "service-item",
  9887. key: service.id,
  9888. onClick: ($event) => $options.toggleService(service)
  9889. }, [
  9890. vue.createElementVNode(
  9891. "text",
  9892. { class: "service-name" },
  9893. vue.toDisplayString(service.name),
  9894. 1
  9895. /* TEXT */
  9896. ),
  9897. vue.createElementVNode(
  9898. "view",
  9899. {
  9900. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  9901. },
  9902. [
  9903. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  9904. ],
  9905. 2
  9906. /* CLASS */
  9907. )
  9908. ], 8, ["onClick"]);
  9909. }),
  9910. 128
  9911. /* KEYED_FRAGMENT */
  9912. ))
  9913. ])
  9914. ]),
  9915. vue.createElementVNode("view", { class: "section-card" }, [
  9916. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  9917. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  9918. (vue.openBlock(true), vue.createElementBlock(
  9919. vue.Fragment,
  9920. null,
  9921. vue.renderList($data.selectedServices, (serviceId, index) => {
  9922. return vue.openBlock(), vue.createElementBlock("view", {
  9923. key: serviceId,
  9924. class: "qual-section"
  9925. }, [
  9926. vue.createElementVNode(
  9927. "text",
  9928. { class: "qual-title" },
  9929. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  9930. 1
  9931. /* TEXT */
  9932. ),
  9933. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  9934. (vue.openBlock(true), vue.createElementBlock(
  9935. vue.Fragment,
  9936. null,
  9937. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  9938. return vue.openBlock(), vue.createElementBlock("view", {
  9939. class: "qual-item",
  9940. key: imgIndex,
  9941. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  9942. }, [
  9943. vue.createElementVNode("image", {
  9944. src: img,
  9945. class: "qual-img",
  9946. mode: "aspectFill"
  9947. }, null, 8, ["src"]),
  9948. vue.createElementVNode("view", {
  9949. class: "delete-btn",
  9950. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  9951. }, "×", 8, ["onClick"])
  9952. ], 8, ["onClick"]);
  9953. }),
  9954. 128
  9955. /* KEYED_FRAGMENT */
  9956. )),
  9957. vue.createElementVNode("view", {
  9958. class: "qual-upload-btn",
  9959. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  9960. }, [
  9961. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  9962. ], 8, ["onClick"])
  9963. ])
  9964. ]);
  9965. }),
  9966. 128
  9967. /* KEYED_FRAGMENT */
  9968. )),
  9969. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9970. key: 0,
  9971. class: "empty-hint"
  9972. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  9973. ]),
  9974. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9975. vue.createElementVNode("button", {
  9976. class: "submit-btn",
  9977. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  9978. }, "提交审核")
  9979. ])
  9980. ]);
  9981. }
  9982. const PagesMineSettingsAuthEdit = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-10d0f207"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/auth/edit.vue"]]);
  9983. const _imports_1$3 = "/static/icons/shield.svg";
  9984. const _sfc_main$g = {
  9985. data() {
  9986. return {
  9987. hasShieldIcon: false
  9988. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  9989. };
  9990. },
  9991. methods: {
  9992. navBack() {
  9993. uni.navigateBack({
  9994. delta: 1
  9995. });
  9996. },
  9997. editBank() {
  9998. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  9999. }
  10000. }
  10001. };
  10002. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  10003. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10004. vue.createElementVNode("view", { class: "custom-header" }, [
  10005. vue.createElementVNode("view", {
  10006. class: "header-left",
  10007. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10008. }, [
  10009. vue.createElementVNode("image", {
  10010. class: "back-icon",
  10011. src: _imports_0,
  10012. style: { "transform": "rotate(180deg)" }
  10013. })
  10014. ]),
  10015. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  10016. vue.createElementVNode("view", { class: "header-right" })
  10017. ]),
  10018. vue.createElementVNode("view", { class: "header-placeholder" }),
  10019. vue.createElementVNode("view", { class: "bank-card" }, [
  10020. vue.createElementVNode("view", { class: "card-top" }, [
  10021. vue.createElementVNode("view", { class: "bank-info" }, [
  10022. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  10023. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  10024. ]),
  10025. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  10026. ]),
  10027. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  10028. ]),
  10029. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  10030. vue.createElementVNode("view", { class: "card-bg-circle" })
  10031. ]),
  10032. vue.createElementVNode("button", {
  10033. class: "action-btn",
  10034. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  10035. }, "修改银行卡信息"),
  10036. vue.createElementVNode("view", { class: "security-tip" }, [
  10037. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  10038. key: 0,
  10039. class: "shield-icon",
  10040. src: _imports_1$3
  10041. })) : vue.createCommentVNode("v-if", true),
  10042. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  10043. ])
  10044. ]);
  10045. }
  10046. const PagesMineSettingsBankIndex = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/bank/index.vue"]]);
  10047. const _sfc_main$f = {
  10048. data() {
  10049. return {
  10050. phone: "",
  10051. hasPassword: false
  10052. };
  10053. },
  10054. onLoad() {
  10055. this.loadProfile();
  10056. },
  10057. methods: {
  10058. navBack() {
  10059. uni.navigateBack({
  10060. delta: 1
  10061. });
  10062. },
  10063. async loadProfile() {
  10064. try {
  10065. const res = await getMyProfile();
  10066. if (res.code === 200 && res.data) {
  10067. this.phone = res.data.phone || "";
  10068. this.hasPassword = !!res.data.hasPassword;
  10069. }
  10070. } catch (e) {
  10071. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  10072. }
  10073. },
  10074. maskPhone(phone) {
  10075. if (!phone || phone.length < 11)
  10076. return phone;
  10077. return phone.substring(0, 3) + "****" + phone.substring(7);
  10078. },
  10079. changeMobile() {
  10080. uni.navigateTo({
  10081. url: "/pages/mine/settings/security/change-phone"
  10082. });
  10083. },
  10084. changePassword() {
  10085. uni.navigateTo({
  10086. url: "/pages/mine/settings/security/change-password"
  10087. });
  10088. },
  10089. async deleteAccount() {
  10090. uni.showModal({
  10091. title: "警示",
  10092. content: "注销账号后将无法恢复,确定要继续吗?",
  10093. success: async (res) => {
  10094. if (res.confirm) {
  10095. try {
  10096. const result = await deleteAccount();
  10097. if (result.code === 200) {
  10098. uni.showToast({ title: "账号已注销", icon: "success" });
  10099. setTimeout(() => {
  10100. uni.reLaunch({ url: "/pages/login/login" });
  10101. }, 1500);
  10102. } else {
  10103. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  10104. }
  10105. } catch (e) {
  10106. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  10107. uni.showToast({ title: "注销失败", icon: "none" });
  10108. }
  10109. }
  10110. }
  10111. });
  10112. }
  10113. }
  10114. };
  10115. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  10116. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10117. vue.createElementVNode("view", { class: "custom-header" }, [
  10118. vue.createElementVNode("view", {
  10119. class: "header-left",
  10120. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10121. }, [
  10122. vue.createElementVNode("image", {
  10123. class: "back-icon",
  10124. src: _imports_0,
  10125. style: { "transform": "rotate(180deg)" }
  10126. })
  10127. ]),
  10128. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  10129. vue.createElementVNode("view", { class: "header-right" })
  10130. ]),
  10131. vue.createElementVNode("view", { class: "header-placeholder" }),
  10132. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  10133. vue.createElementVNode("view", { class: "group-card" }, [
  10134. vue.createElementVNode("view", {
  10135. class: "list-item",
  10136. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  10137. }, [
  10138. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  10139. vue.createElementVNode("view", { class: "item-right" }, [
  10140. vue.createElementVNode(
  10141. "text",
  10142. { class: "item-value" },
  10143. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  10144. 1
  10145. /* TEXT */
  10146. ),
  10147. vue.createElementVNode("image", {
  10148. class: "arrow-icon",
  10149. src: _imports_3
  10150. })
  10151. ])
  10152. ]),
  10153. vue.createElementVNode("view", {
  10154. class: "list-item",
  10155. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  10156. }, [
  10157. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  10158. vue.createElementVNode("view", { class: "item-right" }, [
  10159. vue.createElementVNode(
  10160. "text",
  10161. { class: "item-value" },
  10162. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  10163. 1
  10164. /* TEXT */
  10165. ),
  10166. vue.createElementVNode("image", {
  10167. class: "arrow-icon",
  10168. src: _imports_3
  10169. })
  10170. ])
  10171. ])
  10172. ]),
  10173. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  10174. vue.createElementVNode("view", { class: "group-card" }, [
  10175. vue.createElementVNode("view", {
  10176. class: "list-item no-border",
  10177. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  10178. }, [
  10179. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  10180. vue.createElementVNode("image", {
  10181. class: "arrow-icon",
  10182. src: _imports_3
  10183. })
  10184. ])
  10185. ])
  10186. ]);
  10187. }
  10188. const PagesMineSettingsSecurityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/security/index.vue"]]);
  10189. const _sfc_main$e = {
  10190. data() {
  10191. return {
  10192. name: ""
  10193. };
  10194. },
  10195. onLoad(options) {
  10196. if (options.name) {
  10197. this.name = decodeURIComponent(options.name);
  10198. }
  10199. },
  10200. methods: {
  10201. navBack() {
  10202. uni.navigateBack({ delta: 1 });
  10203. },
  10204. // 提交修改 @author steelwei
  10205. async submitChange() {
  10206. if (!this.name || !this.name.trim()) {
  10207. uni.showToast({ title: "请输入姓名", icon: "none" });
  10208. return;
  10209. }
  10210. if (this.name.trim().length < 2) {
  10211. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  10212. return;
  10213. }
  10214. uni.showLoading({ title: "提交中..." });
  10215. try {
  10216. const res = await updateName(this.name.trim());
  10217. if (res.code === 200) {
  10218. uni.showToast({
  10219. title: "修改成功",
  10220. icon: "success",
  10221. duration: 2e3
  10222. });
  10223. uni.$emit("updateName", this.name.trim());
  10224. setTimeout(() => {
  10225. uni.navigateBack({ delta: 1 });
  10226. }, 2e3);
  10227. } else {
  10228. uni.showToast({
  10229. title: res.msg || "修改失败",
  10230. icon: "none"
  10231. });
  10232. }
  10233. } catch (error) {
  10234. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  10235. uni.showToast({ title: "网络错误", icon: "none" });
  10236. } finally {
  10237. uni.hideLoading();
  10238. }
  10239. }
  10240. }
  10241. };
  10242. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  10243. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10244. vue.createElementVNode("view", { class: "custom-header" }, [
  10245. vue.createElementVNode("view", {
  10246. class: "header-left",
  10247. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10248. }, [
  10249. vue.createElementVNode("image", {
  10250. class: "back-icon",
  10251. src: _imports_0,
  10252. style: { "transform": "rotate(180deg)" }
  10253. })
  10254. ]),
  10255. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  10256. vue.createElementVNode("view", { class: "header-right" })
  10257. ]),
  10258. vue.createElementVNode("view", { class: "header-placeholder" }),
  10259. vue.createElementVNode("view", { class: "form-card" }, [
  10260. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10261. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  10262. vue.withDirectives(vue.createElementVNode(
  10263. "input",
  10264. {
  10265. class: "form-input",
  10266. type: "text",
  10267. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  10268. placeholder: "请输入真实姓名",
  10269. "placeholder-class": "placeholder",
  10270. maxlength: "20"
  10271. },
  10272. null,
  10273. 512
  10274. /* NEED_PATCH */
  10275. ), [
  10276. [vue.vModelText, $data.name]
  10277. ])
  10278. ])
  10279. ]),
  10280. vue.createElementVNode("view", { class: "btn-area" }, [
  10281. vue.createElementVNode("button", {
  10282. class: "submit-btn",
  10283. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  10284. }, "确认修改")
  10285. ]),
  10286. vue.createElementVNode("view", { class: "tips" }, [
  10287. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  10288. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  10289. ])
  10290. ]);
  10291. }
  10292. const PagesMineSettingsProfileEditName = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/profile/edit-name.vue"]]);
  10293. const _sfc_main$d = {
  10294. data() {
  10295. return {
  10296. oldPassword: "",
  10297. newPassword: "",
  10298. confirmPassword: ""
  10299. };
  10300. },
  10301. methods: {
  10302. navBack() {
  10303. uni.navigateBack({ delta: 1 });
  10304. },
  10305. // 提交修改 @author steelwei
  10306. async submitChange() {
  10307. if (!this.oldPassword) {
  10308. uni.showToast({ title: "请输入旧密码", icon: "none" });
  10309. return;
  10310. }
  10311. if (!this.newPassword) {
  10312. uni.showToast({ title: "请输入新密码", icon: "none" });
  10313. return;
  10314. }
  10315. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  10316. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  10317. return;
  10318. }
  10319. if (this.newPassword !== this.confirmPassword) {
  10320. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  10321. return;
  10322. }
  10323. uni.showLoading({ title: "提交中..." });
  10324. try {
  10325. const res = await updatePassword(this.oldPassword, this.newPassword);
  10326. if (res.code === 200) {
  10327. uni.showToast({
  10328. title: "修改成功",
  10329. icon: "success",
  10330. duration: 2e3
  10331. });
  10332. setTimeout(() => {
  10333. uni.navigateBack({ delta: 1 });
  10334. }, 2e3);
  10335. } else {
  10336. uni.showToast({
  10337. title: res.msg || "修改失败",
  10338. icon: "none"
  10339. });
  10340. }
  10341. } catch (error) {
  10342. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  10343. uni.showToast({ title: "网络错误", icon: "none" });
  10344. } finally {
  10345. uni.hideLoading();
  10346. }
  10347. }
  10348. }
  10349. };
  10350. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  10351. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10352. vue.createElementVNode("view", { class: "custom-header" }, [
  10353. vue.createElementVNode("view", {
  10354. class: "header-left",
  10355. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10356. }, [
  10357. vue.createElementVNode("image", {
  10358. class: "back-icon",
  10359. src: _imports_0,
  10360. style: { "transform": "rotate(180deg)" }
  10361. })
  10362. ]),
  10363. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  10364. vue.createElementVNode("view", { class: "header-right" })
  10365. ]),
  10366. vue.createElementVNode("view", { class: "header-placeholder" }),
  10367. vue.createElementVNode("view", { class: "form-card" }, [
  10368. vue.createElementVNode("view", { class: "form-item" }, [
  10369. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  10370. vue.withDirectives(vue.createElementVNode(
  10371. "input",
  10372. {
  10373. class: "form-input",
  10374. type: "password",
  10375. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  10376. placeholder: "请输入旧密码",
  10377. "placeholder-class": "placeholder"
  10378. },
  10379. null,
  10380. 512
  10381. /* NEED_PATCH */
  10382. ), [
  10383. [vue.vModelText, $data.oldPassword]
  10384. ])
  10385. ]),
  10386. vue.createElementVNode("view", { class: "form-item" }, [
  10387. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  10388. vue.withDirectives(vue.createElementVNode(
  10389. "input",
  10390. {
  10391. class: "form-input",
  10392. type: "password",
  10393. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  10394. placeholder: "请输入新密码(6-20位)",
  10395. "placeholder-class": "placeholder"
  10396. },
  10397. null,
  10398. 512
  10399. /* NEED_PATCH */
  10400. ), [
  10401. [vue.vModelText, $data.newPassword]
  10402. ])
  10403. ]),
  10404. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10405. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  10406. vue.withDirectives(vue.createElementVNode(
  10407. "input",
  10408. {
  10409. class: "form-input",
  10410. type: "password",
  10411. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  10412. placeholder: "请再次输入新密码",
  10413. "placeholder-class": "placeholder"
  10414. },
  10415. null,
  10416. 512
  10417. /* NEED_PATCH */
  10418. ), [
  10419. [vue.vModelText, $data.confirmPassword]
  10420. ])
  10421. ])
  10422. ]),
  10423. vue.createElementVNode("view", { class: "btn-area" }, [
  10424. vue.createElementVNode("button", {
  10425. class: "submit-btn",
  10426. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10427. }, "确认修改")
  10428. ])
  10429. ]);
  10430. }
  10431. const PagesMineSettingsSecurityChangePassword = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/security/change-password.vue"]]);
  10432. const _sfc_main$c = {
  10433. data() {
  10434. return {
  10435. phone: "",
  10436. code: "",
  10437. countdown: 0,
  10438. timer: null
  10439. };
  10440. },
  10441. onUnload() {
  10442. if (this.timer) {
  10443. clearInterval(this.timer);
  10444. }
  10445. },
  10446. methods: {
  10447. navBack() {
  10448. uni.navigateBack({ delta: 1 });
  10449. },
  10450. // 发送验证码 @author steelwei
  10451. sendCode() {
  10452. if (!this.phone) {
  10453. uni.showToast({ title: "请输入手机号", icon: "none" });
  10454. return;
  10455. }
  10456. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10457. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10458. return;
  10459. }
  10460. uni.showToast({ title: "验证码已发送", icon: "success" });
  10461. this.countdown = 60;
  10462. this.timer = setInterval(() => {
  10463. this.countdown--;
  10464. if (this.countdown <= 0) {
  10465. clearInterval(this.timer);
  10466. }
  10467. }, 1e3);
  10468. },
  10469. // 提交修改 @author steelwei
  10470. async submitChange() {
  10471. if (!this.phone) {
  10472. uni.showToast({ title: "请输入手机号", icon: "none" });
  10473. return;
  10474. }
  10475. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10476. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10477. return;
  10478. }
  10479. if (!this.code) {
  10480. uni.showToast({ title: "请输入验证码", icon: "none" });
  10481. return;
  10482. }
  10483. uni.showLoading({ title: "提交中..." });
  10484. try {
  10485. const res = await updatePhone(this.phone, this.code);
  10486. if (res.code === 200) {
  10487. uni.showToast({
  10488. title: "修改成功",
  10489. icon: "success",
  10490. duration: 2e3
  10491. });
  10492. setTimeout(() => {
  10493. uni.navigateBack({ delta: 1 });
  10494. }, 2e3);
  10495. } else {
  10496. uni.showToast({
  10497. title: res.msg || "修改失败",
  10498. icon: "none"
  10499. });
  10500. }
  10501. } catch (error) {
  10502. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  10503. uni.showToast({ title: "网络错误", icon: "none" });
  10504. } finally {
  10505. uni.hideLoading();
  10506. }
  10507. }
  10508. }
  10509. };
  10510. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  10511. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10512. vue.createElementVNode("view", { class: "custom-header" }, [
  10513. vue.createElementVNode("view", {
  10514. class: "header-left",
  10515. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10516. }, [
  10517. vue.createElementVNode("image", {
  10518. class: "back-icon",
  10519. src: _imports_0,
  10520. style: { "transform": "rotate(180deg)" }
  10521. })
  10522. ]),
  10523. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  10524. vue.createElementVNode("view", { class: "header-right" })
  10525. ]),
  10526. vue.createElementVNode("view", { class: "header-placeholder" }),
  10527. vue.createElementVNode("view", { class: "form-card" }, [
  10528. vue.createElementVNode("view", { class: "form-item" }, [
  10529. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10530. vue.withDirectives(vue.createElementVNode(
  10531. "input",
  10532. {
  10533. class: "form-input",
  10534. type: "number",
  10535. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10536. placeholder: "请输入新手机号",
  10537. "placeholder-class": "placeholder",
  10538. maxlength: "11"
  10539. },
  10540. null,
  10541. 512
  10542. /* NEED_PATCH */
  10543. ), [
  10544. [vue.vModelText, $data.phone]
  10545. ])
  10546. ]),
  10547. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10548. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10549. vue.withDirectives(vue.createElementVNode(
  10550. "input",
  10551. {
  10552. class: "form-input",
  10553. type: "number",
  10554. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10555. placeholder: "请输入验证码",
  10556. "placeholder-class": "placeholder",
  10557. maxlength: "6"
  10558. },
  10559. null,
  10560. 512
  10561. /* NEED_PATCH */
  10562. ), [
  10563. [vue.vModelText, $data.code]
  10564. ]),
  10565. vue.createElementVNode("button", {
  10566. class: "code-btn",
  10567. disabled: $data.countdown > 0,
  10568. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10569. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10570. ])
  10571. ]),
  10572. vue.createElementVNode("view", { class: "btn-area" }, [
  10573. vue.createElementVNode("button", {
  10574. class: "submit-btn",
  10575. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10576. }, "确认修改")
  10577. ]),
  10578. vue.createElementVNode("view", { class: "tips" }, [
  10579. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10580. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10581. ])
  10582. ]);
  10583. }
  10584. const PagesMineSettingsSecurityChangePhone = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/security/change-phone.vue"]]);
  10585. const _sfc_main$b = {
  10586. data() {
  10587. return {};
  10588. },
  10589. methods: {
  10590. navBack() {
  10591. uni.navigateBack({
  10592. delta: 1
  10593. });
  10594. },
  10595. switchChange(type, e) {
  10596. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10597. }
  10598. }
  10599. };
  10600. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10601. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10602. vue.createElementVNode("view", { class: "custom-header" }, [
  10603. vue.createElementVNode("view", {
  10604. class: "header-left",
  10605. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10606. }, [
  10607. vue.createElementVNode("image", {
  10608. class: "back-icon",
  10609. src: _imports_0,
  10610. style: { "transform": "rotate(180deg)" }
  10611. })
  10612. ]),
  10613. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10614. vue.createElementVNode("view", { class: "header-right" })
  10615. ]),
  10616. vue.createElementVNode("view", { class: "header-placeholder" }),
  10617. vue.createElementVNode("view", { class: "group-card" }, [
  10618. vue.createElementVNode("view", { class: "list-item" }, [
  10619. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10620. vue.createElementVNode(
  10621. "switch",
  10622. {
  10623. checked: "",
  10624. color: "#FF5722",
  10625. style: { "transform": "scale(0.8)" },
  10626. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10627. },
  10628. null,
  10629. 32
  10630. /* NEED_HYDRATION */
  10631. )
  10632. ]),
  10633. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10634. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10635. vue.createElementVNode(
  10636. "switch",
  10637. {
  10638. checked: "",
  10639. color: "#FF5722",
  10640. style: { "transform": "scale(0.8)" },
  10641. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10642. },
  10643. null,
  10644. 32
  10645. /* NEED_HYDRATION */
  10646. )
  10647. ])
  10648. ]),
  10649. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10650. ]);
  10651. }
  10652. const PagesMineSettingsNotificationIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/notification/index.vue"]]);
  10653. const _sfc_main$a = {
  10654. data() {
  10655. return {};
  10656. },
  10657. methods: {
  10658. navBack() {
  10659. uni.navigateBack({
  10660. delta: 1
  10661. });
  10662. }
  10663. }
  10664. };
  10665. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  10666. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10667. vue.createElementVNode("view", { class: "custom-header" }, [
  10668. vue.createElementVNode("view", {
  10669. class: "header-left",
  10670. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10671. }, [
  10672. vue.createElementVNode("image", {
  10673. class: "back-icon",
  10674. src: _imports_0,
  10675. style: { "transform": "rotate(180deg)" }
  10676. })
  10677. ]),
  10678. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  10679. vue.createElementVNode("view", { class: "header-right" })
  10680. ]),
  10681. vue.createElementVNode("view", { class: "header-placeholder" }),
  10682. vue.createElementVNode("view", { class: "logo-area" }, [
  10683. vue.createElementVNode("image", {
  10684. class: "app-logo",
  10685. src: _imports_1$8,
  10686. mode: "aspectFit"
  10687. }),
  10688. vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
  10689. vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
  10690. ]),
  10691. vue.createElementVNode("view", { class: "group-card" }, [
  10692. vue.createElementVNode("view", { class: "list-item" }, [
  10693. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10694. vue.createElementVNode("image", {
  10695. class: "arrow-icon",
  10696. src: _imports_3
  10697. })
  10698. ]),
  10699. vue.createElementVNode("view", { class: "list-item" }, [
  10700. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10701. vue.createElementVNode("image", {
  10702. class: "arrow-icon",
  10703. src: _imports_3
  10704. })
  10705. ]),
  10706. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10707. vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
  10708. vue.createElementVNode("view", { class: "item-right" }, [
  10709. vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
  10710. vue.createElementVNode("image", {
  10711. class: "arrow-icon",
  10712. src: _imports_3
  10713. })
  10714. ])
  10715. ])
  10716. ])
  10717. ]);
  10718. }
  10719. const PagesMineSettingsAboutIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/settings/about/index.vue"]]);
  10720. const _imports_1$2 = "/static/icons/wallet_white.svg";
  10721. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  10722. const bizTypeMap$3 = fulfillerEnum.FlfBalanceBizType;
  10723. const _sfc_main$9 = {
  10724. data() {
  10725. return {
  10726. balance: "0.00",
  10727. pendingBalance: "0.00",
  10728. currentTab: 0,
  10729. list: [],
  10730. pageNum: 1,
  10731. pageSize: 10,
  10732. total: 0,
  10733. loading: false
  10734. };
  10735. },
  10736. computed: {
  10737. displayList() {
  10738. if (this.currentTab === 0)
  10739. return this.list;
  10740. if (this.currentTab === 1)
  10741. return this.list.filter((item) => item.type === "income");
  10742. if (this.currentTab === 2)
  10743. return this.list.filter((item) => item.type === "expense");
  10744. return [];
  10745. }
  10746. },
  10747. onShow() {
  10748. this.fetchData();
  10749. this.fetchList(true);
  10750. },
  10751. onReachBottom() {
  10752. this.fetchList();
  10753. },
  10754. methods: {
  10755. async fetchData() {
  10756. try {
  10757. const res = await getBalanceOnApp();
  10758. if (res.code === 200 && res.data) {
  10759. this.balance = (res.data.balance / 100).toFixed(2);
  10760. this.pendingBalance = (res.data.pendingBalance / 100).toFixed(2);
  10761. }
  10762. } catch (error) {
  10763. formatAppLog("error", "at pages/mine/wallet/index.vue:135", "获取余额数据失败", error);
  10764. }
  10765. },
  10766. async fetchList(reset = false) {
  10767. if (reset) {
  10768. this.pageNum = 1;
  10769. this.list = [];
  10770. this.total = 0;
  10771. }
  10772. if (this.loading)
  10773. return;
  10774. if (!reset && this.list.length >= this.total && this.total !== 0)
  10775. return;
  10776. this.loading = true;
  10777. try {
  10778. const res = await pageBalanceOnApp({
  10779. pageNum: this.pageNum,
  10780. pageSize: this.pageSize
  10781. });
  10782. if (res.code === 200) {
  10783. this.total = res.total || 0;
  10784. const rows = res.rows || [];
  10785. const mappedRows = rows.map((item) => {
  10786. const isAdd = item.type === "add";
  10787. const uiType = isAdd ? "income" : "expense";
  10788. const title = bizTypeMap$3[item.bizType] || item.bizType || "其他";
  10789. let amountStr = (Math.abs(item.amount) / 100).toFixed(2);
  10790. if (!isAdd) {
  10791. amountStr = "-" + amountStr;
  10792. }
  10793. return {
  10794. ...item,
  10795. title,
  10796. desc: item.reason || "",
  10797. time: item.createTime || "",
  10798. amount: amountStr,
  10799. type: uiType,
  10800. // 'income' or 'expense' for template class
  10801. tag: title
  10802. };
  10803. });
  10804. this.list = this.list.concat(mappedRows);
  10805. this.pageNum++;
  10806. }
  10807. } catch (error) {
  10808. formatAppLog("error", "at pages/mine/wallet/index.vue:182", "获取列表数据失败", error);
  10809. } finally {
  10810. this.loading = false;
  10811. }
  10812. },
  10813. navBack() {
  10814. uni.navigateBack();
  10815. },
  10816. navToBill() {
  10817. uni.navigateTo({
  10818. url: "/pages/mine/wallet/bill"
  10819. });
  10820. },
  10821. switchTab(index) {
  10822. this.currentTab = index;
  10823. }
  10824. }
  10825. };
  10826. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  10827. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10828. vue.createElementVNode("view", { class: "nav-bar" }, [
  10829. vue.createElementVNode("view", {
  10830. class: "nav-left",
  10831. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10832. }, [
  10833. vue.createElementVNode("image", {
  10834. class: "back-icon",
  10835. src: _imports_0
  10836. })
  10837. ]),
  10838. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  10839. vue.createElementVNode("view", { class: "nav-right" })
  10840. ]),
  10841. vue.createElementVNode("view", { class: "wallet-card" }, [
  10842. vue.createElementVNode("view", { class: "bg-circle big" }),
  10843. vue.createElementVNode("view", { class: "bg-circle small" }),
  10844. vue.createElementVNode("view", { class: "card-content" }, [
  10845. vue.createElementVNode("view", { class: "card-top" }, [
  10846. vue.createElementVNode("view", { class: "app-info" }, [
  10847. vue.createElementVNode("image", {
  10848. class: "app-logo",
  10849. src: _imports_1$2,
  10850. mode: "aspectFit"
  10851. }),
  10852. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  10853. ]),
  10854. vue.createElementVNode("view", {
  10855. class: "bill-btn",
  10856. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  10857. }, [
  10858. vue.createElementVNode("text", null, "账单")
  10859. ])
  10860. ]),
  10861. vue.createElementVNode("view", { class: "balance-container" }, [
  10862. vue.createElementVNode("view", { class: "balance-main" }, [
  10863. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  10864. vue.createElementVNode(
  10865. "text",
  10866. { class: "balance-num" },
  10867. vue.toDisplayString($data.balance),
  10868. 1
  10869. /* TEXT */
  10870. )
  10871. ]),
  10872. vue.createElementVNode("view", { class: "balance-pending" }, [
  10873. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  10874. vue.createElementVNode(
  10875. "text",
  10876. { class: "pending-num" },
  10877. vue.toDisplayString($data.pendingBalance),
  10878. 1
  10879. /* TEXT */
  10880. )
  10881. ])
  10882. ])
  10883. ])
  10884. ]),
  10885. vue.createElementVNode("view", { class: "record-container" }, [
  10886. vue.createElementVNode("view", { class: "record-header" }, [
  10887. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  10888. vue.createElementVNode("view", {
  10889. class: "header-more",
  10890. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  10891. }, [
  10892. vue.createElementVNode("text", null, "查看全部"),
  10893. vue.createElementVNode("image", {
  10894. class: "more-icon",
  10895. src: _imports_2$2
  10896. })
  10897. ])
  10898. ]),
  10899. vue.createElementVNode("view", { class: "tabs-row" }, [
  10900. vue.createElementVNode(
  10901. "view",
  10902. {
  10903. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10904. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  10905. },
  10906. [
  10907. vue.createElementVNode("text", null, "全部"),
  10908. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10909. key: 0,
  10910. class: "tab-line"
  10911. })) : vue.createCommentVNode("v-if", true)
  10912. ],
  10913. 2
  10914. /* CLASS */
  10915. ),
  10916. vue.createElementVNode(
  10917. "view",
  10918. {
  10919. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10920. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  10921. },
  10922. [
  10923. vue.createElementVNode("text", null, "收入"),
  10924. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10925. key: 0,
  10926. class: "tab-line"
  10927. })) : vue.createCommentVNode("v-if", true)
  10928. ],
  10929. 2
  10930. /* CLASS */
  10931. ),
  10932. vue.createElementVNode(
  10933. "view",
  10934. {
  10935. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10936. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  10937. },
  10938. [
  10939. vue.createElementVNode("text", null, "支出"),
  10940. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10941. key: 0,
  10942. class: "tab-line"
  10943. })) : vue.createCommentVNode("v-if", true)
  10944. ],
  10945. 2
  10946. /* CLASS */
  10947. )
  10948. ]),
  10949. vue.createElementVNode("view", { class: "record-list" }, [
  10950. (vue.openBlock(true), vue.createElementBlock(
  10951. vue.Fragment,
  10952. null,
  10953. vue.renderList($options.displayList, (item, index) => {
  10954. return vue.openBlock(), vue.createElementBlock("view", {
  10955. class: "list-item",
  10956. key: index
  10957. }, [
  10958. vue.createElementVNode("view", { class: "item-left" }, [
  10959. vue.createElementVNode(
  10960. "text",
  10961. { class: "item-title" },
  10962. vue.toDisplayString(item.title),
  10963. 1
  10964. /* TEXT */
  10965. ),
  10966. vue.createElementVNode(
  10967. "text",
  10968. { class: "item-desc" },
  10969. vue.toDisplayString(item.desc),
  10970. 1
  10971. /* TEXT */
  10972. ),
  10973. vue.createElementVNode(
  10974. "text",
  10975. { class: "item-time" },
  10976. vue.toDisplayString(item.time),
  10977. 1
  10978. /* TEXT */
  10979. )
  10980. ]),
  10981. vue.createElementVNode("view", { class: "item-right" }, [
  10982. vue.createElementVNode(
  10983. "text",
  10984. {
  10985. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10986. },
  10987. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10988. 3
  10989. /* TEXT, CLASS */
  10990. ),
  10991. vue.createElementVNode("view", { class: "item-tag" }, [
  10992. vue.createElementVNode(
  10993. "text",
  10994. null,
  10995. vue.toDisplayString(item.tag),
  10996. 1
  10997. /* TEXT */
  10998. )
  10999. ])
  11000. ])
  11001. ]);
  11002. }),
  11003. 128
  11004. /* KEYED_FRAGMENT */
  11005. ))
  11006. ])
  11007. ])
  11008. ]);
  11009. }
  11010. const PagesMineWalletIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/wallet/index.vue"]]);
  11011. const bizTypeMap$2 = fulfillerEnum.FlfBalanceBizType;
  11012. const _sfc_main$8 = {
  11013. data() {
  11014. const d = /* @__PURE__ */ new Date();
  11015. return {
  11016. currentTab: 0,
  11017. year: d.getFullYear(),
  11018. month: d.getMonth() + 1,
  11019. groups: []
  11020. };
  11021. },
  11022. computed: {
  11023. currentDate() {
  11024. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  11025. },
  11026. displayGroups() {
  11027. if (this.currentTab === 0)
  11028. return this.groups;
  11029. return this.groups.map((group) => {
  11030. const filteredItems = group.items.filter((item) => {
  11031. const type = this.currentTab === 1 ? "income" : "expense";
  11032. return item.type === type;
  11033. });
  11034. return {
  11035. ...group,
  11036. items: filteredItems
  11037. };
  11038. }).filter((group) => group.items.length > 0);
  11039. }
  11040. },
  11041. onShow() {
  11042. this.fetchData();
  11043. },
  11044. methods: {
  11045. async fetchData() {
  11046. try {
  11047. const res = await listBalanceOnApp({
  11048. year: this.year,
  11049. month: this.month
  11050. });
  11051. if (res.code === 200) {
  11052. const list = res.data || [];
  11053. let incomeTotal = 0;
  11054. let expenseTotal = 0;
  11055. const items = list.map((item) => {
  11056. const isAdd = item.type === "add";
  11057. const uiType = isAdd ? "income" : "expense";
  11058. const title = bizTypeMap$2[item.bizType] || item.bizType || "其他";
  11059. let amountVal = Math.abs(item.amount) / 100;
  11060. if (isAdd) {
  11061. incomeTotal += amountVal;
  11062. } else {
  11063. expenseTotal += amountVal;
  11064. }
  11065. let amountStr = amountVal.toFixed(2);
  11066. if (!isAdd)
  11067. amountStr = "-" + amountStr;
  11068. let timeStr = item.createTime || "";
  11069. if (timeStr.length >= 16) {
  11070. timeStr = timeStr.substring(5, 16);
  11071. }
  11072. return {
  11073. ...item,
  11074. title,
  11075. desc: item.reason || "",
  11076. time: timeStr,
  11077. amount: amountStr,
  11078. type: uiType,
  11079. tag: title
  11080. };
  11081. });
  11082. this.groups = [
  11083. {
  11084. month: `${this.month}月 ${this.year}`,
  11085. income: incomeTotal.toFixed(2),
  11086. expense: expenseTotal.toFixed(2),
  11087. items
  11088. }
  11089. ];
  11090. }
  11091. } catch (error) {
  11092. formatAppLog("error", "at pages/mine/wallet/bill.vue:175", "获取账单记录失败", error);
  11093. }
  11094. },
  11095. onDateChange(e) {
  11096. const val = e.detail.value;
  11097. const [y, m] = val.split("-");
  11098. this.year = parseInt(y, 10);
  11099. this.month = parseInt(m, 10);
  11100. this.fetchData();
  11101. },
  11102. navBack() {
  11103. uni.navigateBack();
  11104. },
  11105. switchTab(index) {
  11106. this.currentTab = index;
  11107. }
  11108. }
  11109. };
  11110. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  11111. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11112. vue.createElementVNode("view", { class: "nav-bar" }, [
  11113. vue.createElementVNode("view", {
  11114. class: "nav-left",
  11115. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11116. }, [
  11117. vue.createElementVNode("image", {
  11118. class: "back-icon",
  11119. src: _imports_0
  11120. })
  11121. ]),
  11122. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  11123. vue.createElementVNode("view", { class: "nav-right" })
  11124. ]),
  11125. vue.createElementVNode("view", { class: "content-area" }, [
  11126. vue.createElementVNode("view", { class: "filter-area" }, [
  11127. vue.createElementVNode("view", { class: "tabs-row" }, [
  11128. vue.createElementVNode(
  11129. "view",
  11130. {
  11131. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11132. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11133. },
  11134. [
  11135. vue.createElementVNode("text", null, "全部"),
  11136. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11137. key: 0,
  11138. class: "tab-line"
  11139. })) : vue.createCommentVNode("v-if", true)
  11140. ],
  11141. 2
  11142. /* CLASS */
  11143. ),
  11144. vue.createElementVNode(
  11145. "view",
  11146. {
  11147. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11148. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11149. },
  11150. [
  11151. vue.createElementVNode("text", null, "收入"),
  11152. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11153. key: 0,
  11154. class: "tab-line"
  11155. })) : vue.createCommentVNode("v-if", true)
  11156. ],
  11157. 2
  11158. /* CLASS */
  11159. ),
  11160. vue.createElementVNode(
  11161. "view",
  11162. {
  11163. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11164. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11165. },
  11166. [
  11167. vue.createElementVNode("text", null, "支出"),
  11168. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11169. key: 0,
  11170. class: "tab-line"
  11171. })) : vue.createCommentVNode("v-if", true)
  11172. ],
  11173. 2
  11174. /* CLASS */
  11175. )
  11176. ]),
  11177. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  11178. vue.createElementVNode("picker", {
  11179. mode: "date",
  11180. fields: "month",
  11181. value: $options.currentDate,
  11182. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  11183. }, [
  11184. vue.createElementVNode("view", { class: "date-picker" }, [
  11185. vue.createElementVNode(
  11186. "text",
  11187. { class: "date-text" },
  11188. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  11189. 1
  11190. /* TEXT */
  11191. ),
  11192. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  11193. ])
  11194. ], 40, ["value"])
  11195. ])
  11196. ]),
  11197. vue.createElementVNode("scroll-view", {
  11198. "scroll-y": "",
  11199. class: "bill-list"
  11200. }, [
  11201. (vue.openBlock(true), vue.createElementBlock(
  11202. vue.Fragment,
  11203. null,
  11204. vue.renderList($options.displayGroups, (group, gIndex) => {
  11205. return vue.openBlock(), vue.createElementBlock("view", {
  11206. key: gIndex,
  11207. class: "month-group"
  11208. }, [
  11209. vue.createElementVNode("view", { class: "group-header" }, [
  11210. vue.createElementVNode(
  11211. "text",
  11212. { class: "month-title" },
  11213. vue.toDisplayString(group.month),
  11214. 1
  11215. /* TEXT */
  11216. ),
  11217. vue.createElementVNode(
  11218. "text",
  11219. { class: "month-summary" },
  11220. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  11221. 1
  11222. /* TEXT */
  11223. )
  11224. ]),
  11225. (vue.openBlock(true), vue.createElementBlock(
  11226. vue.Fragment,
  11227. null,
  11228. vue.renderList(group.items, (item, index) => {
  11229. return vue.openBlock(), vue.createElementBlock("view", {
  11230. class: "list-item",
  11231. key: index
  11232. }, [
  11233. vue.createElementVNode(
  11234. "view",
  11235. {
  11236. class: vue.normalizeClass(["item-icon-box", item.type])
  11237. },
  11238. [
  11239. vue.createElementVNode(
  11240. "text",
  11241. { class: "item-icon-symbol" },
  11242. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11243. 1
  11244. /* TEXT */
  11245. )
  11246. ],
  11247. 2
  11248. /* CLASS */
  11249. ),
  11250. vue.createElementVNode("view", { class: "item-center" }, [
  11251. vue.createElementVNode(
  11252. "text",
  11253. { class: "item-title" },
  11254. vue.toDisplayString(item.title),
  11255. 1
  11256. /* TEXT */
  11257. ),
  11258. vue.createElementVNode(
  11259. "text",
  11260. { class: "item-desc" },
  11261. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11262. 1
  11263. /* TEXT */
  11264. )
  11265. ]),
  11266. vue.createElementVNode("view", { class: "item-right" }, [
  11267. vue.createElementVNode(
  11268. "text",
  11269. {
  11270. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11271. },
  11272. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11273. 3
  11274. /* TEXT, CLASS */
  11275. ),
  11276. vue.createElementVNode("view", { class: "item-tag" }, [
  11277. vue.createElementVNode(
  11278. "text",
  11279. null,
  11280. vue.toDisplayString(item.tag),
  11281. 1
  11282. /* TEXT */
  11283. )
  11284. ])
  11285. ])
  11286. ]);
  11287. }),
  11288. 128
  11289. /* KEYED_FRAGMENT */
  11290. ))
  11291. ]);
  11292. }),
  11293. 128
  11294. /* KEYED_FRAGMENT */
  11295. )),
  11296. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11297. ])
  11298. ])
  11299. ]);
  11300. }
  11301. const PagesMineWalletBill = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/wallet/bill.vue"]]);
  11302. const _sfc_main$7 = {
  11303. data() {
  11304. return {
  11305. currentIndex: 0,
  11306. profile: null,
  11307. levels: [],
  11308. // 从后端获取的等级配置
  11309. rightsList: [],
  11310. // 从后端获取的所有权益列表
  11311. isPopupShow: false,
  11312. currentBenefit: null,
  11313. pageLoading: true
  11314. };
  11315. },
  11316. computed: {
  11317. currentLevel() {
  11318. return this.processedLevels[this.currentIndex];
  11319. },
  11320. // 合并等级与对应的权益详细信息
  11321. processedLevels() {
  11322. if (!this.levels.length)
  11323. return [];
  11324. return this.levels.map((lvl) => {
  11325. const benefits = (lvl.rights || []).map((rightId) => {
  11326. return this.rightsList.find((r) => r.id === rightId);
  11327. }).filter(Boolean);
  11328. return {
  11329. ...lvl,
  11330. isCurrent: this.profile && this.profile.level === lvl.lvNo,
  11331. benefits
  11332. };
  11333. }).sort((a, b) => a.lvNo - b.lvNo);
  11334. }
  11335. },
  11336. async onLoad() {
  11337. await this.initData();
  11338. },
  11339. methods: {
  11340. async initData() {
  11341. this.pageLoading = true;
  11342. uni.showLoading({ title: "加载中..." });
  11343. try {
  11344. const [profileRes, levelsRes, rightsRes] = await Promise.all([
  11345. getMyProfile(),
  11346. listAllLevelConfigs(),
  11347. listAllLevelRights()
  11348. ]);
  11349. this.profile = profileRes.data;
  11350. this.levels = levelsRes.data || [];
  11351. this.rightsList = rightsRes.data || [];
  11352. if (this.profile) {
  11353. const idx = this.processedLevels.findIndex((lvl) => lvl.lvNo === this.profile.level);
  11354. if (idx !== -1) {
  11355. this.currentIndex = idx;
  11356. }
  11357. }
  11358. } catch (err) {
  11359. formatAppLog("error", "at pages/mine/level/index.vue:155", "初始化等级页面失败:", err);
  11360. uni.showToast({ title: "数据加载失败", icon: "none" });
  11361. } finally {
  11362. this.pageLoading = false;
  11363. uni.hideLoading();
  11364. }
  11365. },
  11366. navBack() {
  11367. uni.navigateBack();
  11368. },
  11369. swiperChange(e) {
  11370. this.currentIndex = e.detail.current;
  11371. },
  11372. changeLevel(index) {
  11373. this.currentIndex = index;
  11374. },
  11375. showBenefitDetail(benefit) {
  11376. this.currentBenefit = benefit;
  11377. this.isPopupShow = true;
  11378. },
  11379. closePopup() {
  11380. this.isPopupShow = false;
  11381. }
  11382. }
  11383. };
  11384. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  11385. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11386. vue.createElementVNode("view", { class: "custom-header" }, [
  11387. vue.createElementVNode("view", {
  11388. class: "header-left",
  11389. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11390. }, [
  11391. vue.createElementVNode("image", {
  11392. class: "back-icon",
  11393. src: _imports_0,
  11394. style: { "transform": "rotate(180deg)" }
  11395. })
  11396. ]),
  11397. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  11398. vue.createElementVNode("view", { class: "header-right" })
  11399. ]),
  11400. vue.createElementVNode("view", { class: "header-placeholder" }),
  11401. !$data.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  11402. key: 0,
  11403. class: "swiper-container"
  11404. }, [
  11405. vue.createElementVNode("swiper", {
  11406. class: "level-swiper",
  11407. "previous-margin": "80rpx",
  11408. "next-margin": "80rpx",
  11409. current: $data.currentIndex,
  11410. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  11411. }, [
  11412. (vue.openBlock(true), vue.createElementBlock(
  11413. vue.Fragment,
  11414. null,
  11415. vue.renderList($options.processedLevels, (level, index) => {
  11416. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  11417. key: index,
  11418. onClick: ($event) => $options.changeLevel(index)
  11419. }, [
  11420. vue.createElementVNode(
  11421. "view",
  11422. {
  11423. class: "level-card",
  11424. style: vue.normalizeStyle({
  11425. transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)",
  11426. backgroundImage: "url(" + level.backgroundUrl + ")",
  11427. backgroundSize: "cover",
  11428. backgroundPosition: "center"
  11429. })
  11430. },
  11431. [
  11432. vue.createElementVNode("view", { class: "card-content" }, [
  11433. vue.createElementVNode("view", { class: "card-header" }, [
  11434. vue.createElementVNode(
  11435. "view",
  11436. { class: "level-badge" },
  11437. "L" + vue.toDisplayString(index + 1),
  11438. 1
  11439. /* TEXT */
  11440. ),
  11441. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  11442. key: 0,
  11443. class: "current-badge"
  11444. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  11445. ]),
  11446. vue.createElementVNode(
  11447. "text",
  11448. { class: "level-name" },
  11449. vue.toDisplayString(level.name),
  11450. 1
  11451. /* TEXT */
  11452. ),
  11453. vue.createElementVNode(
  11454. "text",
  11455. { class: "level-score" },
  11456. "所需积分: " + vue.toDisplayString(level.upgradePoints || 0),
  11457. 1
  11458. /* TEXT */
  11459. ),
  11460. vue.createElementVNode("image", {
  11461. class: "crown-overlay",
  11462. src: _imports_1$4,
  11463. mode: "aspectFit"
  11464. })
  11465. ])
  11466. ],
  11467. 4
  11468. /* STYLE */
  11469. )
  11470. ], 8, ["onClick"]);
  11471. }),
  11472. 128
  11473. /* KEYED_FRAGMENT */
  11474. ))
  11475. ], 40, ["current"]),
  11476. vue.createElementVNode("view", { class: "swiper-dots" }, [
  11477. (vue.openBlock(true), vue.createElementBlock(
  11478. vue.Fragment,
  11479. null,
  11480. vue.renderList($options.processedLevels, (item, index) => {
  11481. return vue.openBlock(), vue.createElementBlock(
  11482. "view",
  11483. {
  11484. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  11485. key: index
  11486. },
  11487. null,
  11488. 2
  11489. /* CLASS */
  11490. );
  11491. }),
  11492. 128
  11493. /* KEYED_FRAGMENT */
  11494. ))
  11495. ])
  11496. ])) : vue.createCommentVNode("v-if", true),
  11497. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11498. key: 1,
  11499. class: "benefits-title-row"
  11500. }, [
  11501. vue.createElementVNode("text", { class: "benefits-title" }, "专属权益"),
  11502. vue.createElementVNode(
  11503. "text",
  11504. { class: "benefits-count" },
  11505. "(" + vue.toDisplayString($options.currentLevel.benefits ? $options.currentLevel.benefits.length : 0) + ")",
  11506. 1
  11507. /* TEXT */
  11508. )
  11509. ])) : vue.createCommentVNode("v-if", true),
  11510. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11511. key: 2,
  11512. class: "benefits-grid"
  11513. }, [
  11514. (vue.openBlock(true), vue.createElementBlock(
  11515. vue.Fragment,
  11516. null,
  11517. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  11518. return vue.openBlock(), vue.createElementBlock("view", {
  11519. class: "benefit-item",
  11520. key: index,
  11521. onClick: ($event) => $options.showBenefitDetail(benefit)
  11522. }, [
  11523. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  11524. benefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11525. key: 0,
  11526. class: "benefit-icon",
  11527. src: benefit.iconUrl,
  11528. mode: "aspectFit"
  11529. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11530. "view",
  11531. {
  11532. key: 1,
  11533. class: "benefit-icon-placeholder"
  11534. },
  11535. vue.toDisplayString(benefit.name[0]),
  11536. 1
  11537. /* TEXT */
  11538. ))
  11539. ]),
  11540. vue.createElementVNode(
  11541. "text",
  11542. { class: "benefit-name" },
  11543. vue.toDisplayString(benefit.name),
  11544. 1
  11545. /* TEXT */
  11546. )
  11547. ], 8, ["onClick"]);
  11548. }),
  11549. 128
  11550. /* KEYED_FRAGMENT */
  11551. )),
  11552. !$options.currentLevel.benefits || $options.currentLevel.benefits.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11553. key: 0,
  11554. class: "empty-benefits"
  11555. }, [
  11556. vue.createElementVNode("text", null, "该等级暂无特殊权益")
  11557. ])) : vue.createCommentVNode("v-if", true)
  11558. ])) : vue.createCommentVNode("v-if", true),
  11559. vue.createElementVNode(
  11560. "view",
  11561. {
  11562. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  11563. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  11564. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  11565. }, ["stop", "prevent"]))
  11566. },
  11567. [
  11568. vue.createElementVNode("view", {
  11569. class: "popup-modal",
  11570. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  11571. }, ["stop"]))
  11572. }, [
  11573. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  11574. $data.currentBenefit && $data.currentBenefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11575. key: 0,
  11576. class: "benefit-icon-large",
  11577. src: $data.currentBenefit.iconUrl,
  11578. mode: "aspectFit"
  11579. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11580. "view",
  11581. {
  11582. key: 1,
  11583. class: "benefit-icon-placeholder-large"
  11584. },
  11585. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  11586. 1
  11587. /* TEXT */
  11588. ))
  11589. ]),
  11590. vue.createElementVNode(
  11591. "text",
  11592. { class: "popup-title" },
  11593. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  11594. 1
  11595. /* TEXT */
  11596. ),
  11597. vue.createElementVNode(
  11598. "text",
  11599. { class: "popup-desc" },
  11600. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.statement : ""),
  11601. 1
  11602. /* TEXT */
  11603. ),
  11604. vue.createElementVNode("button", {
  11605. class: "popup-btn",
  11606. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  11607. }, "我知道了")
  11608. ])
  11609. ],
  11610. 34
  11611. /* CLASS, NEED_HYDRATION */
  11612. )
  11613. ]);
  11614. }
  11615. const PagesMineLevelIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/level/index.vue"]]);
  11616. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  11617. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  11618. const _sfc_main$6 = {
  11619. data() {
  11620. return {};
  11621. },
  11622. methods: {
  11623. navBack() {
  11624. uni.navigateBack();
  11625. },
  11626. navToOrderMsg() {
  11627. uni.navigateTo({
  11628. url: "/pages/mine/message/order"
  11629. });
  11630. },
  11631. navToSystemMsg() {
  11632. uni.navigateTo({
  11633. url: "/pages/mine/message/system"
  11634. });
  11635. }
  11636. }
  11637. };
  11638. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  11639. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11640. vue.createElementVNode("view", { class: "nav-bar" }, [
  11641. vue.createElementVNode("view", {
  11642. class: "nav-left",
  11643. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11644. }, [
  11645. vue.createElementVNode("image", {
  11646. class: "back-icon",
  11647. src: _imports_0,
  11648. style: { "transform": "rotate(180deg)" }
  11649. })
  11650. ]),
  11651. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11652. vue.createElementVNode("view", { class: "nav-right" }, [
  11653. vue.createElementVNode("view", { class: "more-dots" }, [
  11654. vue.createElementVNode("view", { class: "dot" }),
  11655. vue.createElementVNode("view", { class: "dot" }),
  11656. vue.createElementVNode("view", { class: "dot" })
  11657. ])
  11658. ])
  11659. ]),
  11660. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11661. vue.createElementVNode("view", { class: "message-list" }, [
  11662. vue.createElementVNode("view", {
  11663. class: "message-item",
  11664. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  11665. }, [
  11666. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11667. vue.createElementVNode("image", {
  11668. class: "msg-icon",
  11669. src: _imports_1$1
  11670. }),
  11671. vue.createElementVNode("view", { class: "red-dot-badge" })
  11672. ]),
  11673. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11674. vue.createElementVNode("view", { class: "top-row" }, [
  11675. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  11676. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  11677. ]),
  11678. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  11679. ])
  11680. ]),
  11681. vue.createElementVNode("view", {
  11682. class: "message-item",
  11683. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  11684. }, [
  11685. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11686. vue.createElementVNode("image", {
  11687. class: "msg-icon",
  11688. src: _imports_2$1
  11689. })
  11690. ]),
  11691. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11692. vue.createElementVNode("view", { class: "top-row" }, [
  11693. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11694. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11695. ]),
  11696. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11697. ])
  11698. ])
  11699. ])
  11700. ]);
  11701. }
  11702. const PagesMineMessageIndex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/index.vue"]]);
  11703. const _sfc_main$5 = {
  11704. methods: {
  11705. navBack() {
  11706. uni.navigateBack();
  11707. }
  11708. }
  11709. };
  11710. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  11711. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11712. vue.createElementVNode("view", { class: "nav-bar" }, [
  11713. vue.createElementVNode("view", {
  11714. class: "nav-left",
  11715. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11716. }, [
  11717. vue.createElementVNode("image", {
  11718. class: "back-icon",
  11719. src: _imports_0,
  11720. style: { "transform": "rotate(180deg)" }
  11721. })
  11722. ]),
  11723. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  11724. vue.createElementVNode("view", { class: "nav-right" })
  11725. ]),
  11726. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11727. vue.createElementVNode("view", { class: "msg-group" }, [
  11728. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  11729. vue.createElementVNode("view", { class: "msg-card" }, [
  11730. vue.createElementVNode("view", { class: "card-header" }, [
  11731. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  11732. vue.createElementVNode("view", { class: "red-dot" })
  11733. ]),
  11734. vue.createElementVNode("view", { class: "card-body" }, [
  11735. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11736. ]),
  11737. vue.createElementVNode("view", { class: "card-footer" }, [
  11738. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  11739. vue.createElementVNode("image", {
  11740. class: "arrow-icon",
  11741. src: _imports_3
  11742. })
  11743. ])
  11744. ]),
  11745. vue.createElementVNode("view", { class: "msg-card" }, [
  11746. vue.createElementVNode("view", { class: "card-header" }, [
  11747. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  11748. ]),
  11749. vue.createElementVNode("view", { class: "card-body" }, [
  11750. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11751. ]),
  11752. vue.createElementVNode("view", { class: "card-footer" }, [
  11753. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  11754. vue.createElementVNode("image", {
  11755. class: "arrow-icon",
  11756. src: _imports_3
  11757. })
  11758. ])
  11759. ])
  11760. ]),
  11761. vue.createElementVNode("view", { class: "msg-group" }, [
  11762. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  11763. vue.createElementVNode("view", { class: "msg-card" }, [
  11764. vue.createElementVNode("view", { class: "card-header" }, [
  11765. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  11766. ]),
  11767. vue.createElementVNode("view", { class: "card-body" }, [
  11768. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  11769. ]),
  11770. vue.createElementVNode("view", { class: "card-footer" }, [
  11771. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  11772. vue.createElementVNode("image", {
  11773. class: "arrow-icon",
  11774. src: _imports_3
  11775. })
  11776. ])
  11777. ])
  11778. ])
  11779. ]);
  11780. }
  11781. const PagesMineMessageOrder = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/order.vue"]]);
  11782. const _sfc_main$4 = {
  11783. methods: {
  11784. navBack() {
  11785. uni.navigateBack();
  11786. },
  11787. navToDetail() {
  11788. uni.navigateTo({
  11789. url: "/pages/mine/message/detail"
  11790. });
  11791. }
  11792. }
  11793. };
  11794. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11795. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11796. vue.createElementVNode("view", { class: "nav-bar" }, [
  11797. vue.createElementVNode("view", {
  11798. class: "nav-left",
  11799. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11800. }, [
  11801. vue.createElementVNode("image", {
  11802. class: "back-icon",
  11803. src: _imports_0,
  11804. style: { "transform": "rotate(180deg)" }
  11805. })
  11806. ]),
  11807. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  11808. vue.createElementVNode("view", { class: "nav-right" })
  11809. ]),
  11810. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11811. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  11812. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  11813. vue.createElementVNode("view", {
  11814. class: "sys-card",
  11815. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11816. }, [
  11817. vue.createElementVNode("view", { class: "sys-header" }, [
  11818. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  11819. vue.createElementVNode("view", { class: "red-dot" })
  11820. ]),
  11821. vue.createElementVNode("view", { class: "sys-content" }, [
  11822. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  11823. ]),
  11824. vue.createElementVNode("view", { class: "sys-footer" }, [
  11825. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  11826. vue.createElementVNode("view", { class: "check-more" }, [
  11827. vue.createElementVNode("text", null, "查看详情"),
  11828. vue.createElementVNode("image", {
  11829. class: "arrow-icon-small",
  11830. src: _imports_3
  11831. })
  11832. ])
  11833. ])
  11834. ]),
  11835. vue.createElementVNode("view", { class: "sys-card" }, [
  11836. vue.createElementVNode("view", { class: "sys-header" }, [
  11837. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  11838. ]),
  11839. vue.createElementVNode("view", { class: "sys-content" }, [
  11840. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  11841. ]),
  11842. vue.createElementVNode("view", { class: "sys-footer" }, [
  11843. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  11844. vue.createElementVNode("view", { class: "check-more" }, [
  11845. vue.createElementVNode("text", null, "查看详情"),
  11846. vue.createElementVNode("image", {
  11847. class: "arrow-icon-small",
  11848. src: _imports_3
  11849. })
  11850. ])
  11851. ])
  11852. ]),
  11853. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  11854. vue.createElementVNode("view", { class: "sys-card" }, [
  11855. vue.createElementVNode("view", { class: "sys-header" }, [
  11856. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  11857. ]),
  11858. vue.createElementVNode("view", { class: "sys-content" }, [
  11859. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  11860. ]),
  11861. vue.createElementVNode("view", { class: "sys-footer" }, [
  11862. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  11863. vue.createElementVNode("view", { class: "check-more" }, [
  11864. vue.createElementVNode("text", null, "查看详情"),
  11865. vue.createElementVNode("image", {
  11866. class: "arrow-icon-small",
  11867. src: _imports_3
  11868. })
  11869. ])
  11870. ])
  11871. ])
  11872. ])
  11873. ]);
  11874. }
  11875. const PagesMineMessageSystem = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/system.vue"]]);
  11876. const _sfc_main$3 = {
  11877. methods: {
  11878. navBack() {
  11879. uni.navigateBack();
  11880. }
  11881. }
  11882. };
  11883. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  11884. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11885. vue.createElementVNode("view", { class: "nav-bar" }, [
  11886. vue.createElementVNode("view", {
  11887. class: "nav-left",
  11888. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11889. }, [
  11890. vue.createElementVNode("image", {
  11891. class: "back-icon",
  11892. src: _imports_0,
  11893. style: { "transform": "rotate(180deg)" }
  11894. })
  11895. ]),
  11896. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  11897. vue.createElementVNode("view", { class: "nav-right" })
  11898. ]),
  11899. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11900. vue.createElementVNode("view", { class: "detail-content" }, [
  11901. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  11902. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  11903. vue.createElementVNode("view", { class: "detail-body" }, [
  11904. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  11905. ]),
  11906. vue.createElementVNode("view", { class: "detail-footer" }, [
  11907. vue.createElementVNode("view", { class: "divider" }),
  11908. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  11909. ])
  11910. ])
  11911. ]);
  11912. }
  11913. const PagesMineMessageDetail = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/message/detail.vue"]]);
  11914. const _imports_1 = "/static/icons/diamond_white.svg";
  11915. const _imports_2 = "/static/icons/star_decor.svg";
  11916. const bizTypeMap$1 = fulfillerEnum.FlfPointsBizType;
  11917. const _sfc_main$2 = {
  11918. data() {
  11919. return {
  11920. points: 0,
  11921. currentTab: 0,
  11922. list: [],
  11923. pageNum: 1,
  11924. pageSize: 10,
  11925. total: 0,
  11926. loading: false
  11927. };
  11928. },
  11929. computed: {
  11930. displayList() {
  11931. if (this.currentTab === 0)
  11932. return this.list;
  11933. const type = this.currentTab === 1 ? "income" : "expense";
  11934. return this.list.filter((item) => item.type === type);
  11935. }
  11936. },
  11937. onShow() {
  11938. this.fetchPoints();
  11939. this.fetchList(true);
  11940. },
  11941. onReachBottom() {
  11942. this.fetchList();
  11943. },
  11944. methods: {
  11945. async fetchPoints() {
  11946. try {
  11947. const res = await pointsOnApp();
  11948. if (res.code === 200) {
  11949. this.points = res.data || 0;
  11950. }
  11951. } catch (error) {
  11952. formatAppLog("error", "at pages/mine/points/index.vue:120", "获取当前积分失败", error);
  11953. }
  11954. },
  11955. async fetchList(reset = false) {
  11956. if (reset) {
  11957. this.pageNum = 1;
  11958. this.list = [];
  11959. this.total = 0;
  11960. }
  11961. if (this.loading)
  11962. return;
  11963. if (!reset && this.list.length >= this.total && this.total !== 0)
  11964. return;
  11965. this.loading = true;
  11966. try {
  11967. const res = await pagePointsOnApp({
  11968. pageNum: this.pageNum,
  11969. pageSize: this.pageSize
  11970. });
  11971. if (res.code === 200) {
  11972. this.total = res.total || 0;
  11973. const rows = res.rows || [];
  11974. const mappedRows = rows.map((item) => {
  11975. const isAdd = item.type === "add";
  11976. const uiType = isAdd ? "income" : "expense";
  11977. const title = bizTypeMap$1[item.bizType] || item.bizType || "其他";
  11978. let amountStr = Math.abs(item.amount);
  11979. if (!isAdd) {
  11980. amountStr = "-" + amountStr;
  11981. }
  11982. return {
  11983. ...item,
  11984. title,
  11985. desc: item.reason || "",
  11986. time: item.createTime || "",
  11987. amount: amountStr,
  11988. type: uiType,
  11989. tag: title
  11990. };
  11991. });
  11992. this.list = this.list.concat(mappedRows);
  11993. this.pageNum++;
  11994. }
  11995. } catch (error) {
  11996. formatAppLog("error", "at pages/mine/points/index.vue:163", "获取积分明细失败", error);
  11997. } finally {
  11998. this.loading = false;
  11999. }
  12000. },
  12001. navBack() {
  12002. uni.navigateBack();
  12003. },
  12004. navToDetail() {
  12005. uni.navigateTo({
  12006. url: "/pages/mine/points/detail"
  12007. });
  12008. },
  12009. navToEquity() {
  12010. },
  12011. switchTab(index) {
  12012. this.currentTab = index;
  12013. }
  12014. }
  12015. };
  12016. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  12017. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12018. vue.createElementVNode("view", { class: "nav-bar" }, [
  12019. vue.createElementVNode("view", {
  12020. class: "nav-left",
  12021. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12022. }, [
  12023. vue.createElementVNode("image", {
  12024. class: "back-icon",
  12025. src: _imports_0
  12026. })
  12027. ]),
  12028. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  12029. vue.createElementVNode("view", { class: "nav-right" })
  12030. ]),
  12031. vue.createElementVNode("view", { class: "points-card" }, [
  12032. vue.createElementVNode("view", { class: "card-header" }, [
  12033. vue.createElementVNode("view", {
  12034. class: "equity-btn",
  12035. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  12036. }, [
  12037. vue.createElementVNode("image", {
  12038. class: "equity-icon",
  12039. src: _imports_1
  12040. }),
  12041. vue.createElementVNode("text", null, "积分权益")
  12042. ]),
  12043. vue.createElementVNode("view", {
  12044. class: "detail-link",
  12045. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12046. }, [
  12047. vue.createElementVNode("text", null, "明细")
  12048. ])
  12049. ]),
  12050. vue.createElementVNode("view", { class: "card-body" }, [
  12051. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  12052. vue.createElementVNode(
  12053. "text",
  12054. { class: "value" },
  12055. vue.toDisplayString($data.points),
  12056. 1
  12057. /* TEXT */
  12058. )
  12059. ]),
  12060. vue.createElementVNode("image", {
  12061. class: "bg-decor",
  12062. src: _imports_2,
  12063. mode: "aspectFit"
  12064. })
  12065. ]),
  12066. vue.createElementVNode("view", { class: "record-container" }, [
  12067. vue.createElementVNode("view", { class: "record-header" }, [
  12068. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  12069. vue.createElementVNode("view", {
  12070. class: "header-more",
  12071. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12072. }, [
  12073. vue.createElementVNode("text", null, "查看全部"),
  12074. vue.createElementVNode("image", {
  12075. class: "more-icon",
  12076. src: _imports_3
  12077. })
  12078. ])
  12079. ]),
  12080. vue.createElementVNode("view", { class: "tabs-row" }, [
  12081. vue.createElementVNode(
  12082. "view",
  12083. {
  12084. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12085. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  12086. },
  12087. [
  12088. vue.createElementVNode("text", null, "全部"),
  12089. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12090. key: 0,
  12091. class: "tab-line"
  12092. })) : vue.createCommentVNode("v-if", true)
  12093. ],
  12094. 2
  12095. /* CLASS */
  12096. ),
  12097. vue.createElementVNode(
  12098. "view",
  12099. {
  12100. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12101. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  12102. },
  12103. [
  12104. vue.createElementVNode("text", null, "获取"),
  12105. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12106. key: 0,
  12107. class: "tab-line"
  12108. })) : vue.createCommentVNode("v-if", true)
  12109. ],
  12110. 2
  12111. /* CLASS */
  12112. ),
  12113. vue.createElementVNode(
  12114. "view",
  12115. {
  12116. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12117. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  12118. },
  12119. [
  12120. vue.createElementVNode("text", null, "扣减"),
  12121. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12122. key: 0,
  12123. class: "tab-line"
  12124. })) : vue.createCommentVNode("v-if", true)
  12125. ],
  12126. 2
  12127. /* CLASS */
  12128. )
  12129. ]),
  12130. vue.createElementVNode("view", { class: "record-list" }, [
  12131. (vue.openBlock(true), vue.createElementBlock(
  12132. vue.Fragment,
  12133. null,
  12134. vue.renderList($options.displayList, (item, index) => {
  12135. return vue.openBlock(), vue.createElementBlock("view", {
  12136. class: "list-item",
  12137. key: index
  12138. }, [
  12139. vue.createElementVNode("view", { class: "item-left" }, [
  12140. vue.createElementVNode(
  12141. "text",
  12142. { class: "item-title" },
  12143. vue.toDisplayString(item.title),
  12144. 1
  12145. /* TEXT */
  12146. ),
  12147. vue.createElementVNode(
  12148. "text",
  12149. { class: "item-desc" },
  12150. vue.toDisplayString(item.desc),
  12151. 1
  12152. /* TEXT */
  12153. ),
  12154. vue.createElementVNode(
  12155. "text",
  12156. { class: "item-time" },
  12157. vue.toDisplayString(item.time),
  12158. 1
  12159. /* TEXT */
  12160. )
  12161. ]),
  12162. vue.createElementVNode("view", { class: "item-right" }, [
  12163. vue.createElementVNode(
  12164. "text",
  12165. {
  12166. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12167. },
  12168. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12169. 3
  12170. /* TEXT, CLASS */
  12171. ),
  12172. vue.createElementVNode("view", { class: "item-tag" }, [
  12173. vue.createElementVNode(
  12174. "text",
  12175. null,
  12176. vue.toDisplayString(item.tag),
  12177. 1
  12178. /* TEXT */
  12179. )
  12180. ])
  12181. ])
  12182. ]);
  12183. }),
  12184. 128
  12185. /* KEYED_FRAGMENT */
  12186. ))
  12187. ])
  12188. ])
  12189. ]);
  12190. }
  12191. const PagesMinePointsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/index.vue"]]);
  12192. const bizTypeMap = fulfillerEnum.FlfPointsBizType;
  12193. const _sfc_main$1 = {
  12194. data() {
  12195. const d = /* @__PURE__ */ new Date();
  12196. return {
  12197. currentTab: 0,
  12198. year: d.getFullYear(),
  12199. month: d.getMonth() + 1,
  12200. groups: []
  12201. };
  12202. },
  12203. computed: {
  12204. currentDate() {
  12205. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  12206. },
  12207. displayGroups() {
  12208. if (this.currentTab === 0)
  12209. return this.groups;
  12210. return this.groups.map((group) => {
  12211. const filteredItems = group.items.filter((item) => {
  12212. const type = this.currentTab === 1 ? "income" : "expense";
  12213. return item.type === type;
  12214. });
  12215. return {
  12216. ...group,
  12217. items: filteredItems
  12218. };
  12219. }).filter((group) => group.items.length > 0);
  12220. }
  12221. },
  12222. onShow() {
  12223. this.fetchData();
  12224. },
  12225. methods: {
  12226. async fetchData() {
  12227. try {
  12228. const res = await listPointsOnApp({
  12229. year: this.year,
  12230. month: this.month
  12231. });
  12232. if (res.code === 200) {
  12233. const list = res.data || [];
  12234. let incomeTotal = 0;
  12235. let expenseTotal = 0;
  12236. const items = list.map((item) => {
  12237. const isAdd = item.type === "add";
  12238. const uiType = isAdd ? "income" : "expense";
  12239. const title = bizTypeMap[item.bizType] || item.bizType || "其他";
  12240. let amountVal = Math.abs(item.amount);
  12241. if (isAdd) {
  12242. incomeTotal += amountVal;
  12243. } else {
  12244. expenseTotal += amountVal;
  12245. }
  12246. let amountStr = String(amountVal);
  12247. if (!isAdd)
  12248. amountStr = "-" + amountStr;
  12249. let timeStr = item.createTime || "";
  12250. if (timeStr.length >= 16) {
  12251. timeStr = timeStr.substring(5, 16);
  12252. }
  12253. return {
  12254. ...item,
  12255. title,
  12256. desc: item.reason || "",
  12257. time: timeStr,
  12258. amount: amountStr,
  12259. type: uiType,
  12260. tag: title
  12261. };
  12262. });
  12263. this.groups = [
  12264. {
  12265. month: `${this.month}月 ${this.year}`,
  12266. income: String(incomeTotal),
  12267. expense: String(expenseTotal),
  12268. items
  12269. }
  12270. ];
  12271. }
  12272. } catch (error) {
  12273. formatAppLog("error", "at pages/mine/points/detail.vue:174", "获取积分明细记录失败", error);
  12274. }
  12275. },
  12276. onDateChange(e) {
  12277. const val = e.detail.value;
  12278. const [y, m] = val.split("-");
  12279. this.year = parseInt(y, 10);
  12280. this.month = parseInt(m, 10);
  12281. this.fetchData();
  12282. },
  12283. navBack() {
  12284. uni.navigateBack();
  12285. },
  12286. switchTab(index) {
  12287. this.currentTab = index;
  12288. }
  12289. }
  12290. };
  12291. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  12292. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12293. vue.createElementVNode("view", { class: "nav-bar" }, [
  12294. vue.createElementVNode("view", {
  12295. class: "nav-left",
  12296. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12297. }, [
  12298. vue.createElementVNode("image", {
  12299. class: "back-icon",
  12300. src: _imports_0
  12301. })
  12302. ]),
  12303. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  12304. vue.createElementVNode("view", { class: "nav-right" })
  12305. ]),
  12306. vue.createElementVNode("view", { class: "content-area" }, [
  12307. vue.createElementVNode("view", { class: "filter-area" }, [
  12308. vue.createElementVNode("view", { class: "tabs-row" }, [
  12309. vue.createElementVNode(
  12310. "view",
  12311. {
  12312. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12313. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  12314. },
  12315. [
  12316. vue.createElementVNode("text", null, "全部"),
  12317. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12318. key: 0,
  12319. class: "tab-line"
  12320. })) : vue.createCommentVNode("v-if", true)
  12321. ],
  12322. 2
  12323. /* CLASS */
  12324. ),
  12325. vue.createElementVNode(
  12326. "view",
  12327. {
  12328. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12329. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  12330. },
  12331. [
  12332. vue.createElementVNode("text", null, "获取"),
  12333. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12334. key: 0,
  12335. class: "tab-line"
  12336. })) : vue.createCommentVNode("v-if", true)
  12337. ],
  12338. 2
  12339. /* CLASS */
  12340. ),
  12341. vue.createElementVNode(
  12342. "view",
  12343. {
  12344. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12345. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  12346. },
  12347. [
  12348. vue.createElementVNode("text", null, "扣减"),
  12349. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12350. key: 0,
  12351. class: "tab-line"
  12352. })) : vue.createCommentVNode("v-if", true)
  12353. ],
  12354. 2
  12355. /* CLASS */
  12356. )
  12357. ]),
  12358. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  12359. vue.createElementVNode("picker", {
  12360. mode: "date",
  12361. fields: "month",
  12362. value: $options.currentDate,
  12363. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  12364. }, [
  12365. vue.createElementVNode("view", { class: "date-picker" }, [
  12366. vue.createElementVNode(
  12367. "text",
  12368. { class: "date-text" },
  12369. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  12370. 1
  12371. /* TEXT */
  12372. ),
  12373. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  12374. ])
  12375. ], 40, ["value"])
  12376. ])
  12377. ]),
  12378. vue.createElementVNode("scroll-view", {
  12379. "scroll-y": "",
  12380. class: "bill-list"
  12381. }, [
  12382. (vue.openBlock(true), vue.createElementBlock(
  12383. vue.Fragment,
  12384. null,
  12385. vue.renderList($options.displayGroups, (group, gIndex) => {
  12386. return vue.openBlock(), vue.createElementBlock("view", {
  12387. key: gIndex,
  12388. class: "month-group"
  12389. }, [
  12390. vue.createElementVNode("view", { class: "group-header" }, [
  12391. vue.createElementVNode(
  12392. "text",
  12393. { class: "month-title" },
  12394. vue.toDisplayString(group.month),
  12395. 1
  12396. /* TEXT */
  12397. ),
  12398. vue.createElementVNode(
  12399. "text",
  12400. { class: "month-summary" },
  12401. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  12402. 1
  12403. /* TEXT */
  12404. )
  12405. ]),
  12406. (vue.openBlock(true), vue.createElementBlock(
  12407. vue.Fragment,
  12408. null,
  12409. vue.renderList(group.items, (item, index) => {
  12410. return vue.openBlock(), vue.createElementBlock("view", {
  12411. class: "list-item",
  12412. key: index
  12413. }, [
  12414. vue.createElementVNode(
  12415. "view",
  12416. {
  12417. class: vue.normalizeClass(["item-icon-box", item.type])
  12418. },
  12419. [
  12420. vue.createElementVNode(
  12421. "text",
  12422. { class: "item-icon-symbol" },
  12423. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  12424. 1
  12425. /* TEXT */
  12426. )
  12427. ],
  12428. 2
  12429. /* CLASS */
  12430. ),
  12431. vue.createElementVNode("view", { class: "item-center" }, [
  12432. vue.createElementVNode(
  12433. "text",
  12434. { class: "item-title" },
  12435. vue.toDisplayString(item.title),
  12436. 1
  12437. /* TEXT */
  12438. ),
  12439. vue.createElementVNode(
  12440. "text",
  12441. { class: "item-desc" },
  12442. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  12443. 1
  12444. /* TEXT */
  12445. )
  12446. ]),
  12447. vue.createElementVNode("view", { class: "item-right" }, [
  12448. vue.createElementVNode(
  12449. "text",
  12450. {
  12451. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12452. },
  12453. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12454. 3
  12455. /* TEXT, CLASS */
  12456. ),
  12457. vue.createElementVNode("view", { class: "item-tag" }, [
  12458. vue.createElementVNode(
  12459. "text",
  12460. null,
  12461. vue.toDisplayString(item.tag),
  12462. 1
  12463. /* TEXT */
  12464. )
  12465. ])
  12466. ])
  12467. ]);
  12468. }),
  12469. 128
  12470. /* KEYED_FRAGMENT */
  12471. ))
  12472. ]);
  12473. }),
  12474. 128
  12475. /* KEYED_FRAGMENT */
  12476. )),
  12477. vue.createElementVNode("view", { class: "list-padding-bottom" })
  12478. ])
  12479. ])
  12480. ]);
  12481. }
  12482. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  12483. __definePage("pages/login/login", PagesLoginLogin);
  12484. __definePage("pages/recruit/landing", PagesRecruitLanding);
  12485. __definePage("pages/recruit/form", PagesRecruitForm);
  12486. __definePage("pages/recruit/auth", PagesRecruitAuth);
  12487. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  12488. __definePage("pages/recruit/success", PagesRecruitSuccess);
  12489. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  12490. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  12491. __definePage("pages/home/index", PagesHomeIndex);
  12492. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  12493. __definePage("pages/orders/index", PagesOrdersIndex);
  12494. __definePage("pages/orders/detail", PagesOrdersDetail);
  12495. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  12496. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  12497. __definePage("pages/mine/rewards", PagesMineRewards);
  12498. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  12499. __definePage("pages/mine/index", PagesMineIndex);
  12500. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  12501. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  12502. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  12503. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  12504. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  12505. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  12506. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  12507. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  12508. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  12509. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  12510. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  12511. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  12512. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  12513. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  12514. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  12515. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  12516. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  12517. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  12518. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  12519. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  12520. const _sfc_main = {
  12521. onLaunch: function() {
  12522. formatAppLog("log", "at App.vue:6", "App Launch");
  12523. if (isLoggedIn()) {
  12524. uni.switchTab({
  12525. url: "/pages/home/index"
  12526. });
  12527. }
  12528. },
  12529. onShow: function() {
  12530. formatAppLog("log", "at App.vue:15", "App Show");
  12531. },
  12532. onHide: function() {
  12533. formatAppLog("log", "at App.vue:18", "App Hide");
  12534. }
  12535. };
  12536. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  12537. function createApp() {
  12538. const app = vue.createVueApp(App);
  12539. return {
  12540. app
  12541. };
  12542. }
  12543. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  12544. uni.Vuex = __Vuex__;
  12545. uni.Pinia = __Pinia__;
  12546. __app__.provide("__globalStyles", __uniConfig.styles);
  12547. __app__._component.mpType = "app";
  12548. __app__._component.render = () => {
  12549. };
  12550. __app__.mount("#app");
  12551. })(Vue);