app-service.js 469 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838
  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.0.104:8080";
  120. const CLIENT_ID = "3";
  121. const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
  122. const PLATFORM_ID = 2;
  123. const TENANT_ID = "000000";
  124. const TOKEN_KEY = "fulfiller_token";
  125. const USER_INFO_KEY = "fulfiller_user_info";
  126. function getToken() {
  127. return uni.getStorageSync(TOKEN_KEY) || "";
  128. }
  129. function setToken(token) {
  130. uni.setStorageSync(TOKEN_KEY, token);
  131. }
  132. function removeToken() {
  133. uni.removeStorageSync(TOKEN_KEY);
  134. }
  135. function isLoggedIn() {
  136. return !!getToken();
  137. }
  138. function removeUserInfo() {
  139. uni.removeStorageSync(USER_INFO_KEY);
  140. }
  141. function clearAuth() {
  142. removeToken();
  143. removeUserInfo();
  144. }
  145. function request(options = {}) {
  146. const {
  147. url,
  148. method = "GET",
  149. data,
  150. header = {},
  151. needToken = true
  152. } = options;
  153. const headers = {
  154. "Content-Type": "application/json;charset=utf-8",
  155. "clientid": CLIENT_ID,
  156. "X-Platform-Code": PLATFORM_CODE,
  157. ...header
  158. };
  159. if (needToken) {
  160. const token = getToken();
  161. if (token) {
  162. headers["Authorization"] = "Bearer " + token;
  163. }
  164. }
  165. return new Promise((resolve, reject) => {
  166. uni.request({
  167. url: BASE_URL + url,
  168. method: method.toUpperCase(),
  169. data,
  170. header: headers,
  171. success: (res) => {
  172. formatAppLog("log", "at utils/request.js:50", res);
  173. const statusCode = res.statusCode;
  174. const code = res.data.code;
  175. res.data.msg;
  176. res.data.data;
  177. if (statusCode !== 200) {
  178. const msg = msg || `请求失败(${statusCode})`;
  179. uni.showToast({ title: msg, icon: "none" });
  180. return reject(new Error(msg));
  181. }
  182. if (code === 401) {
  183. clearAuth();
  184. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  185. setTimeout(() => {
  186. uni.reLaunch({ url: "/pages/login/login" });
  187. }, 1500);
  188. return reject(new Error("未授权"));
  189. }
  190. resolve(res.data);
  191. },
  192. fail: (err) => {
  193. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  194. reject(err);
  195. }
  196. });
  197. });
  198. }
  199. function loginByPassword(username, password) {
  200. return request({
  201. url: "/auth/login",
  202. method: "POST",
  203. needToken: false,
  204. data: {
  205. tenantId: TENANT_ID,
  206. platformId: PLATFORM_ID,
  207. username,
  208. password,
  209. clientId: CLIENT_ID,
  210. grantType: "fulfiller_password"
  211. // 使用履约者专用认证策略
  212. }
  213. });
  214. }
  215. function logout() {
  216. return request({
  217. url: "/auth/logout",
  218. method: "POST"
  219. });
  220. }
  221. const logic$9 = {
  222. data() {
  223. return {
  224. currentTab: 1,
  225. // 0: 免密, 1: 密码
  226. mobile: "",
  227. code: "",
  228. password: "",
  229. showPassword: false,
  230. isAgreed: false,
  231. countDown: 0,
  232. timer: null,
  233. showAgreementModal: false,
  234. agreementTitle: "",
  235. agreementContent: "",
  236. loginLoading: false
  237. };
  238. },
  239. methods: {
  240. showAgreement(type) {
  241. this.agreementTitle = type === 1 ? "用户服务协议" : "隐私政策";
  242. if (type === 1) {
  243. this.agreementContent = "1. 服务条款\n欢迎使用宠宝平台。您在使用本服务时需遵守以下条款...\n\n2. 用户责任\n用户需对自己的行为负责...\n\n3. 账号管理\n请妥善保管您的账号密码...";
  244. } else {
  245. this.agreementContent = "1. 信息收集\n为了提供服务,我们需要收集您的手机号、地理位置、设备信息等必要数据。\n\n2. 信息使用\n您的位置信息将用于订单匹配和路径规划;您的联系方式将用于接单通知和客户沟通。\n\n3. 信息保护\n我们将采取严格的安全措施保护您的个人信息,未经授权不会向第三方披露。";
  246. }
  247. this.showAgreementModal = true;
  248. },
  249. /* async getVerifyCode() {
  250. if (this.currentTab === 1) return;
  251. if (this.countDown > 0) return;
  252. if (!this.mobile || this.mobile.length !== 11) {
  253. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  254. return;
  255. }
  256. try {
  257. const res = await sendSmsCode(this.mobile);
  258. // 发送成功,启动倒计时
  259. this.countDown = 60;
  260. this.timer = setInterval(() => {
  261. this.countDown--;
  262. if (this.countDown <= 0) {
  263. clearInterval(this.timer);
  264. }
  265. }, 1000);
  266. // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
  267. const devCode = res.data;
  268. if (devCode) {
  269. this.code = devCode;
  270. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  271. } else {
  272. uni.showToast({ title: '验证码已发送', icon: 'none' });
  273. }
  274. } catch (err) {
  275. __f__('error','at pages/login/logic.js:60','发送验证码失败:', err);
  276. }
  277. }, */
  278. async handleLogin() {
  279. var _a;
  280. if (!this.isAgreed) {
  281. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  282. return;
  283. }
  284. if (!this.mobile) {
  285. uni.showToast({ title: "请输入手机号", icon: "none" });
  286. return;
  287. }
  288. if (!this.password) {
  289. uni.showToast({ title: "请输入密码", icon: "none" });
  290. return;
  291. }
  292. if (this.loginLoading)
  293. return;
  294. this.loginLoading = true;
  295. uni.showLoading({
  296. title: "登录中...",
  297. mask: true
  298. });
  299. try {
  300. let res;
  301. res = await loginByPassword(this.mobile, this.password);
  302. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  303. if (token) {
  304. setToken(token);
  305. }
  306. uni.showToast({ title: "登录成功", icon: "success" });
  307. setTimeout(() => {
  308. uni.switchTab({
  309. url: "/pages/home/index"
  310. });
  311. }, 1e3);
  312. } catch (err) {
  313. formatAppLog("error", "at pages/login/logic.js:123", "登录失败:", err);
  314. } finally {
  315. this.loginLoading = false;
  316. uni.hideLoading();
  317. }
  318. },
  319. goToRecruit() {
  320. uni.navigateTo({
  321. url: "/pages/recruit/landing"
  322. });
  323. },
  324. goToForgotPwd() {
  325. uni.navigateTo({
  326. url: "/pages/login/reset-pwd-verify"
  327. });
  328. }
  329. }
  330. };
  331. const _imports_0$4 = "/static/header.png";
  332. const _imports_1$8 = "/static/logo.png";
  333. const _sfc_main$C = {
  334. ...logic$9,
  335. components: {
  336. PrivacyPopup: __easycom_0
  337. }
  338. };
  339. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  340. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  341. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  342. vue.createElementVNode("view", { class: "banner-area" }, [
  343. vue.createElementVNode("image", {
  344. class: "banner-img",
  345. src: _imports_0$4,
  346. mode: "widthFix"
  347. })
  348. ]),
  349. vue.createElementVNode("view", { class: "content-card" }, [
  350. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  351. vue.createElementVNode("image", {
  352. class: "logo-img",
  353. src: _imports_1$8,
  354. mode: "widthFix"
  355. })
  356. ]),
  357. vue.createElementVNode("view", { class: "tabs" }, [
  358. vue.createElementVNode("view", { class: "tab-item active" }, [
  359. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  360. vue.createElementVNode("view", { class: "tab-indicator" })
  361. ])
  362. ]),
  363. vue.createElementVNode("view", { class: "form-area" }, [
  364. vue.createElementVNode("view", { class: "input-group" }, [
  365. vue.createElementVNode("view", { class: "area-code" }, [
  366. vue.createElementVNode("text", null, "+86"),
  367. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  368. ]),
  369. vue.withDirectives(vue.createElementVNode(
  370. "input",
  371. {
  372. class: "input",
  373. type: "number",
  374. placeholder: "手机号",
  375. "placeholder-style": "color: #ccc",
  376. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
  377. maxlength: "11"
  378. },
  379. null,
  380. 512
  381. /* NEED_PATCH */
  382. ), [
  383. [vue.vModelText, _ctx.mobile]
  384. ])
  385. ]),
  386. vue.createElementVNode("view", { class: "input-group" }, [
  387. vue.withDirectives(vue.createElementVNode("input", {
  388. class: "input",
  389. password: !_ctx.showPassword,
  390. type: "text",
  391. placeholder: "请输入密码",
  392. "placeholder-style": "color: #ccc",
  393. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
  394. }, null, 8, ["password"]), [
  395. [vue.vModelText, _ctx.password]
  396. ]),
  397. vue.createElementVNode("view", {
  398. class: "eye-icon",
  399. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  400. }, [
  401. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  402. key: 0,
  403. class: "svg-icon",
  404. viewBox: "0 0 24 24",
  405. fill: "none",
  406. xmlns: "http://www.w3.org/2000/svg"
  407. }, [
  408. vue.createElementVNode("path", {
  409. 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",
  410. fill: "#CCCCCC"
  411. })
  412. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  413. key: 1,
  414. class: "svg-icon",
  415. viewBox: "0 0 24 24",
  416. fill: "none",
  417. xmlns: "http://www.w3.org/2000/svg"
  418. }, [
  419. vue.createElementVNode("path", {
  420. d: "M12 7C7 7 2.73 10.11 1 14.5",
  421. stroke: "#CCCCCC",
  422. "stroke-width": "2",
  423. "stroke-linecap": "round"
  424. }),
  425. vue.createElementVNode("path", {
  426. d: "M23 14.5C21.27 10.11 17 7 12 7",
  427. stroke: "#CCCCCC",
  428. "stroke-width": "2",
  429. "stroke-linecap": "round"
  430. }),
  431. vue.createElementVNode("path", {
  432. d: "M12 7V4",
  433. stroke: "#CCCCCC",
  434. "stroke-width": "2",
  435. "stroke-linecap": "round"
  436. }),
  437. vue.createElementVNode("path", {
  438. d: "M16 8L18 5",
  439. stroke: "#CCCCCC",
  440. "stroke-width": "2",
  441. "stroke-linecap": "round"
  442. }),
  443. vue.createElementVNode("path", {
  444. d: "M8 8L6 5",
  445. stroke: "#CCCCCC",
  446. "stroke-width": "2",
  447. "stroke-linecap": "round"
  448. }),
  449. vue.createElementVNode("path", {
  450. d: "M20 10L22 8",
  451. stroke: "#CCCCCC",
  452. "stroke-width": "2",
  453. "stroke-linecap": "round"
  454. }),
  455. vue.createElementVNode("path", {
  456. d: "M4 10L2 8",
  457. stroke: "#CCCCCC",
  458. "stroke-width": "2",
  459. "stroke-linecap": "round"
  460. })
  461. ]))
  462. ])
  463. ]),
  464. vue.createElementVNode("button", {
  465. class: "login-btn",
  466. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  467. }, "登 录"),
  468. vue.createElementVNode("view", { class: "agreement" }, [
  469. vue.createElementVNode(
  470. "view",
  471. {
  472. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  473. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  474. },
  475. [
  476. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  477. key: 0,
  478. class: "check-mark"
  479. }, "✓")) : vue.createCommentVNode("v-if", true)
  480. ],
  481. 2
  482. /* CLASS */
  483. ),
  484. vue.createElementVNode("text", { class: "agree-text" }, [
  485. vue.createTextVNode(" 我已经阅读并同意 "),
  486. vue.createElementVNode("text", {
  487. class: "link",
  488. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  489. }, "《用户服务协议》"),
  490. vue.createTextVNode(" 和 "),
  491. vue.createElementVNode("text", {
  492. class: "link",
  493. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  494. }, "《隐私政策》")
  495. ])
  496. ])
  497. ]),
  498. vue.createElementVNode("view", {
  499. class: "footer-recruit",
  500. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  501. }, [
  502. vue.createElementVNode("view", { class: "recruit-badge" }, [
  503. (vue.openBlock(), vue.createElementBlock("svg", {
  504. class: "svg-icon flag-icon",
  505. viewBox: "0 0 24 24",
  506. fill: "none",
  507. xmlns: "http://www.w3.org/2000/svg",
  508. style: { "width": "30rpx", "height": "30rpx" }
  509. }, [
  510. vue.createElementVNode("path", {
  511. d: "M4 14V4H18L17 9L18 14H4Z",
  512. stroke: "#FF5722",
  513. "stroke-width": "2",
  514. "stroke-linejoin": "round"
  515. }),
  516. vue.createElementVNode("path", {
  517. d: "M4 22V14",
  518. stroke: "#FF5722",
  519. "stroke-width": "2",
  520. "stroke-linecap": "round"
  521. })
  522. ])),
  523. vue.createElementVNode("text", null, " 宠宝履约者招募")
  524. ])
  525. ]),
  526. vue.createVNode(_component_privacy_popup, {
  527. visible: _ctx.showAgreementModal,
  528. title: _ctx.agreementTitle,
  529. content: _ctx.agreementContent,
  530. onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
  531. }, null, 8, ["visible", "title", "content"])
  532. ])
  533. ]);
  534. }
  535. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  536. const logic$8 = {
  537. data() {
  538. return {
  539. statusBarHeight: 20
  540. // 默认状态栏高度
  541. };
  542. },
  543. onLoad() {
  544. const sysInfo = uni.getSystemInfoSync();
  545. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  546. },
  547. methods: {
  548. goBack() {
  549. const pages = getCurrentPages();
  550. if (pages.length > 1) {
  551. uni.navigateBack();
  552. } else {
  553. uni.reLaunch({
  554. url: "/pages/login/login"
  555. });
  556. }
  557. },
  558. goToForm() {
  559. uni.navigateTo({
  560. url: "/pages/recruit/form"
  561. });
  562. }
  563. }
  564. };
  565. const _sfc_main$B = logic$8;
  566. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  567. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  568. vue.createElementVNode(
  569. "view",
  570. {
  571. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  572. },
  573. null,
  574. 4
  575. /* STYLE */
  576. ),
  577. vue.createElementVNode("view", { class: "nav-bar" }, [
  578. vue.createElementVNode("view", {
  579. class: "back-icon",
  580. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  581. }, "‹")
  582. ]),
  583. vue.createElementVNode("view", { class: "header-area" }, [
  584. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  585. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  586. ]),
  587. vue.createElementVNode("view", { class: "content-card" }, [
  588. vue.createElementVNode("view", { class: "benefit-item" }, [
  589. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  590. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  591. ]),
  592. vue.createElementVNode("view", { class: "info" }, [
  593. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  594. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  595. ])
  596. ]),
  597. vue.createElementVNode("view", { class: "benefit-item" }, [
  598. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  599. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  600. ]),
  601. vue.createElementVNode("view", { class: "info" }, [
  602. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  603. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  604. ])
  605. ]),
  606. vue.createElementVNode("view", { class: "benefit-item" }, [
  607. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  608. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  609. ]),
  610. vue.createElementVNode("view", { class: "info" }, [
  611. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  612. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  613. ])
  614. ])
  615. ]),
  616. vue.createElementVNode("view", { class: "footer-area" }, [
  617. vue.createElementVNode("button", {
  618. class: "join-btn",
  619. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  620. }, "我要加入"),
  621. vue.createElementVNode("view", { class: "faq" }, [
  622. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  623. vue.createTextVNode(" 常见问题 ")
  624. ])
  625. ])
  626. ]);
  627. }
  628. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  629. function getMyProfile() {
  630. return request({
  631. url: "/fulfiller/fulfiller/my",
  632. method: "GET"
  633. });
  634. }
  635. function submitAudit(data) {
  636. return request({
  637. url: "/fulfiller/app/audit/submit",
  638. method: "POST",
  639. needToken: false,
  640. data
  641. });
  642. }
  643. function getServiceTypes() {
  644. return request({
  645. url: "/fulfiller/app/service/list",
  646. method: "GET",
  647. needToken: false
  648. });
  649. }
  650. function getAreaChildren(parentId = 0) {
  651. return request({
  652. url: "/fulfiller/app/area/children",
  653. method: "GET",
  654. needToken: false,
  655. data: { parentId }
  656. });
  657. }
  658. function uploadFile(filePath) {
  659. return new Promise((resolve, reject) => {
  660. const token = uni.getStorageSync("fulfiller_token");
  661. uni.uploadFile({
  662. url: BASE_URL + "/fulfiller/app/upload",
  663. filePath,
  664. name: "file",
  665. header: {
  666. "clientid": CLIENT_ID,
  667. "X-Platform-Code": PLATFORM_CODE,
  668. "Authorization": token ? `Bearer ${token}` : ""
  669. },
  670. success: (res) => {
  671. try {
  672. const data = JSON.parse(res.data);
  673. if (data.code === 200) {
  674. resolve(data);
  675. } else {
  676. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  677. reject(data);
  678. }
  679. } catch (e) {
  680. reject(e);
  681. }
  682. },
  683. fail: (err) => {
  684. uni.showToast({ title: "上传失败", icon: "none" });
  685. reject(err);
  686. }
  687. });
  688. });
  689. }
  690. function updateAvatar(avatar) {
  691. return request({
  692. url: "/fulfiller/fulfiller/my/avatar",
  693. method: "PUT",
  694. data: { avatar }
  695. });
  696. }
  697. function updateName(name) {
  698. return request({
  699. url: "/fulfiller/fulfiller/my/name",
  700. method: "PUT",
  701. data: { name }
  702. });
  703. }
  704. function updateStatus(status) {
  705. return request({
  706. url: "/fulfiller/fulfiller/my/status",
  707. method: "PUT",
  708. data: { status }
  709. });
  710. }
  711. function updateCity(cityCode, cityName) {
  712. return request({
  713. url: "/fulfiller/fulfiller/my/city",
  714. method: "PUT",
  715. data: { cityCode, cityName }
  716. });
  717. }
  718. function getAuthInfo() {
  719. return request({
  720. url: "/fulfiller/fulfiller/my/auth",
  721. method: "GET"
  722. });
  723. }
  724. function updatePhone(phone, code) {
  725. return request({
  726. url: "/fulfiller/fulfiller/my/phone",
  727. method: "PUT",
  728. data: { phone, code }
  729. });
  730. }
  731. function updatePassword(oldPassword, newPassword) {
  732. return request({
  733. url: "/fulfiller/fulfiller/my/password",
  734. method: "PUT",
  735. data: { oldPassword, newPassword }
  736. });
  737. }
  738. function deleteAccount() {
  739. return request({
  740. url: "/fulfiller/fulfiller/my/account",
  741. method: "DELETE"
  742. });
  743. }
  744. function updateAuthInfo(data) {
  745. return request({
  746. url: "/fulfiller/fulfiller/my/auth",
  747. method: "POST",
  748. data
  749. });
  750. }
  751. function getPendingOrders(params) {
  752. return request({
  753. url: "/order/subOrder/listPendingAccept",
  754. method: "GET",
  755. data: params
  756. });
  757. }
  758. function acceptOrder(orderId) {
  759. return request({
  760. url: "/order/subOrder/accept",
  761. method: "PUT",
  762. data: { orderId }
  763. });
  764. }
  765. function getOrderCount() {
  766. return request({
  767. url: "/order/subOrder/count",
  768. method: "GET"
  769. });
  770. }
  771. function getMyOrders(params) {
  772. return request({
  773. url: "/order/subOrder/listOnMyOrder",
  774. method: "GET",
  775. data: params
  776. });
  777. }
  778. function getOrderInfo(id) {
  779. return request({
  780. url: `/order/subOrder/getInfo?id=${id}`,
  781. method: "GET"
  782. });
  783. }
  784. function getOrderLogs(orderId) {
  785. return request({
  786. url: `/order/subOrderLog/list?orderId=${orderId}`,
  787. method: "GET"
  788. });
  789. }
  790. function clockIn(data) {
  791. return request({
  792. url: "/order/subOrder/clockIn",
  793. method: "PUT",
  794. data
  795. });
  796. }
  797. function uploadAnamaly(data) {
  798. return request({
  799. url: "/fulfiller/anamaly/upload",
  800. method: "POST",
  801. data
  802. });
  803. }
  804. function getAnomalyList(orderId) {
  805. return request({
  806. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  807. method: "GET"
  808. });
  809. }
  810. function submitNursingSummary(data) {
  811. return request({
  812. url: "/order/subOrder/nursingSummary",
  813. method: "PUT",
  814. data
  815. });
  816. }
  817. const logic$7 = {
  818. data() {
  819. return {
  820. formData: {
  821. mobile: "",
  822. code: "",
  823. name: "",
  824. gender: 1,
  825. // 1男 2女
  826. birthday: "",
  827. password: "",
  828. serviceType: [],
  829. city: "",
  830. station: "",
  831. stationId: null
  832. },
  833. showPwd: false,
  834. isAgreed: false,
  835. serviceTypes: [],
  836. // 验证码倒计时
  837. countDown: 0,
  838. timer: null,
  839. // 日期选择器相关
  840. showPicker: false,
  841. years: [],
  842. months: [],
  843. days: [],
  844. pickerValue: [0, 0, 0],
  845. tempYear: 0,
  846. tempMonth: 0,
  847. tempDay: 0,
  848. // 城市选择器相关(从后端加载)
  849. showCityPicker: false,
  850. selectStep: 0,
  851. selectedPathway: [],
  852. currentList: [],
  853. selectedCityId: null,
  854. // 站点选择器相关(从后端加载)
  855. showStationPicker: false,
  856. stationList: [],
  857. // 协议弹窗
  858. showPrivacy: false,
  859. privacyTitle: "",
  860. privacyContent: ""
  861. };
  862. },
  863. created() {
  864. this.initDateData();
  865. this.loadServiceTypes();
  866. },
  867. beforeDestroy() {
  868. if (this.timer)
  869. clearInterval(this.timer);
  870. },
  871. methods: {
  872. initDateData() {
  873. const now = /* @__PURE__ */ new Date();
  874. const currentYear = now.getFullYear();
  875. for (let i = 1980; i <= currentYear + 5; i++) {
  876. this.years.push(i);
  877. }
  878. for (let i = 1; i <= 12; i++) {
  879. this.months.push(i);
  880. }
  881. for (let i = 1; i <= 31; i++) {
  882. this.days.push(i);
  883. }
  884. },
  885. // 打开选择器
  886. openPicker() {
  887. const dateStr = this.formData.birthday || "2000-01-01";
  888. const [y, m, d] = dateStr.split("-").map(Number);
  889. const yIndex = this.years.indexOf(y);
  890. const mIndex = this.months.indexOf(m);
  891. const dIndex = this.days.indexOf(d);
  892. this.pickerValue = [
  893. yIndex > -1 ? yIndex : 0,
  894. mIndex > -1 ? mIndex : 0,
  895. dIndex > -1 ? dIndex : 0
  896. ];
  897. this.tempYear = this.years[this.pickerValue[0]];
  898. this.tempMonth = this.months[this.pickerValue[1]];
  899. this.tempDay = this.days[this.pickerValue[2]];
  900. this.showPicker = true;
  901. },
  902. closePicker() {
  903. this.showPicker = false;
  904. },
  905. onPickerChange(e) {
  906. const val = e.detail.value;
  907. this.tempYear = this.years[val[0]];
  908. this.tempMonth = this.months[val[1]];
  909. this.tempDay = this.days[val[2]];
  910. },
  911. confirmPicker() {
  912. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  913. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  914. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  915. this.closePicker();
  916. },
  917. async loadServiceTypes() {
  918. try {
  919. const res = await getServiceTypes();
  920. this.serviceTypes = (res.data || []).map((item) => ({
  921. id: item.id,
  922. name: item.name
  923. }));
  924. } catch (err) {
  925. formatAppLog("error", "at pages/recruit/logic.js:131", "加载服务类型失败:", err);
  926. this.serviceTypes = [];
  927. }
  928. },
  929. toggleService(item) {
  930. const idx = this.formData.serviceType.indexOf(item.id);
  931. if (idx > -1) {
  932. this.formData.serviceType.splice(idx, 1);
  933. } else {
  934. this.formData.serviceType.push(item.id);
  935. }
  936. },
  937. // 验证码
  938. /* async getVerifyCode() {
  939. if (this.countDown > 0) return;
  940. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  941. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  942. return;
  943. }
  944. try {
  945. const res = await sendSmsCode(this.formData.mobile);
  946. this.countDown = 60;
  947. this.timer = setInterval(() => {
  948. this.countDown--;
  949. if (this.countDown <= 0) clearInterval(this.timer);
  950. }, 1000);
  951. // TODO 【生产环境必须删除】开发模式自动填入验证码
  952. const devCode = res.data;
  953. if (devCode) {
  954. this.formData.code = devCode;
  955. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  956. } else {
  957. uni.showToast({ title: '验证码已发送', icon: 'none' });
  958. }
  959. } catch (err) {
  960. __f__('error','at pages/recruit/logic.js:168','发送验证码失败:', err);
  961. }
  962. }, */
  963. // 城市选择器 logic(从后端加载)
  964. async openCityPicker() {
  965. this.showCityPicker = true;
  966. if (this.selectedPathway.length === 0) {
  967. await this.resetCityPicker();
  968. }
  969. },
  970. async resetCityPicker() {
  971. this.selectStep = 0;
  972. this.selectedPathway = [];
  973. await this.loadAreaChildren(0);
  974. },
  975. closeCityPicker() {
  976. this.showCityPicker = false;
  977. },
  978. async loadAreaChildren(parentId) {
  979. try {
  980. const res = await getAreaChildren(parentId);
  981. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  982. id: item.id,
  983. name: item.name,
  984. type: item.type,
  985. parentId: item.parentId
  986. }));
  987. } catch (err) {
  988. formatAppLog("error", "at pages/recruit/logic.js:200", "加载区域数据失败:", err);
  989. this.currentList = [];
  990. }
  991. },
  992. async selectCityItem(item) {
  993. this.selectedPathway[this.selectStep] = item;
  994. if (item.type === 0) {
  995. this.selectStep++;
  996. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  997. await this.loadAreaChildren(item.id);
  998. if (this.currentList.length === 0) {
  999. this.selectedCityId = item.id;
  1000. this.confirmCity();
  1001. }
  1002. } else {
  1003. this.selectedCityId = item.id;
  1004. this.confirmCity();
  1005. }
  1006. },
  1007. async jumpToStep(step) {
  1008. this.selectStep = step;
  1009. if (step === 0) {
  1010. await this.loadAreaChildren(0);
  1011. } else {
  1012. const parent = this.selectedPathway[step - 1];
  1013. if (parent) {
  1014. await this.loadAreaChildren(parent.id);
  1015. }
  1016. }
  1017. },
  1018. confirmCity() {
  1019. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1020. this.formData.city = fullPath;
  1021. this.formData.station = "";
  1022. this.formData.stationId = null;
  1023. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1024. if (lastSelected) {
  1025. this.loadStations(lastSelected.id);
  1026. }
  1027. this.closeCityPicker();
  1028. },
  1029. // 站点选择器(从后端加载,只取type=2的站点)
  1030. async loadStations(parentId) {
  1031. try {
  1032. const res = await getAreaChildren(parentId);
  1033. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1034. id: item.id,
  1035. name: item.name
  1036. }));
  1037. } catch (err) {
  1038. formatAppLog("error", "at pages/recruit/logic.js:259", "加载站点数据失败:", err);
  1039. this.stationList = [];
  1040. }
  1041. },
  1042. openStationPicker() {
  1043. if (this.stationList.length === 0) {
  1044. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1045. return;
  1046. }
  1047. this.showStationPicker = true;
  1048. },
  1049. closeStationPicker() {
  1050. this.showStationPicker = false;
  1051. },
  1052. selectStation(item) {
  1053. this.formData.station = item.name;
  1054. this.formData.stationId = item.id;
  1055. this.closeStationPicker();
  1056. },
  1057. openPrivacy() {
  1058. this.privacyTitle = "宠宝履约者说明";
  1059. this.privacyContent = "1. 履约职责\n作为宠宝履约者,您需要按照平台标准完成宠物接送、喂遛或洗护服务,确保宠物安全与健康。\n\n2. 结算方式\n服务费用将根据订单类型和距离计算,定期结算至您的账户。具体结算周期请查看钱包说明。\n\n3. 行为规范\n请在这个过程中保持专业,穿着整洁,礼貌待人。严禁虐待宠物,违反者将承担法律责任。";
  1060. this.showPrivacy = true;
  1061. },
  1062. goToAuth() {
  1063. if (!this.isAgreed) {
  1064. uni.showToast({ title: "请勾选协议", icon: "none" });
  1065. return;
  1066. }
  1067. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1068. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1069. return;
  1070. }
  1071. if (!this.formData.name) {
  1072. uni.showToast({ title: "请输入姓名", icon: "none" });
  1073. return;
  1074. }
  1075. if (this.formData.serviceType.length === 0) {
  1076. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1077. return;
  1078. }
  1079. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1080. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1081. const services = JSON.stringify(selectedServices);
  1082. uni.navigateTo({
  1083. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1084. });
  1085. }
  1086. }
  1087. };
  1088. const _sfc_main$A = {
  1089. ...logic$7,
  1090. components: {
  1091. PrivacyPopup: __easycom_0
  1092. }
  1093. };
  1094. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1095. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  1096. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1097. vue.createElementVNode("view", { class: "card" }, [
  1098. vue.createElementVNode("view", { class: "form-item" }, [
  1099. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1100. vue.createElementVNode("view", { class: "input-box" }, [
  1101. vue.createElementVNode("view", { class: "prefix-area" }, [
  1102. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1103. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1104. ]),
  1105. vue.withDirectives(vue.createElementVNode(
  1106. "input",
  1107. {
  1108. class: "input",
  1109. type: "number",
  1110. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1111. },
  1112. null,
  1113. 512
  1114. /* NEED_PATCH */
  1115. ), [
  1116. [vue.vModelText, _ctx.formData.mobile]
  1117. ])
  1118. ])
  1119. ]),
  1120. vue.createElementVNode("view", { class: "form-item" }, [
  1121. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1122. vue.createElementVNode("view", { class: "input-box" }, [
  1123. vue.withDirectives(vue.createElementVNode(
  1124. "input",
  1125. {
  1126. class: "input",
  1127. type: "text",
  1128. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
  1129. },
  1130. null,
  1131. 512
  1132. /* NEED_PATCH */
  1133. ), [
  1134. [vue.vModelText, _ctx.formData.name]
  1135. ])
  1136. ])
  1137. ]),
  1138. vue.createElementVNode("view", { class: "form-item" }, [
  1139. vue.createElementVNode("text", { class: "label" }, "性别"),
  1140. vue.createElementVNode("view", { class: "gender-group" }, [
  1141. vue.createElementVNode("view", {
  1142. class: "radio-item",
  1143. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
  1144. }, [
  1145. vue.createElementVNode(
  1146. "text",
  1147. {
  1148. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1149. },
  1150. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1151. 3
  1152. /* TEXT, CLASS */
  1153. ),
  1154. vue.createElementVNode(
  1155. "text",
  1156. {
  1157. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1158. },
  1159. " 男",
  1160. 2
  1161. /* CLASS */
  1162. )
  1163. ]),
  1164. vue.createElementVNode("view", {
  1165. class: "radio-item",
  1166. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
  1167. }, [
  1168. vue.createElementVNode(
  1169. "text",
  1170. {
  1171. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1172. },
  1173. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1174. 3
  1175. /* TEXT, CLASS */
  1176. ),
  1177. vue.createElementVNode(
  1178. "text",
  1179. {
  1180. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1181. },
  1182. " 女",
  1183. 2
  1184. /* CLASS */
  1185. )
  1186. ])
  1187. ])
  1188. ]),
  1189. vue.createElementVNode("view", { class: "form-item" }, [
  1190. vue.createElementVNode("text", { class: "label" }, "生日"),
  1191. vue.createElementVNode("view", {
  1192. class: "input-box",
  1193. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1194. }, [
  1195. vue.createElementVNode(
  1196. "text",
  1197. null,
  1198. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1199. 1
  1200. /* TEXT */
  1201. ),
  1202. (vue.openBlock(), vue.createElementBlock("svg", {
  1203. class: "arrow-right",
  1204. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1205. viewBox: "0 0 1024 1024",
  1206. version: "1.1",
  1207. xmlns: "http://www.w3.org/2000/svg"
  1208. }, [
  1209. vue.createElementVNode("path", {
  1210. 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",
  1211. fill: "#CCCCCC"
  1212. })
  1213. ]))
  1214. ])
  1215. ]),
  1216. vue.createElementVNode("view", { class: "form-item" }, [
  1217. vue.createElementVNode("text", { class: "label" }, "密码"),
  1218. vue.createElementVNode("view", { class: "input-box" }, [
  1219. vue.withDirectives(vue.createElementVNode("input", {
  1220. class: "input",
  1221. password: !_ctx.showPwd,
  1222. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
  1223. placeholder: "设置登录密码"
  1224. }, null, 8, ["password"]), [
  1225. [vue.vModelText, _ctx.formData.password]
  1226. ]),
  1227. vue.createElementVNode("view", {
  1228. class: "monkey-icon",
  1229. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1230. }, [
  1231. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1232. key: 0,
  1233. class: "svg-icon",
  1234. viewBox: "0 0 24 24",
  1235. fill: "none",
  1236. xmlns: "http://www.w3.org/2000/svg"
  1237. }, [
  1238. vue.createElementVNode("path", {
  1239. 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",
  1240. fill: "#CCCCCC"
  1241. })
  1242. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1243. key: 1,
  1244. class: "svg-icon",
  1245. viewBox: "0 0 24 24",
  1246. fill: "none",
  1247. xmlns: "http://www.w3.org/2000/svg"
  1248. }, [
  1249. vue.createElementVNode("path", {
  1250. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1251. stroke: "#CCCCCC",
  1252. "stroke-width": "2",
  1253. "stroke-linecap": "round"
  1254. }),
  1255. vue.createElementVNode("path", {
  1256. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1257. stroke: "#CCCCCC",
  1258. "stroke-width": "2",
  1259. "stroke-linecap": "round"
  1260. }),
  1261. vue.createElementVNode("path", {
  1262. d: "M12 7V4",
  1263. stroke: "#CCCCCC",
  1264. "stroke-width": "2",
  1265. "stroke-linecap": "round"
  1266. }),
  1267. vue.createElementVNode("path", {
  1268. d: "M16 8L18 5",
  1269. stroke: "#CCCCCC",
  1270. "stroke-width": "2",
  1271. "stroke-linecap": "round"
  1272. }),
  1273. vue.createElementVNode("path", {
  1274. d: "M8 8L6 5",
  1275. stroke: "#CCCCCC",
  1276. "stroke-width": "2",
  1277. "stroke-linecap": "round"
  1278. }),
  1279. vue.createElementVNode("path", {
  1280. d: "M20 10L22 8",
  1281. stroke: "#CCCCCC",
  1282. "stroke-width": "2",
  1283. "stroke-linecap": "round"
  1284. }),
  1285. vue.createElementVNode("path", {
  1286. d: "M4 10L2 8",
  1287. stroke: "#CCCCCC",
  1288. "stroke-width": "2",
  1289. "stroke-linecap": "round"
  1290. })
  1291. ]))
  1292. ])
  1293. ])
  1294. ])
  1295. ]),
  1296. vue.createElementVNode("view", { class: "card" }, [
  1297. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1298. vue.createElementVNode("view", { class: "service-types" }, [
  1299. (vue.openBlock(true), vue.createElementBlock(
  1300. vue.Fragment,
  1301. null,
  1302. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1303. return vue.openBlock(), vue.createElementBlock("view", {
  1304. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1305. key: item.id,
  1306. onClick: ($event) => _ctx.toggleService(item)
  1307. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1308. }),
  1309. 128
  1310. /* KEYED_FRAGMENT */
  1311. ))
  1312. ]),
  1313. vue.createElementVNode("view", { class: "form-item" }, [
  1314. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1315. vue.createElementVNode("view", {
  1316. class: "input-box",
  1317. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1318. }, [
  1319. vue.createElementVNode(
  1320. "text",
  1321. {
  1322. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1323. },
  1324. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1325. 5
  1326. /* TEXT, STYLE */
  1327. ),
  1328. (vue.openBlock(), vue.createElementBlock("svg", {
  1329. class: "arrow-right",
  1330. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1331. viewBox: "0 0 1024 1024",
  1332. version: "1.1",
  1333. xmlns: "http://www.w3.org/2000/svg"
  1334. }, [
  1335. vue.createElementVNode("path", {
  1336. 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",
  1337. fill: "#CCCCCC"
  1338. })
  1339. ]))
  1340. ])
  1341. ]),
  1342. vue.createElementVNode("view", { class: "form-item" }, [
  1343. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1344. vue.createElementVNode("view", {
  1345. class: "input-box",
  1346. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1347. }, [
  1348. vue.createElementVNode(
  1349. "text",
  1350. {
  1351. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1352. },
  1353. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1354. 5
  1355. /* TEXT, STYLE */
  1356. ),
  1357. (vue.openBlock(), vue.createElementBlock("svg", {
  1358. class: "arrow-right",
  1359. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1360. viewBox: "0 0 1024 1024",
  1361. version: "1.1",
  1362. xmlns: "http://www.w3.org/2000/svg"
  1363. }, [
  1364. vue.createElementVNode("path", {
  1365. 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",
  1366. fill: "#CCCCCC"
  1367. })
  1368. ]))
  1369. ])
  1370. ])
  1371. ]),
  1372. vue.createElementVNode(
  1373. "view",
  1374. {
  1375. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1376. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1377. },
  1378. [
  1379. vue.createElementVNode("view", {
  1380. class: "picker-content",
  1381. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  1382. }, ["stop"]))
  1383. }, [
  1384. vue.createElementVNode("view", { class: "picker-header" }, [
  1385. vue.createElementVNode("text", {
  1386. class: "picker-btn-cancel",
  1387. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1388. }, "取消"),
  1389. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1390. vue.createElementVNode("text", {
  1391. class: "picker-btn-confirm",
  1392. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1393. }, "确定")
  1394. ]),
  1395. vue.createElementVNode("view", { class: "picker-body" }, [
  1396. vue.createElementVNode("view", { class: "timeline-area" }, [
  1397. (vue.openBlock(true), vue.createElementBlock(
  1398. vue.Fragment,
  1399. null,
  1400. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1401. return vue.openBlock(), vue.createElementBlock("view", {
  1402. class: "timeline-item",
  1403. key: index,
  1404. onClick: ($event) => _ctx.jumpToStep(index)
  1405. }, [
  1406. vue.createElementVNode("view", { class: "timeline-dot" }),
  1407. vue.createElementVNode(
  1408. "text",
  1409. null,
  1410. vue.toDisplayString(item.name),
  1411. 1
  1412. /* TEXT */
  1413. )
  1414. ], 8, ["onClick"]);
  1415. }),
  1416. 128
  1417. /* KEYED_FRAGMENT */
  1418. )),
  1419. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1420. key: 0,
  1421. class: "timeline-item active"
  1422. }, [
  1423. vue.createElementVNode("view", { class: "timeline-dot" }),
  1424. vue.createElementVNode("text", null, "请选择")
  1425. ])) : vue.createCommentVNode("v-if", true)
  1426. ]),
  1427. vue.createElementVNode("scroll-view", {
  1428. "scroll-y": "",
  1429. class: "list-area"
  1430. }, [
  1431. (vue.openBlock(true), vue.createElementBlock(
  1432. vue.Fragment,
  1433. null,
  1434. vue.renderList(_ctx.currentList, (item, index) => {
  1435. return vue.openBlock(), vue.createElementBlock("view", {
  1436. class: "list-item",
  1437. key: item.id,
  1438. onClick: ($event) => _ctx.selectCityItem(item)
  1439. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1440. }),
  1441. 128
  1442. /* KEYED_FRAGMENT */
  1443. )),
  1444. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1445. key: 0,
  1446. style: { "padding": "20rpx", "color": "#999" }
  1447. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1448. ])
  1449. ])
  1450. ])
  1451. ],
  1452. 2
  1453. /* CLASS */
  1454. ),
  1455. vue.createElementVNode(
  1456. "view",
  1457. {
  1458. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1459. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1460. },
  1461. [
  1462. vue.createElementVNode("view", {
  1463. class: "picker-content",
  1464. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  1465. }, ["stop"]))
  1466. }, [
  1467. vue.createElementVNode("view", {
  1468. class: "picker-header",
  1469. style: { "justify-content": "center", "position": "relative" }
  1470. }, [
  1471. vue.createElementVNode("text", {
  1472. class: "picker-btn-cancel",
  1473. style: { "position": "absolute", "left": "30rpx" },
  1474. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1475. }, "取消"),
  1476. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1477. ]),
  1478. vue.createElementVNode("scroll-view", {
  1479. "scroll-y": "",
  1480. class: "picker-list"
  1481. }, [
  1482. (vue.openBlock(true), vue.createElementBlock(
  1483. vue.Fragment,
  1484. null,
  1485. vue.renderList(_ctx.stationList, (item, index) => {
  1486. return vue.openBlock(), vue.createElementBlock("view", {
  1487. class: "station-item",
  1488. key: index,
  1489. onClick: ($event) => _ctx.selectStation(item)
  1490. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1491. }),
  1492. 128
  1493. /* KEYED_FRAGMENT */
  1494. ))
  1495. ])
  1496. ])
  1497. ],
  1498. 2
  1499. /* CLASS */
  1500. ),
  1501. vue.createElementVNode("view", { class: "footer-actions" }, [
  1502. vue.createElementVNode("view", { class: "agreement-row" }, [
  1503. vue.createElementVNode(
  1504. "view",
  1505. {
  1506. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1507. onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1508. },
  1509. [
  1510. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1511. key: 0,
  1512. class: "check-mark"
  1513. }, "✓")) : vue.createCommentVNode("v-if", true)
  1514. ],
  1515. 2
  1516. /* CLASS */
  1517. ),
  1518. vue.createElementVNode("text", { class: "agree-text" }, [
  1519. vue.createTextVNode("我已阅读并同意 "),
  1520. vue.createElementVNode("text", {
  1521. style: { "color": "#2979ff" },
  1522. onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1523. }, "《宠宝履约者说明》")
  1524. ])
  1525. ]),
  1526. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1527. vue.createElementVNode("button", {
  1528. class: "submit-btn",
  1529. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1530. }, "下一步,实名认证")
  1531. ])
  1532. ]),
  1533. vue.createElementVNode(
  1534. "view",
  1535. {
  1536. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1537. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1538. },
  1539. [
  1540. vue.createElementVNode("view", {
  1541. class: "picker-content",
  1542. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  1543. }, ["stop"]))
  1544. }, [
  1545. vue.createElementVNode("view", { class: "picker-header" }, [
  1546. vue.createElementVNode("text", {
  1547. class: "picker-btn-cancel",
  1548. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1549. }, "取消"),
  1550. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1551. vue.createElementVNode("text", {
  1552. class: "picker-btn-confirm",
  1553. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1554. }, "确定")
  1555. ]),
  1556. vue.createElementVNode("picker-view", {
  1557. class: "picker-view",
  1558. "indicator-style": "height: 50px;",
  1559. value: _ctx.pickerValue,
  1560. onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1561. }, [
  1562. vue.createElementVNode("picker-view-column", null, [
  1563. (vue.openBlock(true), vue.createElementBlock(
  1564. vue.Fragment,
  1565. null,
  1566. vue.renderList(_ctx.years, (item, index) => {
  1567. return vue.openBlock(), vue.createElementBlock(
  1568. "view",
  1569. {
  1570. class: "picker-item",
  1571. key: index
  1572. },
  1573. vue.toDisplayString(item) + "年",
  1574. 1
  1575. /* TEXT */
  1576. );
  1577. }),
  1578. 128
  1579. /* KEYED_FRAGMENT */
  1580. ))
  1581. ]),
  1582. vue.createElementVNode("picker-view-column", null, [
  1583. (vue.openBlock(true), vue.createElementBlock(
  1584. vue.Fragment,
  1585. null,
  1586. vue.renderList(_ctx.months, (item, index) => {
  1587. return vue.openBlock(), vue.createElementBlock(
  1588. "view",
  1589. {
  1590. class: "picker-item",
  1591. key: index
  1592. },
  1593. vue.toDisplayString(item) + "月",
  1594. 1
  1595. /* TEXT */
  1596. );
  1597. }),
  1598. 128
  1599. /* KEYED_FRAGMENT */
  1600. ))
  1601. ]),
  1602. vue.createElementVNode("picker-view-column", null, [
  1603. (vue.openBlock(true), vue.createElementBlock(
  1604. vue.Fragment,
  1605. null,
  1606. vue.renderList(_ctx.days, (item, index) => {
  1607. return vue.openBlock(), vue.createElementBlock(
  1608. "view",
  1609. {
  1610. class: "picker-item",
  1611. key: index
  1612. },
  1613. vue.toDisplayString(item) + "日",
  1614. 1
  1615. /* TEXT */
  1616. );
  1617. }),
  1618. 128
  1619. /* KEYED_FRAGMENT */
  1620. ))
  1621. ])
  1622. ], 40, ["value"])
  1623. ])
  1624. ],
  1625. 2
  1626. /* CLASS */
  1627. ),
  1628. vue.createVNode(_component_privacy_popup, {
  1629. visible: _ctx.showPrivacy,
  1630. title: _ctx.privacyTitle,
  1631. content: _ctx.privacyContent,
  1632. onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
  1633. }, null, 8, ["visible", "title", "content"])
  1634. ]);
  1635. }
  1636. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1637. const logic$6 = {
  1638. data() {
  1639. return {
  1640. formData: {
  1641. idType: "居民身份证",
  1642. name: "",
  1643. idNumber: "",
  1644. expiryDate: ""
  1645. },
  1646. idCardFront: "",
  1647. // 身份证正面本地预览路径
  1648. idCardBack: "",
  1649. // 身份证反面本地预览路径
  1650. idCardFrontOssId: "",
  1651. // 身份证正面 OSS ID
  1652. idCardBackOssId: "",
  1653. // 身份证反面 OSS ID
  1654. showDatePicker: false,
  1655. pickerValue: [0, 0, 0],
  1656. // YYYY-MM-DD
  1657. years: [],
  1658. months: [],
  1659. days: [],
  1660. serviceType: []
  1661. // 接收上一页的服务类型
  1662. };
  1663. },
  1664. onLoad(options) {
  1665. if (options.services) {
  1666. try {
  1667. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1668. } catch (e) {
  1669. formatAppLog("error", "at pages/recruit/auth_logic.js:29", "Parse services failed", e);
  1670. }
  1671. }
  1672. this.initDateData();
  1673. this.restoreAuthData();
  1674. },
  1675. methods: {
  1676. // --- 日期选择器逻辑 (简化版, 仅示意) ---
  1677. initDateData() {
  1678. const date = /* @__PURE__ */ new Date();
  1679. const year = date.getFullYear();
  1680. for (let i = year; i <= year + 20; i++) {
  1681. this.years.push(i);
  1682. }
  1683. for (let i = 1; i <= 12; i++) {
  1684. this.months.push(i);
  1685. }
  1686. for (let i = 1; i <= 31; i++) {
  1687. this.days.push(i);
  1688. }
  1689. },
  1690. openDatePicker() {
  1691. },
  1692. onDateChange(e) {
  1693. this.formData.expiryDate = e.detail.value;
  1694. },
  1695. // --- 数据持久化(防止返回上一级丢失) ---
  1696. restoreAuthData() {
  1697. try {
  1698. const saved = uni.getStorageSync("recruit_auth_data");
  1699. if (saved) {
  1700. const d = JSON.parse(saved);
  1701. this.formData.name = d.name || "";
  1702. this.formData.idNumber = d.idNumber || "";
  1703. this.formData.expiryDate = d.expiryDate || "";
  1704. this.idCardFront = d.idCardFront || "";
  1705. this.idCardBack = d.idCardBack || "";
  1706. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1707. this.idCardBackOssId = d.idCardBackOssId || "";
  1708. }
  1709. } catch (e) {
  1710. formatAppLog("error", "at pages/recruit/auth_logic.js:76", "恢复认证数据失败", e);
  1711. }
  1712. },
  1713. saveAuthData() {
  1714. try {
  1715. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1716. name: this.formData.name,
  1717. idNumber: this.formData.idNumber,
  1718. expiryDate: this.formData.expiryDate,
  1719. idCardFront: this.idCardFront,
  1720. idCardBack: this.idCardBack,
  1721. idCardFrontOssId: this.idCardFrontOssId,
  1722. idCardBackOssId: this.idCardBackOssId
  1723. }));
  1724. } catch (e) {
  1725. formatAppLog("error", "at pages/recruit/auth_logic.js:91", "保存认证数据失败", e);
  1726. }
  1727. },
  1728. // --- 图片上传(选择后自动上传到OSS) ---
  1729. chooseImage(side) {
  1730. uni.chooseImage({
  1731. count: 1,
  1732. sizeType: ["compressed"],
  1733. sourceType: ["album", "camera"],
  1734. success: async (res) => {
  1735. const tempPath = res.tempFilePaths[0];
  1736. if (side === "front") {
  1737. this.idCardFront = tempPath;
  1738. } else {
  1739. this.idCardBack = tempPath;
  1740. }
  1741. try {
  1742. uni.showLoading({ title: "上传中..." });
  1743. const uploadRes = await uploadFile(tempPath);
  1744. if (side === "front") {
  1745. this.idCardFrontOssId = uploadRes.data.ossId;
  1746. } else {
  1747. this.idCardBackOssId = uploadRes.data.ossId;
  1748. }
  1749. uni.hideLoading();
  1750. this.saveAuthData();
  1751. } catch (err) {
  1752. uni.hideLoading();
  1753. formatAppLog("error", "at pages/recruit/auth_logic.js:121", "上传身份证图片失败:", err);
  1754. }
  1755. }
  1756. });
  1757. },
  1758. // --- 提交 ---
  1759. goToQualifications() {
  1760. this.saveAuthData();
  1761. try {
  1762. const stored = uni.getStorageSync("recruit_form_data");
  1763. if (stored) {
  1764. const data = JSON.parse(stored);
  1765. data.realName = this.formData.name;
  1766. data.idNumber = this.formData.idNumber;
  1767. data.expiryDate = this.formData.expiryDate;
  1768. data.idCardFrontOssId = this.idCardFrontOssId;
  1769. data.idCardBackOssId = this.idCardBackOssId;
  1770. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1771. }
  1772. } catch (e) {
  1773. formatAppLog("error", "at pages/recruit/auth_logic.js:158", "保存认证数据失败", e);
  1774. }
  1775. const services = JSON.stringify(this.serviceType);
  1776. uni.navigateTo({
  1777. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1778. });
  1779. }
  1780. }
  1781. };
  1782. const _sfc_main$z = logic$6;
  1783. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  1784. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1785. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1786. vue.createElementVNode("view", { class: "form-card" }, [
  1787. vue.createElementVNode("view", { class: "form-item" }, [
  1788. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1789. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1790. ]),
  1791. vue.createElementVNode("view", { class: "form-item" }, [
  1792. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1793. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1794. vue.withDirectives(vue.createElementVNode(
  1795. "input",
  1796. {
  1797. class: "input-area",
  1798. type: "text",
  1799. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1800. placeholder: "证件姓名",
  1801. "placeholder-class": "input-placeholder"
  1802. },
  1803. null,
  1804. 512
  1805. /* NEED_PATCH */
  1806. ), [
  1807. [vue.vModelText, _ctx.formData.name]
  1808. ])
  1809. ])
  1810. ]),
  1811. vue.createElementVNode("view", { class: "form-item" }, [
  1812. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1813. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1814. vue.withDirectives(vue.createElementVNode(
  1815. "input",
  1816. {
  1817. class: "input-area",
  1818. type: "idcard",
  1819. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1820. placeholder: "身份证号",
  1821. "placeholder-class": "input-placeholder"
  1822. },
  1823. null,
  1824. 512
  1825. /* NEED_PATCH */
  1826. ), [
  1827. [vue.vModelText, _ctx.formData.idNumber]
  1828. ])
  1829. ])
  1830. ]),
  1831. vue.createElementVNode("view", { class: "form-item" }, [
  1832. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1833. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1834. vue.createElementVNode(
  1835. "picker",
  1836. {
  1837. mode: "date",
  1838. onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onDateChange && _ctx.onDateChange(...args)),
  1839. style: { "width": "100%" }
  1840. },
  1841. [
  1842. vue.createElementVNode(
  1843. "view",
  1844. {
  1845. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1846. },
  1847. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1848. 3
  1849. /* TEXT, CLASS */
  1850. )
  1851. ],
  1852. 32
  1853. /* NEED_HYDRATION */
  1854. ),
  1855. (vue.openBlock(), vue.createElementBlock("svg", {
  1856. class: "arrow-right",
  1857. viewBox: "0 0 1024 1024",
  1858. version: "1.1",
  1859. xmlns: "http://www.w3.org/2000/svg"
  1860. }, [
  1861. vue.createElementVNode("path", {
  1862. 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",
  1863. fill: "#CCCCCC"
  1864. })
  1865. ]))
  1866. ])
  1867. ])
  1868. ]),
  1869. vue.createElementVNode("view", { class: "upload-card" }, [
  1870. vue.createElementVNode("view", {
  1871. class: "upload-box",
  1872. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  1873. }, [
  1874. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  1875. key: 0,
  1876. src: _ctx.idCardFront,
  1877. class: "preview-img",
  1878. mode: "aspectFill"
  1879. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1880. vue.Fragment,
  1881. { key: 1 },
  1882. [
  1883. (vue.openBlock(), vue.createElementBlock("svg", {
  1884. class: "camera-icon",
  1885. viewBox: "0 0 24 24",
  1886. fill: "none",
  1887. xmlns: "http://www.w3.org/2000/svg"
  1888. }, [
  1889. vue.createElementVNode("path", {
  1890. 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",
  1891. fill: "#E0E0E0"
  1892. }),
  1893. vue.createElementVNode("circle", {
  1894. cx: "12",
  1895. cy: "12",
  1896. r: "3",
  1897. stroke: "#CCCCCC",
  1898. "stroke-width": "2"
  1899. }),
  1900. vue.createElementVNode("path", {
  1901. 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",
  1902. fill: "#CCCCCC"
  1903. })
  1904. ])),
  1905. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1906. ],
  1907. 64
  1908. /* STABLE_FRAGMENT */
  1909. ))
  1910. ]),
  1911. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  1912. ]),
  1913. vue.createElementVNode("view", { class: "upload-card" }, [
  1914. vue.createElementVNode("view", {
  1915. class: "upload-box",
  1916. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  1917. }, [
  1918. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  1919. key: 0,
  1920. src: _ctx.idCardBack,
  1921. class: "preview-img",
  1922. mode: "aspectFill"
  1923. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  1924. vue.Fragment,
  1925. { key: 1 },
  1926. [
  1927. (vue.openBlock(), vue.createElementBlock("svg", {
  1928. class: "camera-icon",
  1929. viewBox: "0 0 24 24",
  1930. fill: "none",
  1931. xmlns: "http://www.w3.org/2000/svg"
  1932. }, [
  1933. vue.createElementVNode("path", {
  1934. 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",
  1935. fill: "#CCCCCC"
  1936. })
  1937. ])),
  1938. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  1939. ],
  1940. 64
  1941. /* STABLE_FRAGMENT */
  1942. ))
  1943. ]),
  1944. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  1945. ]),
  1946. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1947. vue.createElementVNode("button", {
  1948. class: "next-btn",
  1949. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  1950. }, "下一步,完善资质")
  1951. ])
  1952. ]);
  1953. }
  1954. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  1955. const logic$5 = {
  1956. data() {
  1957. return {
  1958. serviceTypes: [],
  1959. // 从上一页传递过来的服务类型列表
  1960. qualifications: {},
  1961. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  1962. qualOssIds: {}
  1963. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  1964. };
  1965. },
  1966. onLoad(options) {
  1967. if (options.services) {
  1968. try {
  1969. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  1970. this.serviceTypes.forEach((item) => {
  1971. this.qualifications[item.name] = [];
  1972. this.qualOssIds[item.name] = [];
  1973. });
  1974. } catch (e) {
  1975. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  1976. }
  1977. }
  1978. },
  1979. methods: {
  1980. chooseImage(serviceName) {
  1981. uni.chooseImage({
  1982. count: 9,
  1983. sizeType: ["compressed"],
  1984. sourceType: ["album", "camera"],
  1985. success: async (res) => {
  1986. if (!this.qualifications[serviceName]) {
  1987. this.qualifications[serviceName] = [];
  1988. this.qualOssIds[serviceName] = [];
  1989. }
  1990. for (const tempPath of res.tempFilePaths) {
  1991. this.qualifications[serviceName].push(tempPath);
  1992. this.$forceUpdate();
  1993. try {
  1994. const uploadRes = await uploadFile(tempPath);
  1995. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  1996. } catch (err) {
  1997. formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
  1998. }
  1999. }
  2000. }
  2001. });
  2002. },
  2003. deleteImage(serviceName, index) {
  2004. this.qualifications[serviceName].splice(index, 1);
  2005. if (this.qualOssIds[serviceName]) {
  2006. this.qualOssIds[serviceName].splice(index, 1);
  2007. }
  2008. this.$forceUpdate();
  2009. },
  2010. goBackToForm() {
  2011. const pages = getCurrentPages();
  2012. if (pages.length > 2) {
  2013. uni.navigateBack({
  2014. delta: 2
  2015. });
  2016. } else {
  2017. uni.reLaunch({
  2018. url: "/pages/recruit/form"
  2019. });
  2020. }
  2021. },
  2022. async submit() {
  2023. let recruitData = {};
  2024. try {
  2025. const stored = uni.getStorageSync("recruit_form_data");
  2026. if (stored) {
  2027. recruitData = JSON.parse(stored);
  2028. }
  2029. } catch (e) {
  2030. formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
  2031. }
  2032. const allQualOssIds = [];
  2033. Object.values(this.qualOssIds).forEach((ids) => {
  2034. allQualOssIds.push(...ids);
  2035. });
  2036. const auditData = {
  2037. name: recruitData.name || "",
  2038. phone: recruitData.mobile || "",
  2039. password: recruitData.password || "",
  2040. gender: recruitData.gender === 1 ? "0" : "1",
  2041. birthday: recruitData.birthday || "",
  2042. serviceTypes: (recruitData.serviceType || []).join(","),
  2043. // 逗号分隔的服务类型ID
  2044. city: recruitData.city || "",
  2045. stationId: recruitData.stationId || null,
  2046. realName: recruitData.realName || "",
  2047. idCard: recruitData.idNumber || "",
  2048. idValidDate: recruitData.expiryDate || "",
  2049. idCardFront: recruitData.idCardFrontOssId || null,
  2050. idCardBack: recruitData.idCardBackOssId || null,
  2051. qualifications: allQualOssIds.join(",")
  2052. // 逗号分隔的资质图片OSS ID
  2053. };
  2054. uni.showLoading({ title: "提交中..." });
  2055. try {
  2056. await submitAudit(auditData);
  2057. uni.hideLoading();
  2058. uni.reLaunch({
  2059. url: "/pages/recruit/success"
  2060. });
  2061. } catch (err) {
  2062. uni.hideLoading();
  2063. formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
  2064. }
  2065. }
  2066. }
  2067. };
  2068. const _sfc_main$y = logic$5;
  2069. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2070. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2071. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2072. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2073. key: 0,
  2074. class: "empty-state"
  2075. }, [
  2076. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2077. vue.createElementVNode("button", {
  2078. class: "back-btn",
  2079. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2080. }, "返回选择")
  2081. ])) : vue.createCommentVNode("v-if", true),
  2082. (vue.openBlock(true), vue.createElementBlock(
  2083. vue.Fragment,
  2084. null,
  2085. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2086. return vue.openBlock(), vue.createElementBlock("view", {
  2087. class: "qual-card",
  2088. key: item.id
  2089. }, [
  2090. vue.createElementVNode(
  2091. "view",
  2092. { class: "card-title" },
  2093. vue.toDisplayString(item.name) + "服务资质",
  2094. 1
  2095. /* TEXT */
  2096. ),
  2097. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2098. (vue.openBlock(true), vue.createElementBlock(
  2099. vue.Fragment,
  2100. null,
  2101. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2102. return vue.openBlock(), vue.createElementBlock("view", {
  2103. class: "img-item",
  2104. key: imgIndex
  2105. }, [
  2106. vue.createElementVNode("image", {
  2107. src: img,
  2108. class: "preview-img",
  2109. mode: "aspectFill",
  2110. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2111. }, null, 8, ["src", "onClick"]),
  2112. vue.createElementVNode("view", {
  2113. class: "delete-btn",
  2114. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2115. }, "×", 8, ["onClick"])
  2116. ]);
  2117. }),
  2118. 128
  2119. /* KEYED_FRAGMENT */
  2120. )),
  2121. vue.createElementVNode("view", {
  2122. class: "upload-box",
  2123. onClick: ($event) => _ctx.chooseImage(item.name)
  2124. }, [
  2125. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2126. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2127. ], 8, ["onClick"])
  2128. ])
  2129. ]);
  2130. }),
  2131. 128
  2132. /* KEYED_FRAGMENT */
  2133. )),
  2134. vue.createElementVNode("view", { class: "footer-actions" }, [
  2135. vue.createElementVNode("button", {
  2136. class: "submit-btn",
  2137. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2138. }, "立即提交")
  2139. ])
  2140. ]);
  2141. }
  2142. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2143. const logic$4 = {
  2144. data() {
  2145. return {
  2146. station: "民治街道第一站",
  2147. name: "张三哥",
  2148. phone: "+8613612345678"
  2149. };
  2150. },
  2151. methods: {
  2152. goHome() {
  2153. uni.reLaunch({
  2154. url: "/pages/login/login"
  2155. });
  2156. }
  2157. }
  2158. };
  2159. const _sfc_main$x = logic$4;
  2160. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2161. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2162. vue.createElementVNode("view", { class: "icon-area" }, [
  2163. (vue.openBlock(), vue.createElementBlock("svg", {
  2164. class: "success-icon",
  2165. viewBox: "0 0 1024 1024",
  2166. version: "1.1",
  2167. xmlns: "http://www.w3.org/2000/svg"
  2168. }, [
  2169. vue.createElementVNode("path", {
  2170. 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",
  2171. fill: "#64D01D"
  2172. }),
  2173. vue.createElementVNode("path", {
  2174. 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",
  2175. fill: "#64D01D"
  2176. })
  2177. ])),
  2178. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2179. ]),
  2180. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2181. vue.createElementVNode("view", { class: "info-card" }, [
  2182. vue.createElementVNode("view", { class: "info-item" }, [
  2183. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2184. vue.createElementVNode(
  2185. "text",
  2186. { class: "value" },
  2187. vue.toDisplayString(_ctx.station),
  2188. 1
  2189. /* TEXT */
  2190. )
  2191. ]),
  2192. vue.createElementVNode("view", { class: "info-item" }, [
  2193. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2194. vue.createElementVNode(
  2195. "text",
  2196. { class: "value" },
  2197. vue.toDisplayString(_ctx.name),
  2198. 1
  2199. /* TEXT */
  2200. )
  2201. ]),
  2202. vue.createElementVNode("view", { class: "info-item" }, [
  2203. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2204. vue.createElementVNode(
  2205. "text",
  2206. { class: "value" },
  2207. vue.toDisplayString(_ctx.phone),
  2208. 1
  2209. /* TEXT */
  2210. )
  2211. ])
  2212. ]),
  2213. vue.createElementVNode("view", {
  2214. class: "footer-btn",
  2215. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2216. }, "我知道了")
  2217. ]);
  2218. }
  2219. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2220. const _sfc_main$w = {
  2221. data() {
  2222. return {
  2223. mobile: "",
  2224. code: "",
  2225. countDown: 0,
  2226. timer: null
  2227. };
  2228. },
  2229. computed: {
  2230. mobileMask() {
  2231. if (!this.mobile)
  2232. return "";
  2233. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2234. }
  2235. },
  2236. onLoad(options) {
  2237. if (options.mobile) {
  2238. this.mobile = options.mobile;
  2239. } else {
  2240. this.mobile = "13412346783";
  2241. }
  2242. },
  2243. methods: {
  2244. getVerifyCode() {
  2245. if (this.countDown > 0)
  2246. return;
  2247. this.countDown = 60;
  2248. this.timer = setInterval(() => {
  2249. this.countDown--;
  2250. if (this.countDown <= 0) {
  2251. clearInterval(this.timer);
  2252. }
  2253. }, 1e3);
  2254. uni.showToast({ title: "验证码已发送", icon: "none" });
  2255. },
  2256. nextStep() {
  2257. if (!this.code) {
  2258. uni.showToast({ title: "请输入验证码", icon: "none" });
  2259. return;
  2260. }
  2261. uni.navigateTo({
  2262. url: "/pages/login/reset-pwd-set"
  2263. });
  2264. }
  2265. }
  2266. };
  2267. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2268. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2269. vue.createElementVNode("view", { class: "content" }, [
  2270. vue.createElementVNode(
  2271. "view",
  2272. { class: "tip-text" },
  2273. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2274. 1
  2275. /* TEXT */
  2276. ),
  2277. vue.createElementVNode("view", { class: "input-group" }, [
  2278. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2279. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2280. vue.withDirectives(vue.createElementVNode(
  2281. "input",
  2282. {
  2283. class: "code-input",
  2284. type: "number",
  2285. maxlength: "6",
  2286. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2287. },
  2288. null,
  2289. 512
  2290. /* NEED_PATCH */
  2291. ), [
  2292. [vue.vModelText, $data.code]
  2293. ]),
  2294. vue.createElementVNode("view", {
  2295. class: "get-code-btn",
  2296. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2297. }, [
  2298. vue.createElementVNode(
  2299. "text",
  2300. { class: "btn-text" },
  2301. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2302. 1
  2303. /* TEXT */
  2304. )
  2305. ])
  2306. ])
  2307. ]),
  2308. vue.createElementVNode("button", {
  2309. class: "next-btn",
  2310. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2311. }, "下一步")
  2312. ])
  2313. ]);
  2314. }
  2315. 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"]]);
  2316. const _sfc_main$v = {
  2317. data() {
  2318. return {
  2319. pwd1: "",
  2320. pwd2: ""
  2321. };
  2322. },
  2323. methods: {
  2324. confirmReset() {
  2325. if (!this.pwd1 || !this.pwd2) {
  2326. uni.showToast({ title: "请输入密码", icon: "none" });
  2327. return;
  2328. }
  2329. if (this.pwd1 !== this.pwd2) {
  2330. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2331. return;
  2332. }
  2333. uni.showToast({ title: "重置成功", icon: "success" });
  2334. setTimeout(() => {
  2335. uni.navigateBack({
  2336. delta: 2
  2337. // 返回到登录页
  2338. });
  2339. }, 1500);
  2340. }
  2341. }
  2342. };
  2343. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2344. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2345. vue.createElementVNode("view", { class: "content" }, [
  2346. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2347. vue.createElementVNode("view", { class: "input-form" }, [
  2348. vue.createElementVNode("view", { class: "input-row" }, [
  2349. vue.withDirectives(vue.createElementVNode(
  2350. "input",
  2351. {
  2352. class: "pwd-input",
  2353. type: "text",
  2354. password: "",
  2355. placeholder: "限12-20位字母和数字组合",
  2356. "placeholder-style": "color:#ccc",
  2357. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2358. },
  2359. null,
  2360. 512
  2361. /* NEED_PATCH */
  2362. ), [
  2363. [vue.vModelText, $data.pwd1]
  2364. ])
  2365. ]),
  2366. vue.createElementVNode("view", { class: "divider" }),
  2367. vue.createElementVNode("view", { class: "input-row" }, [
  2368. vue.withDirectives(vue.createElementVNode(
  2369. "input",
  2370. {
  2371. class: "pwd-input",
  2372. type: "text",
  2373. password: "",
  2374. placeholder: "限12-20位字母和数字组合",
  2375. "placeholder-style": "color:#ccc",
  2376. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2377. },
  2378. null,
  2379. 512
  2380. /* NEED_PATCH */
  2381. ), [
  2382. [vue.vModelText, $data.pwd2]
  2383. ])
  2384. ]),
  2385. vue.createElementVNode("view", { class: "divider" })
  2386. ]),
  2387. vue.createElementVNode("button", {
  2388. class: "confirm-btn",
  2389. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2390. }, "确定")
  2391. ])
  2392. ]);
  2393. }
  2394. 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"]]);
  2395. function getServiceList() {
  2396. return request({
  2397. url: "/service/list/listOnTaskHall",
  2398. method: "GET"
  2399. });
  2400. }
  2401. function getServiceDetail(id) {
  2402. return request({
  2403. url: `/service/list/${id}`,
  2404. method: "GET"
  2405. });
  2406. }
  2407. function cancelOrderApi(data) {
  2408. return request({
  2409. url: "/order/subOrder/cancel",
  2410. method: "PUT",
  2411. data
  2412. });
  2413. }
  2414. function rejectOrderApi(data) {
  2415. return request({
  2416. url: "/order/subOrder/reject",
  2417. method: "PUT",
  2418. data
  2419. });
  2420. }
  2421. const _sfc_main$u = {
  2422. __name: "index",
  2423. props: {
  2424. currentPath: {
  2425. type: String,
  2426. required: true
  2427. }
  2428. },
  2429. setup(__props, { expose: __expose }) {
  2430. __expose();
  2431. const props = __props;
  2432. const list = vue.ref([
  2433. {
  2434. pagePath: "pages/home/index",
  2435. text: "任务中心",
  2436. iconPath: "/static/tabbar/home.svg",
  2437. selectedIconPath: "/static/tabbar/home-active.svg"
  2438. },
  2439. {
  2440. pagePath: "pages/orders/index",
  2441. text: "我的订单",
  2442. iconPath: "/static/tabbar/order.svg",
  2443. selectedIconPath: "/static/tabbar/order-active.svg"
  2444. },
  2445. {
  2446. pagePath: "pages/mine/index",
  2447. text: "我的",
  2448. iconPath: "/static/tabbar/mine.svg",
  2449. selectedIconPath: "/static/tabbar/mine-active.svg"
  2450. }
  2451. ]);
  2452. const switchTab = (path) => {
  2453. if (props.currentPath === path)
  2454. return;
  2455. uni.switchTab({
  2456. url: "/" + path
  2457. });
  2458. };
  2459. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2460. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2461. return __returned__;
  2462. }
  2463. };
  2464. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  2465. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2466. vue.createElementVNode("view", { class: "tabbar-border" }),
  2467. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2468. (vue.openBlock(true), vue.createElementBlock(
  2469. vue.Fragment,
  2470. null,
  2471. vue.renderList($setup.list, (item, index) => {
  2472. return vue.openBlock(), vue.createElementBlock("view", {
  2473. class: "tabbar-item",
  2474. key: index,
  2475. onClick: ($event) => $setup.switchTab(item.pagePath)
  2476. }, [
  2477. vue.createElementVNode("image", {
  2478. class: "tabbar-icon",
  2479. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2480. }, null, 8, ["src"]),
  2481. vue.createElementVNode(
  2482. "view",
  2483. {
  2484. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2485. },
  2486. vue.toDisplayString(item.text),
  2487. 3
  2488. /* TEXT, CLASS */
  2489. )
  2490. ], 8, ["onClick"]);
  2491. }),
  2492. 128
  2493. /* KEYED_FRAGMENT */
  2494. ))
  2495. ])
  2496. ]);
  2497. }
  2498. 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"]]);
  2499. const logic$3 = {
  2500. components: {
  2501. customTabbar
  2502. },
  2503. data() {
  2504. return {
  2505. taskList: [],
  2506. currentFilter: "default",
  2507. // default, distance, time
  2508. filterCondition: "筛选条件",
  2509. sortDistance: "asc",
  2510. // asc, desc
  2511. sortTime: "asc",
  2512. scrollTop: 0,
  2513. // Track scroll position
  2514. isFilterShow: false,
  2515. tempFilter: {
  2516. service: null,
  2517. distance: "全部",
  2518. amount: "全部"
  2519. },
  2520. activeFilter: {
  2521. service: null,
  2522. distance: "全部",
  2523. amount: "全部"
  2524. },
  2525. workStatus: "working",
  2526. // working | resting
  2527. showConfirmModal: false,
  2528. showPetModal: false,
  2529. currentPetInfo: {},
  2530. showRejectModal: false,
  2531. rejectReason: "",
  2532. currentOrder: null,
  2533. showAcceptConfirmModal: false,
  2534. showNavModal: false,
  2535. navTargetItem: null,
  2536. navTargetPointType: "",
  2537. profile: null,
  2538. profileLoading: false,
  2539. serviceList: [],
  2540. orderStats: {
  2541. total: 0,
  2542. reject: 0,
  2543. completed: 0,
  2544. price: 0
  2545. }
  2546. };
  2547. },
  2548. onPageScroll(e) {
  2549. this.scrollTop = e.scrollTop;
  2550. },
  2551. async onLoad() {
  2552. this.checkWorkStatus();
  2553. await this.loadServiceList();
  2554. this.loadTaskList();
  2555. },
  2556. onShow() {
  2557. uni.hideTabBar();
  2558. this.checkWorkStatus();
  2559. if (isLoggedIn()) {
  2560. this.loadProfile();
  2561. this.loadOrderStats();
  2562. }
  2563. },
  2564. async onPullDownRefresh() {
  2565. this.checkWorkStatus();
  2566. try {
  2567. await this.loadServiceList();
  2568. const tasks = [
  2569. this.loadTaskList()
  2570. ];
  2571. if (isLoggedIn()) {
  2572. tasks.push(this.loadProfile());
  2573. tasks.push(this.loadOrderStats());
  2574. }
  2575. await Promise.all(tasks);
  2576. } catch (err) {
  2577. formatAppLog("error", "at pages/home/logic.js:86", "刷新异常:", err);
  2578. } finally {
  2579. uni.stopPullDownRefresh();
  2580. uni.showToast({ title: "刷新成功", icon: "success" });
  2581. }
  2582. },
  2583. methods: {
  2584. async loadProfile() {
  2585. if (this.profileLoading)
  2586. return;
  2587. this.profileLoading = true;
  2588. try {
  2589. const res = await getMyProfile();
  2590. this.profile = res.data || null;
  2591. } catch (err) {
  2592. formatAppLog("error", "at pages/home/logic.js:100", "获取个人信息失败:", err);
  2593. } finally {
  2594. this.profileLoading = false;
  2595. }
  2596. },
  2597. async loadServiceList() {
  2598. try {
  2599. const res = await getServiceList();
  2600. this.serviceList = res.data || [];
  2601. } catch (err) {
  2602. formatAppLog("error", "at pages/home/logic.js:110", "获取服务类型失败:", err);
  2603. }
  2604. },
  2605. async loadOrderStats() {
  2606. try {
  2607. const res = await getOrderCount();
  2608. this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
  2609. } catch (err) {
  2610. formatAppLog("error", "at pages/home/logic.js:118", "获取订单统计失败:", err);
  2611. }
  2612. },
  2613. checkWorkStatus() {
  2614. const status = uni.getStorageSync("workStatus");
  2615. if (status) {
  2616. this.workStatus = status;
  2617. } else {
  2618. this.workStatus = "working";
  2619. uni.setStorageSync("workStatus", "working");
  2620. }
  2621. },
  2622. toggleFilter() {
  2623. if (this.workStatus === "resting")
  2624. return;
  2625. this.isFilterShow = !this.isFilterShow;
  2626. },
  2627. goToWorkStatus() {
  2628. uni.navigateTo({
  2629. url: "/pages/home/work-status"
  2630. });
  2631. },
  2632. startWork() {
  2633. this.showConfirmModal = true;
  2634. },
  2635. confirmStartWork() {
  2636. this.workStatus = "working";
  2637. uni.setStorageSync("workStatus", "working");
  2638. this.loadTaskList();
  2639. this.showConfirmModal = false;
  2640. uni.showToast({ title: "已开始接单", icon: "success" });
  2641. },
  2642. closeConfirmModal() {
  2643. this.showConfirmModal = false;
  2644. },
  2645. showPetProfile(item) {
  2646. this.currentPetInfo = item;
  2647. this.showPetModal = true;
  2648. },
  2649. closePetProfile() {
  2650. this.showPetModal = false;
  2651. },
  2652. openRejectModal(item) {
  2653. this.currentOrder = item;
  2654. this.rejectReason = "";
  2655. this.showRejectModal = true;
  2656. },
  2657. closeRejectModal() {
  2658. this.showRejectModal = false;
  2659. this.currentOrder = null;
  2660. },
  2661. async confirmReject() {
  2662. var _a;
  2663. if (!this.rejectReason.trim()) {
  2664. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2665. return;
  2666. }
  2667. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2668. return;
  2669. try {
  2670. uni.showLoading({ title: "提交中...", mask: true });
  2671. await rejectOrderApi({
  2672. orderId: this.currentOrder.id,
  2673. rejectReason: this.rejectReason
  2674. });
  2675. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2676. this.showRejectModal = false;
  2677. this.currentOrder = null;
  2678. this.loadTaskList();
  2679. this.loadOrderStats();
  2680. } catch (err) {
  2681. formatAppLog("error", "at pages/home/logic.js:187", "拒绝接单失败:", err);
  2682. uni.showToast({ title: "操作失败", icon: "none" });
  2683. } finally {
  2684. uni.hideLoading();
  2685. }
  2686. },
  2687. openAcceptModal(item) {
  2688. this.currentOrder = item;
  2689. this.showAcceptConfirmModal = true;
  2690. },
  2691. closeAcceptModal() {
  2692. this.showAcceptConfirmModal = false;
  2693. this.currentOrder = null;
  2694. },
  2695. async confirmAccept() {
  2696. var _a;
  2697. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2698. return;
  2699. try {
  2700. await acceptOrder(this.currentOrder.id);
  2701. uni.showToast({ title: "接单成功", icon: "success" });
  2702. this.showAcceptConfirmModal = false;
  2703. this.currentOrder = null;
  2704. this.loadTaskList();
  2705. this.loadProfile();
  2706. this.loadOrderStats();
  2707. } catch (err) {
  2708. formatAppLog("error", "at pages/home/logic.js:212", "接单失败:", err);
  2709. uni.showToast({ title: "接单失败", icon: "none" });
  2710. }
  2711. },
  2712. openNavigation(item, pointType) {
  2713. this.navTargetItem = item;
  2714. this.navTargetPointType = pointType;
  2715. this.showNavModal = true;
  2716. },
  2717. closeNavModal() {
  2718. this.showNavModal = false;
  2719. },
  2720. chooseMap(mapType) {
  2721. let item = this.navTargetItem;
  2722. let pointType = this.navTargetPointType;
  2723. let name = pointType === "start" ? item.startLocation : item.endLocation;
  2724. let address = pointType === "start" ? item.startAddress : item.endAddress;
  2725. this.showNavModal = false;
  2726. uni.openLocation({
  2727. latitude: 30.52,
  2728. // Mock lat
  2729. longitude: 114.31,
  2730. // Mock lng
  2731. name: name || "目的地",
  2732. address: address || "默认地址",
  2733. success: function() {
  2734. formatAppLog("log", "at pages/home/logic.js:238", "打开导航成功: " + mapType);
  2735. }
  2736. });
  2737. },
  2738. selectService(type) {
  2739. this.tempFilter.service = type;
  2740. },
  2741. selectDistance(type) {
  2742. this.tempFilter.distance = type;
  2743. },
  2744. selectAmount(type) {
  2745. this.tempFilter.amount = type;
  2746. },
  2747. resetFilter() {
  2748. this.tempFilter = {
  2749. service: null,
  2750. distance: "全部",
  2751. amount: "全部"
  2752. };
  2753. },
  2754. confirmFilter() {
  2755. this.activeFilter = { ...this.tempFilter };
  2756. this.isFilterShow = false;
  2757. this.loadTaskList();
  2758. },
  2759. closeFilter() {
  2760. this.isFilterShow = false;
  2761. },
  2762. goToDetail(item) {
  2763. formatAppLog("log", "at pages/home/logic.js:267", "Go to detail", item);
  2764. },
  2765. async loadTaskList() {
  2766. try {
  2767. const params = {
  2768. service: this.activeFilter.service,
  2769. minPrice: this.getMinPrice(),
  2770. maxPrice: this.getMaxPrice(),
  2771. pageNum: 1,
  2772. pageSize: 20
  2773. };
  2774. const res = await getPendingOrders(params);
  2775. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  2776. } catch (err) {
  2777. formatAppLog("error", "at pages/home/logic.js:281", "获取订单列表失败:", err);
  2778. uni.showToast({ title: "加载失败", icon: "none" });
  2779. this.taskList = [];
  2780. }
  2781. },
  2782. getMinPrice() {
  2783. const amount = this.activeFilter.amount;
  2784. if (amount === "100以下")
  2785. return 0;
  2786. if (amount === "100-200")
  2787. return 1e4;
  2788. if (amount === "200-500")
  2789. return 2e4;
  2790. if (amount === "500以上")
  2791. return 5e4;
  2792. return void 0;
  2793. },
  2794. getMaxPrice() {
  2795. const amount = this.activeFilter.amount;
  2796. if (amount === "100以下")
  2797. return 1e4;
  2798. if (amount === "100-200")
  2799. return 2e4;
  2800. if (amount === "200-500")
  2801. return 5e4;
  2802. return void 0;
  2803. },
  2804. transformOrder(item) {
  2805. const service = this.serviceList.find((s) => s.id === item.service);
  2806. const serviceText = (service == null ? void 0 : service.name) || "未知";
  2807. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  2808. const mode = (service == null ? void 0 : service.mode) || 0;
  2809. const isRoundTrip = mode === 1;
  2810. return {
  2811. id: item.id,
  2812. type: isRoundTrip ? 1 : item.service,
  2813. typeText: serviceText,
  2814. typeIcon: serviceIcon,
  2815. price: (item.price / 100).toFixed(2),
  2816. timeLabel: "服务时间",
  2817. time: item.serviceTime,
  2818. petAvatar: item.petAvatar || "/static/dog.png",
  2819. petAvatarUrl: item.petAvatarUrl || "",
  2820. petName: item.petName,
  2821. petBreed: item.breed,
  2822. petGender: "M",
  2823. petAge: "",
  2824. petWeight: "",
  2825. petPersonality: "",
  2826. petHobby: "",
  2827. petRemark: "",
  2828. petTags: [],
  2829. petLogs: [],
  2830. startLocation: isRoundTrip ? item.fromAddress : "",
  2831. startAddress: isRoundTrip ? item.fromAddress : "",
  2832. startDistance: "0km",
  2833. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  2834. endAddress: item.toAddress,
  2835. endDistance: "0km",
  2836. serviceContent: "",
  2837. remark: item.remark || ""
  2838. };
  2839. },
  2840. setFilter(type) {
  2841. this.currentFilter = type;
  2842. if (type === "distance") {
  2843. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  2844. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  2845. } else if (type === "time") {
  2846. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  2847. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  2848. }
  2849. },
  2850. showFilterDropdown() {
  2851. this.toggleFilter();
  2852. }
  2853. }
  2854. };
  2855. const _imports_0$3 = "/static/icons/bell.svg";
  2856. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  2857. const _sfc_main$t = {
  2858. ...logic$3
  2859. };
  2860. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  2861. var _a, _b, _c;
  2862. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  2863. return vue.openBlock(), vue.createElementBlock(
  2864. vue.Fragment,
  2865. null,
  2866. [
  2867. vue.createElementVNode("view", { class: "container" }, [
  2868. vue.createElementVNode(
  2869. "view",
  2870. {
  2871. class: "custom-nav-bar",
  2872. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  2873. },
  2874. [
  2875. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  2876. ],
  2877. 4
  2878. /* STYLE */
  2879. ),
  2880. vue.createElementVNode("view", { class: "nav-bg" }, [
  2881. vue.createElementVNode("view", { class: "bg-circle-left" }),
  2882. vue.createElementVNode("view", { class: "bg-circle-right" })
  2883. ]),
  2884. vue.createElementVNode("view", { class: "header-section" }, [
  2885. vue.createElementVNode("view", { class: "user-info" }, [
  2886. vue.createElementVNode("image", {
  2887. class: "avatar",
  2888. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  2889. mode: "aspectFill"
  2890. }, null, 8, ["src"]),
  2891. vue.createElementVNode("view", { class: "info-content" }, [
  2892. vue.createElementVNode("view", { class: "top-row" }, [
  2893. vue.createElementVNode(
  2894. "text",
  2895. { class: "name" },
  2896. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  2897. 1
  2898. /* TEXT */
  2899. ),
  2900. vue.createElementVNode(
  2901. "view",
  2902. {
  2903. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus === "resting" }]),
  2904. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  2905. },
  2906. [
  2907. vue.createElementVNode("view", { class: "status-dot-bg" }, [
  2908. _ctx.workStatus === "working" ? (vue.openBlock(), vue.createElementBlock("text", {
  2909. key: 0,
  2910. class: "check-mark"
  2911. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  2912. key: 1,
  2913. class: "check-mark",
  2914. style: { "font-size": "16rpx", "line-height": "20rpx" }
  2915. }, "✕"))
  2916. ]),
  2917. vue.createElementVNode(
  2918. "text",
  2919. { class: "status-text" },
  2920. vue.toDisplayString(_ctx.workStatus === "working" ? "接单中" : "正在休息"),
  2921. 1
  2922. /* TEXT */
  2923. ),
  2924. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  2925. ],
  2926. 2
  2927. /* CLASS */
  2928. )
  2929. ]),
  2930. vue.createElementVNode("view", { class: "bottom-row" }, [
  2931. vue.createElementVNode(
  2932. "text",
  2933. { class: "city-label" },
  2934. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  2935. 1
  2936. /* TEXT */
  2937. ),
  2938. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  2939. ])
  2940. ]),
  2941. vue.createElementVNode("view", { class: "notification-box" }, [
  2942. vue.createElementVNode("image", {
  2943. class: "bell-img",
  2944. src: _imports_0$3
  2945. }),
  2946. vue.createElementVNode("view", { class: "badge-count" }, "2")
  2947. ])
  2948. ]),
  2949. vue.createElementVNode("view", { class: "stats-card" }, [
  2950. vue.createElementVNode("view", { class: "stat-item" }, [
  2951. vue.createElementVNode(
  2952. "text",
  2953. { class: "num" },
  2954. vue.toDisplayString(_ctx.orderStats.total),
  2955. 1
  2956. /* TEXT */
  2957. ),
  2958. vue.createElementVNode("text", { class: "label" }, "全部订单")
  2959. ]),
  2960. vue.createElementVNode("view", { class: "divider" }),
  2961. vue.createElementVNode("view", { class: "stat-item" }, [
  2962. vue.createElementVNode(
  2963. "text",
  2964. { class: "num" },
  2965. vue.toDisplayString(_ctx.orderStats.reject),
  2966. 1
  2967. /* TEXT */
  2968. ),
  2969. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  2970. ]),
  2971. vue.createElementVNode("view", { class: "divider" }),
  2972. vue.createElementVNode("view", { class: "stat-item" }, [
  2973. vue.createElementVNode(
  2974. "text",
  2975. { class: "num" },
  2976. vue.toDisplayString(_ctx.orderStats.completed),
  2977. 1
  2978. /* TEXT */
  2979. ),
  2980. vue.createElementVNode("text", { class: "label" }, "完成订单")
  2981. ]),
  2982. vue.createElementVNode("view", { class: "divider" }),
  2983. vue.createElementVNode("view", { class: "stat-item" }, [
  2984. vue.createElementVNode(
  2985. "text",
  2986. { class: "num" },
  2987. vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
  2988. 1
  2989. /* TEXT */
  2990. ),
  2991. vue.createElementVNode("text", { class: "label" }, "服务总得")
  2992. ])
  2993. ])
  2994. ]),
  2995. vue.createElementVNode("view", { class: "task-header" }, [
  2996. vue.createElementVNode(
  2997. "view",
  2998. {
  2999. class: "header-inner",
  3000. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3001. },
  3002. [
  3003. vue.createElementVNode("view", { class: "left-title" }, [
  3004. vue.createElementVNode("view", { class: "orange-bar" }),
  3005. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3006. vue.createElementVNode(
  3007. "text",
  3008. { class: "count" },
  3009. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3010. 1
  3011. /* TEXT */
  3012. )
  3013. ]),
  3014. vue.createElementVNode("view", { class: "filter-options" }, [
  3015. vue.createElementVNode("view", {
  3016. class: "dropdown",
  3017. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3018. }, [
  3019. vue.createElementVNode("text", null, "筛选条件"),
  3020. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3021. ])
  3022. ])
  3023. ],
  3024. 4
  3025. /* STYLE */
  3026. ),
  3027. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3028. key: 0,
  3029. class: "filter-mask",
  3030. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3031. })) : vue.createCommentVNode("v-if", true),
  3032. vue.createElementVNode(
  3033. "view",
  3034. {
  3035. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3036. },
  3037. [
  3038. vue.createElementVNode("view", { class: "filter-section" }, [
  3039. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3040. vue.createElementVNode("view", { class: "options-grid" }, [
  3041. vue.createElementVNode(
  3042. "view",
  3043. {
  3044. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3045. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3046. },
  3047. "全部",
  3048. 2
  3049. /* CLASS */
  3050. ),
  3051. (vue.openBlock(true), vue.createElementBlock(
  3052. vue.Fragment,
  3053. null,
  3054. vue.renderList(_ctx.serviceList, (item) => {
  3055. return vue.openBlock(), vue.createElementBlock("view", {
  3056. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3057. key: item.id,
  3058. onClick: ($event) => _ctx.selectService(item.id)
  3059. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3060. }),
  3061. 128
  3062. /* KEYED_FRAGMENT */
  3063. ))
  3064. ])
  3065. ]),
  3066. vue.createElementVNode("view", { class: "filter-section" }, [
  3067. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3068. vue.createElementVNode("view", { class: "options-grid" }, [
  3069. vue.createElementVNode(
  3070. "view",
  3071. {
  3072. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3073. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3074. },
  3075. "全部",
  3076. 2
  3077. /* CLASS */
  3078. ),
  3079. vue.createElementVNode(
  3080. "view",
  3081. {
  3082. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3083. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3084. },
  3085. "100以下",
  3086. 2
  3087. /* CLASS */
  3088. ),
  3089. vue.createElementVNode(
  3090. "view",
  3091. {
  3092. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3093. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3094. },
  3095. "100-200",
  3096. 2
  3097. /* CLASS */
  3098. ),
  3099. vue.createElementVNode(
  3100. "view",
  3101. {
  3102. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3103. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3104. },
  3105. "200-500",
  3106. 2
  3107. /* CLASS */
  3108. ),
  3109. vue.createElementVNode(
  3110. "view",
  3111. {
  3112. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3113. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3114. },
  3115. "500以上",
  3116. 2
  3117. /* CLASS */
  3118. )
  3119. ])
  3120. ]),
  3121. vue.createElementVNode("view", { class: "filter-actions" }, [
  3122. vue.createElementVNode("button", {
  3123. class: "action-btn reset",
  3124. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3125. }, "重置"),
  3126. vue.createElementVNode("button", {
  3127. class: "action-btn confirm",
  3128. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3129. }, "确认")
  3130. ])
  3131. ],
  3132. 2
  3133. /* CLASS */
  3134. )
  3135. ]),
  3136. vue.createElementVNode("view", { class: "task-list-container" }, [
  3137. vue.createElementVNode("view", { class: "task-list" }, [
  3138. (vue.openBlock(true), vue.createElementBlock(
  3139. vue.Fragment,
  3140. null,
  3141. vue.renderList(_ctx.taskList, (item, index) => {
  3142. return vue.openBlock(), vue.createElementBlock("view", {
  3143. class: "task-card",
  3144. key: index,
  3145. onClick: ($event) => _ctx.goToDetail(item)
  3146. }, [
  3147. vue.createElementVNode("view", { class: "card-header" }, [
  3148. vue.createElementVNode("view", { class: "type-badge" }, [
  3149. vue.createElementVNode("image", {
  3150. class: "type-icon",
  3151. src: item.typeIcon
  3152. }, null, 8, ["src"]),
  3153. vue.createElementVNode(
  3154. "text",
  3155. { class: "type-text" },
  3156. vue.toDisplayString(item.typeText),
  3157. 1
  3158. /* TEXT */
  3159. )
  3160. ]),
  3161. vue.createElementVNode(
  3162. "text",
  3163. { class: "price" },
  3164. "¥" + vue.toDisplayString(item.price),
  3165. 1
  3166. /* TEXT */
  3167. )
  3168. ]),
  3169. vue.createElementVNode("view", { class: "card-body" }, [
  3170. vue.createElementVNode("view", { class: "time-row" }, [
  3171. vue.createElementVNode(
  3172. "text",
  3173. { class: "label" },
  3174. vue.toDisplayString(item.timeLabel) + ":",
  3175. 1
  3176. /* TEXT */
  3177. ),
  3178. vue.createElementVNode(
  3179. "text",
  3180. { class: "value" },
  3181. vue.toDisplayString(item.time),
  3182. 1
  3183. /* TEXT */
  3184. )
  3185. ]),
  3186. vue.createElementVNode("view", { class: "pet-card" }, [
  3187. vue.createElementVNode("image", {
  3188. class: "pet-avatar",
  3189. src: item.petAvatarUrl || item.petAvatar,
  3190. mode: "aspectFill"
  3191. }, null, 8, ["src"]),
  3192. vue.createElementVNode("view", { class: "pet-info" }, [
  3193. vue.createElementVNode(
  3194. "text",
  3195. { class: "pet-name" },
  3196. vue.toDisplayString(item.petName),
  3197. 1
  3198. /* TEXT */
  3199. ),
  3200. vue.createElementVNode(
  3201. "text",
  3202. { class: "pet-breed" },
  3203. "品种: " + vue.toDisplayString(item.petBreed),
  3204. 1
  3205. /* TEXT */
  3206. )
  3207. ])
  3208. ]),
  3209. vue.createElementVNode("view", { class: "route-info" }, [
  3210. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3211. vue.Fragment,
  3212. { key: 0 },
  3213. [
  3214. vue.createElementVNode("view", {
  3215. class: "route-item",
  3216. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3217. }, [
  3218. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  3219. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3220. vue.createElementVNode("view", { class: "address-box" }, [
  3221. vue.createElementVNode(
  3222. "text",
  3223. { class: "addr-title" },
  3224. vue.toDisplayString(item.startLocation),
  3225. 1
  3226. /* TEXT */
  3227. ),
  3228. vue.createElementVNode(
  3229. "text",
  3230. { class: "addr-desc" },
  3231. vue.toDisplayString(item.startAddress),
  3232. 1
  3233. /* TEXT */
  3234. )
  3235. ]),
  3236. vue.createElementVNode("image", {
  3237. class: "nav-arrow",
  3238. src: _imports_3$2,
  3239. style: { "flex-shrink": "0", "align-self": "center" }
  3240. })
  3241. ], 8, ["onClick"]),
  3242. vue.createElementVNode("view", {
  3243. class: "route-item",
  3244. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3245. }, [
  3246. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  3247. vue.createElementVNode("view", { class: "address-box" }, [
  3248. vue.createElementVNode(
  3249. "text",
  3250. { class: "addr-title" },
  3251. vue.toDisplayString(item.endLocation),
  3252. 1
  3253. /* TEXT */
  3254. ),
  3255. vue.createElementVNode(
  3256. "text",
  3257. { class: "addr-desc" },
  3258. vue.toDisplayString(item.endAddress),
  3259. 1
  3260. /* TEXT */
  3261. )
  3262. ]),
  3263. vue.createElementVNode("image", {
  3264. class: "nav-arrow",
  3265. src: _imports_3$2,
  3266. style: { "flex-shrink": "0", "align-self": "center" }
  3267. })
  3268. ], 8, ["onClick"])
  3269. ],
  3270. 64
  3271. /* STABLE_FRAGMENT */
  3272. )) : (vue.openBlock(), vue.createElementBlock(
  3273. vue.Fragment,
  3274. { key: 1 },
  3275. [
  3276. vue.createElementVNode("view", {
  3277. class: "route-item",
  3278. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3279. }, [
  3280. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3281. vue.createElementVNode("view", { class: "address-box" }, [
  3282. vue.createElementVNode(
  3283. "text",
  3284. { class: "addr-title" },
  3285. vue.toDisplayString(item.endLocation),
  3286. 1
  3287. /* TEXT */
  3288. ),
  3289. vue.createElementVNode(
  3290. "text",
  3291. { class: "addr-desc" },
  3292. vue.toDisplayString(item.endAddress),
  3293. 1
  3294. /* TEXT */
  3295. )
  3296. ]),
  3297. vue.createElementVNode("image", {
  3298. class: "nav-arrow",
  3299. src: _imports_3$2,
  3300. style: { "flex-shrink": "0", "align-self": "center" }
  3301. })
  3302. ], 8, ["onClick"]),
  3303. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3304. key: 0,
  3305. class: "service-content"
  3306. }, [
  3307. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3308. vue.createElementVNode(
  3309. "text",
  3310. null,
  3311. vue.toDisplayString(item.serviceContent),
  3312. 1
  3313. /* TEXT */
  3314. )
  3315. ])) : vue.createCommentVNode("v-if", true)
  3316. ],
  3317. 64
  3318. /* STABLE_FRAGMENT */
  3319. ))
  3320. ]),
  3321. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3322. key: 0,
  3323. class: "remark-box"
  3324. }, [
  3325. vue.createElementVNode(
  3326. "text",
  3327. null,
  3328. "备注:" + vue.toDisplayString(item.remark),
  3329. 1
  3330. /* TEXT */
  3331. )
  3332. ])) : vue.createCommentVNode("v-if", true)
  3333. ]),
  3334. vue.createElementVNode("view", { class: "action-btns" }, [
  3335. vue.createElementVNode("button", {
  3336. class: "btn reject",
  3337. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3338. }, "拒绝", 8, ["onClick"]),
  3339. vue.createElementVNode("button", {
  3340. class: "btn accept",
  3341. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3342. }, "接单", 8, ["onClick"])
  3343. ])
  3344. ], 8, ["onClick"]);
  3345. }),
  3346. 128
  3347. /* KEYED_FRAGMENT */
  3348. )),
  3349. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3350. ])
  3351. ]),
  3352. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3353. key: 0,
  3354. class: "modal-mask"
  3355. }, [
  3356. vue.createElementVNode("view", { class: "custom-modal" }, [
  3357. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3358. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3359. vue.createElementVNode("view", { class: "modal-btns" }, [
  3360. vue.createElementVNode("button", {
  3361. class: "modal-btn cancel",
  3362. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3363. }, "取消"),
  3364. vue.createElementVNode("button", {
  3365. class: "modal-btn confirm",
  3366. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3367. }, "确定")
  3368. ])
  3369. ])
  3370. ])) : vue.createCommentVNode("v-if", true),
  3371. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3372. key: 1,
  3373. class: "pet-modal-mask",
  3374. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3375. }, [
  3376. vue.createElementVNode("view", {
  3377. class: "pet-modal-content",
  3378. onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
  3379. }, ["stop"]))
  3380. }, [
  3381. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3382. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3383. vue.createElementVNode("view", {
  3384. class: "close-icon-btn",
  3385. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3386. }, "×")
  3387. ]),
  3388. vue.createElementVNode("scroll-view", {
  3389. "scroll-y": "",
  3390. class: "pet-modal-scroll"
  3391. }, [
  3392. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3393. vue.createElementVNode("image", {
  3394. class: "pm-avatar",
  3395. src: _ctx.currentPetInfo.petAvatar,
  3396. mode: "aspectFill"
  3397. }, null, 8, ["src"]),
  3398. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3399. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3400. vue.createElementVNode(
  3401. "text",
  3402. { class: "pm-name" },
  3403. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3404. 1
  3405. /* TEXT */
  3406. ),
  3407. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3408. key: 0,
  3409. class: "pm-gender"
  3410. }, [
  3411. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3412. vue.createElementVNode("text", null, "公")
  3413. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3414. key: 1,
  3415. class: "pm-gender female"
  3416. }, [
  3417. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3418. vue.createElementVNode("text", null, "母")
  3419. ])) : vue.createCommentVNode("v-if", true)
  3420. ]),
  3421. vue.createElementVNode(
  3422. "text",
  3423. { class: "pm-breed" },
  3424. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3425. 1
  3426. /* TEXT */
  3427. )
  3428. ])
  3429. ]),
  3430. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3431. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3432. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3433. vue.createElementVNode(
  3434. "text",
  3435. { class: "pm-val" },
  3436. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3437. 1
  3438. /* TEXT */
  3439. )
  3440. ]),
  3441. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3442. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3443. vue.createElementVNode(
  3444. "text",
  3445. { class: "pm-val" },
  3446. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3447. 1
  3448. /* TEXT */
  3449. )
  3450. ]),
  3451. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3452. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3453. vue.createElementVNode(
  3454. "text",
  3455. { class: "pm-val" },
  3456. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3457. 1
  3458. /* TEXT */
  3459. )
  3460. ]),
  3461. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3462. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3463. vue.createElementVNode(
  3464. "text",
  3465. { class: "pm-val" },
  3466. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3467. 1
  3468. /* TEXT */
  3469. )
  3470. ]),
  3471. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3472. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3473. vue.createElementVNode(
  3474. "text",
  3475. { class: "pm-val" },
  3476. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3477. 1
  3478. /* TEXT */
  3479. )
  3480. ])
  3481. ]),
  3482. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3483. key: 0,
  3484. class: "pm-tags"
  3485. }, [
  3486. (vue.openBlock(true), vue.createElementBlock(
  3487. vue.Fragment,
  3488. null,
  3489. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3490. return vue.openBlock(), vue.createElementBlock(
  3491. "view",
  3492. {
  3493. class: "pm-tag",
  3494. key: index
  3495. },
  3496. vue.toDisplayString(tag),
  3497. 1
  3498. /* TEXT */
  3499. );
  3500. }),
  3501. 128
  3502. /* KEYED_FRAGMENT */
  3503. ))
  3504. ])) : vue.createCommentVNode("v-if", true),
  3505. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3506. vue.createElementVNode("view", { class: "orange-bar" }),
  3507. vue.createElementVNode("text", null, "备注日志")
  3508. ]),
  3509. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3510. (vue.openBlock(true), vue.createElementBlock(
  3511. vue.Fragment,
  3512. null,
  3513. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3514. return vue.openBlock(), vue.createElementBlock("view", {
  3515. class: "pm-log-item",
  3516. key: lIndex
  3517. }, [
  3518. vue.createElementVNode(
  3519. "text",
  3520. { class: "pm-log-date" },
  3521. vue.toDisplayString(log.date),
  3522. 1
  3523. /* TEXT */
  3524. ),
  3525. vue.createElementVNode(
  3526. "text",
  3527. { class: "pm-log-text" },
  3528. vue.toDisplayString(log.content),
  3529. 1
  3530. /* TEXT */
  3531. ),
  3532. vue.createElementVNode(
  3533. "text",
  3534. { class: "pm-log-recorder" },
  3535. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3536. 1
  3537. /* TEXT */
  3538. )
  3539. ]);
  3540. }),
  3541. 128
  3542. /* KEYED_FRAGMENT */
  3543. ))
  3544. ]),
  3545. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3546. vue.createElementVNode("button", {
  3547. class: "pm-bottom-close",
  3548. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3549. }, "关闭"),
  3550. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3551. ])
  3552. ])
  3553. ])) : vue.createCommentVNode("v-if", true)
  3554. ]),
  3555. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3556. key: 0,
  3557. class: "modal-mask"
  3558. }, [
  3559. vue.createElementVNode("view", { class: "custom-modal" }, [
  3560. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3561. vue.withDirectives(vue.createElementVNode(
  3562. "textarea",
  3563. {
  3564. class: "reject-textarea",
  3565. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
  3566. placeholder: "请输入拒绝理由(必填)",
  3567. maxlength: "100"
  3568. },
  3569. null,
  3570. 512
  3571. /* NEED_PATCH */
  3572. ), [
  3573. [vue.vModelText, _ctx.rejectReason]
  3574. ]),
  3575. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3576. vue.createElementVNode("button", {
  3577. class: "modal-btn cancel",
  3578. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3579. }, "取消"),
  3580. vue.createElementVNode("button", {
  3581. class: "modal-btn confirm",
  3582. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3583. }, "提交")
  3584. ])
  3585. ])
  3586. ])) : vue.createCommentVNode("v-if", true),
  3587. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3588. key: 1,
  3589. class: "modal-mask"
  3590. }, [
  3591. vue.createElementVNode("view", { class: "custom-modal" }, [
  3592. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3593. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3594. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3595. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3596. ]),
  3597. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3598. vue.createElementVNode("button", {
  3599. class: "modal-btn cancel",
  3600. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3601. }, "再想想"),
  3602. vue.createElementVNode("button", {
  3603. class: "modal-btn confirm",
  3604. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3605. }, "确认接单")
  3606. ])
  3607. ])
  3608. ])) : vue.createCommentVNode("v-if", true),
  3609. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3610. key: 2,
  3611. class: "nav-modal-mask",
  3612. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3613. }, [
  3614. vue.createElementVNode("view", {
  3615. class: "nav-action-sheet",
  3616. onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
  3617. }, ["stop"]))
  3618. }, [
  3619. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3620. vue.createElementVNode("view", {
  3621. class: "nav-sheet-item",
  3622. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
  3623. }, "高德地图"),
  3624. vue.createElementVNode("view", {
  3625. class: "nav-sheet-item",
  3626. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
  3627. }, "腾讯地图"),
  3628. vue.createElementVNode("view", {
  3629. class: "nav-sheet-item",
  3630. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
  3631. }, "百度地图"),
  3632. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3633. vue.createElementVNode("view", {
  3634. class: "nav-sheet-item cancel",
  3635. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3636. }, "取消")
  3637. ])
  3638. ])) : vue.createCommentVNode("v-if", true),
  3639. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3640. ],
  3641. 64
  3642. /* STABLE_FRAGMENT */
  3643. );
  3644. }
  3645. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3646. const _sfc_main$s = {
  3647. data() {
  3648. return {
  3649. status: "working"
  3650. // working | resting
  3651. };
  3652. },
  3653. onShow() {
  3654. const savedStatus = uni.getStorageSync("workStatus");
  3655. if (savedStatus) {
  3656. this.status = savedStatus;
  3657. }
  3658. },
  3659. methods: {
  3660. toggleStatus() {
  3661. if (this.status === "working") {
  3662. this.status = "resting";
  3663. uni.setStorageSync("workStatus", "resting");
  3664. } else {
  3665. this.status = "working";
  3666. uni.setStorageSync("workStatus", "working");
  3667. }
  3668. }
  3669. }
  3670. };
  3671. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  3672. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3673. vue.createElementVNode("view", { class: "signboard-container" }, [
  3674. vue.createElementVNode("view", { class: "rope" }),
  3675. vue.createElementVNode("view", { class: "nail" }),
  3676. vue.createElementVNode(
  3677. "view",
  3678. {
  3679. class: vue.normalizeClass(["board", { "resting": $data.status === "resting" }])
  3680. },
  3681. [
  3682. vue.createElementVNode("view", { class: "screw top-left" }),
  3683. vue.createElementVNode("view", { class: "screw top-right" }),
  3684. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3685. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3686. vue.createElementVNode("view", { class: "board-inner" }, [
  3687. vue.createElementVNode(
  3688. "text",
  3689. { class: "status-text" },
  3690. vue.toDisplayString($data.status === "working" ? "接单中" : "休息中"),
  3691. 1
  3692. /* TEXT */
  3693. )
  3694. ])
  3695. ],
  3696. 2
  3697. /* CLASS */
  3698. )
  3699. ]),
  3700. vue.createElementVNode("view", { class: "status-desc" }, [
  3701. vue.createElementVNode(
  3702. "text",
  3703. null,
  3704. vue.toDisplayString($data.status === "working" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  3705. 1
  3706. /* TEXT */
  3707. )
  3708. ]),
  3709. vue.createElementVNode("view", { class: "action-area" }, [
  3710. vue.createElementVNode(
  3711. "button",
  3712. {
  3713. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "working", "stopped": $data.status === "resting" }]),
  3714. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  3715. },
  3716. vue.toDisplayString($data.status === "working" ? "停止接单" : "已停止接单"),
  3717. 3
  3718. /* TEXT, CLASS */
  3719. ),
  3720. vue.createElementVNode("view", { class: "tips" }, [
  3721. $data.status === "working" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  3722. ])
  3723. ])
  3724. ]);
  3725. }
  3726. 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"]]);
  3727. const logic$2 = {
  3728. components: {
  3729. customTabbar
  3730. },
  3731. data() {
  3732. return {
  3733. currentTab: 0,
  3734. tabs: ["待接送/服务", "配送/服务中", "已完成", "已拒绝"],
  3735. typeFilterOptions: ["全部类型"],
  3736. currentTypeFilterIdx: 0,
  3737. activeDropdown: 0,
  3738. hasTimeFilter: false,
  3739. currentMonth: "2026年2月",
  3740. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  3741. calendarDays: [],
  3742. selectedDateRange: [],
  3743. allOrderList: [],
  3744. serviceList: [],
  3745. searchContent: "",
  3746. startServiceTime: "",
  3747. endServiceTime: "",
  3748. showPetModal: false,
  3749. currentPetInfo: {},
  3750. showNavModal: false,
  3751. navTargetItem: null,
  3752. navTargetPointType: "",
  3753. activeCallItem: null,
  3754. showRemarkInput: false,
  3755. remarkText: ""
  3756. };
  3757. },
  3758. created() {
  3759. this.initCalendar();
  3760. },
  3761. async onLoad() {
  3762. await this.loadServiceList();
  3763. await this.loadOrders();
  3764. },
  3765. onShow() {
  3766. uni.hideTabBar();
  3767. this.loadOrders();
  3768. },
  3769. async onPullDownRefresh() {
  3770. try {
  3771. await this.loadServiceList();
  3772. await this.loadOrders();
  3773. } finally {
  3774. uni.stopPullDownRefresh();
  3775. }
  3776. },
  3777. watch: {
  3778. currentTab() {
  3779. this.loadOrders();
  3780. },
  3781. currentTypeFilterIdx() {
  3782. this.loadOrders();
  3783. },
  3784. searchContent() {
  3785. this.loadOrders();
  3786. }
  3787. },
  3788. computed: {
  3789. orderList() {
  3790. return this.allOrderList;
  3791. }
  3792. },
  3793. methods: {
  3794. async loadServiceList() {
  3795. try {
  3796. const res = await getServiceList();
  3797. this.serviceList = res.data || [];
  3798. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  3799. } catch (err) {
  3800. formatAppLog("error", "at pages/orders/logic.js:82", "获取服务类型失败:", err);
  3801. }
  3802. },
  3803. async loadOrders() {
  3804. var _a;
  3805. try {
  3806. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  3807. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  3808. const params = {
  3809. status: statusMap[this.currentTab],
  3810. content: this.searchContent || void 0,
  3811. service: serviceId,
  3812. startServiceTime: this.startServiceTime || void 0,
  3813. endServiceTime: this.endServiceTime || void 0
  3814. };
  3815. formatAppLog("log", "at pages/orders/logic.js:96", "订单列表请求参数:", params);
  3816. const res = await getMyOrders(params);
  3817. formatAppLog("log", "at pages/orders/logic.js:98", "订单列表响应:", res);
  3818. const orders = res.rows || [];
  3819. formatAppLog("log", "at pages/orders/logic.js:100", "订单数量:", orders.length);
  3820. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  3821. } catch (err) {
  3822. formatAppLog("error", "at pages/orders/logic.js:103", "获取订单列表失败:", err);
  3823. this.allOrderList = [];
  3824. }
  3825. },
  3826. transformOrder(order, tabIndex) {
  3827. const service = this.serviceList.find((s) => s.id === order.service);
  3828. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3829. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3830. const mode = (service == null ? void 0 : service.mode) || 0;
  3831. const isRoundTrip = mode === 1;
  3832. let statusText = "接单";
  3833. if (tabIndex === 0) {
  3834. statusText = "接单";
  3835. } else if (tabIndex === 1) {
  3836. statusText = isRoundTrip ? "出发" : "开始";
  3837. } else if (tabIndex === 2) {
  3838. statusText = "已完成";
  3839. } else if (tabIndex === 3) {
  3840. statusText = "已拒绝";
  3841. }
  3842. return {
  3843. id: order.id,
  3844. status: order.status,
  3845. // 保存原始 status 用于判断权限
  3846. type: isRoundTrip ? 1 : 2,
  3847. typeText: serviceText,
  3848. typeIcon: serviceIcon,
  3849. statusText,
  3850. price: (order.price / 100).toFixed(2),
  3851. timeLabel: "服务时间",
  3852. time: order.serviceTime || "",
  3853. petAvatar: order.petAvatar || "/static/dog.png",
  3854. petAvatarUrl: order.petAvatarUrl || "",
  3855. petName: order.petName || "",
  3856. petBreed: order.breed || "",
  3857. startLocation: order.fromAddress || "",
  3858. startAddress: order.fromAddress || "",
  3859. startDistance: "0km",
  3860. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  3861. endAddress: order.toAddress || "",
  3862. customerPhone: order.customerPhone || "",
  3863. endDistance: "0km",
  3864. serviceContent: order.remark || "",
  3865. remark: order.remark || ""
  3866. };
  3867. },
  3868. getDisplayStatus(item) {
  3869. if (item.statusText === "已完成")
  3870. return "已完成";
  3871. if (item.statusText === "已拒绝")
  3872. return "已拒绝";
  3873. if (item.statusText === "接单") {
  3874. return item.type === 1 ? "待接送" : "待服务";
  3875. }
  3876. return item.type === 1 ? "配送中" : "服务中";
  3877. },
  3878. getStatusClass(item) {
  3879. let display = this.getDisplayStatus(item);
  3880. if (display === "已完成")
  3881. return "finish";
  3882. if (display === "已拒绝")
  3883. return "reject";
  3884. if (display === "配送中" || display === "服务中")
  3885. return "processing";
  3886. return "highlight";
  3887. },
  3888. goToDetail(item) {
  3889. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  3890. },
  3891. showPetProfile(item) {
  3892. this.currentPetInfo = {
  3893. ...item,
  3894. petGender: "M",
  3895. petAge: "2岁",
  3896. petWeight: "15kg",
  3897. petPersonality: "活泼亲人,精力旺盛",
  3898. petHobby: "喜欢追飞盘,爱吃肉干",
  3899. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  3900. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  3901. petLogs: [
  3902. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  3903. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  3904. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  3905. ]
  3906. };
  3907. this.showPetModal = true;
  3908. },
  3909. closePetProfile() {
  3910. this.showPetModal = false;
  3911. },
  3912. openNavigation(item, pointType) {
  3913. this.navTargetItem = item;
  3914. this.navTargetPointType = pointType;
  3915. this.showNavModal = true;
  3916. },
  3917. closeNavModal() {
  3918. this.showNavModal = false;
  3919. },
  3920. chooseMap(mapType) {
  3921. let item = this.navTargetItem;
  3922. let pointType = this.navTargetPointType;
  3923. let name = pointType === "start" ? item.startLocation : item.endLocation;
  3924. let address = pointType === "start" ? item.startAddress : item.endAddress;
  3925. this.showNavModal = false;
  3926. uni.openLocation({
  3927. latitude: 30.52,
  3928. longitude: 114.31,
  3929. name: name || "目的地",
  3930. address: address || "默认地址",
  3931. success: function() {
  3932. formatAppLog("log", "at pages/orders/logic.js:209", "打开导航成功: " + mapType);
  3933. }
  3934. });
  3935. },
  3936. toggleCallMenu(item) {
  3937. if (this.activeCallItem === item) {
  3938. this.activeCallItem = null;
  3939. } else {
  3940. this.activeCallItem = item;
  3941. }
  3942. },
  3943. closeCallMenu() {
  3944. this.activeCallItem = null;
  3945. },
  3946. doCall(type, item) {
  3947. let phoneNum = "";
  3948. const targetItem = item || this.activeCallItem;
  3949. if (type === "merchant") {
  3950. phoneNum = "18900008451";
  3951. } else if (type === "customer") {
  3952. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  3953. }
  3954. if (phoneNum) {
  3955. uni.makePhoneCall({ phoneNumber: phoneNum });
  3956. }
  3957. this.activeCallItem = null;
  3958. },
  3959. reportAbnormal(item) {
  3960. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  3961. },
  3962. toggleDropdown(idx) {
  3963. if (this.activeDropdown === idx) {
  3964. this.activeDropdown = 0;
  3965. } else {
  3966. this.activeDropdown = idx;
  3967. }
  3968. },
  3969. closeDropdown() {
  3970. this.activeDropdown = 0;
  3971. },
  3972. selectType(index) {
  3973. this.currentTypeFilterIdx = index;
  3974. this.closeDropdown();
  3975. },
  3976. initCalendar() {
  3977. let days = [];
  3978. for (let i = 1; i <= 28; i++) {
  3979. days.push(i);
  3980. }
  3981. this.calendarDays = days;
  3982. this.selectedDateRange = [2, 4];
  3983. },
  3984. prevMonth() {
  3985. uni.showToast({ title: "上个月", icon: "none" });
  3986. },
  3987. nextMonth() {
  3988. uni.showToast({ title: "下个月", icon: "none" });
  3989. },
  3990. selectDateItem(day) {
  3991. if (this.selectedDateRange.length === 2) {
  3992. this.selectedDateRange = [day];
  3993. } else if (this.selectedDateRange.length === 1) {
  3994. let start = this.selectedDateRange[0];
  3995. if (day > start) {
  3996. this.selectedDateRange = [start, day];
  3997. } else if (day < start) {
  3998. this.selectedDateRange = [day, start];
  3999. } else {
  4000. this.selectedDateRange = [];
  4001. }
  4002. } else {
  4003. this.selectedDateRange = [day];
  4004. }
  4005. },
  4006. getDateClass(day) {
  4007. if (this.selectedDateRange.length === 0)
  4008. return "";
  4009. if (this.selectedDateRange.length === 1) {
  4010. return day === this.selectedDateRange[0] ? "is-start" : "";
  4011. }
  4012. let start = this.selectedDateRange[0];
  4013. let end = this.selectedDateRange[1];
  4014. if (day === start)
  4015. return "is-start";
  4016. if (day === end)
  4017. return "is-end";
  4018. if (day > start && day < end)
  4019. return "is-between";
  4020. return "";
  4021. },
  4022. resetTimeFilter() {
  4023. this.hasTimeFilter = false;
  4024. this.selectedDateRange = [];
  4025. this.startServiceTime = "";
  4026. this.endServiceTime = "";
  4027. this.closeDropdown();
  4028. this.loadOrders();
  4029. },
  4030. confirmTimeFilter() {
  4031. if (this.selectedDateRange.length === 0) {
  4032. uni.showToast({ title: "请先选择日期", icon: "none" });
  4033. return;
  4034. }
  4035. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4036. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4037. const pad = (n) => String(n).padStart(2, "0");
  4038. if (this.selectedDateRange.length === 2) {
  4039. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4040. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4041. } else {
  4042. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4043. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4044. }
  4045. this.hasTimeFilter = true;
  4046. this.closeDropdown();
  4047. this.loadOrders();
  4048. },
  4049. getMainActionText(item) {
  4050. return "查看详情";
  4051. },
  4052. mainAction(item) {
  4053. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4054. },
  4055. openRemarkInput() {
  4056. this.remarkText = "";
  4057. this.showRemarkInput = true;
  4058. },
  4059. closeRemarkInput() {
  4060. this.showRemarkInput = false;
  4061. this.remarkText = "";
  4062. },
  4063. submitRemark() {
  4064. const text = this.remarkText.trim();
  4065. if (!text) {
  4066. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4067. return;
  4068. }
  4069. const now = /* @__PURE__ */ new Date();
  4070. 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")}`;
  4071. if (!this.currentPetInfo.petLogs) {
  4072. this.$set(this.currentPetInfo, "petLogs", []);
  4073. }
  4074. this.currentPetInfo.petLogs.unshift({
  4075. date: dateStr,
  4076. content: text,
  4077. recorder: "我"
  4078. });
  4079. uni.showToast({ title: "备注已添加", icon: "success" });
  4080. this.closeRemarkInput();
  4081. },
  4082. /**
  4083. * 取消订单处理逻辑
  4084. * @param {Object} item - 订单项
  4085. */
  4086. handleCancelOrder(item) {
  4087. uni.showModal({
  4088. title: "提示",
  4089. content: "确认是否取消这个订单?",
  4090. success: async (res) => {
  4091. if (res.confirm) {
  4092. try {
  4093. uni.showLoading({ title: "取消中...", mask: true });
  4094. await cancelOrderApi({ orderId: item.id });
  4095. uni.showToast({ title: "订单已取消", icon: "success" });
  4096. setTimeout(() => {
  4097. this.loadOrders();
  4098. }, 1500);
  4099. } catch (err) {
  4100. formatAppLog("error", "at pages/orders/logic.js:371", "取消订单失败:", err);
  4101. uni.showToast({ title: "取消失败", icon: "none" });
  4102. } finally {
  4103. uni.hideLoading();
  4104. }
  4105. }
  4106. }
  4107. });
  4108. }
  4109. }
  4110. };
  4111. const _sfc_main$r = {
  4112. ...logic$2
  4113. };
  4114. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  4115. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4116. return vue.openBlock(), vue.createElementBlock(
  4117. vue.Fragment,
  4118. null,
  4119. [
  4120. vue.createElementVNode("view", { class: "container" }, [
  4121. vue.createElementVNode("view", { class: "sticky-header" }, [
  4122. vue.createElementVNode("view", { class: "status-tabs" }, [
  4123. (vue.openBlock(true), vue.createElementBlock(
  4124. vue.Fragment,
  4125. null,
  4126. vue.renderList(_ctx.tabs, (tab, index) => {
  4127. return vue.openBlock(), vue.createElementBlock("view", {
  4128. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4129. key: index,
  4130. onClick: ($event) => _ctx.currentTab = index
  4131. }, [
  4132. vue.createElementVNode(
  4133. "text",
  4134. null,
  4135. vue.toDisplayString(tab),
  4136. 1
  4137. /* TEXT */
  4138. ),
  4139. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4140. key: 0,
  4141. class: "indicator"
  4142. })) : vue.createCommentVNode("v-if", true)
  4143. ], 10, ["onClick"]);
  4144. }),
  4145. 128
  4146. /* KEYED_FRAGMENT */
  4147. ))
  4148. ]),
  4149. vue.createElementVNode("view", { class: "search-bar" }, [
  4150. vue.createElementVNode("view", { class: "search-input-box" }, [
  4151. vue.withDirectives(vue.createElementVNode(
  4152. "input",
  4153. {
  4154. class: "search-input",
  4155. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4156. placeholder: "搜索地址/电话/姓名",
  4157. "placeholder-class": "ph-style"
  4158. },
  4159. null,
  4160. 512
  4161. /* NEED_PATCH */
  4162. ), [
  4163. [vue.vModelText, _ctx.searchContent]
  4164. ])
  4165. ])
  4166. ]),
  4167. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4168. vue.createElementVNode("view", { class: "filter-bar" }, [
  4169. vue.createElementVNode(
  4170. "view",
  4171. {
  4172. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4173. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4174. },
  4175. [
  4176. vue.createElementVNode(
  4177. "text",
  4178. {
  4179. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4180. },
  4181. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4182. 3
  4183. /* TEXT, CLASS */
  4184. ),
  4185. vue.createElementVNode(
  4186. "view",
  4187. {
  4188. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4189. },
  4190. null,
  4191. 2
  4192. /* CLASS */
  4193. )
  4194. ],
  4195. 2
  4196. /* CLASS */
  4197. ),
  4198. vue.createElementVNode(
  4199. "view",
  4200. {
  4201. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4202. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4203. },
  4204. [
  4205. vue.createElementVNode(
  4206. "text",
  4207. {
  4208. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4209. },
  4210. "服务时间",
  4211. 2
  4212. /* CLASS */
  4213. ),
  4214. vue.createElementVNode(
  4215. "view",
  4216. {
  4217. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4218. },
  4219. null,
  4220. 2
  4221. /* CLASS */
  4222. )
  4223. ],
  4224. 2
  4225. /* CLASS */
  4226. )
  4227. ]),
  4228. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4229. key: 0,
  4230. class: "dropdown-mask",
  4231. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4232. })) : vue.createCommentVNode("v-if", true),
  4233. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4234. key: 1,
  4235. class: "dropdown-panel"
  4236. }, [
  4237. (vue.openBlock(true), vue.createElementBlock(
  4238. vue.Fragment,
  4239. null,
  4240. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4241. return vue.openBlock(), vue.createElementBlock("view", {
  4242. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4243. key: index,
  4244. onClick: ($event) => _ctx.selectType(index)
  4245. }, [
  4246. vue.createElementVNode(
  4247. "text",
  4248. null,
  4249. vue.toDisplayString(item),
  4250. 1
  4251. /* TEXT */
  4252. )
  4253. ], 10, ["onClick"]);
  4254. }),
  4255. 128
  4256. /* KEYED_FRAGMENT */
  4257. ))
  4258. ])) : vue.createCommentVNode("v-if", true),
  4259. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4260. key: 2,
  4261. class: "dropdown-panel calendar-panel"
  4262. }, [
  4263. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4264. vue.createElementVNode("view", { class: "cal-header" }, [
  4265. vue.createElementVNode("text", {
  4266. class: "cal-nav-btn",
  4267. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4268. }, "‹"),
  4269. vue.createElementVNode(
  4270. "text",
  4271. { class: "cal-title" },
  4272. vue.toDisplayString(_ctx.currentMonth),
  4273. 1
  4274. /* TEXT */
  4275. ),
  4276. vue.createElementVNode("text", {
  4277. class: "cal-nav-btn",
  4278. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4279. }, "›")
  4280. ]),
  4281. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4282. (vue.openBlock(true), vue.createElementBlock(
  4283. vue.Fragment,
  4284. null,
  4285. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4286. return vue.openBlock(), vue.createElementBlock(
  4287. "text",
  4288. {
  4289. key: idx,
  4290. class: "wk-item"
  4291. },
  4292. vue.toDisplayString(wk),
  4293. 1
  4294. /* TEXT */
  4295. );
  4296. }),
  4297. 128
  4298. /* KEYED_FRAGMENT */
  4299. ))
  4300. ]),
  4301. vue.createElementVNode("view", { class: "cal-body" }, [
  4302. (vue.openBlock(true), vue.createElementBlock(
  4303. vue.Fragment,
  4304. null,
  4305. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4306. return vue.openBlock(), vue.createElementBlock("view", {
  4307. key: idx,
  4308. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4309. onClick: ($event) => _ctx.selectDateItem(day)
  4310. }, [
  4311. vue.createElementVNode(
  4312. "view",
  4313. { class: "cal-day-text" },
  4314. vue.toDisplayString(day),
  4315. 1
  4316. /* TEXT */
  4317. )
  4318. ], 10, ["onClick"]);
  4319. }),
  4320. 128
  4321. /* KEYED_FRAGMENT */
  4322. ))
  4323. ])
  4324. ]),
  4325. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4326. vue.createElementVNode("button", {
  4327. class: "cal-btn reset",
  4328. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4329. }, "重置"),
  4330. vue.createElementVNode("button", {
  4331. class: "cal-btn confirm",
  4332. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4333. }, "确定")
  4334. ])
  4335. ])) : vue.createCommentVNode("v-if", true)
  4336. ])
  4337. ]),
  4338. vue.createElementVNode("view", { class: "order-list" }, [
  4339. (vue.openBlock(true), vue.createElementBlock(
  4340. vue.Fragment,
  4341. null,
  4342. vue.renderList(_ctx.orderList, (item, index) => {
  4343. return vue.openBlock(), vue.createElementBlock("view", {
  4344. class: "order-card",
  4345. key: index,
  4346. onClick: ($event) => _ctx.goToDetail(item)
  4347. }, [
  4348. vue.createElementVNode("view", { class: "card-header" }, [
  4349. vue.createElementVNode("view", { class: "type-badge" }, [
  4350. vue.createElementVNode("image", {
  4351. class: "type-icon",
  4352. src: item.typeIcon
  4353. }, null, 8, ["src"]),
  4354. vue.createElementVNode(
  4355. "text",
  4356. { class: "type-text" },
  4357. vue.toDisplayString(item.typeText),
  4358. 1
  4359. /* TEXT */
  4360. )
  4361. ]),
  4362. vue.createElementVNode(
  4363. "text",
  4364. {
  4365. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4366. },
  4367. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4368. 3
  4369. /* TEXT, CLASS */
  4370. )
  4371. ]),
  4372. vue.createElementVNode("view", { class: "card-body" }, [
  4373. vue.createElementVNode("view", { class: "time-row" }, [
  4374. vue.createElementVNode("view", { class: "time-col" }, [
  4375. vue.createElementVNode(
  4376. "text",
  4377. { class: "label" },
  4378. vue.toDisplayString(item.timeLabel) + ":",
  4379. 1
  4380. /* TEXT */
  4381. ),
  4382. vue.createElementVNode(
  4383. "text",
  4384. { class: "value" },
  4385. vue.toDisplayString(item.time),
  4386. 1
  4387. /* TEXT */
  4388. )
  4389. ]),
  4390. vue.createElementVNode(
  4391. "text",
  4392. { class: "price" },
  4393. "¥" + vue.toDisplayString(item.price),
  4394. 1
  4395. /* TEXT */
  4396. )
  4397. ]),
  4398. vue.createElementVNode("view", { class: "pet-card" }, [
  4399. vue.createElementVNode("image", {
  4400. class: "pet-avatar",
  4401. src: item.petAvatarUrl || item.petAvatar,
  4402. mode: "aspectFill"
  4403. }, null, 8, ["src"]),
  4404. vue.createElementVNode("view", { class: "pet-info" }, [
  4405. vue.createElementVNode(
  4406. "text",
  4407. { class: "pet-name" },
  4408. vue.toDisplayString(item.petName),
  4409. 1
  4410. /* TEXT */
  4411. ),
  4412. vue.createElementVNode(
  4413. "text",
  4414. { class: "pet-breed" },
  4415. "品种: " + vue.toDisplayString(item.petBreed),
  4416. 1
  4417. /* TEXT */
  4418. )
  4419. ])
  4420. ]),
  4421. vue.createElementVNode("view", { class: "route-info" }, [
  4422. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4423. vue.Fragment,
  4424. { key: 0 },
  4425. [
  4426. vue.createElementVNode("view", {
  4427. class: "route-item",
  4428. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4429. }, [
  4430. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  4431. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4432. vue.createElementVNode("view", { class: "address-box" }, [
  4433. vue.createElementVNode(
  4434. "text",
  4435. { class: "addr-title" },
  4436. vue.toDisplayString(item.startLocation),
  4437. 1
  4438. /* TEXT */
  4439. ),
  4440. vue.createElementVNode(
  4441. "text",
  4442. { class: "addr-desc" },
  4443. vue.toDisplayString(item.startAddress),
  4444. 1
  4445. /* TEXT */
  4446. )
  4447. ]),
  4448. vue.createElementVNode("image", {
  4449. class: "nav-arrow",
  4450. src: _imports_3$2,
  4451. style: { "flex-shrink": "0", "align-self": "center" }
  4452. })
  4453. ], 8, ["onClick"]),
  4454. vue.createElementVNode("view", {
  4455. class: "route-item",
  4456. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4457. }, [
  4458. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  4459. vue.createElementVNode("view", { class: "address-box" }, [
  4460. vue.createElementVNode(
  4461. "text",
  4462. { class: "addr-title" },
  4463. vue.toDisplayString(item.endLocation),
  4464. 1
  4465. /* TEXT */
  4466. ),
  4467. vue.createElementVNode(
  4468. "text",
  4469. { class: "addr-desc" },
  4470. vue.toDisplayString(item.endAddress),
  4471. 1
  4472. /* TEXT */
  4473. )
  4474. ]),
  4475. vue.createElementVNode("image", {
  4476. class: "nav-arrow",
  4477. src: _imports_3$2,
  4478. style: { "flex-shrink": "0", "align-self": "center" }
  4479. })
  4480. ], 8, ["onClick"])
  4481. ],
  4482. 64
  4483. /* STABLE_FRAGMENT */
  4484. )) : (vue.openBlock(), vue.createElementBlock(
  4485. vue.Fragment,
  4486. { key: 1 },
  4487. [
  4488. vue.createElementVNode("view", {
  4489. class: "route-item",
  4490. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4491. }, [
  4492. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4493. vue.createElementVNode("view", { class: "address-box" }, [
  4494. vue.createElementVNode(
  4495. "text",
  4496. { class: "addr-title" },
  4497. vue.toDisplayString(item.endLocation),
  4498. 1
  4499. /* TEXT */
  4500. ),
  4501. vue.createElementVNode(
  4502. "text",
  4503. { class: "addr-desc" },
  4504. vue.toDisplayString(item.endAddress),
  4505. 1
  4506. /* TEXT */
  4507. )
  4508. ]),
  4509. vue.createElementVNode("image", {
  4510. class: "nav-arrow",
  4511. src: _imports_3$2,
  4512. style: { "flex-shrink": "0", "align-self": "center" }
  4513. })
  4514. ], 8, ["onClick"]),
  4515. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4516. key: 0,
  4517. class: "service-content"
  4518. }, [
  4519. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4520. vue.createElementVNode(
  4521. "text",
  4522. null,
  4523. vue.toDisplayString(item.serviceContent),
  4524. 1
  4525. /* TEXT */
  4526. )
  4527. ])) : vue.createCommentVNode("v-if", true)
  4528. ],
  4529. 64
  4530. /* STABLE_FRAGMENT */
  4531. ))
  4532. ]),
  4533. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4534. key: 0,
  4535. class: "remark-box"
  4536. }, [
  4537. vue.createElementVNode(
  4538. "text",
  4539. null,
  4540. "备注:" + vue.toDisplayString(item.remark),
  4541. 1
  4542. /* TEXT */
  4543. )
  4544. ])) : vue.createCommentVNode("v-if", true)
  4545. ]),
  4546. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4547. key: 0,
  4548. class: "action-btns"
  4549. }, [
  4550. vue.createElementVNode("view", { class: "action-left" }, [
  4551. vue.createElementVNode("button", {
  4552. class: "btn normal",
  4553. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4554. }, "拨号", 8, ["onClick"])
  4555. ]),
  4556. vue.createElementVNode("view", { class: "action-right" }, [
  4557. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4558. key: 0,
  4559. class: "btn normal danger",
  4560. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4561. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4562. vue.createElementVNode("button", {
  4563. class: "btn normal",
  4564. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4565. }, "异常上报", 8, ["onClick"]),
  4566. vue.createElementVNode("button", {
  4567. class: "btn primary",
  4568. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4569. }, "打卡", 8, ["onClick"])
  4570. ])
  4571. ])) : vue.createCommentVNode("v-if", true)
  4572. ], 8, ["onClick"]);
  4573. }),
  4574. 128
  4575. /* KEYED_FRAGMENT */
  4576. )),
  4577. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4578. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4579. ]),
  4580. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4581. key: 0,
  4582. class: "call-mask",
  4583. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4584. })) : vue.createCommentVNode("v-if", true)
  4585. ]),
  4586. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4587. key: 0,
  4588. class: "pet-modal-mask",
  4589. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4590. }, [
  4591. vue.createElementVNode("view", {
  4592. class: "pet-modal-content",
  4593. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4594. }, ["stop"]))
  4595. }, [
  4596. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4597. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4598. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4599. vue.createElementVNode("view", {
  4600. class: "pm-remark-btn",
  4601. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4602. }, "备注"),
  4603. vue.createElementVNode("view", {
  4604. class: "close-icon-btn",
  4605. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4606. }, "×")
  4607. ])
  4608. ]),
  4609. vue.createElementVNode("scroll-view", {
  4610. "scroll-y": "",
  4611. class: "pet-modal-scroll"
  4612. }, [
  4613. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4614. vue.createElementVNode("image", {
  4615. class: "pm-avatar",
  4616. src: _ctx.currentPetInfo.petAvatar,
  4617. mode: "aspectFill"
  4618. }, null, 8, ["src"]),
  4619. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4620. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4621. vue.createElementVNode(
  4622. "text",
  4623. { class: "pm-name" },
  4624. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4625. 1
  4626. /* TEXT */
  4627. ),
  4628. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4629. key: 0,
  4630. class: "pm-gender"
  4631. }, [
  4632. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4633. vue.createElementVNode("text", null, "公")
  4634. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4635. key: 1,
  4636. class: "pm-gender female"
  4637. }, [
  4638. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4639. vue.createElementVNode("text", null, "母")
  4640. ])) : vue.createCommentVNode("v-if", true)
  4641. ]),
  4642. vue.createElementVNode(
  4643. "text",
  4644. { class: "pm-breed" },
  4645. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4646. 1
  4647. /* TEXT */
  4648. )
  4649. ])
  4650. ]),
  4651. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4652. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4653. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4654. vue.createElementVNode(
  4655. "text",
  4656. { class: "pm-val" },
  4657. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4658. 1
  4659. /* TEXT */
  4660. )
  4661. ]),
  4662. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4663. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  4664. vue.createElementVNode(
  4665. "text",
  4666. { class: "pm-val" },
  4667. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  4668. 1
  4669. /* TEXT */
  4670. )
  4671. ]),
  4672. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4673. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  4674. vue.createElementVNode(
  4675. "text",
  4676. { class: "pm-val" },
  4677. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  4678. 1
  4679. /* TEXT */
  4680. )
  4681. ]),
  4682. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4683. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  4684. vue.createElementVNode(
  4685. "text",
  4686. { class: "pm-val" },
  4687. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  4688. 1
  4689. /* TEXT */
  4690. )
  4691. ]),
  4692. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4693. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  4694. vue.createElementVNode(
  4695. "text",
  4696. { class: "pm-val" },
  4697. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  4698. 1
  4699. /* TEXT */
  4700. )
  4701. ])
  4702. ]),
  4703. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4704. key: 0,
  4705. class: "pm-tags"
  4706. }, [
  4707. (vue.openBlock(true), vue.createElementBlock(
  4708. vue.Fragment,
  4709. null,
  4710. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  4711. return vue.openBlock(), vue.createElementBlock(
  4712. "view",
  4713. {
  4714. class: "pm-tag",
  4715. key: index
  4716. },
  4717. vue.toDisplayString(tag),
  4718. 1
  4719. /* TEXT */
  4720. );
  4721. }),
  4722. 128
  4723. /* KEYED_FRAGMENT */
  4724. ))
  4725. ])) : vue.createCommentVNode("v-if", true),
  4726. vue.createElementVNode("view", { class: "pm-section-title" }, [
  4727. vue.createElementVNode("view", { class: "orange-bar" }),
  4728. vue.createElementVNode("text", null, "备注日志")
  4729. ]),
  4730. vue.createElementVNode("view", { class: "pm-log-list" }, [
  4731. (vue.openBlock(true), vue.createElementBlock(
  4732. vue.Fragment,
  4733. null,
  4734. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  4735. return vue.openBlock(), vue.createElementBlock("view", {
  4736. class: "pm-log-item",
  4737. key: lIndex
  4738. }, [
  4739. vue.createElementVNode(
  4740. "text",
  4741. { class: "pm-log-date" },
  4742. vue.toDisplayString(log.date),
  4743. 1
  4744. /* TEXT */
  4745. ),
  4746. vue.createElementVNode(
  4747. "text",
  4748. { class: "pm-log-text" },
  4749. vue.toDisplayString(log.content),
  4750. 1
  4751. /* TEXT */
  4752. ),
  4753. vue.createElementVNode(
  4754. "text",
  4755. { class: "pm-log-recorder" },
  4756. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  4757. 1
  4758. /* TEXT */
  4759. )
  4760. ]);
  4761. }),
  4762. 128
  4763. /* KEYED_FRAGMENT */
  4764. ))
  4765. ]),
  4766. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  4767. ])
  4768. ])
  4769. ])) : vue.createCommentVNode("v-if", true),
  4770. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  4771. key: 1,
  4772. class: "remark-mask",
  4773. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4774. }, [
  4775. vue.createElementVNode("view", {
  4776. class: "remark-sheet",
  4777. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  4778. }, ["stop"]))
  4779. }, [
  4780. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  4781. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  4782. vue.createElementVNode("view", {
  4783. class: "close-icon-btn",
  4784. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4785. }, "×")
  4786. ]),
  4787. vue.withDirectives(vue.createElementVNode(
  4788. "textarea",
  4789. {
  4790. class: "remark-textarea",
  4791. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  4792. placeholder: "请输入备注内容...",
  4793. maxlength: "500",
  4794. "auto-height": ""
  4795. },
  4796. null,
  4797. 512
  4798. /* NEED_PATCH */
  4799. ), [
  4800. [vue.vModelText, _ctx.remarkText]
  4801. ]),
  4802. vue.createElementVNode("view", {
  4803. class: "remark-submit-btn",
  4804. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  4805. }, "提交备注")
  4806. ])
  4807. ])) : vue.createCommentVNode("v-if", true),
  4808. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4809. key: 2,
  4810. class: "nav-modal-mask",
  4811. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4812. }, [
  4813. vue.createElementVNode("view", {
  4814. class: "nav-action-sheet",
  4815. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  4816. }, ["stop"]))
  4817. }, [
  4818. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  4819. vue.createElementVNode("view", {
  4820. class: "nav-sheet-item",
  4821. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  4822. }, "高德地图"),
  4823. vue.createElementVNode("view", {
  4824. class: "nav-sheet-item",
  4825. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  4826. }, "腾讯地图"),
  4827. vue.createElementVNode("view", {
  4828. class: "nav-sheet-item",
  4829. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  4830. }, "百度地图"),
  4831. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  4832. vue.createElementVNode("view", {
  4833. class: "nav-sheet-item cancel",
  4834. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4835. }, "取消")
  4836. ])
  4837. ])) : vue.createCommentVNode("v-if", true),
  4838. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  4839. ],
  4840. 64
  4841. /* STABLE_FRAGMENT */
  4842. );
  4843. }
  4844. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  4845. function getDictDataByType(dictType) {
  4846. return request({
  4847. url: `/system/dict/data/type/${dictType}`,
  4848. method: "GET"
  4849. });
  4850. }
  4851. function getPetDetail(id) {
  4852. return request({
  4853. url: `/archieves/pet/${id}`,
  4854. method: "GET"
  4855. });
  4856. }
  4857. const logic$1 = {
  4858. data() {
  4859. return {
  4860. orderId: null,
  4861. pageLoading: true,
  4862. // 页面数据加载中
  4863. orderType: 1,
  4864. orderStatus: 2,
  4865. serviceId: null,
  4866. // 当前订单的服务类型ID
  4867. serviceMode: null,
  4868. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  4869. petId: null,
  4870. // 当前订单关联的宠物ID
  4871. petDetail: null,
  4872. // 宠物档案详情
  4873. // 从后端 clockInRemark 解析出的打卡步骤列表
  4874. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  4875. clockInSteps: [],
  4876. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  4877. currentClockIn: null,
  4878. currentStep: 0,
  4879. orderDetail: {
  4880. type: 1,
  4881. price: "0.00",
  4882. timeLabel: "服务时间",
  4883. time: "",
  4884. petAvatar: "/static/dog.png",
  4885. petName: "",
  4886. petBreed: "",
  4887. serviceTag: "",
  4888. startLocation: "",
  4889. startAddress: "",
  4890. endAddress: "",
  4891. customerPhone: "",
  4892. serviceContent: "",
  4893. remark: "",
  4894. orderNo: "",
  4895. createTime: "",
  4896. progressLogs: [],
  4897. nursingSummary: ""
  4898. // 宠护小结
  4899. },
  4900. serviceList: [],
  4901. showPetModal: false,
  4902. currentPetInfo: {},
  4903. showNavModal: false,
  4904. navTargetPointType: "",
  4905. showUploadModal: false,
  4906. modalMediaList: [],
  4907. modalRemark: "",
  4908. showSumModal: false,
  4909. sumContent: "",
  4910. sumDate: "",
  4911. sumSigner: "未知",
  4912. showPetRemarkInput: false,
  4913. petRemarkText: "",
  4914. showAnomalyModal: false,
  4915. anomalyList: [],
  4916. anomalyTypeDict: [],
  4917. // 媒体预览相关
  4918. videoPlayerShow: false,
  4919. videoPlayerUrl: ""
  4920. };
  4921. },
  4922. computed: {
  4923. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  4924. steps() {
  4925. if (this.clockInSteps.length > 0) {
  4926. return this.clockInSteps.map((s) => s.title);
  4927. }
  4928. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  4929. },
  4930. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  4931. progressSteps() {
  4932. return ["已接单", ...this.steps, "订单完成"];
  4933. },
  4934. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  4935. progressIndex() {
  4936. return this.currentStep + 1;
  4937. },
  4938. displayStatusText() {
  4939. if (this.currentStep >= this.steps.length)
  4940. return "已完成";
  4941. if (this.currentStep > 0) {
  4942. return this.orderType === 1 ? "配送中" : "服务中";
  4943. }
  4944. return this.orderType === 1 ? "待接送" : "待服务";
  4945. },
  4946. currentStatusText() {
  4947. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  4948. },
  4949. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  4950. currentTaskTitle() {
  4951. if (this.currentStep >= this.steps.length)
  4952. return "订单已完成";
  4953. if (this.currentClockIn) {
  4954. return this.currentClockIn.title;
  4955. }
  4956. return this.steps[this.currentStep] || "打卡";
  4957. },
  4958. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  4959. currentTaskDesc() {
  4960. if (this.currentStep >= this.steps.length)
  4961. return "感谢您的服务,请注意休息";
  4962. if (this.currentClockIn && this.currentClockIn.remark) {
  4963. return this.currentClockIn.remark;
  4964. }
  4965. return "请按要求提交照片或视频及备注";
  4966. }
  4967. },
  4968. async onLoad(options) {
  4969. if (options.id) {
  4970. this.orderId = options.id;
  4971. }
  4972. this.pageLoading = true;
  4973. try {
  4974. await this.loadAnomalyTypeDict();
  4975. await this.loadOrderDetail();
  4976. } finally {
  4977. this.pageLoading = false;
  4978. }
  4979. },
  4980. methods: {
  4981. async loadServiceList() {
  4982. try {
  4983. const res = await getServiceList();
  4984. this.serviceList = res.data || [];
  4985. } catch (err) {
  4986. formatAppLog("error", "at pages/orders/detail-logic.js:143", "获取服务类型失败:", err);
  4987. }
  4988. },
  4989. /**
  4990. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  4991. */
  4992. async loadServiceDetail(serviceId) {
  4993. formatAppLog("log", "at pages/orders/detail-logic.js:150", "开始加载服务详情, ID:", serviceId);
  4994. try {
  4995. const res = await getServiceDetail(serviceId);
  4996. const serviceInfo = res.data;
  4997. formatAppLog("log", "at pages/orders/detail-logic.js:154", "服务详情响应结果:", serviceInfo);
  4998. if (serviceInfo) {
  4999. this.serviceMode = serviceInfo.mode;
  5000. formatAppLog("log", "at pages/orders/detail-logic.js:157", "当前服务模式(mode):", this.serviceMode);
  5001. if (serviceInfo.clockInRemark) {
  5002. try {
  5003. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5004. if (Array.isArray(parsed) && parsed.length > 0) {
  5005. this.clockInSteps = parsed;
  5006. formatAppLog("log", "at pages/orders/detail-logic.js:163", "解析打卡步骤:", this.clockInSteps);
  5007. }
  5008. } catch (parseErr) {
  5009. formatAppLog("error", "at pages/orders/detail-logic.js:166", "解析 clockInRemark 失败:", parseErr);
  5010. }
  5011. }
  5012. }
  5013. } catch (err) {
  5014. formatAppLog("error", "at pages/orders/detail-logic.js:171", "获取服务类型详情失败:", err);
  5015. }
  5016. },
  5017. async loadOrderDetail() {
  5018. if (!this.orderId) {
  5019. formatAppLog("log", "at pages/orders/detail-logic.js:176", "订单ID缺失");
  5020. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5021. return;
  5022. }
  5023. try {
  5024. formatAppLog("log", "at pages/orders/detail-logic.js:181", "请求订单详情,ID:", this.orderId);
  5025. const res = await getOrderInfo(this.orderId);
  5026. formatAppLog("log", "at pages/orders/detail-logic.js:183", "订单详情响应:", res);
  5027. const order = res.data;
  5028. if (!order) {
  5029. formatAppLog("log", "at pages/orders/detail-logic.js:186", "订单数据为空");
  5030. uni.showToast({ title: "订单不存在", icon: "none" });
  5031. return;
  5032. }
  5033. formatAppLog("log", "at pages/orders/detail-logic.js:190", "订单数据:", order);
  5034. this.serviceId = order.service;
  5035. this.petId = order.usrPet || null;
  5036. this.transformOrderData(order);
  5037. formatAppLog("log", "at pages/orders/detail-logic.js:194", "解析出的 serviceId:", this.serviceId);
  5038. if (this.serviceId) {
  5039. await this.loadServiceDetail(this.serviceId);
  5040. } else {
  5041. formatAppLog("warn", "at pages/orders/detail-logic.js:200", "订单中未找到 service 字段,无法加载服务步骤");
  5042. }
  5043. if (this.petId) {
  5044. await this.loadPetDetail(this.petId);
  5045. }
  5046. await this.loadOrderLogs();
  5047. } catch (err) {
  5048. formatAppLog("error", "at pages/orders/detail-logic.js:211", "获取订单详情失败:", err);
  5049. uni.showToast({ title: "加载失败", icon: "none" });
  5050. }
  5051. },
  5052. async loadOrderLogs() {
  5053. try {
  5054. const res = await getOrderLogs(this.orderId);
  5055. const logs = res.data || [];
  5056. formatAppLog("log", "at pages/orders/detail-logic.js:219", "订单日志:", logs);
  5057. const progressLogs = logs.filter((log) => log.logType === 1);
  5058. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5059. status: log.title || "",
  5060. time: log.createTime || "",
  5061. medias: log.photoUrls || [],
  5062. remark: log.content || ""
  5063. }));
  5064. 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());
  5065. if (validLogs.length > 0) {
  5066. const latestLog = validLogs[0];
  5067. const latestStep = latestLog.step;
  5068. formatAppLog("log", "at pages/orders/detail-logic.js:238", "最新打卡日志 step:", latestStep);
  5069. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5070. if (stepIndex >= 0) {
  5071. this.currentStep = stepIndex + 1;
  5072. } else {
  5073. this.currentStep = Number(latestStep);
  5074. }
  5075. } else {
  5076. this.currentStep = 0;
  5077. }
  5078. this.updateCurrentClockIn();
  5079. formatAppLog("log", "at pages/orders/detail-logic.js:254", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5080. } catch (err) {
  5081. formatAppLog("error", "at pages/orders/detail-logic.js:256", "获取订单日志失败:", err);
  5082. }
  5083. },
  5084. /**
  5085. * 根据 currentStep 更新当前打卡信息
  5086. */
  5087. updateCurrentClockIn() {
  5088. if (this.currentStep < this.clockInSteps.length) {
  5089. this.currentClockIn = this.clockInSteps[this.currentStep];
  5090. } else {
  5091. this.currentClockIn = null;
  5092. }
  5093. },
  5094. transformOrderData(order) {
  5095. const mode = order.mode || 0;
  5096. const isRoundTrip = mode === 1;
  5097. this.orderType = isRoundTrip ? 1 : 2;
  5098. this.orderStatus = order.status || 2;
  5099. this.orderDetail = {
  5100. type: this.orderType,
  5101. price: (order.price / 100).toFixed(2),
  5102. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5103. time: order.serviceTime || "",
  5104. petAvatar: "/static/dog.png",
  5105. petName: order.petName || order.contact || "",
  5106. petBreed: order.breed || "",
  5107. serviceTag: order.groupPurchasePackageName || "",
  5108. startLocation: order.fromAddress || "",
  5109. startAddress: order.fromAddress || "",
  5110. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5111. endAddress: order.toAddress || "",
  5112. customerPhone: order.contactPhoneNumber || "",
  5113. ownerName: order.contact || "",
  5114. // 宠主姓名(默认使用客户姓名)
  5115. serviceContent: "",
  5116. remark: "",
  5117. orderNo: order.code || "T" + order.id,
  5118. createTime: order.serviceTime || "",
  5119. nursingSummary: order.nursingSummary || "",
  5120. fulfillerName: order.fulfillerName || "",
  5121. // 履约者/护宠师姓名
  5122. progressLogs: [
  5123. { status: "您已接单", time: order.serviceTime || "" }
  5124. ]
  5125. };
  5126. if (this.orderDetail.fulfillerName) {
  5127. this.sumSigner = this.orderDetail.fulfillerName;
  5128. }
  5129. },
  5130. /**
  5131. * 根据宠物ID获取宠物档案详情
  5132. */
  5133. async loadPetDetail(petId) {
  5134. try {
  5135. const res = await getPetDetail(petId);
  5136. const pet = res.data;
  5137. if (pet) {
  5138. this.petDetail = pet;
  5139. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5140. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5141. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5142. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5143. formatAppLog("log", "at pages/orders/detail-logic.js:321", "宠物档案:", pet);
  5144. }
  5145. } catch (err) {
  5146. formatAppLog("error", "at pages/orders/detail-logic.js:324", "获取宠物档案失败:", err);
  5147. }
  5148. },
  5149. /**
  5150. * 加载异常记录列表
  5151. */
  5152. async loadAnomalyList() {
  5153. if (!this.orderId)
  5154. return;
  5155. try {
  5156. const res = await getAnomalyList(this.orderId);
  5157. const list = res.data || [];
  5158. this.anomalyList = list.map((item) => {
  5159. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5160. return {
  5161. ...item,
  5162. typeLabel: dict ? dict.label : item.type,
  5163. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5164. photoUrls: item.photoUrls || []
  5165. };
  5166. });
  5167. } catch (err) {
  5168. formatAppLog("error", "at pages/orders/detail-logic.js:347", "获取异常列表失败:", err);
  5169. }
  5170. },
  5171. async loadAnomalyTypeDict() {
  5172. try {
  5173. const res = await getDictDataByType("flf_anamaly_type");
  5174. this.anomalyTypeDict = res.data.map((item) => ({
  5175. label: item.dictLabel,
  5176. value: item.dictValue
  5177. }));
  5178. } catch (err) {
  5179. formatAppLog("error", "at pages/orders/detail-logic.js:358", "获取异常字典失败:", err);
  5180. }
  5181. },
  5182. openAnomalyModal() {
  5183. this.showAnomalyModal = true;
  5184. this.loadAnomalyList();
  5185. },
  5186. closeAnomalyModal() {
  5187. this.showAnomalyModal = false;
  5188. },
  5189. getAnomalyStatusLabel(status) {
  5190. const map = {
  5191. 0: "待审核",
  5192. 1: "已通过",
  5193. 2: "已驳回"
  5194. };
  5195. return map[status] || "未知";
  5196. },
  5197. updateStepByStatus() {
  5198. if (this.orderStatus === 2) {
  5199. this.currentStep = 0;
  5200. } else if (this.orderStatus === 3) {
  5201. this.currentStep = 1;
  5202. } else if (this.orderStatus === 4) {
  5203. this.currentStep = this.steps.length - 1;
  5204. } else {
  5205. this.currentStep = 0;
  5206. }
  5207. },
  5208. showPetProfile() {
  5209. const pet = this.petDetail;
  5210. if (pet) {
  5211. this.currentPetInfo = {
  5212. petAvatar: pet.avatarUrl || "/static/dog.png",
  5213. petName: pet.name || "",
  5214. petBreed: pet.breed || "",
  5215. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5216. petAge: pet.age ? pet.age + "岁" : "未知",
  5217. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5218. petPersonality: pet.personality || pet.cutePersonality || "无",
  5219. petHobby: "",
  5220. petRemark: pet.remark || "无",
  5221. petTags: (pet.tags || []).map((t) => t.name),
  5222. petLogs: [],
  5223. // 额外信息
  5224. petSize: pet.size || "",
  5225. petIsSterilized: pet.isSterilized,
  5226. petHealthStatus: pet.healthStatus || "",
  5227. petAllergies: pet.allergies || "",
  5228. petMedicalHistory: pet.medicalHistory || "",
  5229. petVaccineStatus: pet.vaccineStatus || "",
  5230. ownerName: pet.ownerName || "",
  5231. ownerPhone: pet.ownerPhone || ""
  5232. };
  5233. } else {
  5234. this.currentPetInfo = {
  5235. ...this.orderDetail,
  5236. petGender: "",
  5237. petAge: "未知",
  5238. petWeight: "未知",
  5239. petPersonality: "无",
  5240. petHobby: "",
  5241. petRemark: "无",
  5242. petTags: [],
  5243. petLogs: []
  5244. };
  5245. }
  5246. this.showPetModal = true;
  5247. },
  5248. closePetProfile() {
  5249. this.showPetModal = false;
  5250. },
  5251. openPetRemarkInput() {
  5252. this.petRemarkText = "";
  5253. this.showPetRemarkInput = true;
  5254. },
  5255. closePetRemarkInput() {
  5256. this.showPetRemarkInput = false;
  5257. },
  5258. submitPetRemark() {
  5259. if (!this.petRemarkText.trim()) {
  5260. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5261. return;
  5262. }
  5263. const now = /* @__PURE__ */ new Date();
  5264. const date = `${now.getFullYear()}/${String(now.getMonth() + 1).padStart(2, "0")}/${String(now.getDate()).padStart(2, "0")}`;
  5265. if (!this.currentPetInfo.petLogs) {
  5266. this.currentPetInfo.petLogs = [];
  5267. }
  5268. this.currentPetInfo.petLogs.unshift({
  5269. date,
  5270. content: this.petRemarkText,
  5271. recorder: this.orderDetail.fulfillerName || "未知"
  5272. });
  5273. this.closePetRemarkInput();
  5274. uni.showToast({ title: "备注已添加", icon: "success" });
  5275. },
  5276. goToAnomaly() {
  5277. uni.navigateTo({
  5278. url: "/pages/orders/anomaly?orderId=" + (this.orderDetail.orderNo || "")
  5279. });
  5280. },
  5281. callPhone() {
  5282. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5283. uni.makePhoneCall({ phoneNumber: phoneNum });
  5284. },
  5285. openNavigation(type) {
  5286. this.navTargetPointType = type;
  5287. this.showNavModal = true;
  5288. },
  5289. closeNavModal() {
  5290. this.showNavModal = false;
  5291. },
  5292. chooseMap(mapType) {
  5293. let pointType = this.navTargetPointType;
  5294. let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
  5295. let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
  5296. this.showNavModal = false;
  5297. uni.openLocation({
  5298. latitude: 30.52,
  5299. // Mock lat
  5300. longitude: 114.31,
  5301. // Mock lng
  5302. name: name || "目的地",
  5303. address: address || "默认地址",
  5304. success: function() {
  5305. formatAppLog("log", "at pages/orders/detail-logic.js:486", "打开导航成功: " + mapType);
  5306. }
  5307. });
  5308. },
  5309. openUploadModal() {
  5310. this.modalMediaList = [];
  5311. this.modalRemark = "";
  5312. this.showUploadModal = true;
  5313. },
  5314. closeUploadModal() {
  5315. this.showUploadModal = false;
  5316. },
  5317. handleConfirmUpload() {
  5318. formatAppLog("log", "at pages/orders/detail-logic.js:499", "handleConfirmUpload被调用");
  5319. this.confirmUploadModal();
  5320. },
  5321. async chooseModalMedia() {
  5322. formatAppLog("log", "at pages/orders/detail-logic.js:503", "chooseModalMedia被调用");
  5323. uni.chooseMedia({
  5324. count: 5 - this.modalMediaList.length,
  5325. mediaType: ["image", "video"],
  5326. sourceType: ["album", "camera"],
  5327. success: async (res) => {
  5328. formatAppLog("log", "at pages/orders/detail-logic.js:510", "选择媒体文件成功:", res.tempFiles);
  5329. uni.showLoading({ title: "上传中...", mask: true });
  5330. try {
  5331. for (const file of res.tempFiles) {
  5332. const filePath = file.tempFilePath;
  5333. const fileType = file.fileType;
  5334. formatAppLog("log", "at pages/orders/detail-logic.js:516", "开始上传文件:", filePath, "类型:", fileType);
  5335. const uploadRes = await uploadFile(filePath);
  5336. formatAppLog("log", "at pages/orders/detail-logic.js:519", "服务器响应:", uploadRes);
  5337. if (uploadRes.code === 200) {
  5338. this.modalMediaList.push({
  5339. url: uploadRes.data.url,
  5340. ossId: uploadRes.data.ossId,
  5341. localPath: filePath,
  5342. mediaType: fileType,
  5343. thumb: file.thumbTempFilePath
  5344. // 视频缩略图(如果有)
  5345. });
  5346. formatAppLog("log", "at pages/orders/detail-logic.js:529", "媒体文件添加成功");
  5347. }
  5348. }
  5349. uni.hideLoading();
  5350. uni.showToast({ title: "上传成功", icon: "success" });
  5351. } catch (err) {
  5352. uni.hideLoading();
  5353. formatAppLog("error", "at pages/orders/detail-logic.js:536", "上传失败详情:", err);
  5354. uni.showToast({ title: "上传失败", icon: "none" });
  5355. }
  5356. },
  5357. fail: (err) => {
  5358. formatAppLog("error", "at pages/orders/detail-logic.js:541", "选择媒体文件失败:", err);
  5359. }
  5360. });
  5361. },
  5362. removeModalMedia(index) {
  5363. this.modalMediaList.splice(index, 1);
  5364. },
  5365. getCurrentTime() {
  5366. const now = /* @__PURE__ */ new Date();
  5367. const y = now.getFullYear();
  5368. const m = String(now.getMonth() + 1).padStart(2, "0");
  5369. const d = String(now.getDate()).padStart(2, "0");
  5370. const h = String(now.getHours()).padStart(2, "0");
  5371. const min = String(now.getMinutes()).padStart(2, "0");
  5372. return `${y}/${m}/${d} ${h}:${min}`;
  5373. },
  5374. async confirmUploadModal() {
  5375. formatAppLog("log", "at pages/orders/detail-logic.js:559", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5376. if (this.modalMediaList.length === 0) {
  5377. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5378. return;
  5379. }
  5380. try {
  5381. uni.showLoading({ title: "提交中..." });
  5382. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5383. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5384. formatAppLog("log", "at pages/orders/detail-logic.js:570", "准备打卡,ossIds:", ossIds);
  5385. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5386. const clockInData = {
  5387. orderId: this.orderId,
  5388. photos: ossIds,
  5389. content: this.modalRemark || "",
  5390. step: clockInType,
  5391. title: this.currentTaskTitle,
  5392. startFlag: Number(clockInType) === 1,
  5393. endFlag: Number(this.currentStep) === this.steps.length - 1
  5394. };
  5395. formatAppLog("log", "at pages/orders/detail-logic.js:585", "打卡数据:", clockInData);
  5396. await clockIn(clockInData);
  5397. uni.hideLoading();
  5398. this.closeUploadModal();
  5399. uni.showToast({ title: "打卡成功", icon: "success" });
  5400. await this.loadOrderDetail();
  5401. } catch (err) {
  5402. uni.hideLoading();
  5403. formatAppLog("error", "at pages/orders/detail-logic.js:595", "打卡失败:", err);
  5404. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5405. }
  5406. },
  5407. copyOrderNo() {
  5408. uni.setClipboardData({
  5409. data: this.orderDetail.orderNo,
  5410. success: () => {
  5411. uni.showToast({ title: "复制成功", icon: "none" });
  5412. }
  5413. });
  5414. },
  5415. openSumModal() {
  5416. let displayDate = "";
  5417. if (this.orderDetail.time) {
  5418. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5419. } else {
  5420. const now = /* @__PURE__ */ new Date();
  5421. const y = now.getFullYear();
  5422. const m = String(now.getMonth() + 1).padStart(2, "0");
  5423. const d = String(now.getDate()).padStart(2, "0");
  5424. displayDate = `${y}/${m}/${d}`;
  5425. }
  5426. this.sumDate = displayDate;
  5427. if (this.orderDetail.nursingSummary) {
  5428. this.sumContent = this.orderDetail.nursingSummary;
  5429. } else if (!this.sumContent) {
  5430. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5431. }
  5432. this.showSumModal = true;
  5433. },
  5434. closeSumModal() {
  5435. this.showSumModal = false;
  5436. },
  5437. async submitSumModal() {
  5438. if (!this.sumContent.trim()) {
  5439. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5440. return;
  5441. }
  5442. uni.showLoading({ title: "提交中...", mask: true });
  5443. try {
  5444. const res = await submitNursingSummary({
  5445. orderId: this.orderId,
  5446. content: this.sumContent
  5447. });
  5448. uni.hideLoading();
  5449. if (res.code === 200) {
  5450. uni.showToast({ title: "小结已提交", icon: "success" });
  5451. this.closeSumModal();
  5452. await this.loadOrderDetail();
  5453. } else {
  5454. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5455. }
  5456. } catch (err) {
  5457. uni.hideLoading();
  5458. formatAppLog("error", "at pages/orders/detail-logic.js:663", "提交宠护小结失败:", err);
  5459. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5460. }
  5461. },
  5462. /**
  5463. * 检查是否为视频
  5464. */
  5465. isVideo(url) {
  5466. if (!url)
  5467. return false;
  5468. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5469. const lowerUrl = url.toLowerCase();
  5470. return videoExts.some((ext) => lowerUrl.includes(ext));
  5471. },
  5472. /**
  5473. * 获取视频封面图 (第一帧)
  5474. * 兼容阿里云、腾讯云等主流 OSS
  5475. */
  5476. getVideoPoster(url) {
  5477. if (!this.isVideo(url))
  5478. return url;
  5479. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5480. return url;
  5481. }
  5482. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5483. const tencent = `?ci-process=snapshot&time=1`;
  5484. if (url.includes("myqcloud.com")) {
  5485. return url + tencent;
  5486. }
  5487. return url + aliyun;
  5488. },
  5489. /**
  5490. * 统一预览媒体
  5491. */
  5492. previewMedia(medias, currentIdx) {
  5493. const url = medias[currentIdx];
  5494. if (this.isVideo(url)) {
  5495. this.videoPlayerUrl = url;
  5496. this.videoPlayerShow = true;
  5497. } else {
  5498. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5499. const currentImgUrl = url;
  5500. const newIdx = imageUrls.indexOf(currentImgUrl);
  5501. uni.previewImage({
  5502. current: newIdx >= 0 ? newIdx : 0,
  5503. urls: imageUrls
  5504. });
  5505. }
  5506. },
  5507. closeVideoPlayer() {
  5508. this.videoPlayerShow = false;
  5509. this.videoPlayerUrl = "";
  5510. }
  5511. }
  5512. };
  5513. const _imports_14 = "/static/icons/phone_orange.svg";
  5514. const _imports_1$7 = "/static/icons/clock.svg";
  5515. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5516. const _imports_4$1 = "/static/icons/heart.svg";
  5517. const _imports_5 = "/static/icons/file.svg";
  5518. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5519. const _imports_7 = "/static/icons/order_no.svg";
  5520. const _imports_8$1 = "/static/icons/play_circle.svg";
  5521. const _imports_9$1 = "/static/empty-rest.png";
  5522. const _sfc_main$q = {
  5523. ...logic$1
  5524. };
  5525. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  5526. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5527. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5528. key: 0,
  5529. class: "loading-container"
  5530. }, [
  5531. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5532. vue.createElementVNode("view", {
  5533. class: "skeleton-line skeleton-ani",
  5534. style: { "width": "30%", "height": "36rpx" }
  5535. }),
  5536. vue.createElementVNode("view", {
  5537. class: "skeleton-line skeleton-ani",
  5538. style: { "width": "20%", "height": "36rpx" }
  5539. })
  5540. ]),
  5541. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5542. (vue.openBlock(), vue.createElementBlock(
  5543. vue.Fragment,
  5544. null,
  5545. vue.renderList(4, (i) => {
  5546. return vue.createElementVNode("view", {
  5547. class: "skeleton-circle skeleton-ani",
  5548. key: i
  5549. });
  5550. }),
  5551. 64
  5552. /* STABLE_FRAGMENT */
  5553. ))
  5554. ]),
  5555. (vue.openBlock(), vue.createElementBlock(
  5556. vue.Fragment,
  5557. null,
  5558. vue.renderList(3, (j) => {
  5559. return vue.createElementVNode("view", {
  5560. class: "skeleton-card",
  5561. key: "c" + j
  5562. }, [
  5563. vue.createElementVNode("view", {
  5564. class: "skeleton-line skeleton-ani",
  5565. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  5566. }),
  5567. vue.createElementVNode("view", {
  5568. class: "skeleton-line skeleton-ani",
  5569. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  5570. }),
  5571. vue.createElementVNode("view", {
  5572. class: "skeleton-line skeleton-ani",
  5573. style: { "width": "75%", "height": "24rpx" }
  5574. })
  5575. ]);
  5576. }),
  5577. 64
  5578. /* STABLE_FRAGMENT */
  5579. ))
  5580. ])) : (vue.openBlock(), vue.createElementBlock(
  5581. vue.Fragment,
  5582. { key: 1 },
  5583. [
  5584. vue.createElementVNode("view", { class: "detail-header" }, [
  5585. vue.createElementVNode("view", { class: "status-row" }, [
  5586. vue.createElementVNode(
  5587. "text",
  5588. { class: "status-title" },
  5589. vue.toDisplayString(_ctx.displayStatusText),
  5590. 1
  5591. /* TEXT */
  5592. ),
  5593. vue.createElementVNode(
  5594. "text",
  5595. { class: "status-price" },
  5596. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  5597. 1
  5598. /* TEXT */
  5599. )
  5600. ]),
  5601. vue.createElementVNode("view", { class: "progress-bar" }, [
  5602. (vue.openBlock(true), vue.createElementBlock(
  5603. vue.Fragment,
  5604. null,
  5605. vue.renderList(_ctx.progressSteps, (step, index) => {
  5606. return vue.openBlock(), vue.createElementBlock(
  5607. "view",
  5608. {
  5609. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  5610. key: index
  5611. },
  5612. [
  5613. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  5614. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  5615. "view",
  5616. {
  5617. key: 0,
  5618. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  5619. },
  5620. null,
  5621. 2
  5622. /* CLASS */
  5623. )) : vue.createCommentVNode("v-if", true),
  5624. vue.createElementVNode(
  5625. "view",
  5626. { class: "step-circle" },
  5627. vue.toDisplayString(index + 1),
  5628. 1
  5629. /* TEXT */
  5630. )
  5631. ]),
  5632. vue.createElementVNode(
  5633. "text",
  5634. { class: "step-text" },
  5635. vue.toDisplayString(step),
  5636. 1
  5637. /* TEXT */
  5638. )
  5639. ],
  5640. 2
  5641. /* CLASS */
  5642. );
  5643. }),
  5644. 128
  5645. /* KEYED_FRAGMENT */
  5646. ))
  5647. ])
  5648. ]),
  5649. vue.createElementVNode("scroll-view", {
  5650. "scroll-y": "",
  5651. class: "detail-content"
  5652. }, [
  5653. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  5654. vue.createElementVNode("image", {
  5655. class: "pb-avatar",
  5656. src: _ctx.orderDetail.petAvatar,
  5657. mode: "aspectFill"
  5658. }, null, 8, ["src"]),
  5659. vue.createElementVNode("view", { class: "pb-info" }, [
  5660. vue.createElementVNode("view", { class: "pb-name-row" }, [
  5661. vue.createElementVNode(
  5662. "text",
  5663. { class: "pb-name" },
  5664. vue.toDisplayString(_ctx.orderDetail.petName),
  5665. 1
  5666. /* TEXT */
  5667. ),
  5668. vue.createElementVNode(
  5669. "text",
  5670. { class: "pb-breed" },
  5671. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed),
  5672. 1
  5673. /* TEXT */
  5674. )
  5675. ]),
  5676. vue.createElementVNode("view", { class: "pb-tags" }, [
  5677. vue.createElementVNode(
  5678. "text",
  5679. { class: "pb-tag" },
  5680. vue.toDisplayString(_ctx.orderDetail.serviceTag),
  5681. 1
  5682. /* TEXT */
  5683. )
  5684. ])
  5685. ]),
  5686. vue.createElementVNode("view", { class: "pb-actions" }, [
  5687. vue.createElementVNode("view", {
  5688. class: "pb-btn profile-btn",
  5689. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  5690. }, "宠物档案"),
  5691. vue.createElementVNode("view", {
  5692. class: "pb-btn phone-btn",
  5693. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  5694. }, [
  5695. vue.createElementVNode("image", {
  5696. class: "phone-icon",
  5697. src: _imports_14
  5698. })
  5699. ])
  5700. ])
  5701. ]),
  5702. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  5703. vue.createElementVNode("view", { class: "si-row time-row" }, [
  5704. vue.createElementVNode("image", {
  5705. class: "si-icon outline",
  5706. src: _imports_1$7
  5707. }),
  5708. vue.createElementVNode("view", { class: "si-content" }, [
  5709. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  5710. vue.createElementVNode(
  5711. "text",
  5712. { class: "si-val" },
  5713. vue.toDisplayString(_ctx.orderDetail.time),
  5714. 1
  5715. /* TEXT */
  5716. )
  5717. ]),
  5718. vue.createElementVNode("view", {
  5719. class: "si-action record-btn",
  5720. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  5721. }, [
  5722. vue.createElementVNode("text", null, "异常记录"),
  5723. vue.createElementVNode("image", {
  5724. class: "record-arrow",
  5725. src: _imports_0$2
  5726. })
  5727. ])
  5728. ]),
  5729. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  5730. vue.Fragment,
  5731. { key: 0 },
  5732. [
  5733. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  5734. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  5735. vue.createElementVNode("view", { class: "route-line-vertical" }),
  5736. vue.createElementVNode("view", { class: "si-content" }, [
  5737. vue.createElementVNode(
  5738. "text",
  5739. { class: "si-addr-title" },
  5740. vue.toDisplayString(_ctx.orderDetail.startLocation),
  5741. 1
  5742. /* TEXT */
  5743. ),
  5744. vue.createElementVNode(
  5745. "text",
  5746. { class: "si-addr-desc" },
  5747. vue.toDisplayString(_ctx.orderDetail.startAddress),
  5748. 1
  5749. /* TEXT */
  5750. )
  5751. ]),
  5752. vue.createElementVNode("view", {
  5753. class: "nav-btn-circle",
  5754. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  5755. }, [
  5756. vue.createElementVNode("image", {
  5757. class: "nav-arrow",
  5758. src: _imports_3$2
  5759. })
  5760. ])
  5761. ]),
  5762. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5763. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  5764. vue.createElementVNode("view", { class: "si-content" }, [
  5765. vue.createElementVNode(
  5766. "text",
  5767. { class: "si-addr-title" },
  5768. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5769. 1
  5770. /* TEXT */
  5771. ),
  5772. vue.createElementVNode(
  5773. "text",
  5774. { class: "si-addr-desc" },
  5775. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5776. 1
  5777. /* TEXT */
  5778. )
  5779. ]),
  5780. vue.createElementVNode("view", {
  5781. class: "nav-btn-circle",
  5782. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  5783. }, [
  5784. vue.createElementVNode("image", {
  5785. class: "nav-arrow",
  5786. src: _imports_3$2
  5787. })
  5788. ])
  5789. ])
  5790. ],
  5791. 64
  5792. /* STABLE_FRAGMENT */
  5793. )) : (vue.openBlock(), vue.createElementBlock(
  5794. vue.Fragment,
  5795. { key: 1 },
  5796. [
  5797. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5798. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  5799. vue.createElementVNode("view", { class: "si-content" }, [
  5800. vue.createElementVNode(
  5801. "text",
  5802. { class: "si-addr-title" },
  5803. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5804. 1
  5805. /* TEXT */
  5806. ),
  5807. vue.createElementVNode(
  5808. "text",
  5809. { class: "si-addr-desc" },
  5810. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5811. 1
  5812. /* TEXT */
  5813. )
  5814. ]),
  5815. vue.createElementVNode("view", {
  5816. class: "nav-btn-circle",
  5817. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  5818. }, [
  5819. vue.createElementVNode("image", {
  5820. class: "nav-arrow",
  5821. src: _imports_3$2
  5822. })
  5823. ])
  5824. ]),
  5825. vue.createElementVNode("view", { class: "si-row" }, [
  5826. vue.createElementVNode("image", {
  5827. class: "si-icon outline",
  5828. src: _imports_4$1
  5829. }),
  5830. vue.createElementVNode("view", { class: "si-content" }, [
  5831. vue.createElementVNode("text", { class: "si-label" }, "服务内容"),
  5832. vue.createElementVNode(
  5833. "text",
  5834. { class: "si-val" },
  5835. vue.toDisplayString(_ctx.orderDetail.serviceContent),
  5836. 1
  5837. /* TEXT */
  5838. )
  5839. ])
  5840. ])
  5841. ],
  5842. 64
  5843. /* STABLE_FRAGMENT */
  5844. )),
  5845. vue.createElementVNode("view", { class: "si-row" }, [
  5846. vue.createElementVNode("image", {
  5847. class: "si-icon outline custom-icon-file",
  5848. src: _imports_5
  5849. }),
  5850. vue.createElementVNode("view", { class: "si-content" }, [
  5851. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  5852. vue.createElementVNode(
  5853. "text",
  5854. { class: "si-val" },
  5855. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  5856. 1
  5857. /* TEXT */
  5858. )
  5859. ])
  5860. ])
  5861. ]),
  5862. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  5863. key: 0,
  5864. class: "white-card task-card"
  5865. }, [
  5866. vue.createElementVNode(
  5867. "text",
  5868. { class: "tc-title" },
  5869. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  5870. 1
  5871. /* TEXT */
  5872. ),
  5873. vue.createElementVNode(
  5874. "text",
  5875. { class: "tc-desc" },
  5876. vue.toDisplayString(_ctx.currentTaskDesc),
  5877. 1
  5878. /* TEXT */
  5879. ),
  5880. vue.createElementVNode("view", {
  5881. class: "full-media-add",
  5882. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  5883. }, [
  5884. vue.createElementVNode("image", {
  5885. class: "upload-icon-large",
  5886. src: _imports_1$6
  5887. }),
  5888. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  5889. ])
  5890. ])) : vue.createCommentVNode("v-if", true),
  5891. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  5892. vue.createElementVNode("view", { class: "bi-row" }, [
  5893. vue.createElementVNode("image", {
  5894. class: "si-icon outline",
  5895. src: _imports_7
  5896. }),
  5897. vue.createElementVNode("view", { class: "bi-content" }, [
  5898. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  5899. vue.createElementVNode("view", { class: "bi-val-row" }, [
  5900. vue.createElementVNode(
  5901. "text",
  5902. { class: "bi-val" },
  5903. vue.toDisplayString(_ctx.orderDetail.orderNo),
  5904. 1
  5905. /* TEXT */
  5906. ),
  5907. vue.createElementVNode("text", {
  5908. class: "bi-copy",
  5909. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  5910. }, "复制")
  5911. ])
  5912. ])
  5913. ]),
  5914. vue.createElementVNode("view", { class: "bi-row" }, [
  5915. vue.createElementVNode("image", {
  5916. class: "si-icon outline",
  5917. src: _imports_1$7
  5918. }),
  5919. vue.createElementVNode("view", { class: "bi-content" }, [
  5920. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  5921. vue.createElementVNode(
  5922. "text",
  5923. { class: "bi-val" },
  5924. vue.toDisplayString(_ctx.orderDetail.createTime),
  5925. 1
  5926. /* TEXT */
  5927. )
  5928. ])
  5929. ])
  5930. ]),
  5931. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  5932. vue.createElementVNode("view", { class: "tl-title-row" }, [
  5933. vue.createElementVNode("view", { class: "orange-bar" }),
  5934. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  5935. ]),
  5936. vue.createElementVNode("view", { class: "tl-list" }, [
  5937. (vue.openBlock(true), vue.createElementBlock(
  5938. vue.Fragment,
  5939. null,
  5940. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  5941. return vue.openBlock(), vue.createElementBlock("view", {
  5942. class: "tl-item",
  5943. key: idx
  5944. }, [
  5945. vue.createElementVNode("view", { class: "tl-marker active" }, [
  5946. vue.createElementVNode("view", { class: "tl-dot-inner" })
  5947. ]),
  5948. vue.createElementVNode("view", { class: "tl-content-row" }, [
  5949. vue.createElementVNode("view", { class: "tl-header" }, [
  5950. vue.createElementVNode(
  5951. "text",
  5952. { class: "tl-status" },
  5953. vue.toDisplayString(log.status),
  5954. 1
  5955. /* TEXT */
  5956. ),
  5957. vue.createElementVNode(
  5958. "text",
  5959. { class: "tl-time" },
  5960. vue.toDisplayString(log.time),
  5961. 1
  5962. /* TEXT */
  5963. )
  5964. ]),
  5965. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  5966. key: 0,
  5967. class: "tl-medias"
  5968. }, [
  5969. (vue.openBlock(true), vue.createElementBlock(
  5970. vue.Fragment,
  5971. null,
  5972. vue.renderList(log.medias, (media, midx) => {
  5973. return vue.openBlock(), vue.createElementBlock("view", {
  5974. class: "tl-media-item",
  5975. key: midx,
  5976. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  5977. }, [
  5978. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  5979. key: 0,
  5980. class: "tl-img",
  5981. src: media,
  5982. mode: "aspectFill"
  5983. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  5984. key: 1,
  5985. class: "tl-video-placeholder"
  5986. }, [
  5987. vue.createElementVNode("view", { class: "tl-play-icon" }),
  5988. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  5989. ]))
  5990. ], 8, ["onClick"]);
  5991. }),
  5992. 128
  5993. /* KEYED_FRAGMENT */
  5994. ))
  5995. ])) : vue.createCommentVNode("v-if", true),
  5996. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  5997. key: 1,
  5998. class: "tl-remark"
  5999. }, [
  6000. vue.createElementVNode(
  6001. "text",
  6002. null,
  6003. vue.toDisplayString(log.remark),
  6004. 1
  6005. /* TEXT */
  6006. )
  6007. ])) : vue.createCommentVNode("v-if", true)
  6008. ])
  6009. ]);
  6010. }),
  6011. 128
  6012. /* KEYED_FRAGMENT */
  6013. ))
  6014. ])
  6015. ]),
  6016. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6017. ]),
  6018. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6019. vue.createElementVNode("view", { class: "action-left" }, [
  6020. vue.createElementVNode("button", {
  6021. class: "action-btn outline grey-outline",
  6022. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6023. }, "异常上报"),
  6024. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6025. key: 0,
  6026. class: "action-btn outline orange-outline",
  6027. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6028. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6029. ]),
  6030. vue.createElementVNode("view", { class: "action-right" }, [
  6031. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6032. "button",
  6033. {
  6034. key: 0,
  6035. class: "action-btn primary",
  6036. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6037. },
  6038. vue.toDisplayString(_ctx.currentTaskTitle),
  6039. 1
  6040. /* TEXT */
  6041. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6042. key: 1,
  6043. class: "action-btn primary grey-bg"
  6044. }, "已完成"))
  6045. ])
  6046. ]),
  6047. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6048. key: 0,
  6049. class: "pet-modal-mask",
  6050. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6051. }, [
  6052. vue.createElementVNode("view", {
  6053. class: "pet-modal-content",
  6054. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6055. }, ["stop"]))
  6056. }, [
  6057. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6058. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6059. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6060. vue.createElementVNode("view", {
  6061. class: "pm-remark-btn",
  6062. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6063. }, "备注"),
  6064. vue.createElementVNode("view", {
  6065. class: "close-icon-btn",
  6066. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6067. }, "×")
  6068. ]),
  6069. vue.createElementVNode("scroll-view", {
  6070. "scroll-y": "",
  6071. class: "pet-modal-scroll"
  6072. }, [
  6073. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6074. vue.createElementVNode("image", {
  6075. class: "pm-avatar",
  6076. src: _ctx.currentPetInfo.petAvatar,
  6077. mode: "aspectFill"
  6078. }, null, 8, ["src"]),
  6079. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6080. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6081. vue.createElementVNode(
  6082. "text",
  6083. { class: "pm-name" },
  6084. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6085. 1
  6086. /* TEXT */
  6087. ),
  6088. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6089. key: 0,
  6090. class: "pm-gender"
  6091. }, [
  6092. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6093. vue.createElementVNode("text", null, "公")
  6094. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6095. key: 1,
  6096. class: "pm-gender female"
  6097. }, [
  6098. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6099. vue.createElementVNode("text", null, "母")
  6100. ])) : vue.createCommentVNode("v-if", true)
  6101. ]),
  6102. vue.createElementVNode(
  6103. "text",
  6104. { class: "pm-breed" },
  6105. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6106. 1
  6107. /* TEXT */
  6108. )
  6109. ])
  6110. ]),
  6111. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6112. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6113. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6114. vue.createElementVNode(
  6115. "text",
  6116. { class: "pm-val" },
  6117. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6118. 1
  6119. /* TEXT */
  6120. )
  6121. ]),
  6122. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6123. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6124. vue.createElementVNode(
  6125. "text",
  6126. { class: "pm-val" },
  6127. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6128. 1
  6129. /* TEXT */
  6130. )
  6131. ]),
  6132. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6133. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6134. vue.createElementVNode(
  6135. "text",
  6136. { class: "pm-val" },
  6137. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6138. 1
  6139. /* TEXT */
  6140. )
  6141. ]),
  6142. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6143. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6144. vue.createElementVNode(
  6145. "text",
  6146. { class: "pm-val" },
  6147. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6148. 1
  6149. /* TEXT */
  6150. )
  6151. ]),
  6152. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6153. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6154. vue.createElementVNode(
  6155. "text",
  6156. { class: "pm-val" },
  6157. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6158. 1
  6159. /* TEXT */
  6160. )
  6161. ])
  6162. ]),
  6163. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6164. key: 0,
  6165. class: "pm-tags-row"
  6166. }, [
  6167. (vue.openBlock(true), vue.createElementBlock(
  6168. vue.Fragment,
  6169. null,
  6170. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6171. return vue.openBlock(), vue.createElementBlock("view", {
  6172. class: "pm-tag-chip",
  6173. key: ti
  6174. }, [
  6175. vue.createElementVNode(
  6176. "text",
  6177. { class: "pm-tag-chip-text" },
  6178. vue.toDisplayString(tag),
  6179. 1
  6180. /* TEXT */
  6181. )
  6182. ]);
  6183. }),
  6184. 128
  6185. /* KEYED_FRAGMENT */
  6186. ))
  6187. ])) : vue.createCommentVNode("v-if", true),
  6188. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6189. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6190. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6191. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6192. ]),
  6193. (vue.openBlock(true), vue.createElementBlock(
  6194. vue.Fragment,
  6195. null,
  6196. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6197. return vue.openBlock(), vue.createElementBlock("view", {
  6198. class: "pm-log-item",
  6199. key: lIndex
  6200. }, [
  6201. vue.createElementVNode(
  6202. "text",
  6203. { class: "pm-log-date" },
  6204. vue.toDisplayString(log.date),
  6205. 1
  6206. /* TEXT */
  6207. ),
  6208. vue.createElementVNode(
  6209. "text",
  6210. { class: "pm-log-text" },
  6211. vue.toDisplayString(log.content),
  6212. 1
  6213. /* TEXT */
  6214. ),
  6215. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6216. "text",
  6217. {
  6218. key: 0,
  6219. class: "pm-log-recorder"
  6220. },
  6221. "记录人:" + vue.toDisplayString(log.recorder),
  6222. 1
  6223. /* TEXT */
  6224. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6225. key: 1,
  6226. class: "pm-log-recorder system"
  6227. }, "系统记录"))
  6228. ]);
  6229. }),
  6230. 128
  6231. /* KEYED_FRAGMENT */
  6232. ))
  6233. ]),
  6234. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6235. ])
  6236. ])
  6237. ])) : vue.createCommentVNode("v-if", true),
  6238. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6239. key: 1,
  6240. class: "upload-modal-mask",
  6241. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6242. }, [
  6243. vue.createElementVNode("view", {
  6244. class: "upload-modal-content",
  6245. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6246. }, ["stop"]))
  6247. }, [
  6248. vue.createElementVNode("view", { class: "um-header" }, [
  6249. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6250. ]),
  6251. vue.createElementVNode("view", { class: "um-body" }, [
  6252. vue.withDirectives(vue.createElementVNode(
  6253. "textarea",
  6254. {
  6255. class: "um-textarea",
  6256. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6257. "auto-height": "",
  6258. placeholder: "请输入宠物备注内容...",
  6259. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6260. },
  6261. null,
  6262. 512
  6263. /* NEED_PATCH */
  6264. ), [
  6265. [vue.vModelText, _ctx.petRemarkText]
  6266. ])
  6267. ]),
  6268. vue.createElementVNode("view", { class: "um-footer" }, [
  6269. vue.createElementVNode("button", {
  6270. class: "um-submit-btn active",
  6271. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6272. }, "确认提交")
  6273. ])
  6274. ])
  6275. ])) : vue.createCommentVNode("v-if", true),
  6276. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6277. key: 2,
  6278. class: "nav-modal-mask",
  6279. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6280. }, [
  6281. vue.createElementVNode("view", {
  6282. class: "nav-action-sheet",
  6283. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6284. }, ["stop"]))
  6285. }, [
  6286. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6287. vue.createElementVNode("view", {
  6288. class: "nav-sheet-item",
  6289. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6290. }, "高德地图"),
  6291. vue.createElementVNode("view", {
  6292. class: "nav-sheet-item",
  6293. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6294. }, "腾讯地图"),
  6295. vue.createElementVNode("view", {
  6296. class: "nav-sheet-item",
  6297. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6298. }, "百度地图"),
  6299. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6300. vue.createElementVNode("view", {
  6301. class: "nav-sheet-item cancel",
  6302. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6303. }, "取消")
  6304. ])
  6305. ])) : vue.createCommentVNode("v-if", true),
  6306. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6307. key: 3,
  6308. class: "upload-modal-mask",
  6309. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6310. }, [
  6311. vue.createElementVNode("view", {
  6312. class: "upload-modal-content",
  6313. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6314. }, ["stop"]))
  6315. }, [
  6316. vue.createElementVNode("view", { class: "um-header" }, [
  6317. vue.createElementVNode(
  6318. "text",
  6319. { class: "um-title" },
  6320. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6321. 1
  6322. /* TEXT */
  6323. ),
  6324. vue.createElementVNode(
  6325. "text",
  6326. { class: "um-remark-hint" },
  6327. vue.toDisplayString(_ctx.currentTaskDesc),
  6328. 1
  6329. /* TEXT */
  6330. )
  6331. ]),
  6332. vue.createElementVNode("view", { class: "um-body" }, [
  6333. vue.createElementVNode("view", { class: "um-grid" }, [
  6334. (vue.openBlock(true), vue.createElementBlock(
  6335. vue.Fragment,
  6336. null,
  6337. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6338. return vue.openBlock(), vue.createElementBlock("view", {
  6339. class: "um-item",
  6340. key: idx
  6341. }, [
  6342. vue.createElementVNode("image", {
  6343. class: "um-preview",
  6344. src: img.thumb || img.url || img.localPath || img,
  6345. mode: "aspectFill"
  6346. }, null, 8, ["src"]),
  6347. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6348. key: 0,
  6349. class: "um-video-badge"
  6350. }, [
  6351. vue.createElementVNode("image", {
  6352. class: "play-icon-small",
  6353. src: _imports_8$1
  6354. })
  6355. ])) : vue.createCommentVNode("v-if", true),
  6356. vue.createElementVNode("view", {
  6357. class: "um-del",
  6358. onClick: ($event) => _ctx.removeModalMedia(idx)
  6359. }, "×", 8, ["onClick"])
  6360. ]);
  6361. }),
  6362. 128
  6363. /* KEYED_FRAGMENT */
  6364. )),
  6365. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6366. key: 0,
  6367. class: "um-add",
  6368. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6369. }, [
  6370. vue.createElementVNode("image", {
  6371. class: "um-add-icon",
  6372. src: _imports_1$6
  6373. }),
  6374. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6375. ])) : vue.createCommentVNode("v-if", true)
  6376. ]),
  6377. vue.withDirectives(vue.createElementVNode(
  6378. "textarea",
  6379. {
  6380. class: "um-textarea",
  6381. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6382. placeholder: "在此输入备注信息...",
  6383. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6384. },
  6385. null,
  6386. 512
  6387. /* NEED_PATCH */
  6388. ), [
  6389. [vue.vModelText, _ctx.modalRemark]
  6390. ])
  6391. ]),
  6392. vue.createElementVNode("view", { class: "um-footer" }, [
  6393. vue.createElementVNode(
  6394. "view",
  6395. {
  6396. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6397. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6398. },
  6399. " 确认提交",
  6400. 2
  6401. /* CLASS */
  6402. )
  6403. ])
  6404. ])
  6405. ])) : vue.createCommentVNode("v-if", true),
  6406. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6407. key: 4,
  6408. class: "sum-modal-mask",
  6409. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6410. }, [
  6411. vue.createElementVNode("view", {
  6412. class: "sum-modal-card",
  6413. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6414. }, ["stop"]))
  6415. }, [
  6416. vue.createElementVNode("scroll-view", {
  6417. "scroll-y": "",
  6418. class: "sum-modal-scroll"
  6419. }, [
  6420. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6421. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6422. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6423. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6424. vue.createElementVNode(
  6425. "text",
  6426. { class: "sum-meta-val" },
  6427. vue.toDisplayString(_ctx.sumDate),
  6428. 1
  6429. /* TEXT */
  6430. )
  6431. ]),
  6432. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6433. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6434. vue.createElementVNode(
  6435. "text",
  6436. { class: "sum-meta-val" },
  6437. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6438. 1
  6439. /* TEXT */
  6440. )
  6441. ]),
  6442. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6443. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6444. vue.createElementVNode(
  6445. "text",
  6446. { class: "sum-meta-val" },
  6447. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6448. 1
  6449. /* TEXT */
  6450. )
  6451. ]),
  6452. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6453. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6454. vue.createElementVNode("image", {
  6455. class: "sum-pet-avatar",
  6456. src: _ctx.orderDetail.petAvatar,
  6457. mode: "aspectFill"
  6458. }, null, 8, ["src"]),
  6459. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6460. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6461. vue.createElementVNode(
  6462. "text",
  6463. { class: "sum-pet-name" },
  6464. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6465. 1
  6466. /* TEXT */
  6467. ),
  6468. vue.createElementVNode(
  6469. "text",
  6470. { class: "sum-pet-breed" },
  6471. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6472. 1
  6473. /* TEXT */
  6474. )
  6475. ]),
  6476. vue.createElementVNode(
  6477. "text",
  6478. { class: "sum-pet-remark" },
  6479. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6480. 1
  6481. /* TEXT */
  6482. )
  6483. ])
  6484. ]),
  6485. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6486. vue.withDirectives(vue.createElementVNode(
  6487. "textarea",
  6488. {
  6489. class: "sum-textarea",
  6490. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6491. "auto-height": "",
  6492. placeholder: "请填写服务内容...",
  6493. "placeholder-style": "color:#ccc"
  6494. },
  6495. null,
  6496. 512
  6497. /* NEED_PATCH */
  6498. ), [
  6499. [vue.vModelText, _ctx.sumContent]
  6500. ]),
  6501. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6502. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6503. vue.createElementVNode(
  6504. "text",
  6505. { class: "sum-sign-val" },
  6506. vue.toDisplayString(_ctx.sumSigner),
  6507. 1
  6508. /* TEXT */
  6509. )
  6510. ]),
  6511. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6512. ])
  6513. ]),
  6514. vue.createElementVNode("view", { class: "sum-footer" }, [
  6515. vue.createElementVNode("button", {
  6516. class: "sum-submit-btn",
  6517. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6518. }, "提交小结")
  6519. ])
  6520. ])
  6521. ])) : vue.createCommentVNode("v-if", true),
  6522. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6523. key: 5,
  6524. class: "modal-mask",
  6525. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6526. }, [
  6527. vue.createElementVNode("view", {
  6528. class: "anomaly-modal-content",
  6529. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6530. }, ["stop"]))
  6531. }, [
  6532. vue.createElementVNode("view", { class: "am-header" }, [
  6533. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6534. vue.createElementVNode("view", {
  6535. class: "close-icon-btn",
  6536. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6537. }, "×")
  6538. ]),
  6539. vue.createElementVNode("scroll-view", {
  6540. "scroll-y": "",
  6541. class: "am-scroll-list"
  6542. }, [
  6543. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6544. key: 0,
  6545. class: "empty-list"
  6546. }, [
  6547. vue.createElementVNode("image", {
  6548. class: "empty-icon",
  6549. src: _imports_9$1,
  6550. mode: "aspectFit"
  6551. }),
  6552. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6553. ])) : vue.createCommentVNode("v-if", true),
  6554. (vue.openBlock(true), vue.createElementBlock(
  6555. vue.Fragment,
  6556. null,
  6557. vue.renderList(_ctx.anomalyList, (item, index) => {
  6558. return vue.openBlock(), vue.createElementBlock("view", {
  6559. class: "am-item",
  6560. key: index
  6561. }, [
  6562. vue.createElementVNode("view", { class: "am-item-header" }, [
  6563. vue.createElementVNode(
  6564. "text",
  6565. { class: "am-item-type" },
  6566. vue.toDisplayString(item.typeLabel),
  6567. 1
  6568. /* TEXT */
  6569. ),
  6570. vue.createElementVNode(
  6571. "text",
  6572. {
  6573. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6574. },
  6575. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6576. 3
  6577. /* TEXT, CLASS */
  6578. )
  6579. ]),
  6580. vue.createElementVNode(
  6581. "text",
  6582. { class: "am-item-content" },
  6583. vue.toDisplayString(item.content),
  6584. 1
  6585. /* TEXT */
  6586. ),
  6587. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6588. key: 0,
  6589. class: "am-item-photos"
  6590. }, [
  6591. (vue.openBlock(true), vue.createElementBlock(
  6592. vue.Fragment,
  6593. null,
  6594. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  6595. return vue.openBlock(), vue.createElementBlock("view", {
  6596. class: "am-photo-item",
  6597. key: pIdx,
  6598. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  6599. }, [
  6600. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  6601. key: 0,
  6602. class: "am-photo",
  6603. src: photoUrl,
  6604. mode: "aspectFill"
  6605. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6606. key: 1,
  6607. class: "tl-video-placeholder miniaturized"
  6608. }, [
  6609. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  6610. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  6611. ]))
  6612. ], 8, ["onClick"]);
  6613. }),
  6614. 128
  6615. /* KEYED_FRAGMENT */
  6616. ))
  6617. ])) : vue.createCommentVNode("v-if", true),
  6618. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6619. key: 1,
  6620. class: "am-audit-box"
  6621. }, [
  6622. vue.createElementVNode("view", { class: "am-audit-header" }, [
  6623. vue.createElementVNode(
  6624. "text",
  6625. { class: "am-audit-label" },
  6626. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  6627. 1
  6628. /* TEXT */
  6629. ),
  6630. vue.createElementVNode(
  6631. "text",
  6632. { class: "am-audit-time" },
  6633. vue.toDisplayString(item.auditTime),
  6634. 1
  6635. /* TEXT */
  6636. )
  6637. ]),
  6638. vue.createElementVNode(
  6639. "text",
  6640. { class: "am-audit-remark" },
  6641. vue.toDisplayString(item.auditRemark || "无"),
  6642. 1
  6643. /* TEXT */
  6644. )
  6645. ])) : vue.createCommentVNode("v-if", true)
  6646. ]);
  6647. }),
  6648. 128
  6649. /* KEYED_FRAGMENT */
  6650. ))
  6651. ])
  6652. ])
  6653. ])) : vue.createCommentVNode("v-if", true),
  6654. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  6655. key: 6,
  6656. class: "video-player-mask",
  6657. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6658. }, [
  6659. vue.createElementVNode("view", {
  6660. class: "video-player-content",
  6661. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  6662. }, ["stop"]))
  6663. }, [
  6664. vue.createElementVNode("video", {
  6665. class: "v-player",
  6666. src: _ctx.videoPlayerUrl,
  6667. autoplay: "",
  6668. controls: ""
  6669. }, null, 8, ["src"]),
  6670. vue.createElementVNode("view", {
  6671. class: "v-close",
  6672. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6673. }, "×")
  6674. ])
  6675. ])) : vue.createCommentVNode("v-if", true)
  6676. ],
  6677. 64
  6678. /* STABLE_FRAGMENT */
  6679. ))
  6680. ]);
  6681. }
  6682. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  6683. const _sfc_main$p = {
  6684. data() {
  6685. return {
  6686. orderId: "",
  6687. // 已选异常类型(dictValue)
  6688. selectedTypeValue: "",
  6689. // 已选异常类型标签(dictLabel,用于显示)
  6690. selectedTypeLabel: "",
  6691. // 异常描述
  6692. anomalyDesc: "",
  6693. // 照片列表(含 url 和 ossId)
  6694. photoList: [],
  6695. // 是否显示类型选择器
  6696. showTypeSheet: false,
  6697. // 异常类型字典列表(从后端获取)
  6698. anomalyTypes: []
  6699. };
  6700. },
  6701. onLoad(options) {
  6702. if (options.orderId) {
  6703. this.orderId = options.orderId;
  6704. }
  6705. this.loadAnomalyTypes();
  6706. },
  6707. computed: {
  6708. // 当前选中的类型显示文本
  6709. selectedType() {
  6710. return this.selectedTypeLabel || "";
  6711. }
  6712. },
  6713. methods: {
  6714. /**
  6715. * 加载异常类型字典数据
  6716. */
  6717. async loadAnomalyTypes() {
  6718. try {
  6719. const res = await getDictDataByType("flf_anamaly_type");
  6720. if (res.data && Array.isArray(res.data)) {
  6721. this.anomalyTypes = res.data.map((item) => ({
  6722. label: item.dictLabel,
  6723. value: item.dictValue,
  6724. dictCode: item.dictCode
  6725. }));
  6726. formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
  6727. }
  6728. } catch (err) {
  6729. formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
  6730. }
  6731. },
  6732. // 打开类型选择器
  6733. openTypeSheet() {
  6734. this.showTypeSheet = true;
  6735. },
  6736. // 关闭类型选择器
  6737. closeTypeSheet() {
  6738. this.showTypeSheet = false;
  6739. },
  6740. // 选择异常类型
  6741. selectType(type) {
  6742. this.selectedTypeValue = type.value;
  6743. this.selectedTypeLabel = type.label;
  6744. this.closeTypeSheet();
  6745. },
  6746. // 选择照片并上传
  6747. choosePhoto() {
  6748. uni.chooseImage({
  6749. count: 5 - this.photoList.length,
  6750. sizeType: ["compressed"],
  6751. sourceType: ["album", "camera"],
  6752. success: async (res) => {
  6753. uni.showLoading({ title: "上传中..." });
  6754. try {
  6755. for (const filePath of res.tempFilePaths) {
  6756. const uploadRes = await uploadFile(filePath);
  6757. if (uploadRes.code === 200) {
  6758. this.photoList.push({
  6759. url: uploadRes.data.url,
  6760. ossId: uploadRes.data.ossId,
  6761. localPath: filePath
  6762. });
  6763. }
  6764. }
  6765. uni.hideLoading();
  6766. } catch (err) {
  6767. uni.hideLoading();
  6768. formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
  6769. uni.showToast({ title: "上传失败", icon: "none" });
  6770. }
  6771. }
  6772. });
  6773. },
  6774. // 删除照片
  6775. removePhoto(idx) {
  6776. this.photoList.splice(idx, 1);
  6777. },
  6778. // 提交上报
  6779. async submitAnomaly() {
  6780. if (!this.selectedTypeValue) {
  6781. uni.showToast({ title: "请选择异常类型", icon: "none" });
  6782. return;
  6783. }
  6784. if (this.photoList.length === 0) {
  6785. uni.showToast({ title: "请上传现场照片", icon: "none" });
  6786. return;
  6787. }
  6788. const data = {
  6789. orderId: this.orderId,
  6790. type: this.selectedTypeValue,
  6791. content: this.anomalyDesc,
  6792. photos: this.photoList.map((p) => p.ossId)
  6793. };
  6794. try {
  6795. uni.showLoading({ title: "提交中..." });
  6796. await uploadAnamaly(data);
  6797. uni.hideLoading();
  6798. uni.showToast({ title: "上报成功", icon: "success" });
  6799. setTimeout(() => {
  6800. uni.navigateBack();
  6801. }, 1500);
  6802. } catch (err) {
  6803. uni.hideLoading();
  6804. formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
  6805. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  6806. }
  6807. }
  6808. }
  6809. };
  6810. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  6811. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  6812. vue.createElementVNode("scroll-view", {
  6813. "scroll-y": "",
  6814. class: "anomaly-scroll"
  6815. }, [
  6816. vue.createElementVNode("view", { class: "ano-card" }, [
  6817. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6818. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6819. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  6820. ]),
  6821. vue.createElementVNode("view", {
  6822. class: "ano-type-row",
  6823. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  6824. }, [
  6825. vue.createElementVNode(
  6826. "text",
  6827. {
  6828. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  6829. },
  6830. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  6831. 3
  6832. /* TEXT, CLASS */
  6833. ),
  6834. vue.createElementVNode("image", {
  6835. class: "ano-right-arrow",
  6836. src: _imports_0$2
  6837. })
  6838. ])
  6839. ]),
  6840. vue.createElementVNode("view", { class: "ano-card" }, [
  6841. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6842. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6843. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  6844. ]),
  6845. vue.withDirectives(vue.createElementVNode(
  6846. "textarea",
  6847. {
  6848. class: "ano-textarea",
  6849. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  6850. placeholder: "请详细描述现场异常情况...",
  6851. "placeholder-style": "color:#ccc; font-size:28rpx;",
  6852. maxlength: "500"
  6853. },
  6854. null,
  6855. 512
  6856. /* NEED_PATCH */
  6857. ), [
  6858. [vue.vModelText, $data.anomalyDesc]
  6859. ])
  6860. ]),
  6861. vue.createElementVNode("view", { class: "ano-card" }, [
  6862. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6863. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6864. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  6865. ]),
  6866. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  6867. (vue.openBlock(true), vue.createElementBlock(
  6868. vue.Fragment,
  6869. null,
  6870. vue.renderList($data.photoList, (img, idx) => {
  6871. return vue.openBlock(), vue.createElementBlock("view", {
  6872. class: "ano-photo-item",
  6873. key: idx
  6874. }, [
  6875. vue.createElementVNode("image", {
  6876. class: "ano-photo-preview",
  6877. src: img.url || img.localPath || img,
  6878. mode: "aspectFill"
  6879. }, null, 8, ["src"]),
  6880. vue.createElementVNode("view", {
  6881. class: "ano-photo-del",
  6882. onClick: ($event) => $options.removePhoto(idx)
  6883. }, "×", 8, ["onClick"])
  6884. ]);
  6885. }),
  6886. 128
  6887. /* KEYED_FRAGMENT */
  6888. )),
  6889. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6890. key: 0,
  6891. class: "ano-photo-add",
  6892. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  6893. }, [
  6894. vue.createElementVNode("image", {
  6895. class: "ano-add-icon",
  6896. src: _imports_1$6
  6897. }),
  6898. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  6899. ])) : vue.createCommentVNode("v-if", true)
  6900. ])
  6901. ]),
  6902. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  6903. ]),
  6904. vue.createElementVNode("view", { class: "ano-footer" }, [
  6905. vue.createElementVNode("button", {
  6906. class: "ano-submit-btn",
  6907. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  6908. }, "提交上报")
  6909. ]),
  6910. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  6911. key: 0,
  6912. class: "ano-sheet-mask",
  6913. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  6914. }, [
  6915. vue.createElementVNode("view", {
  6916. class: "ano-sheet",
  6917. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  6918. }, ["stop"]))
  6919. }, [
  6920. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  6921. vue.createElementVNode("scroll-view", {
  6922. "scroll-y": "",
  6923. class: "ano-sheet-list"
  6924. }, [
  6925. (vue.openBlock(true), vue.createElementBlock(
  6926. vue.Fragment,
  6927. null,
  6928. vue.renderList($data.anomalyTypes, (type, idx) => {
  6929. return vue.openBlock(), vue.createElementBlock("view", {
  6930. class: "ano-sheet-item",
  6931. key: idx,
  6932. onClick: ($event) => $options.selectType(type)
  6933. }, [
  6934. vue.createElementVNode(
  6935. "text",
  6936. {
  6937. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  6938. },
  6939. vue.toDisplayString(type.label),
  6940. 3
  6941. /* TEXT, CLASS */
  6942. ),
  6943. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  6944. key: 0,
  6945. class: "ano-check-icon",
  6946. src: _imports_0$2
  6947. })) : vue.createCommentVNode("v-if", true)
  6948. ], 8, ["onClick"]);
  6949. }),
  6950. 128
  6951. /* KEYED_FRAGMENT */
  6952. ))
  6953. ]),
  6954. vue.createElementVNode("view", {
  6955. class: "ano-sheet-cancel",
  6956. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  6957. }, "取消")
  6958. ])
  6959. ])) : vue.createCommentVNode("v-if", true)
  6960. ]);
  6961. }
  6962. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  6963. const _sfc_main$o = {
  6964. data() {
  6965. return {
  6966. tabs: ["全部", "已完成", "已拒绝"],
  6967. activeTab: 0,
  6968. orders: [
  6969. {
  6970. orderType: 1,
  6971. typeName: "接送",
  6972. typeIcon: "/static/icons/car.svg",
  6973. status: "完成",
  6974. finishTime: "2026/02/03 14:30",
  6975. serviceTime: "2026/02/10 10:00",
  6976. petName: "哈士奇宝宝",
  6977. petBreed: "哈士奇",
  6978. petAvatar: "/static/dog.png",
  6979. price: "20.00",
  6980. startName: "武汉大学宠物店",
  6981. startAddr: "武汉市洪山区珞喻路458号",
  6982. endName: "张** 189****8451",
  6983. endAddr: "武汉市武昌区新区大道凤凰广场A座",
  6984. serviceNote: ""
  6985. },
  6986. {
  6987. orderType: 2,
  6988. typeName: "喂遛",
  6989. typeIcon: "/static/icons/walk.svg",
  6990. status: "完成",
  6991. finishTime: "2026/02/03 15:00",
  6992. serviceTime: "2026/02/11 14:00",
  6993. petName: "金毛",
  6994. petBreed: "金毛寻回犬",
  6995. petAvatar: "/static/dog.png",
  6996. price: "35.00",
  6997. startName: "",
  6998. startAddr: "",
  6999. endName: "王女士 138****1234",
  7000. endAddr: "武汉市江汉区泛海国际居住区",
  7001. serviceNote: "需自带牵引绳,遛弯30分钟。"
  7002. },
  7003. {
  7004. orderType: 3,
  7005. typeName: "洗护",
  7006. typeIcon: "/static/icons/wash.svg",
  7007. status: "拒绝",
  7008. finishTime: "2026/02/03 09:30",
  7009. serviceTime: "2026/02/12 09:30",
  7010. petName: "Mimi",
  7011. petBreed: "布偶猫",
  7012. petAvatar: "/static/dog.png",
  7013. price: "50.00",
  7014. startName: "",
  7015. startAddr: "",
  7016. endName: "赵先生 159****9876",
  7017. endAddr: "武汉市汉阳区钟家村",
  7018. serviceNote: "上门洗澡,剪指甲。"
  7019. }
  7020. ]
  7021. };
  7022. },
  7023. computed: {
  7024. filteredOrders() {
  7025. if (this.activeTab === 0)
  7026. return this.orders;
  7027. if (this.activeTab === 1)
  7028. return this.orders.filter((o) => o.status === "完成");
  7029. return this.orders.filter((o) => o.status === "拒绝");
  7030. }
  7031. },
  7032. methods: {
  7033. switchTab(idx) {
  7034. this.activeTab = idx;
  7035. }
  7036. }
  7037. };
  7038. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  7039. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7040. vue.createElementVNode("view", { class: "stats-banner" }, [
  7041. vue.createElementVNode("view", { class: "banner-item" }, [
  7042. vue.createElementVNode("text", { class: "banner-num" }, "2546"),
  7043. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7044. ]),
  7045. vue.createElementVNode("view", { class: "banner-item" }, [
  7046. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  7047. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7048. ]),
  7049. vue.createElementVNode("view", { class: "banner-item" }, [
  7050. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  7051. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7052. ]),
  7053. vue.createElementVNode("view", { class: "banner-item" }, [
  7054. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  7055. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7056. ]),
  7057. vue.createElementVNode("view", { class: "banner-item" }, [
  7058. vue.createElementVNode("text", { class: "banner-num" }, [
  7059. vue.createTextVNode("158"),
  7060. vue.createElementVNode("text", { class: "banner-unit" }, "天")
  7061. ]),
  7062. vue.createElementVNode("text", { class: "banner-label" }, "服务时长")
  7063. ])
  7064. ]),
  7065. vue.createElementVNode("view", { class: "tab-bar" }, [
  7066. (vue.openBlock(true), vue.createElementBlock(
  7067. vue.Fragment,
  7068. null,
  7069. vue.renderList($data.tabs, (tab, idx) => {
  7070. return vue.openBlock(), vue.createElementBlock("view", {
  7071. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7072. key: idx,
  7073. onClick: ($event) => $options.switchTab(idx)
  7074. }, [
  7075. vue.createElementVNode(
  7076. "text",
  7077. null,
  7078. vue.toDisplayString(tab),
  7079. 1
  7080. /* TEXT */
  7081. ),
  7082. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7083. key: 0,
  7084. class: "tab-line"
  7085. })) : vue.createCommentVNode("v-if", true)
  7086. ], 10, ["onClick"]);
  7087. }),
  7088. 128
  7089. /* KEYED_FRAGMENT */
  7090. ))
  7091. ]),
  7092. vue.createElementVNode("scroll-view", {
  7093. "scroll-y": "",
  7094. class: "order-scroll"
  7095. }, [
  7096. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7097. (vue.openBlock(true), vue.createElementBlock(
  7098. vue.Fragment,
  7099. null,
  7100. vue.renderList($options.filteredOrders, (order, idx) => {
  7101. return vue.openBlock(), vue.createElementBlock("view", {
  7102. class: "order-card",
  7103. key: idx
  7104. }, [
  7105. vue.createElementVNode("view", { class: "card-header" }, [
  7106. vue.createElementVNode("view", { class: "type-badge" }, [
  7107. vue.createElementVNode("image", {
  7108. class: "type-icon",
  7109. src: order.typeIcon
  7110. }, null, 8, ["src"]),
  7111. vue.createElementVNode(
  7112. "text",
  7113. { class: "type-text" },
  7114. vue.toDisplayString(order.typeName),
  7115. 1
  7116. /* TEXT */
  7117. )
  7118. ]),
  7119. vue.createElementVNode(
  7120. "text",
  7121. {
  7122. class: vue.normalizeClass(["status-text", order.status === "完成" ? "green" : "red"])
  7123. },
  7124. vue.toDisplayString(order.status === "完成" ? "完成:" : "拒绝:") + vue.toDisplayString(order.finishTime),
  7125. 3
  7126. /* TEXT, CLASS */
  7127. )
  7128. ]),
  7129. vue.createElementVNode(
  7130. "text",
  7131. { class: "service-time" },
  7132. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7133. 1
  7134. /* TEXT */
  7135. ),
  7136. vue.createElementVNode("view", { class: "pet-card" }, [
  7137. vue.createElementVNode("image", {
  7138. class: "pet-avatar",
  7139. src: order.petAvatar,
  7140. mode: "aspectFill"
  7141. }, null, 8, ["src"]),
  7142. vue.createElementVNode("view", { class: "pet-info" }, [
  7143. vue.createElementVNode(
  7144. "text",
  7145. { class: "pet-name" },
  7146. vue.toDisplayString(order.petName),
  7147. 1
  7148. /* TEXT */
  7149. ),
  7150. vue.createElementVNode(
  7151. "text",
  7152. { class: "pet-breed" },
  7153. "品种: " + vue.toDisplayString(order.petBreed),
  7154. 1
  7155. /* TEXT */
  7156. )
  7157. ]),
  7158. vue.createElementVNode(
  7159. "text",
  7160. { class: "pet-price" },
  7161. "¥" + vue.toDisplayString(order.price),
  7162. 1
  7163. /* TEXT */
  7164. )
  7165. ]),
  7166. vue.createElementVNode("view", { class: "route-info" }, [
  7167. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7168. vue.Fragment,
  7169. { key: 0 },
  7170. [
  7171. vue.createElementVNode("view", { class: "route-item" }, [
  7172. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7173. vue.createElementVNode("view", { class: "route-connector" }),
  7174. vue.createElementVNode("view", { class: "address-box" }, [
  7175. vue.createElementVNode(
  7176. "text",
  7177. { class: "addr-title" },
  7178. vue.toDisplayString(order.startName),
  7179. 1
  7180. /* TEXT */
  7181. ),
  7182. vue.createElementVNode(
  7183. "text",
  7184. { class: "addr-desc" },
  7185. vue.toDisplayString(order.startAddr),
  7186. 1
  7187. /* TEXT */
  7188. )
  7189. ])
  7190. ]),
  7191. vue.createElementVNode("view", { class: "route-item" }, [
  7192. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7193. vue.createElementVNode("view", { class: "address-box" }, [
  7194. vue.createElementVNode(
  7195. "text",
  7196. { class: "addr-title" },
  7197. vue.toDisplayString(order.endName),
  7198. 1
  7199. /* TEXT */
  7200. ),
  7201. vue.createElementVNode(
  7202. "text",
  7203. { class: "addr-desc" },
  7204. vue.toDisplayString(order.endAddr),
  7205. 1
  7206. /* TEXT */
  7207. )
  7208. ])
  7209. ])
  7210. ],
  7211. 64
  7212. /* STABLE_FRAGMENT */
  7213. )) : (vue.openBlock(), vue.createElementBlock(
  7214. vue.Fragment,
  7215. { key: 1 },
  7216. [
  7217. vue.createElementVNode("view", { class: "route-item" }, [
  7218. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7219. vue.createElementVNode("view", { class: "address-box" }, [
  7220. vue.createElementVNode(
  7221. "text",
  7222. { class: "addr-title" },
  7223. vue.toDisplayString(order.endName),
  7224. 1
  7225. /* TEXT */
  7226. ),
  7227. vue.createElementVNode(
  7228. "text",
  7229. { class: "addr-desc" },
  7230. vue.toDisplayString(order.endAddr),
  7231. 1
  7232. /* TEXT */
  7233. )
  7234. ])
  7235. ]),
  7236. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7237. key: 0,
  7238. class: "service-note-row"
  7239. }, [
  7240. vue.createElementVNode(
  7241. "text",
  7242. { class: "service-note-text" },
  7243. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7244. 1
  7245. /* TEXT */
  7246. )
  7247. ])) : vue.createCommentVNode("v-if", true)
  7248. ],
  7249. 64
  7250. /* STABLE_FRAGMENT */
  7251. ))
  7252. ])
  7253. ]);
  7254. }),
  7255. 128
  7256. /* KEYED_FRAGMENT */
  7257. )),
  7258. $options.filteredOrders.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  7259. key: 0,
  7260. class: "empty-state"
  7261. }, [
  7262. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7263. ])) : vue.createCommentVNode("v-if", true),
  7264. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7265. ])
  7266. ]);
  7267. }
  7268. 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"]]);
  7269. const _sfc_main$n = {
  7270. data() {
  7271. return {
  7272. tabs: ["全部", "奖励", "惩罚"],
  7273. activeTab: 0,
  7274. selectedYear: 2026,
  7275. selectedMonth: 2,
  7276. // 月份选择器状态
  7277. showMonthPicker: false,
  7278. pickerYear: 2026,
  7279. pickerMonth: 2,
  7280. years: [2021, 2022, 2023, 2024, 2025, 2026],
  7281. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7282. yearScrollTop: 0,
  7283. monthScrollTop: 0,
  7284. // 奖惩记录列表
  7285. records: [
  7286. { date: "09-01", title: "单量奖励", desc: "超140单", amount: 560, status: "待入账", statusClass: "pending", type: "reward" },
  7287. { date: "08-01", title: "单量奖励", desc: "超470单", amount: 2050, status: "已入账", statusClass: "credited", type: "reward" },
  7288. { date: "09-02", title: "超时扣款", desc: "订单#T982 超时30分钟", amount: -15, status: "已扣款", statusClass: "deducted", type: "penalty" },
  7289. { date: "09-05", title: "高温补贴", desc: "8月份高温天气补贴", amount: 300, status: "已入账", statusClass: "credited", type: "reward" }
  7290. ]
  7291. };
  7292. },
  7293. computed: {
  7294. filteredList() {
  7295. if (this.activeTab === 0)
  7296. return this.records;
  7297. if (this.activeTab === 1)
  7298. return this.records.filter((r) => r.type === "reward");
  7299. return this.records.filter((r) => r.type === "penalty");
  7300. }
  7301. },
  7302. methods: {
  7303. switchTab(idx) {
  7304. this.activeTab = idx;
  7305. },
  7306. openMonthPicker() {
  7307. this.pickerYear = this.selectedYear;
  7308. this.pickerMonth = this.selectedMonth;
  7309. this.showMonthPicker = true;
  7310. },
  7311. closeMonthPicker() {
  7312. this.showMonthPicker = false;
  7313. },
  7314. confirmMonthPicker() {
  7315. this.selectedYear = this.pickerYear;
  7316. this.selectedMonth = this.pickerMonth;
  7317. this.closeMonthPicker();
  7318. },
  7319. goToAll() {
  7320. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7321. }
  7322. }
  7323. };
  7324. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  7325. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7326. vue.createElementVNode("view", { class: "top-banner" }, [
  7327. vue.createElementVNode("view", {
  7328. class: "month-btn",
  7329. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7330. }, [
  7331. vue.createElementVNode(
  7332. "text",
  7333. { class: "month-text" },
  7334. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7335. 1
  7336. /* TEXT */
  7337. )
  7338. ]),
  7339. vue.createElementVNode("view", { class: "stats-grid" }, [
  7340. vue.createElementVNode("view", { class: "stats-cell" }, [
  7341. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7342. vue.createElementVNode("text", { class: "stats-num" }, [
  7343. vue.createTextVNode("3"),
  7344. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7345. ]),
  7346. vue.createElementVNode("view", { class: "stats-divider" }),
  7347. vue.createElementVNode("text", { class: "stats-sub" }, "累计 1258单")
  7348. ]),
  7349. vue.createElementVNode("view", { class: "stats-cell" }, [
  7350. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7351. vue.createElementVNode("text", { class: "stats-num" }, [
  7352. vue.createTextVNode("1"),
  7353. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7354. ]),
  7355. vue.createElementVNode("view", { class: "stats-divider" }),
  7356. vue.createElementVNode("text", { class: "stats-sub" }, "累计 12单")
  7357. ]),
  7358. vue.createElementVNode("view", { class: "stats-cell" }, [
  7359. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  7360. vue.createElementVNode("text", { class: "stats-num reward-num" }, "2910.00"),
  7361. vue.createElementVNode("view", { class: "stats-divider" }),
  7362. vue.createElementVNode("text", { class: "stats-sub" }, "累计 45800.00")
  7363. ]),
  7364. vue.createElementVNode("view", { class: "stats-cell" }, [
  7365. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  7366. vue.createElementVNode("text", { class: "stats-num penalty-num" }, "-15.00"),
  7367. vue.createElementVNode("view", { class: "stats-divider" }),
  7368. vue.createElementVNode("text", { class: "stats-sub" }, "累计 350.00")
  7369. ])
  7370. ])
  7371. ]),
  7372. vue.createElementVNode("view", { class: "list-header" }, [
  7373. vue.createElementVNode("view", { class: "tab-bar" }, [
  7374. (vue.openBlock(true), vue.createElementBlock(
  7375. vue.Fragment,
  7376. null,
  7377. vue.renderList($data.tabs, (tab, idx) => {
  7378. return vue.openBlock(), vue.createElementBlock("view", {
  7379. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7380. key: idx,
  7381. onClick: ($event) => $options.switchTab(idx)
  7382. }, [
  7383. vue.createElementVNode(
  7384. "text",
  7385. null,
  7386. vue.toDisplayString(tab),
  7387. 1
  7388. /* TEXT */
  7389. ),
  7390. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7391. key: 0,
  7392. class: "tab-line"
  7393. })) : vue.createCommentVNode("v-if", true)
  7394. ], 10, ["onClick"]);
  7395. }),
  7396. 128
  7397. /* KEYED_FRAGMENT */
  7398. ))
  7399. ]),
  7400. vue.createElementVNode("view", {
  7401. class: "view-all-btn",
  7402. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  7403. }, [
  7404. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  7405. ])
  7406. ]),
  7407. vue.createElementVNode("view", { class: "record-list" }, [
  7408. (vue.openBlock(true), vue.createElementBlock(
  7409. vue.Fragment,
  7410. null,
  7411. vue.renderList($options.filteredList, (item, idx) => {
  7412. return vue.openBlock(), vue.createElementBlock("view", {
  7413. class: "record-item",
  7414. key: idx
  7415. }, [
  7416. vue.createElementVNode(
  7417. "view",
  7418. {
  7419. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7420. },
  7421. [
  7422. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7423. ],
  7424. 2
  7425. /* CLASS */
  7426. ),
  7427. vue.createElementVNode("view", { class: "ri-content" }, [
  7428. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7429. vue.createElementVNode(
  7430. "text",
  7431. { class: "ri-date" },
  7432. vue.toDisplayString(item.date),
  7433. 1
  7434. /* TEXT */
  7435. ),
  7436. vue.createElementVNode(
  7437. "text",
  7438. { class: "ri-title" },
  7439. vue.toDisplayString(item.title),
  7440. 1
  7441. /* TEXT */
  7442. )
  7443. ]),
  7444. vue.createElementVNode(
  7445. "text",
  7446. { class: "ri-desc" },
  7447. vue.toDisplayString(item.desc),
  7448. 1
  7449. /* TEXT */
  7450. )
  7451. ]),
  7452. vue.createElementVNode("view", { class: "ri-right" }, [
  7453. vue.createElementVNode(
  7454. "text",
  7455. {
  7456. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7457. },
  7458. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7459. 3
  7460. /* TEXT, CLASS */
  7461. ),
  7462. vue.createElementVNode(
  7463. "text",
  7464. {
  7465. class: vue.normalizeClass(["ri-status", item.statusClass])
  7466. },
  7467. vue.toDisplayString(item.status),
  7468. 3
  7469. /* TEXT, CLASS */
  7470. )
  7471. ])
  7472. ]);
  7473. }),
  7474. 128
  7475. /* KEYED_FRAGMENT */
  7476. )),
  7477. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  7478. ]),
  7479. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  7480. key: 0,
  7481. class: "picker-mask",
  7482. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7483. }, [
  7484. vue.createElementVNode("view", {
  7485. class: "picker-sheet",
  7486. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  7487. }, ["stop"]))
  7488. }, [
  7489. vue.createElementVNode("view", { class: "picker-header" }, [
  7490. vue.createElementVNode("text", {
  7491. class: "picker-cancel",
  7492. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7493. }, "取消"),
  7494. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  7495. vue.createElementVNode("text", {
  7496. class: "picker-confirm",
  7497. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  7498. }, "确定")
  7499. ]),
  7500. vue.createElementVNode("view", { class: "picker-body" }, [
  7501. vue.createElementVNode("scroll-view", {
  7502. "scroll-y": "",
  7503. class: "picker-column",
  7504. "scroll-top": $data.yearScrollTop,
  7505. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  7506. }, [
  7507. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7508. (vue.openBlock(true), vue.createElementBlock(
  7509. vue.Fragment,
  7510. null,
  7511. vue.renderList($data.years, (year) => {
  7512. return vue.openBlock(), vue.createElementBlock("view", {
  7513. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  7514. key: year,
  7515. onClick: ($event) => $data.pickerYear = year
  7516. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  7517. }),
  7518. 128
  7519. /* KEYED_FRAGMENT */
  7520. )),
  7521. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7522. ], 40, ["scroll-top"]),
  7523. vue.createElementVNode("view", { class: "picker-highlight" }),
  7524. vue.createElementVNode("scroll-view", {
  7525. "scroll-y": "",
  7526. class: "picker-column",
  7527. "scroll-top": $data.monthScrollTop,
  7528. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  7529. }, [
  7530. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7531. (vue.openBlock(true), vue.createElementBlock(
  7532. vue.Fragment,
  7533. null,
  7534. vue.renderList($data.months, (month) => {
  7535. return vue.openBlock(), vue.createElementBlock("view", {
  7536. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  7537. key: month,
  7538. onClick: ($event) => $data.pickerMonth = month
  7539. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  7540. }),
  7541. 128
  7542. /* KEYED_FRAGMENT */
  7543. )),
  7544. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7545. ], 40, ["scroll-top"])
  7546. ])
  7547. ])
  7548. ])) : vue.createCommentVNode("v-if", true)
  7549. ]);
  7550. }
  7551. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  7552. const _sfc_main$m = {
  7553. data() {
  7554. return {
  7555. tabs: ["全部", "奖励", "惩罚"],
  7556. activeTab: 0,
  7557. // 所有完整记录(按月分组)
  7558. allGroups: [
  7559. {
  7560. month: 9,
  7561. credited: 30,
  7562. pending: 0,
  7563. items: [
  7564. { date: "09-24", title: "高温补贴", desc: "9月份高温天气补贴", amount: 30, status: "已入账", statusClass: "credited", type: "reward" }
  7565. ]
  7566. },
  7567. {
  7568. month: 8,
  7569. credited: 2610,
  7570. pending: 0,
  7571. items: [
  7572. { date: "08-01", title: "单量奖励", desc: "超140单", amount: 560, status: "已入账", statusClass: "credited", type: "reward" },
  7573. { date: "07-01", title: "单量奖励", desc: "超470单", amount: 2050, status: "已入账", statusClass: "credited", type: "reward" }
  7574. ]
  7575. },
  7576. {
  7577. month: 7,
  7578. credited: 0,
  7579. pending: 0,
  7580. items: [
  7581. { date: "07-15", title: "超时扣款", desc: "订单#T98211 超时30分钟", amount: -15, status: "已扣款", statusClass: "deducted", type: "penalty" },
  7582. { date: "07-20", title: "客诉扣款", desc: "订单#T98222 餐品遗漏", amount: -50, status: "已扣款", statusClass: "deducted", type: "penalty" }
  7583. ]
  7584. }
  7585. ]
  7586. };
  7587. },
  7588. computed: {
  7589. filteredGroups() {
  7590. if (this.activeTab === 0)
  7591. return this.allGroups;
  7592. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  7593. return this.allGroups.map((g) => ({
  7594. ...g,
  7595. items: g.items.filter((i) => i.type === typeKey)
  7596. })).filter((g) => g.items.length > 0);
  7597. }
  7598. },
  7599. methods: {
  7600. switchTab(idx) {
  7601. this.activeTab = idx;
  7602. }
  7603. }
  7604. };
  7605. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  7606. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7607. vue.createElementVNode("view", { class: "tab-bar" }, [
  7608. (vue.openBlock(true), vue.createElementBlock(
  7609. vue.Fragment,
  7610. null,
  7611. vue.renderList($data.tabs, (tab, idx) => {
  7612. return vue.openBlock(), vue.createElementBlock("view", {
  7613. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7614. key: idx,
  7615. onClick: ($event) => $options.switchTab(idx)
  7616. }, [
  7617. vue.createElementVNode(
  7618. "text",
  7619. null,
  7620. vue.toDisplayString(tab),
  7621. 1
  7622. /* TEXT */
  7623. ),
  7624. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7625. key: 0,
  7626. class: "tab-line"
  7627. })) : vue.createCommentVNode("v-if", true)
  7628. ], 10, ["onClick"]);
  7629. }),
  7630. 128
  7631. /* KEYED_FRAGMENT */
  7632. ))
  7633. ]),
  7634. vue.createElementVNode("scroll-view", {
  7635. "scroll-y": "",
  7636. class: "main-scroll"
  7637. }, [
  7638. (vue.openBlock(true), vue.createElementBlock(
  7639. vue.Fragment,
  7640. null,
  7641. vue.renderList($options.filteredGroups, (group, gIdx) => {
  7642. return vue.openBlock(), vue.createElementBlock("view", {
  7643. key: gIdx,
  7644. class: "month-group"
  7645. }, [
  7646. vue.createElementVNode("view", { class: "month-header" }, [
  7647. vue.createElementVNode(
  7648. "text",
  7649. { class: "month-title" },
  7650. vue.toDisplayString(group.month) + "月",
  7651. 1
  7652. /* TEXT */
  7653. ),
  7654. vue.createElementVNode("view", { class: "month-summary" }, [
  7655. vue.createElementVNode(
  7656. "text",
  7657. { class: "month-sum-text" },
  7658. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  7659. 1
  7660. /* TEXT */
  7661. ),
  7662. vue.createElementVNode(
  7663. "text",
  7664. { class: "month-sum-text" },
  7665. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  7666. 1
  7667. /* TEXT */
  7668. )
  7669. ])
  7670. ]),
  7671. (vue.openBlock(true), vue.createElementBlock(
  7672. vue.Fragment,
  7673. null,
  7674. vue.renderList(group.items, (item, rIdx) => {
  7675. return vue.openBlock(), vue.createElementBlock("view", {
  7676. class: "record-item",
  7677. key: rIdx
  7678. }, [
  7679. vue.createElementVNode(
  7680. "view",
  7681. {
  7682. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7683. },
  7684. [
  7685. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7686. ],
  7687. 2
  7688. /* CLASS */
  7689. ),
  7690. vue.createElementVNode("view", { class: "ri-content" }, [
  7691. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7692. vue.createElementVNode(
  7693. "text",
  7694. { class: "ri-date" },
  7695. vue.toDisplayString(item.date),
  7696. 1
  7697. /* TEXT */
  7698. ),
  7699. vue.createElementVNode(
  7700. "text",
  7701. { class: "ri-title" },
  7702. vue.toDisplayString(item.title),
  7703. 1
  7704. /* TEXT */
  7705. )
  7706. ]),
  7707. vue.createElementVNode(
  7708. "text",
  7709. { class: "ri-desc" },
  7710. vue.toDisplayString(item.desc),
  7711. 1
  7712. /* TEXT */
  7713. )
  7714. ]),
  7715. vue.createElementVNode("view", { class: "ri-right" }, [
  7716. vue.createElementVNode(
  7717. "text",
  7718. {
  7719. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7720. },
  7721. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7722. 3
  7723. /* TEXT, CLASS */
  7724. ),
  7725. vue.createElementVNode(
  7726. "text",
  7727. {
  7728. class: vue.normalizeClass(["ri-status", item.statusClass])
  7729. },
  7730. vue.toDisplayString(item.status),
  7731. 3
  7732. /* TEXT, CLASS */
  7733. )
  7734. ])
  7735. ]);
  7736. }),
  7737. 128
  7738. /* KEYED_FRAGMENT */
  7739. ))
  7740. ]);
  7741. }),
  7742. 128
  7743. /* KEYED_FRAGMENT */
  7744. )),
  7745. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7746. ])
  7747. ]);
  7748. }
  7749. 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"]]);
  7750. const logic = {
  7751. components: {
  7752. customTabbar
  7753. },
  7754. data() {
  7755. return {
  7756. showServicePopup: false,
  7757. showLogoutPopup: false,
  7758. profile: null,
  7759. profileLoading: false
  7760. };
  7761. },
  7762. onShow() {
  7763. uni.hideTabBar();
  7764. if (isLoggedIn()) {
  7765. this.loadProfile();
  7766. }
  7767. },
  7768. methods: {
  7769. async loadProfile() {
  7770. if (this.profileLoading)
  7771. return;
  7772. this.profileLoading = true;
  7773. try {
  7774. const res = await getMyProfile();
  7775. this.profile = res.data || null;
  7776. } catch (err) {
  7777. formatAppLog("error", "at pages/mine/logic.js:32", "获取个人信息失败:", err);
  7778. } finally {
  7779. this.profileLoading = false;
  7780. }
  7781. },
  7782. navToSettings() {
  7783. uni.navigateTo({
  7784. url: "/pages/mine/settings/index"
  7785. });
  7786. },
  7787. navToProfile() {
  7788. uni.navigateTo({
  7789. url: "/pages/mine/settings/profile/index"
  7790. });
  7791. },
  7792. navToLevel() {
  7793. uni.navigateTo({
  7794. url: "/pages/mine/level/index"
  7795. });
  7796. },
  7797. navToNotification() {
  7798. uni.navigateTo({
  7799. url: "/pages/mine/message/index"
  7800. });
  7801. },
  7802. navToWallet() {
  7803. uni.navigateTo({
  7804. url: "/pages/mine/wallet/index"
  7805. });
  7806. },
  7807. navToPoints() {
  7808. uni.navigateTo({
  7809. url: "/pages/mine/points/index"
  7810. });
  7811. },
  7812. navToOrderStats() {
  7813. uni.navigateTo({
  7814. url: "/pages/mine/order-stats"
  7815. });
  7816. },
  7817. navToRewards() {
  7818. uni.navigateTo({
  7819. url: "/pages/mine/rewards"
  7820. });
  7821. },
  7822. openServicePopup() {
  7823. this.showServicePopup = true;
  7824. },
  7825. closeServicePopup() {
  7826. this.showServicePopup = false;
  7827. },
  7828. previewQRCode() {
  7829. uni.previewImage({
  7830. urls: ["/static/logo.png"]
  7831. });
  7832. },
  7833. openOnlineService() {
  7834. uni.showToast({
  7835. title: "正在跳转企业微信客服...",
  7836. icon: "none"
  7837. });
  7838. },
  7839. callServicePhone() {
  7840. uni.makePhoneCall({
  7841. phoneNumber: "400-123-4567"
  7842. });
  7843. },
  7844. logout() {
  7845. this.showLogoutPopup = true;
  7846. },
  7847. cancelLogout() {
  7848. this.showLogoutPopup = false;
  7849. },
  7850. async confirmLogout() {
  7851. this.showLogoutPopup = false;
  7852. try {
  7853. await logout();
  7854. } catch (e) {
  7855. }
  7856. clearAuth();
  7857. uni.reLaunch({
  7858. url: "/pages/login/login"
  7859. });
  7860. }
  7861. }
  7862. };
  7863. const _imports_0$1 = "/static/icons/motorbike.svg";
  7864. const _imports_1$5 = "/static/icons/location.svg";
  7865. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  7866. const _imports_3$1 = "/static/icons/calendar.svg";
  7867. const _imports_4 = "/static/icons/settings.svg";
  7868. const _imports_1$4 = "/static/icons/crown.svg";
  7869. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  7870. const _imports_3 = "/static/icons/chevron_right.svg";
  7871. const _imports_8 = "/static/icons/bell_linear.svg";
  7872. const _imports_9 = "/static/icons/money_linear.svg";
  7873. const _imports_10 = "/static/icons/headset_linear.svg";
  7874. const _imports_11 = "/static/icons/close_gray.svg";
  7875. const _imports_13 = "/static/icons/headset_green.svg";
  7876. const _imports_15 = "/static/icons/phone_green.svg";
  7877. const _sfc_main$l = {
  7878. ...logic
  7879. };
  7880. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  7881. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
  7882. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  7883. return vue.openBlock(), vue.createElementBlock(
  7884. vue.Fragment,
  7885. null,
  7886. [
  7887. vue.createElementVNode("view", { class: "container" }, [
  7888. vue.createElementVNode("view", { class: "nav-bg" }, [
  7889. vue.createElementVNode("view", { class: "bg-circle-1" }),
  7890. vue.createElementVNode("view", { class: "bg-circle-2" })
  7891. ]),
  7892. vue.createElementVNode("view", { class: "header-section" }, [
  7893. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  7894. vue.createElementVNode("view", {
  7895. class: "user-card",
  7896. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  7897. }, [
  7898. vue.createElementVNode("image", {
  7899. class: "avatar",
  7900. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  7901. mode: "aspectFill"
  7902. }, null, 8, ["src"]),
  7903. vue.createElementVNode("view", { class: "info-content" }, [
  7904. vue.createElementVNode("view", { class: "name-row" }, [
  7905. vue.createElementVNode(
  7906. "text",
  7907. { class: "name" },
  7908. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  7909. 1
  7910. /* TEXT */
  7911. ),
  7912. vue.createElementVNode("view", { class: "tags" }, [
  7913. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  7914. key: 0,
  7915. class: "tag green"
  7916. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  7917. key: 1,
  7918. class: "tag green"
  7919. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  7920. key: 2,
  7921. class: "tag",
  7922. style: { "background": "#eee", "color": "#999" }
  7923. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  7924. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  7925. key: 3,
  7926. class: "tag blue"
  7927. }, "全职")) : vue.createCommentVNode("v-if", true),
  7928. vue.createElementVNode("image", {
  7929. class: "bike-icon",
  7930. src: _imports_0$1
  7931. })
  7932. ])
  7933. ]),
  7934. vue.createElementVNode("view", { class: "detail-row" }, [
  7935. vue.createElementVNode("image", {
  7936. class: "small-icon",
  7937. src: _imports_1$5
  7938. }),
  7939. vue.createElementVNode(
  7940. "text",
  7941. null,
  7942. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  7943. 1
  7944. /* TEXT */
  7945. ),
  7946. vue.createElementVNode("image", {
  7947. class: "arrow-icon-small",
  7948. src: _imports_0
  7949. })
  7950. ]),
  7951. vue.createElementVNode("view", { class: "detail-row" }, [
  7952. vue.createElementVNode("image", {
  7953. class: "small-icon",
  7954. src: _imports_3$1
  7955. }),
  7956. vue.createElementVNode(
  7957. "text",
  7958. null,
  7959. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  7960. 1
  7961. /* TEXT */
  7962. )
  7963. ])
  7964. ]),
  7965. vue.createElementVNode("image", {
  7966. class: "settings-icon",
  7967. src: _imports_4,
  7968. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  7969. })
  7970. ]),
  7971. vue.createElementVNode("view", { class: "vip-card" }, [
  7972. vue.createElementVNode("view", { class: "vip-left" }, [
  7973. vue.createElementVNode("image", {
  7974. class: "vip-icon",
  7975. src: _imports_1$4
  7976. }),
  7977. vue.createElementVNode("view", { class: "vip-text" }, [
  7978. vue.createElementVNode(
  7979. "text",
  7980. { class: "vip-title" },
  7981. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.levelName) || "普通履约者"),
  7982. 1
  7983. /* TEXT */
  7984. ),
  7985. vue.createElementVNode(
  7986. "text",
  7987. { class: "vip-desc" },
  7988. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.levelDesc) || "完成更多订单即可升级"),
  7989. 1
  7990. /* TEXT */
  7991. )
  7992. ])
  7993. ]),
  7994. vue.createElementVNode("view", {
  7995. class: "vip-btn",
  7996. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  7997. }, [
  7998. vue.createElementVNode("text", null, "查看权益"),
  7999. vue.createElementVNode("image", {
  8000. class: "arrow-icon-small",
  8001. src: _imports_6
  8002. })
  8003. ])
  8004. ])
  8005. ]),
  8006. vue.createElementVNode("view", { class: "stats-panel" }, [
  8007. vue.createElementVNode("view", {
  8008. class: "stat-item",
  8009. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8010. }, [
  8011. vue.createElementVNode("view", { class: "stat-header" }, [
  8012. vue.createElementVNode("view", { class: "red-bar" }),
  8013. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8014. vue.createElementVNode("image", {
  8015. class: "arrow-icon",
  8016. src: _imports_3
  8017. })
  8018. ]),
  8019. vue.createElementVNode("view", { class: "stat-value" }, [
  8020. vue.createElementVNode(
  8021. "text",
  8022. { class: "num" },
  8023. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8024. 1
  8025. /* TEXT */
  8026. ),
  8027. vue.createElementVNode("text", { class: "unit" }, "元")
  8028. ]),
  8029. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8030. ]),
  8031. vue.createElementVNode("view", { class: "divider" }),
  8032. vue.createElementVNode("view", {
  8033. class: "stat-item",
  8034. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8035. }, [
  8036. vue.createElementVNode("view", { class: "stat-header" }, [
  8037. vue.createElementVNode("view", { class: "green-bar" }),
  8038. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8039. vue.createElementVNode("image", {
  8040. class: "arrow-icon",
  8041. src: _imports_3
  8042. })
  8043. ]),
  8044. vue.createElementVNode("view", { class: "stat-value" }, [
  8045. vue.createElementVNode(
  8046. "text",
  8047. { class: "num" },
  8048. vue.toDisplayString(((_m = _ctx.profile) == null ? void 0 : _m.orderCount) || 0),
  8049. 1
  8050. /* TEXT */
  8051. ),
  8052. vue.createElementVNode("text", { class: "unit" }, "单")
  8053. ]),
  8054. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8055. ]),
  8056. vue.createElementVNode("view", { class: "divider" }),
  8057. vue.createElementVNode("view", {
  8058. class: "stat-item",
  8059. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8060. }, [
  8061. vue.createElementVNode("view", { class: "stat-header" }, [
  8062. vue.createElementVNode("view", { class: "orange-bar" }),
  8063. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8064. vue.createElementVNode("image", {
  8065. class: "arrow-icon",
  8066. src: _imports_3
  8067. })
  8068. ]),
  8069. vue.createElementVNode("view", { class: "stat-value" }, [
  8070. vue.createElementVNode(
  8071. "text",
  8072. { class: "num" },
  8073. vue.toDisplayString(((_n = _ctx.profile) == null ? void 0 : _n.points) || 0),
  8074. 1
  8075. /* TEXT */
  8076. ),
  8077. vue.createElementVNode("text", { class: "unit" }, "分")
  8078. ]),
  8079. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8080. ])
  8081. ]),
  8082. vue.createElementVNode("view", { class: "menu-list" }, [
  8083. vue.createElementVNode("view", {
  8084. class: "menu-item",
  8085. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToNotification && _ctx.navToNotification(...args))
  8086. }, [
  8087. vue.createElementVNode("image", {
  8088. class: "menu-icon",
  8089. src: _imports_8
  8090. }),
  8091. vue.createElementVNode("text", { class: "menu-text" }, "消息中心"),
  8092. vue.createElementVNode("view", { class: "menu-right" }, [
  8093. vue.createElementVNode("view", { class: "red-dot" }),
  8094. vue.createElementVNode("image", {
  8095. class: "arrow-icon",
  8096. src: _imports_3
  8097. })
  8098. ])
  8099. ]),
  8100. vue.createElementVNode("view", {
  8101. class: "menu-item",
  8102. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8103. }, [
  8104. vue.createElementVNode("image", {
  8105. class: "menu-icon",
  8106. src: _imports_9
  8107. }),
  8108. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8109. vue.createElementVNode("image", {
  8110. class: "arrow-icon",
  8111. src: _imports_3
  8112. })
  8113. ]),
  8114. vue.createElementVNode("view", {
  8115. class: "menu-item",
  8116. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
  8117. }, [
  8118. vue.createElementVNode("image", {
  8119. class: "menu-icon",
  8120. src: _imports_10
  8121. }),
  8122. vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
  8123. vue.createElementVNode("image", {
  8124. class: "arrow-icon",
  8125. src: _imports_3
  8126. })
  8127. ])
  8128. ]),
  8129. vue.createElementVNode("view", {
  8130. class: "logout-btn",
  8131. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.logout && _ctx.logout(...args))
  8132. }, "退出登录"),
  8133. vue.createElementVNode("view", { class: "dev-tip" }, "本APP部分功能开发当中,请只进行修改个人信息、修改设置、完成订单流程操作"),
  8134. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8135. key: 0,
  8136. class: "service-popup-mask",
  8137. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8138. }, [
  8139. vue.createElementVNode("view", {
  8140. class: "service-popup",
  8141. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  8142. }, ["stop"]))
  8143. }, [
  8144. vue.createElementVNode("view", { class: "service-header" }, [
  8145. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8146. vue.createElementVNode("image", {
  8147. class: "close-icon",
  8148. src: _imports_11,
  8149. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8150. })
  8151. ]),
  8152. vue.createElementVNode("view", { class: "qr-section" }, [
  8153. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8154. vue.createElementVNode("image", {
  8155. class: "qr-img",
  8156. src: _imports_1$8,
  8157. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8158. }),
  8159. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8160. ]),
  8161. vue.createElementVNode("view", { class: "service-list" }, [
  8162. vue.createElementVNode("view", {
  8163. class: "service-row",
  8164. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8165. }, [
  8166. vue.createElementVNode("image", {
  8167. class: "service-row-icon",
  8168. src: _imports_13
  8169. }),
  8170. vue.createElementVNode("view", { class: "service-info" }, [
  8171. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8172. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8173. ]),
  8174. vue.createElementVNode("image", {
  8175. class: "arrow-icon-small",
  8176. src: _imports_3
  8177. })
  8178. ]),
  8179. vue.createElementVNode("view", { class: "service-row" }, [
  8180. vue.createElementVNode("image", {
  8181. class: "service-row-icon",
  8182. src: _imports_14
  8183. }),
  8184. vue.createElementVNode("view", { class: "service-info" }, [
  8185. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8186. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8187. ]),
  8188. vue.createElementVNode("view", {
  8189. class: "call-btn",
  8190. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8191. }, [
  8192. vue.createElementVNode("image", {
  8193. class: "phone-icon-small",
  8194. src: _imports_15
  8195. }),
  8196. vue.createElementVNode("text", null, "拨打")
  8197. ])
  8198. ])
  8199. ])
  8200. ])
  8201. ])) : vue.createCommentVNode("v-if", true),
  8202. vue.createElementVNode(
  8203. "view",
  8204. {
  8205. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8206. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8207. onTouchmove: _cache[20] || (_cache[20] = vue.withModifiers(() => {
  8208. }, ["stop", "prevent"]))
  8209. },
  8210. [
  8211. vue.createElementVNode("view", {
  8212. class: "popup-modal",
  8213. onClick: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  8214. }, ["stop"]))
  8215. }, [
  8216. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8217. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8218. vue.createElementVNode("view", { class: "popup-actions" }, [
  8219. vue.createElementVNode("view", {
  8220. class: "popup-btn cancel",
  8221. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8222. }, "取消"),
  8223. vue.createElementVNode("view", {
  8224. class: "popup-btn confirm",
  8225. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8226. }, "确定")
  8227. ])
  8228. ])
  8229. ],
  8230. 34
  8231. /* CLASS, NEED_HYDRATION */
  8232. )
  8233. ]),
  8234. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8235. ],
  8236. 64
  8237. /* STABLE_FRAGMENT */
  8238. );
  8239. }
  8240. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8241. const _sfc_main$k = {
  8242. data() {
  8243. return {};
  8244. },
  8245. methods: {
  8246. navBack() {
  8247. uni.navigateBack({
  8248. delta: 1
  8249. });
  8250. },
  8251. navTo(type) {
  8252. let url = "";
  8253. switch (type) {
  8254. case "profile":
  8255. url = "/pages/mine/settings/profile/index";
  8256. break;
  8257. case "auth":
  8258. url = "/pages/mine/settings/auth/index";
  8259. break;
  8260. case "bank":
  8261. url = "/pages/mine/settings/bank/index";
  8262. break;
  8263. case "security":
  8264. url = "/pages/mine/settings/security/index";
  8265. break;
  8266. case "push":
  8267. url = "/pages/mine/settings/notification/index";
  8268. break;
  8269. case "about":
  8270. url = "/pages/mine/settings/about/index";
  8271. break;
  8272. default:
  8273. formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
  8274. return;
  8275. }
  8276. uni.navigateTo({ url });
  8277. },
  8278. clearCache() {
  8279. uni.showToast({ title: "缓存已清理", icon: "none" });
  8280. }
  8281. }
  8282. };
  8283. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  8284. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8285. vue.createElementVNode("view", { class: "custom-header" }, [
  8286. vue.createElementVNode("view", {
  8287. class: "header-left",
  8288. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8289. }, [
  8290. vue.createElementVNode("image", {
  8291. class: "back-icon",
  8292. src: _imports_0,
  8293. style: { "transform": "rotate(180deg)" }
  8294. })
  8295. ]),
  8296. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  8297. vue.createElementVNode("view", { class: "header-right" })
  8298. ]),
  8299. vue.createElementVNode("view", { class: "header-placeholder" }),
  8300. vue.createElementVNode("view", { class: "group-card" }, [
  8301. vue.createElementVNode("view", {
  8302. class: "list-item",
  8303. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  8304. }, [
  8305. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  8306. vue.createElementVNode("image", {
  8307. class: "arrow-icon",
  8308. src: _imports_3
  8309. })
  8310. ]),
  8311. vue.createElementVNode("view", {
  8312. class: "list-item",
  8313. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  8314. }, [
  8315. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  8316. vue.createElementVNode("image", {
  8317. class: "arrow-icon",
  8318. src: _imports_3
  8319. })
  8320. ]),
  8321. vue.createElementVNode("view", {
  8322. class: "list-item",
  8323. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
  8324. }, [
  8325. vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
  8326. vue.createElementVNode("view", { class: "item-right" }, [
  8327. vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
  8328. vue.createElementVNode("image", {
  8329. class: "arrow-icon",
  8330. src: _imports_3
  8331. })
  8332. ])
  8333. ]),
  8334. vue.createElementVNode("view", {
  8335. class: "list-item no-border",
  8336. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
  8337. }, [
  8338. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  8339. vue.createElementVNode("image", {
  8340. class: "arrow-icon",
  8341. src: _imports_3
  8342. })
  8343. ])
  8344. ]),
  8345. vue.createElementVNode("view", { class: "group-card" }, [
  8346. vue.createElementVNode("view", {
  8347. class: "list-item",
  8348. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
  8349. }, [
  8350. vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
  8351. vue.createElementVNode("view", { class: "item-right" }, [
  8352. vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
  8353. vue.createElementVNode("image", {
  8354. class: "arrow-icon",
  8355. src: _imports_3
  8356. })
  8357. ])
  8358. ]),
  8359. vue.createElementVNode("view", { class: "list-item" }, [
  8360. vue.createElementVNode("view", { class: "item-row-left" }, [
  8361. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  8362. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  8363. ]),
  8364. vue.createElementVNode("switch", {
  8365. checked: "",
  8366. color: "#FF5722",
  8367. style: { "transform": "scale(0.8)" }
  8368. })
  8369. ]),
  8370. vue.createElementVNode("view", {
  8371. class: "list-item",
  8372. onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
  8373. }, [
  8374. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  8375. vue.createElementVNode("view", { class: "item-right" }, [
  8376. vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
  8377. vue.createElementVNode("image", {
  8378. class: "arrow-icon",
  8379. src: _imports_3
  8380. })
  8381. ])
  8382. ]),
  8383. vue.createElementVNode("view", {
  8384. class: "list-item no-border",
  8385. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
  8386. }, [
  8387. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  8388. vue.createElementVNode("view", { class: "item-right" }, [
  8389. vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
  8390. vue.createElementVNode("image", {
  8391. class: "arrow-icon",
  8392. src: _imports_3
  8393. })
  8394. ])
  8395. ])
  8396. ])
  8397. ]);
  8398. }
  8399. 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"]]);
  8400. const _sfc_main$j = {
  8401. data() {
  8402. return {
  8403. userInfo: {
  8404. name: "",
  8405. workType: "",
  8406. workStatus: "",
  8407. city: "",
  8408. avatar: "/static/touxiang.png",
  8409. stationName: ""
  8410. },
  8411. isStatusPickerShow: false,
  8412. isCityPickerShow: false,
  8413. // 城市级联选择器(与我要加入页面一致)
  8414. selectStep: 0,
  8415. selectedPathway: [],
  8416. currentCityList: [],
  8417. selectedCityId: null
  8418. };
  8419. },
  8420. onLoad() {
  8421. this.loadUserInfo();
  8422. uni.$on("updateName", (newName) => {
  8423. this.userInfo.name = newName;
  8424. });
  8425. },
  8426. onUnload() {
  8427. uni.$off("updateName");
  8428. },
  8429. methods: {
  8430. // 加载用户信息 @author steelwei
  8431. async loadUserInfo() {
  8432. uni.showLoading({ title: "加载中..." });
  8433. try {
  8434. const res = await getMyProfile();
  8435. if (res.code === 200) {
  8436. const data = res.data;
  8437. this.userInfo = {
  8438. name: data.realName || data.name,
  8439. workType: data.workType === "full_time" ? "全职" : "兼职",
  8440. workStatus: this.formatStatus(data.status),
  8441. city: data.cityName || "",
  8442. avatar: data.avatarUrl || "/static/touxiang.png",
  8443. stationName: data.stationName || "未分配站点"
  8444. };
  8445. } else {
  8446. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  8447. }
  8448. } catch (error) {
  8449. formatAppLog("error", "at pages/mine/settings/profile/index.vue:173", "加载用户信息失败:", error);
  8450. uni.showToast({ title: "网络错误", icon: "none" });
  8451. } finally {
  8452. uni.hideLoading();
  8453. }
  8454. },
  8455. // 格式化状态 @author steelwei
  8456. formatStatus(status) {
  8457. const statusMap = {
  8458. "busy": "接单中",
  8459. "resting": "休息中",
  8460. "disabled": "已禁用"
  8461. };
  8462. return statusMap[status] || status;
  8463. },
  8464. navBack() {
  8465. uni.navigateBack({ delta: 1 });
  8466. },
  8467. // 修改头像 @author steelwei
  8468. changeAvatar() {
  8469. uni.chooseImage({
  8470. count: 1,
  8471. success: async (res) => {
  8472. const tempFilePath = res.tempFilePaths[0];
  8473. uni.showLoading({ title: "上传中..." });
  8474. try {
  8475. const uploadRes = await uploadFile(tempFilePath);
  8476. if (uploadRes.code === 200) {
  8477. const { url, ossId } = uploadRes.data;
  8478. const result = await updateAvatar(ossId);
  8479. if (result.code === 200) {
  8480. this.userInfo.avatar = url;
  8481. uni.showToast({ title: "修改成功", icon: "success" });
  8482. } else {
  8483. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  8484. }
  8485. }
  8486. } catch (error) {
  8487. formatAppLog("error", "at pages/mine/settings/profile/index.vue:218", "修改头像失败:", error);
  8488. uni.showToast({ title: "上传失败", icon: "none" });
  8489. } finally {
  8490. uni.hideLoading();
  8491. }
  8492. }
  8493. });
  8494. },
  8495. editName() {
  8496. uni.navigateTo({
  8497. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  8498. });
  8499. },
  8500. showStatusPicker() {
  8501. this.isStatusPickerShow = true;
  8502. },
  8503. closeStatusPicker() {
  8504. this.isStatusPickerShow = false;
  8505. },
  8506. // 选择状态 @author steelwei
  8507. async selectStatus(statusText) {
  8508. const statusMap = {
  8509. "接单中": "busy",
  8510. "休息中": "resting"
  8511. };
  8512. const status = statusMap[statusText];
  8513. try {
  8514. const res = await updateStatus(status);
  8515. if (res.code === 200) {
  8516. this.userInfo.workStatus = statusText;
  8517. uni.showToast({ title: "状态已更新", icon: "success" });
  8518. } else {
  8519. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8520. }
  8521. } catch (error) {
  8522. formatAppLog("error", "at pages/mine/settings/profile/index.vue:258", "修改状态失败:", error);
  8523. uni.showToast({ title: "网络错误", icon: "none" });
  8524. } finally {
  8525. this.closeStatusPicker();
  8526. }
  8527. },
  8528. // 城市级联选择器(与我要加入页面一致) @author steelwei
  8529. async showCityPicker() {
  8530. this.isCityPickerShow = true;
  8531. if (this.selectedPathway.length === 0) {
  8532. await this.resetCityPicker();
  8533. }
  8534. },
  8535. async resetCityPicker() {
  8536. this.selectStep = 0;
  8537. this.selectedPathway = [];
  8538. await this.loadAreaChildren(0);
  8539. },
  8540. closeCityPicker() {
  8541. this.isCityPickerShow = false;
  8542. },
  8543. async loadAreaChildren(parentId) {
  8544. try {
  8545. const res = await getAreaChildren(parentId);
  8546. this.currentCityList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  8547. id: item.id,
  8548. name: item.name,
  8549. type: item.type,
  8550. parentId: item.parentId
  8551. }));
  8552. } catch (err) {
  8553. formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载区域数据失败:", err);
  8554. this.currentCityList = [];
  8555. }
  8556. },
  8557. async selectCityItem(item) {
  8558. this.selectedPathway[this.selectStep] = item;
  8559. if (item.type === 0) {
  8560. this.selectStep++;
  8561. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  8562. await this.loadAreaChildren(item.id);
  8563. if (this.currentCityList.length === 0) {
  8564. this.selectedCityId = item.id;
  8565. this.confirmCity();
  8566. }
  8567. } else {
  8568. this.selectedCityId = item.id;
  8569. this.confirmCity();
  8570. }
  8571. },
  8572. async jumpToStep(step) {
  8573. this.selectStep = step;
  8574. if (step === 0) {
  8575. await this.loadAreaChildren(0);
  8576. } else {
  8577. const parent = this.selectedPathway[step - 1];
  8578. if (parent) {
  8579. await this.loadAreaChildren(parent.id);
  8580. }
  8581. }
  8582. },
  8583. // 确认城市选择 @author steelwei
  8584. async confirmCity() {
  8585. if (this.selectedPathway.length === 0) {
  8586. uni.showToast({ title: "请选择城市", icon: "none" });
  8587. return;
  8588. }
  8589. const cityName = this.selectedPathway.map((i) => i.name).join(" ");
  8590. const cityCode = String(this.selectedCityId);
  8591. try {
  8592. const res = await updateCity(cityCode, cityName);
  8593. if (res.code === 200) {
  8594. this.userInfo.city = cityName;
  8595. uni.showToast({ title: "修改成功", icon: "success" });
  8596. this.closeCityPicker();
  8597. this.selectedPathway = [];
  8598. } else {
  8599. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8600. }
  8601. } catch (error) {
  8602. formatAppLog("error", "at pages/mine/settings/profile/index.vue:346", "修改城市失败:", error);
  8603. uni.showToast({ title: "网络错误", icon: "none" });
  8604. }
  8605. }
  8606. }
  8607. };
  8608. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  8609. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8610. vue.createElementVNode("view", { class: "custom-header" }, [
  8611. vue.createElementVNode("view", {
  8612. class: "header-left",
  8613. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8614. }, [
  8615. vue.createElementVNode("image", {
  8616. class: "back-icon",
  8617. src: _imports_0,
  8618. style: { "transform": "rotate(180deg)" }
  8619. })
  8620. ]),
  8621. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  8622. vue.createElementVNode("view", { class: "header-right" })
  8623. ]),
  8624. vue.createElementVNode("view", { class: "header-placeholder" }),
  8625. vue.createElementVNode("view", { class: "group-card" }, [
  8626. vue.createElementVNode("view", {
  8627. class: "list-item",
  8628. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  8629. }, [
  8630. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  8631. vue.createElementVNode("view", { class: "item-right" }, [
  8632. vue.createElementVNode("image", {
  8633. class: "user-avatar",
  8634. src: $data.userInfo.avatar,
  8635. mode: "aspectFill"
  8636. }, null, 8, ["src"]),
  8637. vue.createElementVNode("image", {
  8638. class: "arrow-icon",
  8639. src: _imports_3
  8640. })
  8641. ])
  8642. ]),
  8643. vue.createElementVNode("view", {
  8644. class: "list-item",
  8645. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  8646. }, [
  8647. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  8648. vue.createElementVNode("view", { class: "item-right" }, [
  8649. vue.createElementVNode(
  8650. "text",
  8651. { class: "item-value" },
  8652. vue.toDisplayString($data.userInfo.name),
  8653. 1
  8654. /* TEXT */
  8655. ),
  8656. vue.createElementVNode("image", {
  8657. class: "arrow-icon",
  8658. src: _imports_3
  8659. })
  8660. ])
  8661. ])
  8662. ]),
  8663. vue.createElementVNode("view", { class: "group-card" }, [
  8664. vue.createElementVNode("view", {
  8665. class: "list-item",
  8666. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  8667. }, [
  8668. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  8669. vue.createElementVNode("view", { class: "item-right" }, [
  8670. vue.createElementVNode(
  8671. "text",
  8672. { class: "item-value-black" },
  8673. vue.toDisplayString($data.userInfo.workStatus),
  8674. 1
  8675. /* TEXT */
  8676. ),
  8677. vue.createElementVNode("image", {
  8678. class: "arrow-icon",
  8679. src: _imports_3
  8680. })
  8681. ])
  8682. ])
  8683. ]),
  8684. vue.createElementVNode("view", { class: "group-card" }, [
  8685. vue.createElementVNode("view", {
  8686. class: "list-item",
  8687. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  8688. }, [
  8689. vue.createElementVNode("text", { class: "item-title" }, "工作城市"),
  8690. vue.createElementVNode("view", { class: "item-right" }, [
  8691. vue.createElementVNode(
  8692. "text",
  8693. { class: "item-value" },
  8694. vue.toDisplayString($data.userInfo.city),
  8695. 1
  8696. /* TEXT */
  8697. ),
  8698. vue.createElementVNode("image", {
  8699. class: "arrow-icon",
  8700. src: _imports_3
  8701. })
  8702. ])
  8703. ]),
  8704. vue.createElementVNode("view", { class: "list-item no-border" }, [
  8705. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  8706. vue.createElementVNode("view", { class: "item-right" }, [
  8707. vue.createElementVNode(
  8708. "text",
  8709. { class: "item-value" },
  8710. vue.toDisplayString($data.userInfo.stationName || "未分配站点"),
  8711. 1
  8712. /* TEXT */
  8713. )
  8714. ])
  8715. ])
  8716. ]),
  8717. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  8718. key: 0,
  8719. class: "popup-mask",
  8720. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  8721. }, [
  8722. vue.createElementVNode("view", {
  8723. class: "popup-content",
  8724. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  8725. }, ["stop"]))
  8726. }, [
  8727. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  8728. vue.createElementVNode("view", {
  8729. class: "popup-item",
  8730. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  8731. }, "接单中"),
  8732. vue.createElementVNode("view", {
  8733. class: "popup-item",
  8734. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  8735. }, "休息中"),
  8736. vue.createElementVNode("view", {
  8737. class: "popup-cancel",
  8738. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  8739. }, "取消")
  8740. ])
  8741. ])) : vue.createCommentVNode("v-if", true),
  8742. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  8743. key: 1,
  8744. class: "popup-mask",
  8745. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  8746. }, [
  8747. vue.createElementVNode("view", {
  8748. class: "popup-content",
  8749. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  8750. }, ["stop"]))
  8751. }, [
  8752. vue.createElementVNode("view", { class: "popup-header-row" }, [
  8753. vue.createElementVNode("text", {
  8754. class: "popup-btn-cancel",
  8755. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  8756. }, "取消"),
  8757. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市"),
  8758. vue.createElementVNode("text", {
  8759. class: "popup-btn-confirm",
  8760. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  8761. }, "确定")
  8762. ]),
  8763. vue.createElementVNode("view", { class: "picker-body" }, [
  8764. vue.createElementVNode("view", { class: "timeline-area" }, [
  8765. (vue.openBlock(true), vue.createElementBlock(
  8766. vue.Fragment,
  8767. null,
  8768. vue.renderList($data.selectedPathway, (item, index) => {
  8769. return vue.openBlock(), vue.createElementBlock("view", {
  8770. class: "timeline-item",
  8771. key: index,
  8772. onClick: ($event) => $options.jumpToStep(index)
  8773. }, [
  8774. vue.createElementVNode("view", { class: "timeline-dot" }),
  8775. vue.createElementVNode(
  8776. "text",
  8777. null,
  8778. vue.toDisplayString(item.name),
  8779. 1
  8780. /* TEXT */
  8781. )
  8782. ], 8, ["onClick"]);
  8783. }),
  8784. 128
  8785. /* KEYED_FRAGMENT */
  8786. )),
  8787. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  8788. key: 0,
  8789. class: "timeline-item active"
  8790. }, [
  8791. vue.createElementVNode("view", { class: "timeline-dot" }),
  8792. vue.createElementVNode("text", null, "请选择")
  8793. ])) : vue.createCommentVNode("v-if", true)
  8794. ]),
  8795. vue.createElementVNode("scroll-view", {
  8796. "scroll-y": "",
  8797. class: "list-area"
  8798. }, [
  8799. (vue.openBlock(true), vue.createElementBlock(
  8800. vue.Fragment,
  8801. null,
  8802. vue.renderList($data.currentCityList, (item) => {
  8803. return vue.openBlock(), vue.createElementBlock("view", {
  8804. class: "list-item",
  8805. key: item.id,
  8806. onClick: ($event) => $options.selectCityItem(item)
  8807. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  8808. }),
  8809. 128
  8810. /* KEYED_FRAGMENT */
  8811. )),
  8812. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8813. key: 0,
  8814. style: { "padding": "20rpx", "color": "#999" }
  8815. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  8816. ])
  8817. ])
  8818. ])
  8819. ])) : vue.createCommentVNode("v-if", true)
  8820. ]);
  8821. }
  8822. 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"]]);
  8823. const _sfc_main$i = {
  8824. data() {
  8825. return {
  8826. authInfo: {
  8827. realName: "",
  8828. idCard: "",
  8829. idCardFront: "",
  8830. idCardBack: "",
  8831. serviceTypes: [],
  8832. authId: false,
  8833. authQual: false,
  8834. pendingAudit: false,
  8835. qualImages: []
  8836. }
  8837. };
  8838. },
  8839. onLoad() {
  8840. this.loadAuthInfo();
  8841. },
  8842. methods: {
  8843. navBack() {
  8844. uni.navigateBack({
  8845. delta: 1
  8846. });
  8847. },
  8848. async loadAuthInfo() {
  8849. try {
  8850. const res = await getAuthInfo();
  8851. if (res.code === 200 && res.data) {
  8852. this.authInfo = {
  8853. realName: res.data.realName || "",
  8854. idCard: res.data.idCard || "",
  8855. idCardFront: res.data.idCardFrontUrl || "",
  8856. idCardBack: res.data.idCardBackUrl || "",
  8857. serviceTypes: res.data.serviceTypeList || [],
  8858. authId: res.data.authId || false,
  8859. authQual: res.data.authQual || false,
  8860. pendingAudit: res.data.pendingAudit || false,
  8861. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  8862. };
  8863. }
  8864. } catch (e) {
  8865. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  8866. uni.showToast({ title: "加载失败", icon: "none" });
  8867. }
  8868. },
  8869. maskIdCard(idCard) {
  8870. if (!idCard || idCard.length < 8)
  8871. return idCard;
  8872. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  8873. },
  8874. editAuth() {
  8875. uni.showModal({
  8876. title: "提示",
  8877. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  8878. success: (res) => {
  8879. if (res.confirm) {
  8880. uni.navigateTo({
  8881. url: "/pages/mine/settings/auth/edit"
  8882. });
  8883. }
  8884. }
  8885. });
  8886. }
  8887. }
  8888. };
  8889. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  8890. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8891. vue.createElementVNode("view", { class: "custom-header" }, [
  8892. vue.createElementVNode("view", {
  8893. class: "header-left",
  8894. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8895. }, [
  8896. vue.createElementVNode("image", {
  8897. class: "back-icon",
  8898. src: _imports_0,
  8899. style: { "transform": "rotate(180deg)" }
  8900. })
  8901. ]),
  8902. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  8903. vue.createElementVNode("view", { class: "header-right" })
  8904. ]),
  8905. vue.createElementVNode("view", { class: "header-placeholder" }),
  8906. vue.createElementVNode("view", { class: "card" }, [
  8907. vue.createElementVNode("view", { class: "section-header" }, [
  8908. vue.createElementVNode("view", { class: "orange-bar" }),
  8909. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  8910. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  8911. key: 0,
  8912. class: "tag-orange"
  8913. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  8914. key: 1,
  8915. class: "tag-green"
  8916. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  8917. key: 2,
  8918. class: "tag-gray"
  8919. }, "未认证"))
  8920. ]),
  8921. vue.createElementVNode("view", { class: "info-row" }, [
  8922. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  8923. vue.createElementVNode(
  8924. "text",
  8925. { class: "value" },
  8926. vue.toDisplayString($data.authInfo.realName || "未设置"),
  8927. 1
  8928. /* TEXT */
  8929. )
  8930. ]),
  8931. vue.createElementVNode("view", { class: "info-row" }, [
  8932. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  8933. vue.createElementVNode(
  8934. "text",
  8935. { class: "value" },
  8936. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  8937. 1
  8938. /* TEXT */
  8939. )
  8940. ]),
  8941. vue.createElementVNode("view", { class: "id-card-row" }, [
  8942. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  8943. key: 0,
  8944. class: "id-card-box green-bg"
  8945. }, [
  8946. vue.createElementVNode("image", {
  8947. class: "id-card-img",
  8948. src: $data.authInfo.idCardFront,
  8949. mode: "aspectFill"
  8950. }, null, 8, ["src"]),
  8951. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  8952. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8953. key: 1,
  8954. class: "id-card-box green-bg"
  8955. }, [
  8956. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  8957. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  8958. ])),
  8959. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  8960. key: 2,
  8961. class: "id-card-box green-bg"
  8962. }, [
  8963. vue.createElementVNode("image", {
  8964. class: "id-card-img",
  8965. src: $data.authInfo.idCardBack,
  8966. mode: "aspectFill"
  8967. }, null, 8, ["src"]),
  8968. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  8969. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8970. key: 3,
  8971. class: "id-card-box green-bg"
  8972. }, [
  8973. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  8974. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  8975. ]))
  8976. ])
  8977. ]),
  8978. vue.createElementVNode("view", { class: "card" }, [
  8979. vue.createElementVNode("view", { class: "section-header" }, [
  8980. vue.createElementVNode("view", { class: "orange-bar" }),
  8981. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  8982. ]),
  8983. vue.createElementVNode("view", { class: "tags-row" }, [
  8984. (vue.openBlock(true), vue.createElementBlock(
  8985. vue.Fragment,
  8986. null,
  8987. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  8988. return vue.openBlock(), vue.createElementBlock(
  8989. "view",
  8990. {
  8991. class: "service-tag",
  8992. key: index
  8993. },
  8994. vue.toDisplayString(type),
  8995. 1
  8996. /* TEXT */
  8997. );
  8998. }),
  8999. 128
  9000. /* KEYED_FRAGMENT */
  9001. )),
  9002. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9003. key: 0,
  9004. class: "empty-text"
  9005. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9006. ])
  9007. ]),
  9008. vue.createElementVNode("view", { class: "card" }, [
  9009. vue.createElementVNode("view", { class: "section-header" }, [
  9010. vue.createElementVNode("view", { class: "orange-bar" }),
  9011. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9012. ]),
  9013. vue.createElementVNode(
  9014. "text",
  9015. { class: "sub-title" },
  9016. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9017. 1
  9018. /* TEXT */
  9019. ),
  9020. vue.createElementVNode("view", { class: "cert-row" }, [
  9021. (vue.openBlock(true), vue.createElementBlock(
  9022. vue.Fragment,
  9023. null,
  9024. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9025. return vue.openBlock(), vue.createElementBlock("view", {
  9026. class: "cert-box yellow-bg",
  9027. key: index
  9028. }, [
  9029. vue.createElementVNode("image", {
  9030. class: "cert-img",
  9031. src: img,
  9032. mode: "aspectFill"
  9033. }, null, 8, ["src"])
  9034. ]);
  9035. }),
  9036. 128
  9037. /* KEYED_FRAGMENT */
  9038. )),
  9039. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9040. key: 0,
  9041. class: "empty-text"
  9042. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9043. ])
  9044. ]),
  9045. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9046. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9047. key: 0,
  9048. class: "action-btn disabled",
  9049. disabled: ""
  9050. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9051. key: 1,
  9052. class: "action-btn",
  9053. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9054. }, "修改认证信息")),
  9055. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9056. key: 2,
  9057. class: "tips"
  9058. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9059. key: 3,
  9060. class: "tips"
  9061. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9062. ])
  9063. ]);
  9064. }
  9065. 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"]]);
  9066. const _sfc_main$h = {
  9067. data() {
  9068. return {
  9069. idCardFront: "",
  9070. idCardBack: "",
  9071. idCardFrontOssId: "",
  9072. idCardBackOssId: "",
  9073. serviceOptions: [],
  9074. selectedServices: [],
  9075. qualifications: {},
  9076. qualOssIds: {}
  9077. };
  9078. },
  9079. async onLoad() {
  9080. await this.loadServiceOptions();
  9081. this.loadAuthInfo();
  9082. },
  9083. methods: {
  9084. async loadServiceOptions() {
  9085. try {
  9086. const res = await getServiceTypes();
  9087. this.serviceOptions = (res.data || []).map((item) => ({
  9088. id: String(item.id),
  9089. name: item.name
  9090. }));
  9091. } catch (e) {
  9092. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
  9093. }
  9094. },
  9095. async loadAuthInfo() {
  9096. try {
  9097. uni.showLoading({ title: "加载中..." });
  9098. const res = await getAuthInfo();
  9099. if (res.code === 200 && res.data) {
  9100. this.idCardFront = res.data.idCardFrontUrl || "";
  9101. this.idCardBack = res.data.idCardBackUrl || "";
  9102. this.idCardFrontOssId = res.data.idCardFront || "";
  9103. this.idCardBackOssId = res.data.idCardBack || "";
  9104. let serviceIds = [];
  9105. if (res.data.serviceTypes) {
  9106. serviceIds = [...new Set(
  9107. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9108. )];
  9109. }
  9110. this.selectedServices = serviceIds;
  9111. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9112. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9113. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9114. validNames.forEach((name, idx) => {
  9115. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9116. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9117. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9118. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9119. });
  9120. }
  9121. uni.hideLoading();
  9122. } catch (e) {
  9123. uni.hideLoading();
  9124. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
  9125. uni.showToast({ title: "加载失败", icon: "none" });
  9126. }
  9127. },
  9128. navBack() {
  9129. uni.navigateBack({ delta: 1 });
  9130. },
  9131. chooseImage(side) {
  9132. uni.chooseImage({
  9133. count: 1,
  9134. sizeType: ["compressed"],
  9135. sourceType: ["album", "camera"],
  9136. success: async (res) => {
  9137. const tempPath = res.tempFilePaths[0];
  9138. if (side === "front") {
  9139. this.idCardFront = tempPath;
  9140. } else {
  9141. this.idCardBack = tempPath;
  9142. }
  9143. try {
  9144. uni.showLoading({ title: "上传中..." });
  9145. const uploadRes = await uploadFile(tempPath);
  9146. if (side === "front") {
  9147. this.idCardFrontOssId = uploadRes.data.ossId;
  9148. } else {
  9149. this.idCardBackOssId = uploadRes.data.ossId;
  9150. }
  9151. uni.hideLoading();
  9152. uni.showToast({ title: "上传成功", icon: "success" });
  9153. } catch (err) {
  9154. uni.hideLoading();
  9155. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
  9156. uni.showToast({ title: "上传失败", icon: "none" });
  9157. }
  9158. }
  9159. });
  9160. },
  9161. deleteImage(side) {
  9162. if (side === "front") {
  9163. this.idCardFront = "";
  9164. this.idCardFrontOssId = "";
  9165. } else {
  9166. this.idCardBack = "";
  9167. this.idCardBackOssId = "";
  9168. }
  9169. },
  9170. getServiceName(serviceId) {
  9171. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9172. return found ? found.name : "";
  9173. },
  9174. toggleService(service) {
  9175. const index = this.selectedServices.indexOf(service.id);
  9176. if (index > -1) {
  9177. this.selectedServices.splice(index, 1);
  9178. this.$delete(this.qualifications, service.name);
  9179. this.$delete(this.qualOssIds, service.name);
  9180. } else {
  9181. this.selectedServices.push(service.id);
  9182. this.$set(this.qualifications, service.name, []);
  9183. this.$set(this.qualOssIds, service.name, []);
  9184. }
  9185. this.$forceUpdate();
  9186. },
  9187. chooseQualImage(service) {
  9188. uni.chooseImage({
  9189. count: 9,
  9190. sizeType: ["compressed"],
  9191. sourceType: ["album", "camera"],
  9192. success: async (res) => {
  9193. if (!this.qualifications[service]) {
  9194. this.qualifications[service] = [];
  9195. this.qualOssIds[service] = [];
  9196. }
  9197. for (const tempPath of res.tempFilePaths) {
  9198. this.qualifications[service].push(tempPath);
  9199. this.$forceUpdate();
  9200. try {
  9201. uni.showLoading({ title: "上传中..." });
  9202. const uploadRes = await uploadFile(tempPath);
  9203. this.qualOssIds[service].push(uploadRes.data.ossId);
  9204. uni.hideLoading();
  9205. } catch (err) {
  9206. uni.hideLoading();
  9207. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
  9208. }
  9209. }
  9210. }
  9211. });
  9212. },
  9213. deleteQualImage(service, index) {
  9214. this.qualifications[service].splice(index, 1);
  9215. if (this.qualOssIds[service]) {
  9216. this.qualOssIds[service].splice(index, 1);
  9217. }
  9218. this.$forceUpdate();
  9219. },
  9220. previewImage(service, index) {
  9221. uni.previewImage({
  9222. urls: this.qualifications[service],
  9223. current: index
  9224. });
  9225. },
  9226. async submitAuth() {
  9227. if (!this.idCardFront || !this.idCardBack) {
  9228. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  9229. return;
  9230. }
  9231. if (this.selectedServices.length === 0) {
  9232. uni.showToast({ title: "请选择服务类型", icon: "none" });
  9233. return;
  9234. }
  9235. for (const serviceId of this.selectedServices) {
  9236. const name = this.getServiceName(serviceId);
  9237. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  9238. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  9239. return;
  9240. }
  9241. }
  9242. uni.showModal({
  9243. title: "提示",
  9244. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9245. success: (res) => {
  9246. if (res.confirm) {
  9247. this.doSubmit();
  9248. }
  9249. }
  9250. });
  9251. },
  9252. async doSubmit() {
  9253. const allQualOssIds = [];
  9254. Object.values(this.qualOssIds).forEach((ids) => {
  9255. allQualOssIds.push(...ids);
  9256. });
  9257. const submitData = {
  9258. idCardFront: this.idCardFrontOssId,
  9259. idCardBack: this.idCardBackOssId,
  9260. serviceTypes: this.selectedServices.join(","),
  9261. // 逗号分隔的服务类型ID
  9262. qualifications: allQualOssIds.join(",")
  9263. // 逗号分隔的资质图片OSS ID
  9264. };
  9265. try {
  9266. uni.showLoading({ title: "提交中..." });
  9267. await updateAuthInfo(submitData);
  9268. uni.hideLoading();
  9269. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  9270. setTimeout(() => {
  9271. uni.navigateBack({ delta: 1 });
  9272. }, 1500);
  9273. } catch (err) {
  9274. uni.hideLoading();
  9275. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
  9276. uni.showToast({ title: "提交失败", icon: "none" });
  9277. }
  9278. }
  9279. }
  9280. };
  9281. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  9282. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  9283. vue.createElementVNode("view", { class: "custom-header" }, [
  9284. vue.createElementVNode("view", {
  9285. class: "header-left",
  9286. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9287. }, [
  9288. vue.createElementVNode("image", {
  9289. class: "back-icon",
  9290. src: _imports_0,
  9291. style: { "transform": "rotate(180deg)" }
  9292. })
  9293. ]),
  9294. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  9295. vue.createElementVNode("view", { class: "header-right" })
  9296. ]),
  9297. vue.createElementVNode("view", { class: "header-placeholder" }),
  9298. vue.createElementVNode("view", { class: "warning-tip" }, [
  9299. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  9300. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  9301. ]),
  9302. vue.createElementVNode("view", { class: "section-card" }, [
  9303. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  9304. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  9305. vue.createElementVNode("view", { class: "id-card-row" }, [
  9306. vue.createElementVNode("view", {
  9307. class: "id-card-upload",
  9308. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  9309. }, [
  9310. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  9311. key: 0,
  9312. src: $data.idCardFront,
  9313. class: "id-card-img",
  9314. mode: "aspectFill"
  9315. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9316. key: 1,
  9317. class: "id-card-placeholder"
  9318. }, [
  9319. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  9320. ])),
  9321. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9322. key: 2,
  9323. class: "delete-btn",
  9324. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  9325. }, "×")) : vue.createCommentVNode("v-if", true),
  9326. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9327. ]),
  9328. vue.createElementVNode("view", {
  9329. class: "id-card-upload",
  9330. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  9331. }, [
  9332. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  9333. key: 0,
  9334. src: $data.idCardBack,
  9335. class: "id-card-img",
  9336. mode: "aspectFill"
  9337. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9338. key: 1,
  9339. class: "id-card-placeholder"
  9340. }, [
  9341. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  9342. ])),
  9343. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9344. key: 2,
  9345. class: "delete-btn",
  9346. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  9347. }, "×")) : vue.createCommentVNode("v-if", true),
  9348. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9349. ])
  9350. ])
  9351. ]),
  9352. vue.createElementVNode("view", { class: "section-card" }, [
  9353. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  9354. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  9355. vue.createElementVNode("view", { class: "service-list" }, [
  9356. (vue.openBlock(true), vue.createElementBlock(
  9357. vue.Fragment,
  9358. null,
  9359. vue.renderList($data.serviceOptions, (service, index) => {
  9360. return vue.openBlock(), vue.createElementBlock("view", {
  9361. class: "service-item",
  9362. key: service.id,
  9363. onClick: ($event) => $options.toggleService(service)
  9364. }, [
  9365. vue.createElementVNode(
  9366. "text",
  9367. { class: "service-name" },
  9368. vue.toDisplayString(service.name),
  9369. 1
  9370. /* TEXT */
  9371. ),
  9372. vue.createElementVNode(
  9373. "view",
  9374. {
  9375. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  9376. },
  9377. [
  9378. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  9379. ],
  9380. 2
  9381. /* CLASS */
  9382. )
  9383. ], 8, ["onClick"]);
  9384. }),
  9385. 128
  9386. /* KEYED_FRAGMENT */
  9387. ))
  9388. ])
  9389. ]),
  9390. vue.createElementVNode("view", { class: "section-card" }, [
  9391. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  9392. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  9393. (vue.openBlock(true), vue.createElementBlock(
  9394. vue.Fragment,
  9395. null,
  9396. vue.renderList($data.selectedServices, (serviceId, index) => {
  9397. return vue.openBlock(), vue.createElementBlock("view", {
  9398. key: serviceId,
  9399. class: "qual-section"
  9400. }, [
  9401. vue.createElementVNode(
  9402. "text",
  9403. { class: "qual-title" },
  9404. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  9405. 1
  9406. /* TEXT */
  9407. ),
  9408. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  9409. (vue.openBlock(true), vue.createElementBlock(
  9410. vue.Fragment,
  9411. null,
  9412. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  9413. return vue.openBlock(), vue.createElementBlock("view", {
  9414. class: "qual-item",
  9415. key: imgIndex,
  9416. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  9417. }, [
  9418. vue.createElementVNode("image", {
  9419. src: img,
  9420. class: "qual-img",
  9421. mode: "aspectFill"
  9422. }, null, 8, ["src"]),
  9423. vue.createElementVNode("view", {
  9424. class: "delete-btn",
  9425. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  9426. }, "×", 8, ["onClick"])
  9427. ], 8, ["onClick"]);
  9428. }),
  9429. 128
  9430. /* KEYED_FRAGMENT */
  9431. )),
  9432. vue.createElementVNode("view", {
  9433. class: "qual-upload-btn",
  9434. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  9435. }, [
  9436. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  9437. ], 8, ["onClick"])
  9438. ])
  9439. ]);
  9440. }),
  9441. 128
  9442. /* KEYED_FRAGMENT */
  9443. )),
  9444. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9445. key: 0,
  9446. class: "empty-hint"
  9447. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  9448. ]),
  9449. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9450. vue.createElementVNode("button", {
  9451. class: "submit-btn",
  9452. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  9453. }, "提交审核")
  9454. ])
  9455. ]);
  9456. }
  9457. 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"]]);
  9458. const _imports_1$3 = "/static/icons/shield.svg";
  9459. const _sfc_main$g = {
  9460. data() {
  9461. return {
  9462. hasShieldIcon: false
  9463. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  9464. };
  9465. },
  9466. methods: {
  9467. navBack() {
  9468. uni.navigateBack({
  9469. delta: 1
  9470. });
  9471. },
  9472. editBank() {
  9473. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  9474. }
  9475. }
  9476. };
  9477. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  9478. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9479. vue.createElementVNode("view", { class: "custom-header" }, [
  9480. vue.createElementVNode("view", {
  9481. class: "header-left",
  9482. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9483. }, [
  9484. vue.createElementVNode("image", {
  9485. class: "back-icon",
  9486. src: _imports_0,
  9487. style: { "transform": "rotate(180deg)" }
  9488. })
  9489. ]),
  9490. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  9491. vue.createElementVNode("view", { class: "header-right" })
  9492. ]),
  9493. vue.createElementVNode("view", { class: "header-placeholder" }),
  9494. vue.createElementVNode("view", { class: "bank-card" }, [
  9495. vue.createElementVNode("view", { class: "card-top" }, [
  9496. vue.createElementVNode("view", { class: "bank-info" }, [
  9497. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  9498. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  9499. ]),
  9500. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  9501. ]),
  9502. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  9503. ]),
  9504. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  9505. vue.createElementVNode("view", { class: "card-bg-circle" })
  9506. ]),
  9507. vue.createElementVNode("button", {
  9508. class: "action-btn",
  9509. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  9510. }, "修改银行卡信息"),
  9511. vue.createElementVNode("view", { class: "security-tip" }, [
  9512. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  9513. key: 0,
  9514. class: "shield-icon",
  9515. src: _imports_1$3
  9516. })) : vue.createCommentVNode("v-if", true),
  9517. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  9518. ])
  9519. ]);
  9520. }
  9521. 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"]]);
  9522. const _sfc_main$f = {
  9523. data() {
  9524. return {
  9525. phone: "",
  9526. hasPassword: false
  9527. };
  9528. },
  9529. onLoad() {
  9530. this.loadProfile();
  9531. },
  9532. methods: {
  9533. navBack() {
  9534. uni.navigateBack({
  9535. delta: 1
  9536. });
  9537. },
  9538. async loadProfile() {
  9539. try {
  9540. const res = await getMyProfile();
  9541. if (res.code === 200 && res.data) {
  9542. this.phone = res.data.phone || "";
  9543. this.hasPassword = !!res.data.hasPassword;
  9544. }
  9545. } catch (e) {
  9546. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  9547. }
  9548. },
  9549. maskPhone(phone) {
  9550. if (!phone || phone.length < 11)
  9551. return phone;
  9552. return phone.substring(0, 3) + "****" + phone.substring(7);
  9553. },
  9554. changeMobile() {
  9555. uni.navigateTo({
  9556. url: "/pages/mine/settings/security/change-phone"
  9557. });
  9558. },
  9559. changePassword() {
  9560. uni.navigateTo({
  9561. url: "/pages/mine/settings/security/change-password"
  9562. });
  9563. },
  9564. async deleteAccount() {
  9565. uni.showModal({
  9566. title: "警示",
  9567. content: "注销账号后将无法恢复,确定要继续吗?",
  9568. success: async (res) => {
  9569. if (res.confirm) {
  9570. try {
  9571. const result = await deleteAccount();
  9572. if (result.code === 200) {
  9573. uni.showToast({ title: "账号已注销", icon: "success" });
  9574. setTimeout(() => {
  9575. uni.reLaunch({ url: "/pages/login/login" });
  9576. }, 1500);
  9577. } else {
  9578. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  9579. }
  9580. } catch (e) {
  9581. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  9582. uni.showToast({ title: "注销失败", icon: "none" });
  9583. }
  9584. }
  9585. }
  9586. });
  9587. }
  9588. }
  9589. };
  9590. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  9591. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9592. vue.createElementVNode("view", { class: "custom-header" }, [
  9593. vue.createElementVNode("view", {
  9594. class: "header-left",
  9595. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9596. }, [
  9597. vue.createElementVNode("image", {
  9598. class: "back-icon",
  9599. src: _imports_0,
  9600. style: { "transform": "rotate(180deg)" }
  9601. })
  9602. ]),
  9603. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  9604. vue.createElementVNode("view", { class: "header-right" })
  9605. ]),
  9606. vue.createElementVNode("view", { class: "header-placeholder" }),
  9607. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  9608. vue.createElementVNode("view", { class: "group-card" }, [
  9609. vue.createElementVNode("view", {
  9610. class: "list-item",
  9611. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  9612. }, [
  9613. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  9614. vue.createElementVNode("view", { class: "item-right" }, [
  9615. vue.createElementVNode(
  9616. "text",
  9617. { class: "item-value" },
  9618. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  9619. 1
  9620. /* TEXT */
  9621. ),
  9622. vue.createElementVNode("image", {
  9623. class: "arrow-icon",
  9624. src: _imports_3
  9625. })
  9626. ])
  9627. ]),
  9628. vue.createElementVNode("view", {
  9629. class: "list-item",
  9630. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  9631. }, [
  9632. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  9633. vue.createElementVNode("view", { class: "item-right" }, [
  9634. vue.createElementVNode(
  9635. "text",
  9636. { class: "item-value" },
  9637. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  9638. 1
  9639. /* TEXT */
  9640. ),
  9641. vue.createElementVNode("image", {
  9642. class: "arrow-icon",
  9643. src: _imports_3
  9644. })
  9645. ])
  9646. ])
  9647. ]),
  9648. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  9649. vue.createElementVNode("view", { class: "group-card" }, [
  9650. vue.createElementVNode("view", {
  9651. class: "list-item no-border",
  9652. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  9653. }, [
  9654. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  9655. vue.createElementVNode("image", {
  9656. class: "arrow-icon",
  9657. src: _imports_3
  9658. })
  9659. ])
  9660. ])
  9661. ]);
  9662. }
  9663. 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"]]);
  9664. const _sfc_main$e = {
  9665. data() {
  9666. return {
  9667. name: ""
  9668. };
  9669. },
  9670. onLoad(options) {
  9671. if (options.name) {
  9672. this.name = decodeURIComponent(options.name);
  9673. }
  9674. },
  9675. methods: {
  9676. navBack() {
  9677. uni.navigateBack({ delta: 1 });
  9678. },
  9679. // 提交修改 @author steelwei
  9680. async submitChange() {
  9681. if (!this.name || !this.name.trim()) {
  9682. uni.showToast({ title: "请输入姓名", icon: "none" });
  9683. return;
  9684. }
  9685. if (this.name.trim().length < 2) {
  9686. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  9687. return;
  9688. }
  9689. uni.showLoading({ title: "提交中..." });
  9690. try {
  9691. const res = await updateName(this.name.trim());
  9692. if (res.code === 200) {
  9693. uni.showToast({
  9694. title: "修改成功",
  9695. icon: "success",
  9696. duration: 2e3
  9697. });
  9698. uni.$emit("updateName", this.name.trim());
  9699. setTimeout(() => {
  9700. uni.navigateBack({ delta: 1 });
  9701. }, 2e3);
  9702. } else {
  9703. uni.showToast({
  9704. title: res.msg || "修改失败",
  9705. icon: "none"
  9706. });
  9707. }
  9708. } catch (error) {
  9709. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  9710. uni.showToast({ title: "网络错误", icon: "none" });
  9711. } finally {
  9712. uni.hideLoading();
  9713. }
  9714. }
  9715. }
  9716. };
  9717. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  9718. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9719. vue.createElementVNode("view", { class: "custom-header" }, [
  9720. vue.createElementVNode("view", {
  9721. class: "header-left",
  9722. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9723. }, [
  9724. vue.createElementVNode("image", {
  9725. class: "back-icon",
  9726. src: _imports_0,
  9727. style: { "transform": "rotate(180deg)" }
  9728. })
  9729. ]),
  9730. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  9731. vue.createElementVNode("view", { class: "header-right" })
  9732. ]),
  9733. vue.createElementVNode("view", { class: "header-placeholder" }),
  9734. vue.createElementVNode("view", { class: "form-card" }, [
  9735. vue.createElementVNode("view", { class: "form-item no-border" }, [
  9736. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  9737. vue.withDirectives(vue.createElementVNode(
  9738. "input",
  9739. {
  9740. class: "form-input",
  9741. type: "text",
  9742. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  9743. placeholder: "请输入真实姓名",
  9744. "placeholder-class": "placeholder",
  9745. maxlength: "20"
  9746. },
  9747. null,
  9748. 512
  9749. /* NEED_PATCH */
  9750. ), [
  9751. [vue.vModelText, $data.name]
  9752. ])
  9753. ])
  9754. ]),
  9755. vue.createElementVNode("view", { class: "btn-area" }, [
  9756. vue.createElementVNode("button", {
  9757. class: "submit-btn",
  9758. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  9759. }, "确认修改")
  9760. ]),
  9761. vue.createElementVNode("view", { class: "tips" }, [
  9762. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  9763. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  9764. ])
  9765. ]);
  9766. }
  9767. 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"]]);
  9768. const _sfc_main$d = {
  9769. data() {
  9770. return {
  9771. oldPassword: "",
  9772. newPassword: "",
  9773. confirmPassword: ""
  9774. };
  9775. },
  9776. methods: {
  9777. navBack() {
  9778. uni.navigateBack({ delta: 1 });
  9779. },
  9780. // 提交修改 @author steelwei
  9781. async submitChange() {
  9782. if (!this.oldPassword) {
  9783. uni.showToast({ title: "请输入旧密码", icon: "none" });
  9784. return;
  9785. }
  9786. if (!this.newPassword) {
  9787. uni.showToast({ title: "请输入新密码", icon: "none" });
  9788. return;
  9789. }
  9790. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  9791. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  9792. return;
  9793. }
  9794. if (this.newPassword !== this.confirmPassword) {
  9795. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  9796. return;
  9797. }
  9798. uni.showLoading({ title: "提交中..." });
  9799. try {
  9800. const res = await updatePassword(this.oldPassword, this.newPassword);
  9801. if (res.code === 200) {
  9802. uni.showToast({
  9803. title: "修改成功",
  9804. icon: "success",
  9805. duration: 2e3
  9806. });
  9807. setTimeout(() => {
  9808. uni.navigateBack({ delta: 1 });
  9809. }, 2e3);
  9810. } else {
  9811. uni.showToast({
  9812. title: res.msg || "修改失败",
  9813. icon: "none"
  9814. });
  9815. }
  9816. } catch (error) {
  9817. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  9818. uni.showToast({ title: "网络错误", icon: "none" });
  9819. } finally {
  9820. uni.hideLoading();
  9821. }
  9822. }
  9823. }
  9824. };
  9825. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  9826. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9827. vue.createElementVNode("view", { class: "custom-header" }, [
  9828. vue.createElementVNode("view", {
  9829. class: "header-left",
  9830. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9831. }, [
  9832. vue.createElementVNode("image", {
  9833. class: "back-icon",
  9834. src: _imports_0,
  9835. style: { "transform": "rotate(180deg)" }
  9836. })
  9837. ]),
  9838. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  9839. vue.createElementVNode("view", { class: "header-right" })
  9840. ]),
  9841. vue.createElementVNode("view", { class: "header-placeholder" }),
  9842. vue.createElementVNode("view", { class: "form-card" }, [
  9843. vue.createElementVNode("view", { class: "form-item" }, [
  9844. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  9845. vue.withDirectives(vue.createElementVNode(
  9846. "input",
  9847. {
  9848. class: "form-input",
  9849. type: "password",
  9850. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  9851. placeholder: "请输入旧密码",
  9852. "placeholder-class": "placeholder"
  9853. },
  9854. null,
  9855. 512
  9856. /* NEED_PATCH */
  9857. ), [
  9858. [vue.vModelText, $data.oldPassword]
  9859. ])
  9860. ]),
  9861. vue.createElementVNode("view", { class: "form-item" }, [
  9862. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  9863. vue.withDirectives(vue.createElementVNode(
  9864. "input",
  9865. {
  9866. class: "form-input",
  9867. type: "password",
  9868. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  9869. placeholder: "请输入新密码(6-20位)",
  9870. "placeholder-class": "placeholder"
  9871. },
  9872. null,
  9873. 512
  9874. /* NEED_PATCH */
  9875. ), [
  9876. [vue.vModelText, $data.newPassword]
  9877. ])
  9878. ]),
  9879. vue.createElementVNode("view", { class: "form-item no-border" }, [
  9880. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  9881. vue.withDirectives(vue.createElementVNode(
  9882. "input",
  9883. {
  9884. class: "form-input",
  9885. type: "password",
  9886. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  9887. placeholder: "请再次输入新密码",
  9888. "placeholder-class": "placeholder"
  9889. },
  9890. null,
  9891. 512
  9892. /* NEED_PATCH */
  9893. ), [
  9894. [vue.vModelText, $data.confirmPassword]
  9895. ])
  9896. ])
  9897. ]),
  9898. vue.createElementVNode("view", { class: "btn-area" }, [
  9899. vue.createElementVNode("button", {
  9900. class: "submit-btn",
  9901. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  9902. }, "确认修改")
  9903. ])
  9904. ]);
  9905. }
  9906. 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"]]);
  9907. const _sfc_main$c = {
  9908. data() {
  9909. return {
  9910. phone: "",
  9911. code: "",
  9912. countdown: 0,
  9913. timer: null
  9914. };
  9915. },
  9916. onUnload() {
  9917. if (this.timer) {
  9918. clearInterval(this.timer);
  9919. }
  9920. },
  9921. methods: {
  9922. navBack() {
  9923. uni.navigateBack({ delta: 1 });
  9924. },
  9925. // 发送验证码 @author steelwei
  9926. sendCode() {
  9927. if (!this.phone) {
  9928. uni.showToast({ title: "请输入手机号", icon: "none" });
  9929. return;
  9930. }
  9931. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  9932. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  9933. return;
  9934. }
  9935. uni.showToast({ title: "验证码已发送", icon: "success" });
  9936. this.countdown = 60;
  9937. this.timer = setInterval(() => {
  9938. this.countdown--;
  9939. if (this.countdown <= 0) {
  9940. clearInterval(this.timer);
  9941. }
  9942. }, 1e3);
  9943. },
  9944. // 提交修改 @author steelwei
  9945. async submitChange() {
  9946. if (!this.phone) {
  9947. uni.showToast({ title: "请输入手机号", icon: "none" });
  9948. return;
  9949. }
  9950. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  9951. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  9952. return;
  9953. }
  9954. if (!this.code) {
  9955. uni.showToast({ title: "请输入验证码", icon: "none" });
  9956. return;
  9957. }
  9958. uni.showLoading({ title: "提交中..." });
  9959. try {
  9960. const res = await updatePhone(this.phone, this.code);
  9961. if (res.code === 200) {
  9962. uni.showToast({
  9963. title: "修改成功",
  9964. icon: "success",
  9965. duration: 2e3
  9966. });
  9967. setTimeout(() => {
  9968. uni.navigateBack({ delta: 1 });
  9969. }, 2e3);
  9970. } else {
  9971. uni.showToast({
  9972. title: res.msg || "修改失败",
  9973. icon: "none"
  9974. });
  9975. }
  9976. } catch (error) {
  9977. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  9978. uni.showToast({ title: "网络错误", icon: "none" });
  9979. } finally {
  9980. uni.hideLoading();
  9981. }
  9982. }
  9983. }
  9984. };
  9985. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  9986. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9987. vue.createElementVNode("view", { class: "custom-header" }, [
  9988. vue.createElementVNode("view", {
  9989. class: "header-left",
  9990. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9991. }, [
  9992. vue.createElementVNode("image", {
  9993. class: "back-icon",
  9994. src: _imports_0,
  9995. style: { "transform": "rotate(180deg)" }
  9996. })
  9997. ]),
  9998. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  9999. vue.createElementVNode("view", { class: "header-right" })
  10000. ]),
  10001. vue.createElementVNode("view", { class: "header-placeholder" }),
  10002. vue.createElementVNode("view", { class: "form-card" }, [
  10003. vue.createElementVNode("view", { class: "form-item" }, [
  10004. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10005. vue.withDirectives(vue.createElementVNode(
  10006. "input",
  10007. {
  10008. class: "form-input",
  10009. type: "number",
  10010. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10011. placeholder: "请输入新手机号",
  10012. "placeholder-class": "placeholder",
  10013. maxlength: "11"
  10014. },
  10015. null,
  10016. 512
  10017. /* NEED_PATCH */
  10018. ), [
  10019. [vue.vModelText, $data.phone]
  10020. ])
  10021. ]),
  10022. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10023. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10024. vue.withDirectives(vue.createElementVNode(
  10025. "input",
  10026. {
  10027. class: "form-input",
  10028. type: "number",
  10029. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10030. placeholder: "请输入验证码",
  10031. "placeholder-class": "placeholder",
  10032. maxlength: "6"
  10033. },
  10034. null,
  10035. 512
  10036. /* NEED_PATCH */
  10037. ), [
  10038. [vue.vModelText, $data.code]
  10039. ]),
  10040. vue.createElementVNode("button", {
  10041. class: "code-btn",
  10042. disabled: $data.countdown > 0,
  10043. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10044. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10045. ])
  10046. ]),
  10047. vue.createElementVNode("view", { class: "btn-area" }, [
  10048. vue.createElementVNode("button", {
  10049. class: "submit-btn",
  10050. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10051. }, "确认修改")
  10052. ]),
  10053. vue.createElementVNode("view", { class: "tips" }, [
  10054. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10055. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10056. ])
  10057. ]);
  10058. }
  10059. 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"]]);
  10060. const _sfc_main$b = {
  10061. data() {
  10062. return {};
  10063. },
  10064. methods: {
  10065. navBack() {
  10066. uni.navigateBack({
  10067. delta: 1
  10068. });
  10069. },
  10070. switchChange(type, e) {
  10071. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10072. }
  10073. }
  10074. };
  10075. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10076. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10077. vue.createElementVNode("view", { class: "custom-header" }, [
  10078. vue.createElementVNode("view", {
  10079. class: "header-left",
  10080. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10081. }, [
  10082. vue.createElementVNode("image", {
  10083. class: "back-icon",
  10084. src: _imports_0,
  10085. style: { "transform": "rotate(180deg)" }
  10086. })
  10087. ]),
  10088. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10089. vue.createElementVNode("view", { class: "header-right" })
  10090. ]),
  10091. vue.createElementVNode("view", { class: "header-placeholder" }),
  10092. vue.createElementVNode("view", { class: "group-card" }, [
  10093. vue.createElementVNode("view", { class: "list-item" }, [
  10094. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10095. vue.createElementVNode(
  10096. "switch",
  10097. {
  10098. checked: "",
  10099. color: "#FF5722",
  10100. style: { "transform": "scale(0.8)" },
  10101. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10102. },
  10103. null,
  10104. 32
  10105. /* NEED_HYDRATION */
  10106. )
  10107. ]),
  10108. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10109. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10110. vue.createElementVNode(
  10111. "switch",
  10112. {
  10113. checked: "",
  10114. color: "#FF5722",
  10115. style: { "transform": "scale(0.8)" },
  10116. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10117. },
  10118. null,
  10119. 32
  10120. /* NEED_HYDRATION */
  10121. )
  10122. ])
  10123. ]),
  10124. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10125. ]);
  10126. }
  10127. 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"]]);
  10128. const _sfc_main$a = {
  10129. data() {
  10130. return {};
  10131. },
  10132. methods: {
  10133. navBack() {
  10134. uni.navigateBack({
  10135. delta: 1
  10136. });
  10137. }
  10138. }
  10139. };
  10140. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  10141. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10142. vue.createElementVNode("view", { class: "custom-header" }, [
  10143. vue.createElementVNode("view", {
  10144. class: "header-left",
  10145. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10146. }, [
  10147. vue.createElementVNode("image", {
  10148. class: "back-icon",
  10149. src: _imports_0,
  10150. style: { "transform": "rotate(180deg)" }
  10151. })
  10152. ]),
  10153. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  10154. vue.createElementVNode("view", { class: "header-right" })
  10155. ]),
  10156. vue.createElementVNode("view", { class: "header-placeholder" }),
  10157. vue.createElementVNode("view", { class: "logo-area" }, [
  10158. vue.createElementVNode("image", {
  10159. class: "app-logo",
  10160. src: _imports_1$8,
  10161. mode: "aspectFit"
  10162. }),
  10163. vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
  10164. vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
  10165. ]),
  10166. vue.createElementVNode("view", { class: "group-card" }, [
  10167. vue.createElementVNode("view", { class: "list-item" }, [
  10168. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10169. vue.createElementVNode("image", {
  10170. class: "arrow-icon",
  10171. src: _imports_3
  10172. })
  10173. ]),
  10174. vue.createElementVNode("view", { class: "list-item" }, [
  10175. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10176. vue.createElementVNode("image", {
  10177. class: "arrow-icon",
  10178. src: _imports_3
  10179. })
  10180. ]),
  10181. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10182. vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
  10183. vue.createElementVNode("view", { class: "item-right" }, [
  10184. vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
  10185. vue.createElementVNode("image", {
  10186. class: "arrow-icon",
  10187. src: _imports_3
  10188. })
  10189. ])
  10190. ])
  10191. ])
  10192. ]);
  10193. }
  10194. 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"]]);
  10195. const _imports_1$2 = "/static/icons/wallet_white.svg";
  10196. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  10197. const _sfc_main$9 = {
  10198. data() {
  10199. return {
  10200. currentTab: 0,
  10201. list: [
  10202. {
  10203. title: "订单服务费用",
  10204. desc: "订单 T1002839 完成结算",
  10205. time: "2026-02-03 14:30",
  10206. amount: "20.00",
  10207. type: "income",
  10208. tag: "订单"
  10209. },
  10210. {
  10211. title: "奖励费用",
  10212. desc: "早高峰冲单奖励",
  10213. time: "2026-02-03 10:00",
  10214. amount: "15.00",
  10215. type: "income",
  10216. tag: "奖励"
  10217. },
  10218. {
  10219. title: "惩罚金额",
  10220. desc: "超时送达扣款",
  10221. time: "2026-02-02 18:20",
  10222. amount: "-10.00",
  10223. type: "expense",
  10224. tag: "惩罚"
  10225. },
  10226. {
  10227. title: "后台转账",
  10228. desc: "2026年1月工资发放",
  10229. time: "2026-02-01 09:00",
  10230. amount: "3500.00",
  10231. type: "income",
  10232. tag: "工资"
  10233. }
  10234. ]
  10235. };
  10236. },
  10237. computed: {
  10238. displayList() {
  10239. if (this.currentTab === 0)
  10240. return this.list;
  10241. if (this.currentTab === 1)
  10242. return this.list.filter((item) => item.type === "income");
  10243. if (this.currentTab === 2)
  10244. return this.list.filter((item) => item.type === "expense");
  10245. return [];
  10246. }
  10247. },
  10248. methods: {
  10249. navBack() {
  10250. uni.navigateBack();
  10251. },
  10252. navToBill() {
  10253. uni.navigateTo({
  10254. url: "/pages/mine/wallet/bill"
  10255. });
  10256. },
  10257. switchTab(index) {
  10258. this.currentTab = index;
  10259. }
  10260. }
  10261. };
  10262. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  10263. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10264. vue.createElementVNode("view", { class: "nav-bar" }, [
  10265. vue.createElementVNode("view", {
  10266. class: "nav-left",
  10267. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10268. }, [
  10269. vue.createElementVNode("image", {
  10270. class: "back-icon",
  10271. src: _imports_0
  10272. })
  10273. ]),
  10274. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  10275. vue.createElementVNode("view", { class: "nav-right" })
  10276. ]),
  10277. vue.createElementVNode("view", { class: "wallet-card" }, [
  10278. vue.createElementVNode("view", { class: "bg-circle big" }),
  10279. vue.createElementVNode("view", { class: "bg-circle small" }),
  10280. vue.createElementVNode("view", { class: "card-content" }, [
  10281. vue.createElementVNode("view", { class: "card-top" }, [
  10282. vue.createElementVNode("view", { class: "app-info" }, [
  10283. vue.createElementVNode("image", {
  10284. class: "app-logo",
  10285. src: _imports_1$2,
  10286. mode: "aspectFit"
  10287. }),
  10288. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  10289. ]),
  10290. vue.createElementVNode("view", {
  10291. class: "bill-btn",
  10292. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  10293. }, [
  10294. vue.createElementVNode("text", null, "账单")
  10295. ])
  10296. ]),
  10297. vue.createElementVNode("view", { class: "balance-container" }, [
  10298. vue.createElementVNode("view", { class: "balance-main" }, [
  10299. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  10300. vue.createElementVNode("text", { class: "balance-num" }, "2575.00")
  10301. ]),
  10302. vue.createElementVNode("view", { class: "balance-pending" }, [
  10303. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  10304. vue.createElementVNode("text", { class: "pending-num" }, "580.00")
  10305. ])
  10306. ])
  10307. ])
  10308. ]),
  10309. vue.createElementVNode("view", { class: "record-container" }, [
  10310. vue.createElementVNode("view", { class: "record-header" }, [
  10311. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  10312. vue.createElementVNode("view", {
  10313. class: "header-more",
  10314. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  10315. }, [
  10316. vue.createElementVNode("text", null, "查看全部"),
  10317. vue.createElementVNode("image", {
  10318. class: "more-icon",
  10319. src: _imports_2$2
  10320. })
  10321. ])
  10322. ]),
  10323. vue.createElementVNode("view", { class: "tabs-row" }, [
  10324. vue.createElementVNode(
  10325. "view",
  10326. {
  10327. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10328. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  10329. },
  10330. [
  10331. vue.createElementVNode("text", null, "全部"),
  10332. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10333. key: 0,
  10334. class: "tab-line"
  10335. })) : vue.createCommentVNode("v-if", true)
  10336. ],
  10337. 2
  10338. /* CLASS */
  10339. ),
  10340. vue.createElementVNode(
  10341. "view",
  10342. {
  10343. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10344. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  10345. },
  10346. [
  10347. vue.createElementVNode("text", null, "收入"),
  10348. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10349. key: 0,
  10350. class: "tab-line"
  10351. })) : vue.createCommentVNode("v-if", true)
  10352. ],
  10353. 2
  10354. /* CLASS */
  10355. ),
  10356. vue.createElementVNode(
  10357. "view",
  10358. {
  10359. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10360. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  10361. },
  10362. [
  10363. vue.createElementVNode("text", null, "支出"),
  10364. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10365. key: 0,
  10366. class: "tab-line"
  10367. })) : vue.createCommentVNode("v-if", true)
  10368. ],
  10369. 2
  10370. /* CLASS */
  10371. )
  10372. ]),
  10373. vue.createElementVNode("view", { class: "record-list" }, [
  10374. (vue.openBlock(true), vue.createElementBlock(
  10375. vue.Fragment,
  10376. null,
  10377. vue.renderList($options.displayList, (item, index) => {
  10378. return vue.openBlock(), vue.createElementBlock("view", {
  10379. class: "list-item",
  10380. key: index
  10381. }, [
  10382. vue.createElementVNode("view", { class: "item-left" }, [
  10383. vue.createElementVNode(
  10384. "text",
  10385. { class: "item-title" },
  10386. vue.toDisplayString(item.title),
  10387. 1
  10388. /* TEXT */
  10389. ),
  10390. vue.createElementVNode(
  10391. "text",
  10392. { class: "item-desc" },
  10393. vue.toDisplayString(item.desc),
  10394. 1
  10395. /* TEXT */
  10396. ),
  10397. vue.createElementVNode(
  10398. "text",
  10399. { class: "item-time" },
  10400. vue.toDisplayString(item.time),
  10401. 1
  10402. /* TEXT */
  10403. )
  10404. ]),
  10405. vue.createElementVNode("view", { class: "item-right" }, [
  10406. vue.createElementVNode(
  10407. "text",
  10408. {
  10409. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10410. },
  10411. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10412. 3
  10413. /* TEXT, CLASS */
  10414. ),
  10415. vue.createElementVNode("view", { class: "item-tag" }, [
  10416. vue.createElementVNode(
  10417. "text",
  10418. null,
  10419. vue.toDisplayString(item.tag),
  10420. 1
  10421. /* TEXT */
  10422. )
  10423. ])
  10424. ])
  10425. ]);
  10426. }),
  10427. 128
  10428. /* KEYED_FRAGMENT */
  10429. ))
  10430. ])
  10431. ])
  10432. ]);
  10433. }
  10434. 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"]]);
  10435. const _sfc_main$8 = {
  10436. data() {
  10437. return {
  10438. currentTab: 0,
  10439. // 模拟数据结构
  10440. groups: [
  10441. {
  10442. month: "2月 2026",
  10443. income: "35.00",
  10444. expense: "10.00",
  10445. items: [
  10446. {
  10447. title: "订单服务费用",
  10448. desc: "订单完成",
  10449. time: "02-03 14:30",
  10450. amount: "20.00",
  10451. type: "income",
  10452. tag: "订单"
  10453. },
  10454. {
  10455. title: "奖励费用",
  10456. desc: "早高峰奖励",
  10457. // shortened to match ui better
  10458. time: "02-03 10:00",
  10459. amount: "15.00",
  10460. type: "income",
  10461. tag: "奖励"
  10462. },
  10463. {
  10464. title: "惩罚金额",
  10465. desc: "超时送达",
  10466. time: "02-02 18:20",
  10467. amount: "-10.00",
  10468. type: "expense",
  10469. tag: "惩罚"
  10470. }
  10471. ]
  10472. },
  10473. {
  10474. month: "1月 2026",
  10475. income: "3500.00",
  10476. expense: "100.00",
  10477. items: [
  10478. {
  10479. title: "后台转账",
  10480. desc: "1月工资发放",
  10481. time: "01-31 09:00",
  10482. amount: "3500.00",
  10483. type: "income",
  10484. tag: "工资"
  10485. },
  10486. {
  10487. title: "装备扣款",
  10488. desc: "装备费用",
  10489. time: "01-15 10:00",
  10490. amount: "-100.00",
  10491. type: "expense",
  10492. tag: "扣款"
  10493. }
  10494. ]
  10495. }
  10496. ]
  10497. };
  10498. },
  10499. computed: {
  10500. displayGroups() {
  10501. if (this.currentTab === 0)
  10502. return this.groups;
  10503. return this.groups.map((group) => {
  10504. const filteredItems = group.items.filter((item) => {
  10505. const type = this.currentTab === 1 ? "income" : "expense";
  10506. return item.type === type;
  10507. });
  10508. return {
  10509. ...group,
  10510. items: filteredItems
  10511. };
  10512. }).filter((group) => group.items.length > 0);
  10513. }
  10514. },
  10515. methods: {
  10516. navBack() {
  10517. uni.navigateBack();
  10518. },
  10519. switchTab(index) {
  10520. this.currentTab = index;
  10521. }
  10522. }
  10523. };
  10524. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  10525. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10526. vue.createElementVNode("view", { class: "nav-bar" }, [
  10527. vue.createElementVNode("view", {
  10528. class: "nav-left",
  10529. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10530. }, [
  10531. vue.createElementVNode("image", {
  10532. class: "back-icon",
  10533. src: _imports_0
  10534. })
  10535. ]),
  10536. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  10537. vue.createElementVNode("view", { class: "nav-right" })
  10538. ]),
  10539. vue.createElementVNode("view", { class: "content-area" }, [
  10540. vue.createElementVNode("view", { class: "tabs-row" }, [
  10541. vue.createElementVNode(
  10542. "view",
  10543. {
  10544. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10545. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  10546. },
  10547. [
  10548. vue.createElementVNode("text", null, "全部"),
  10549. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10550. key: 0,
  10551. class: "tab-line"
  10552. })) : vue.createCommentVNode("v-if", true)
  10553. ],
  10554. 2
  10555. /* CLASS */
  10556. ),
  10557. vue.createElementVNode(
  10558. "view",
  10559. {
  10560. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10561. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  10562. },
  10563. [
  10564. vue.createElementVNode("text", null, "收入"),
  10565. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10566. key: 0,
  10567. class: "tab-line"
  10568. })) : vue.createCommentVNode("v-if", true)
  10569. ],
  10570. 2
  10571. /* CLASS */
  10572. ),
  10573. vue.createElementVNode(
  10574. "view",
  10575. {
  10576. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10577. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  10578. },
  10579. [
  10580. vue.createElementVNode("text", null, "支出"),
  10581. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10582. key: 0,
  10583. class: "tab-line"
  10584. })) : vue.createCommentVNode("v-if", true)
  10585. ],
  10586. 2
  10587. /* CLASS */
  10588. )
  10589. ]),
  10590. vue.createElementVNode("scroll-view", {
  10591. "scroll-y": "",
  10592. class: "bill-list"
  10593. }, [
  10594. (vue.openBlock(true), vue.createElementBlock(
  10595. vue.Fragment,
  10596. null,
  10597. vue.renderList($options.displayGroups, (group, gIndex) => {
  10598. return vue.openBlock(), vue.createElementBlock("view", {
  10599. key: gIndex,
  10600. class: "month-group"
  10601. }, [
  10602. vue.createElementVNode("view", { class: "group-header" }, [
  10603. vue.createElementVNode(
  10604. "text",
  10605. { class: "month-title" },
  10606. vue.toDisplayString(group.month),
  10607. 1
  10608. /* TEXT */
  10609. ),
  10610. vue.createElementVNode(
  10611. "text",
  10612. { class: "month-summary" },
  10613. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  10614. 1
  10615. /* TEXT */
  10616. )
  10617. ]),
  10618. (vue.openBlock(true), vue.createElementBlock(
  10619. vue.Fragment,
  10620. null,
  10621. vue.renderList(group.items, (item, index) => {
  10622. return vue.openBlock(), vue.createElementBlock("view", {
  10623. class: "list-item",
  10624. key: index
  10625. }, [
  10626. vue.createElementVNode(
  10627. "view",
  10628. {
  10629. class: vue.normalizeClass(["item-icon-box", item.type])
  10630. },
  10631. [
  10632. vue.createElementVNode(
  10633. "text",
  10634. { class: "item-icon-symbol" },
  10635. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  10636. 1
  10637. /* TEXT */
  10638. )
  10639. ],
  10640. 2
  10641. /* CLASS */
  10642. ),
  10643. vue.createElementVNode("view", { class: "item-center" }, [
  10644. vue.createElementVNode(
  10645. "text",
  10646. { class: "item-title" },
  10647. vue.toDisplayString(item.title),
  10648. 1
  10649. /* TEXT */
  10650. ),
  10651. vue.createElementVNode(
  10652. "text",
  10653. { class: "item-desc" },
  10654. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  10655. 1
  10656. /* TEXT */
  10657. )
  10658. ]),
  10659. vue.createElementVNode("view", { class: "item-right" }, [
  10660. vue.createElementVNode(
  10661. "text",
  10662. {
  10663. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10664. },
  10665. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10666. 3
  10667. /* TEXT, CLASS */
  10668. ),
  10669. vue.createElementVNode("view", { class: "item-tag" }, [
  10670. vue.createElementVNode(
  10671. "text",
  10672. null,
  10673. vue.toDisplayString(item.tag),
  10674. 1
  10675. /* TEXT */
  10676. )
  10677. ])
  10678. ])
  10679. ]);
  10680. }),
  10681. 128
  10682. /* KEYED_FRAGMENT */
  10683. ))
  10684. ]);
  10685. }),
  10686. 128
  10687. /* KEYED_FRAGMENT */
  10688. )),
  10689. vue.createElementVNode("view", { class: "list-padding-bottom" })
  10690. ])
  10691. ])
  10692. ]);
  10693. }
  10694. 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"]]);
  10695. const _sfc_main$7 = {
  10696. data() {
  10697. return {
  10698. currentIndex: 2,
  10699. // 默认选中 L3
  10700. levels: [
  10701. {
  10702. id: "L1",
  10703. name: "青铜履约者",
  10704. score: "需成长值 0",
  10705. isCurrent: false,
  10706. benefits: [
  10707. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" }
  10708. ]
  10709. },
  10710. {
  10711. id: "L2",
  10712. name: "白银履约者",
  10713. score: "需成长值 200",
  10714. isCurrent: false,
  10715. benefits: [
  10716. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" },
  10717. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单", icon: "" }
  10718. ]
  10719. },
  10720. {
  10721. id: "L3",
  10722. name: "黄金履约者",
  10723. score: "需成长值 500",
  10724. isCurrent: true,
  10725. benefits: [
  10726. { name: "极速提现", desc: "提现申请 2 小时内极速到账,无需等待。", icon: "" },
  10727. { name: "晋升奖励", desc: "晋升等级可获得现金红包奖励。", icon: "/static/icons/reward.svg" },
  10728. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单。", icon: "" }
  10729. ]
  10730. },
  10731. {
  10732. id: "L4",
  10733. name: "钻石履约者",
  10734. score: "需成长值 2000",
  10735. isCurrent: false,
  10736. benefits: [
  10737. { name: "专属客服", desc: "享受 7x24 小时专属客服通道。", icon: "/static/icons/service.svg" },
  10738. { name: "生日礼包", desc: "生日当天获赠专属礼包。", icon: "/static/icons/reward.svg" },
  10739. { name: "装备免费换", desc: "每年可免费更换一套履约装备。", icon: "" },
  10740. { name: "医疗互助", desc: "享受平台提供的医疗互助保障。", icon: "" }
  10741. ]
  10742. }
  10743. ],
  10744. isPopupShow: false,
  10745. currentBenefit: null
  10746. };
  10747. },
  10748. computed: {
  10749. currentLevel() {
  10750. return this.levels[this.currentIndex];
  10751. }
  10752. },
  10753. methods: {
  10754. navBack() {
  10755. uni.navigateBack({
  10756. delta: 1
  10757. });
  10758. },
  10759. swiperChange(e) {
  10760. this.currentIndex = e.detail.current;
  10761. },
  10762. changeLevel(index) {
  10763. this.currentIndex = index;
  10764. },
  10765. showBenefitDetail(benefit) {
  10766. this.currentBenefit = benefit;
  10767. this.isPopupShow = true;
  10768. },
  10769. closePopup() {
  10770. this.isPopupShow = false;
  10771. }
  10772. }
  10773. };
  10774. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  10775. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10776. vue.createElementVNode("view", { class: "custom-header" }, [
  10777. vue.createElementVNode("view", {
  10778. class: "header-left",
  10779. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10780. }, [
  10781. vue.createElementVNode("image", {
  10782. class: "back-icon",
  10783. src: _imports_0,
  10784. style: { "transform": "rotate(180deg)" }
  10785. })
  10786. ]),
  10787. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  10788. vue.createElementVNode("view", { class: "header-right" })
  10789. ]),
  10790. vue.createElementVNode("view", { class: "header-placeholder" }),
  10791. vue.createElementVNode("view", { class: "swiper-container" }, [
  10792. vue.createElementVNode("swiper", {
  10793. class: "level-swiper",
  10794. "previous-margin": "80rpx",
  10795. "next-margin": "80rpx",
  10796. current: $data.currentIndex,
  10797. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  10798. }, [
  10799. (vue.openBlock(true), vue.createElementBlock(
  10800. vue.Fragment,
  10801. null,
  10802. vue.renderList($data.levels, (level, index) => {
  10803. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  10804. key: index,
  10805. onClick: ($event) => $options.changeLevel(index)
  10806. }, [
  10807. vue.createElementVNode(
  10808. "view",
  10809. {
  10810. class: vue.normalizeClass(["level-card", "level-card-" + (index + 1)]),
  10811. style: vue.normalizeStyle({ transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)" })
  10812. },
  10813. [
  10814. vue.createElementVNode("view", { class: "card-content" }, [
  10815. vue.createElementVNode("view", { class: "card-header" }, [
  10816. vue.createElementVNode(
  10817. "view",
  10818. { class: "level-badge" },
  10819. vue.toDisplayString(level.id),
  10820. 1
  10821. /* TEXT */
  10822. ),
  10823. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  10824. key: 0,
  10825. class: "current-badge"
  10826. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  10827. ]),
  10828. vue.createElementVNode(
  10829. "text",
  10830. { class: "level-name" },
  10831. vue.toDisplayString(level.name),
  10832. 1
  10833. /* TEXT */
  10834. ),
  10835. vue.createElementVNode(
  10836. "text",
  10837. { class: "level-score" },
  10838. vue.toDisplayString(level.score),
  10839. 1
  10840. /* TEXT */
  10841. ),
  10842. vue.createElementVNode("image", {
  10843. class: "crown-overlay",
  10844. src: _imports_1$4,
  10845. mode: "aspectFit"
  10846. })
  10847. ])
  10848. ],
  10849. 6
  10850. /* CLASS, STYLE */
  10851. )
  10852. ], 8, ["onClick"]);
  10853. }),
  10854. 128
  10855. /* KEYED_FRAGMENT */
  10856. ))
  10857. ], 40, ["current"]),
  10858. vue.createElementVNode("view", { class: "swiper-dots" }, [
  10859. (vue.openBlock(true), vue.createElementBlock(
  10860. vue.Fragment,
  10861. null,
  10862. vue.renderList($data.levels, (item, index) => {
  10863. return vue.openBlock(), vue.createElementBlock(
  10864. "view",
  10865. {
  10866. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  10867. key: index
  10868. },
  10869. null,
  10870. 2
  10871. /* CLASS */
  10872. );
  10873. }),
  10874. 128
  10875. /* KEYED_FRAGMENT */
  10876. ))
  10877. ])
  10878. ]),
  10879. vue.createElementVNode("view", { class: "benefits-title-row" }, [
  10880. vue.createElementVNode(
  10881. "text",
  10882. { class: "benefits-title" },
  10883. vue.toDisplayString($options.currentLevel.id) + " 专属权益",
  10884. 1
  10885. /* TEXT */
  10886. ),
  10887. vue.createElementVNode(
  10888. "text",
  10889. { class: "benefits-count" },
  10890. "(" + vue.toDisplayString($options.currentLevel.benefits.length) + ")",
  10891. 1
  10892. /* TEXT */
  10893. )
  10894. ]),
  10895. vue.createElementVNode("view", { class: "benefits-grid" }, [
  10896. (vue.openBlock(true), vue.createElementBlock(
  10897. vue.Fragment,
  10898. null,
  10899. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  10900. return vue.openBlock(), vue.createElementBlock("view", {
  10901. class: "benefit-item",
  10902. key: index,
  10903. onClick: ($event) => $options.showBenefitDetail(benefit)
  10904. }, [
  10905. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  10906. benefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  10907. key: 0,
  10908. class: "benefit-icon",
  10909. src: benefit.icon,
  10910. mode: "aspectFit"
  10911. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  10912. "view",
  10913. {
  10914. key: 1,
  10915. class: "benefit-icon-placeholder"
  10916. },
  10917. vue.toDisplayString(benefit.name[0]),
  10918. 1
  10919. /* TEXT */
  10920. ))
  10921. ]),
  10922. vue.createElementVNode(
  10923. "text",
  10924. { class: "benefit-name" },
  10925. vue.toDisplayString(benefit.name),
  10926. 1
  10927. /* TEXT */
  10928. )
  10929. ], 8, ["onClick"]);
  10930. }),
  10931. 128
  10932. /* KEYED_FRAGMENT */
  10933. ))
  10934. ]),
  10935. vue.createElementVNode(
  10936. "view",
  10937. {
  10938. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  10939. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  10940. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  10941. }, ["stop", "prevent"]))
  10942. },
  10943. [
  10944. vue.createElementVNode("view", {
  10945. class: "popup-modal",
  10946. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  10947. }, ["stop"]))
  10948. }, [
  10949. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  10950. $data.currentBenefit && $data.currentBenefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  10951. key: 0,
  10952. class: "benefit-icon-large",
  10953. src: $data.currentBenefit.icon,
  10954. mode: "aspectFit"
  10955. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  10956. "view",
  10957. {
  10958. key: 1,
  10959. class: "benefit-icon-placeholder-large"
  10960. },
  10961. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  10962. 1
  10963. /* TEXT */
  10964. ))
  10965. ]),
  10966. vue.createElementVNode(
  10967. "text",
  10968. { class: "popup-title" },
  10969. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  10970. 1
  10971. /* TEXT */
  10972. ),
  10973. vue.createElementVNode(
  10974. "text",
  10975. { class: "popup-desc" },
  10976. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.desc : ""),
  10977. 1
  10978. /* TEXT */
  10979. ),
  10980. vue.createElementVNode("button", {
  10981. class: "popup-btn",
  10982. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  10983. }, "我知道了")
  10984. ])
  10985. ],
  10986. 34
  10987. /* CLASS, NEED_HYDRATION */
  10988. )
  10989. ]);
  10990. }
  10991. 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"]]);
  10992. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  10993. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  10994. const _sfc_main$6 = {
  10995. data() {
  10996. return {};
  10997. },
  10998. methods: {
  10999. navBack() {
  11000. uni.navigateBack();
  11001. },
  11002. navToOrderMsg() {
  11003. uni.navigateTo({
  11004. url: "/pages/mine/message/order"
  11005. });
  11006. },
  11007. navToSystemMsg() {
  11008. uni.navigateTo({
  11009. url: "/pages/mine/message/system"
  11010. });
  11011. }
  11012. }
  11013. };
  11014. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  11015. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11016. vue.createElementVNode("view", { class: "nav-bar" }, [
  11017. vue.createElementVNode("view", {
  11018. class: "nav-left",
  11019. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11020. }, [
  11021. vue.createElementVNode("image", {
  11022. class: "back-icon",
  11023. src: _imports_0,
  11024. style: { "transform": "rotate(180deg)" }
  11025. })
  11026. ]),
  11027. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11028. vue.createElementVNode("view", { class: "nav-right" }, [
  11029. vue.createElementVNode("view", { class: "more-dots" }, [
  11030. vue.createElementVNode("view", { class: "dot" }),
  11031. vue.createElementVNode("view", { class: "dot" }),
  11032. vue.createElementVNode("view", { class: "dot" })
  11033. ])
  11034. ])
  11035. ]),
  11036. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11037. vue.createElementVNode("view", { class: "message-list" }, [
  11038. vue.createElementVNode("view", {
  11039. class: "message-item",
  11040. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  11041. }, [
  11042. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11043. vue.createElementVNode("image", {
  11044. class: "msg-icon",
  11045. src: _imports_1$1
  11046. }),
  11047. vue.createElementVNode("view", { class: "red-dot-badge" })
  11048. ]),
  11049. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11050. vue.createElementVNode("view", { class: "top-row" }, [
  11051. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  11052. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  11053. ]),
  11054. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  11055. ])
  11056. ]),
  11057. vue.createElementVNode("view", {
  11058. class: "message-item",
  11059. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  11060. }, [
  11061. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11062. vue.createElementVNode("image", {
  11063. class: "msg-icon",
  11064. src: _imports_2$1
  11065. })
  11066. ]),
  11067. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11068. vue.createElementVNode("view", { class: "top-row" }, [
  11069. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11070. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11071. ]),
  11072. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11073. ])
  11074. ])
  11075. ])
  11076. ]);
  11077. }
  11078. 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"]]);
  11079. const _sfc_main$5 = {
  11080. methods: {
  11081. navBack() {
  11082. uni.navigateBack();
  11083. }
  11084. }
  11085. };
  11086. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  11087. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11088. vue.createElementVNode("view", { class: "nav-bar" }, [
  11089. vue.createElementVNode("view", {
  11090. class: "nav-left",
  11091. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11092. }, [
  11093. vue.createElementVNode("image", {
  11094. class: "back-icon",
  11095. src: _imports_0,
  11096. style: { "transform": "rotate(180deg)" }
  11097. })
  11098. ]),
  11099. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  11100. vue.createElementVNode("view", { class: "nav-right" })
  11101. ]),
  11102. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11103. vue.createElementVNode("view", { class: "msg-group" }, [
  11104. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  11105. vue.createElementVNode("view", { class: "msg-card" }, [
  11106. vue.createElementVNode("view", { class: "card-header" }, [
  11107. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  11108. vue.createElementVNode("view", { class: "red-dot" })
  11109. ]),
  11110. vue.createElementVNode("view", { class: "card-body" }, [
  11111. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11112. ]),
  11113. vue.createElementVNode("view", { class: "card-footer" }, [
  11114. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  11115. vue.createElementVNode("image", {
  11116. class: "arrow-icon",
  11117. src: _imports_3
  11118. })
  11119. ])
  11120. ]),
  11121. vue.createElementVNode("view", { class: "msg-card" }, [
  11122. vue.createElementVNode("view", { class: "card-header" }, [
  11123. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  11124. ]),
  11125. vue.createElementVNode("view", { class: "card-body" }, [
  11126. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11127. ]),
  11128. vue.createElementVNode("view", { class: "card-footer" }, [
  11129. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  11130. vue.createElementVNode("image", {
  11131. class: "arrow-icon",
  11132. src: _imports_3
  11133. })
  11134. ])
  11135. ])
  11136. ]),
  11137. vue.createElementVNode("view", { class: "msg-group" }, [
  11138. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  11139. vue.createElementVNode("view", { class: "msg-card" }, [
  11140. vue.createElementVNode("view", { class: "card-header" }, [
  11141. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  11142. ]),
  11143. vue.createElementVNode("view", { class: "card-body" }, [
  11144. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  11145. ]),
  11146. vue.createElementVNode("view", { class: "card-footer" }, [
  11147. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  11148. vue.createElementVNode("image", {
  11149. class: "arrow-icon",
  11150. src: _imports_3
  11151. })
  11152. ])
  11153. ])
  11154. ])
  11155. ]);
  11156. }
  11157. 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"]]);
  11158. const _sfc_main$4 = {
  11159. methods: {
  11160. navBack() {
  11161. uni.navigateBack();
  11162. },
  11163. navToDetail() {
  11164. uni.navigateTo({
  11165. url: "/pages/mine/message/detail"
  11166. });
  11167. }
  11168. }
  11169. };
  11170. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11171. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11172. vue.createElementVNode("view", { class: "nav-bar" }, [
  11173. vue.createElementVNode("view", {
  11174. class: "nav-left",
  11175. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11176. }, [
  11177. vue.createElementVNode("image", {
  11178. class: "back-icon",
  11179. src: _imports_0,
  11180. style: { "transform": "rotate(180deg)" }
  11181. })
  11182. ]),
  11183. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  11184. vue.createElementVNode("view", { class: "nav-right" })
  11185. ]),
  11186. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11187. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  11188. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  11189. vue.createElementVNode("view", {
  11190. class: "sys-card",
  11191. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11192. }, [
  11193. vue.createElementVNode("view", { class: "sys-header" }, [
  11194. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  11195. vue.createElementVNode("view", { class: "red-dot" })
  11196. ]),
  11197. vue.createElementVNode("view", { class: "sys-content" }, [
  11198. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  11199. ]),
  11200. vue.createElementVNode("view", { class: "sys-footer" }, [
  11201. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  11202. vue.createElementVNode("view", { class: "check-more" }, [
  11203. vue.createElementVNode("text", null, "查看详情"),
  11204. vue.createElementVNode("image", {
  11205. class: "arrow-icon-small",
  11206. src: _imports_3
  11207. })
  11208. ])
  11209. ])
  11210. ]),
  11211. vue.createElementVNode("view", { class: "sys-card" }, [
  11212. vue.createElementVNode("view", { class: "sys-header" }, [
  11213. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  11214. ]),
  11215. vue.createElementVNode("view", { class: "sys-content" }, [
  11216. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  11217. ]),
  11218. vue.createElementVNode("view", { class: "sys-footer" }, [
  11219. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  11220. vue.createElementVNode("view", { class: "check-more" }, [
  11221. vue.createElementVNode("text", null, "查看详情"),
  11222. vue.createElementVNode("image", {
  11223. class: "arrow-icon-small",
  11224. src: _imports_3
  11225. })
  11226. ])
  11227. ])
  11228. ]),
  11229. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  11230. vue.createElementVNode("view", { class: "sys-card" }, [
  11231. vue.createElementVNode("view", { class: "sys-header" }, [
  11232. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  11233. ]),
  11234. vue.createElementVNode("view", { class: "sys-content" }, [
  11235. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  11236. ]),
  11237. vue.createElementVNode("view", { class: "sys-footer" }, [
  11238. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  11239. vue.createElementVNode("view", { class: "check-more" }, [
  11240. vue.createElementVNode("text", null, "查看详情"),
  11241. vue.createElementVNode("image", {
  11242. class: "arrow-icon-small",
  11243. src: _imports_3
  11244. })
  11245. ])
  11246. ])
  11247. ])
  11248. ])
  11249. ]);
  11250. }
  11251. 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"]]);
  11252. const _sfc_main$3 = {
  11253. methods: {
  11254. navBack() {
  11255. uni.navigateBack();
  11256. }
  11257. }
  11258. };
  11259. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  11260. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11261. vue.createElementVNode("view", { class: "nav-bar" }, [
  11262. vue.createElementVNode("view", {
  11263. class: "nav-left",
  11264. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11265. }, [
  11266. vue.createElementVNode("image", {
  11267. class: "back-icon",
  11268. src: _imports_0,
  11269. style: { "transform": "rotate(180deg)" }
  11270. })
  11271. ]),
  11272. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  11273. vue.createElementVNode("view", { class: "nav-right" })
  11274. ]),
  11275. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11276. vue.createElementVNode("view", { class: "detail-content" }, [
  11277. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  11278. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  11279. vue.createElementVNode("view", { class: "detail-body" }, [
  11280. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  11281. ]),
  11282. vue.createElementVNode("view", { class: "detail-footer" }, [
  11283. vue.createElementVNode("view", { class: "divider" }),
  11284. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  11285. ])
  11286. ])
  11287. ]);
  11288. }
  11289. 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"]]);
  11290. const _imports_1 = "/static/icons/diamond_white.svg";
  11291. const _imports_2 = "/static/icons/star_decor.svg";
  11292. const _sfc_main$2 = {
  11293. data() {
  11294. return {
  11295. currentTab: 0,
  11296. list: [
  11297. {
  11298. title: "订单完成奖励",
  11299. desc: "订单 T1002839 完成",
  11300. time: "2026-02-05 18:42",
  11301. amount: "10",
  11302. type: "income",
  11303. tag: "订单"
  11304. },
  11305. {
  11306. title: "好评奖励",
  11307. desc: "获得五星好评",
  11308. time: "2026-02-05 19:00",
  11309. amount: "5",
  11310. type: "income",
  11311. tag: "奖励"
  11312. },
  11313. {
  11314. title: "超时扣分",
  11315. desc: "订单 T1002830 超时送达",
  11316. time: "2026-02-04 10:20",
  11317. amount: "-10",
  11318. type: "expense",
  11319. tag: "惩罚"
  11320. }
  11321. ]
  11322. };
  11323. },
  11324. computed: {
  11325. displayList() {
  11326. if (this.currentTab === 0)
  11327. return this.list;
  11328. const type = this.currentTab === 1 ? "income" : "expense";
  11329. return this.list.filter((item) => item.type === type);
  11330. }
  11331. },
  11332. methods: {
  11333. navBack() {
  11334. uni.navigateBack();
  11335. },
  11336. navToDetail() {
  11337. uni.navigateTo({
  11338. url: "/pages/mine/points/detail"
  11339. });
  11340. },
  11341. navToEquity() {
  11342. },
  11343. switchTab(index) {
  11344. this.currentTab = index;
  11345. }
  11346. }
  11347. };
  11348. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  11349. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11350. vue.createElementVNode("view", { class: "nav-bar" }, [
  11351. vue.createElementVNode("view", {
  11352. class: "nav-left",
  11353. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11354. }, [
  11355. vue.createElementVNode("image", {
  11356. class: "back-icon",
  11357. src: _imports_0
  11358. })
  11359. ]),
  11360. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  11361. vue.createElementVNode("view", { class: "nav-right" })
  11362. ]),
  11363. vue.createElementVNode("view", { class: "points-card" }, [
  11364. vue.createElementVNode("view", { class: "card-header" }, [
  11365. vue.createElementVNode("view", {
  11366. class: "equity-btn",
  11367. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  11368. }, [
  11369. vue.createElementVNode("image", {
  11370. class: "equity-icon",
  11371. src: _imports_1
  11372. }),
  11373. vue.createElementVNode("text", null, "积分权益")
  11374. ]),
  11375. vue.createElementVNode("view", {
  11376. class: "detail-link",
  11377. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11378. }, [
  11379. vue.createElementVNode("text", null, "明细")
  11380. ])
  11381. ]),
  11382. vue.createElementVNode("view", { class: "card-body" }, [
  11383. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  11384. vue.createElementVNode("text", { class: "value" }, "1200")
  11385. ]),
  11386. vue.createElementVNode("image", {
  11387. class: "bg-decor",
  11388. src: _imports_2,
  11389. mode: "aspectFit"
  11390. })
  11391. ]),
  11392. vue.createElementVNode("view", { class: "record-container" }, [
  11393. vue.createElementVNode("view", { class: "record-header" }, [
  11394. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  11395. vue.createElementVNode("view", {
  11396. class: "header-more",
  11397. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11398. }, [
  11399. vue.createElementVNode("text", null, "查看全部"),
  11400. vue.createElementVNode("image", {
  11401. class: "more-icon",
  11402. src: _imports_3
  11403. })
  11404. ])
  11405. ]),
  11406. vue.createElementVNode("view", { class: "tabs-row" }, [
  11407. vue.createElementVNode(
  11408. "view",
  11409. {
  11410. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11411. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  11412. },
  11413. [
  11414. vue.createElementVNode("text", null, "全部"),
  11415. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11416. key: 0,
  11417. class: "tab-line"
  11418. })) : vue.createCommentVNode("v-if", true)
  11419. ],
  11420. 2
  11421. /* CLASS */
  11422. ),
  11423. vue.createElementVNode(
  11424. "view",
  11425. {
  11426. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11427. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  11428. },
  11429. [
  11430. vue.createElementVNode("text", null, "获取"),
  11431. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11432. key: 0,
  11433. class: "tab-line"
  11434. })) : vue.createCommentVNode("v-if", true)
  11435. ],
  11436. 2
  11437. /* CLASS */
  11438. ),
  11439. vue.createElementVNode(
  11440. "view",
  11441. {
  11442. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11443. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  11444. },
  11445. [
  11446. vue.createElementVNode("text", null, "扣减"),
  11447. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11448. key: 0,
  11449. class: "tab-line"
  11450. })) : vue.createCommentVNode("v-if", true)
  11451. ],
  11452. 2
  11453. /* CLASS */
  11454. )
  11455. ]),
  11456. vue.createElementVNode("view", { class: "record-list" }, [
  11457. (vue.openBlock(true), vue.createElementBlock(
  11458. vue.Fragment,
  11459. null,
  11460. vue.renderList($options.displayList, (item, index) => {
  11461. return vue.openBlock(), vue.createElementBlock("view", {
  11462. class: "list-item",
  11463. key: index
  11464. }, [
  11465. vue.createElementVNode("view", { class: "item-left" }, [
  11466. vue.createElementVNode(
  11467. "text",
  11468. { class: "item-title" },
  11469. vue.toDisplayString(item.title),
  11470. 1
  11471. /* TEXT */
  11472. ),
  11473. vue.createElementVNode(
  11474. "text",
  11475. { class: "item-desc" },
  11476. vue.toDisplayString(item.desc),
  11477. 1
  11478. /* TEXT */
  11479. ),
  11480. vue.createElementVNode(
  11481. "text",
  11482. { class: "item-time" },
  11483. vue.toDisplayString(item.time),
  11484. 1
  11485. /* TEXT */
  11486. )
  11487. ]),
  11488. vue.createElementVNode("view", { class: "item-right" }, [
  11489. vue.createElementVNode(
  11490. "text",
  11491. {
  11492. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11493. },
  11494. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11495. 3
  11496. /* TEXT, CLASS */
  11497. ),
  11498. vue.createElementVNode("view", { class: "item-tag" }, [
  11499. vue.createElementVNode(
  11500. "text",
  11501. null,
  11502. vue.toDisplayString(item.tag),
  11503. 1
  11504. /* TEXT */
  11505. )
  11506. ])
  11507. ])
  11508. ]);
  11509. }),
  11510. 128
  11511. /* KEYED_FRAGMENT */
  11512. ))
  11513. ])
  11514. ])
  11515. ]);
  11516. }
  11517. 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"]]);
  11518. const _sfc_main$1 = {
  11519. data() {
  11520. return {
  11521. currentTab: 0,
  11522. // 模拟数据结构
  11523. groups: [
  11524. {
  11525. month: "2月 2026",
  11526. income: "15",
  11527. expense: "10",
  11528. items: [
  11529. {
  11530. title: "订单完成奖励",
  11531. desc: "订单完成",
  11532. time: "02-05 18:42",
  11533. amount: "10",
  11534. type: "income",
  11535. tag: "订单"
  11536. },
  11537. {
  11538. title: "好评奖励",
  11539. desc: "五星好评",
  11540. time: "02-05 19:00",
  11541. amount: "5",
  11542. type: "income",
  11543. tag: "奖励"
  11544. },
  11545. {
  11546. title: "超时扣分",
  11547. desc: "订单超时",
  11548. time: "02-04 10:20",
  11549. amount: "-10",
  11550. type: "expense",
  11551. tag: "惩罚"
  11552. }
  11553. ]
  11554. },
  11555. {
  11556. month: "1月 2026",
  11557. income: "100",
  11558. expense: "0",
  11559. items: [
  11560. {
  11561. title: "新用户奖励",
  11562. desc: "注册赠送",
  11563. time: "01-10 09:00",
  11564. amount: "100",
  11565. type: "income",
  11566. tag: "系统"
  11567. }
  11568. ]
  11569. }
  11570. ]
  11571. };
  11572. },
  11573. computed: {
  11574. displayGroups() {
  11575. if (this.currentTab === 0)
  11576. return this.groups;
  11577. return this.groups.map((group) => {
  11578. const filteredItems = group.items.filter((item) => {
  11579. const type = this.currentTab === 1 ? "income" : "expense";
  11580. return item.type === type;
  11581. });
  11582. return {
  11583. ...group,
  11584. items: filteredItems
  11585. };
  11586. }).filter((group) => group.items.length > 0);
  11587. }
  11588. },
  11589. methods: {
  11590. navBack() {
  11591. uni.navigateBack();
  11592. },
  11593. switchTab(index) {
  11594. this.currentTab = index;
  11595. }
  11596. }
  11597. };
  11598. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  11599. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11600. vue.createElementVNode("view", { class: "nav-bar" }, [
  11601. vue.createElementVNode("view", {
  11602. class: "nav-left",
  11603. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11604. }, [
  11605. vue.createElementVNode("image", {
  11606. class: "back-icon",
  11607. src: _imports_0
  11608. })
  11609. ]),
  11610. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  11611. vue.createElementVNode("view", { class: "nav-right" })
  11612. ]),
  11613. vue.createElementVNode("view", { class: "content-area" }, [
  11614. vue.createElementVNode("view", { class: "tabs-row" }, [
  11615. vue.createElementVNode(
  11616. "view",
  11617. {
  11618. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11619. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11620. },
  11621. [
  11622. vue.createElementVNode("text", null, "全部"),
  11623. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11624. key: 0,
  11625. class: "tab-line"
  11626. })) : vue.createCommentVNode("v-if", true)
  11627. ],
  11628. 2
  11629. /* CLASS */
  11630. ),
  11631. vue.createElementVNode(
  11632. "view",
  11633. {
  11634. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11635. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11636. },
  11637. [
  11638. vue.createElementVNode("text", null, "获取"),
  11639. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11640. key: 0,
  11641. class: "tab-line"
  11642. })) : vue.createCommentVNode("v-if", true)
  11643. ],
  11644. 2
  11645. /* CLASS */
  11646. ),
  11647. vue.createElementVNode(
  11648. "view",
  11649. {
  11650. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11651. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11652. },
  11653. [
  11654. vue.createElementVNode("text", null, "扣减"),
  11655. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11656. key: 0,
  11657. class: "tab-line"
  11658. })) : vue.createCommentVNode("v-if", true)
  11659. ],
  11660. 2
  11661. /* CLASS */
  11662. )
  11663. ]),
  11664. vue.createElementVNode("scroll-view", {
  11665. "scroll-y": "",
  11666. class: "bill-list"
  11667. }, [
  11668. (vue.openBlock(true), vue.createElementBlock(
  11669. vue.Fragment,
  11670. null,
  11671. vue.renderList($options.displayGroups, (group, gIndex) => {
  11672. return vue.openBlock(), vue.createElementBlock("view", {
  11673. key: gIndex,
  11674. class: "month-group"
  11675. }, [
  11676. vue.createElementVNode("view", { class: "group-header" }, [
  11677. vue.createElementVNode(
  11678. "text",
  11679. { class: "month-title" },
  11680. vue.toDisplayString(group.month),
  11681. 1
  11682. /* TEXT */
  11683. ),
  11684. vue.createElementVNode(
  11685. "text",
  11686. { class: "month-summary" },
  11687. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  11688. 1
  11689. /* TEXT */
  11690. )
  11691. ]),
  11692. (vue.openBlock(true), vue.createElementBlock(
  11693. vue.Fragment,
  11694. null,
  11695. vue.renderList(group.items, (item, index) => {
  11696. return vue.openBlock(), vue.createElementBlock("view", {
  11697. class: "list-item",
  11698. key: index
  11699. }, [
  11700. vue.createElementVNode(
  11701. "view",
  11702. {
  11703. class: vue.normalizeClass(["item-icon-box", item.type])
  11704. },
  11705. [
  11706. vue.createElementVNode(
  11707. "text",
  11708. { class: "item-icon-symbol" },
  11709. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11710. 1
  11711. /* TEXT */
  11712. )
  11713. ],
  11714. 2
  11715. /* CLASS */
  11716. ),
  11717. vue.createElementVNode("view", { class: "item-center" }, [
  11718. vue.createElementVNode(
  11719. "text",
  11720. { class: "item-title" },
  11721. vue.toDisplayString(item.title),
  11722. 1
  11723. /* TEXT */
  11724. ),
  11725. vue.createElementVNode(
  11726. "text",
  11727. { class: "item-desc" },
  11728. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11729. 1
  11730. /* TEXT */
  11731. )
  11732. ]),
  11733. vue.createElementVNode("view", { class: "item-right" }, [
  11734. vue.createElementVNode(
  11735. "text",
  11736. {
  11737. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11738. },
  11739. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11740. 3
  11741. /* TEXT, CLASS */
  11742. ),
  11743. vue.createElementVNode("view", { class: "item-tag" }, [
  11744. vue.createElementVNode(
  11745. "text",
  11746. null,
  11747. vue.toDisplayString(item.tag),
  11748. 1
  11749. /* TEXT */
  11750. )
  11751. ])
  11752. ])
  11753. ]);
  11754. }),
  11755. 128
  11756. /* KEYED_FRAGMENT */
  11757. ))
  11758. ]);
  11759. }),
  11760. 128
  11761. /* KEYED_FRAGMENT */
  11762. )),
  11763. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11764. ])
  11765. ])
  11766. ]);
  11767. }
  11768. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  11769. __definePage("pages/login/login", PagesLoginLogin);
  11770. __definePage("pages/recruit/landing", PagesRecruitLanding);
  11771. __definePage("pages/recruit/form", PagesRecruitForm);
  11772. __definePage("pages/recruit/auth", PagesRecruitAuth);
  11773. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  11774. __definePage("pages/recruit/success", PagesRecruitSuccess);
  11775. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  11776. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  11777. __definePage("pages/home/index", PagesHomeIndex);
  11778. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  11779. __definePage("pages/orders/index", PagesOrdersIndex);
  11780. __definePage("pages/orders/detail", PagesOrdersDetail);
  11781. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  11782. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  11783. __definePage("pages/mine/rewards", PagesMineRewards);
  11784. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  11785. __definePage("pages/mine/index", PagesMineIndex);
  11786. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  11787. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  11788. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  11789. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  11790. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  11791. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  11792. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  11793. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  11794. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  11795. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  11796. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  11797. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  11798. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  11799. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  11800. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  11801. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  11802. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  11803. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  11804. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  11805. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  11806. const _sfc_main = {
  11807. onLaunch: function() {
  11808. formatAppLog("log", "at App.vue:6", "App Launch");
  11809. if (isLoggedIn()) {
  11810. uni.switchTab({
  11811. url: "/pages/home/index"
  11812. });
  11813. }
  11814. },
  11815. onShow: function() {
  11816. formatAppLog("log", "at App.vue:15", "App Show");
  11817. },
  11818. onHide: function() {
  11819. formatAppLog("log", "at App.vue:18", "App Hide");
  11820. }
  11821. };
  11822. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  11823. function createApp() {
  11824. const app = vue.createVueApp(App);
  11825. return {
  11826. app
  11827. };
  11828. }
  11829. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  11830. uni.Vuex = __Vuex__;
  11831. uni.Pinia = __Pinia__;
  11832. __app__.provide("__globalStyles", __uniConfig.styles);
  11833. __app__._component.mpType = "app";
  11834. __app__._component.render = () => {
  11835. };
  11836. __app__.mount("#app");
  11837. })(Vue);