app-service.js 464 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772
  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. const statusCode = res.statusCode;
  173. const result = res.data;
  174. if (statusCode === 401) {
  175. clearAuth();
  176. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  177. setTimeout(() => {
  178. uni.reLaunch({ url: "/pages/login/login" });
  179. }, 1500);
  180. return reject(new Error("未授权"));
  181. }
  182. if (statusCode !== 200) {
  183. const msg = (result == null ? void 0 : result.msg) || `请求失败(${statusCode})`;
  184. uni.showToast({ title: msg, icon: "none" });
  185. return reject(new Error(msg));
  186. }
  187. if (result.code !== void 0 && result.code !== 200) {
  188. const msg = result.msg || "操作失败";
  189. uni.showToast({ title: msg, icon: "none" });
  190. return reject(new Error(msg));
  191. }
  192. resolve(result);
  193. },
  194. fail: (err) => {
  195. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  196. reject(err);
  197. }
  198. });
  199. });
  200. }
  201. function loginByPassword(username, password) {
  202. return request({
  203. url: "/auth/login",
  204. method: "POST",
  205. needToken: false,
  206. data: {
  207. tenantId: TENANT_ID,
  208. platformId: PLATFORM_ID,
  209. username,
  210. password,
  211. clientId: CLIENT_ID,
  212. grantType: "fulfiller_password"
  213. // 使用履约者专用认证策略
  214. }
  215. });
  216. }
  217. function loginBySms(phonenumber, smsCode) {
  218. return request({
  219. url: "/auth/login",
  220. method: "POST",
  221. needToken: false,
  222. data: {
  223. tenantId: TENANT_ID,
  224. platformId: PLATFORM_ID,
  225. phonenumber,
  226. smsCode,
  227. clientId: CLIENT_ID,
  228. grantType: "fulfiller_sms"
  229. // 使用履约者专用认证策略
  230. }
  231. });
  232. }
  233. function sendSmsCode(phonenumber) {
  234. return request({
  235. url: "/resource/sms/code",
  236. method: "GET",
  237. needToken: false,
  238. data: { phonenumber }
  239. });
  240. }
  241. function logout() {
  242. return request({
  243. url: "/auth/logout",
  244. method: "POST"
  245. });
  246. }
  247. const logic$9 = {
  248. data() {
  249. return {
  250. currentTab: 0,
  251. // 0: 免密, 1: 密码
  252. mobile: "",
  253. code: "",
  254. password: "",
  255. showPassword: false,
  256. isAgreed: false,
  257. countDown: 0,
  258. timer: null,
  259. showAgreementModal: false,
  260. agreementTitle: "",
  261. agreementContent: "",
  262. loginLoading: false
  263. };
  264. },
  265. methods: {
  266. showAgreement(type) {
  267. this.agreementTitle = type === 1 ? "用户服务协议" : "隐私政策";
  268. if (type === 1) {
  269. this.agreementContent = "1. 服务条款\n欢迎使用宠宝平台。您在使用本服务时需遵守以下条款...\n\n2. 用户责任\n用户需对自己的行为负责...\n\n3. 账号管理\n请妥善保管您的账号密码...";
  270. } else {
  271. this.agreementContent = "1. 信息收集\n为了提供服务,我们需要收集您的手机号、地理位置、设备信息等必要数据。\n\n2. 信息使用\n您的位置信息将用于订单匹配和路径规划;您的联系方式将用于接单通知和客户沟通。\n\n3. 信息保护\n我们将采取严格的安全措施保护您的个人信息,未经授权不会向第三方披露。";
  272. }
  273. this.showAgreementModal = true;
  274. },
  275. async getVerifyCode() {
  276. if (this.currentTab === 1)
  277. return;
  278. if (this.countDown > 0)
  279. return;
  280. if (!this.mobile || this.mobile.length !== 11) {
  281. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  282. return;
  283. }
  284. try {
  285. const res = await sendSmsCode(this.mobile);
  286. this.countDown = 60;
  287. this.timer = setInterval(() => {
  288. this.countDown--;
  289. if (this.countDown <= 0) {
  290. clearInterval(this.timer);
  291. }
  292. }, 1e3);
  293. const devCode = res.data;
  294. if (devCode) {
  295. this.code = devCode;
  296. uni.showToast({ title: "验证码: " + devCode, icon: "none", duration: 3e3 });
  297. } else {
  298. uni.showToast({ title: "验证码已发送", icon: "none" });
  299. }
  300. } catch (err) {
  301. formatAppLog("error", "at pages/login/logic.js:60", "发送验证码失败:", err);
  302. }
  303. },
  304. async handleLogin() {
  305. var _a;
  306. if (!this.isAgreed) {
  307. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  308. return;
  309. }
  310. if (!this.mobile) {
  311. uni.showToast({ title: "请输入手机号", icon: "none" });
  312. return;
  313. }
  314. if (this.currentTab === 0) {
  315. if (!this.code) {
  316. uni.showToast({ title: "请输入验证码", icon: "none" });
  317. return;
  318. }
  319. } else {
  320. if (!this.password) {
  321. uni.showToast({ title: "请输入密码", icon: "none" });
  322. return;
  323. }
  324. }
  325. if (this.loginLoading)
  326. return;
  327. this.loginLoading = true;
  328. try {
  329. let res;
  330. if (this.currentTab === 0) {
  331. res = await loginBySms(this.mobile, this.code);
  332. } else {
  333. res = await loginByPassword(this.mobile, this.password);
  334. }
  335. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  336. if (token) {
  337. setToken(token);
  338. }
  339. uni.showToast({ title: "登录成功", icon: "success" });
  340. setTimeout(() => {
  341. uni.switchTab({
  342. url: "/pages/home/index"
  343. });
  344. }, 1e3);
  345. } catch (err) {
  346. formatAppLog("error", "at pages/login/logic.js:114", "登录失败:", err);
  347. } finally {
  348. this.loginLoading = false;
  349. }
  350. },
  351. goToRecruit() {
  352. uni.navigateTo({
  353. url: "/pages/recruit/landing"
  354. });
  355. },
  356. goToForgotPwd() {
  357. uni.navigateTo({
  358. url: "/pages/login/reset-pwd-verify"
  359. });
  360. }
  361. }
  362. };
  363. const _imports_0$4 = "/static/header.png";
  364. const _imports_1$8 = "/static/logo.png";
  365. const _sfc_main$C = {
  366. ...logic$9,
  367. components: {
  368. PrivacyPopup: __easycom_0
  369. }
  370. };
  371. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  372. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  373. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  374. vue.createElementVNode("view", { class: "banner-area" }, [
  375. vue.createElementVNode("image", {
  376. class: "banner-img",
  377. src: _imports_0$4,
  378. mode: "widthFix"
  379. })
  380. ]),
  381. vue.createElementVNode("view", { class: "content-card" }, [
  382. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  383. vue.createElementVNode("image", {
  384. class: "logo-img",
  385. src: _imports_1$8,
  386. mode: "widthFix"
  387. })
  388. ]),
  389. vue.createElementVNode("view", { class: "tabs" }, [
  390. vue.createElementVNode(
  391. "view",
  392. {
  393. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === 0 }]),
  394. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.currentTab = 0)
  395. },
  396. [
  397. vue.createElementVNode("text", { class: "tab-text" }, "免密登录"),
  398. _ctx.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  399. key: 0,
  400. class: "tab-indicator"
  401. })) : vue.createCommentVNode("v-if", true)
  402. ],
  403. 2
  404. /* CLASS */
  405. ),
  406. vue.createElementVNode("view", { class: "divider" }),
  407. vue.createElementVNode(
  408. "view",
  409. {
  410. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === 1 }]),
  411. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.currentTab = 1)
  412. },
  413. [
  414. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  415. _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  416. key: 0,
  417. class: "tab-indicator"
  418. })) : vue.createCommentVNode("v-if", true)
  419. ],
  420. 2
  421. /* CLASS */
  422. )
  423. ]),
  424. vue.createElementVNode("view", { class: "form-area" }, [
  425. vue.createElementVNode("view", { class: "input-group" }, [
  426. vue.createElementVNode("view", { class: "area-code" }, [
  427. vue.createElementVNode("text", null, "+86"),
  428. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  429. ]),
  430. vue.withDirectives(vue.createElementVNode(
  431. "input",
  432. {
  433. class: "input",
  434. type: "number",
  435. placeholder: "手机号",
  436. "placeholder-style": "color: #ccc",
  437. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.mobile = $event),
  438. maxlength: "11"
  439. },
  440. null,
  441. 512
  442. /* NEED_PATCH */
  443. ), [
  444. [vue.vModelText, _ctx.mobile]
  445. ])
  446. ]),
  447. _ctx.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  448. key: 0,
  449. class: "input-group"
  450. }, [
  451. vue.withDirectives(vue.createElementVNode(
  452. "input",
  453. {
  454. class: "input",
  455. type: "number",
  456. placeholder: "验证码",
  457. "placeholder-style": "color: #ccc",
  458. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.code = $event),
  459. maxlength: "6"
  460. },
  461. null,
  462. 512
  463. /* NEED_PATCH */
  464. ), [
  465. [vue.vModelText, _ctx.code]
  466. ]),
  467. vue.createElementVNode("view", {
  468. class: "get-code-btn",
  469. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.getVerifyCode && _ctx.getVerifyCode(...args))
  470. }, [
  471. vue.createElementVNode(
  472. "text",
  473. { class: "code-text" },
  474. vue.toDisplayString(_ctx.countDown > 0 ? `${_ctx.countDown}s后重试` : "获取验证码"),
  475. 1
  476. /* TEXT */
  477. )
  478. ])
  479. ])) : vue.createCommentVNode("v-if", true),
  480. _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  481. key: 1,
  482. class: "input-group"
  483. }, [
  484. vue.withDirectives(vue.createElementVNode("input", {
  485. class: "input",
  486. password: !_ctx.showPassword,
  487. type: "text",
  488. placeholder: "请输入密码",
  489. "placeholder-style": "color: #ccc",
  490. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.password = $event)
  491. }, null, 8, ["password"]), [
  492. [vue.vModelText, _ctx.password]
  493. ]),
  494. vue.createElementVNode("view", {
  495. class: "eye-icon",
  496. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  497. }, [
  498. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  499. key: 0,
  500. class: "svg-icon",
  501. viewBox: "0 0 24 24",
  502. fill: "none",
  503. xmlns: "http://www.w3.org/2000/svg"
  504. }, [
  505. vue.createElementVNode("path", {
  506. 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",
  507. fill: "#CCCCCC"
  508. })
  509. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  510. key: 1,
  511. class: "svg-icon",
  512. viewBox: "0 0 24 24",
  513. fill: "none",
  514. xmlns: "http://www.w3.org/2000/svg"
  515. }, [
  516. vue.createElementVNode("path", {
  517. d: "M12 7C7 7 2.73 10.11 1 14.5",
  518. stroke: "#CCCCCC",
  519. "stroke-width": "2",
  520. "stroke-linecap": "round"
  521. }),
  522. vue.createElementVNode("path", {
  523. d: "M23 14.5C21.27 10.11 17 7 12 7",
  524. stroke: "#CCCCCC",
  525. "stroke-width": "2",
  526. "stroke-linecap": "round"
  527. }),
  528. vue.createElementVNode("path", {
  529. d: "M12 7V4",
  530. stroke: "#CCCCCC",
  531. "stroke-width": "2",
  532. "stroke-linecap": "round"
  533. }),
  534. vue.createElementVNode("path", {
  535. d: "M16 8L18 5",
  536. stroke: "#CCCCCC",
  537. "stroke-width": "2",
  538. "stroke-linecap": "round"
  539. }),
  540. vue.createElementVNode("path", {
  541. d: "M8 8L6 5",
  542. stroke: "#CCCCCC",
  543. "stroke-width": "2",
  544. "stroke-linecap": "round"
  545. }),
  546. vue.createElementVNode("path", {
  547. d: "M20 10L22 8",
  548. stroke: "#CCCCCC",
  549. "stroke-width": "2",
  550. "stroke-linecap": "round"
  551. }),
  552. vue.createElementVNode("path", {
  553. d: "M4 10L2 8",
  554. stroke: "#CCCCCC",
  555. "stroke-width": "2",
  556. "stroke-linecap": "round"
  557. })
  558. ]))
  559. ])
  560. ])) : vue.createCommentVNode("v-if", true),
  561. _ctx.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  562. key: 2,
  563. class: "forgot-pwd"
  564. }, [
  565. vue.createElementVNode("text", {
  566. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToForgotPwd && _ctx.goToForgotPwd(...args))
  567. }, "忘记密码?")
  568. ])) : vue.createCommentVNode("v-if", true),
  569. vue.createElementVNode("button", {
  570. class: "login-btn",
  571. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  572. }, "登 录"),
  573. vue.createElementVNode("view", { class: "agreement" }, [
  574. vue.createElementVNode(
  575. "view",
  576. {
  577. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  578. onClick: _cache[9] || (_cache[9] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  579. },
  580. [
  581. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  582. key: 0,
  583. class: "check-mark"
  584. }, "✓")) : vue.createCommentVNode("v-if", true)
  585. ],
  586. 2
  587. /* CLASS */
  588. ),
  589. vue.createElementVNode("text", { class: "agree-text" }, [
  590. vue.createTextVNode(" 我已经阅读并同意 "),
  591. vue.createElementVNode("text", {
  592. class: "link",
  593. onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  594. }, "《用户服务协议》"),
  595. vue.createTextVNode(" 和 "),
  596. vue.createElementVNode("text", {
  597. class: "link",
  598. onClick: _cache[11] || (_cache[11] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  599. }, "《隐私政策》")
  600. ])
  601. ])
  602. ]),
  603. vue.createElementVNode("view", {
  604. class: "footer-recruit",
  605. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  606. }, [
  607. vue.createElementVNode("view", { class: "recruit-badge" }, [
  608. (vue.openBlock(), vue.createElementBlock("svg", {
  609. class: "svg-icon flag-icon",
  610. viewBox: "0 0 24 24",
  611. fill: "none",
  612. xmlns: "http://www.w3.org/2000/svg",
  613. style: { "width": "30rpx", "height": "30rpx" }
  614. }, [
  615. vue.createElementVNode("path", {
  616. d: "M4 14V4H18L17 9L18 14H4Z",
  617. stroke: "#FF5722",
  618. "stroke-width": "2",
  619. "stroke-linejoin": "round"
  620. }),
  621. vue.createElementVNode("path", {
  622. d: "M4 22V14",
  623. stroke: "#FF5722",
  624. "stroke-width": "2",
  625. "stroke-linecap": "round"
  626. })
  627. ])),
  628. vue.createElementVNode("text", null, " 宠宝履约者招募")
  629. ])
  630. ]),
  631. vue.createVNode(_component_privacy_popup, {
  632. visible: _ctx.showAgreementModal,
  633. title: _ctx.agreementTitle,
  634. content: _ctx.agreementContent,
  635. onClose: _cache[13] || (_cache[13] = ($event) => _ctx.showAgreementModal = false)
  636. }, null, 8, ["visible", "title", "content"])
  637. ])
  638. ]);
  639. }
  640. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  641. const logic$8 = {
  642. data() {
  643. return {
  644. statusBarHeight: 20
  645. // 默认状态栏高度
  646. };
  647. },
  648. onLoad() {
  649. const sysInfo = uni.getSystemInfoSync();
  650. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  651. },
  652. methods: {
  653. goBack() {
  654. const pages = getCurrentPages();
  655. if (pages.length > 1) {
  656. uni.navigateBack();
  657. } else {
  658. uni.reLaunch({
  659. url: "/pages/login/login"
  660. });
  661. }
  662. },
  663. goToForm() {
  664. uni.navigateTo({
  665. url: "/pages/recruit/form"
  666. });
  667. }
  668. }
  669. };
  670. const _sfc_main$B = logic$8;
  671. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  672. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  673. vue.createElementVNode(
  674. "view",
  675. {
  676. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  677. },
  678. null,
  679. 4
  680. /* STYLE */
  681. ),
  682. vue.createElementVNode("view", { class: "nav-bar" }, [
  683. vue.createElementVNode("view", {
  684. class: "back-icon",
  685. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  686. }, "‹")
  687. ]),
  688. vue.createElementVNode("view", { class: "header-area" }, [
  689. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  690. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  691. ]),
  692. vue.createElementVNode("view", { class: "content-card" }, [
  693. vue.createElementVNode("view", { class: "benefit-item" }, [
  694. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  695. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  696. ]),
  697. vue.createElementVNode("view", { class: "info" }, [
  698. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  699. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  700. ])
  701. ]),
  702. vue.createElementVNode("view", { class: "benefit-item" }, [
  703. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  704. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  705. ]),
  706. vue.createElementVNode("view", { class: "info" }, [
  707. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  708. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  709. ])
  710. ]),
  711. vue.createElementVNode("view", { class: "benefit-item" }, [
  712. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  713. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  714. ]),
  715. vue.createElementVNode("view", { class: "info" }, [
  716. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  717. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  718. ])
  719. ])
  720. ]),
  721. vue.createElementVNode("view", { class: "footer-area" }, [
  722. vue.createElementVNode("button", {
  723. class: "join-btn",
  724. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  725. }, "我要加入"),
  726. vue.createElementVNode("view", { class: "faq" }, [
  727. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  728. vue.createTextVNode(" 常见问题 ")
  729. ])
  730. ])
  731. ]);
  732. }
  733. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  734. function getMyProfile() {
  735. return request({
  736. url: "/fulfiller/fulfiller/my",
  737. method: "GET"
  738. });
  739. }
  740. function submitAudit(data) {
  741. return request({
  742. url: "/fulfiller/app/audit/submit",
  743. method: "POST",
  744. needToken: false,
  745. data
  746. });
  747. }
  748. function getServiceTypes() {
  749. return request({
  750. url: "/fulfiller/app/service/list",
  751. method: "GET",
  752. needToken: false
  753. });
  754. }
  755. function getAreaChildren(parentId = 0) {
  756. return request({
  757. url: "/fulfiller/app/area/children",
  758. method: "GET",
  759. needToken: false,
  760. data: { parentId }
  761. });
  762. }
  763. function uploadFile(filePath) {
  764. return new Promise((resolve, reject) => {
  765. const token = uni.getStorageSync("fulfiller_token");
  766. uni.uploadFile({
  767. url: BASE_URL + "/fulfiller/app/upload",
  768. filePath,
  769. name: "file",
  770. header: {
  771. "clientid": CLIENT_ID,
  772. "X-Platform-Code": PLATFORM_CODE,
  773. "Authorization": token ? `Bearer ${token}` : ""
  774. },
  775. success: (res) => {
  776. try {
  777. const data = JSON.parse(res.data);
  778. if (data.code === 200) {
  779. resolve(data);
  780. } else {
  781. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  782. reject(data);
  783. }
  784. } catch (e) {
  785. reject(e);
  786. }
  787. },
  788. fail: (err) => {
  789. uni.showToast({ title: "上传失败", icon: "none" });
  790. reject(err);
  791. }
  792. });
  793. });
  794. }
  795. function updateAvatar(avatar) {
  796. return request({
  797. url: "/fulfiller/fulfiller/my/avatar",
  798. method: "PUT",
  799. data: { avatar }
  800. });
  801. }
  802. function updateName(name) {
  803. return request({
  804. url: "/fulfiller/fulfiller/my/name",
  805. method: "PUT",
  806. data: { name }
  807. });
  808. }
  809. function updateStatus(status) {
  810. return request({
  811. url: "/fulfiller/fulfiller/my/status",
  812. method: "PUT",
  813. data: { status }
  814. });
  815. }
  816. function updateCity(cityCode, cityName) {
  817. return request({
  818. url: "/fulfiller/fulfiller/my/city",
  819. method: "PUT",
  820. data: { cityCode, cityName }
  821. });
  822. }
  823. function getAuthInfo() {
  824. return request({
  825. url: "/fulfiller/fulfiller/my/auth",
  826. method: "GET"
  827. });
  828. }
  829. function updatePhone(phone, code) {
  830. return request({
  831. url: "/fulfiller/fulfiller/my/phone",
  832. method: "PUT",
  833. data: { phone, code }
  834. });
  835. }
  836. function updatePassword(oldPassword, newPassword) {
  837. return request({
  838. url: "/fulfiller/fulfiller/my/password",
  839. method: "PUT",
  840. data: { oldPassword, newPassword }
  841. });
  842. }
  843. function deleteAccount() {
  844. return request({
  845. url: "/fulfiller/fulfiller/my/account",
  846. method: "DELETE"
  847. });
  848. }
  849. function updateAuthInfo(data) {
  850. return request({
  851. url: "/fulfiller/fulfiller/my/auth",
  852. method: "POST",
  853. data
  854. });
  855. }
  856. function getPendingOrders(params) {
  857. return request({
  858. url: "/order/subOrder/listPendingAccept",
  859. method: "GET",
  860. data: params
  861. });
  862. }
  863. function acceptOrder(orderId) {
  864. return request({
  865. url: "/order/subOrder/accept",
  866. method: "PUT",
  867. data: { orderId }
  868. });
  869. }
  870. function getOrderCount() {
  871. return request({
  872. url: "/order/subOrder/count",
  873. method: "GET"
  874. });
  875. }
  876. function getMyOrders(params) {
  877. return request({
  878. url: "/order/subOrder/listOnMyOrder",
  879. method: "GET",
  880. data: params
  881. });
  882. }
  883. function getOrderInfo(id) {
  884. return request({
  885. url: `/order/subOrder/getInfo?id=${id}`,
  886. method: "GET"
  887. });
  888. }
  889. function getOrderLogs(orderId) {
  890. return request({
  891. url: `/order/subOrderLog/list?orderId=${orderId}`,
  892. method: "GET"
  893. });
  894. }
  895. function clockIn(data) {
  896. return request({
  897. url: "/order/subOrder/clockIn",
  898. method: "PUT",
  899. data
  900. });
  901. }
  902. function uploadAnamaly(data) {
  903. return request({
  904. url: "/fulfiller/anamaly/upload",
  905. method: "POST",
  906. data
  907. });
  908. }
  909. function getAnomalyList(orderId) {
  910. return request({
  911. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  912. method: "GET"
  913. });
  914. }
  915. const logic$7 = {
  916. data() {
  917. return {
  918. formData: {
  919. mobile: "",
  920. code: "",
  921. name: "",
  922. gender: 1,
  923. // 1男 2女
  924. birthday: "",
  925. password: "",
  926. serviceType: [],
  927. city: "",
  928. station: "",
  929. stationId: null
  930. },
  931. showPwd: false,
  932. isAgreed: false,
  933. serviceTypes: [],
  934. // 验证码倒计时
  935. countDown: 0,
  936. timer: null,
  937. // 日期选择器相关
  938. showPicker: false,
  939. years: [],
  940. months: [],
  941. days: [],
  942. pickerValue: [0, 0, 0],
  943. tempYear: 0,
  944. tempMonth: 0,
  945. tempDay: 0,
  946. // 城市选择器相关(从后端加载)
  947. showCityPicker: false,
  948. selectStep: 0,
  949. selectedPathway: [],
  950. currentList: [],
  951. selectedCityId: null,
  952. // 站点选择器相关(从后端加载)
  953. showStationPicker: false,
  954. stationList: [],
  955. // 协议弹窗
  956. showPrivacy: false,
  957. privacyTitle: "",
  958. privacyContent: ""
  959. };
  960. },
  961. created() {
  962. this.initDateData();
  963. this.loadServiceTypes();
  964. },
  965. beforeDestroy() {
  966. if (this.timer)
  967. clearInterval(this.timer);
  968. },
  969. methods: {
  970. initDateData() {
  971. const now = /* @__PURE__ */ new Date();
  972. const currentYear = now.getFullYear();
  973. for (let i = 1980; i <= currentYear + 5; i++) {
  974. this.years.push(i);
  975. }
  976. for (let i = 1; i <= 12; i++) {
  977. this.months.push(i);
  978. }
  979. for (let i = 1; i <= 31; i++) {
  980. this.days.push(i);
  981. }
  982. },
  983. // 打开选择器
  984. openPicker() {
  985. const dateStr = this.formData.birthday || "2000-01-01";
  986. const [y, m, d] = dateStr.split("-").map(Number);
  987. const yIndex = this.years.indexOf(y);
  988. const mIndex = this.months.indexOf(m);
  989. const dIndex = this.days.indexOf(d);
  990. this.pickerValue = [
  991. yIndex > -1 ? yIndex : 0,
  992. mIndex > -1 ? mIndex : 0,
  993. dIndex > -1 ? dIndex : 0
  994. ];
  995. this.tempYear = this.years[this.pickerValue[0]];
  996. this.tempMonth = this.months[this.pickerValue[1]];
  997. this.tempDay = this.days[this.pickerValue[2]];
  998. this.showPicker = true;
  999. },
  1000. closePicker() {
  1001. this.showPicker = false;
  1002. },
  1003. onPickerChange(e) {
  1004. const val = e.detail.value;
  1005. this.tempYear = this.years[val[0]];
  1006. this.tempMonth = this.months[val[1]];
  1007. this.tempDay = this.days[val[2]];
  1008. },
  1009. confirmPicker() {
  1010. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1011. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1012. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  1013. this.closePicker();
  1014. },
  1015. async loadServiceTypes() {
  1016. try {
  1017. const res = await getServiceTypes();
  1018. this.serviceTypes = (res.data || []).map((item) => ({
  1019. id: item.id,
  1020. name: item.name
  1021. }));
  1022. } catch (err) {
  1023. formatAppLog("error", "at pages/recruit/logic.js:131", "加载服务类型失败:", err);
  1024. this.serviceTypes = [];
  1025. }
  1026. },
  1027. toggleService(item) {
  1028. const idx = this.formData.serviceType.indexOf(item.id);
  1029. if (idx > -1) {
  1030. this.formData.serviceType.splice(idx, 1);
  1031. } else {
  1032. this.formData.serviceType.push(item.id);
  1033. }
  1034. },
  1035. // 验证码
  1036. async getVerifyCode() {
  1037. if (this.countDown > 0)
  1038. return;
  1039. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1040. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1041. return;
  1042. }
  1043. try {
  1044. const res = await sendSmsCode(this.formData.mobile);
  1045. this.countDown = 60;
  1046. this.timer = setInterval(() => {
  1047. this.countDown--;
  1048. if (this.countDown <= 0)
  1049. clearInterval(this.timer);
  1050. }, 1e3);
  1051. const devCode = res.data;
  1052. if (devCode) {
  1053. this.formData.code = devCode;
  1054. uni.showToast({ title: "验证码: " + devCode, icon: "none", duration: 3e3 });
  1055. } else {
  1056. uni.showToast({ title: "验证码已发送", icon: "none" });
  1057. }
  1058. } catch (err) {
  1059. formatAppLog("error", "at pages/recruit/logic.js:168", "发送验证码失败:", err);
  1060. }
  1061. },
  1062. // 城市选择器 logic(从后端加载)
  1063. async openCityPicker() {
  1064. this.showCityPicker = true;
  1065. if (this.selectedPathway.length === 0) {
  1066. await this.resetCityPicker();
  1067. }
  1068. },
  1069. async resetCityPicker() {
  1070. this.selectStep = 0;
  1071. this.selectedPathway = [];
  1072. await this.loadAreaChildren(0);
  1073. },
  1074. closeCityPicker() {
  1075. this.showCityPicker = false;
  1076. },
  1077. async loadAreaChildren(parentId) {
  1078. try {
  1079. const res = await getAreaChildren(parentId);
  1080. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  1081. id: item.id,
  1082. name: item.name,
  1083. type: item.type,
  1084. parentId: item.parentId
  1085. }));
  1086. } catch (err) {
  1087. formatAppLog("error", "at pages/recruit/logic.js:200", "加载区域数据失败:", err);
  1088. this.currentList = [];
  1089. }
  1090. },
  1091. async selectCityItem(item) {
  1092. this.selectedPathway[this.selectStep] = item;
  1093. if (item.type === 0) {
  1094. this.selectStep++;
  1095. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1096. await this.loadAreaChildren(item.id);
  1097. if (this.currentList.length === 0) {
  1098. this.selectedCityId = item.id;
  1099. this.confirmCity();
  1100. }
  1101. } else {
  1102. this.selectedCityId = item.id;
  1103. this.confirmCity();
  1104. }
  1105. },
  1106. async jumpToStep(step) {
  1107. this.selectStep = step;
  1108. if (step === 0) {
  1109. await this.loadAreaChildren(0);
  1110. } else {
  1111. const parent = this.selectedPathway[step - 1];
  1112. if (parent) {
  1113. await this.loadAreaChildren(parent.id);
  1114. }
  1115. }
  1116. },
  1117. confirmCity() {
  1118. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1119. this.formData.city = fullPath;
  1120. this.formData.station = "";
  1121. this.formData.stationId = null;
  1122. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1123. if (lastSelected) {
  1124. this.loadStations(lastSelected.id);
  1125. }
  1126. this.closeCityPicker();
  1127. },
  1128. // 站点选择器(从后端加载,只取type=2的站点)
  1129. async loadStations(parentId) {
  1130. try {
  1131. const res = await getAreaChildren(parentId);
  1132. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1133. id: item.id,
  1134. name: item.name
  1135. }));
  1136. } catch (err) {
  1137. formatAppLog("error", "at pages/recruit/logic.js:259", "加载站点数据失败:", err);
  1138. this.stationList = [];
  1139. }
  1140. },
  1141. openStationPicker() {
  1142. if (this.stationList.length === 0) {
  1143. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1144. return;
  1145. }
  1146. this.showStationPicker = true;
  1147. },
  1148. closeStationPicker() {
  1149. this.showStationPicker = false;
  1150. },
  1151. selectStation(item) {
  1152. this.formData.station = item.name;
  1153. this.formData.stationId = item.id;
  1154. this.closeStationPicker();
  1155. },
  1156. openPrivacy() {
  1157. this.privacyTitle = "宠宝履约者说明";
  1158. this.privacyContent = "1. 履约职责\n作为宠宝履约者,您需要按照平台标准完成宠物接送、喂遛或洗护服务,确保宠物安全与健康。\n\n2. 结算方式\n服务费用将根据订单类型和距离计算,定期结算至您的账户。具体结算周期请查看钱包说明。\n\n3. 行为规范\n请在这个过程中保持专业,穿着整洁,礼貌待人。严禁虐待宠物,违反者将承担法律责任。";
  1159. this.showPrivacy = true;
  1160. },
  1161. goToAuth() {
  1162. if (!this.isAgreed) {
  1163. uni.showToast({ title: "请勾选协议", icon: "none" });
  1164. return;
  1165. }
  1166. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1167. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1168. return;
  1169. }
  1170. if (!this.formData.name) {
  1171. uni.showToast({ title: "请输入姓名", icon: "none" });
  1172. return;
  1173. }
  1174. if (this.formData.serviceType.length === 0) {
  1175. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1176. return;
  1177. }
  1178. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1179. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1180. const services = JSON.stringify(selectedServices);
  1181. uni.navigateTo({
  1182. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1183. });
  1184. }
  1185. }
  1186. };
  1187. const _sfc_main$A = {
  1188. ...logic$7,
  1189. components: {
  1190. PrivacyPopup: __easycom_0
  1191. }
  1192. };
  1193. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1194. const _component_privacy_popup = resolveEasycom(vue.resolveDynamicComponent("privacy-popup"), __easycom_0);
  1195. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1196. vue.createElementVNode("view", { class: "card" }, [
  1197. vue.createElementVNode("view", { class: "form-item" }, [
  1198. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1199. vue.createElementVNode("view", { class: "input-box" }, [
  1200. vue.createElementVNode("view", { class: "prefix-area" }, [
  1201. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1202. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1203. ]),
  1204. vue.withDirectives(vue.createElementVNode(
  1205. "input",
  1206. {
  1207. class: "input",
  1208. type: "number",
  1209. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1210. },
  1211. null,
  1212. 512
  1213. /* NEED_PATCH */
  1214. ), [
  1215. [vue.vModelText, _ctx.formData.mobile]
  1216. ])
  1217. ])
  1218. ]),
  1219. vue.createElementVNode("view", { class: "form-item" }, [
  1220. vue.createElementVNode("text", { class: "label" }, "验证码"),
  1221. vue.createElementVNode("view", { class: "input-box" }, [
  1222. vue.withDirectives(vue.createElementVNode(
  1223. "input",
  1224. {
  1225. class: "input",
  1226. type: "number",
  1227. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.code = $event),
  1228. placeholder: "验证码"
  1229. },
  1230. null,
  1231. 512
  1232. /* NEED_PATCH */
  1233. ), [
  1234. [vue.vModelText, _ctx.formData.code]
  1235. ]),
  1236. vue.createElementVNode(
  1237. "text",
  1238. {
  1239. class: "get-code-text",
  1240. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.getVerifyCode && _ctx.getVerifyCode(...args))
  1241. },
  1242. vue.toDisplayString(_ctx.countDown > 0 ? _ctx.countDown + "s" : "获取验证码"),
  1243. 1
  1244. /* TEXT */
  1245. )
  1246. ])
  1247. ]),
  1248. vue.createElementVNode("view", { class: "form-item" }, [
  1249. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1250. vue.createElementVNode("view", { class: "input-box" }, [
  1251. vue.withDirectives(vue.createElementVNode(
  1252. "input",
  1253. {
  1254. class: "input",
  1255. type: "text",
  1256. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.formData.name = $event)
  1257. },
  1258. null,
  1259. 512
  1260. /* NEED_PATCH */
  1261. ), [
  1262. [vue.vModelText, _ctx.formData.name]
  1263. ])
  1264. ])
  1265. ]),
  1266. vue.createElementVNode("view", { class: "form-item" }, [
  1267. vue.createElementVNode("text", { class: "label" }, "性别"),
  1268. vue.createElementVNode("view", { class: "gender-group" }, [
  1269. vue.createElementVNode("view", {
  1270. class: "radio-item",
  1271. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.formData.gender = 1)
  1272. }, [
  1273. vue.createElementVNode(
  1274. "text",
  1275. {
  1276. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1277. },
  1278. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1279. 3
  1280. /* TEXT, CLASS */
  1281. ),
  1282. vue.createElementVNode(
  1283. "text",
  1284. {
  1285. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1286. },
  1287. " 男",
  1288. 2
  1289. /* CLASS */
  1290. )
  1291. ]),
  1292. vue.createElementVNode("view", {
  1293. class: "radio-item",
  1294. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.formData.gender = 2)
  1295. }, [
  1296. vue.createElementVNode(
  1297. "text",
  1298. {
  1299. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1300. },
  1301. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1302. 3
  1303. /* TEXT, CLASS */
  1304. ),
  1305. vue.createElementVNode(
  1306. "text",
  1307. {
  1308. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1309. },
  1310. " 女",
  1311. 2
  1312. /* CLASS */
  1313. )
  1314. ])
  1315. ])
  1316. ]),
  1317. vue.createElementVNode("view", { class: "form-item" }, [
  1318. vue.createElementVNode("text", { class: "label" }, "生日"),
  1319. vue.createElementVNode("view", {
  1320. class: "input-box",
  1321. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1322. }, [
  1323. vue.createElementVNode(
  1324. "text",
  1325. null,
  1326. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1327. 1
  1328. /* TEXT */
  1329. ),
  1330. (vue.openBlock(), vue.createElementBlock("svg", {
  1331. class: "arrow-right",
  1332. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1333. viewBox: "0 0 1024 1024",
  1334. version: "1.1",
  1335. xmlns: "http://www.w3.org/2000/svg"
  1336. }, [
  1337. vue.createElementVNode("path", {
  1338. 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",
  1339. fill: "#CCCCCC"
  1340. })
  1341. ]))
  1342. ])
  1343. ]),
  1344. vue.createElementVNode("view", { class: "form-item" }, [
  1345. vue.createElementVNode("text", { class: "label" }, "密码"),
  1346. vue.createElementVNode("view", { class: "input-box" }, [
  1347. vue.withDirectives(vue.createElementVNode("input", {
  1348. class: "input",
  1349. password: !_ctx.showPwd,
  1350. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.formData.password = $event),
  1351. placeholder: "设置登录密码"
  1352. }, null, 8, ["password"]), [
  1353. [vue.vModelText, _ctx.formData.password]
  1354. ]),
  1355. vue.createElementVNode("view", {
  1356. class: "monkey-icon",
  1357. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1358. }, [
  1359. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1360. key: 0,
  1361. class: "svg-icon",
  1362. viewBox: "0 0 24 24",
  1363. fill: "none",
  1364. xmlns: "http://www.w3.org/2000/svg"
  1365. }, [
  1366. vue.createElementVNode("path", {
  1367. 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",
  1368. fill: "#CCCCCC"
  1369. })
  1370. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1371. key: 1,
  1372. class: "svg-icon",
  1373. viewBox: "0 0 24 24",
  1374. fill: "none",
  1375. xmlns: "http://www.w3.org/2000/svg"
  1376. }, [
  1377. vue.createElementVNode("path", {
  1378. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1379. stroke: "#CCCCCC",
  1380. "stroke-width": "2",
  1381. "stroke-linecap": "round"
  1382. }),
  1383. vue.createElementVNode("path", {
  1384. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1385. stroke: "#CCCCCC",
  1386. "stroke-width": "2",
  1387. "stroke-linecap": "round"
  1388. }),
  1389. vue.createElementVNode("path", {
  1390. d: "M12 7V4",
  1391. stroke: "#CCCCCC",
  1392. "stroke-width": "2",
  1393. "stroke-linecap": "round"
  1394. }),
  1395. vue.createElementVNode("path", {
  1396. d: "M16 8L18 5",
  1397. stroke: "#CCCCCC",
  1398. "stroke-width": "2",
  1399. "stroke-linecap": "round"
  1400. }),
  1401. vue.createElementVNode("path", {
  1402. d: "M8 8L6 5",
  1403. stroke: "#CCCCCC",
  1404. "stroke-width": "2",
  1405. "stroke-linecap": "round"
  1406. }),
  1407. vue.createElementVNode("path", {
  1408. d: "M20 10L22 8",
  1409. stroke: "#CCCCCC",
  1410. "stroke-width": "2",
  1411. "stroke-linecap": "round"
  1412. }),
  1413. vue.createElementVNode("path", {
  1414. d: "M4 10L2 8",
  1415. stroke: "#CCCCCC",
  1416. "stroke-width": "2",
  1417. "stroke-linecap": "round"
  1418. })
  1419. ]))
  1420. ])
  1421. ])
  1422. ])
  1423. ]),
  1424. vue.createElementVNode("view", { class: "card" }, [
  1425. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1426. vue.createElementVNode("view", { class: "service-types" }, [
  1427. (vue.openBlock(true), vue.createElementBlock(
  1428. vue.Fragment,
  1429. null,
  1430. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1431. return vue.openBlock(), vue.createElementBlock("view", {
  1432. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1433. key: item.id,
  1434. onClick: ($event) => _ctx.toggleService(item)
  1435. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1436. }),
  1437. 128
  1438. /* KEYED_FRAGMENT */
  1439. ))
  1440. ]),
  1441. vue.createElementVNode("view", { class: "form-item" }, [
  1442. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1443. vue.createElementVNode("view", {
  1444. class: "input-box",
  1445. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1446. }, [
  1447. vue.createElementVNode(
  1448. "text",
  1449. {
  1450. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1451. },
  1452. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1453. 5
  1454. /* TEXT, STYLE */
  1455. ),
  1456. (vue.openBlock(), vue.createElementBlock("svg", {
  1457. class: "arrow-right",
  1458. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1459. viewBox: "0 0 1024 1024",
  1460. version: "1.1",
  1461. xmlns: "http://www.w3.org/2000/svg"
  1462. }, [
  1463. vue.createElementVNode("path", {
  1464. 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",
  1465. fill: "#CCCCCC"
  1466. })
  1467. ]))
  1468. ])
  1469. ]),
  1470. vue.createElementVNode("view", { class: "form-item" }, [
  1471. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1472. vue.createElementVNode("view", {
  1473. class: "input-box",
  1474. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1475. }, [
  1476. vue.createElementVNode(
  1477. "text",
  1478. {
  1479. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1480. },
  1481. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1482. 5
  1483. /* TEXT, STYLE */
  1484. ),
  1485. (vue.openBlock(), vue.createElementBlock("svg", {
  1486. class: "arrow-right",
  1487. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1488. viewBox: "0 0 1024 1024",
  1489. version: "1.1",
  1490. xmlns: "http://www.w3.org/2000/svg"
  1491. }, [
  1492. vue.createElementVNode("path", {
  1493. 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",
  1494. fill: "#CCCCCC"
  1495. })
  1496. ]))
  1497. ])
  1498. ])
  1499. ]),
  1500. vue.createElementVNode(
  1501. "view",
  1502. {
  1503. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1504. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1505. },
  1506. [
  1507. vue.createElementVNode("view", {
  1508. class: "picker-content",
  1509. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  1510. }, ["stop"]))
  1511. }, [
  1512. vue.createElementVNode("view", { class: "picker-header" }, [
  1513. vue.createElementVNode("text", {
  1514. class: "picker-btn-cancel",
  1515. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1516. }, "取消"),
  1517. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1518. vue.createElementVNode("text", {
  1519. class: "picker-btn-confirm",
  1520. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1521. }, "确定")
  1522. ]),
  1523. vue.createElementVNode("view", { class: "picker-body" }, [
  1524. vue.createElementVNode("view", { class: "timeline-area" }, [
  1525. (vue.openBlock(true), vue.createElementBlock(
  1526. vue.Fragment,
  1527. null,
  1528. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1529. return vue.openBlock(), vue.createElementBlock("view", {
  1530. class: "timeline-item",
  1531. key: index,
  1532. onClick: ($event) => _ctx.jumpToStep(index)
  1533. }, [
  1534. vue.createElementVNode("view", { class: "timeline-dot" }),
  1535. vue.createElementVNode(
  1536. "text",
  1537. null,
  1538. vue.toDisplayString(item.name),
  1539. 1
  1540. /* TEXT */
  1541. )
  1542. ], 8, ["onClick"]);
  1543. }),
  1544. 128
  1545. /* KEYED_FRAGMENT */
  1546. )),
  1547. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1548. key: 0,
  1549. class: "timeline-item active"
  1550. }, [
  1551. vue.createElementVNode("view", { class: "timeline-dot" }),
  1552. vue.createElementVNode("text", null, "请选择")
  1553. ])) : vue.createCommentVNode("v-if", true)
  1554. ]),
  1555. vue.createElementVNode("scroll-view", {
  1556. "scroll-y": "",
  1557. class: "list-area"
  1558. }, [
  1559. (vue.openBlock(true), vue.createElementBlock(
  1560. vue.Fragment,
  1561. null,
  1562. vue.renderList(_ctx.currentList, (item, index) => {
  1563. return vue.openBlock(), vue.createElementBlock("view", {
  1564. class: "list-item",
  1565. key: item.id,
  1566. onClick: ($event) => _ctx.selectCityItem(item)
  1567. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1568. }),
  1569. 128
  1570. /* KEYED_FRAGMENT */
  1571. )),
  1572. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1573. key: 0,
  1574. style: { "padding": "20rpx", "color": "#999" }
  1575. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1576. ])
  1577. ])
  1578. ])
  1579. ],
  1580. 2
  1581. /* CLASS */
  1582. ),
  1583. vue.createElementVNode(
  1584. "view",
  1585. {
  1586. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1587. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1588. },
  1589. [
  1590. vue.createElementVNode("view", {
  1591. class: "picker-content",
  1592. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  1593. }, ["stop"]))
  1594. }, [
  1595. vue.createElementVNode("view", {
  1596. class: "picker-header",
  1597. style: { "justify-content": "center", "position": "relative" }
  1598. }, [
  1599. vue.createElementVNode("text", {
  1600. class: "picker-btn-cancel",
  1601. style: { "position": "absolute", "left": "30rpx" },
  1602. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1603. }, "取消"),
  1604. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1605. ]),
  1606. vue.createElementVNode("scroll-view", {
  1607. "scroll-y": "",
  1608. class: "picker-list"
  1609. }, [
  1610. (vue.openBlock(true), vue.createElementBlock(
  1611. vue.Fragment,
  1612. null,
  1613. vue.renderList(_ctx.stationList, (item, index) => {
  1614. return vue.openBlock(), vue.createElementBlock("view", {
  1615. class: "station-item",
  1616. key: index,
  1617. onClick: ($event) => _ctx.selectStation(item)
  1618. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1619. }),
  1620. 128
  1621. /* KEYED_FRAGMENT */
  1622. ))
  1623. ])
  1624. ])
  1625. ],
  1626. 2
  1627. /* CLASS */
  1628. ),
  1629. vue.createElementVNode("view", { class: "footer-actions" }, [
  1630. vue.createElementVNode("view", { class: "agreement-row" }, [
  1631. vue.createElementVNode(
  1632. "view",
  1633. {
  1634. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1635. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1636. },
  1637. [
  1638. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1639. key: 0,
  1640. class: "check-mark"
  1641. }, "✓")) : vue.createCommentVNode("v-if", true)
  1642. ],
  1643. 2
  1644. /* CLASS */
  1645. ),
  1646. vue.createElementVNode("text", { class: "agree-text" }, [
  1647. vue.createTextVNode("我已阅读并同意 "),
  1648. vue.createElementVNode("text", {
  1649. style: { "color": "#2979ff" },
  1650. onClick: _cache[19] || (_cache[19] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1651. }, "《宠宝履约者说明》")
  1652. ])
  1653. ]),
  1654. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1655. vue.createElementVNode("button", {
  1656. class: "submit-btn",
  1657. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1658. }, "下一步,实名认证")
  1659. ])
  1660. ]),
  1661. vue.createElementVNode(
  1662. "view",
  1663. {
  1664. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1665. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1666. },
  1667. [
  1668. vue.createElementVNode("view", {
  1669. class: "picker-content",
  1670. onClick: _cache[24] || (_cache[24] = vue.withModifiers(() => {
  1671. }, ["stop"]))
  1672. }, [
  1673. vue.createElementVNode("view", { class: "picker-header" }, [
  1674. vue.createElementVNode("text", {
  1675. class: "picker-btn-cancel",
  1676. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1677. }, "取消"),
  1678. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1679. vue.createElementVNode("text", {
  1680. class: "picker-btn-confirm",
  1681. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1682. }, "确定")
  1683. ]),
  1684. vue.createElementVNode("picker-view", {
  1685. class: "picker-view",
  1686. "indicator-style": "height: 50px;",
  1687. value: _ctx.pickerValue,
  1688. onChange: _cache[23] || (_cache[23] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1689. }, [
  1690. vue.createElementVNode("picker-view-column", null, [
  1691. (vue.openBlock(true), vue.createElementBlock(
  1692. vue.Fragment,
  1693. null,
  1694. vue.renderList(_ctx.years, (item, index) => {
  1695. return vue.openBlock(), vue.createElementBlock(
  1696. "view",
  1697. {
  1698. class: "picker-item",
  1699. key: index
  1700. },
  1701. vue.toDisplayString(item) + "年",
  1702. 1
  1703. /* TEXT */
  1704. );
  1705. }),
  1706. 128
  1707. /* KEYED_FRAGMENT */
  1708. ))
  1709. ]),
  1710. vue.createElementVNode("picker-view-column", null, [
  1711. (vue.openBlock(true), vue.createElementBlock(
  1712. vue.Fragment,
  1713. null,
  1714. vue.renderList(_ctx.months, (item, index) => {
  1715. return vue.openBlock(), vue.createElementBlock(
  1716. "view",
  1717. {
  1718. class: "picker-item",
  1719. key: index
  1720. },
  1721. vue.toDisplayString(item) + "月",
  1722. 1
  1723. /* TEXT */
  1724. );
  1725. }),
  1726. 128
  1727. /* KEYED_FRAGMENT */
  1728. ))
  1729. ]),
  1730. vue.createElementVNode("picker-view-column", null, [
  1731. (vue.openBlock(true), vue.createElementBlock(
  1732. vue.Fragment,
  1733. null,
  1734. vue.renderList(_ctx.days, (item, index) => {
  1735. return vue.openBlock(), vue.createElementBlock(
  1736. "view",
  1737. {
  1738. class: "picker-item",
  1739. key: index
  1740. },
  1741. vue.toDisplayString(item) + "日",
  1742. 1
  1743. /* TEXT */
  1744. );
  1745. }),
  1746. 128
  1747. /* KEYED_FRAGMENT */
  1748. ))
  1749. ])
  1750. ], 40, ["value"])
  1751. ])
  1752. ],
  1753. 2
  1754. /* CLASS */
  1755. ),
  1756. vue.createVNode(_component_privacy_popup, {
  1757. visible: _ctx.showPrivacy,
  1758. title: _ctx.privacyTitle,
  1759. content: _ctx.privacyContent,
  1760. onClose: _cache[26] || (_cache[26] = ($event) => _ctx.showPrivacy = false)
  1761. }, null, 8, ["visible", "title", "content"])
  1762. ]);
  1763. }
  1764. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1765. const logic$6 = {
  1766. data() {
  1767. return {
  1768. formData: {
  1769. idType: "居民身份证",
  1770. name: "",
  1771. idNumber: "",
  1772. expiryDate: ""
  1773. },
  1774. idCardFront: "",
  1775. // 身份证正面本地预览路径
  1776. idCardBack: "",
  1777. // 身份证反面本地预览路径
  1778. idCardFrontOssId: "",
  1779. // 身份证正面 OSS ID
  1780. idCardBackOssId: "",
  1781. // 身份证反面 OSS ID
  1782. showDatePicker: false,
  1783. pickerValue: [0, 0, 0],
  1784. // YYYY-MM-DD
  1785. years: [],
  1786. months: [],
  1787. days: [],
  1788. serviceType: []
  1789. // 接收上一页的服务类型
  1790. };
  1791. },
  1792. onLoad(options) {
  1793. if (options.services) {
  1794. try {
  1795. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1796. } catch (e) {
  1797. formatAppLog("error", "at pages/recruit/auth_logic.js:29", "Parse services failed", e);
  1798. }
  1799. }
  1800. this.initDateData();
  1801. this.restoreAuthData();
  1802. },
  1803. methods: {
  1804. // --- 日期选择器逻辑 (简化版, 仅示意) ---
  1805. initDateData() {
  1806. const date = /* @__PURE__ */ new Date();
  1807. const year = date.getFullYear();
  1808. for (let i = year; i <= year + 20; i++) {
  1809. this.years.push(i);
  1810. }
  1811. for (let i = 1; i <= 12; i++) {
  1812. this.months.push(i);
  1813. }
  1814. for (let i = 1; i <= 31; i++) {
  1815. this.days.push(i);
  1816. }
  1817. },
  1818. openDatePicker() {
  1819. },
  1820. onDateChange(e) {
  1821. this.formData.expiryDate = e.detail.value;
  1822. },
  1823. // --- 数据持久化(防止返回上一级丢失) ---
  1824. restoreAuthData() {
  1825. try {
  1826. const saved = uni.getStorageSync("recruit_auth_data");
  1827. if (saved) {
  1828. const d = JSON.parse(saved);
  1829. this.formData.name = d.name || "";
  1830. this.formData.idNumber = d.idNumber || "";
  1831. this.formData.expiryDate = d.expiryDate || "";
  1832. this.idCardFront = d.idCardFront || "";
  1833. this.idCardBack = d.idCardBack || "";
  1834. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1835. this.idCardBackOssId = d.idCardBackOssId || "";
  1836. }
  1837. } catch (e) {
  1838. formatAppLog("error", "at pages/recruit/auth_logic.js:76", "恢复认证数据失败", e);
  1839. }
  1840. },
  1841. saveAuthData() {
  1842. try {
  1843. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1844. name: this.formData.name,
  1845. idNumber: this.formData.idNumber,
  1846. expiryDate: this.formData.expiryDate,
  1847. idCardFront: this.idCardFront,
  1848. idCardBack: this.idCardBack,
  1849. idCardFrontOssId: this.idCardFrontOssId,
  1850. idCardBackOssId: this.idCardBackOssId
  1851. }));
  1852. } catch (e) {
  1853. formatAppLog("error", "at pages/recruit/auth_logic.js:91", "保存认证数据失败", e);
  1854. }
  1855. },
  1856. // --- 图片上传(选择后自动上传到OSS) ---
  1857. chooseImage(side) {
  1858. uni.chooseImage({
  1859. count: 1,
  1860. sizeType: ["compressed"],
  1861. sourceType: ["album", "camera"],
  1862. success: async (res) => {
  1863. const tempPath = res.tempFilePaths[0];
  1864. if (side === "front") {
  1865. this.idCardFront = tempPath;
  1866. } else {
  1867. this.idCardBack = tempPath;
  1868. }
  1869. try {
  1870. uni.showLoading({ title: "上传中..." });
  1871. const uploadRes = await uploadFile(tempPath);
  1872. if (side === "front") {
  1873. this.idCardFrontOssId = uploadRes.data.ossId;
  1874. } else {
  1875. this.idCardBackOssId = uploadRes.data.ossId;
  1876. }
  1877. uni.hideLoading();
  1878. this.saveAuthData();
  1879. } catch (err) {
  1880. uni.hideLoading();
  1881. formatAppLog("error", "at pages/recruit/auth_logic.js:121", "上传身份证图片失败:", err);
  1882. }
  1883. }
  1884. });
  1885. },
  1886. // --- 提交 ---
  1887. goToQualifications() {
  1888. this.saveAuthData();
  1889. try {
  1890. const stored = uni.getStorageSync("recruit_form_data");
  1891. if (stored) {
  1892. const data = JSON.parse(stored);
  1893. data.realName = this.formData.name;
  1894. data.idNumber = this.formData.idNumber;
  1895. data.expiryDate = this.formData.expiryDate;
  1896. data.idCardFrontOssId = this.idCardFrontOssId;
  1897. data.idCardBackOssId = this.idCardBackOssId;
  1898. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1899. }
  1900. } catch (e) {
  1901. formatAppLog("error", "at pages/recruit/auth_logic.js:158", "保存认证数据失败", e);
  1902. }
  1903. const services = JSON.stringify(this.serviceType);
  1904. uni.navigateTo({
  1905. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1906. });
  1907. }
  1908. }
  1909. };
  1910. const _sfc_main$z = logic$6;
  1911. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  1912. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1913. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1914. vue.createElementVNode("view", { class: "form-card" }, [
  1915. vue.createElementVNode("view", { class: "form-item" }, [
  1916. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1917. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1918. ]),
  1919. vue.createElementVNode("view", { class: "form-item" }, [
  1920. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1921. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1922. vue.withDirectives(vue.createElementVNode(
  1923. "input",
  1924. {
  1925. class: "input-area",
  1926. type: "text",
  1927. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1928. placeholder: "证件姓名",
  1929. "placeholder-class": "input-placeholder"
  1930. },
  1931. null,
  1932. 512
  1933. /* NEED_PATCH */
  1934. ), [
  1935. [vue.vModelText, _ctx.formData.name]
  1936. ])
  1937. ])
  1938. ]),
  1939. vue.createElementVNode("view", { class: "form-item" }, [
  1940. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1941. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1942. vue.withDirectives(vue.createElementVNode(
  1943. "input",
  1944. {
  1945. class: "input-area",
  1946. type: "idcard",
  1947. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1948. placeholder: "身份证号",
  1949. "placeholder-class": "input-placeholder"
  1950. },
  1951. null,
  1952. 512
  1953. /* NEED_PATCH */
  1954. ), [
  1955. [vue.vModelText, _ctx.formData.idNumber]
  1956. ])
  1957. ])
  1958. ]),
  1959. vue.createElementVNode("view", { class: "form-item" }, [
  1960. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1961. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1962. vue.createElementVNode(
  1963. "picker",
  1964. {
  1965. mode: "date",
  1966. onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onDateChange && _ctx.onDateChange(...args)),
  1967. style: { "width": "100%" }
  1968. },
  1969. [
  1970. vue.createElementVNode(
  1971. "view",
  1972. {
  1973. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1974. },
  1975. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  1976. 3
  1977. /* TEXT, CLASS */
  1978. )
  1979. ],
  1980. 32
  1981. /* NEED_HYDRATION */
  1982. ),
  1983. (vue.openBlock(), vue.createElementBlock("svg", {
  1984. class: "arrow-right",
  1985. viewBox: "0 0 1024 1024",
  1986. version: "1.1",
  1987. xmlns: "http://www.w3.org/2000/svg"
  1988. }, [
  1989. vue.createElementVNode("path", {
  1990. 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",
  1991. fill: "#CCCCCC"
  1992. })
  1993. ]))
  1994. ])
  1995. ])
  1996. ]),
  1997. vue.createElementVNode("view", { class: "upload-card" }, [
  1998. vue.createElementVNode("view", {
  1999. class: "upload-box",
  2000. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  2001. }, [
  2002. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  2003. key: 0,
  2004. src: _ctx.idCardFront,
  2005. class: "preview-img",
  2006. mode: "aspectFill"
  2007. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2008. vue.Fragment,
  2009. { key: 1 },
  2010. [
  2011. (vue.openBlock(), vue.createElementBlock("svg", {
  2012. class: "camera-icon",
  2013. viewBox: "0 0 24 24",
  2014. fill: "none",
  2015. xmlns: "http://www.w3.org/2000/svg"
  2016. }, [
  2017. vue.createElementVNode("path", {
  2018. 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",
  2019. fill: "#E0E0E0"
  2020. }),
  2021. vue.createElementVNode("circle", {
  2022. cx: "12",
  2023. cy: "12",
  2024. r: "3",
  2025. stroke: "#CCCCCC",
  2026. "stroke-width": "2"
  2027. }),
  2028. vue.createElementVNode("path", {
  2029. 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",
  2030. fill: "#CCCCCC"
  2031. })
  2032. ])),
  2033. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2034. ],
  2035. 64
  2036. /* STABLE_FRAGMENT */
  2037. ))
  2038. ]),
  2039. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  2040. ]),
  2041. vue.createElementVNode("view", { class: "upload-card" }, [
  2042. vue.createElementVNode("view", {
  2043. class: "upload-box",
  2044. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  2045. }, [
  2046. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  2047. key: 0,
  2048. src: _ctx.idCardBack,
  2049. class: "preview-img",
  2050. mode: "aspectFill"
  2051. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2052. vue.Fragment,
  2053. { key: 1 },
  2054. [
  2055. (vue.openBlock(), vue.createElementBlock("svg", {
  2056. class: "camera-icon",
  2057. viewBox: "0 0 24 24",
  2058. fill: "none",
  2059. xmlns: "http://www.w3.org/2000/svg"
  2060. }, [
  2061. vue.createElementVNode("path", {
  2062. 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",
  2063. fill: "#CCCCCC"
  2064. })
  2065. ])),
  2066. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2067. ],
  2068. 64
  2069. /* STABLE_FRAGMENT */
  2070. ))
  2071. ]),
  2072. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  2073. ]),
  2074. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  2075. vue.createElementVNode("button", {
  2076. class: "next-btn",
  2077. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  2078. }, "下一步,完善资质")
  2079. ])
  2080. ]);
  2081. }
  2082. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  2083. const logic$5 = {
  2084. data() {
  2085. return {
  2086. serviceTypes: [],
  2087. // 从上一页传递过来的服务类型列表
  2088. qualifications: {},
  2089. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  2090. qualOssIds: {}
  2091. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  2092. };
  2093. },
  2094. onLoad(options) {
  2095. if (options.services) {
  2096. try {
  2097. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  2098. this.serviceTypes.forEach((item) => {
  2099. this.qualifications[item.name] = [];
  2100. this.qualOssIds[item.name] = [];
  2101. });
  2102. } catch (e) {
  2103. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  2104. }
  2105. }
  2106. },
  2107. methods: {
  2108. chooseImage(serviceName) {
  2109. uni.chooseImage({
  2110. count: 9,
  2111. sizeType: ["compressed"],
  2112. sourceType: ["album", "camera"],
  2113. success: async (res) => {
  2114. if (!this.qualifications[serviceName]) {
  2115. this.qualifications[serviceName] = [];
  2116. this.qualOssIds[serviceName] = [];
  2117. }
  2118. for (const tempPath of res.tempFilePaths) {
  2119. this.qualifications[serviceName].push(tempPath);
  2120. this.$forceUpdate();
  2121. try {
  2122. const uploadRes = await uploadFile(tempPath);
  2123. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  2124. } catch (err) {
  2125. formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
  2126. }
  2127. }
  2128. }
  2129. });
  2130. },
  2131. deleteImage(serviceName, index) {
  2132. this.qualifications[serviceName].splice(index, 1);
  2133. if (this.qualOssIds[serviceName]) {
  2134. this.qualOssIds[serviceName].splice(index, 1);
  2135. }
  2136. this.$forceUpdate();
  2137. },
  2138. goBackToForm() {
  2139. const pages = getCurrentPages();
  2140. if (pages.length > 2) {
  2141. uni.navigateBack({
  2142. delta: 2
  2143. });
  2144. } else {
  2145. uni.reLaunch({
  2146. url: "/pages/recruit/form"
  2147. });
  2148. }
  2149. },
  2150. async submit() {
  2151. let recruitData = {};
  2152. try {
  2153. const stored = uni.getStorageSync("recruit_form_data");
  2154. if (stored) {
  2155. recruitData = JSON.parse(stored);
  2156. }
  2157. } catch (e) {
  2158. formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
  2159. }
  2160. const allQualOssIds = [];
  2161. Object.values(this.qualOssIds).forEach((ids) => {
  2162. allQualOssIds.push(...ids);
  2163. });
  2164. const auditData = {
  2165. name: recruitData.name || "",
  2166. phone: recruitData.mobile || "",
  2167. password: recruitData.password || "",
  2168. gender: recruitData.gender === 1 ? "0" : "1",
  2169. birthday: recruitData.birthday || "",
  2170. serviceTypes: (recruitData.serviceType || []).join(","),
  2171. // 逗号分隔的服务类型ID
  2172. city: recruitData.city || "",
  2173. stationId: recruitData.stationId || null,
  2174. realName: recruitData.realName || "",
  2175. idCard: recruitData.idNumber || "",
  2176. idValidDate: recruitData.expiryDate || "",
  2177. idCardFront: recruitData.idCardFrontOssId || null,
  2178. idCardBack: recruitData.idCardBackOssId || null,
  2179. qualifications: allQualOssIds.join(",")
  2180. // 逗号分隔的资质图片OSS ID
  2181. };
  2182. uni.showLoading({ title: "提交中..." });
  2183. try {
  2184. await submitAudit(auditData);
  2185. uni.hideLoading();
  2186. uni.reLaunch({
  2187. url: "/pages/recruit/success"
  2188. });
  2189. } catch (err) {
  2190. uni.hideLoading();
  2191. formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
  2192. }
  2193. }
  2194. }
  2195. };
  2196. const _sfc_main$y = logic$5;
  2197. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2198. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2199. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2200. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2201. key: 0,
  2202. class: "empty-state"
  2203. }, [
  2204. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2205. vue.createElementVNode("button", {
  2206. class: "back-btn",
  2207. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2208. }, "返回选择")
  2209. ])) : vue.createCommentVNode("v-if", true),
  2210. (vue.openBlock(true), vue.createElementBlock(
  2211. vue.Fragment,
  2212. null,
  2213. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2214. return vue.openBlock(), vue.createElementBlock("view", {
  2215. class: "qual-card",
  2216. key: item.id
  2217. }, [
  2218. vue.createElementVNode(
  2219. "view",
  2220. { class: "card-title" },
  2221. vue.toDisplayString(item.name) + "服务资质",
  2222. 1
  2223. /* TEXT */
  2224. ),
  2225. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2226. (vue.openBlock(true), vue.createElementBlock(
  2227. vue.Fragment,
  2228. null,
  2229. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2230. return vue.openBlock(), vue.createElementBlock("view", {
  2231. class: "img-item",
  2232. key: imgIndex
  2233. }, [
  2234. vue.createElementVNode("image", {
  2235. src: img,
  2236. class: "preview-img",
  2237. mode: "aspectFill",
  2238. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2239. }, null, 8, ["src", "onClick"]),
  2240. vue.createElementVNode("view", {
  2241. class: "delete-btn",
  2242. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2243. }, "×", 8, ["onClick"])
  2244. ]);
  2245. }),
  2246. 128
  2247. /* KEYED_FRAGMENT */
  2248. )),
  2249. vue.createElementVNode("view", {
  2250. class: "upload-box",
  2251. onClick: ($event) => _ctx.chooseImage(item.name)
  2252. }, [
  2253. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2254. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2255. ], 8, ["onClick"])
  2256. ])
  2257. ]);
  2258. }),
  2259. 128
  2260. /* KEYED_FRAGMENT */
  2261. )),
  2262. vue.createElementVNode("view", { class: "footer-actions" }, [
  2263. vue.createElementVNode("button", {
  2264. class: "submit-btn",
  2265. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2266. }, "立即提交")
  2267. ])
  2268. ]);
  2269. }
  2270. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2271. const logic$4 = {
  2272. data() {
  2273. return {
  2274. station: "民治街道第一站",
  2275. name: "张三哥",
  2276. phone: "+8613612345678"
  2277. };
  2278. },
  2279. methods: {
  2280. goHome() {
  2281. uni.reLaunch({
  2282. url: "/pages/login/login"
  2283. });
  2284. }
  2285. }
  2286. };
  2287. const _sfc_main$x = logic$4;
  2288. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2289. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2290. vue.createElementVNode("view", { class: "icon-area" }, [
  2291. (vue.openBlock(), vue.createElementBlock("svg", {
  2292. class: "success-icon",
  2293. viewBox: "0 0 1024 1024",
  2294. version: "1.1",
  2295. xmlns: "http://www.w3.org/2000/svg"
  2296. }, [
  2297. vue.createElementVNode("path", {
  2298. 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",
  2299. fill: "#64D01D"
  2300. }),
  2301. vue.createElementVNode("path", {
  2302. 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",
  2303. fill: "#64D01D"
  2304. })
  2305. ])),
  2306. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2307. ]),
  2308. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2309. vue.createElementVNode("view", { class: "info-card" }, [
  2310. vue.createElementVNode("view", { class: "info-item" }, [
  2311. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2312. vue.createElementVNode(
  2313. "text",
  2314. { class: "value" },
  2315. vue.toDisplayString(_ctx.station),
  2316. 1
  2317. /* TEXT */
  2318. )
  2319. ]),
  2320. vue.createElementVNode("view", { class: "info-item" }, [
  2321. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2322. vue.createElementVNode(
  2323. "text",
  2324. { class: "value" },
  2325. vue.toDisplayString(_ctx.name),
  2326. 1
  2327. /* TEXT */
  2328. )
  2329. ]),
  2330. vue.createElementVNode("view", { class: "info-item" }, [
  2331. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2332. vue.createElementVNode(
  2333. "text",
  2334. { class: "value" },
  2335. vue.toDisplayString(_ctx.phone),
  2336. 1
  2337. /* TEXT */
  2338. )
  2339. ])
  2340. ]),
  2341. vue.createElementVNode("view", {
  2342. class: "footer-btn",
  2343. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2344. }, "我知道了")
  2345. ]);
  2346. }
  2347. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2348. const _sfc_main$w = {
  2349. data() {
  2350. return {
  2351. mobile: "",
  2352. code: "",
  2353. countDown: 0,
  2354. timer: null
  2355. };
  2356. },
  2357. computed: {
  2358. mobileMask() {
  2359. if (!this.mobile)
  2360. return "";
  2361. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2362. }
  2363. },
  2364. onLoad(options) {
  2365. if (options.mobile) {
  2366. this.mobile = options.mobile;
  2367. } else {
  2368. this.mobile = "13412346783";
  2369. }
  2370. },
  2371. methods: {
  2372. getVerifyCode() {
  2373. if (this.countDown > 0)
  2374. return;
  2375. this.countDown = 60;
  2376. this.timer = setInterval(() => {
  2377. this.countDown--;
  2378. if (this.countDown <= 0) {
  2379. clearInterval(this.timer);
  2380. }
  2381. }, 1e3);
  2382. uni.showToast({ title: "验证码已发送", icon: "none" });
  2383. },
  2384. nextStep() {
  2385. if (!this.code) {
  2386. uni.showToast({ title: "请输入验证码", icon: "none" });
  2387. return;
  2388. }
  2389. uni.navigateTo({
  2390. url: "/pages/login/reset-pwd-set"
  2391. });
  2392. }
  2393. }
  2394. };
  2395. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2396. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2397. vue.createElementVNode("view", { class: "content" }, [
  2398. vue.createElementVNode(
  2399. "view",
  2400. { class: "tip-text" },
  2401. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2402. 1
  2403. /* TEXT */
  2404. ),
  2405. vue.createElementVNode("view", { class: "input-group" }, [
  2406. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2407. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2408. vue.withDirectives(vue.createElementVNode(
  2409. "input",
  2410. {
  2411. class: "code-input",
  2412. type: "number",
  2413. maxlength: "6",
  2414. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2415. },
  2416. null,
  2417. 512
  2418. /* NEED_PATCH */
  2419. ), [
  2420. [vue.vModelText, $data.code]
  2421. ]),
  2422. vue.createElementVNode("view", {
  2423. class: "get-code-btn",
  2424. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2425. }, [
  2426. vue.createElementVNode(
  2427. "text",
  2428. { class: "btn-text" },
  2429. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2430. 1
  2431. /* TEXT */
  2432. )
  2433. ])
  2434. ])
  2435. ]),
  2436. vue.createElementVNode("button", {
  2437. class: "next-btn",
  2438. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2439. }, "下一步")
  2440. ])
  2441. ]);
  2442. }
  2443. 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"]]);
  2444. const _sfc_main$v = {
  2445. data() {
  2446. return {
  2447. pwd1: "",
  2448. pwd2: ""
  2449. };
  2450. },
  2451. methods: {
  2452. confirmReset() {
  2453. if (!this.pwd1 || !this.pwd2) {
  2454. uni.showToast({ title: "请输入密码", icon: "none" });
  2455. return;
  2456. }
  2457. if (this.pwd1 !== this.pwd2) {
  2458. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2459. return;
  2460. }
  2461. uni.showToast({ title: "重置成功", icon: "success" });
  2462. setTimeout(() => {
  2463. uni.navigateBack({
  2464. delta: 2
  2465. // 返回到登录页
  2466. });
  2467. }, 1500);
  2468. }
  2469. }
  2470. };
  2471. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2472. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2473. vue.createElementVNode("view", { class: "content" }, [
  2474. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2475. vue.createElementVNode("view", { class: "input-form" }, [
  2476. vue.createElementVNode("view", { class: "input-row" }, [
  2477. vue.withDirectives(vue.createElementVNode(
  2478. "input",
  2479. {
  2480. class: "pwd-input",
  2481. type: "text",
  2482. password: "",
  2483. placeholder: "限12-20位字母和数字组合",
  2484. "placeholder-style": "color:#ccc",
  2485. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2486. },
  2487. null,
  2488. 512
  2489. /* NEED_PATCH */
  2490. ), [
  2491. [vue.vModelText, $data.pwd1]
  2492. ])
  2493. ]),
  2494. vue.createElementVNode("view", { class: "divider" }),
  2495. vue.createElementVNode("view", { class: "input-row" }, [
  2496. vue.withDirectives(vue.createElementVNode(
  2497. "input",
  2498. {
  2499. class: "pwd-input",
  2500. type: "text",
  2501. password: "",
  2502. placeholder: "限12-20位字母和数字组合",
  2503. "placeholder-style": "color:#ccc",
  2504. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2505. },
  2506. null,
  2507. 512
  2508. /* NEED_PATCH */
  2509. ), [
  2510. [vue.vModelText, $data.pwd2]
  2511. ])
  2512. ]),
  2513. vue.createElementVNode("view", { class: "divider" })
  2514. ]),
  2515. vue.createElementVNode("button", {
  2516. class: "confirm-btn",
  2517. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2518. }, "确定")
  2519. ])
  2520. ]);
  2521. }
  2522. 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"]]);
  2523. function getServiceList() {
  2524. return request({
  2525. url: "/service/list/listOnTaskHall",
  2526. method: "GET"
  2527. });
  2528. }
  2529. function getServiceDetail(id) {
  2530. return request({
  2531. url: `/service/list/${id}`,
  2532. method: "GET"
  2533. });
  2534. }
  2535. const _sfc_main$u = {
  2536. __name: "index",
  2537. props: {
  2538. currentPath: {
  2539. type: String,
  2540. required: true
  2541. }
  2542. },
  2543. setup(__props, { expose: __expose }) {
  2544. __expose();
  2545. const props = __props;
  2546. const list = vue.ref([
  2547. {
  2548. pagePath: "pages/home/index",
  2549. text: "任务中心",
  2550. iconPath: "/static/tabbar/home.svg",
  2551. selectedIconPath: "/static/tabbar/home-active.svg"
  2552. },
  2553. {
  2554. pagePath: "pages/orders/index",
  2555. text: "我的订单",
  2556. iconPath: "/static/tabbar/order.svg",
  2557. selectedIconPath: "/static/tabbar/order-active.svg"
  2558. },
  2559. {
  2560. pagePath: "pages/mine/index",
  2561. text: "我的",
  2562. iconPath: "/static/tabbar/mine.svg",
  2563. selectedIconPath: "/static/tabbar/mine-active.svg"
  2564. }
  2565. ]);
  2566. const switchTab = (path) => {
  2567. if (props.currentPath === path)
  2568. return;
  2569. uni.switchTab({
  2570. url: "/" + path
  2571. });
  2572. };
  2573. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2574. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2575. return __returned__;
  2576. }
  2577. };
  2578. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  2579. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2580. vue.createElementVNode("view", { class: "tabbar-border" }),
  2581. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2582. (vue.openBlock(true), vue.createElementBlock(
  2583. vue.Fragment,
  2584. null,
  2585. vue.renderList($setup.list, (item, index) => {
  2586. return vue.openBlock(), vue.createElementBlock("view", {
  2587. class: "tabbar-item",
  2588. key: index,
  2589. onClick: ($event) => $setup.switchTab(item.pagePath)
  2590. }, [
  2591. vue.createElementVNode("image", {
  2592. class: "tabbar-icon",
  2593. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2594. }, null, 8, ["src"]),
  2595. vue.createElementVNode(
  2596. "view",
  2597. {
  2598. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2599. },
  2600. vue.toDisplayString(item.text),
  2601. 3
  2602. /* TEXT, CLASS */
  2603. )
  2604. ], 8, ["onClick"]);
  2605. }),
  2606. 128
  2607. /* KEYED_FRAGMENT */
  2608. ))
  2609. ])
  2610. ]);
  2611. }
  2612. 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"]]);
  2613. const logic$3 = {
  2614. components: {
  2615. customTabbar
  2616. },
  2617. data() {
  2618. return {
  2619. taskList: [],
  2620. currentFilter: "default",
  2621. // default, distance, time
  2622. filterCondition: "筛选条件",
  2623. sortDistance: "asc",
  2624. // asc, desc
  2625. sortTime: "asc",
  2626. scrollTop: 0,
  2627. // Track scroll position
  2628. isFilterShow: false,
  2629. tempFilter: {
  2630. service: null,
  2631. distance: "全部",
  2632. amount: "全部"
  2633. },
  2634. activeFilter: {
  2635. service: null,
  2636. distance: "全部",
  2637. amount: "全部"
  2638. },
  2639. workStatus: "working",
  2640. // working | resting
  2641. showConfirmModal: false,
  2642. showPetModal: false,
  2643. currentPetInfo: {},
  2644. showRejectModal: false,
  2645. rejectReason: "",
  2646. currentOrder: null,
  2647. showAcceptConfirmModal: false,
  2648. showNavModal: false,
  2649. navTargetItem: null,
  2650. navTargetPointType: "",
  2651. profile: null,
  2652. profileLoading: false,
  2653. serviceList: [],
  2654. orderStats: {
  2655. total: 0,
  2656. reject: 0,
  2657. award: 0,
  2658. punishment: 0
  2659. }
  2660. };
  2661. },
  2662. onPageScroll(e) {
  2663. this.scrollTop = e.scrollTop;
  2664. },
  2665. async onLoad() {
  2666. this.checkWorkStatus();
  2667. await this.loadServiceList();
  2668. this.loadTaskList();
  2669. },
  2670. onShow() {
  2671. uni.hideTabBar();
  2672. this.checkWorkStatus();
  2673. if (isLoggedIn()) {
  2674. this.loadProfile();
  2675. this.loadOrderStats();
  2676. }
  2677. },
  2678. async onPullDownRefresh() {
  2679. this.checkWorkStatus();
  2680. try {
  2681. await this.loadServiceList();
  2682. const tasks = [
  2683. this.loadTaskList()
  2684. ];
  2685. if (isLoggedIn()) {
  2686. tasks.push(this.loadProfile());
  2687. tasks.push(this.loadOrderStats());
  2688. }
  2689. await Promise.all(tasks);
  2690. } catch (err) {
  2691. formatAppLog("error", "at pages/home/logic.js:85", "刷新异常:", err);
  2692. } finally {
  2693. uni.stopPullDownRefresh();
  2694. uni.showToast({ title: "刷新成功", icon: "success" });
  2695. }
  2696. },
  2697. methods: {
  2698. async loadProfile() {
  2699. if (this.profileLoading)
  2700. return;
  2701. this.profileLoading = true;
  2702. try {
  2703. const res = await getMyProfile();
  2704. this.profile = res.data || null;
  2705. } catch (err) {
  2706. formatAppLog("error", "at pages/home/logic.js:99", "获取个人信息失败:", err);
  2707. } finally {
  2708. this.profileLoading = false;
  2709. }
  2710. },
  2711. async loadServiceList() {
  2712. try {
  2713. const res = await getServiceList();
  2714. this.serviceList = res.data || [];
  2715. } catch (err) {
  2716. formatAppLog("error", "at pages/home/logic.js:109", "获取服务类型失败:", err);
  2717. }
  2718. },
  2719. async loadOrderStats() {
  2720. try {
  2721. const res = await getOrderCount();
  2722. this.orderStats = res.data || { total: 0, reject: 0, award: 0, punishment: 0 };
  2723. } catch (err) {
  2724. formatAppLog("error", "at pages/home/logic.js:117", "获取订单统计失败:", err);
  2725. }
  2726. },
  2727. checkWorkStatus() {
  2728. const status = uni.getStorageSync("workStatus");
  2729. if (status) {
  2730. this.workStatus = status;
  2731. } else {
  2732. this.workStatus = "working";
  2733. uni.setStorageSync("workStatus", "working");
  2734. }
  2735. },
  2736. toggleFilter() {
  2737. if (this.workStatus === "resting")
  2738. return;
  2739. this.isFilterShow = !this.isFilterShow;
  2740. },
  2741. goToWorkStatus() {
  2742. uni.navigateTo({
  2743. url: "/pages/home/work-status"
  2744. });
  2745. },
  2746. startWork() {
  2747. this.showConfirmModal = true;
  2748. },
  2749. confirmStartWork() {
  2750. this.workStatus = "working";
  2751. uni.setStorageSync("workStatus", "working");
  2752. this.loadTaskList();
  2753. this.showConfirmModal = false;
  2754. uni.showToast({ title: "已开始接单", icon: "success" });
  2755. },
  2756. closeConfirmModal() {
  2757. this.showConfirmModal = false;
  2758. },
  2759. showPetProfile(item) {
  2760. this.currentPetInfo = item;
  2761. this.showPetModal = true;
  2762. },
  2763. closePetProfile() {
  2764. this.showPetModal = false;
  2765. },
  2766. openRejectModal(item) {
  2767. this.currentOrder = item;
  2768. this.rejectReason = "";
  2769. this.showRejectModal = true;
  2770. },
  2771. closeRejectModal() {
  2772. this.showRejectModal = false;
  2773. this.currentOrder = null;
  2774. },
  2775. confirmReject() {
  2776. if (!this.rejectReason.trim()) {
  2777. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2778. return;
  2779. }
  2780. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2781. this.showRejectModal = false;
  2782. },
  2783. openAcceptModal(item) {
  2784. this.currentOrder = item;
  2785. this.showAcceptConfirmModal = true;
  2786. },
  2787. closeAcceptModal() {
  2788. this.showAcceptConfirmModal = false;
  2789. this.currentOrder = null;
  2790. },
  2791. async confirmAccept() {
  2792. var _a;
  2793. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2794. return;
  2795. try {
  2796. await acceptOrder(this.currentOrder.id);
  2797. uni.showToast({ title: "接单成功", icon: "success" });
  2798. this.showAcceptConfirmModal = false;
  2799. this.currentOrder = null;
  2800. this.loadTaskList();
  2801. this.loadProfile();
  2802. } catch (err) {
  2803. formatAppLog("error", "at pages/home/logic.js:195", "接单失败:", err);
  2804. uni.showToast({ title: "接单失败", icon: "none" });
  2805. }
  2806. },
  2807. openNavigation(item, pointType) {
  2808. this.navTargetItem = item;
  2809. this.navTargetPointType = pointType;
  2810. this.showNavModal = true;
  2811. },
  2812. closeNavModal() {
  2813. this.showNavModal = false;
  2814. },
  2815. chooseMap(mapType) {
  2816. let item = this.navTargetItem;
  2817. let pointType = this.navTargetPointType;
  2818. let name = pointType === "start" ? item.startLocation : item.endLocation;
  2819. let address = pointType === "start" ? item.startAddress : item.endAddress;
  2820. this.showNavModal = false;
  2821. uni.openLocation({
  2822. latitude: 30.52,
  2823. // Mock lat
  2824. longitude: 114.31,
  2825. // Mock lng
  2826. name: name || "目的地",
  2827. address: address || "默认地址",
  2828. success: function() {
  2829. formatAppLog("log", "at pages/home/logic.js:221", "打开导航成功: " + mapType);
  2830. }
  2831. });
  2832. },
  2833. selectService(type) {
  2834. this.tempFilter.service = type;
  2835. },
  2836. selectDistance(type) {
  2837. this.tempFilter.distance = type;
  2838. },
  2839. selectAmount(type) {
  2840. this.tempFilter.amount = type;
  2841. },
  2842. resetFilter() {
  2843. this.tempFilter = {
  2844. service: null,
  2845. distance: "全部",
  2846. amount: "全部"
  2847. };
  2848. },
  2849. confirmFilter() {
  2850. this.activeFilter = { ...this.tempFilter };
  2851. this.isFilterShow = false;
  2852. this.loadTaskList();
  2853. },
  2854. closeFilter() {
  2855. this.isFilterShow = false;
  2856. },
  2857. goToDetail(item) {
  2858. formatAppLog("log", "at pages/home/logic.js:250", "Go to detail", item);
  2859. },
  2860. async loadTaskList() {
  2861. try {
  2862. const params = {
  2863. service: this.activeFilter.service,
  2864. minPrice: this.getMinPrice(),
  2865. maxPrice: this.getMaxPrice(),
  2866. pageNum: 1,
  2867. pageSize: 20
  2868. };
  2869. const res = await getPendingOrders(params);
  2870. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  2871. } catch (err) {
  2872. formatAppLog("error", "at pages/home/logic.js:264", "获取订单列表失败:", err);
  2873. uni.showToast({ title: "加载失败", icon: "none" });
  2874. this.taskList = [];
  2875. }
  2876. },
  2877. getMinPrice() {
  2878. const amount = this.activeFilter.amount;
  2879. if (amount === "100以下")
  2880. return 0;
  2881. if (amount === "100-200")
  2882. return 1e4;
  2883. if (amount === "200-500")
  2884. return 2e4;
  2885. if (amount === "500以上")
  2886. return 5e4;
  2887. return void 0;
  2888. },
  2889. getMaxPrice() {
  2890. const amount = this.activeFilter.amount;
  2891. if (amount === "100以下")
  2892. return 1e4;
  2893. if (amount === "100-200")
  2894. return 2e4;
  2895. if (amount === "200-500")
  2896. return 5e4;
  2897. return void 0;
  2898. },
  2899. transformOrder(item) {
  2900. const service = this.serviceList.find((s) => s.id === item.service);
  2901. const serviceText = (service == null ? void 0 : service.name) || "未知";
  2902. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  2903. const mode = (service == null ? void 0 : service.mode) || 0;
  2904. const isRoundTrip = mode === 1;
  2905. return {
  2906. id: item.id,
  2907. type: isRoundTrip ? 1 : item.service,
  2908. typeText: serviceText,
  2909. typeIcon: serviceIcon,
  2910. price: (item.price / 100).toFixed(2),
  2911. timeLabel: "服务时间",
  2912. time: item.serviceTime,
  2913. petAvatar: "/static/dog.png",
  2914. petName: item.petName,
  2915. petBreed: item.breed,
  2916. petGender: "M",
  2917. petAge: "",
  2918. petWeight: "",
  2919. petPersonality: "",
  2920. petHobby: "",
  2921. petRemark: "",
  2922. petTags: [],
  2923. petLogs: [],
  2924. startLocation: isRoundTrip ? item.fromAddress : "",
  2925. startAddress: isRoundTrip ? item.fromAddress : "",
  2926. startDistance: "0km",
  2927. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  2928. endAddress: item.toAddress,
  2929. endDistance: "0km",
  2930. serviceContent: "",
  2931. remark: item.remark || ""
  2932. };
  2933. },
  2934. setFilter(type) {
  2935. this.currentFilter = type;
  2936. if (type === "distance") {
  2937. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  2938. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  2939. } else if (type === "time") {
  2940. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  2941. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  2942. }
  2943. },
  2944. showFilterDropdown() {
  2945. this.toggleFilter();
  2946. }
  2947. }
  2948. };
  2949. const _imports_0$3 = "/static/icons/bell.svg";
  2950. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  2951. const _imports_8$1 = "/static/empty-rest.png";
  2952. const _sfc_main$t = {
  2953. ...logic$3
  2954. };
  2955. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  2956. var _a, _b, _c;
  2957. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  2958. return vue.openBlock(), vue.createElementBlock(
  2959. vue.Fragment,
  2960. null,
  2961. [
  2962. vue.createElementVNode("view", { class: "container" }, [
  2963. vue.createElementVNode(
  2964. "view",
  2965. {
  2966. class: "custom-nav-bar",
  2967. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  2968. },
  2969. [
  2970. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  2971. ],
  2972. 4
  2973. /* STYLE */
  2974. ),
  2975. vue.createElementVNode("view", { class: "nav-bg" }, [
  2976. vue.createElementVNode("view", { class: "bg-circle-left" }),
  2977. vue.createElementVNode("view", { class: "bg-circle-right" })
  2978. ]),
  2979. vue.createElementVNode("view", { class: "header-section" }, [
  2980. vue.createElementVNode("view", { class: "user-info" }, [
  2981. vue.createElementVNode("image", {
  2982. class: "avatar",
  2983. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  2984. mode: "aspectFill"
  2985. }, null, 8, ["src"]),
  2986. vue.createElementVNode("view", { class: "info-content" }, [
  2987. vue.createElementVNode("view", { class: "top-row" }, [
  2988. vue.createElementVNode(
  2989. "text",
  2990. { class: "name" },
  2991. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  2992. 1
  2993. /* TEXT */
  2994. ),
  2995. vue.createElementVNode(
  2996. "view",
  2997. {
  2998. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus === "resting" }]),
  2999. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3000. },
  3001. [
  3002. vue.createElementVNode("view", { class: "status-dot-bg" }, [
  3003. _ctx.workStatus === "working" ? (vue.openBlock(), vue.createElementBlock("text", {
  3004. key: 0,
  3005. class: "check-mark"
  3006. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3007. key: 1,
  3008. class: "check-mark",
  3009. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3010. }, "✕"))
  3011. ]),
  3012. vue.createElementVNode(
  3013. "text",
  3014. { class: "status-text" },
  3015. vue.toDisplayString(_ctx.workStatus === "working" ? "接单中" : "正在休息"),
  3016. 1
  3017. /* TEXT */
  3018. ),
  3019. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3020. ],
  3021. 2
  3022. /* CLASS */
  3023. )
  3024. ]),
  3025. vue.createElementVNode("view", { class: "bottom-row" }, [
  3026. vue.createElementVNode(
  3027. "text",
  3028. { class: "city-label" },
  3029. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3030. 1
  3031. /* TEXT */
  3032. ),
  3033. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3034. ])
  3035. ]),
  3036. vue.createElementVNode("view", { class: "notification-box" }, [
  3037. vue.createElementVNode("image", {
  3038. class: "bell-img",
  3039. src: _imports_0$3
  3040. }),
  3041. vue.createElementVNode("view", { class: "badge-count" }, "2")
  3042. ])
  3043. ]),
  3044. vue.createElementVNode("view", { class: "stats-card" }, [
  3045. vue.createElementVNode("view", { class: "stat-item" }, [
  3046. vue.createElementVNode(
  3047. "text",
  3048. { class: "num" },
  3049. vue.toDisplayString(_ctx.orderStats.total),
  3050. 1
  3051. /* TEXT */
  3052. ),
  3053. vue.createElementVNode("text", { class: "label" }, "累计接单")
  3054. ]),
  3055. vue.createElementVNode("view", { class: "divider" }),
  3056. vue.createElementVNode("view", { class: "stat-item" }, [
  3057. vue.createElementVNode(
  3058. "text",
  3059. { class: "num" },
  3060. vue.toDisplayString(_ctx.orderStats.reject),
  3061. 1
  3062. /* TEXT */
  3063. ),
  3064. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3065. ]),
  3066. vue.createElementVNode("view", { class: "divider" }),
  3067. vue.createElementVNode("view", { class: "stat-item" }, [
  3068. vue.createElementVNode(
  3069. "text",
  3070. { class: "num" },
  3071. vue.toDisplayString(_ctx.orderStats.award),
  3072. 1
  3073. /* TEXT */
  3074. ),
  3075. vue.createElementVNode("text", { class: "label" }, "奖励订单")
  3076. ]),
  3077. vue.createElementVNode("view", { class: "divider" }),
  3078. vue.createElementVNode("view", { class: "stat-item" }, [
  3079. vue.createElementVNode(
  3080. "text",
  3081. { class: "num" },
  3082. vue.toDisplayString(_ctx.orderStats.punishment),
  3083. 1
  3084. /* TEXT */
  3085. ),
  3086. vue.createElementVNode("text", { class: "label" }, "惩罚订单")
  3087. ])
  3088. ])
  3089. ]),
  3090. vue.createElementVNode("view", { class: "task-header" }, [
  3091. vue.createElementVNode(
  3092. "view",
  3093. {
  3094. class: "header-inner",
  3095. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3096. },
  3097. [
  3098. vue.createElementVNode("view", { class: "left-title" }, [
  3099. vue.createElementVNode("view", { class: "orange-bar" }),
  3100. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3101. vue.createElementVNode(
  3102. "text",
  3103. { class: "count" },
  3104. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3105. 1
  3106. /* TEXT */
  3107. )
  3108. ]),
  3109. vue.createElementVNode("view", { class: "filter-options" }, [
  3110. vue.createElementVNode("view", {
  3111. class: "dropdown",
  3112. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3113. }, [
  3114. vue.createElementVNode("text", null, "筛选条件"),
  3115. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3116. ])
  3117. ])
  3118. ],
  3119. 4
  3120. /* STYLE */
  3121. ),
  3122. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3123. key: 0,
  3124. class: "filter-mask",
  3125. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3126. })) : vue.createCommentVNode("v-if", true),
  3127. vue.createElementVNode(
  3128. "view",
  3129. {
  3130. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3131. },
  3132. [
  3133. vue.createElementVNode("view", { class: "filter-section" }, [
  3134. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3135. vue.createElementVNode("view", { class: "options-grid" }, [
  3136. vue.createElementVNode(
  3137. "view",
  3138. {
  3139. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3140. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3141. },
  3142. "全部",
  3143. 2
  3144. /* CLASS */
  3145. ),
  3146. (vue.openBlock(true), vue.createElementBlock(
  3147. vue.Fragment,
  3148. null,
  3149. vue.renderList(_ctx.serviceList, (item) => {
  3150. return vue.openBlock(), vue.createElementBlock("view", {
  3151. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3152. key: item.id,
  3153. onClick: ($event) => _ctx.selectService(item.id)
  3154. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3155. }),
  3156. 128
  3157. /* KEYED_FRAGMENT */
  3158. ))
  3159. ])
  3160. ]),
  3161. vue.createElementVNode("view", { class: "filter-section" }, [
  3162. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3163. vue.createElementVNode("view", { class: "options-grid" }, [
  3164. vue.createElementVNode(
  3165. "view",
  3166. {
  3167. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3168. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3169. },
  3170. "全部",
  3171. 2
  3172. /* CLASS */
  3173. ),
  3174. vue.createElementVNode(
  3175. "view",
  3176. {
  3177. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3178. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3179. },
  3180. "100以下",
  3181. 2
  3182. /* CLASS */
  3183. ),
  3184. vue.createElementVNode(
  3185. "view",
  3186. {
  3187. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3188. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3189. },
  3190. "100-200",
  3191. 2
  3192. /* CLASS */
  3193. ),
  3194. vue.createElementVNode(
  3195. "view",
  3196. {
  3197. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3198. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3199. },
  3200. "200-500",
  3201. 2
  3202. /* CLASS */
  3203. ),
  3204. vue.createElementVNode(
  3205. "view",
  3206. {
  3207. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3208. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3209. },
  3210. "500以上",
  3211. 2
  3212. /* CLASS */
  3213. )
  3214. ])
  3215. ]),
  3216. vue.createElementVNode("view", { class: "filter-actions" }, [
  3217. vue.createElementVNode("button", {
  3218. class: "action-btn reset",
  3219. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3220. }, "重置"),
  3221. vue.createElementVNode("button", {
  3222. class: "action-btn confirm",
  3223. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3224. }, "确认")
  3225. ])
  3226. ],
  3227. 2
  3228. /* CLASS */
  3229. )
  3230. ]),
  3231. _ctx.workStatus === "working" ? (vue.openBlock(), vue.createElementBlock("view", {
  3232. key: 0,
  3233. class: "task-list"
  3234. }, [
  3235. (vue.openBlock(true), vue.createElementBlock(
  3236. vue.Fragment,
  3237. null,
  3238. vue.renderList(_ctx.taskList, (item, index) => {
  3239. return vue.openBlock(), vue.createElementBlock("view", {
  3240. class: "task-card",
  3241. key: index,
  3242. onClick: ($event) => _ctx.goToDetail(item)
  3243. }, [
  3244. vue.createElementVNode("view", { class: "card-header" }, [
  3245. vue.createElementVNode("view", { class: "type-badge" }, [
  3246. vue.createElementVNode("image", {
  3247. class: "type-icon",
  3248. src: item.typeIcon
  3249. }, null, 8, ["src"]),
  3250. vue.createElementVNode(
  3251. "text",
  3252. { class: "type-text" },
  3253. vue.toDisplayString(item.typeText),
  3254. 1
  3255. /* TEXT */
  3256. )
  3257. ]),
  3258. vue.createElementVNode(
  3259. "text",
  3260. { class: "price" },
  3261. "¥" + vue.toDisplayString(item.price),
  3262. 1
  3263. /* TEXT */
  3264. )
  3265. ]),
  3266. vue.createElementVNode("view", { class: "card-body" }, [
  3267. vue.createElementVNode("view", { class: "time-row" }, [
  3268. vue.createElementVNode(
  3269. "text",
  3270. { class: "label" },
  3271. vue.toDisplayString(item.timeLabel) + ":",
  3272. 1
  3273. /* TEXT */
  3274. ),
  3275. vue.createElementVNode(
  3276. "text",
  3277. { class: "value" },
  3278. vue.toDisplayString(item.time),
  3279. 1
  3280. /* TEXT */
  3281. )
  3282. ]),
  3283. vue.createElementVNode("view", { class: "pet-card" }, [
  3284. vue.createElementVNode("image", {
  3285. class: "pet-avatar",
  3286. src: item.petAvatar,
  3287. mode: "aspectFill"
  3288. }, null, 8, ["src"]),
  3289. vue.createElementVNode("view", { class: "pet-info" }, [
  3290. vue.createElementVNode(
  3291. "text",
  3292. { class: "pet-name" },
  3293. vue.toDisplayString(item.petName),
  3294. 1
  3295. /* TEXT */
  3296. ),
  3297. vue.createElementVNode(
  3298. "text",
  3299. { class: "pet-breed" },
  3300. "品种: " + vue.toDisplayString(item.petBreed),
  3301. 1
  3302. /* TEXT */
  3303. )
  3304. ])
  3305. ]),
  3306. vue.createElementVNode("view", { class: "route-info" }, [
  3307. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3308. vue.Fragment,
  3309. { key: 0 },
  3310. [
  3311. vue.createElementVNode("view", {
  3312. class: "route-item",
  3313. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3314. }, [
  3315. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  3316. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3317. vue.createElementVNode("view", { class: "address-box" }, [
  3318. vue.createElementVNode(
  3319. "text",
  3320. { class: "addr-title" },
  3321. vue.toDisplayString(item.startLocation),
  3322. 1
  3323. /* TEXT */
  3324. ),
  3325. vue.createElementVNode(
  3326. "text",
  3327. { class: "addr-desc" },
  3328. vue.toDisplayString(item.startAddress),
  3329. 1
  3330. /* TEXT */
  3331. )
  3332. ]),
  3333. vue.createElementVNode("image", {
  3334. class: "nav-arrow",
  3335. src: _imports_3$2,
  3336. style: { "flex-shrink": "0", "align-self": "center" }
  3337. })
  3338. ], 8, ["onClick"]),
  3339. vue.createElementVNode("view", {
  3340. class: "route-item",
  3341. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3342. }, [
  3343. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  3344. vue.createElementVNode("view", { class: "address-box" }, [
  3345. vue.createElementVNode(
  3346. "text",
  3347. { class: "addr-title" },
  3348. vue.toDisplayString(item.endLocation),
  3349. 1
  3350. /* TEXT */
  3351. ),
  3352. vue.createElementVNode(
  3353. "text",
  3354. { class: "addr-desc" },
  3355. vue.toDisplayString(item.endAddress),
  3356. 1
  3357. /* TEXT */
  3358. )
  3359. ]),
  3360. vue.createElementVNode("image", {
  3361. class: "nav-arrow",
  3362. src: _imports_3$2,
  3363. style: { "flex-shrink": "0", "align-self": "center" }
  3364. })
  3365. ], 8, ["onClick"])
  3366. ],
  3367. 64
  3368. /* STABLE_FRAGMENT */
  3369. )) : (vue.openBlock(), vue.createElementBlock(
  3370. vue.Fragment,
  3371. { key: 1 },
  3372. [
  3373. vue.createElementVNode("view", {
  3374. class: "route-item",
  3375. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3376. }, [
  3377. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3378. vue.createElementVNode("view", { class: "address-box" }, [
  3379. vue.createElementVNode(
  3380. "text",
  3381. { class: "addr-title" },
  3382. vue.toDisplayString(item.endLocation),
  3383. 1
  3384. /* TEXT */
  3385. ),
  3386. vue.createElementVNode(
  3387. "text",
  3388. { class: "addr-desc" },
  3389. vue.toDisplayString(item.endAddress),
  3390. 1
  3391. /* TEXT */
  3392. )
  3393. ]),
  3394. vue.createElementVNode("image", {
  3395. class: "nav-arrow",
  3396. src: _imports_3$2,
  3397. style: { "flex-shrink": "0", "align-self": "center" }
  3398. })
  3399. ], 8, ["onClick"]),
  3400. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3401. key: 0,
  3402. class: "service-content"
  3403. }, [
  3404. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3405. vue.createElementVNode(
  3406. "text",
  3407. null,
  3408. vue.toDisplayString(item.serviceContent),
  3409. 1
  3410. /* TEXT */
  3411. )
  3412. ])) : vue.createCommentVNode("v-if", true)
  3413. ],
  3414. 64
  3415. /* STABLE_FRAGMENT */
  3416. ))
  3417. ]),
  3418. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3419. key: 0,
  3420. class: "remark-box"
  3421. }, [
  3422. vue.createElementVNode(
  3423. "text",
  3424. null,
  3425. "备注:" + vue.toDisplayString(item.remark),
  3426. 1
  3427. /* TEXT */
  3428. )
  3429. ])) : vue.createCommentVNode("v-if", true)
  3430. ]),
  3431. vue.createElementVNode("view", { class: "action-btns" }, [
  3432. vue.createElementVNode("button", {
  3433. class: "btn reject",
  3434. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3435. }, "拒绝", 8, ["onClick"]),
  3436. vue.createElementVNode("button", {
  3437. class: "btn accept",
  3438. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3439. }, "接单", 8, ["onClick"])
  3440. ])
  3441. ], 8, ["onClick"]);
  3442. }),
  3443. 128
  3444. /* KEYED_FRAGMENT */
  3445. )),
  3446. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3447. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  3448. key: 1,
  3449. class: "empty-state"
  3450. }, [
  3451. vue.createElementVNode("image", {
  3452. class: "empty-icon",
  3453. src: _imports_8$1,
  3454. mode: "aspectFit"
  3455. }),
  3456. vue.createElementVNode("text", { class: "empty-text" }, "当前处于休息中,暂时无法接单"),
  3457. vue.createElementVNode("button", {
  3458. class: "start-work-btn",
  3459. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.startWork && _ctx.startWork(...args))
  3460. }, "开工接单")
  3461. ])),
  3462. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3463. key: 2,
  3464. class: "modal-mask"
  3465. }, [
  3466. vue.createElementVNode("view", { class: "custom-modal" }, [
  3467. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3468. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3469. vue.createElementVNode("view", { class: "modal-btns" }, [
  3470. vue.createElementVNode("button", {
  3471. class: "modal-btn cancel",
  3472. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3473. }, "取消"),
  3474. vue.createElementVNode("button", {
  3475. class: "modal-btn confirm",
  3476. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3477. }, "确定")
  3478. ])
  3479. ])
  3480. ])) : vue.createCommentVNode("v-if", true),
  3481. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3482. key: 3,
  3483. class: "pet-modal-mask",
  3484. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3485. }, [
  3486. vue.createElementVNode("view", {
  3487. class: "pet-modal-content",
  3488. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  3489. }, ["stop"]))
  3490. }, [
  3491. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3492. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3493. vue.createElementVNode("view", {
  3494. class: "close-icon-btn",
  3495. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3496. }, "×")
  3497. ]),
  3498. vue.createElementVNode("scroll-view", {
  3499. "scroll-y": "",
  3500. class: "pet-modal-scroll"
  3501. }, [
  3502. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3503. vue.createElementVNode("image", {
  3504. class: "pm-avatar",
  3505. src: _ctx.currentPetInfo.petAvatar,
  3506. mode: "aspectFill"
  3507. }, null, 8, ["src"]),
  3508. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3509. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3510. vue.createElementVNode(
  3511. "text",
  3512. { class: "pm-name" },
  3513. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3514. 1
  3515. /* TEXT */
  3516. ),
  3517. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3518. key: 0,
  3519. class: "pm-gender"
  3520. }, [
  3521. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3522. vue.createElementVNode("text", null, "公")
  3523. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3524. key: 1,
  3525. class: "pm-gender female"
  3526. }, [
  3527. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3528. vue.createElementVNode("text", null, "母")
  3529. ])) : vue.createCommentVNode("v-if", true)
  3530. ]),
  3531. vue.createElementVNode(
  3532. "text",
  3533. { class: "pm-breed" },
  3534. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3535. 1
  3536. /* TEXT */
  3537. )
  3538. ])
  3539. ]),
  3540. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3541. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3542. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3543. vue.createElementVNode(
  3544. "text",
  3545. { class: "pm-val" },
  3546. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3547. 1
  3548. /* TEXT */
  3549. )
  3550. ]),
  3551. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3552. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3553. vue.createElementVNode(
  3554. "text",
  3555. { class: "pm-val" },
  3556. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3557. 1
  3558. /* TEXT */
  3559. )
  3560. ]),
  3561. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3562. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3563. vue.createElementVNode(
  3564. "text",
  3565. { class: "pm-val" },
  3566. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3567. 1
  3568. /* TEXT */
  3569. )
  3570. ]),
  3571. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3572. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3573. vue.createElementVNode(
  3574. "text",
  3575. { class: "pm-val" },
  3576. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3577. 1
  3578. /* TEXT */
  3579. )
  3580. ]),
  3581. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3582. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3583. vue.createElementVNode(
  3584. "text",
  3585. { class: "pm-val" },
  3586. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3587. 1
  3588. /* TEXT */
  3589. )
  3590. ])
  3591. ]),
  3592. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3593. key: 0,
  3594. class: "pm-tags"
  3595. }, [
  3596. (vue.openBlock(true), vue.createElementBlock(
  3597. vue.Fragment,
  3598. null,
  3599. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3600. return vue.openBlock(), vue.createElementBlock(
  3601. "view",
  3602. {
  3603. class: "pm-tag",
  3604. key: index
  3605. },
  3606. vue.toDisplayString(tag),
  3607. 1
  3608. /* TEXT */
  3609. );
  3610. }),
  3611. 128
  3612. /* KEYED_FRAGMENT */
  3613. ))
  3614. ])) : vue.createCommentVNode("v-if", true),
  3615. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3616. vue.createElementVNode("view", { class: "orange-bar" }),
  3617. vue.createElementVNode("text", null, "备注日志")
  3618. ]),
  3619. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3620. (vue.openBlock(true), vue.createElementBlock(
  3621. vue.Fragment,
  3622. null,
  3623. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3624. return vue.openBlock(), vue.createElementBlock("view", {
  3625. class: "pm-log-item",
  3626. key: lIndex
  3627. }, [
  3628. vue.createElementVNode(
  3629. "text",
  3630. { class: "pm-log-date" },
  3631. vue.toDisplayString(log.date),
  3632. 1
  3633. /* TEXT */
  3634. ),
  3635. vue.createElementVNode(
  3636. "text",
  3637. { class: "pm-log-text" },
  3638. vue.toDisplayString(log.content),
  3639. 1
  3640. /* TEXT */
  3641. ),
  3642. vue.createElementVNode(
  3643. "text",
  3644. { class: "pm-log-recorder" },
  3645. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3646. 1
  3647. /* TEXT */
  3648. )
  3649. ]);
  3650. }),
  3651. 128
  3652. /* KEYED_FRAGMENT */
  3653. ))
  3654. ]),
  3655. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3656. vue.createElementVNode("button", {
  3657. class: "pm-bottom-close",
  3658. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3659. }, "关闭"),
  3660. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3661. ])
  3662. ])
  3663. ])) : vue.createCommentVNode("v-if", true)
  3664. ]),
  3665. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3666. key: 0,
  3667. class: "modal-mask"
  3668. }, [
  3669. vue.createElementVNode("view", { class: "custom-modal" }, [
  3670. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3671. vue.withDirectives(vue.createElementVNode(
  3672. "textarea",
  3673. {
  3674. class: "reject-textarea",
  3675. "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => _ctx.rejectReason = $event),
  3676. placeholder: "请输入拒绝理由(必填)",
  3677. maxlength: "100"
  3678. },
  3679. null,
  3680. 512
  3681. /* NEED_PATCH */
  3682. ), [
  3683. [vue.vModelText, _ctx.rejectReason]
  3684. ]),
  3685. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3686. vue.createElementVNode("button", {
  3687. class: "modal-btn cancel",
  3688. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3689. }, "取消"),
  3690. vue.createElementVNode("button", {
  3691. class: "modal-btn confirm",
  3692. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3693. }, "提交")
  3694. ])
  3695. ])
  3696. ])) : vue.createCommentVNode("v-if", true),
  3697. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3698. key: 1,
  3699. class: "modal-mask"
  3700. }, [
  3701. vue.createElementVNode("view", { class: "custom-modal" }, [
  3702. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3703. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3704. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3705. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3706. ]),
  3707. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3708. vue.createElementVNode("button", {
  3709. class: "modal-btn cancel",
  3710. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3711. }, "再想想"),
  3712. vue.createElementVNode("button", {
  3713. class: "modal-btn confirm",
  3714. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3715. }, "确认接单")
  3716. ])
  3717. ])
  3718. ])) : vue.createCommentVNode("v-if", true),
  3719. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3720. key: 2,
  3721. class: "nav-modal-mask",
  3722. onClick: _cache[28] || (_cache[28] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3723. }, [
  3724. vue.createElementVNode("view", {
  3725. class: "nav-action-sheet",
  3726. onClick: _cache[27] || (_cache[27] = vue.withModifiers(() => {
  3727. }, ["stop"]))
  3728. }, [
  3729. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3730. vue.createElementVNode("view", {
  3731. class: "nav-sheet-item",
  3732. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("高德"))
  3733. }, "高德地图"),
  3734. vue.createElementVNode("view", {
  3735. class: "nav-sheet-item",
  3736. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("腾讯"))
  3737. }, "腾讯地图"),
  3738. vue.createElementVNode("view", {
  3739. class: "nav-sheet-item",
  3740. onClick: _cache[25] || (_cache[25] = ($event) => _ctx.chooseMap("百度"))
  3741. }, "百度地图"),
  3742. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3743. vue.createElementVNode("view", {
  3744. class: "nav-sheet-item cancel",
  3745. onClick: _cache[26] || (_cache[26] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3746. }, "取消")
  3747. ])
  3748. ])) : vue.createCommentVNode("v-if", true),
  3749. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3750. ],
  3751. 64
  3752. /* STABLE_FRAGMENT */
  3753. );
  3754. }
  3755. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3756. const _sfc_main$s = {
  3757. data() {
  3758. return {
  3759. status: "working"
  3760. // working | resting
  3761. };
  3762. },
  3763. onShow() {
  3764. const savedStatus = uni.getStorageSync("workStatus");
  3765. if (savedStatus) {
  3766. this.status = savedStatus;
  3767. }
  3768. },
  3769. methods: {
  3770. toggleStatus() {
  3771. if (this.status === "working") {
  3772. this.status = "resting";
  3773. uni.setStorageSync("workStatus", "resting");
  3774. } else {
  3775. this.status = "working";
  3776. uni.setStorageSync("workStatus", "working");
  3777. }
  3778. }
  3779. }
  3780. };
  3781. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  3782. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3783. vue.createElementVNode("view", { class: "signboard-container" }, [
  3784. vue.createElementVNode("view", { class: "rope" }),
  3785. vue.createElementVNode("view", { class: "nail" }),
  3786. vue.createElementVNode(
  3787. "view",
  3788. {
  3789. class: vue.normalizeClass(["board", { "resting": $data.status === "resting" }])
  3790. },
  3791. [
  3792. vue.createElementVNode("view", { class: "screw top-left" }),
  3793. vue.createElementVNode("view", { class: "screw top-right" }),
  3794. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3795. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3796. vue.createElementVNode("view", { class: "board-inner" }, [
  3797. vue.createElementVNode(
  3798. "text",
  3799. { class: "status-text" },
  3800. vue.toDisplayString($data.status === "working" ? "接单中" : "休息中"),
  3801. 1
  3802. /* TEXT */
  3803. )
  3804. ])
  3805. ],
  3806. 2
  3807. /* CLASS */
  3808. )
  3809. ]),
  3810. vue.createElementVNode("view", { class: "status-desc" }, [
  3811. vue.createElementVNode(
  3812. "text",
  3813. null,
  3814. vue.toDisplayString($data.status === "working" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  3815. 1
  3816. /* TEXT */
  3817. )
  3818. ]),
  3819. vue.createElementVNode("view", { class: "action-area" }, [
  3820. vue.createElementVNode(
  3821. "button",
  3822. {
  3823. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "working", "stopped": $data.status === "resting" }]),
  3824. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  3825. },
  3826. vue.toDisplayString($data.status === "working" ? "停止接单" : "已停止接单"),
  3827. 3
  3828. /* TEXT, CLASS */
  3829. ),
  3830. vue.createElementVNode("view", { class: "tips" }, [
  3831. $data.status === "working" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  3832. ])
  3833. ])
  3834. ]);
  3835. }
  3836. 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"]]);
  3837. const logic$2 = {
  3838. components: {
  3839. customTabbar
  3840. },
  3841. data() {
  3842. return {
  3843. currentTab: 0,
  3844. tabs: ["待接送/服务", "配送/服务中", "已完成", "已拒绝"],
  3845. typeFilterOptions: ["全部类型"],
  3846. currentTypeFilterIdx: 0,
  3847. activeDropdown: 0,
  3848. hasTimeFilter: false,
  3849. currentMonth: "2026年2月",
  3850. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  3851. calendarDays: [],
  3852. selectedDateRange: [],
  3853. allOrderList: [],
  3854. serviceList: [],
  3855. searchContent: "",
  3856. startServiceTime: "",
  3857. endServiceTime: "",
  3858. showPetModal: false,
  3859. currentPetInfo: {},
  3860. showNavModal: false,
  3861. navTargetItem: null,
  3862. navTargetPointType: "",
  3863. activeCallItem: null,
  3864. showRemarkInput: false,
  3865. remarkText: ""
  3866. };
  3867. },
  3868. created() {
  3869. this.initCalendar();
  3870. },
  3871. async onLoad() {
  3872. await this.loadServiceList();
  3873. await this.loadOrders();
  3874. },
  3875. onShow() {
  3876. uni.hideTabBar();
  3877. this.loadOrders();
  3878. },
  3879. async onPullDownRefresh() {
  3880. try {
  3881. await this.loadServiceList();
  3882. await this.loadOrders();
  3883. } finally {
  3884. uni.stopPullDownRefresh();
  3885. }
  3886. },
  3887. watch: {
  3888. currentTab() {
  3889. this.loadOrders();
  3890. },
  3891. currentTypeFilterIdx() {
  3892. this.loadOrders();
  3893. }
  3894. },
  3895. computed: {
  3896. orderList() {
  3897. return this.allOrderList;
  3898. }
  3899. },
  3900. methods: {
  3901. async loadServiceList() {
  3902. try {
  3903. const res = await getServiceList();
  3904. this.serviceList = res.data || [];
  3905. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  3906. } catch (err) {
  3907. formatAppLog("error", "at pages/orders/logic.js:75", "获取服务类型失败:", err);
  3908. }
  3909. },
  3910. async loadOrders() {
  3911. var _a;
  3912. try {
  3913. const statusMap = { 0: 2, 1: 3, 2: 5, 3: null };
  3914. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  3915. const params = {
  3916. status: statusMap[this.currentTab],
  3917. content: this.searchContent || void 0,
  3918. service: serviceId,
  3919. startServiceTime: this.startServiceTime || void 0,
  3920. endServiceTime: this.endServiceTime || void 0
  3921. };
  3922. formatAppLog("log", "at pages/orders/logic.js:89", "订单列表请求参数:", params);
  3923. const res = await getMyOrders(params);
  3924. formatAppLog("log", "at pages/orders/logic.js:91", "订单列表响应:", res);
  3925. const orders = res.rows || [];
  3926. formatAppLog("log", "at pages/orders/logic.js:93", "订单数量:", orders.length);
  3927. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  3928. } catch (err) {
  3929. formatAppLog("error", "at pages/orders/logic.js:96", "获取订单列表失败:", err);
  3930. this.allOrderList = [];
  3931. }
  3932. },
  3933. transformOrder(order, tabIndex) {
  3934. const service = this.serviceList.find((s) => s.id === order.service);
  3935. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3936. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3937. const mode = (service == null ? void 0 : service.mode) || 0;
  3938. const isRoundTrip = mode === 1;
  3939. let statusText = "接单";
  3940. if (tabIndex === 0) {
  3941. statusText = "接单";
  3942. } else if (tabIndex === 1) {
  3943. statusText = isRoundTrip ? "出发" : "开始";
  3944. } else if (tabIndex === 2) {
  3945. statusText = "已完成";
  3946. } else if (tabIndex === 3) {
  3947. statusText = "已拒绝";
  3948. }
  3949. return {
  3950. id: order.id,
  3951. type: isRoundTrip ? 1 : 2,
  3952. typeText: serviceText,
  3953. typeIcon: serviceIcon,
  3954. statusText,
  3955. price: (order.price / 100).toFixed(2),
  3956. timeLabel: "服务时间",
  3957. time: order.serviceTime || "",
  3958. petAvatar: "/static/dog.png",
  3959. petName: order.petName || "",
  3960. petBreed: order.breed || "",
  3961. startLocation: order.fromAddress || "",
  3962. startAddress: order.fromAddress || "",
  3963. startDistance: "0km",
  3964. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  3965. endAddress: order.toAddress || "",
  3966. endDistance: "0km",
  3967. serviceContent: order.remark || "",
  3968. remark: order.remark || ""
  3969. };
  3970. },
  3971. getDisplayStatus(item) {
  3972. if (item.statusText === "已完成")
  3973. return "已完成";
  3974. if (item.statusText === "已拒绝")
  3975. return "已拒绝";
  3976. if (item.statusText === "接单") {
  3977. return item.type === 1 ? "待接送" : "待服务";
  3978. }
  3979. return item.type === 1 ? "配送中" : "服务中";
  3980. },
  3981. getStatusClass(item) {
  3982. let display = this.getDisplayStatus(item);
  3983. if (display === "已完成")
  3984. return "finish";
  3985. if (display === "已拒绝")
  3986. return "reject";
  3987. if (display === "配送中" || display === "服务中")
  3988. return "processing";
  3989. return "highlight";
  3990. },
  3991. goToDetail(item) {
  3992. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  3993. },
  3994. showPetProfile(item) {
  3995. this.currentPetInfo = {
  3996. ...item,
  3997. petGender: "M",
  3998. petAge: "2岁",
  3999. petWeight: "15kg",
  4000. petPersonality: "活泼亲人,精力旺盛",
  4001. petHobby: "喜欢追飞盘,爱吃肉干",
  4002. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4003. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4004. petLogs: [
  4005. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4006. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4007. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4008. ]
  4009. };
  4010. this.showPetModal = true;
  4011. },
  4012. closePetProfile() {
  4013. this.showPetModal = false;
  4014. },
  4015. openNavigation(item, pointType) {
  4016. this.navTargetItem = item;
  4017. this.navTargetPointType = pointType;
  4018. this.showNavModal = true;
  4019. },
  4020. closeNavModal() {
  4021. this.showNavModal = false;
  4022. },
  4023. chooseMap(mapType) {
  4024. let item = this.navTargetItem;
  4025. let pointType = this.navTargetPointType;
  4026. let name = pointType === "start" ? item.startLocation : item.endLocation;
  4027. let address = pointType === "start" ? item.startAddress : item.endAddress;
  4028. this.showNavModal = false;
  4029. uni.openLocation({
  4030. latitude: 30.52,
  4031. longitude: 114.31,
  4032. name: name || "目的地",
  4033. address: address || "默认地址",
  4034. success: function() {
  4035. formatAppLog("log", "at pages/orders/logic.js:199", "打开导航成功: " + mapType);
  4036. }
  4037. });
  4038. },
  4039. toggleCallMenu(item) {
  4040. if (this.activeCallItem === item) {
  4041. this.activeCallItem = null;
  4042. } else {
  4043. this.activeCallItem = item;
  4044. }
  4045. },
  4046. closeCallMenu() {
  4047. this.activeCallItem = null;
  4048. },
  4049. doCall(type) {
  4050. let phoneNum = "";
  4051. if (type === "merchant") {
  4052. phoneNum = "18900008451";
  4053. } else if (type === "customer") {
  4054. phoneNum = "13800000001";
  4055. }
  4056. if (phoneNum) {
  4057. uni.makePhoneCall({ phoneNumber: phoneNum });
  4058. }
  4059. this.activeCallItem = null;
  4060. },
  4061. reportAbnormal(item) {
  4062. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4063. },
  4064. toggleDropdown(idx) {
  4065. if (this.activeDropdown === idx) {
  4066. this.activeDropdown = 0;
  4067. } else {
  4068. this.activeDropdown = idx;
  4069. }
  4070. },
  4071. closeDropdown() {
  4072. this.activeDropdown = 0;
  4073. },
  4074. selectType(index) {
  4075. this.currentTypeFilterIdx = index;
  4076. this.closeDropdown();
  4077. },
  4078. initCalendar() {
  4079. let days = [];
  4080. for (let i = 1; i <= 28; i++) {
  4081. days.push(i);
  4082. }
  4083. this.calendarDays = days;
  4084. this.selectedDateRange = [2, 4];
  4085. },
  4086. prevMonth() {
  4087. uni.showToast({ title: "上个月", icon: "none" });
  4088. },
  4089. nextMonth() {
  4090. uni.showToast({ title: "下个月", icon: "none" });
  4091. },
  4092. selectDateItem(day) {
  4093. if (this.selectedDateRange.length === 2) {
  4094. this.selectedDateRange = [day];
  4095. } else if (this.selectedDateRange.length === 1) {
  4096. let start = this.selectedDateRange[0];
  4097. if (day > start) {
  4098. this.selectedDateRange = [start, day];
  4099. } else if (day < start) {
  4100. this.selectedDateRange = [day, start];
  4101. } else {
  4102. this.selectedDateRange = [];
  4103. }
  4104. } else {
  4105. this.selectedDateRange = [day];
  4106. }
  4107. },
  4108. getDateClass(day) {
  4109. if (this.selectedDateRange.length === 0)
  4110. return "";
  4111. if (this.selectedDateRange.length === 1) {
  4112. return day === this.selectedDateRange[0] ? "is-start" : "";
  4113. }
  4114. let start = this.selectedDateRange[0];
  4115. let end = this.selectedDateRange[1];
  4116. if (day === start)
  4117. return "is-start";
  4118. if (day === end)
  4119. return "is-end";
  4120. if (day > start && day < end)
  4121. return "is-between";
  4122. return "";
  4123. },
  4124. resetTimeFilter() {
  4125. this.hasTimeFilter = false;
  4126. this.selectedDateRange = [];
  4127. this.startServiceTime = "";
  4128. this.endServiceTime = "";
  4129. this.closeDropdown();
  4130. this.loadOrders();
  4131. },
  4132. confirmTimeFilter() {
  4133. if (this.selectedDateRange.length === 0) {
  4134. uni.showToast({ title: "请先选择日期", icon: "none" });
  4135. return;
  4136. }
  4137. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4138. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4139. const pad = (n) => String(n).padStart(2, "0");
  4140. if (this.selectedDateRange.length === 2) {
  4141. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4142. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4143. } else {
  4144. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4145. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4146. }
  4147. this.hasTimeFilter = true;
  4148. this.closeDropdown();
  4149. this.loadOrders();
  4150. },
  4151. getMainActionText(item) {
  4152. return "查看详情";
  4153. },
  4154. mainAction(item) {
  4155. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4156. },
  4157. openRemarkInput() {
  4158. this.remarkText = "";
  4159. this.showRemarkInput = true;
  4160. },
  4161. closeRemarkInput() {
  4162. this.showRemarkInput = false;
  4163. this.remarkText = "";
  4164. },
  4165. submitRemark() {
  4166. const text = this.remarkText.trim();
  4167. if (!text) {
  4168. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4169. return;
  4170. }
  4171. const now = /* @__PURE__ */ new Date();
  4172. 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")}`;
  4173. if (!this.currentPetInfo.petLogs) {
  4174. this.$set(this.currentPetInfo, "petLogs", []);
  4175. }
  4176. this.currentPetInfo.petLogs.unshift({
  4177. date: dateStr,
  4178. content: text,
  4179. recorder: "我"
  4180. });
  4181. uni.showToast({ title: "备注已添加", icon: "success" });
  4182. this.closeRemarkInput();
  4183. }
  4184. }
  4185. };
  4186. const _sfc_main$r = {
  4187. ...logic$2
  4188. };
  4189. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  4190. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4191. return vue.openBlock(), vue.createElementBlock(
  4192. vue.Fragment,
  4193. null,
  4194. [
  4195. vue.createElementVNode("view", { class: "container" }, [
  4196. vue.createElementVNode("view", { class: "sticky-header" }, [
  4197. vue.createElementVNode("view", { class: "status-tabs" }, [
  4198. (vue.openBlock(true), vue.createElementBlock(
  4199. vue.Fragment,
  4200. null,
  4201. vue.renderList(_ctx.tabs, (tab, index) => {
  4202. return vue.openBlock(), vue.createElementBlock("view", {
  4203. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4204. key: index,
  4205. onClick: ($event) => _ctx.currentTab = index
  4206. }, [
  4207. vue.createElementVNode(
  4208. "text",
  4209. null,
  4210. vue.toDisplayString(tab),
  4211. 1
  4212. /* TEXT */
  4213. ),
  4214. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4215. key: 0,
  4216. class: "indicator"
  4217. })) : vue.createCommentVNode("v-if", true)
  4218. ], 10, ["onClick"]);
  4219. }),
  4220. 128
  4221. /* KEYED_FRAGMENT */
  4222. ))
  4223. ]),
  4224. vue.createElementVNode("view", { class: "search-bar" }, [
  4225. vue.createElementVNode("view", { class: "search-input-box" }, [
  4226. vue.createElementVNode("input", {
  4227. class: "search-input",
  4228. placeholder: "搜索地址/电话/姓名",
  4229. "placeholder-class": "ph-style"
  4230. })
  4231. ])
  4232. ]),
  4233. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4234. vue.createElementVNode("view", { class: "filter-bar" }, [
  4235. vue.createElementVNode(
  4236. "view",
  4237. {
  4238. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4239. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggleDropdown(1))
  4240. },
  4241. [
  4242. vue.createElementVNode(
  4243. "text",
  4244. {
  4245. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4246. },
  4247. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4248. 3
  4249. /* TEXT, CLASS */
  4250. ),
  4251. vue.createElementVNode(
  4252. "view",
  4253. {
  4254. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4255. },
  4256. null,
  4257. 2
  4258. /* CLASS */
  4259. )
  4260. ],
  4261. 2
  4262. /* CLASS */
  4263. ),
  4264. vue.createElementVNode(
  4265. "view",
  4266. {
  4267. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4268. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(2))
  4269. },
  4270. [
  4271. vue.createElementVNode(
  4272. "text",
  4273. {
  4274. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4275. },
  4276. "服务时间",
  4277. 2
  4278. /* CLASS */
  4279. ),
  4280. vue.createElementVNode(
  4281. "view",
  4282. {
  4283. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4284. },
  4285. null,
  4286. 2
  4287. /* CLASS */
  4288. )
  4289. ],
  4290. 2
  4291. /* CLASS */
  4292. )
  4293. ]),
  4294. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4295. key: 0,
  4296. class: "dropdown-mask",
  4297. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4298. })) : vue.createCommentVNode("v-if", true),
  4299. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4300. key: 1,
  4301. class: "dropdown-panel"
  4302. }, [
  4303. (vue.openBlock(true), vue.createElementBlock(
  4304. vue.Fragment,
  4305. null,
  4306. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4307. return vue.openBlock(), vue.createElementBlock("view", {
  4308. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4309. key: index,
  4310. onClick: ($event) => _ctx.selectType(index)
  4311. }, [
  4312. vue.createElementVNode(
  4313. "text",
  4314. null,
  4315. vue.toDisplayString(item),
  4316. 1
  4317. /* TEXT */
  4318. )
  4319. ], 10, ["onClick"]);
  4320. }),
  4321. 128
  4322. /* KEYED_FRAGMENT */
  4323. ))
  4324. ])) : vue.createCommentVNode("v-if", true),
  4325. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4326. key: 2,
  4327. class: "dropdown-panel calendar-panel"
  4328. }, [
  4329. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4330. vue.createElementVNode("view", { class: "cal-header" }, [
  4331. vue.createElementVNode("text", {
  4332. class: "cal-nav-btn",
  4333. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4334. }, "‹"),
  4335. vue.createElementVNode(
  4336. "text",
  4337. { class: "cal-title" },
  4338. vue.toDisplayString(_ctx.currentMonth),
  4339. 1
  4340. /* TEXT */
  4341. ),
  4342. vue.createElementVNode("text", {
  4343. class: "cal-nav-btn",
  4344. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4345. }, "›")
  4346. ]),
  4347. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4348. (vue.openBlock(true), vue.createElementBlock(
  4349. vue.Fragment,
  4350. null,
  4351. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4352. return vue.openBlock(), vue.createElementBlock(
  4353. "text",
  4354. {
  4355. key: idx,
  4356. class: "wk-item"
  4357. },
  4358. vue.toDisplayString(wk),
  4359. 1
  4360. /* TEXT */
  4361. );
  4362. }),
  4363. 128
  4364. /* KEYED_FRAGMENT */
  4365. ))
  4366. ]),
  4367. vue.createElementVNode("view", { class: "cal-body" }, [
  4368. (vue.openBlock(true), vue.createElementBlock(
  4369. vue.Fragment,
  4370. null,
  4371. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4372. return vue.openBlock(), vue.createElementBlock("view", {
  4373. key: idx,
  4374. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4375. onClick: ($event) => _ctx.selectDateItem(day)
  4376. }, [
  4377. vue.createElementVNode(
  4378. "view",
  4379. { class: "cal-day-text" },
  4380. vue.toDisplayString(day),
  4381. 1
  4382. /* TEXT */
  4383. )
  4384. ], 10, ["onClick"]);
  4385. }),
  4386. 128
  4387. /* KEYED_FRAGMENT */
  4388. ))
  4389. ])
  4390. ]),
  4391. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4392. vue.createElementVNode("button", {
  4393. class: "cal-btn reset",
  4394. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4395. }, "重置"),
  4396. vue.createElementVNode("button", {
  4397. class: "cal-btn confirm",
  4398. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4399. }, "确定")
  4400. ])
  4401. ])) : vue.createCommentVNode("v-if", true)
  4402. ])
  4403. ]),
  4404. vue.createElementVNode("view", { class: "order-list" }, [
  4405. (vue.openBlock(true), vue.createElementBlock(
  4406. vue.Fragment,
  4407. null,
  4408. vue.renderList(_ctx.orderList, (item, index) => {
  4409. return vue.openBlock(), vue.createElementBlock("view", {
  4410. class: "order-card",
  4411. key: index,
  4412. onClick: ($event) => _ctx.goToDetail(item)
  4413. }, [
  4414. vue.createElementVNode("view", { class: "card-header" }, [
  4415. vue.createElementVNode("view", { class: "type-badge" }, [
  4416. vue.createElementVNode("image", {
  4417. class: "type-icon",
  4418. src: item.typeIcon
  4419. }, null, 8, ["src"]),
  4420. vue.createElementVNode(
  4421. "text",
  4422. { class: "type-text" },
  4423. vue.toDisplayString(item.typeText),
  4424. 1
  4425. /* TEXT */
  4426. )
  4427. ]),
  4428. vue.createElementVNode(
  4429. "text",
  4430. {
  4431. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4432. },
  4433. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4434. 3
  4435. /* TEXT, CLASS */
  4436. )
  4437. ]),
  4438. vue.createElementVNode("view", { class: "card-body" }, [
  4439. vue.createElementVNode("view", { class: "time-row" }, [
  4440. vue.createElementVNode("view", { class: "time-col" }, [
  4441. vue.createElementVNode(
  4442. "text",
  4443. { class: "label" },
  4444. vue.toDisplayString(item.timeLabel) + ":",
  4445. 1
  4446. /* TEXT */
  4447. ),
  4448. vue.createElementVNode(
  4449. "text",
  4450. { class: "value" },
  4451. vue.toDisplayString(item.time),
  4452. 1
  4453. /* TEXT */
  4454. )
  4455. ]),
  4456. vue.createElementVNode(
  4457. "text",
  4458. { class: "price" },
  4459. "¥" + vue.toDisplayString(item.price),
  4460. 1
  4461. /* TEXT */
  4462. )
  4463. ]),
  4464. vue.createElementVNode("view", { class: "pet-card" }, [
  4465. vue.createElementVNode("image", {
  4466. class: "pet-avatar",
  4467. src: item.petAvatar,
  4468. mode: "aspectFill"
  4469. }, null, 8, ["src"]),
  4470. vue.createElementVNode("view", { class: "pet-info" }, [
  4471. vue.createElementVNode(
  4472. "text",
  4473. { class: "pet-name" },
  4474. vue.toDisplayString(item.petName),
  4475. 1
  4476. /* TEXT */
  4477. ),
  4478. vue.createElementVNode(
  4479. "text",
  4480. { class: "pet-breed" },
  4481. "品种: " + vue.toDisplayString(item.petBreed),
  4482. 1
  4483. /* TEXT */
  4484. )
  4485. ])
  4486. ]),
  4487. vue.createElementVNode("view", { class: "route-info" }, [
  4488. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4489. vue.Fragment,
  4490. { key: 0 },
  4491. [
  4492. vue.createElementVNode("view", {
  4493. class: "route-item",
  4494. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4495. }, [
  4496. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  4497. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4498. vue.createElementVNode("view", { class: "address-box" }, [
  4499. vue.createElementVNode(
  4500. "text",
  4501. { class: "addr-title" },
  4502. vue.toDisplayString(item.startLocation),
  4503. 1
  4504. /* TEXT */
  4505. ),
  4506. vue.createElementVNode(
  4507. "text",
  4508. { class: "addr-desc" },
  4509. vue.toDisplayString(item.startAddress),
  4510. 1
  4511. /* TEXT */
  4512. )
  4513. ]),
  4514. vue.createElementVNode("image", {
  4515. class: "nav-arrow",
  4516. src: _imports_3$2,
  4517. style: { "flex-shrink": "0", "align-self": "center" }
  4518. })
  4519. ], 8, ["onClick"]),
  4520. vue.createElementVNode("view", {
  4521. class: "route-item",
  4522. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4523. }, [
  4524. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  4525. vue.createElementVNode("view", { class: "address-box" }, [
  4526. vue.createElementVNode(
  4527. "text",
  4528. { class: "addr-title" },
  4529. vue.toDisplayString(item.endLocation),
  4530. 1
  4531. /* TEXT */
  4532. ),
  4533. vue.createElementVNode(
  4534. "text",
  4535. { class: "addr-desc" },
  4536. vue.toDisplayString(item.endAddress),
  4537. 1
  4538. /* TEXT */
  4539. )
  4540. ]),
  4541. vue.createElementVNode("image", {
  4542. class: "nav-arrow",
  4543. src: _imports_3$2,
  4544. style: { "flex-shrink": "0", "align-self": "center" }
  4545. })
  4546. ], 8, ["onClick"])
  4547. ],
  4548. 64
  4549. /* STABLE_FRAGMENT */
  4550. )) : (vue.openBlock(), vue.createElementBlock(
  4551. vue.Fragment,
  4552. { key: 1 },
  4553. [
  4554. vue.createElementVNode("view", {
  4555. class: "route-item",
  4556. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4557. }, [
  4558. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4559. vue.createElementVNode("view", { class: "address-box" }, [
  4560. vue.createElementVNode(
  4561. "text",
  4562. { class: "addr-title" },
  4563. vue.toDisplayString(item.endLocation),
  4564. 1
  4565. /* TEXT */
  4566. ),
  4567. vue.createElementVNode(
  4568. "text",
  4569. { class: "addr-desc" },
  4570. vue.toDisplayString(item.endAddress),
  4571. 1
  4572. /* TEXT */
  4573. )
  4574. ]),
  4575. vue.createElementVNode("image", {
  4576. class: "nav-arrow",
  4577. src: _imports_3$2,
  4578. style: { "flex-shrink": "0", "align-self": "center" }
  4579. })
  4580. ], 8, ["onClick"]),
  4581. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4582. key: 0,
  4583. class: "service-content"
  4584. }, [
  4585. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4586. vue.createElementVNode(
  4587. "text",
  4588. null,
  4589. vue.toDisplayString(item.serviceContent),
  4590. 1
  4591. /* TEXT */
  4592. )
  4593. ])) : vue.createCommentVNode("v-if", true)
  4594. ],
  4595. 64
  4596. /* STABLE_FRAGMENT */
  4597. ))
  4598. ]),
  4599. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4600. key: 0,
  4601. class: "remark-box"
  4602. }, [
  4603. vue.createElementVNode(
  4604. "text",
  4605. null,
  4606. "备注:" + vue.toDisplayString(item.remark),
  4607. 1
  4608. /* TEXT */
  4609. )
  4610. ])) : vue.createCommentVNode("v-if", true)
  4611. ]),
  4612. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4613. key: 0,
  4614. class: "action-btns"
  4615. }, [
  4616. vue.createElementVNode("view", { class: "action-left" }, [
  4617. vue.createElementVNode("button", {
  4618. class: "btn normal",
  4619. onClick: vue.withModifiers(($event) => _ctx.toggleCallMenu(item), ["stop"])
  4620. }, "一键拨号", 8, ["onClick"]),
  4621. _ctx.activeCallItem === item ? (vue.openBlock(), vue.createElementBlock("view", {
  4622. key: 0,
  4623. class: "call-popover",
  4624. onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
  4625. }, ["stop"]))
  4626. }, [
  4627. vue.createElementVNode("view", {
  4628. class: "call-pop-item",
  4629. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.doCall("merchant"))
  4630. }, "联系商家"),
  4631. vue.createElementVNode("view", {
  4632. class: "call-pop-item",
  4633. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.doCall("customer"))
  4634. }, "联系客户")
  4635. ])) : vue.createCommentVNode("v-if", true)
  4636. ]),
  4637. vue.createElementVNode("view", { class: "action-right" }, [
  4638. vue.createElementVNode("button", {
  4639. class: "btn normal",
  4640. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4641. }, "异常上报", 8, ["onClick"]),
  4642. vue.createElementVNode("button", {
  4643. class: "btn primary",
  4644. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4645. }, vue.toDisplayString(_ctx.getMainActionText(item)), 9, ["onClick"])
  4646. ])
  4647. ])) : vue.createCommentVNode("v-if", true)
  4648. ], 8, ["onClick"]);
  4649. }),
  4650. 128
  4651. /* KEYED_FRAGMENT */
  4652. )),
  4653. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4654. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4655. ]),
  4656. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4657. key: 0,
  4658. class: "call-mask",
  4659. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4660. })) : vue.createCommentVNode("v-if", true)
  4661. ]),
  4662. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4663. key: 0,
  4664. class: "pet-modal-mask",
  4665. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4666. }, [
  4667. vue.createElementVNode("view", {
  4668. class: "pet-modal-content",
  4669. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  4670. }, ["stop"]))
  4671. }, [
  4672. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4673. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4674. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4675. vue.createElementVNode("view", {
  4676. class: "pm-remark-btn",
  4677. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4678. }, "备注"),
  4679. vue.createElementVNode("view", {
  4680. class: "close-icon-btn",
  4681. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4682. }, "×")
  4683. ])
  4684. ]),
  4685. vue.createElementVNode("scroll-view", {
  4686. "scroll-y": "",
  4687. class: "pet-modal-scroll"
  4688. }, [
  4689. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4690. vue.createElementVNode("image", {
  4691. class: "pm-avatar",
  4692. src: _ctx.currentPetInfo.petAvatar,
  4693. mode: "aspectFill"
  4694. }, null, 8, ["src"]),
  4695. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4696. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4697. vue.createElementVNode(
  4698. "text",
  4699. { class: "pm-name" },
  4700. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4701. 1
  4702. /* TEXT */
  4703. ),
  4704. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4705. key: 0,
  4706. class: "pm-gender"
  4707. }, [
  4708. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4709. vue.createElementVNode("text", null, "公")
  4710. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4711. key: 1,
  4712. class: "pm-gender female"
  4713. }, [
  4714. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4715. vue.createElementVNode("text", null, "母")
  4716. ])) : vue.createCommentVNode("v-if", true)
  4717. ]),
  4718. vue.createElementVNode(
  4719. "text",
  4720. { class: "pm-breed" },
  4721. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4722. 1
  4723. /* TEXT */
  4724. )
  4725. ])
  4726. ]),
  4727. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4728. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4729. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4730. vue.createElementVNode(
  4731. "text",
  4732. { class: "pm-val" },
  4733. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4734. 1
  4735. /* TEXT */
  4736. )
  4737. ]),
  4738. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4739. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  4740. vue.createElementVNode(
  4741. "text",
  4742. { class: "pm-val" },
  4743. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  4744. 1
  4745. /* TEXT */
  4746. )
  4747. ]),
  4748. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4749. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  4750. vue.createElementVNode(
  4751. "text",
  4752. { class: "pm-val" },
  4753. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  4754. 1
  4755. /* TEXT */
  4756. )
  4757. ]),
  4758. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4759. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  4760. vue.createElementVNode(
  4761. "text",
  4762. { class: "pm-val" },
  4763. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  4764. 1
  4765. /* TEXT */
  4766. )
  4767. ]),
  4768. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4769. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  4770. vue.createElementVNode(
  4771. "text",
  4772. { class: "pm-val" },
  4773. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  4774. 1
  4775. /* TEXT */
  4776. )
  4777. ])
  4778. ]),
  4779. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4780. key: 0,
  4781. class: "pm-tags"
  4782. }, [
  4783. (vue.openBlock(true), vue.createElementBlock(
  4784. vue.Fragment,
  4785. null,
  4786. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  4787. return vue.openBlock(), vue.createElementBlock(
  4788. "view",
  4789. {
  4790. class: "pm-tag",
  4791. key: index
  4792. },
  4793. vue.toDisplayString(tag),
  4794. 1
  4795. /* TEXT */
  4796. );
  4797. }),
  4798. 128
  4799. /* KEYED_FRAGMENT */
  4800. ))
  4801. ])) : vue.createCommentVNode("v-if", true),
  4802. vue.createElementVNode("view", { class: "pm-section-title" }, [
  4803. vue.createElementVNode("view", { class: "orange-bar" }),
  4804. vue.createElementVNode("text", null, "备注日志")
  4805. ]),
  4806. vue.createElementVNode("view", { class: "pm-log-list" }, [
  4807. (vue.openBlock(true), vue.createElementBlock(
  4808. vue.Fragment,
  4809. null,
  4810. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  4811. return vue.openBlock(), vue.createElementBlock("view", {
  4812. class: "pm-log-item",
  4813. key: lIndex
  4814. }, [
  4815. vue.createElementVNode(
  4816. "text",
  4817. { class: "pm-log-date" },
  4818. vue.toDisplayString(log.date),
  4819. 1
  4820. /* TEXT */
  4821. ),
  4822. vue.createElementVNode(
  4823. "text",
  4824. { class: "pm-log-text" },
  4825. vue.toDisplayString(log.content),
  4826. 1
  4827. /* TEXT */
  4828. ),
  4829. vue.createElementVNode(
  4830. "text",
  4831. { class: "pm-log-recorder" },
  4832. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  4833. 1
  4834. /* TEXT */
  4835. )
  4836. ]);
  4837. }),
  4838. 128
  4839. /* KEYED_FRAGMENT */
  4840. ))
  4841. ]),
  4842. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  4843. ])
  4844. ])
  4845. ])) : vue.createCommentVNode("v-if", true),
  4846. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  4847. key: 1,
  4848. class: "remark-mask",
  4849. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4850. }, [
  4851. vue.createElementVNode("view", {
  4852. class: "remark-sheet",
  4853. onClick: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  4854. }, ["stop"]))
  4855. }, [
  4856. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  4857. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  4858. vue.createElementVNode("view", {
  4859. class: "close-icon-btn",
  4860. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  4861. }, "×")
  4862. ]),
  4863. vue.withDirectives(vue.createElementVNode(
  4864. "textarea",
  4865. {
  4866. class: "remark-textarea",
  4867. "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => _ctx.remarkText = $event),
  4868. placeholder: "请输入备注内容...",
  4869. maxlength: "500",
  4870. "auto-height": ""
  4871. },
  4872. null,
  4873. 512
  4874. /* NEED_PATCH */
  4875. ), [
  4876. [vue.vModelText, _ctx.remarkText]
  4877. ]),
  4878. vue.createElementVNode("view", {
  4879. class: "remark-submit-btn",
  4880. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  4881. }, "提交备注")
  4882. ])
  4883. ])) : vue.createCommentVNode("v-if", true),
  4884. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4885. key: 2,
  4886. class: "nav-modal-mask",
  4887. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4888. }, [
  4889. vue.createElementVNode("view", {
  4890. class: "nav-action-sheet",
  4891. onClick: _cache[24] || (_cache[24] = vue.withModifiers(() => {
  4892. }, ["stop"]))
  4893. }, [
  4894. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  4895. vue.createElementVNode("view", {
  4896. class: "nav-sheet-item",
  4897. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("高德"))
  4898. }, "高德地图"),
  4899. vue.createElementVNode("view", {
  4900. class: "nav-sheet-item",
  4901. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("腾讯"))
  4902. }, "腾讯地图"),
  4903. vue.createElementVNode("view", {
  4904. class: "nav-sheet-item",
  4905. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("百度"))
  4906. }, "百度地图"),
  4907. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  4908. vue.createElementVNode("view", {
  4909. class: "nav-sheet-item cancel",
  4910. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  4911. }, "取消")
  4912. ])
  4913. ])) : vue.createCommentVNode("v-if", true),
  4914. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  4915. ],
  4916. 64
  4917. /* STABLE_FRAGMENT */
  4918. );
  4919. }
  4920. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  4921. function getDictDataByType(dictType) {
  4922. return request({
  4923. url: `/system/dict/data/type/${dictType}`,
  4924. method: "GET"
  4925. });
  4926. }
  4927. function getPetDetail(id) {
  4928. return request({
  4929. url: `/archieves/pet/${id}`,
  4930. method: "GET"
  4931. });
  4932. }
  4933. const logic$1 = {
  4934. data() {
  4935. return {
  4936. orderId: null,
  4937. pageLoading: true,
  4938. // 页面数据加载中
  4939. orderType: 1,
  4940. orderStatus: 2,
  4941. serviceId: null,
  4942. // 当前订单的服务类型ID
  4943. petId: null,
  4944. // 当前订单关联的宠物ID
  4945. petDetail: null,
  4946. // 宠物档案详情
  4947. // 从后端 clockInRemark 解析出的打卡步骤列表
  4948. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  4949. clockInSteps: [],
  4950. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  4951. currentClockIn: null,
  4952. currentStep: 0,
  4953. orderDetail: {
  4954. type: 1,
  4955. price: "0.00",
  4956. timeLabel: "服务时间",
  4957. time: "",
  4958. petAvatar: "/static/dog.png",
  4959. petName: "",
  4960. petBreed: "",
  4961. serviceTag: "",
  4962. startLocation: "",
  4963. startAddress: "",
  4964. endLocation: "",
  4965. endAddress: "",
  4966. serviceContent: "",
  4967. remark: "",
  4968. orderNo: "",
  4969. createTime: "",
  4970. progressLogs: []
  4971. },
  4972. serviceList: [],
  4973. showPetModal: false,
  4974. currentPetInfo: {},
  4975. showNavModal: false,
  4976. navTargetPointType: "",
  4977. showUploadModal: false,
  4978. modalMediaList: [],
  4979. modalRemark: "",
  4980. showSumModal: false,
  4981. sumContent: "",
  4982. sumDate: "",
  4983. sumSigner: "张*哥",
  4984. showPetRemarkInput: false,
  4985. petRemarkText: "",
  4986. showAnomalyModal: false,
  4987. anomalyList: [],
  4988. anomalyTypeDict: []
  4989. };
  4990. },
  4991. computed: {
  4992. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  4993. steps() {
  4994. if (this.clockInSteps.length > 0) {
  4995. return this.clockInSteps.map((s) => s.title);
  4996. }
  4997. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  4998. },
  4999. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5000. progressSteps() {
  5001. return ["已接单", ...this.steps, "订单完成"];
  5002. },
  5003. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5004. progressIndex() {
  5005. return this.currentStep + 1;
  5006. },
  5007. displayStatusText() {
  5008. if (this.currentStep >= this.steps.length)
  5009. return "已完成";
  5010. if (this.currentStep > 0) {
  5011. return this.orderType === 1 ? "配送中" : "服务中";
  5012. }
  5013. return this.orderType === 1 ? "待接送" : "待服务";
  5014. },
  5015. currentStatusText() {
  5016. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5017. },
  5018. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5019. currentTaskTitle() {
  5020. if (this.currentStep >= this.steps.length)
  5021. return "订单已完成";
  5022. if (this.currentClockIn) {
  5023. return this.currentClockIn.title;
  5024. }
  5025. return this.steps[this.currentStep] || "打卡";
  5026. },
  5027. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5028. currentTaskDesc() {
  5029. if (this.currentStep >= this.steps.length)
  5030. return "感谢您的服务,请注意休息";
  5031. if (this.currentClockIn && this.currentClockIn.remark) {
  5032. return this.currentClockIn.remark;
  5033. }
  5034. return "请按要求提交照片或视频及备注";
  5035. }
  5036. },
  5037. async onLoad(options) {
  5038. if (options.id) {
  5039. this.orderId = options.id;
  5040. }
  5041. this.pageLoading = true;
  5042. try {
  5043. await this.loadAnomalyTypeDict();
  5044. await this.loadServiceList();
  5045. await this.loadOrderDetail();
  5046. } finally {
  5047. this.pageLoading = false;
  5048. }
  5049. },
  5050. methods: {
  5051. async loadServiceList() {
  5052. try {
  5053. const res = await getServiceList();
  5054. this.serviceList = res.data || [];
  5055. } catch (err) {
  5056. formatAppLog("error", "at pages/orders/detail-logic.js:139", "获取服务类型失败:", err);
  5057. }
  5058. },
  5059. /**
  5060. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5061. */
  5062. async loadServiceDetail(serviceId) {
  5063. try {
  5064. const res = await getServiceDetail(serviceId);
  5065. const serviceInfo = res.data;
  5066. if (serviceInfo && serviceInfo.clockInRemark) {
  5067. try {
  5068. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5069. if (Array.isArray(parsed) && parsed.length > 0) {
  5070. this.clockInSteps = parsed;
  5071. formatAppLog("log", "at pages/orders/detail-logic.js:154", "解析打卡步骤:", this.clockInSteps);
  5072. }
  5073. } catch (parseErr) {
  5074. formatAppLog("error", "at pages/orders/detail-logic.js:157", "解析 clockInRemark 失败:", parseErr);
  5075. }
  5076. }
  5077. } catch (err) {
  5078. formatAppLog("error", "at pages/orders/detail-logic.js:161", "获取服务类型详情失败:", err);
  5079. }
  5080. },
  5081. async loadOrderDetail() {
  5082. if (!this.orderId) {
  5083. formatAppLog("log", "at pages/orders/detail-logic.js:166", "订单ID缺失");
  5084. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5085. return;
  5086. }
  5087. try {
  5088. formatAppLog("log", "at pages/orders/detail-logic.js:171", "请求订单详情,ID:", this.orderId);
  5089. const res = await getOrderInfo(this.orderId);
  5090. formatAppLog("log", "at pages/orders/detail-logic.js:173", "订单详情响应:", res);
  5091. const order = res.data;
  5092. if (!order) {
  5093. formatAppLog("log", "at pages/orders/detail-logic.js:176", "订单数据为空");
  5094. uni.showToast({ title: "订单不存在", icon: "none" });
  5095. return;
  5096. }
  5097. formatAppLog("log", "at pages/orders/detail-logic.js:180", "订单数据:", order);
  5098. this.serviceId = order.service;
  5099. this.petId = order.usrPet || null;
  5100. this.transformOrderData(order);
  5101. if (this.serviceId) {
  5102. await this.loadServiceDetail(this.serviceId);
  5103. }
  5104. if (this.petId) {
  5105. await this.loadPetDetail(this.petId);
  5106. }
  5107. await this.loadOrderLogs();
  5108. } catch (err) {
  5109. formatAppLog("error", "at pages/orders/detail-logic.js:198", "获取订单详情失败:", err);
  5110. uni.showToast({ title: "加载失败", icon: "none" });
  5111. }
  5112. },
  5113. async loadOrderLogs() {
  5114. try {
  5115. const res = await getOrderLogs(this.orderId);
  5116. const logs = res.data || [];
  5117. formatAppLog("log", "at pages/orders/detail-logic.js:206", "订单日志:", logs);
  5118. const progressLogs = logs.filter((log) => log.logType === 1);
  5119. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5120. status: log.title || "",
  5121. time: log.createTime || "",
  5122. medias: log.photoUrls || [],
  5123. remark: log.content || ""
  5124. }));
  5125. 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());
  5126. if (validLogs.length > 0) {
  5127. const latestLog = validLogs[0];
  5128. const latestStep = latestLog.step;
  5129. formatAppLog("log", "at pages/orders/detail-logic.js:225", "最新打卡日志 step:", latestStep);
  5130. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5131. if (stepIndex >= 0) {
  5132. this.currentStep = stepIndex + 1;
  5133. } else {
  5134. this.currentStep = latestStep;
  5135. }
  5136. } else {
  5137. this.currentStep = 0;
  5138. }
  5139. this.updateCurrentClockIn();
  5140. formatAppLog("log", "at pages/orders/detail-logic.js:241", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5141. } catch (err) {
  5142. formatAppLog("error", "at pages/orders/detail-logic.js:243", "获取订单日志失败:", err);
  5143. }
  5144. },
  5145. /**
  5146. * 根据 currentStep 更新当前打卡信息
  5147. */
  5148. updateCurrentClockIn() {
  5149. if (this.currentStep < this.clockInSteps.length) {
  5150. this.currentClockIn = this.clockInSteps[this.currentStep];
  5151. } else {
  5152. this.currentClockIn = null;
  5153. }
  5154. },
  5155. transformOrderData(order) {
  5156. const mode = order.mode || 0;
  5157. const isRoundTrip = mode === 1;
  5158. this.orderType = isRoundTrip ? 1 : 2;
  5159. this.orderStatus = order.status || 2;
  5160. this.orderDetail = {
  5161. type: this.orderType,
  5162. price: (order.price / 100).toFixed(2),
  5163. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5164. time: order.serviceTime || "",
  5165. petAvatar: "/static/dog.png",
  5166. petName: order.petName || order.contact || "",
  5167. petBreed: order.breed || "",
  5168. serviceTag: order.groupPurchasePackageName || "",
  5169. startLocation: order.fromAddress || "",
  5170. startAddress: order.fromAddress || "",
  5171. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5172. endAddress: order.toAddress || "",
  5173. serviceContent: "",
  5174. remark: "",
  5175. orderNo: order.code || "T" + order.id,
  5176. createTime: order.serviceTime || "",
  5177. progressLogs: [
  5178. { status: "您已接单", time: order.serviceTime || "" }
  5179. ]
  5180. };
  5181. },
  5182. /**
  5183. * 根据宠物ID获取宠物档案详情
  5184. */
  5185. async loadPetDetail(petId) {
  5186. try {
  5187. const res = await getPetDetail(petId);
  5188. const pet = res.data;
  5189. if (pet) {
  5190. this.petDetail = pet;
  5191. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5192. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5193. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5194. formatAppLog("log", "at pages/orders/detail-logic.js:298", "宠物档案:", pet);
  5195. }
  5196. } catch (err) {
  5197. formatAppLog("error", "at pages/orders/detail-logic.js:301", "获取宠物档案失败:", err);
  5198. }
  5199. },
  5200. /**
  5201. * 加载异常记录列表
  5202. */
  5203. async loadAnomalyList() {
  5204. if (!this.orderId)
  5205. return;
  5206. try {
  5207. const res = await getAnomalyList(this.orderId);
  5208. const list = res.data || [];
  5209. this.anomalyList = list.map((item) => {
  5210. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5211. return {
  5212. ...item,
  5213. typeLabel: dict ? dict.label : item.type,
  5214. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5215. photoUrls: item.photoUrls || []
  5216. };
  5217. });
  5218. } catch (err) {
  5219. formatAppLog("error", "at pages/orders/detail-logic.js:324", "获取异常列表失败:", err);
  5220. }
  5221. },
  5222. async loadAnomalyTypeDict() {
  5223. try {
  5224. const res = await getDictDataByType("flf_anamaly_type");
  5225. this.anomalyTypeDict = res.data.map((item) => ({
  5226. label: item.dictLabel,
  5227. value: item.dictValue
  5228. }));
  5229. } catch (err) {
  5230. formatAppLog("error", "at pages/orders/detail-logic.js:335", "获取异常字典失败:", err);
  5231. }
  5232. },
  5233. openAnomalyModal() {
  5234. this.showAnomalyModal = true;
  5235. this.loadAnomalyList();
  5236. },
  5237. closeAnomalyModal() {
  5238. this.showAnomalyModal = false;
  5239. },
  5240. getAnomalyStatusLabel(status) {
  5241. const map = {
  5242. 0: "待审核",
  5243. 1: "已通过",
  5244. 2: "已驳回"
  5245. };
  5246. return map[status] || "未知";
  5247. },
  5248. updateStepByStatus() {
  5249. if (this.orderStatus === 2) {
  5250. this.currentStep = 0;
  5251. } else if (this.orderStatus === 3) {
  5252. this.currentStep = 1;
  5253. } else if (this.orderStatus === 5) {
  5254. this.currentStep = this.steps.length - 1;
  5255. } else {
  5256. this.currentStep = 0;
  5257. }
  5258. },
  5259. showPetProfile() {
  5260. const pet = this.petDetail;
  5261. if (pet) {
  5262. this.currentPetInfo = {
  5263. petAvatar: pet.avatarUrl || "/static/dog.png",
  5264. petName: pet.name || "",
  5265. petBreed: pet.breed || "",
  5266. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5267. petAge: pet.age ? pet.age + "岁" : "未知",
  5268. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5269. petPersonality: pet.personality || pet.cutePersonality || "无",
  5270. petHobby: "",
  5271. petRemark: pet.remark || "无",
  5272. petTags: (pet.tags || []).map((t) => t.name),
  5273. petLogs: [],
  5274. // 额外信息
  5275. petSize: pet.size || "",
  5276. petIsSterilized: pet.isSterilized,
  5277. petHealthStatus: pet.healthStatus || "",
  5278. petAllergies: pet.allergies || "",
  5279. petMedicalHistory: pet.medicalHistory || "",
  5280. petVaccineStatus: pet.vaccineStatus || "",
  5281. ownerName: pet.ownerName || "",
  5282. ownerPhone: pet.ownerPhone || ""
  5283. };
  5284. } else {
  5285. this.currentPetInfo = {
  5286. ...this.orderDetail,
  5287. petGender: "",
  5288. petAge: "未知",
  5289. petWeight: "未知",
  5290. petPersonality: "无",
  5291. petHobby: "",
  5292. petRemark: "无",
  5293. petTags: [],
  5294. petLogs: []
  5295. };
  5296. }
  5297. this.showPetModal = true;
  5298. },
  5299. closePetProfile() {
  5300. this.showPetModal = false;
  5301. },
  5302. openPetRemarkInput() {
  5303. this.petRemarkText = "";
  5304. this.showPetRemarkInput = true;
  5305. },
  5306. closePetRemarkInput() {
  5307. this.showPetRemarkInput = false;
  5308. },
  5309. submitPetRemark() {
  5310. if (!this.petRemarkText.trim()) {
  5311. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5312. return;
  5313. }
  5314. const now = /* @__PURE__ */ new Date();
  5315. const date = `${now.getFullYear()}/${String(now.getMonth() + 1).padStart(2, "0")}/${String(now.getDate()).padStart(2, "0")}`;
  5316. if (!this.currentPetInfo.petLogs) {
  5317. this.currentPetInfo.petLogs = [];
  5318. }
  5319. this.currentPetInfo.petLogs.unshift({
  5320. date,
  5321. content: this.petRemarkText,
  5322. recorder: "张*哥"
  5323. });
  5324. this.closePetRemarkInput();
  5325. uni.showToast({ title: "备注已添加", icon: "success" });
  5326. },
  5327. goToAnomaly() {
  5328. uni.navigateTo({
  5329. url: "/pages/orders/anomaly?orderId=" + (this.orderDetail.orderNo || "")
  5330. });
  5331. },
  5332. callPhone() {
  5333. uni.makePhoneCall({ phoneNumber: "18900008451" });
  5334. },
  5335. openNavigation(type) {
  5336. this.navTargetPointType = type;
  5337. this.showNavModal = true;
  5338. },
  5339. closeNavModal() {
  5340. this.showNavModal = false;
  5341. },
  5342. chooseMap(mapType) {
  5343. let pointType = this.navTargetPointType;
  5344. let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
  5345. let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
  5346. this.showNavModal = false;
  5347. uni.openLocation({
  5348. latitude: 30.52,
  5349. // Mock lat
  5350. longitude: 114.31,
  5351. // Mock lng
  5352. name: name || "目的地",
  5353. address: address || "默认地址",
  5354. success: function() {
  5355. formatAppLog("log", "at pages/orders/detail-logic.js:462", "打开导航成功: " + mapType);
  5356. }
  5357. });
  5358. },
  5359. openUploadModal() {
  5360. this.modalMediaList = [];
  5361. this.modalRemark = "";
  5362. this.showUploadModal = true;
  5363. },
  5364. closeUploadModal() {
  5365. this.showUploadModal = false;
  5366. },
  5367. handleConfirmUpload() {
  5368. formatAppLog("log", "at pages/orders/detail-logic.js:475", "handleConfirmUpload被调用");
  5369. this.confirmUploadModal();
  5370. },
  5371. async chooseModalMedia() {
  5372. formatAppLog("log", "at pages/orders/detail-logic.js:479", "chooseModalMedia被调用");
  5373. uni.chooseImage({
  5374. count: 5 - this.modalMediaList.length,
  5375. success: async (res) => {
  5376. formatAppLog("log", "at pages/orders/detail-logic.js:483", "选择图片成功,文件路径:", res.tempFilePaths);
  5377. uni.showLoading({ title: "上传中..." });
  5378. try {
  5379. for (const filePath of res.tempFilePaths) {
  5380. formatAppLog("log", "at pages/orders/detail-logic.js:487", "上传文件:", filePath);
  5381. const uploadRes = await uploadFile(filePath);
  5382. formatAppLog("log", "at pages/orders/detail-logic.js:489", "上传响应:", uploadRes);
  5383. if (uploadRes.code === 200) {
  5384. this.modalMediaList.push({
  5385. url: uploadRes.data.url,
  5386. ossId: uploadRes.data.ossId,
  5387. localPath: filePath
  5388. });
  5389. formatAppLog("log", "at pages/orders/detail-logic.js:496", "上传成功,url:", uploadRes.data.url);
  5390. }
  5391. }
  5392. uni.hideLoading();
  5393. formatAppLog("log", "at pages/orders/detail-logic.js:500", "当前modalMediaList:", this.modalMediaList);
  5394. uni.showToast({ title: "上传成功", icon: "success" });
  5395. } catch (err) {
  5396. uni.hideLoading();
  5397. formatAppLog("error", "at pages/orders/detail-logic.js:504", "上传失败:", err);
  5398. uni.showToast({ title: "上传失败", icon: "none" });
  5399. }
  5400. },
  5401. fail: (err) => {
  5402. formatAppLog("error", "at pages/orders/detail-logic.js:509", "选择图片失败:", err);
  5403. }
  5404. });
  5405. },
  5406. removeModalMedia(index) {
  5407. this.modalMediaList.splice(index, 1);
  5408. },
  5409. getCurrentTime() {
  5410. const now = /* @__PURE__ */ new Date();
  5411. const y = now.getFullYear();
  5412. const m = String(now.getMonth() + 1).padStart(2, "0");
  5413. const d = String(now.getDate()).padStart(2, "0");
  5414. const h = String(now.getHours()).padStart(2, "0");
  5415. const min = String(now.getMinutes()).padStart(2, "0");
  5416. return `${y}/${m}/${d} ${h}:${min}`;
  5417. },
  5418. async confirmUploadModal() {
  5419. formatAppLog("log", "at pages/orders/detail-logic.js:526", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5420. if (this.modalMediaList.length === 0) {
  5421. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5422. return;
  5423. }
  5424. try {
  5425. uni.showLoading({ title: "提交中..." });
  5426. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5427. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5428. formatAppLog("log", "at pages/orders/detail-logic.js:537", "准备打卡,ossIds:", ossIds);
  5429. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5430. const clockInData = {
  5431. orderId: this.orderId,
  5432. photos: ossIds,
  5433. content: this.modalRemark || "",
  5434. type: clockInType,
  5435. title: this.currentTaskTitle
  5436. };
  5437. formatAppLog("log", "at pages/orders/detail-logic.js:550", "打卡数据:", clockInData);
  5438. await clockIn(clockInData);
  5439. uni.hideLoading();
  5440. this.closeUploadModal();
  5441. uni.showToast({ title: "打卡成功", icon: "success" });
  5442. await this.loadOrderDetail();
  5443. } catch (err) {
  5444. uni.hideLoading();
  5445. formatAppLog("error", "at pages/orders/detail-logic.js:560", "打卡失败:", err);
  5446. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5447. }
  5448. },
  5449. copyOrderNo() {
  5450. uni.setClipboardData({
  5451. data: this.orderDetail.orderNo,
  5452. success: () => {
  5453. uni.showToast({ title: "复制成功", icon: "none" });
  5454. }
  5455. });
  5456. },
  5457. openSumModal() {
  5458. const now = /* @__PURE__ */ new Date();
  5459. const y = now.getFullYear();
  5460. const m = String(now.getMonth() + 1).padStart(2, "0");
  5461. const d = String(now.getDate()).padStart(2, "0");
  5462. this.sumDate = `${y}/${m}/${d}`;
  5463. if (!this.sumContent) {
  5464. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5465. }
  5466. this.showSumModal = true;
  5467. },
  5468. closeSumModal() {
  5469. this.showSumModal = false;
  5470. },
  5471. submitSumModal() {
  5472. if (!this.sumContent.trim()) {
  5473. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5474. return;
  5475. }
  5476. this.closeSumModal();
  5477. uni.showToast({ title: "小结已提交", icon: "success" });
  5478. }
  5479. }
  5480. };
  5481. const _imports_14 = "/static/icons/phone_orange.svg";
  5482. const _imports_1$7 = "/static/icons/clock.svg";
  5483. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5484. const _imports_4$1 = "/static/icons/heart.svg";
  5485. const _imports_5 = "/static/icons/file.svg";
  5486. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5487. const _imports_7 = "/static/icons/order_no.svg";
  5488. const _sfc_main$q = {
  5489. ...logic$1
  5490. };
  5491. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  5492. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5493. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5494. key: 0,
  5495. class: "loading-container"
  5496. }, [
  5497. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5498. vue.createElementVNode("view", {
  5499. class: "skeleton-line skeleton-ani",
  5500. style: { "width": "30%", "height": "36rpx" }
  5501. }),
  5502. vue.createElementVNode("view", {
  5503. class: "skeleton-line skeleton-ani",
  5504. style: { "width": "20%", "height": "36rpx" }
  5505. })
  5506. ]),
  5507. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5508. (vue.openBlock(), vue.createElementBlock(
  5509. vue.Fragment,
  5510. null,
  5511. vue.renderList(4, (i) => {
  5512. return vue.createElementVNode("view", {
  5513. class: "skeleton-circle skeleton-ani",
  5514. key: i
  5515. });
  5516. }),
  5517. 64
  5518. /* STABLE_FRAGMENT */
  5519. ))
  5520. ]),
  5521. (vue.openBlock(), vue.createElementBlock(
  5522. vue.Fragment,
  5523. null,
  5524. vue.renderList(3, (j) => {
  5525. return vue.createElementVNode("view", {
  5526. class: "skeleton-card",
  5527. key: "c" + j
  5528. }, [
  5529. vue.createElementVNode("view", {
  5530. class: "skeleton-line skeleton-ani",
  5531. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  5532. }),
  5533. vue.createElementVNode("view", {
  5534. class: "skeleton-line skeleton-ani",
  5535. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  5536. }),
  5537. vue.createElementVNode("view", {
  5538. class: "skeleton-line skeleton-ani",
  5539. style: { "width": "75%", "height": "24rpx" }
  5540. })
  5541. ]);
  5542. }),
  5543. 64
  5544. /* STABLE_FRAGMENT */
  5545. ))
  5546. ])) : (vue.openBlock(), vue.createElementBlock(
  5547. vue.Fragment,
  5548. { key: 1 },
  5549. [
  5550. vue.createElementVNode("view", { class: "detail-header" }, [
  5551. vue.createElementVNode("view", { class: "status-row" }, [
  5552. vue.createElementVNode(
  5553. "text",
  5554. { class: "status-title" },
  5555. vue.toDisplayString(_ctx.displayStatusText),
  5556. 1
  5557. /* TEXT */
  5558. ),
  5559. vue.createElementVNode(
  5560. "text",
  5561. { class: "status-price" },
  5562. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  5563. 1
  5564. /* TEXT */
  5565. )
  5566. ]),
  5567. vue.createElementVNode("view", { class: "progress-bar" }, [
  5568. (vue.openBlock(true), vue.createElementBlock(
  5569. vue.Fragment,
  5570. null,
  5571. vue.renderList(_ctx.progressSteps, (step, index) => {
  5572. return vue.openBlock(), vue.createElementBlock(
  5573. "view",
  5574. {
  5575. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  5576. key: index
  5577. },
  5578. [
  5579. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  5580. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  5581. "view",
  5582. {
  5583. key: 0,
  5584. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  5585. },
  5586. null,
  5587. 2
  5588. /* CLASS */
  5589. )) : vue.createCommentVNode("v-if", true),
  5590. vue.createElementVNode(
  5591. "view",
  5592. { class: "step-circle" },
  5593. vue.toDisplayString(index + 1),
  5594. 1
  5595. /* TEXT */
  5596. )
  5597. ]),
  5598. vue.createElementVNode(
  5599. "text",
  5600. { class: "step-text" },
  5601. vue.toDisplayString(step),
  5602. 1
  5603. /* TEXT */
  5604. )
  5605. ],
  5606. 2
  5607. /* CLASS */
  5608. );
  5609. }),
  5610. 128
  5611. /* KEYED_FRAGMENT */
  5612. ))
  5613. ])
  5614. ]),
  5615. vue.createElementVNode("scroll-view", {
  5616. "scroll-y": "",
  5617. class: "detail-content"
  5618. }, [
  5619. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  5620. vue.createElementVNode("image", {
  5621. class: "pb-avatar",
  5622. src: _ctx.orderDetail.petAvatar,
  5623. mode: "aspectFill"
  5624. }, null, 8, ["src"]),
  5625. vue.createElementVNode("view", { class: "pb-info" }, [
  5626. vue.createElementVNode("view", { class: "pb-name-row" }, [
  5627. vue.createElementVNode(
  5628. "text",
  5629. { class: "pb-name" },
  5630. vue.toDisplayString(_ctx.orderDetail.petName),
  5631. 1
  5632. /* TEXT */
  5633. ),
  5634. vue.createElementVNode(
  5635. "text",
  5636. { class: "pb-breed" },
  5637. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed),
  5638. 1
  5639. /* TEXT */
  5640. )
  5641. ]),
  5642. vue.createElementVNode("view", { class: "pb-tags" }, [
  5643. vue.createElementVNode(
  5644. "text",
  5645. { class: "pb-tag" },
  5646. vue.toDisplayString(_ctx.orderDetail.serviceTag),
  5647. 1
  5648. /* TEXT */
  5649. )
  5650. ])
  5651. ]),
  5652. vue.createElementVNode("view", { class: "pb-actions" }, [
  5653. vue.createElementVNode("view", {
  5654. class: "pb-btn profile-btn",
  5655. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  5656. }, "宠物档案"),
  5657. vue.createElementVNode("view", {
  5658. class: "pb-btn phone-btn",
  5659. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  5660. }, [
  5661. vue.createElementVNode("image", {
  5662. class: "phone-icon",
  5663. src: _imports_14
  5664. })
  5665. ])
  5666. ])
  5667. ]),
  5668. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  5669. vue.createElementVNode("view", { class: "si-row time-row" }, [
  5670. vue.createElementVNode("image", {
  5671. class: "si-icon outline",
  5672. src: _imports_1$7
  5673. }),
  5674. vue.createElementVNode("view", { class: "si-content" }, [
  5675. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  5676. vue.createElementVNode(
  5677. "text",
  5678. { class: "si-val" },
  5679. vue.toDisplayString(_ctx.orderDetail.time),
  5680. 1
  5681. /* TEXT */
  5682. )
  5683. ]),
  5684. vue.createElementVNode("view", {
  5685. class: "si-action record-btn",
  5686. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  5687. }, [
  5688. vue.createElementVNode("text", null, "异常记录"),
  5689. vue.createElementVNode("image", {
  5690. class: "record-arrow",
  5691. src: _imports_0$2
  5692. })
  5693. ])
  5694. ]),
  5695. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  5696. vue.Fragment,
  5697. { key: 0 },
  5698. [
  5699. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  5700. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  5701. vue.createElementVNode("view", { class: "route-line-vertical" }),
  5702. vue.createElementVNode("view", { class: "si-content" }, [
  5703. vue.createElementVNode(
  5704. "text",
  5705. { class: "si-addr-title" },
  5706. vue.toDisplayString(_ctx.orderDetail.startLocation),
  5707. 1
  5708. /* TEXT */
  5709. ),
  5710. vue.createElementVNode(
  5711. "text",
  5712. { class: "si-addr-desc" },
  5713. vue.toDisplayString(_ctx.orderDetail.startAddress),
  5714. 1
  5715. /* TEXT */
  5716. )
  5717. ]),
  5718. vue.createElementVNode("view", {
  5719. class: "nav-btn-circle",
  5720. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  5721. }, [
  5722. vue.createElementVNode("image", {
  5723. class: "nav-arrow",
  5724. src: _imports_3$2
  5725. })
  5726. ])
  5727. ]),
  5728. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5729. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  5730. vue.createElementVNode("view", { class: "si-content" }, [
  5731. vue.createElementVNode(
  5732. "text",
  5733. { class: "si-addr-title" },
  5734. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5735. 1
  5736. /* TEXT */
  5737. ),
  5738. vue.createElementVNode(
  5739. "text",
  5740. { class: "si-addr-desc" },
  5741. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5742. 1
  5743. /* TEXT */
  5744. )
  5745. ]),
  5746. vue.createElementVNode("view", {
  5747. class: "nav-btn-circle",
  5748. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  5749. }, [
  5750. vue.createElementVNode("image", {
  5751. class: "nav-arrow",
  5752. src: _imports_3$2
  5753. })
  5754. ])
  5755. ])
  5756. ],
  5757. 64
  5758. /* STABLE_FRAGMENT */
  5759. )) : (vue.openBlock(), vue.createElementBlock(
  5760. vue.Fragment,
  5761. { key: 1 },
  5762. [
  5763. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  5764. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  5765. vue.createElementVNode("view", { class: "si-content" }, [
  5766. vue.createElementVNode(
  5767. "text",
  5768. { class: "si-addr-title" },
  5769. vue.toDisplayString(_ctx.orderDetail.endLocation),
  5770. 1
  5771. /* TEXT */
  5772. ),
  5773. vue.createElementVNode(
  5774. "text",
  5775. { class: "si-addr-desc" },
  5776. vue.toDisplayString(_ctx.orderDetail.endAddress),
  5777. 1
  5778. /* TEXT */
  5779. )
  5780. ]),
  5781. vue.createElementVNode("view", {
  5782. class: "nav-btn-circle",
  5783. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  5784. }, [
  5785. vue.createElementVNode("image", {
  5786. class: "nav-arrow",
  5787. src: _imports_3$2
  5788. })
  5789. ])
  5790. ]),
  5791. vue.createElementVNode("view", { class: "si-row" }, [
  5792. vue.createElementVNode("image", {
  5793. class: "si-icon outline",
  5794. src: _imports_4$1
  5795. }),
  5796. vue.createElementVNode("view", { class: "si-content" }, [
  5797. vue.createElementVNode("text", { class: "si-label" }, "服务内容"),
  5798. vue.createElementVNode(
  5799. "text",
  5800. { class: "si-val" },
  5801. vue.toDisplayString(_ctx.orderDetail.serviceContent),
  5802. 1
  5803. /* TEXT */
  5804. )
  5805. ])
  5806. ])
  5807. ],
  5808. 64
  5809. /* STABLE_FRAGMENT */
  5810. )),
  5811. vue.createElementVNode("view", { class: "si-row" }, [
  5812. vue.createElementVNode("image", {
  5813. class: "si-icon outline custom-icon-file",
  5814. src: _imports_5
  5815. }),
  5816. vue.createElementVNode("view", { class: "si-content" }, [
  5817. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  5818. vue.createElementVNode(
  5819. "text",
  5820. { class: "si-val" },
  5821. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  5822. 1
  5823. /* TEXT */
  5824. )
  5825. ])
  5826. ]),
  5827. vue.createElementVNode("view", {
  5828. class: "si-row record-history-row",
  5829. onClick: _cache[6] || (_cache[6] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  5830. }, [
  5831. vue.createElementVNode("view", { class: "si-content" }, [
  5832. vue.createElementVNode("text", { class: "si-label" }, "异常记录"),
  5833. vue.createElementVNode("text", { class: "si-val" }, "查看历史异常记录")
  5834. ]),
  5835. vue.createElementVNode("image", {
  5836. class: "record-arrow",
  5837. src: _imports_0$2
  5838. })
  5839. ])
  5840. ]),
  5841. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  5842. key: 0,
  5843. class: "white-card task-card"
  5844. }, [
  5845. vue.createElementVNode(
  5846. "text",
  5847. { class: "tc-title" },
  5848. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  5849. 1
  5850. /* TEXT */
  5851. ),
  5852. vue.createElementVNode(
  5853. "text",
  5854. { class: "tc-desc" },
  5855. vue.toDisplayString(_ctx.currentTaskDesc),
  5856. 1
  5857. /* TEXT */
  5858. ),
  5859. vue.createElementVNode("view", {
  5860. class: "full-media-add",
  5861. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  5862. }, [
  5863. vue.createElementVNode("image", {
  5864. class: "upload-icon-large",
  5865. src: _imports_1$6
  5866. }),
  5867. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  5868. ])
  5869. ])) : vue.createCommentVNode("v-if", true),
  5870. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  5871. vue.createElementVNode("view", { class: "bi-row" }, [
  5872. vue.createElementVNode("image", {
  5873. class: "si-icon outline",
  5874. src: _imports_7
  5875. }),
  5876. vue.createElementVNode("view", { class: "bi-content" }, [
  5877. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  5878. vue.createElementVNode("view", { class: "bi-val-row" }, [
  5879. vue.createElementVNode(
  5880. "text",
  5881. { class: "bi-val" },
  5882. vue.toDisplayString(_ctx.orderDetail.orderNo),
  5883. 1
  5884. /* TEXT */
  5885. ),
  5886. vue.createElementVNode("text", {
  5887. class: "bi-copy",
  5888. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  5889. }, "复制")
  5890. ])
  5891. ])
  5892. ]),
  5893. vue.createElementVNode("view", { class: "bi-row" }, [
  5894. vue.createElementVNode("image", {
  5895. class: "si-icon outline",
  5896. src: _imports_1$7
  5897. }),
  5898. vue.createElementVNode("view", { class: "bi-content" }, [
  5899. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  5900. vue.createElementVNode(
  5901. "text",
  5902. { class: "bi-val" },
  5903. vue.toDisplayString(_ctx.orderDetail.createTime),
  5904. 1
  5905. /* TEXT */
  5906. )
  5907. ])
  5908. ])
  5909. ]),
  5910. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  5911. vue.createElementVNode("view", { class: "tl-title-row" }, [
  5912. vue.createElementVNode("view", { class: "orange-bar" }),
  5913. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  5914. ]),
  5915. vue.createElementVNode("view", { class: "tl-list" }, [
  5916. (vue.openBlock(true), vue.createElementBlock(
  5917. vue.Fragment,
  5918. null,
  5919. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  5920. return vue.openBlock(), vue.createElementBlock("view", {
  5921. class: "tl-item",
  5922. key: idx
  5923. }, [
  5924. vue.createElementVNode("view", { class: "tl-marker active" }, [
  5925. vue.createElementVNode("view", { class: "tl-dot-inner" })
  5926. ]),
  5927. vue.createElementVNode("view", { class: "tl-content-row" }, [
  5928. vue.createElementVNode("view", { class: "tl-header" }, [
  5929. vue.createElementVNode(
  5930. "text",
  5931. { class: "tl-status" },
  5932. vue.toDisplayString(log.status),
  5933. 1
  5934. /* TEXT */
  5935. ),
  5936. vue.createElementVNode(
  5937. "text",
  5938. { class: "tl-time" },
  5939. vue.toDisplayString(log.time),
  5940. 1
  5941. /* TEXT */
  5942. )
  5943. ]),
  5944. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  5945. key: 0,
  5946. class: "tl-medias"
  5947. }, [
  5948. (vue.openBlock(true), vue.createElementBlock(
  5949. vue.Fragment,
  5950. null,
  5951. vue.renderList(log.medias, (img, midx) => {
  5952. return vue.openBlock(), vue.createElementBlock("image", {
  5953. class: "tl-img",
  5954. key: midx,
  5955. src: img,
  5956. mode: "aspectFill"
  5957. }, null, 8, ["src"]);
  5958. }),
  5959. 128
  5960. /* KEYED_FRAGMENT */
  5961. ))
  5962. ])) : vue.createCommentVNode("v-if", true),
  5963. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  5964. key: 1,
  5965. class: "tl-remark"
  5966. }, [
  5967. vue.createElementVNode(
  5968. "text",
  5969. null,
  5970. vue.toDisplayString(log.remark),
  5971. 1
  5972. /* TEXT */
  5973. )
  5974. ])) : vue.createCommentVNode("v-if", true)
  5975. ])
  5976. ]);
  5977. }),
  5978. 128
  5979. /* KEYED_FRAGMENT */
  5980. ))
  5981. ])
  5982. ]),
  5983. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  5984. ]),
  5985. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  5986. vue.createElementVNode("view", { class: "action-left" }, [
  5987. vue.createElementVNode("button", {
  5988. class: "action-btn outline grey-outline",
  5989. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  5990. }, "异常上报"),
  5991. vue.createElementVNode("button", {
  5992. class: "action-btn outline orange-outline",
  5993. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  5994. }, "宠护小结")
  5995. ]),
  5996. vue.createElementVNode("view", { class: "action-right" }, [
  5997. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  5998. "button",
  5999. {
  6000. key: 0,
  6001. class: "action-btn primary",
  6002. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6003. },
  6004. vue.toDisplayString(_ctx.currentTaskTitle),
  6005. 1
  6006. /* TEXT */
  6007. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6008. key: 1,
  6009. class: "action-btn primary grey-bg"
  6010. }, "已完成"))
  6011. ])
  6012. ]),
  6013. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6014. key: 0,
  6015. class: "pet-modal-mask",
  6016. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6017. }, [
  6018. vue.createElementVNode("view", {
  6019. class: "pet-modal-content",
  6020. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  6021. }, ["stop"]))
  6022. }, [
  6023. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6024. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6025. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6026. vue.createElementVNode("view", {
  6027. class: "pm-remark-btn",
  6028. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6029. }, "备注"),
  6030. vue.createElementVNode("view", {
  6031. class: "close-icon-btn",
  6032. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6033. }, "×")
  6034. ]),
  6035. vue.createElementVNode("scroll-view", {
  6036. "scroll-y": "",
  6037. class: "pet-modal-scroll"
  6038. }, [
  6039. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6040. vue.createElementVNode("image", {
  6041. class: "pm-avatar",
  6042. src: _ctx.currentPetInfo.petAvatar,
  6043. mode: "aspectFill"
  6044. }, null, 8, ["src"]),
  6045. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6046. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6047. vue.createElementVNode(
  6048. "text",
  6049. { class: "pm-name" },
  6050. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6051. 1
  6052. /* TEXT */
  6053. ),
  6054. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6055. key: 0,
  6056. class: "pm-gender"
  6057. }, [
  6058. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6059. vue.createElementVNode("text", null, "公")
  6060. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6061. key: 1,
  6062. class: "pm-gender female"
  6063. }, [
  6064. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6065. vue.createElementVNode("text", null, "母")
  6066. ])) : vue.createCommentVNode("v-if", true)
  6067. ]),
  6068. vue.createElementVNode(
  6069. "text",
  6070. { class: "pm-breed" },
  6071. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6072. 1
  6073. /* TEXT */
  6074. )
  6075. ])
  6076. ]),
  6077. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6078. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6079. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6080. vue.createElementVNode(
  6081. "text",
  6082. { class: "pm-val" },
  6083. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6084. 1
  6085. /* TEXT */
  6086. )
  6087. ]),
  6088. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6089. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6090. vue.createElementVNode(
  6091. "text",
  6092. { class: "pm-val" },
  6093. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6094. 1
  6095. /* TEXT */
  6096. )
  6097. ]),
  6098. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6099. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6100. vue.createElementVNode(
  6101. "text",
  6102. { class: "pm-val" },
  6103. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6104. 1
  6105. /* TEXT */
  6106. )
  6107. ]),
  6108. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6109. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6110. vue.createElementVNode(
  6111. "text",
  6112. { class: "pm-val" },
  6113. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6114. 1
  6115. /* TEXT */
  6116. )
  6117. ]),
  6118. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6119. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6120. vue.createElementVNode(
  6121. "text",
  6122. { class: "pm-val" },
  6123. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6124. 1
  6125. /* TEXT */
  6126. )
  6127. ])
  6128. ]),
  6129. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6130. key: 0,
  6131. class: "pm-tags-row"
  6132. }, [
  6133. (vue.openBlock(true), vue.createElementBlock(
  6134. vue.Fragment,
  6135. null,
  6136. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6137. return vue.openBlock(), vue.createElementBlock("view", {
  6138. class: "pm-tag-chip",
  6139. key: ti
  6140. }, [
  6141. vue.createElementVNode(
  6142. "text",
  6143. { class: "pm-tag-chip-text" },
  6144. vue.toDisplayString(tag),
  6145. 1
  6146. /* TEXT */
  6147. )
  6148. ]);
  6149. }),
  6150. 128
  6151. /* KEYED_FRAGMENT */
  6152. ))
  6153. ])) : vue.createCommentVNode("v-if", true),
  6154. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6155. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6156. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6157. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6158. ]),
  6159. (vue.openBlock(true), vue.createElementBlock(
  6160. vue.Fragment,
  6161. null,
  6162. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6163. return vue.openBlock(), vue.createElementBlock("view", {
  6164. class: "pm-log-item",
  6165. key: lIndex
  6166. }, [
  6167. vue.createElementVNode(
  6168. "text",
  6169. { class: "pm-log-date" },
  6170. vue.toDisplayString(log.date),
  6171. 1
  6172. /* TEXT */
  6173. ),
  6174. vue.createElementVNode(
  6175. "text",
  6176. { class: "pm-log-text" },
  6177. vue.toDisplayString(log.content),
  6178. 1
  6179. /* TEXT */
  6180. ),
  6181. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6182. "text",
  6183. {
  6184. key: 0,
  6185. class: "pm-log-recorder"
  6186. },
  6187. "记录人:" + vue.toDisplayString(log.recorder),
  6188. 1
  6189. /* TEXT */
  6190. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6191. key: 1,
  6192. class: "pm-log-recorder system"
  6193. }, "系统记录"))
  6194. ]);
  6195. }),
  6196. 128
  6197. /* KEYED_FRAGMENT */
  6198. ))
  6199. ]),
  6200. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6201. ])
  6202. ])
  6203. ])) : vue.createCommentVNode("v-if", true),
  6204. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6205. key: 1,
  6206. class: "upload-modal-mask",
  6207. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6208. }, [
  6209. vue.createElementVNode("view", {
  6210. class: "upload-modal-content",
  6211. onClick: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  6212. }, ["stop"]))
  6213. }, [
  6214. vue.createElementVNode("view", { class: "um-header" }, [
  6215. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6216. ]),
  6217. vue.createElementVNode("view", { class: "um-body" }, [
  6218. vue.withDirectives(vue.createElementVNode(
  6219. "textarea",
  6220. {
  6221. class: "um-textarea",
  6222. "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => _ctx.petRemarkText = $event),
  6223. "auto-height": "",
  6224. placeholder: "请输入宠物备注内容...",
  6225. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6226. },
  6227. null,
  6228. 512
  6229. /* NEED_PATCH */
  6230. ), [
  6231. [vue.vModelText, _ctx.petRemarkText]
  6232. ])
  6233. ]),
  6234. vue.createElementVNode("view", { class: "um-footer" }, [
  6235. vue.createElementVNode("button", {
  6236. class: "um-submit-btn active",
  6237. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6238. }, "确认提交")
  6239. ])
  6240. ])
  6241. ])) : vue.createCommentVNode("v-if", true),
  6242. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6243. key: 2,
  6244. class: "nav-modal-mask",
  6245. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6246. }, [
  6247. vue.createElementVNode("view", {
  6248. class: "nav-action-sheet",
  6249. onClick: _cache[24] || (_cache[24] = vue.withModifiers(() => {
  6250. }, ["stop"]))
  6251. }, [
  6252. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6253. vue.createElementVNode("view", {
  6254. class: "nav-sheet-item",
  6255. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("高德"))
  6256. }, "高德地图"),
  6257. vue.createElementVNode("view", {
  6258. class: "nav-sheet-item",
  6259. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("腾讯"))
  6260. }, "腾讯地图"),
  6261. vue.createElementVNode("view", {
  6262. class: "nav-sheet-item",
  6263. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("百度"))
  6264. }, "百度地图"),
  6265. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6266. vue.createElementVNode("view", {
  6267. class: "nav-sheet-item cancel",
  6268. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6269. }, "取消")
  6270. ])
  6271. ])) : vue.createCommentVNode("v-if", true),
  6272. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6273. key: 3,
  6274. class: "upload-modal-mask",
  6275. onClick: _cache[30] || (_cache[30] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6276. }, [
  6277. vue.createElementVNode("view", {
  6278. class: "upload-modal-content",
  6279. onClick: _cache[29] || (_cache[29] = vue.withModifiers(() => {
  6280. }, ["stop"]))
  6281. }, [
  6282. vue.createElementVNode("view", { class: "um-header" }, [
  6283. vue.createElementVNode(
  6284. "text",
  6285. { class: "um-title" },
  6286. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6287. 1
  6288. /* TEXT */
  6289. ),
  6290. _ctx.currentClockIn && _ctx.currentClockIn.remark ? (vue.openBlock(), vue.createElementBlock(
  6291. "text",
  6292. {
  6293. key: 0,
  6294. class: "um-remark-hint"
  6295. },
  6296. "要求:" + vue.toDisplayString(_ctx.currentClockIn.remark),
  6297. 1
  6298. /* TEXT */
  6299. )) : vue.createCommentVNode("v-if", true)
  6300. ]),
  6301. vue.createElementVNode("view", { class: "um-body" }, [
  6302. vue.createElementVNode("view", { class: "um-grid" }, [
  6303. (vue.openBlock(true), vue.createElementBlock(
  6304. vue.Fragment,
  6305. null,
  6306. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6307. return vue.openBlock(), vue.createElementBlock("view", {
  6308. class: "um-item",
  6309. key: idx
  6310. }, [
  6311. vue.createElementVNode("image", {
  6312. class: "um-preview",
  6313. src: img.url || img.localPath || img,
  6314. mode: "aspectFill"
  6315. }, null, 8, ["src"]),
  6316. vue.createElementVNode("view", {
  6317. class: "um-del",
  6318. onClick: ($event) => _ctx.removeModalMedia(idx)
  6319. }, "×", 8, ["onClick"])
  6320. ]);
  6321. }),
  6322. 128
  6323. /* KEYED_FRAGMENT */
  6324. )),
  6325. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6326. key: 0,
  6327. class: "um-add",
  6328. onClick: _cache[26] || (_cache[26] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6329. }, [
  6330. vue.createElementVNode("image", {
  6331. class: "um-add-icon",
  6332. src: _imports_1$6
  6333. }),
  6334. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6335. ])) : vue.createCommentVNode("v-if", true)
  6336. ]),
  6337. vue.withDirectives(vue.createElementVNode(
  6338. "textarea",
  6339. {
  6340. class: "um-textarea",
  6341. "onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => _ctx.modalRemark = $event),
  6342. placeholder: "在此输入备注信息...",
  6343. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6344. },
  6345. null,
  6346. 512
  6347. /* NEED_PATCH */
  6348. ), [
  6349. [vue.vModelText, _ctx.modalRemark]
  6350. ])
  6351. ]),
  6352. vue.createElementVNode("view", { class: "um-footer" }, [
  6353. vue.createElementVNode(
  6354. "view",
  6355. {
  6356. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6357. onClick: _cache[28] || (_cache[28] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6358. },
  6359. " 确认提交",
  6360. 2
  6361. /* CLASS */
  6362. )
  6363. ])
  6364. ])
  6365. ])) : vue.createCommentVNode("v-if", true),
  6366. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6367. key: 4,
  6368. class: "sum-modal-mask",
  6369. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6370. }, [
  6371. vue.createElementVNode("view", {
  6372. class: "sum-modal-card",
  6373. onClick: _cache[33] || (_cache[33] = vue.withModifiers(() => {
  6374. }, ["stop"]))
  6375. }, [
  6376. vue.createElementVNode("scroll-view", {
  6377. "scroll-y": "",
  6378. class: "sum-modal-scroll"
  6379. }, [
  6380. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6381. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6382. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6383. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6384. vue.createElementVNode(
  6385. "text",
  6386. { class: "sum-meta-val" },
  6387. vue.toDisplayString(_ctx.sumDate),
  6388. 1
  6389. /* TEXT */
  6390. )
  6391. ]),
  6392. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6393. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6394. vue.createElementVNode(
  6395. "text",
  6396. { class: "sum-meta-val" },
  6397. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6398. 1
  6399. /* TEXT */
  6400. )
  6401. ]),
  6402. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6403. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6404. vue.createElementVNode(
  6405. "text",
  6406. { class: "sum-meta-val" },
  6407. vue.toDisplayString(_ctx.orderDetail.ownerName || "张**"),
  6408. 1
  6409. /* TEXT */
  6410. )
  6411. ]),
  6412. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6413. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6414. vue.createElementVNode("image", {
  6415. class: "sum-pet-avatar",
  6416. src: _ctx.orderDetail.petAvatar,
  6417. mode: "aspectFill"
  6418. }, null, 8, ["src"]),
  6419. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6420. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6421. vue.createElementVNode(
  6422. "text",
  6423. { class: "sum-pet-name" },
  6424. vue.toDisplayString(_ctx.orderDetail.petName),
  6425. 1
  6426. /* TEXT */
  6427. ),
  6428. vue.createElementVNode(
  6429. "text",
  6430. { class: "sum-pet-breed" },
  6431. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed),
  6432. 1
  6433. /* TEXT */
  6434. )
  6435. ]),
  6436. vue.createElementVNode(
  6437. "text",
  6438. { class: "sum-pet-remark" },
  6439. vue.toDisplayString(_ctx.orderDetail.petNotes || "喜欢坐车,有点晗车,请注意通风。"),
  6440. 1
  6441. /* TEXT */
  6442. )
  6443. ])
  6444. ]),
  6445. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6446. vue.withDirectives(vue.createElementVNode(
  6447. "textarea",
  6448. {
  6449. class: "sum-textarea",
  6450. "onUpdate:modelValue": _cache[31] || (_cache[31] = ($event) => _ctx.sumContent = $event),
  6451. "auto-height": "",
  6452. placeholder: "请填写服务内容...",
  6453. "placeholder-style": "color:#ccc"
  6454. },
  6455. null,
  6456. 512
  6457. /* NEED_PATCH */
  6458. ), [
  6459. [vue.vModelText, _ctx.sumContent]
  6460. ]),
  6461. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6462. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6463. vue.createElementVNode(
  6464. "text",
  6465. { class: "sum-sign-val" },
  6466. vue.toDisplayString(_ctx.sumSigner),
  6467. 1
  6468. /* TEXT */
  6469. )
  6470. ]),
  6471. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6472. ])
  6473. ]),
  6474. vue.createElementVNode("view", { class: "sum-footer" }, [
  6475. vue.createElementVNode("button", {
  6476. class: "sum-submit-btn",
  6477. onClick: _cache[32] || (_cache[32] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6478. }, "提交小结")
  6479. ])
  6480. ])
  6481. ])) : vue.createCommentVNode("v-if", true),
  6482. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6483. key: 5,
  6484. class: "modal-mask",
  6485. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6486. }, [
  6487. vue.createElementVNode("view", {
  6488. class: "anomaly-modal-content",
  6489. onClick: _cache[36] || (_cache[36] = vue.withModifiers(() => {
  6490. }, ["stop"]))
  6491. }, [
  6492. vue.createElementVNode("view", { class: "am-header" }, [
  6493. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6494. vue.createElementVNode("view", {
  6495. class: "close-icon-btn",
  6496. onClick: _cache[35] || (_cache[35] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6497. }, "×")
  6498. ]),
  6499. vue.createElementVNode("scroll-view", {
  6500. "scroll-y": "",
  6501. class: "am-scroll-list"
  6502. }, [
  6503. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6504. key: 0,
  6505. class: "empty-list"
  6506. }, [
  6507. vue.createElementVNode("image", {
  6508. class: "empty-icon",
  6509. src: _imports_8$1,
  6510. mode: "aspectFit"
  6511. }),
  6512. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6513. ])) : vue.createCommentVNode("v-if", true),
  6514. (vue.openBlock(true), vue.createElementBlock(
  6515. vue.Fragment,
  6516. null,
  6517. vue.renderList(_ctx.anomalyList, (item, index) => {
  6518. return vue.openBlock(), vue.createElementBlock("view", {
  6519. class: "am-item",
  6520. key: index
  6521. }, [
  6522. vue.createElementVNode("view", { class: "am-item-header" }, [
  6523. vue.createElementVNode(
  6524. "text",
  6525. { class: "am-item-type" },
  6526. vue.toDisplayString(item.typeLabel),
  6527. 1
  6528. /* TEXT */
  6529. ),
  6530. vue.createElementVNode(
  6531. "text",
  6532. {
  6533. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6534. },
  6535. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6536. 3
  6537. /* TEXT, CLASS */
  6538. )
  6539. ]),
  6540. vue.createElementVNode(
  6541. "text",
  6542. { class: "am-item-content" },
  6543. vue.toDisplayString(item.content),
  6544. 1
  6545. /* TEXT */
  6546. ),
  6547. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6548. key: 0,
  6549. class: "am-item-photos"
  6550. }, [
  6551. (vue.openBlock(true), vue.createElementBlock(
  6552. vue.Fragment,
  6553. null,
  6554. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  6555. return vue.openBlock(), vue.createElementBlock("image", {
  6556. class: "am-photo",
  6557. key: pIdx,
  6558. src: photoUrl,
  6559. mode: "aspectFill"
  6560. }, null, 8, ["src"]);
  6561. }),
  6562. 128
  6563. /* KEYED_FRAGMENT */
  6564. ))
  6565. ])) : vue.createCommentVNode("v-if", true),
  6566. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6567. key: 1,
  6568. class: "am-audit-box"
  6569. }, [
  6570. vue.createElementVNode("view", { class: "am-audit-header" }, [
  6571. vue.createElementVNode(
  6572. "text",
  6573. { class: "am-audit-label" },
  6574. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  6575. 1
  6576. /* TEXT */
  6577. ),
  6578. vue.createElementVNode(
  6579. "text",
  6580. { class: "am-audit-time" },
  6581. vue.toDisplayString(item.auditTime),
  6582. 1
  6583. /* TEXT */
  6584. )
  6585. ]),
  6586. vue.createElementVNode(
  6587. "text",
  6588. { class: "am-audit-remark" },
  6589. vue.toDisplayString(item.auditRemark || "无"),
  6590. 1
  6591. /* TEXT */
  6592. )
  6593. ])) : vue.createCommentVNode("v-if", true)
  6594. ]);
  6595. }),
  6596. 128
  6597. /* KEYED_FRAGMENT */
  6598. ))
  6599. ])
  6600. ])
  6601. ])) : vue.createCommentVNode("v-if", true)
  6602. ],
  6603. 64
  6604. /* STABLE_FRAGMENT */
  6605. ))
  6606. ]);
  6607. }
  6608. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  6609. const _sfc_main$p = {
  6610. data() {
  6611. return {
  6612. orderId: "",
  6613. // 已选异常类型(dictValue)
  6614. selectedTypeValue: "",
  6615. // 已选异常类型标签(dictLabel,用于显示)
  6616. selectedTypeLabel: "",
  6617. // 异常描述
  6618. anomalyDesc: "",
  6619. // 照片列表(含 url 和 ossId)
  6620. photoList: [],
  6621. // 是否显示类型选择器
  6622. showTypeSheet: false,
  6623. // 异常类型字典列表(从后端获取)
  6624. anomalyTypes: []
  6625. };
  6626. },
  6627. onLoad(options) {
  6628. if (options.orderId) {
  6629. this.orderId = options.orderId;
  6630. }
  6631. this.loadAnomalyTypes();
  6632. },
  6633. computed: {
  6634. // 当前选中的类型显示文本
  6635. selectedType() {
  6636. return this.selectedTypeLabel || "";
  6637. }
  6638. },
  6639. methods: {
  6640. /**
  6641. * 加载异常类型字典数据
  6642. */
  6643. async loadAnomalyTypes() {
  6644. try {
  6645. const res = await getDictDataByType("flf_anamaly_type");
  6646. if (res.data && Array.isArray(res.data)) {
  6647. this.anomalyTypes = res.data.map((item) => ({
  6648. label: item.dictLabel,
  6649. value: item.dictValue,
  6650. dictCode: item.dictCode
  6651. }));
  6652. formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
  6653. }
  6654. } catch (err) {
  6655. formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
  6656. }
  6657. },
  6658. // 打开类型选择器
  6659. openTypeSheet() {
  6660. this.showTypeSheet = true;
  6661. },
  6662. // 关闭类型选择器
  6663. closeTypeSheet() {
  6664. this.showTypeSheet = false;
  6665. },
  6666. // 选择异常类型
  6667. selectType(type) {
  6668. this.selectedTypeValue = type.value;
  6669. this.selectedTypeLabel = type.label;
  6670. this.closeTypeSheet();
  6671. },
  6672. // 选择照片并上传
  6673. choosePhoto() {
  6674. uni.chooseImage({
  6675. count: 5 - this.photoList.length,
  6676. sizeType: ["compressed"],
  6677. sourceType: ["album", "camera"],
  6678. success: async (res) => {
  6679. uni.showLoading({ title: "上传中..." });
  6680. try {
  6681. for (const filePath of res.tempFilePaths) {
  6682. const uploadRes = await uploadFile(filePath);
  6683. if (uploadRes.code === 200) {
  6684. this.photoList.push({
  6685. url: uploadRes.data.url,
  6686. ossId: uploadRes.data.ossId,
  6687. localPath: filePath
  6688. });
  6689. }
  6690. }
  6691. uni.hideLoading();
  6692. } catch (err) {
  6693. uni.hideLoading();
  6694. formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
  6695. uni.showToast({ title: "上传失败", icon: "none" });
  6696. }
  6697. }
  6698. });
  6699. },
  6700. // 删除照片
  6701. removePhoto(idx) {
  6702. this.photoList.splice(idx, 1);
  6703. },
  6704. // 提交上报
  6705. async submitAnomaly() {
  6706. if (!this.selectedTypeValue) {
  6707. uni.showToast({ title: "请选择异常类型", icon: "none" });
  6708. return;
  6709. }
  6710. if (this.photoList.length === 0) {
  6711. uni.showToast({ title: "请上传现场照片", icon: "none" });
  6712. return;
  6713. }
  6714. const data = {
  6715. orderId: this.orderId,
  6716. type: this.selectedTypeValue,
  6717. content: this.anomalyDesc,
  6718. photos: this.photoList.map((p) => p.ossId)
  6719. };
  6720. try {
  6721. uni.showLoading({ title: "提交中..." });
  6722. await uploadAnamaly(data);
  6723. uni.hideLoading();
  6724. uni.showToast({ title: "上报成功", icon: "success" });
  6725. setTimeout(() => {
  6726. uni.navigateBack();
  6727. }, 1500);
  6728. } catch (err) {
  6729. uni.hideLoading();
  6730. formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
  6731. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  6732. }
  6733. }
  6734. }
  6735. };
  6736. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  6737. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  6738. vue.createElementVNode("scroll-view", {
  6739. "scroll-y": "",
  6740. class: "anomaly-scroll"
  6741. }, [
  6742. vue.createElementVNode("view", { class: "ano-card" }, [
  6743. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6744. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6745. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  6746. ]),
  6747. vue.createElementVNode("view", {
  6748. class: "ano-type-row",
  6749. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  6750. }, [
  6751. vue.createElementVNode(
  6752. "text",
  6753. {
  6754. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  6755. },
  6756. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  6757. 3
  6758. /* TEXT, CLASS */
  6759. ),
  6760. vue.createElementVNode("image", {
  6761. class: "ano-right-arrow",
  6762. src: _imports_0$2
  6763. })
  6764. ])
  6765. ]),
  6766. vue.createElementVNode("view", { class: "ano-card" }, [
  6767. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6768. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6769. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  6770. ]),
  6771. vue.withDirectives(vue.createElementVNode(
  6772. "textarea",
  6773. {
  6774. class: "ano-textarea",
  6775. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  6776. placeholder: "请详细描述现场异常情况...",
  6777. "placeholder-style": "color:#ccc; font-size:28rpx;",
  6778. maxlength: "500"
  6779. },
  6780. null,
  6781. 512
  6782. /* NEED_PATCH */
  6783. ), [
  6784. [vue.vModelText, $data.anomalyDesc]
  6785. ])
  6786. ]),
  6787. vue.createElementVNode("view", { class: "ano-card" }, [
  6788. vue.createElementVNode("view", { class: "ano-section-title" }, [
  6789. vue.createElementVNode("view", { class: "ano-title-bar" }),
  6790. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  6791. ]),
  6792. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  6793. (vue.openBlock(true), vue.createElementBlock(
  6794. vue.Fragment,
  6795. null,
  6796. vue.renderList($data.photoList, (img, idx) => {
  6797. return vue.openBlock(), vue.createElementBlock("view", {
  6798. class: "ano-photo-item",
  6799. key: idx
  6800. }, [
  6801. vue.createElementVNode("image", {
  6802. class: "ano-photo-preview",
  6803. src: img.url || img.localPath || img,
  6804. mode: "aspectFill"
  6805. }, null, 8, ["src"]),
  6806. vue.createElementVNode("view", {
  6807. class: "ano-photo-del",
  6808. onClick: ($event) => $options.removePhoto(idx)
  6809. }, "×", 8, ["onClick"])
  6810. ]);
  6811. }),
  6812. 128
  6813. /* KEYED_FRAGMENT */
  6814. )),
  6815. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6816. key: 0,
  6817. class: "ano-photo-add",
  6818. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  6819. }, [
  6820. vue.createElementVNode("image", {
  6821. class: "ano-add-icon",
  6822. src: _imports_1$6
  6823. }),
  6824. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  6825. ])) : vue.createCommentVNode("v-if", true)
  6826. ])
  6827. ]),
  6828. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  6829. ]),
  6830. vue.createElementVNode("view", { class: "ano-footer" }, [
  6831. vue.createElementVNode("button", {
  6832. class: "ano-submit-btn",
  6833. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  6834. }, "提交上报")
  6835. ]),
  6836. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  6837. key: 0,
  6838. class: "ano-sheet-mask",
  6839. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  6840. }, [
  6841. vue.createElementVNode("view", {
  6842. class: "ano-sheet",
  6843. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  6844. }, ["stop"]))
  6845. }, [
  6846. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  6847. vue.createElementVNode("scroll-view", {
  6848. "scroll-y": "",
  6849. class: "ano-sheet-list"
  6850. }, [
  6851. (vue.openBlock(true), vue.createElementBlock(
  6852. vue.Fragment,
  6853. null,
  6854. vue.renderList($data.anomalyTypes, (type, idx) => {
  6855. return vue.openBlock(), vue.createElementBlock("view", {
  6856. class: "ano-sheet-item",
  6857. key: idx,
  6858. onClick: ($event) => $options.selectType(type)
  6859. }, [
  6860. vue.createElementVNode(
  6861. "text",
  6862. {
  6863. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  6864. },
  6865. vue.toDisplayString(type.label),
  6866. 3
  6867. /* TEXT, CLASS */
  6868. ),
  6869. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  6870. key: 0,
  6871. class: "ano-check-icon",
  6872. src: _imports_0$2
  6873. })) : vue.createCommentVNode("v-if", true)
  6874. ], 8, ["onClick"]);
  6875. }),
  6876. 128
  6877. /* KEYED_FRAGMENT */
  6878. ))
  6879. ]),
  6880. vue.createElementVNode("view", {
  6881. class: "ano-sheet-cancel",
  6882. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  6883. }, "取消")
  6884. ])
  6885. ])) : vue.createCommentVNode("v-if", true)
  6886. ]);
  6887. }
  6888. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  6889. const _sfc_main$o = {
  6890. data() {
  6891. return {
  6892. tabs: ["全部", "已完成", "已拒绝"],
  6893. activeTab: 0,
  6894. orders: [
  6895. {
  6896. orderType: 1,
  6897. typeName: "接送",
  6898. typeIcon: "/static/icons/car.svg",
  6899. status: "完成",
  6900. finishTime: "2026/02/03 14:30",
  6901. serviceTime: "2026/02/10 10:00",
  6902. petName: "哈士奇宝宝",
  6903. petBreed: "哈士奇",
  6904. petAvatar: "/static/dog.png",
  6905. price: "20.00",
  6906. startName: "武汉大学宠物店",
  6907. startAddr: "武汉市洪山区珞喻路458号",
  6908. endName: "张** 189****8451",
  6909. endAddr: "武汉市武昌区新区大道凤凰广场A座",
  6910. serviceNote: ""
  6911. },
  6912. {
  6913. orderType: 2,
  6914. typeName: "喂遛",
  6915. typeIcon: "/static/icons/walk.svg",
  6916. status: "完成",
  6917. finishTime: "2026/02/03 15:00",
  6918. serviceTime: "2026/02/11 14:00",
  6919. petName: "金毛",
  6920. petBreed: "金毛寻回犬",
  6921. petAvatar: "/static/dog.png",
  6922. price: "35.00",
  6923. startName: "",
  6924. startAddr: "",
  6925. endName: "王女士 138****1234",
  6926. endAddr: "武汉市江汉区泛海国际居住区",
  6927. serviceNote: "需自带牵引绳,遛弯30分钟。"
  6928. },
  6929. {
  6930. orderType: 3,
  6931. typeName: "洗护",
  6932. typeIcon: "/static/icons/wash.svg",
  6933. status: "拒绝",
  6934. finishTime: "2026/02/03 09:30",
  6935. serviceTime: "2026/02/12 09:30",
  6936. petName: "Mimi",
  6937. petBreed: "布偶猫",
  6938. petAvatar: "/static/dog.png",
  6939. price: "50.00",
  6940. startName: "",
  6941. startAddr: "",
  6942. endName: "赵先生 159****9876",
  6943. endAddr: "武汉市汉阳区钟家村",
  6944. serviceNote: "上门洗澡,剪指甲。"
  6945. }
  6946. ]
  6947. };
  6948. },
  6949. computed: {
  6950. filteredOrders() {
  6951. if (this.activeTab === 0)
  6952. return this.orders;
  6953. if (this.activeTab === 1)
  6954. return this.orders.filter((o) => o.status === "完成");
  6955. return this.orders.filter((o) => o.status === "拒绝");
  6956. }
  6957. },
  6958. methods: {
  6959. switchTab(idx) {
  6960. this.activeTab = idx;
  6961. }
  6962. }
  6963. };
  6964. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  6965. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  6966. vue.createElementVNode("view", { class: "stats-banner" }, [
  6967. vue.createElementVNode("view", { class: "banner-item" }, [
  6968. vue.createElementVNode("text", { class: "banner-num" }, "2546"),
  6969. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  6970. ]),
  6971. vue.createElementVNode("view", { class: "banner-item" }, [
  6972. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  6973. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  6974. ]),
  6975. vue.createElementVNode("view", { class: "banner-item" }, [
  6976. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  6977. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  6978. ]),
  6979. vue.createElementVNode("view", { class: "banner-item" }, [
  6980. vue.createElementVNode("text", { class: "banner-num" }, "10"),
  6981. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  6982. ]),
  6983. vue.createElementVNode("view", { class: "banner-item" }, [
  6984. vue.createElementVNode("text", { class: "banner-num" }, [
  6985. vue.createTextVNode("158"),
  6986. vue.createElementVNode("text", { class: "banner-unit" }, "天")
  6987. ]),
  6988. vue.createElementVNode("text", { class: "banner-label" }, "服务时长")
  6989. ])
  6990. ]),
  6991. vue.createElementVNode("view", { class: "tab-bar" }, [
  6992. (vue.openBlock(true), vue.createElementBlock(
  6993. vue.Fragment,
  6994. null,
  6995. vue.renderList($data.tabs, (tab, idx) => {
  6996. return vue.openBlock(), vue.createElementBlock("view", {
  6997. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  6998. key: idx,
  6999. onClick: ($event) => $options.switchTab(idx)
  7000. }, [
  7001. vue.createElementVNode(
  7002. "text",
  7003. null,
  7004. vue.toDisplayString(tab),
  7005. 1
  7006. /* TEXT */
  7007. ),
  7008. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7009. key: 0,
  7010. class: "tab-line"
  7011. })) : vue.createCommentVNode("v-if", true)
  7012. ], 10, ["onClick"]);
  7013. }),
  7014. 128
  7015. /* KEYED_FRAGMENT */
  7016. ))
  7017. ]),
  7018. vue.createElementVNode("scroll-view", {
  7019. "scroll-y": "",
  7020. class: "order-scroll"
  7021. }, [
  7022. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7023. (vue.openBlock(true), vue.createElementBlock(
  7024. vue.Fragment,
  7025. null,
  7026. vue.renderList($options.filteredOrders, (order, idx) => {
  7027. return vue.openBlock(), vue.createElementBlock("view", {
  7028. class: "order-card",
  7029. key: idx
  7030. }, [
  7031. vue.createElementVNode("view", { class: "card-header" }, [
  7032. vue.createElementVNode("view", { class: "type-badge" }, [
  7033. vue.createElementVNode("image", {
  7034. class: "type-icon",
  7035. src: order.typeIcon
  7036. }, null, 8, ["src"]),
  7037. vue.createElementVNode(
  7038. "text",
  7039. { class: "type-text" },
  7040. vue.toDisplayString(order.typeName),
  7041. 1
  7042. /* TEXT */
  7043. )
  7044. ]),
  7045. vue.createElementVNode(
  7046. "text",
  7047. {
  7048. class: vue.normalizeClass(["status-text", order.status === "完成" ? "green" : "red"])
  7049. },
  7050. vue.toDisplayString(order.status === "完成" ? "完成:" : "拒绝:") + vue.toDisplayString(order.finishTime),
  7051. 3
  7052. /* TEXT, CLASS */
  7053. )
  7054. ]),
  7055. vue.createElementVNode(
  7056. "text",
  7057. { class: "service-time" },
  7058. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7059. 1
  7060. /* TEXT */
  7061. ),
  7062. vue.createElementVNode("view", { class: "pet-card" }, [
  7063. vue.createElementVNode("image", {
  7064. class: "pet-avatar",
  7065. src: order.petAvatar,
  7066. mode: "aspectFill"
  7067. }, null, 8, ["src"]),
  7068. vue.createElementVNode("view", { class: "pet-info" }, [
  7069. vue.createElementVNode(
  7070. "text",
  7071. { class: "pet-name" },
  7072. vue.toDisplayString(order.petName),
  7073. 1
  7074. /* TEXT */
  7075. ),
  7076. vue.createElementVNode(
  7077. "text",
  7078. { class: "pet-breed" },
  7079. "品种: " + vue.toDisplayString(order.petBreed),
  7080. 1
  7081. /* TEXT */
  7082. )
  7083. ]),
  7084. vue.createElementVNode(
  7085. "text",
  7086. { class: "pet-price" },
  7087. "¥" + vue.toDisplayString(order.price),
  7088. 1
  7089. /* TEXT */
  7090. )
  7091. ]),
  7092. vue.createElementVNode("view", { class: "route-info" }, [
  7093. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7094. vue.Fragment,
  7095. { key: 0 },
  7096. [
  7097. vue.createElementVNode("view", { class: "route-item" }, [
  7098. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7099. vue.createElementVNode("view", { class: "route-connector" }),
  7100. vue.createElementVNode("view", { class: "address-box" }, [
  7101. vue.createElementVNode(
  7102. "text",
  7103. { class: "addr-title" },
  7104. vue.toDisplayString(order.startName),
  7105. 1
  7106. /* TEXT */
  7107. ),
  7108. vue.createElementVNode(
  7109. "text",
  7110. { class: "addr-desc" },
  7111. vue.toDisplayString(order.startAddr),
  7112. 1
  7113. /* TEXT */
  7114. )
  7115. ])
  7116. ]),
  7117. vue.createElementVNode("view", { class: "route-item" }, [
  7118. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7119. vue.createElementVNode("view", { class: "address-box" }, [
  7120. vue.createElementVNode(
  7121. "text",
  7122. { class: "addr-title" },
  7123. vue.toDisplayString(order.endName),
  7124. 1
  7125. /* TEXT */
  7126. ),
  7127. vue.createElementVNode(
  7128. "text",
  7129. { class: "addr-desc" },
  7130. vue.toDisplayString(order.endAddr),
  7131. 1
  7132. /* TEXT */
  7133. )
  7134. ])
  7135. ])
  7136. ],
  7137. 64
  7138. /* STABLE_FRAGMENT */
  7139. )) : (vue.openBlock(), vue.createElementBlock(
  7140. vue.Fragment,
  7141. { key: 1 },
  7142. [
  7143. vue.createElementVNode("view", { class: "route-item" }, [
  7144. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7145. vue.createElementVNode("view", { class: "address-box" }, [
  7146. vue.createElementVNode(
  7147. "text",
  7148. { class: "addr-title" },
  7149. vue.toDisplayString(order.endName),
  7150. 1
  7151. /* TEXT */
  7152. ),
  7153. vue.createElementVNode(
  7154. "text",
  7155. { class: "addr-desc" },
  7156. vue.toDisplayString(order.endAddr),
  7157. 1
  7158. /* TEXT */
  7159. )
  7160. ])
  7161. ]),
  7162. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7163. key: 0,
  7164. class: "service-note-row"
  7165. }, [
  7166. vue.createElementVNode(
  7167. "text",
  7168. { class: "service-note-text" },
  7169. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7170. 1
  7171. /* TEXT */
  7172. )
  7173. ])) : vue.createCommentVNode("v-if", true)
  7174. ],
  7175. 64
  7176. /* STABLE_FRAGMENT */
  7177. ))
  7178. ])
  7179. ]);
  7180. }),
  7181. 128
  7182. /* KEYED_FRAGMENT */
  7183. )),
  7184. $options.filteredOrders.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  7185. key: 0,
  7186. class: "empty-state"
  7187. }, [
  7188. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7189. ])) : vue.createCommentVNode("v-if", true),
  7190. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7191. ])
  7192. ]);
  7193. }
  7194. 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"]]);
  7195. const _sfc_main$n = {
  7196. data() {
  7197. return {
  7198. tabs: ["全部", "奖励", "惩罚"],
  7199. activeTab: 0,
  7200. selectedYear: 2026,
  7201. selectedMonth: 2,
  7202. // 月份选择器状态
  7203. showMonthPicker: false,
  7204. pickerYear: 2026,
  7205. pickerMonth: 2,
  7206. years: [2021, 2022, 2023, 2024, 2025, 2026],
  7207. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7208. yearScrollTop: 0,
  7209. monthScrollTop: 0,
  7210. // 奖惩记录列表
  7211. records: [
  7212. { date: "09-01", title: "单量奖励", desc: "超140单", amount: 560, status: "待入账", statusClass: "pending", type: "reward" },
  7213. { date: "08-01", title: "单量奖励", desc: "超470单", amount: 2050, status: "已入账", statusClass: "credited", type: "reward" },
  7214. { date: "09-02", title: "超时扣款", desc: "订单#T982 超时30分钟", amount: -15, status: "已扣款", statusClass: "deducted", type: "penalty" },
  7215. { date: "09-05", title: "高温补贴", desc: "8月份高温天气补贴", amount: 300, status: "已入账", statusClass: "credited", type: "reward" }
  7216. ]
  7217. };
  7218. },
  7219. computed: {
  7220. filteredList() {
  7221. if (this.activeTab === 0)
  7222. return this.records;
  7223. if (this.activeTab === 1)
  7224. return this.records.filter((r) => r.type === "reward");
  7225. return this.records.filter((r) => r.type === "penalty");
  7226. }
  7227. },
  7228. methods: {
  7229. switchTab(idx) {
  7230. this.activeTab = idx;
  7231. },
  7232. openMonthPicker() {
  7233. this.pickerYear = this.selectedYear;
  7234. this.pickerMonth = this.selectedMonth;
  7235. this.showMonthPicker = true;
  7236. },
  7237. closeMonthPicker() {
  7238. this.showMonthPicker = false;
  7239. },
  7240. confirmMonthPicker() {
  7241. this.selectedYear = this.pickerYear;
  7242. this.selectedMonth = this.pickerMonth;
  7243. this.closeMonthPicker();
  7244. },
  7245. goToAll() {
  7246. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7247. }
  7248. }
  7249. };
  7250. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  7251. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7252. vue.createElementVNode("view", { class: "top-banner" }, [
  7253. vue.createElementVNode("view", {
  7254. class: "month-btn",
  7255. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7256. }, [
  7257. vue.createElementVNode(
  7258. "text",
  7259. { class: "month-text" },
  7260. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7261. 1
  7262. /* TEXT */
  7263. )
  7264. ]),
  7265. vue.createElementVNode("view", { class: "stats-grid" }, [
  7266. vue.createElementVNode("view", { class: "stats-cell" }, [
  7267. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7268. vue.createElementVNode("text", { class: "stats-num" }, [
  7269. vue.createTextVNode("3"),
  7270. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7271. ]),
  7272. vue.createElementVNode("view", { class: "stats-divider" }),
  7273. vue.createElementVNode("text", { class: "stats-sub" }, "累计 1258单")
  7274. ]),
  7275. vue.createElementVNode("view", { class: "stats-cell" }, [
  7276. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7277. vue.createElementVNode("text", { class: "stats-num" }, [
  7278. vue.createTextVNode("1"),
  7279. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7280. ]),
  7281. vue.createElementVNode("view", { class: "stats-divider" }),
  7282. vue.createElementVNode("text", { class: "stats-sub" }, "累计 12单")
  7283. ]),
  7284. vue.createElementVNode("view", { class: "stats-cell" }, [
  7285. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  7286. vue.createElementVNode("text", { class: "stats-num reward-num" }, "2910.00"),
  7287. vue.createElementVNode("view", { class: "stats-divider" }),
  7288. vue.createElementVNode("text", { class: "stats-sub" }, "累计 45800.00")
  7289. ]),
  7290. vue.createElementVNode("view", { class: "stats-cell" }, [
  7291. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  7292. vue.createElementVNode("text", { class: "stats-num penalty-num" }, "-15.00"),
  7293. vue.createElementVNode("view", { class: "stats-divider" }),
  7294. vue.createElementVNode("text", { class: "stats-sub" }, "累计 350.00")
  7295. ])
  7296. ])
  7297. ]),
  7298. vue.createElementVNode("view", { class: "list-header" }, [
  7299. vue.createElementVNode("view", { class: "tab-bar" }, [
  7300. (vue.openBlock(true), vue.createElementBlock(
  7301. vue.Fragment,
  7302. null,
  7303. vue.renderList($data.tabs, (tab, idx) => {
  7304. return vue.openBlock(), vue.createElementBlock("view", {
  7305. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7306. key: idx,
  7307. onClick: ($event) => $options.switchTab(idx)
  7308. }, [
  7309. vue.createElementVNode(
  7310. "text",
  7311. null,
  7312. vue.toDisplayString(tab),
  7313. 1
  7314. /* TEXT */
  7315. ),
  7316. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7317. key: 0,
  7318. class: "tab-line"
  7319. })) : vue.createCommentVNode("v-if", true)
  7320. ], 10, ["onClick"]);
  7321. }),
  7322. 128
  7323. /* KEYED_FRAGMENT */
  7324. ))
  7325. ]),
  7326. vue.createElementVNode("view", {
  7327. class: "view-all-btn",
  7328. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  7329. }, [
  7330. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  7331. ])
  7332. ]),
  7333. vue.createElementVNode("view", { class: "record-list" }, [
  7334. (vue.openBlock(true), vue.createElementBlock(
  7335. vue.Fragment,
  7336. null,
  7337. vue.renderList($options.filteredList, (item, idx) => {
  7338. return vue.openBlock(), vue.createElementBlock("view", {
  7339. class: "record-item",
  7340. key: idx
  7341. }, [
  7342. vue.createElementVNode(
  7343. "view",
  7344. {
  7345. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7346. },
  7347. [
  7348. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7349. ],
  7350. 2
  7351. /* CLASS */
  7352. ),
  7353. vue.createElementVNode("view", { class: "ri-content" }, [
  7354. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7355. vue.createElementVNode(
  7356. "text",
  7357. { class: "ri-date" },
  7358. vue.toDisplayString(item.date),
  7359. 1
  7360. /* TEXT */
  7361. ),
  7362. vue.createElementVNode(
  7363. "text",
  7364. { class: "ri-title" },
  7365. vue.toDisplayString(item.title),
  7366. 1
  7367. /* TEXT */
  7368. )
  7369. ]),
  7370. vue.createElementVNode(
  7371. "text",
  7372. { class: "ri-desc" },
  7373. vue.toDisplayString(item.desc),
  7374. 1
  7375. /* TEXT */
  7376. )
  7377. ]),
  7378. vue.createElementVNode("view", { class: "ri-right" }, [
  7379. vue.createElementVNode(
  7380. "text",
  7381. {
  7382. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7383. },
  7384. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7385. 3
  7386. /* TEXT, CLASS */
  7387. ),
  7388. vue.createElementVNode(
  7389. "text",
  7390. {
  7391. class: vue.normalizeClass(["ri-status", item.statusClass])
  7392. },
  7393. vue.toDisplayString(item.status),
  7394. 3
  7395. /* TEXT, CLASS */
  7396. )
  7397. ])
  7398. ]);
  7399. }),
  7400. 128
  7401. /* KEYED_FRAGMENT */
  7402. )),
  7403. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  7404. ]),
  7405. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  7406. key: 0,
  7407. class: "picker-mask",
  7408. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7409. }, [
  7410. vue.createElementVNode("view", {
  7411. class: "picker-sheet",
  7412. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  7413. }, ["stop"]))
  7414. }, [
  7415. vue.createElementVNode("view", { class: "picker-header" }, [
  7416. vue.createElementVNode("text", {
  7417. class: "picker-cancel",
  7418. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  7419. }, "取消"),
  7420. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  7421. vue.createElementVNode("text", {
  7422. class: "picker-confirm",
  7423. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  7424. }, "确定")
  7425. ]),
  7426. vue.createElementVNode("view", { class: "picker-body" }, [
  7427. vue.createElementVNode("scroll-view", {
  7428. "scroll-y": "",
  7429. class: "picker-column",
  7430. "scroll-top": $data.yearScrollTop,
  7431. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  7432. }, [
  7433. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7434. (vue.openBlock(true), vue.createElementBlock(
  7435. vue.Fragment,
  7436. null,
  7437. vue.renderList($data.years, (year) => {
  7438. return vue.openBlock(), vue.createElementBlock("view", {
  7439. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  7440. key: year,
  7441. onClick: ($event) => $data.pickerYear = year
  7442. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  7443. }),
  7444. 128
  7445. /* KEYED_FRAGMENT */
  7446. )),
  7447. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7448. ], 40, ["scroll-top"]),
  7449. vue.createElementVNode("view", { class: "picker-highlight" }),
  7450. vue.createElementVNode("scroll-view", {
  7451. "scroll-y": "",
  7452. class: "picker-column",
  7453. "scroll-top": $data.monthScrollTop,
  7454. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  7455. }, [
  7456. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  7457. (vue.openBlock(true), vue.createElementBlock(
  7458. vue.Fragment,
  7459. null,
  7460. vue.renderList($data.months, (month) => {
  7461. return vue.openBlock(), vue.createElementBlock("view", {
  7462. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  7463. key: month,
  7464. onClick: ($event) => $data.pickerMonth = month
  7465. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  7466. }),
  7467. 128
  7468. /* KEYED_FRAGMENT */
  7469. )),
  7470. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  7471. ], 40, ["scroll-top"])
  7472. ])
  7473. ])
  7474. ])) : vue.createCommentVNode("v-if", true)
  7475. ]);
  7476. }
  7477. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  7478. const _sfc_main$m = {
  7479. data() {
  7480. return {
  7481. tabs: ["全部", "奖励", "惩罚"],
  7482. activeTab: 0,
  7483. // 所有完整记录(按月分组)
  7484. allGroups: [
  7485. {
  7486. month: 9,
  7487. credited: 30,
  7488. pending: 0,
  7489. items: [
  7490. { date: "09-24", title: "高温补贴", desc: "9月份高温天气补贴", amount: 30, status: "已入账", statusClass: "credited", type: "reward" }
  7491. ]
  7492. },
  7493. {
  7494. month: 8,
  7495. credited: 2610,
  7496. pending: 0,
  7497. items: [
  7498. { date: "08-01", title: "单量奖励", desc: "超140单", amount: 560, status: "已入账", statusClass: "credited", type: "reward" },
  7499. { date: "07-01", title: "单量奖励", desc: "超470单", amount: 2050, status: "已入账", statusClass: "credited", type: "reward" }
  7500. ]
  7501. },
  7502. {
  7503. month: 7,
  7504. credited: 0,
  7505. pending: 0,
  7506. items: [
  7507. { date: "07-15", title: "超时扣款", desc: "订单#T98211 超时30分钟", amount: -15, status: "已扣款", statusClass: "deducted", type: "penalty" },
  7508. { date: "07-20", title: "客诉扣款", desc: "订单#T98222 餐品遗漏", amount: -50, status: "已扣款", statusClass: "deducted", type: "penalty" }
  7509. ]
  7510. }
  7511. ]
  7512. };
  7513. },
  7514. computed: {
  7515. filteredGroups() {
  7516. if (this.activeTab === 0)
  7517. return this.allGroups;
  7518. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  7519. return this.allGroups.map((g) => ({
  7520. ...g,
  7521. items: g.items.filter((i) => i.type === typeKey)
  7522. })).filter((g) => g.items.length > 0);
  7523. }
  7524. },
  7525. methods: {
  7526. switchTab(idx) {
  7527. this.activeTab = idx;
  7528. }
  7529. }
  7530. };
  7531. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  7532. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7533. vue.createElementVNode("view", { class: "tab-bar" }, [
  7534. (vue.openBlock(true), vue.createElementBlock(
  7535. vue.Fragment,
  7536. null,
  7537. vue.renderList($data.tabs, (tab, idx) => {
  7538. return vue.openBlock(), vue.createElementBlock("view", {
  7539. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7540. key: idx,
  7541. onClick: ($event) => $options.switchTab(idx)
  7542. }, [
  7543. vue.createElementVNode(
  7544. "text",
  7545. null,
  7546. vue.toDisplayString(tab),
  7547. 1
  7548. /* TEXT */
  7549. ),
  7550. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7551. key: 0,
  7552. class: "tab-line"
  7553. })) : vue.createCommentVNode("v-if", true)
  7554. ], 10, ["onClick"]);
  7555. }),
  7556. 128
  7557. /* KEYED_FRAGMENT */
  7558. ))
  7559. ]),
  7560. vue.createElementVNode("scroll-view", {
  7561. "scroll-y": "",
  7562. class: "main-scroll"
  7563. }, [
  7564. (vue.openBlock(true), vue.createElementBlock(
  7565. vue.Fragment,
  7566. null,
  7567. vue.renderList($options.filteredGroups, (group, gIdx) => {
  7568. return vue.openBlock(), vue.createElementBlock("view", {
  7569. key: gIdx,
  7570. class: "month-group"
  7571. }, [
  7572. vue.createElementVNode("view", { class: "month-header" }, [
  7573. vue.createElementVNode(
  7574. "text",
  7575. { class: "month-title" },
  7576. vue.toDisplayString(group.month) + "月",
  7577. 1
  7578. /* TEXT */
  7579. ),
  7580. vue.createElementVNode("view", { class: "month-summary" }, [
  7581. vue.createElementVNode(
  7582. "text",
  7583. { class: "month-sum-text" },
  7584. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  7585. 1
  7586. /* TEXT */
  7587. ),
  7588. vue.createElementVNode(
  7589. "text",
  7590. { class: "month-sum-text" },
  7591. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  7592. 1
  7593. /* TEXT */
  7594. )
  7595. ])
  7596. ]),
  7597. (vue.openBlock(true), vue.createElementBlock(
  7598. vue.Fragment,
  7599. null,
  7600. vue.renderList(group.items, (item, rIdx) => {
  7601. return vue.openBlock(), vue.createElementBlock("view", {
  7602. class: "record-item",
  7603. key: rIdx
  7604. }, [
  7605. vue.createElementVNode(
  7606. "view",
  7607. {
  7608. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7609. },
  7610. [
  7611. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7612. ],
  7613. 2
  7614. /* CLASS */
  7615. ),
  7616. vue.createElementVNode("view", { class: "ri-content" }, [
  7617. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7618. vue.createElementVNode(
  7619. "text",
  7620. { class: "ri-date" },
  7621. vue.toDisplayString(item.date),
  7622. 1
  7623. /* TEXT */
  7624. ),
  7625. vue.createElementVNode(
  7626. "text",
  7627. { class: "ri-title" },
  7628. vue.toDisplayString(item.title),
  7629. 1
  7630. /* TEXT */
  7631. )
  7632. ]),
  7633. vue.createElementVNode(
  7634. "text",
  7635. { class: "ri-desc" },
  7636. vue.toDisplayString(item.desc),
  7637. 1
  7638. /* TEXT */
  7639. )
  7640. ]),
  7641. vue.createElementVNode("view", { class: "ri-right" }, [
  7642. vue.createElementVNode(
  7643. "text",
  7644. {
  7645. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7646. },
  7647. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7648. 3
  7649. /* TEXT, CLASS */
  7650. ),
  7651. vue.createElementVNode(
  7652. "text",
  7653. {
  7654. class: vue.normalizeClass(["ri-status", item.statusClass])
  7655. },
  7656. vue.toDisplayString(item.status),
  7657. 3
  7658. /* TEXT, CLASS */
  7659. )
  7660. ])
  7661. ]);
  7662. }),
  7663. 128
  7664. /* KEYED_FRAGMENT */
  7665. ))
  7666. ]);
  7667. }),
  7668. 128
  7669. /* KEYED_FRAGMENT */
  7670. )),
  7671. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7672. ])
  7673. ]);
  7674. }
  7675. 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"]]);
  7676. const logic = {
  7677. components: {
  7678. customTabbar
  7679. },
  7680. data() {
  7681. return {
  7682. showServicePopup: false,
  7683. showLogoutPopup: false,
  7684. profile: null,
  7685. profileLoading: false
  7686. };
  7687. },
  7688. onShow() {
  7689. uni.hideTabBar();
  7690. if (isLoggedIn()) {
  7691. this.loadProfile();
  7692. }
  7693. },
  7694. methods: {
  7695. async loadProfile() {
  7696. if (this.profileLoading)
  7697. return;
  7698. this.profileLoading = true;
  7699. try {
  7700. const res = await getMyProfile();
  7701. this.profile = res.data || null;
  7702. } catch (err) {
  7703. formatAppLog("error", "at pages/mine/logic.js:32", "获取个人信息失败:", err);
  7704. } finally {
  7705. this.profileLoading = false;
  7706. }
  7707. },
  7708. navToSettings() {
  7709. uni.navigateTo({
  7710. url: "/pages/mine/settings/index"
  7711. });
  7712. },
  7713. navToProfile() {
  7714. uni.navigateTo({
  7715. url: "/pages/mine/settings/profile/index"
  7716. });
  7717. },
  7718. navToLevel() {
  7719. uni.navigateTo({
  7720. url: "/pages/mine/level/index"
  7721. });
  7722. },
  7723. navToNotification() {
  7724. uni.navigateTo({
  7725. url: "/pages/mine/message/index"
  7726. });
  7727. },
  7728. navToWallet() {
  7729. uni.navigateTo({
  7730. url: "/pages/mine/wallet/index"
  7731. });
  7732. },
  7733. navToPoints() {
  7734. uni.navigateTo({
  7735. url: "/pages/mine/points/index"
  7736. });
  7737. },
  7738. navToOrderStats() {
  7739. uni.navigateTo({
  7740. url: "/pages/mine/order-stats"
  7741. });
  7742. },
  7743. navToRewards() {
  7744. uni.navigateTo({
  7745. url: "/pages/mine/rewards"
  7746. });
  7747. },
  7748. openServicePopup() {
  7749. this.showServicePopup = true;
  7750. },
  7751. closeServicePopup() {
  7752. this.showServicePopup = false;
  7753. },
  7754. previewQRCode() {
  7755. uni.previewImage({
  7756. urls: ["/static/logo.png"]
  7757. });
  7758. },
  7759. openOnlineService() {
  7760. uni.showToast({
  7761. title: "正在跳转企业微信客服...",
  7762. icon: "none"
  7763. });
  7764. },
  7765. callServicePhone() {
  7766. uni.makePhoneCall({
  7767. phoneNumber: "400-123-4567"
  7768. });
  7769. },
  7770. logout() {
  7771. this.showLogoutPopup = true;
  7772. },
  7773. cancelLogout() {
  7774. this.showLogoutPopup = false;
  7775. },
  7776. async confirmLogout() {
  7777. this.showLogoutPopup = false;
  7778. try {
  7779. await logout();
  7780. } catch (e) {
  7781. }
  7782. clearAuth();
  7783. uni.reLaunch({
  7784. url: "/pages/login/login"
  7785. });
  7786. }
  7787. }
  7788. };
  7789. const _imports_0$1 = "/static/icons/motorbike.svg";
  7790. const _imports_1$5 = "/static/icons/location.svg";
  7791. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  7792. const _imports_3$1 = "/static/icons/calendar.svg";
  7793. const _imports_4 = "/static/icons/settings.svg";
  7794. const _imports_1$4 = "/static/icons/crown.svg";
  7795. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  7796. const _imports_3 = "/static/icons/chevron_right.svg";
  7797. const _imports_8 = "/static/icons/bell_linear.svg";
  7798. const _imports_9 = "/static/icons/money_linear.svg";
  7799. const _imports_10 = "/static/icons/headset_linear.svg";
  7800. const _imports_11 = "/static/icons/close_gray.svg";
  7801. const _imports_13 = "/static/icons/headset_green.svg";
  7802. const _imports_15 = "/static/icons/phone_green.svg";
  7803. const _sfc_main$l = {
  7804. ...logic
  7805. };
  7806. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  7807. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
  7808. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  7809. return vue.openBlock(), vue.createElementBlock(
  7810. vue.Fragment,
  7811. null,
  7812. [
  7813. vue.createElementVNode("view", { class: "container" }, [
  7814. vue.createElementVNode("view", { class: "nav-bg" }, [
  7815. vue.createElementVNode("view", { class: "bg-circle-1" }),
  7816. vue.createElementVNode("view", { class: "bg-circle-2" })
  7817. ]),
  7818. vue.createElementVNode("view", { class: "header-section" }, [
  7819. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  7820. vue.createElementVNode("view", {
  7821. class: "user-card",
  7822. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  7823. }, [
  7824. vue.createElementVNode("image", {
  7825. class: "avatar",
  7826. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  7827. mode: "aspectFill"
  7828. }, null, 8, ["src"]),
  7829. vue.createElementVNode("view", { class: "info-content" }, [
  7830. vue.createElementVNode("view", { class: "name-row" }, [
  7831. vue.createElementVNode(
  7832. "text",
  7833. { class: "name" },
  7834. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  7835. 1
  7836. /* TEXT */
  7837. ),
  7838. vue.createElementVNode("view", { class: "tags" }, [
  7839. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  7840. key: 0,
  7841. class: "tag green"
  7842. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  7843. key: 1,
  7844. class: "tag green"
  7845. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  7846. key: 2,
  7847. class: "tag",
  7848. style: { "background": "#eee", "color": "#999" }
  7849. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  7850. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  7851. key: 3,
  7852. class: "tag blue"
  7853. }, "全职")) : vue.createCommentVNode("v-if", true),
  7854. vue.createElementVNode("image", {
  7855. class: "bike-icon",
  7856. src: _imports_0$1
  7857. })
  7858. ])
  7859. ]),
  7860. vue.createElementVNode("view", { class: "detail-row" }, [
  7861. vue.createElementVNode("image", {
  7862. class: "small-icon",
  7863. src: _imports_1$5
  7864. }),
  7865. vue.createElementVNode(
  7866. "text",
  7867. null,
  7868. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  7869. 1
  7870. /* TEXT */
  7871. ),
  7872. vue.createElementVNode("image", {
  7873. class: "arrow-icon-small",
  7874. src: _imports_0
  7875. })
  7876. ]),
  7877. vue.createElementVNode("view", { class: "detail-row" }, [
  7878. vue.createElementVNode("image", {
  7879. class: "small-icon",
  7880. src: _imports_3$1
  7881. }),
  7882. vue.createElementVNode(
  7883. "text",
  7884. null,
  7885. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  7886. 1
  7887. /* TEXT */
  7888. )
  7889. ])
  7890. ]),
  7891. vue.createElementVNode("image", {
  7892. class: "settings-icon",
  7893. src: _imports_4,
  7894. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  7895. })
  7896. ]),
  7897. vue.createElementVNode("view", { class: "vip-card" }, [
  7898. vue.createElementVNode("view", { class: "vip-left" }, [
  7899. vue.createElementVNode("image", {
  7900. class: "vip-icon",
  7901. src: _imports_1$4
  7902. }),
  7903. vue.createElementVNode("view", { class: "vip-text" }, [
  7904. vue.createElementVNode(
  7905. "text",
  7906. { class: "vip-title" },
  7907. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.levelName) || "普通履约者"),
  7908. 1
  7909. /* TEXT */
  7910. ),
  7911. vue.createElementVNode(
  7912. "text",
  7913. { class: "vip-desc" },
  7914. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.levelDesc) || "完成更多订单即可升级"),
  7915. 1
  7916. /* TEXT */
  7917. )
  7918. ])
  7919. ]),
  7920. vue.createElementVNode("view", {
  7921. class: "vip-btn",
  7922. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  7923. }, [
  7924. vue.createElementVNode("text", null, "查看权益"),
  7925. vue.createElementVNode("image", {
  7926. class: "arrow-icon-small",
  7927. src: _imports_6
  7928. })
  7929. ])
  7930. ])
  7931. ]),
  7932. vue.createElementVNode("view", { class: "stats-panel" }, [
  7933. vue.createElementVNode("view", {
  7934. class: "stat-item",
  7935. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  7936. }, [
  7937. vue.createElementVNode("view", { class: "stat-header" }, [
  7938. vue.createElementVNode("view", { class: "red-bar" }),
  7939. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  7940. vue.createElementVNode("image", {
  7941. class: "arrow-icon",
  7942. src: _imports_3
  7943. })
  7944. ]),
  7945. vue.createElementVNode("view", { class: "stat-value" }, [
  7946. vue.createElementVNode(
  7947. "text",
  7948. { class: "num" },
  7949. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  7950. 1
  7951. /* TEXT */
  7952. ),
  7953. vue.createElementVNode("text", { class: "unit" }, "元")
  7954. ]),
  7955. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  7956. ]),
  7957. vue.createElementVNode("view", { class: "divider" }),
  7958. vue.createElementVNode("view", {
  7959. class: "stat-item",
  7960. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  7961. }, [
  7962. vue.createElementVNode("view", { class: "stat-header" }, [
  7963. vue.createElementVNode("view", { class: "green-bar" }),
  7964. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  7965. vue.createElementVNode("image", {
  7966. class: "arrow-icon",
  7967. src: _imports_3
  7968. })
  7969. ]),
  7970. vue.createElementVNode("view", { class: "stat-value" }, [
  7971. vue.createElementVNode(
  7972. "text",
  7973. { class: "num" },
  7974. vue.toDisplayString(((_m = _ctx.profile) == null ? void 0 : _m.orderCount) || 0),
  7975. 1
  7976. /* TEXT */
  7977. ),
  7978. vue.createElementVNode("text", { class: "unit" }, "单")
  7979. ]),
  7980. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  7981. ]),
  7982. vue.createElementVNode("view", { class: "divider" }),
  7983. vue.createElementVNode("view", {
  7984. class: "stat-item",
  7985. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  7986. }, [
  7987. vue.createElementVNode("view", { class: "stat-header" }, [
  7988. vue.createElementVNode("view", { class: "orange-bar" }),
  7989. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  7990. vue.createElementVNode("image", {
  7991. class: "arrow-icon",
  7992. src: _imports_3
  7993. })
  7994. ]),
  7995. vue.createElementVNode("view", { class: "stat-value" }, [
  7996. vue.createElementVNode(
  7997. "text",
  7998. { class: "num" },
  7999. vue.toDisplayString(((_n = _ctx.profile) == null ? void 0 : _n.points) || 0),
  8000. 1
  8001. /* TEXT */
  8002. ),
  8003. vue.createElementVNode("text", { class: "unit" }, "分")
  8004. ]),
  8005. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8006. ])
  8007. ]),
  8008. vue.createElementVNode("view", { class: "menu-list" }, [
  8009. vue.createElementVNode("view", {
  8010. class: "menu-item",
  8011. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToNotification && _ctx.navToNotification(...args))
  8012. }, [
  8013. vue.createElementVNode("image", {
  8014. class: "menu-icon",
  8015. src: _imports_8
  8016. }),
  8017. vue.createElementVNode("text", { class: "menu-text" }, "消息中心"),
  8018. vue.createElementVNode("view", { class: "menu-right" }, [
  8019. vue.createElementVNode("view", { class: "red-dot" }),
  8020. vue.createElementVNode("image", {
  8021. class: "arrow-icon",
  8022. src: _imports_3
  8023. })
  8024. ])
  8025. ]),
  8026. vue.createElementVNode("view", {
  8027. class: "menu-item",
  8028. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8029. }, [
  8030. vue.createElementVNode("image", {
  8031. class: "menu-icon",
  8032. src: _imports_9
  8033. }),
  8034. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8035. vue.createElementVNode("image", {
  8036. class: "arrow-icon",
  8037. src: _imports_3
  8038. })
  8039. ]),
  8040. vue.createElementVNode("view", {
  8041. class: "menu-item",
  8042. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
  8043. }, [
  8044. vue.createElementVNode("image", {
  8045. class: "menu-icon",
  8046. src: _imports_10
  8047. }),
  8048. vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
  8049. vue.createElementVNode("image", {
  8050. class: "arrow-icon",
  8051. src: _imports_3
  8052. })
  8053. ])
  8054. ]),
  8055. vue.createElementVNode("view", {
  8056. class: "logout-btn",
  8057. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.logout && _ctx.logout(...args))
  8058. }, "退出登录"),
  8059. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8060. key: 0,
  8061. class: "service-popup-mask",
  8062. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8063. }, [
  8064. vue.createElementVNode("view", {
  8065. class: "service-popup",
  8066. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  8067. }, ["stop"]))
  8068. }, [
  8069. vue.createElementVNode("view", { class: "service-header" }, [
  8070. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8071. vue.createElementVNode("image", {
  8072. class: "close-icon",
  8073. src: _imports_11,
  8074. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8075. })
  8076. ]),
  8077. vue.createElementVNode("view", { class: "qr-section" }, [
  8078. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8079. vue.createElementVNode("image", {
  8080. class: "qr-img",
  8081. src: _imports_1$8,
  8082. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8083. }),
  8084. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8085. ]),
  8086. vue.createElementVNode("view", { class: "service-list" }, [
  8087. vue.createElementVNode("view", {
  8088. class: "service-row",
  8089. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8090. }, [
  8091. vue.createElementVNode("image", {
  8092. class: "service-row-icon",
  8093. src: _imports_13
  8094. }),
  8095. vue.createElementVNode("view", { class: "service-info" }, [
  8096. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8097. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8098. ]),
  8099. vue.createElementVNode("image", {
  8100. class: "arrow-icon-small",
  8101. src: _imports_3
  8102. })
  8103. ]),
  8104. vue.createElementVNode("view", { class: "service-row" }, [
  8105. vue.createElementVNode("image", {
  8106. class: "service-row-icon",
  8107. src: _imports_14
  8108. }),
  8109. vue.createElementVNode("view", { class: "service-info" }, [
  8110. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8111. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8112. ]),
  8113. vue.createElementVNode("view", {
  8114. class: "call-btn",
  8115. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8116. }, [
  8117. vue.createElementVNode("image", {
  8118. class: "phone-icon-small",
  8119. src: _imports_15
  8120. }),
  8121. vue.createElementVNode("text", null, "拨打")
  8122. ])
  8123. ])
  8124. ])
  8125. ])
  8126. ])) : vue.createCommentVNode("v-if", true),
  8127. vue.createElementVNode(
  8128. "view",
  8129. {
  8130. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8131. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8132. onTouchmove: _cache[20] || (_cache[20] = vue.withModifiers(() => {
  8133. }, ["stop", "prevent"]))
  8134. },
  8135. [
  8136. vue.createElementVNode("view", {
  8137. class: "popup-modal",
  8138. onClick: _cache[18] || (_cache[18] = vue.withModifiers(() => {
  8139. }, ["stop"]))
  8140. }, [
  8141. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8142. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8143. vue.createElementVNode("view", { class: "popup-actions" }, [
  8144. vue.createElementVNode("view", {
  8145. class: "popup-btn cancel",
  8146. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8147. }, "取消"),
  8148. vue.createElementVNode("view", {
  8149. class: "popup-btn confirm",
  8150. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8151. }, "确定")
  8152. ])
  8153. ])
  8154. ],
  8155. 34
  8156. /* CLASS, NEED_HYDRATION */
  8157. )
  8158. ]),
  8159. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8160. ],
  8161. 64
  8162. /* STABLE_FRAGMENT */
  8163. );
  8164. }
  8165. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8166. const _sfc_main$k = {
  8167. data() {
  8168. return {};
  8169. },
  8170. methods: {
  8171. navBack() {
  8172. uni.navigateBack({
  8173. delta: 1
  8174. });
  8175. },
  8176. navTo(type) {
  8177. let url = "";
  8178. switch (type) {
  8179. case "profile":
  8180. url = "/pages/mine/settings/profile/index";
  8181. break;
  8182. case "auth":
  8183. url = "/pages/mine/settings/auth/index";
  8184. break;
  8185. case "bank":
  8186. url = "/pages/mine/settings/bank/index";
  8187. break;
  8188. case "security":
  8189. url = "/pages/mine/settings/security/index";
  8190. break;
  8191. case "push":
  8192. url = "/pages/mine/settings/notification/index";
  8193. break;
  8194. case "about":
  8195. url = "/pages/mine/settings/about/index";
  8196. break;
  8197. default:
  8198. formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
  8199. return;
  8200. }
  8201. uni.navigateTo({ url });
  8202. },
  8203. clearCache() {
  8204. uni.showToast({ title: "缓存已清理", icon: "none" });
  8205. }
  8206. }
  8207. };
  8208. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  8209. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8210. vue.createElementVNode("view", { class: "custom-header" }, [
  8211. vue.createElementVNode("view", {
  8212. class: "header-left",
  8213. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8214. }, [
  8215. vue.createElementVNode("image", {
  8216. class: "back-icon",
  8217. src: _imports_0,
  8218. style: { "transform": "rotate(180deg)" }
  8219. })
  8220. ]),
  8221. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  8222. vue.createElementVNode("view", { class: "header-right" })
  8223. ]),
  8224. vue.createElementVNode("view", { class: "header-placeholder" }),
  8225. vue.createElementVNode("view", { class: "group-card" }, [
  8226. vue.createElementVNode("view", {
  8227. class: "list-item",
  8228. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  8229. }, [
  8230. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  8231. vue.createElementVNode("image", {
  8232. class: "arrow-icon",
  8233. src: _imports_3
  8234. })
  8235. ]),
  8236. vue.createElementVNode("view", {
  8237. class: "list-item",
  8238. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  8239. }, [
  8240. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  8241. vue.createElementVNode("image", {
  8242. class: "arrow-icon",
  8243. src: _imports_3
  8244. })
  8245. ]),
  8246. vue.createElementVNode("view", {
  8247. class: "list-item",
  8248. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
  8249. }, [
  8250. vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
  8251. vue.createElementVNode("view", { class: "item-right" }, [
  8252. vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
  8253. vue.createElementVNode("image", {
  8254. class: "arrow-icon",
  8255. src: _imports_3
  8256. })
  8257. ])
  8258. ]),
  8259. vue.createElementVNode("view", {
  8260. class: "list-item no-border",
  8261. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
  8262. }, [
  8263. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  8264. vue.createElementVNode("image", {
  8265. class: "arrow-icon",
  8266. src: _imports_3
  8267. })
  8268. ])
  8269. ]),
  8270. vue.createElementVNode("view", { class: "group-card" }, [
  8271. vue.createElementVNode("view", {
  8272. class: "list-item",
  8273. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
  8274. }, [
  8275. vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
  8276. vue.createElementVNode("view", { class: "item-right" }, [
  8277. vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
  8278. vue.createElementVNode("image", {
  8279. class: "arrow-icon",
  8280. src: _imports_3
  8281. })
  8282. ])
  8283. ]),
  8284. vue.createElementVNode("view", { class: "list-item" }, [
  8285. vue.createElementVNode("view", { class: "item-row-left" }, [
  8286. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  8287. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  8288. ]),
  8289. vue.createElementVNode("switch", {
  8290. checked: "",
  8291. color: "#FF5722",
  8292. style: { "transform": "scale(0.8)" }
  8293. })
  8294. ]),
  8295. vue.createElementVNode("view", {
  8296. class: "list-item",
  8297. onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
  8298. }, [
  8299. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  8300. vue.createElementVNode("view", { class: "item-right" }, [
  8301. vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
  8302. vue.createElementVNode("image", {
  8303. class: "arrow-icon",
  8304. src: _imports_3
  8305. })
  8306. ])
  8307. ]),
  8308. vue.createElementVNode("view", {
  8309. class: "list-item no-border",
  8310. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
  8311. }, [
  8312. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  8313. vue.createElementVNode("view", { class: "item-right" }, [
  8314. vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
  8315. vue.createElementVNode("image", {
  8316. class: "arrow-icon",
  8317. src: _imports_3
  8318. })
  8319. ])
  8320. ])
  8321. ])
  8322. ]);
  8323. }
  8324. 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"]]);
  8325. const _sfc_main$j = {
  8326. data() {
  8327. return {
  8328. userInfo: {
  8329. name: "",
  8330. workType: "",
  8331. workStatus: "",
  8332. city: "",
  8333. avatar: "/static/touxiang.png",
  8334. stationName: ""
  8335. },
  8336. isStatusPickerShow: false,
  8337. isCityPickerShow: false,
  8338. // 城市级联选择器(与我要加入页面一致)
  8339. selectStep: 0,
  8340. selectedPathway: [],
  8341. currentCityList: [],
  8342. selectedCityId: null
  8343. };
  8344. },
  8345. onLoad() {
  8346. this.loadUserInfo();
  8347. uni.$on("updateName", (newName) => {
  8348. this.userInfo.name = newName;
  8349. });
  8350. },
  8351. onUnload() {
  8352. uni.$off("updateName");
  8353. },
  8354. methods: {
  8355. // 加载用户信息 @author steelwei
  8356. async loadUserInfo() {
  8357. uni.showLoading({ title: "加载中..." });
  8358. try {
  8359. const res = await getMyProfile();
  8360. if (res.code === 200) {
  8361. const data = res.data;
  8362. this.userInfo = {
  8363. name: data.realName || data.name,
  8364. workType: data.workType === "full_time" ? "全职" : "兼职",
  8365. workStatus: this.formatStatus(data.status),
  8366. city: data.cityName || "",
  8367. avatar: data.avatarUrl || "/static/touxiang.png",
  8368. stationName: data.stationName || "未分配站点"
  8369. };
  8370. } else {
  8371. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  8372. }
  8373. } catch (error) {
  8374. formatAppLog("error", "at pages/mine/settings/profile/index.vue:173", "加载用户信息失败:", error);
  8375. uni.showToast({ title: "网络错误", icon: "none" });
  8376. } finally {
  8377. uni.hideLoading();
  8378. }
  8379. },
  8380. // 格式化状态 @author steelwei
  8381. formatStatus(status) {
  8382. const statusMap = {
  8383. "busy": "接单中",
  8384. "resting": "休息中",
  8385. "disabled": "已禁用"
  8386. };
  8387. return statusMap[status] || status;
  8388. },
  8389. navBack() {
  8390. uni.navigateBack({ delta: 1 });
  8391. },
  8392. // 修改头像 @author steelwei
  8393. changeAvatar() {
  8394. uni.chooseImage({
  8395. count: 1,
  8396. success: async (res) => {
  8397. const tempFilePath = res.tempFilePaths[0];
  8398. uni.showLoading({ title: "上传中..." });
  8399. try {
  8400. const uploadRes = await uploadFile(tempFilePath);
  8401. if (uploadRes.code === 200) {
  8402. const avatarUrl = uploadRes.data.url;
  8403. const result = await updateAvatar(avatarUrl);
  8404. if (result.code === 200) {
  8405. this.userInfo.avatar = avatarUrl;
  8406. uni.showToast({ title: "修改成功", icon: "success" });
  8407. } else {
  8408. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  8409. }
  8410. }
  8411. } catch (error) {
  8412. formatAppLog("error", "at pages/mine/settings/profile/index.vue:218", "修改头像失败:", error);
  8413. uni.showToast({ title: "上传失败", icon: "none" });
  8414. } finally {
  8415. uni.hideLoading();
  8416. }
  8417. }
  8418. });
  8419. },
  8420. editName() {
  8421. uni.navigateTo({
  8422. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  8423. });
  8424. },
  8425. showStatusPicker() {
  8426. this.isStatusPickerShow = true;
  8427. },
  8428. closeStatusPicker() {
  8429. this.isStatusPickerShow = false;
  8430. },
  8431. // 选择状态 @author steelwei
  8432. async selectStatus(statusText) {
  8433. const statusMap = {
  8434. "接单中": "busy",
  8435. "休息中": "resting"
  8436. };
  8437. const status = statusMap[statusText];
  8438. try {
  8439. const res = await updateStatus(status);
  8440. if (res.code === 200) {
  8441. this.userInfo.workStatus = statusText;
  8442. uni.showToast({ title: "状态已更新", icon: "success" });
  8443. } else {
  8444. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8445. }
  8446. } catch (error) {
  8447. formatAppLog("error", "at pages/mine/settings/profile/index.vue:258", "修改状态失败:", error);
  8448. uni.showToast({ title: "网络错误", icon: "none" });
  8449. } finally {
  8450. this.closeStatusPicker();
  8451. }
  8452. },
  8453. // 城市级联选择器(与我要加入页面一致) @author steelwei
  8454. async showCityPicker() {
  8455. this.isCityPickerShow = true;
  8456. if (this.selectedPathway.length === 0) {
  8457. await this.resetCityPicker();
  8458. }
  8459. },
  8460. async resetCityPicker() {
  8461. this.selectStep = 0;
  8462. this.selectedPathway = [];
  8463. await this.loadAreaChildren(0);
  8464. },
  8465. closeCityPicker() {
  8466. this.isCityPickerShow = false;
  8467. },
  8468. async loadAreaChildren(parentId) {
  8469. try {
  8470. const res = await getAreaChildren(parentId);
  8471. this.currentCityList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  8472. id: item.id,
  8473. name: item.name,
  8474. type: item.type,
  8475. parentId: item.parentId
  8476. }));
  8477. } catch (err) {
  8478. formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载区域数据失败:", err);
  8479. this.currentCityList = [];
  8480. }
  8481. },
  8482. async selectCityItem(item) {
  8483. this.selectedPathway[this.selectStep] = item;
  8484. if (item.type === 0) {
  8485. this.selectStep++;
  8486. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  8487. await this.loadAreaChildren(item.id);
  8488. if (this.currentCityList.length === 0) {
  8489. this.selectedCityId = item.id;
  8490. this.confirmCity();
  8491. }
  8492. } else {
  8493. this.selectedCityId = item.id;
  8494. this.confirmCity();
  8495. }
  8496. },
  8497. async jumpToStep(step) {
  8498. this.selectStep = step;
  8499. if (step === 0) {
  8500. await this.loadAreaChildren(0);
  8501. } else {
  8502. const parent = this.selectedPathway[step - 1];
  8503. if (parent) {
  8504. await this.loadAreaChildren(parent.id);
  8505. }
  8506. }
  8507. },
  8508. // 确认城市选择 @author steelwei
  8509. async confirmCity() {
  8510. if (this.selectedPathway.length === 0) {
  8511. uni.showToast({ title: "请选择城市", icon: "none" });
  8512. return;
  8513. }
  8514. const cityName = this.selectedPathway.map((i) => i.name).join(" ");
  8515. const cityCode = String(this.selectedCityId);
  8516. try {
  8517. const res = await updateCity(cityCode, cityName);
  8518. if (res.code === 200) {
  8519. this.userInfo.city = cityName;
  8520. uni.showToast({ title: "修改成功", icon: "success" });
  8521. this.closeCityPicker();
  8522. this.selectedPathway = [];
  8523. } else {
  8524. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  8525. }
  8526. } catch (error) {
  8527. formatAppLog("error", "at pages/mine/settings/profile/index.vue:346", "修改城市失败:", error);
  8528. uni.showToast({ title: "网络错误", icon: "none" });
  8529. }
  8530. }
  8531. }
  8532. };
  8533. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  8534. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8535. vue.createElementVNode("view", { class: "custom-header" }, [
  8536. vue.createElementVNode("view", {
  8537. class: "header-left",
  8538. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8539. }, [
  8540. vue.createElementVNode("image", {
  8541. class: "back-icon",
  8542. src: _imports_0,
  8543. style: { "transform": "rotate(180deg)" }
  8544. })
  8545. ]),
  8546. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  8547. vue.createElementVNode("view", { class: "header-right" })
  8548. ]),
  8549. vue.createElementVNode("view", { class: "header-placeholder" }),
  8550. vue.createElementVNode("view", { class: "group-card" }, [
  8551. vue.createElementVNode("view", {
  8552. class: "list-item",
  8553. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  8554. }, [
  8555. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  8556. vue.createElementVNode("view", { class: "item-right" }, [
  8557. vue.createElementVNode("image", {
  8558. class: "user-avatar",
  8559. src: $data.userInfo.avatar,
  8560. mode: "aspectFill"
  8561. }, null, 8, ["src"]),
  8562. vue.createElementVNode("image", {
  8563. class: "arrow-icon",
  8564. src: _imports_3
  8565. })
  8566. ])
  8567. ]),
  8568. vue.createElementVNode("view", {
  8569. class: "list-item",
  8570. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  8571. }, [
  8572. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  8573. vue.createElementVNode("view", { class: "item-right" }, [
  8574. vue.createElementVNode(
  8575. "text",
  8576. { class: "item-value" },
  8577. vue.toDisplayString($data.userInfo.name),
  8578. 1
  8579. /* TEXT */
  8580. ),
  8581. vue.createElementVNode("image", {
  8582. class: "arrow-icon",
  8583. src: _imports_3
  8584. })
  8585. ])
  8586. ])
  8587. ]),
  8588. vue.createElementVNode("view", { class: "group-card" }, [
  8589. vue.createElementVNode("view", { class: "list-item" }, [
  8590. vue.createElementVNode("text", { class: "item-title" }, "工作类型"),
  8591. vue.createElementVNode(
  8592. "view",
  8593. { class: "tag-blue-outline" },
  8594. vue.toDisplayString($data.userInfo.workType),
  8595. 1
  8596. /* TEXT */
  8597. )
  8598. ]),
  8599. vue.createElementVNode("view", {
  8600. class: "list-item",
  8601. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  8602. }, [
  8603. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  8604. vue.createElementVNode("view", { class: "item-right" }, [
  8605. vue.createElementVNode(
  8606. "text",
  8607. { class: "item-value-black" },
  8608. vue.toDisplayString($data.userInfo.workStatus),
  8609. 1
  8610. /* TEXT */
  8611. ),
  8612. vue.createElementVNode("image", {
  8613. class: "arrow-icon",
  8614. src: _imports_3
  8615. })
  8616. ])
  8617. ])
  8618. ]),
  8619. vue.createElementVNode("view", { class: "group-card" }, [
  8620. vue.createElementVNode("view", {
  8621. class: "list-item",
  8622. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  8623. }, [
  8624. vue.createElementVNode("text", { class: "item-title" }, "工作城市"),
  8625. vue.createElementVNode("view", { class: "item-right" }, [
  8626. vue.createElementVNode(
  8627. "text",
  8628. { class: "item-value" },
  8629. vue.toDisplayString($data.userInfo.city),
  8630. 1
  8631. /* TEXT */
  8632. ),
  8633. vue.createElementVNode("image", {
  8634. class: "arrow-icon",
  8635. src: _imports_3
  8636. })
  8637. ])
  8638. ]),
  8639. vue.createElementVNode("view", { class: "list-item no-border" }, [
  8640. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  8641. vue.createElementVNode("view", { class: "item-right" }, [
  8642. vue.createElementVNode(
  8643. "text",
  8644. { class: "item-value" },
  8645. vue.toDisplayString($data.userInfo.stationName || "未分配站点"),
  8646. 1
  8647. /* TEXT */
  8648. )
  8649. ])
  8650. ])
  8651. ]),
  8652. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  8653. key: 0,
  8654. class: "popup-mask",
  8655. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  8656. }, [
  8657. vue.createElementVNode("view", {
  8658. class: "popup-content",
  8659. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  8660. }, ["stop"]))
  8661. }, [
  8662. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  8663. vue.createElementVNode("view", {
  8664. class: "popup-item",
  8665. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  8666. }, "接单中"),
  8667. vue.createElementVNode("view", {
  8668. class: "popup-item",
  8669. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  8670. }, "休息中"),
  8671. vue.createElementVNode("view", {
  8672. class: "popup-cancel",
  8673. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  8674. }, "取消")
  8675. ])
  8676. ])) : vue.createCommentVNode("v-if", true),
  8677. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  8678. key: 1,
  8679. class: "popup-mask",
  8680. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  8681. }, [
  8682. vue.createElementVNode("view", {
  8683. class: "popup-content",
  8684. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  8685. }, ["stop"]))
  8686. }, [
  8687. vue.createElementVNode("view", { class: "popup-header-row" }, [
  8688. vue.createElementVNode("text", {
  8689. class: "popup-btn-cancel",
  8690. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  8691. }, "取消"),
  8692. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市"),
  8693. vue.createElementVNode("text", {
  8694. class: "popup-btn-confirm",
  8695. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  8696. }, "确定")
  8697. ]),
  8698. vue.createElementVNode("view", { class: "picker-body" }, [
  8699. vue.createElementVNode("view", { class: "timeline-area" }, [
  8700. (vue.openBlock(true), vue.createElementBlock(
  8701. vue.Fragment,
  8702. null,
  8703. vue.renderList($data.selectedPathway, (item, index) => {
  8704. return vue.openBlock(), vue.createElementBlock("view", {
  8705. class: "timeline-item",
  8706. key: index,
  8707. onClick: ($event) => $options.jumpToStep(index)
  8708. }, [
  8709. vue.createElementVNode("view", { class: "timeline-dot" }),
  8710. vue.createElementVNode(
  8711. "text",
  8712. null,
  8713. vue.toDisplayString(item.name),
  8714. 1
  8715. /* TEXT */
  8716. )
  8717. ], 8, ["onClick"]);
  8718. }),
  8719. 128
  8720. /* KEYED_FRAGMENT */
  8721. )),
  8722. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  8723. key: 0,
  8724. class: "timeline-item active"
  8725. }, [
  8726. vue.createElementVNode("view", { class: "timeline-dot" }),
  8727. vue.createElementVNode("text", null, "请选择")
  8728. ])) : vue.createCommentVNode("v-if", true)
  8729. ]),
  8730. vue.createElementVNode("scroll-view", {
  8731. "scroll-y": "",
  8732. class: "list-area"
  8733. }, [
  8734. (vue.openBlock(true), vue.createElementBlock(
  8735. vue.Fragment,
  8736. null,
  8737. vue.renderList($data.currentCityList, (item) => {
  8738. return vue.openBlock(), vue.createElementBlock("view", {
  8739. class: "list-item",
  8740. key: item.id,
  8741. onClick: ($event) => $options.selectCityItem(item)
  8742. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  8743. }),
  8744. 128
  8745. /* KEYED_FRAGMENT */
  8746. )),
  8747. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8748. key: 0,
  8749. style: { "padding": "20rpx", "color": "#999" }
  8750. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  8751. ])
  8752. ])
  8753. ])
  8754. ])) : vue.createCommentVNode("v-if", true)
  8755. ]);
  8756. }
  8757. 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"]]);
  8758. const _sfc_main$i = {
  8759. data() {
  8760. return {
  8761. authInfo: {
  8762. realName: "",
  8763. idCard: "",
  8764. idCardFront: "",
  8765. idCardBack: "",
  8766. serviceTypes: [],
  8767. authId: false,
  8768. authQual: false,
  8769. pendingAudit: false,
  8770. qualImages: []
  8771. }
  8772. };
  8773. },
  8774. onLoad() {
  8775. this.loadAuthInfo();
  8776. },
  8777. methods: {
  8778. navBack() {
  8779. uni.navigateBack({
  8780. delta: 1
  8781. });
  8782. },
  8783. async loadAuthInfo() {
  8784. try {
  8785. const res = await getAuthInfo();
  8786. if (res.code === 200 && res.data) {
  8787. this.authInfo = {
  8788. realName: res.data.realName || "",
  8789. idCard: res.data.idCard || "",
  8790. idCardFront: res.data.idCardFrontUrl || "",
  8791. idCardBack: res.data.idCardBackUrl || "",
  8792. serviceTypes: res.data.serviceTypeList || [],
  8793. authId: res.data.authId || false,
  8794. authQual: res.data.authQual || false,
  8795. pendingAudit: res.data.pendingAudit || false,
  8796. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  8797. };
  8798. }
  8799. } catch (e) {
  8800. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  8801. uni.showToast({ title: "加载失败", icon: "none" });
  8802. }
  8803. },
  8804. maskIdCard(idCard) {
  8805. if (!idCard || idCard.length < 8)
  8806. return idCard;
  8807. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  8808. },
  8809. editAuth() {
  8810. uni.showModal({
  8811. title: "提示",
  8812. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  8813. success: (res) => {
  8814. if (res.confirm) {
  8815. uni.navigateTo({
  8816. url: "/pages/mine/settings/auth/edit"
  8817. });
  8818. }
  8819. }
  8820. });
  8821. }
  8822. }
  8823. };
  8824. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  8825. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8826. vue.createElementVNode("view", { class: "custom-header" }, [
  8827. vue.createElementVNode("view", {
  8828. class: "header-left",
  8829. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8830. }, [
  8831. vue.createElementVNode("image", {
  8832. class: "back-icon",
  8833. src: _imports_0,
  8834. style: { "transform": "rotate(180deg)" }
  8835. })
  8836. ]),
  8837. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  8838. vue.createElementVNode("view", { class: "header-right" })
  8839. ]),
  8840. vue.createElementVNode("view", { class: "header-placeholder" }),
  8841. vue.createElementVNode("view", { class: "card" }, [
  8842. vue.createElementVNode("view", { class: "section-header" }, [
  8843. vue.createElementVNode("view", { class: "orange-bar" }),
  8844. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  8845. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  8846. key: 0,
  8847. class: "tag-orange"
  8848. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  8849. key: 1,
  8850. class: "tag-green"
  8851. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  8852. key: 2,
  8853. class: "tag-gray"
  8854. }, "未认证"))
  8855. ]),
  8856. vue.createElementVNode("view", { class: "info-row" }, [
  8857. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  8858. vue.createElementVNode(
  8859. "text",
  8860. { class: "value" },
  8861. vue.toDisplayString($data.authInfo.realName || "未设置"),
  8862. 1
  8863. /* TEXT */
  8864. )
  8865. ]),
  8866. vue.createElementVNode("view", { class: "info-row" }, [
  8867. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  8868. vue.createElementVNode(
  8869. "text",
  8870. { class: "value" },
  8871. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  8872. 1
  8873. /* TEXT */
  8874. )
  8875. ]),
  8876. vue.createElementVNode("view", { class: "id-card-row" }, [
  8877. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  8878. key: 0,
  8879. class: "id-card-box green-bg"
  8880. }, [
  8881. vue.createElementVNode("image", {
  8882. class: "id-card-img",
  8883. src: $data.authInfo.idCardFront,
  8884. mode: "aspectFill"
  8885. }, null, 8, ["src"]),
  8886. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  8887. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8888. key: 1,
  8889. class: "id-card-box green-bg"
  8890. }, [
  8891. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  8892. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  8893. ])),
  8894. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  8895. key: 2,
  8896. class: "id-card-box green-bg"
  8897. }, [
  8898. vue.createElementVNode("image", {
  8899. class: "id-card-img",
  8900. src: $data.authInfo.idCardBack,
  8901. mode: "aspectFill"
  8902. }, null, 8, ["src"]),
  8903. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  8904. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8905. key: 3,
  8906. class: "id-card-box green-bg"
  8907. }, [
  8908. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  8909. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  8910. ]))
  8911. ])
  8912. ]),
  8913. vue.createElementVNode("view", { class: "card" }, [
  8914. vue.createElementVNode("view", { class: "section-header" }, [
  8915. vue.createElementVNode("view", { class: "orange-bar" }),
  8916. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  8917. ]),
  8918. vue.createElementVNode("view", { class: "tags-row" }, [
  8919. (vue.openBlock(true), vue.createElementBlock(
  8920. vue.Fragment,
  8921. null,
  8922. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  8923. return vue.openBlock(), vue.createElementBlock(
  8924. "view",
  8925. {
  8926. class: "service-tag",
  8927. key: index
  8928. },
  8929. vue.toDisplayString(type),
  8930. 1
  8931. /* TEXT */
  8932. );
  8933. }),
  8934. 128
  8935. /* KEYED_FRAGMENT */
  8936. )),
  8937. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  8938. key: 0,
  8939. class: "empty-text"
  8940. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  8941. ])
  8942. ]),
  8943. vue.createElementVNode("view", { class: "card" }, [
  8944. vue.createElementVNode("view", { class: "section-header" }, [
  8945. vue.createElementVNode("view", { class: "orange-bar" }),
  8946. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  8947. ]),
  8948. vue.createElementVNode(
  8949. "text",
  8950. { class: "sub-title" },
  8951. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  8952. 1
  8953. /* TEXT */
  8954. ),
  8955. vue.createElementVNode("view", { class: "cert-row" }, [
  8956. (vue.openBlock(true), vue.createElementBlock(
  8957. vue.Fragment,
  8958. null,
  8959. vue.renderList($data.authInfo.qualImages, (img, index) => {
  8960. return vue.openBlock(), vue.createElementBlock("view", {
  8961. class: "cert-box yellow-bg",
  8962. key: index
  8963. }, [
  8964. vue.createElementVNode("image", {
  8965. class: "cert-img",
  8966. src: img,
  8967. mode: "aspectFill"
  8968. }, null, 8, ["src"])
  8969. ]);
  8970. }),
  8971. 128
  8972. /* KEYED_FRAGMENT */
  8973. )),
  8974. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  8975. key: 0,
  8976. class: "empty-text"
  8977. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  8978. ])
  8979. ]),
  8980. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  8981. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  8982. key: 0,
  8983. class: "action-btn disabled",
  8984. disabled: ""
  8985. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  8986. key: 1,
  8987. class: "action-btn",
  8988. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  8989. }, "修改认证信息")),
  8990. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  8991. key: 2,
  8992. class: "tips"
  8993. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  8994. key: 3,
  8995. class: "tips"
  8996. }, "修改认证信息需要重新审核,审核期间无法接单"))
  8997. ])
  8998. ]);
  8999. }
  9000. 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"]]);
  9001. const _sfc_main$h = {
  9002. data() {
  9003. return {
  9004. idCardFront: "",
  9005. idCardBack: "",
  9006. idCardFrontOssId: "",
  9007. idCardBackOssId: "",
  9008. serviceOptions: [],
  9009. selectedServices: [],
  9010. qualifications: {},
  9011. qualOssIds: {}
  9012. };
  9013. },
  9014. async onLoad() {
  9015. await this.loadServiceOptions();
  9016. this.loadAuthInfo();
  9017. },
  9018. methods: {
  9019. async loadServiceOptions() {
  9020. try {
  9021. const res = await getServiceTypes();
  9022. this.serviceOptions = (res.data || []).map((item) => ({
  9023. id: String(item.id),
  9024. name: item.name
  9025. }));
  9026. } catch (e) {
  9027. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
  9028. }
  9029. },
  9030. async loadAuthInfo() {
  9031. try {
  9032. uni.showLoading({ title: "加载中..." });
  9033. const res = await getAuthInfo();
  9034. if (res.code === 200 && res.data) {
  9035. this.idCardFront = res.data.idCardFrontUrl || "";
  9036. this.idCardBack = res.data.idCardBackUrl || "";
  9037. this.idCardFrontOssId = res.data.idCardFront || "";
  9038. this.idCardBackOssId = res.data.idCardBack || "";
  9039. let serviceIds = [];
  9040. if (res.data.serviceTypes) {
  9041. serviceIds = [...new Set(
  9042. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9043. )];
  9044. }
  9045. this.selectedServices = serviceIds;
  9046. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9047. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9048. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9049. validNames.forEach((name, idx) => {
  9050. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9051. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9052. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9053. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9054. });
  9055. }
  9056. uni.hideLoading();
  9057. } catch (e) {
  9058. uni.hideLoading();
  9059. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
  9060. uni.showToast({ title: "加载失败", icon: "none" });
  9061. }
  9062. },
  9063. navBack() {
  9064. uni.navigateBack({ delta: 1 });
  9065. },
  9066. chooseImage(side) {
  9067. uni.chooseImage({
  9068. count: 1,
  9069. sizeType: ["compressed"],
  9070. sourceType: ["album", "camera"],
  9071. success: async (res) => {
  9072. const tempPath = res.tempFilePaths[0];
  9073. if (side === "front") {
  9074. this.idCardFront = tempPath;
  9075. } else {
  9076. this.idCardBack = tempPath;
  9077. }
  9078. try {
  9079. uni.showLoading({ title: "上传中..." });
  9080. const uploadRes = await uploadFile(tempPath);
  9081. if (side === "front") {
  9082. this.idCardFrontOssId = uploadRes.data.ossId;
  9083. } else {
  9084. this.idCardBackOssId = uploadRes.data.ossId;
  9085. }
  9086. uni.hideLoading();
  9087. uni.showToast({ title: "上传成功", icon: "success" });
  9088. } catch (err) {
  9089. uni.hideLoading();
  9090. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
  9091. uni.showToast({ title: "上传失败", icon: "none" });
  9092. }
  9093. }
  9094. });
  9095. },
  9096. deleteImage(side) {
  9097. if (side === "front") {
  9098. this.idCardFront = "";
  9099. this.idCardFrontOssId = "";
  9100. } else {
  9101. this.idCardBack = "";
  9102. this.idCardBackOssId = "";
  9103. }
  9104. },
  9105. getServiceName(serviceId) {
  9106. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9107. return found ? found.name : "";
  9108. },
  9109. toggleService(service) {
  9110. const index = this.selectedServices.indexOf(service.id);
  9111. if (index > -1) {
  9112. this.selectedServices.splice(index, 1);
  9113. this.$delete(this.qualifications, service.name);
  9114. this.$delete(this.qualOssIds, service.name);
  9115. } else {
  9116. this.selectedServices.push(service.id);
  9117. this.$set(this.qualifications, service.name, []);
  9118. this.$set(this.qualOssIds, service.name, []);
  9119. }
  9120. this.$forceUpdate();
  9121. },
  9122. chooseQualImage(service) {
  9123. uni.chooseImage({
  9124. count: 9,
  9125. sizeType: ["compressed"],
  9126. sourceType: ["album", "camera"],
  9127. success: async (res) => {
  9128. if (!this.qualifications[service]) {
  9129. this.qualifications[service] = [];
  9130. this.qualOssIds[service] = [];
  9131. }
  9132. for (const tempPath of res.tempFilePaths) {
  9133. this.qualifications[service].push(tempPath);
  9134. this.$forceUpdate();
  9135. try {
  9136. uni.showLoading({ title: "上传中..." });
  9137. const uploadRes = await uploadFile(tempPath);
  9138. this.qualOssIds[service].push(uploadRes.data.ossId);
  9139. uni.hideLoading();
  9140. } catch (err) {
  9141. uni.hideLoading();
  9142. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
  9143. }
  9144. }
  9145. }
  9146. });
  9147. },
  9148. deleteQualImage(service, index) {
  9149. this.qualifications[service].splice(index, 1);
  9150. if (this.qualOssIds[service]) {
  9151. this.qualOssIds[service].splice(index, 1);
  9152. }
  9153. this.$forceUpdate();
  9154. },
  9155. previewImage(service, index) {
  9156. uni.previewImage({
  9157. urls: this.qualifications[service],
  9158. current: index
  9159. });
  9160. },
  9161. async submitAuth() {
  9162. if (!this.idCardFront || !this.idCardBack) {
  9163. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  9164. return;
  9165. }
  9166. if (this.selectedServices.length === 0) {
  9167. uni.showToast({ title: "请选择服务类型", icon: "none" });
  9168. return;
  9169. }
  9170. for (const serviceId of this.selectedServices) {
  9171. const name = this.getServiceName(serviceId);
  9172. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  9173. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  9174. return;
  9175. }
  9176. }
  9177. uni.showModal({
  9178. title: "提示",
  9179. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9180. success: (res) => {
  9181. if (res.confirm) {
  9182. this.doSubmit();
  9183. }
  9184. }
  9185. });
  9186. },
  9187. async doSubmit() {
  9188. const allQualOssIds = [];
  9189. Object.values(this.qualOssIds).forEach((ids) => {
  9190. allQualOssIds.push(...ids);
  9191. });
  9192. const submitData = {
  9193. idCardFront: this.idCardFrontOssId,
  9194. idCardBack: this.idCardBackOssId,
  9195. serviceTypes: this.selectedServices.join(","),
  9196. // 逗号分隔的服务类型ID
  9197. qualifications: allQualOssIds.join(",")
  9198. // 逗号分隔的资质图片OSS ID
  9199. };
  9200. try {
  9201. uni.showLoading({ title: "提交中..." });
  9202. await updateAuthInfo(submitData);
  9203. uni.hideLoading();
  9204. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  9205. setTimeout(() => {
  9206. uni.navigateBack({ delta: 1 });
  9207. }, 1500);
  9208. } catch (err) {
  9209. uni.hideLoading();
  9210. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
  9211. uni.showToast({ title: "提交失败", icon: "none" });
  9212. }
  9213. }
  9214. }
  9215. };
  9216. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  9217. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  9218. vue.createElementVNode("view", { class: "custom-header" }, [
  9219. vue.createElementVNode("view", {
  9220. class: "header-left",
  9221. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9222. }, [
  9223. vue.createElementVNode("image", {
  9224. class: "back-icon",
  9225. src: _imports_0,
  9226. style: { "transform": "rotate(180deg)" }
  9227. })
  9228. ]),
  9229. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  9230. vue.createElementVNode("view", { class: "header-right" })
  9231. ]),
  9232. vue.createElementVNode("view", { class: "header-placeholder" }),
  9233. vue.createElementVNode("view", { class: "warning-tip" }, [
  9234. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  9235. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  9236. ]),
  9237. vue.createElementVNode("view", { class: "section-card" }, [
  9238. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  9239. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  9240. vue.createElementVNode("view", { class: "id-card-row" }, [
  9241. vue.createElementVNode("view", {
  9242. class: "id-card-upload",
  9243. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  9244. }, [
  9245. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  9246. key: 0,
  9247. src: $data.idCardFront,
  9248. class: "id-card-img",
  9249. mode: "aspectFill"
  9250. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9251. key: 1,
  9252. class: "id-card-placeholder"
  9253. }, [
  9254. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  9255. ])),
  9256. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9257. key: 2,
  9258. class: "delete-btn",
  9259. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  9260. }, "×")) : vue.createCommentVNode("v-if", true),
  9261. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9262. ]),
  9263. vue.createElementVNode("view", {
  9264. class: "id-card-upload",
  9265. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  9266. }, [
  9267. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  9268. key: 0,
  9269. src: $data.idCardBack,
  9270. class: "id-card-img",
  9271. mode: "aspectFill"
  9272. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9273. key: 1,
  9274. class: "id-card-placeholder"
  9275. }, [
  9276. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  9277. ])),
  9278. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9279. key: 2,
  9280. class: "delete-btn",
  9281. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  9282. }, "×")) : vue.createCommentVNode("v-if", true),
  9283. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9284. ])
  9285. ])
  9286. ]),
  9287. vue.createElementVNode("view", { class: "section-card" }, [
  9288. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  9289. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  9290. vue.createElementVNode("view", { class: "service-list" }, [
  9291. (vue.openBlock(true), vue.createElementBlock(
  9292. vue.Fragment,
  9293. null,
  9294. vue.renderList($data.serviceOptions, (service, index) => {
  9295. return vue.openBlock(), vue.createElementBlock("view", {
  9296. class: "service-item",
  9297. key: service.id,
  9298. onClick: ($event) => $options.toggleService(service)
  9299. }, [
  9300. vue.createElementVNode(
  9301. "text",
  9302. { class: "service-name" },
  9303. vue.toDisplayString(service.name),
  9304. 1
  9305. /* TEXT */
  9306. ),
  9307. vue.createElementVNode(
  9308. "view",
  9309. {
  9310. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  9311. },
  9312. [
  9313. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  9314. ],
  9315. 2
  9316. /* CLASS */
  9317. )
  9318. ], 8, ["onClick"]);
  9319. }),
  9320. 128
  9321. /* KEYED_FRAGMENT */
  9322. ))
  9323. ])
  9324. ]),
  9325. vue.createElementVNode("view", { class: "section-card" }, [
  9326. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  9327. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  9328. (vue.openBlock(true), vue.createElementBlock(
  9329. vue.Fragment,
  9330. null,
  9331. vue.renderList($data.selectedServices, (serviceId, index) => {
  9332. return vue.openBlock(), vue.createElementBlock("view", {
  9333. key: serviceId,
  9334. class: "qual-section"
  9335. }, [
  9336. vue.createElementVNode(
  9337. "text",
  9338. { class: "qual-title" },
  9339. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  9340. 1
  9341. /* TEXT */
  9342. ),
  9343. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  9344. (vue.openBlock(true), vue.createElementBlock(
  9345. vue.Fragment,
  9346. null,
  9347. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  9348. return vue.openBlock(), vue.createElementBlock("view", {
  9349. class: "qual-item",
  9350. key: imgIndex,
  9351. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  9352. }, [
  9353. vue.createElementVNode("image", {
  9354. src: img,
  9355. class: "qual-img",
  9356. mode: "aspectFill"
  9357. }, null, 8, ["src"]),
  9358. vue.createElementVNode("view", {
  9359. class: "delete-btn",
  9360. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  9361. }, "×", 8, ["onClick"])
  9362. ], 8, ["onClick"]);
  9363. }),
  9364. 128
  9365. /* KEYED_FRAGMENT */
  9366. )),
  9367. vue.createElementVNode("view", {
  9368. class: "qual-upload-btn",
  9369. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  9370. }, [
  9371. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  9372. ], 8, ["onClick"])
  9373. ])
  9374. ]);
  9375. }),
  9376. 128
  9377. /* KEYED_FRAGMENT */
  9378. )),
  9379. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9380. key: 0,
  9381. class: "empty-hint"
  9382. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  9383. ]),
  9384. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9385. vue.createElementVNode("button", {
  9386. class: "submit-btn",
  9387. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  9388. }, "提交审核")
  9389. ])
  9390. ]);
  9391. }
  9392. 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"]]);
  9393. const _imports_1$3 = "/static/icons/shield.svg";
  9394. const _sfc_main$g = {
  9395. data() {
  9396. return {
  9397. hasShieldIcon: false
  9398. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  9399. };
  9400. },
  9401. methods: {
  9402. navBack() {
  9403. uni.navigateBack({
  9404. delta: 1
  9405. });
  9406. },
  9407. editBank() {
  9408. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  9409. }
  9410. }
  9411. };
  9412. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  9413. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9414. vue.createElementVNode("view", { class: "custom-header" }, [
  9415. vue.createElementVNode("view", {
  9416. class: "header-left",
  9417. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9418. }, [
  9419. vue.createElementVNode("image", {
  9420. class: "back-icon",
  9421. src: _imports_0,
  9422. style: { "transform": "rotate(180deg)" }
  9423. })
  9424. ]),
  9425. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  9426. vue.createElementVNode("view", { class: "header-right" })
  9427. ]),
  9428. vue.createElementVNode("view", { class: "header-placeholder" }),
  9429. vue.createElementVNode("view", { class: "bank-card" }, [
  9430. vue.createElementVNode("view", { class: "card-top" }, [
  9431. vue.createElementVNode("view", { class: "bank-info" }, [
  9432. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  9433. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  9434. ]),
  9435. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  9436. ]),
  9437. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  9438. ]),
  9439. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  9440. vue.createElementVNode("view", { class: "card-bg-circle" })
  9441. ]),
  9442. vue.createElementVNode("button", {
  9443. class: "action-btn",
  9444. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  9445. }, "修改银行卡信息"),
  9446. vue.createElementVNode("view", { class: "security-tip" }, [
  9447. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  9448. key: 0,
  9449. class: "shield-icon",
  9450. src: _imports_1$3
  9451. })) : vue.createCommentVNode("v-if", true),
  9452. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  9453. ])
  9454. ]);
  9455. }
  9456. 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"]]);
  9457. const _sfc_main$f = {
  9458. data() {
  9459. return {
  9460. phone: "",
  9461. hasPassword: false
  9462. };
  9463. },
  9464. onLoad() {
  9465. this.loadProfile();
  9466. },
  9467. methods: {
  9468. navBack() {
  9469. uni.navigateBack({
  9470. delta: 1
  9471. });
  9472. },
  9473. async loadProfile() {
  9474. try {
  9475. const res = await getMyProfile();
  9476. if (res.code === 200 && res.data) {
  9477. this.phone = res.data.phone || "";
  9478. this.hasPassword = !!res.data.hasPassword;
  9479. }
  9480. } catch (e) {
  9481. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  9482. }
  9483. },
  9484. maskPhone(phone) {
  9485. if (!phone || phone.length < 11)
  9486. return phone;
  9487. return phone.substring(0, 3) + "****" + phone.substring(7);
  9488. },
  9489. changeMobile() {
  9490. uni.navigateTo({
  9491. url: "/pages/mine/settings/security/change-phone"
  9492. });
  9493. },
  9494. changePassword() {
  9495. uni.navigateTo({
  9496. url: "/pages/mine/settings/security/change-password"
  9497. });
  9498. },
  9499. async deleteAccount() {
  9500. uni.showModal({
  9501. title: "警示",
  9502. content: "注销账号后将无法恢复,确定要继续吗?",
  9503. success: async (res) => {
  9504. if (res.confirm) {
  9505. try {
  9506. const result = await deleteAccount();
  9507. if (result.code === 200) {
  9508. uni.showToast({ title: "账号已注销", icon: "success" });
  9509. setTimeout(() => {
  9510. uni.reLaunch({ url: "/pages/login/login" });
  9511. }, 1500);
  9512. } else {
  9513. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  9514. }
  9515. } catch (e) {
  9516. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  9517. uni.showToast({ title: "注销失败", icon: "none" });
  9518. }
  9519. }
  9520. }
  9521. });
  9522. }
  9523. }
  9524. };
  9525. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  9526. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9527. vue.createElementVNode("view", { class: "custom-header" }, [
  9528. vue.createElementVNode("view", {
  9529. class: "header-left",
  9530. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9531. }, [
  9532. vue.createElementVNode("image", {
  9533. class: "back-icon",
  9534. src: _imports_0,
  9535. style: { "transform": "rotate(180deg)" }
  9536. })
  9537. ]),
  9538. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  9539. vue.createElementVNode("view", { class: "header-right" })
  9540. ]),
  9541. vue.createElementVNode("view", { class: "header-placeholder" }),
  9542. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  9543. vue.createElementVNode("view", { class: "group-card" }, [
  9544. vue.createElementVNode("view", {
  9545. class: "list-item",
  9546. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  9547. }, [
  9548. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  9549. vue.createElementVNode("view", { class: "item-right" }, [
  9550. vue.createElementVNode(
  9551. "text",
  9552. { class: "item-value" },
  9553. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  9554. 1
  9555. /* TEXT */
  9556. ),
  9557. vue.createElementVNode("image", {
  9558. class: "arrow-icon",
  9559. src: _imports_3
  9560. })
  9561. ])
  9562. ]),
  9563. vue.createElementVNode("view", {
  9564. class: "list-item",
  9565. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  9566. }, [
  9567. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  9568. vue.createElementVNode("view", { class: "item-right" }, [
  9569. vue.createElementVNode(
  9570. "text",
  9571. { class: "item-value" },
  9572. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  9573. 1
  9574. /* TEXT */
  9575. ),
  9576. vue.createElementVNode("image", {
  9577. class: "arrow-icon",
  9578. src: _imports_3
  9579. })
  9580. ])
  9581. ])
  9582. ]),
  9583. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  9584. vue.createElementVNode("view", { class: "group-card" }, [
  9585. vue.createElementVNode("view", {
  9586. class: "list-item no-border",
  9587. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  9588. }, [
  9589. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  9590. vue.createElementVNode("image", {
  9591. class: "arrow-icon",
  9592. src: _imports_3
  9593. })
  9594. ])
  9595. ])
  9596. ]);
  9597. }
  9598. 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"]]);
  9599. const _sfc_main$e = {
  9600. data() {
  9601. return {
  9602. name: ""
  9603. };
  9604. },
  9605. onLoad(options) {
  9606. if (options.name) {
  9607. this.name = decodeURIComponent(options.name);
  9608. }
  9609. },
  9610. methods: {
  9611. navBack() {
  9612. uni.navigateBack({ delta: 1 });
  9613. },
  9614. // 提交修改 @author steelwei
  9615. async submitChange() {
  9616. if (!this.name || !this.name.trim()) {
  9617. uni.showToast({ title: "请输入姓名", icon: "none" });
  9618. return;
  9619. }
  9620. if (this.name.trim().length < 2) {
  9621. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  9622. return;
  9623. }
  9624. uni.showLoading({ title: "提交中..." });
  9625. try {
  9626. const res = await updateName(this.name.trim());
  9627. if (res.code === 200) {
  9628. uni.showToast({
  9629. title: "修改成功",
  9630. icon: "success",
  9631. duration: 2e3
  9632. });
  9633. uni.$emit("updateName", this.name.trim());
  9634. setTimeout(() => {
  9635. uni.navigateBack({ delta: 1 });
  9636. }, 2e3);
  9637. } else {
  9638. uni.showToast({
  9639. title: res.msg || "修改失败",
  9640. icon: "none"
  9641. });
  9642. }
  9643. } catch (error) {
  9644. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  9645. uni.showToast({ title: "网络错误", icon: "none" });
  9646. } finally {
  9647. uni.hideLoading();
  9648. }
  9649. }
  9650. }
  9651. };
  9652. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  9653. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9654. vue.createElementVNode("view", { class: "custom-header" }, [
  9655. vue.createElementVNode("view", {
  9656. class: "header-left",
  9657. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9658. }, [
  9659. vue.createElementVNode("image", {
  9660. class: "back-icon",
  9661. src: _imports_0,
  9662. style: { "transform": "rotate(180deg)" }
  9663. })
  9664. ]),
  9665. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  9666. vue.createElementVNode("view", { class: "header-right" })
  9667. ]),
  9668. vue.createElementVNode("view", { class: "header-placeholder" }),
  9669. vue.createElementVNode("view", { class: "form-card" }, [
  9670. vue.createElementVNode("view", { class: "form-item no-border" }, [
  9671. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  9672. vue.withDirectives(vue.createElementVNode(
  9673. "input",
  9674. {
  9675. class: "form-input",
  9676. type: "text",
  9677. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  9678. placeholder: "请输入真实姓名",
  9679. "placeholder-class": "placeholder",
  9680. maxlength: "20"
  9681. },
  9682. null,
  9683. 512
  9684. /* NEED_PATCH */
  9685. ), [
  9686. [vue.vModelText, $data.name]
  9687. ])
  9688. ])
  9689. ]),
  9690. vue.createElementVNode("view", { class: "btn-area" }, [
  9691. vue.createElementVNode("button", {
  9692. class: "submit-btn",
  9693. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  9694. }, "确认修改")
  9695. ]),
  9696. vue.createElementVNode("view", { class: "tips" }, [
  9697. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  9698. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  9699. ])
  9700. ]);
  9701. }
  9702. 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"]]);
  9703. const _sfc_main$d = {
  9704. data() {
  9705. return {
  9706. oldPassword: "",
  9707. newPassword: "",
  9708. confirmPassword: ""
  9709. };
  9710. },
  9711. methods: {
  9712. navBack() {
  9713. uni.navigateBack({ delta: 1 });
  9714. },
  9715. // 提交修改 @author steelwei
  9716. async submitChange() {
  9717. if (!this.oldPassword) {
  9718. uni.showToast({ title: "请输入旧密码", icon: "none" });
  9719. return;
  9720. }
  9721. if (!this.newPassword) {
  9722. uni.showToast({ title: "请输入新密码", icon: "none" });
  9723. return;
  9724. }
  9725. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  9726. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  9727. return;
  9728. }
  9729. if (this.newPassword !== this.confirmPassword) {
  9730. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  9731. return;
  9732. }
  9733. uni.showLoading({ title: "提交中..." });
  9734. try {
  9735. const res = await updatePassword(this.oldPassword, this.newPassword);
  9736. if (res.code === 200) {
  9737. uni.showToast({
  9738. title: "修改成功",
  9739. icon: "success",
  9740. duration: 2e3
  9741. });
  9742. setTimeout(() => {
  9743. uni.navigateBack({ delta: 1 });
  9744. }, 2e3);
  9745. } else {
  9746. uni.showToast({
  9747. title: res.msg || "修改失败",
  9748. icon: "none"
  9749. });
  9750. }
  9751. } catch (error) {
  9752. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  9753. uni.showToast({ title: "网络错误", icon: "none" });
  9754. } finally {
  9755. uni.hideLoading();
  9756. }
  9757. }
  9758. }
  9759. };
  9760. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  9761. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9762. vue.createElementVNode("view", { class: "custom-header" }, [
  9763. vue.createElementVNode("view", {
  9764. class: "header-left",
  9765. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9766. }, [
  9767. vue.createElementVNode("image", {
  9768. class: "back-icon",
  9769. src: _imports_0,
  9770. style: { "transform": "rotate(180deg)" }
  9771. })
  9772. ]),
  9773. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  9774. vue.createElementVNode("view", { class: "header-right" })
  9775. ]),
  9776. vue.createElementVNode("view", { class: "header-placeholder" }),
  9777. vue.createElementVNode("view", { class: "form-card" }, [
  9778. vue.createElementVNode("view", { class: "form-item" }, [
  9779. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  9780. vue.withDirectives(vue.createElementVNode(
  9781. "input",
  9782. {
  9783. class: "form-input",
  9784. type: "password",
  9785. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  9786. placeholder: "请输入旧密码",
  9787. "placeholder-class": "placeholder"
  9788. },
  9789. null,
  9790. 512
  9791. /* NEED_PATCH */
  9792. ), [
  9793. [vue.vModelText, $data.oldPassword]
  9794. ])
  9795. ]),
  9796. vue.createElementVNode("view", { class: "form-item" }, [
  9797. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  9798. vue.withDirectives(vue.createElementVNode(
  9799. "input",
  9800. {
  9801. class: "form-input",
  9802. type: "password",
  9803. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  9804. placeholder: "请输入新密码(6-20位)",
  9805. "placeholder-class": "placeholder"
  9806. },
  9807. null,
  9808. 512
  9809. /* NEED_PATCH */
  9810. ), [
  9811. [vue.vModelText, $data.newPassword]
  9812. ])
  9813. ]),
  9814. vue.createElementVNode("view", { class: "form-item no-border" }, [
  9815. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  9816. vue.withDirectives(vue.createElementVNode(
  9817. "input",
  9818. {
  9819. class: "form-input",
  9820. type: "password",
  9821. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  9822. placeholder: "请再次输入新密码",
  9823. "placeholder-class": "placeholder"
  9824. },
  9825. null,
  9826. 512
  9827. /* NEED_PATCH */
  9828. ), [
  9829. [vue.vModelText, $data.confirmPassword]
  9830. ])
  9831. ])
  9832. ]),
  9833. vue.createElementVNode("view", { class: "btn-area" }, [
  9834. vue.createElementVNode("button", {
  9835. class: "submit-btn",
  9836. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  9837. }, "确认修改")
  9838. ])
  9839. ]);
  9840. }
  9841. 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"]]);
  9842. const _sfc_main$c = {
  9843. data() {
  9844. return {
  9845. phone: "",
  9846. code: "",
  9847. countdown: 0,
  9848. timer: null
  9849. };
  9850. },
  9851. onUnload() {
  9852. if (this.timer) {
  9853. clearInterval(this.timer);
  9854. }
  9855. },
  9856. methods: {
  9857. navBack() {
  9858. uni.navigateBack({ delta: 1 });
  9859. },
  9860. // 发送验证码 @author steelwei
  9861. sendCode() {
  9862. if (!this.phone) {
  9863. uni.showToast({ title: "请输入手机号", icon: "none" });
  9864. return;
  9865. }
  9866. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  9867. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  9868. return;
  9869. }
  9870. uni.showToast({ title: "验证码已发送", icon: "success" });
  9871. this.countdown = 60;
  9872. this.timer = setInterval(() => {
  9873. this.countdown--;
  9874. if (this.countdown <= 0) {
  9875. clearInterval(this.timer);
  9876. }
  9877. }, 1e3);
  9878. },
  9879. // 提交修改 @author steelwei
  9880. async submitChange() {
  9881. if (!this.phone) {
  9882. uni.showToast({ title: "请输入手机号", icon: "none" });
  9883. return;
  9884. }
  9885. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  9886. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  9887. return;
  9888. }
  9889. if (!this.code) {
  9890. uni.showToast({ title: "请输入验证码", icon: "none" });
  9891. return;
  9892. }
  9893. uni.showLoading({ title: "提交中..." });
  9894. try {
  9895. const res = await updatePhone(this.phone, this.code);
  9896. if (res.code === 200) {
  9897. uni.showToast({
  9898. title: "修改成功",
  9899. icon: "success",
  9900. duration: 2e3
  9901. });
  9902. setTimeout(() => {
  9903. uni.navigateBack({ delta: 1 });
  9904. }, 2e3);
  9905. } else {
  9906. uni.showToast({
  9907. title: res.msg || "修改失败",
  9908. icon: "none"
  9909. });
  9910. }
  9911. } catch (error) {
  9912. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  9913. uni.showToast({ title: "网络错误", icon: "none" });
  9914. } finally {
  9915. uni.hideLoading();
  9916. }
  9917. }
  9918. }
  9919. };
  9920. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  9921. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9922. vue.createElementVNode("view", { class: "custom-header" }, [
  9923. vue.createElementVNode("view", {
  9924. class: "header-left",
  9925. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9926. }, [
  9927. vue.createElementVNode("image", {
  9928. class: "back-icon",
  9929. src: _imports_0,
  9930. style: { "transform": "rotate(180deg)" }
  9931. })
  9932. ]),
  9933. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  9934. vue.createElementVNode("view", { class: "header-right" })
  9935. ]),
  9936. vue.createElementVNode("view", { class: "header-placeholder" }),
  9937. vue.createElementVNode("view", { class: "form-card" }, [
  9938. vue.createElementVNode("view", { class: "form-item" }, [
  9939. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  9940. vue.withDirectives(vue.createElementVNode(
  9941. "input",
  9942. {
  9943. class: "form-input",
  9944. type: "number",
  9945. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  9946. placeholder: "请输入新手机号",
  9947. "placeholder-class": "placeholder",
  9948. maxlength: "11"
  9949. },
  9950. null,
  9951. 512
  9952. /* NEED_PATCH */
  9953. ), [
  9954. [vue.vModelText, $data.phone]
  9955. ])
  9956. ]),
  9957. vue.createElementVNode("view", { class: "form-item no-border" }, [
  9958. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  9959. vue.withDirectives(vue.createElementVNode(
  9960. "input",
  9961. {
  9962. class: "form-input",
  9963. type: "number",
  9964. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  9965. placeholder: "请输入验证码",
  9966. "placeholder-class": "placeholder",
  9967. maxlength: "6"
  9968. },
  9969. null,
  9970. 512
  9971. /* NEED_PATCH */
  9972. ), [
  9973. [vue.vModelText, $data.code]
  9974. ]),
  9975. vue.createElementVNode("button", {
  9976. class: "code-btn",
  9977. disabled: $data.countdown > 0,
  9978. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  9979. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  9980. ])
  9981. ]),
  9982. vue.createElementVNode("view", { class: "btn-area" }, [
  9983. vue.createElementVNode("button", {
  9984. class: "submit-btn",
  9985. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  9986. }, "确认修改")
  9987. ]),
  9988. vue.createElementVNode("view", { class: "tips" }, [
  9989. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  9990. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  9991. ])
  9992. ]);
  9993. }
  9994. 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"]]);
  9995. const _sfc_main$b = {
  9996. data() {
  9997. return {};
  9998. },
  9999. methods: {
  10000. navBack() {
  10001. uni.navigateBack({
  10002. delta: 1
  10003. });
  10004. },
  10005. switchChange(type, e) {
  10006. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10007. }
  10008. }
  10009. };
  10010. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10011. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10012. vue.createElementVNode("view", { class: "custom-header" }, [
  10013. vue.createElementVNode("view", {
  10014. class: "header-left",
  10015. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10016. }, [
  10017. vue.createElementVNode("image", {
  10018. class: "back-icon",
  10019. src: _imports_0,
  10020. style: { "transform": "rotate(180deg)" }
  10021. })
  10022. ]),
  10023. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10024. vue.createElementVNode("view", { class: "header-right" })
  10025. ]),
  10026. vue.createElementVNode("view", { class: "header-placeholder" }),
  10027. vue.createElementVNode("view", { class: "group-card" }, [
  10028. vue.createElementVNode("view", { class: "list-item" }, [
  10029. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10030. vue.createElementVNode(
  10031. "switch",
  10032. {
  10033. checked: "",
  10034. color: "#FF5722",
  10035. style: { "transform": "scale(0.8)" },
  10036. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10037. },
  10038. null,
  10039. 32
  10040. /* NEED_HYDRATION */
  10041. )
  10042. ]),
  10043. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10044. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10045. vue.createElementVNode(
  10046. "switch",
  10047. {
  10048. checked: "",
  10049. color: "#FF5722",
  10050. style: { "transform": "scale(0.8)" },
  10051. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10052. },
  10053. null,
  10054. 32
  10055. /* NEED_HYDRATION */
  10056. )
  10057. ])
  10058. ]),
  10059. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10060. ]);
  10061. }
  10062. 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"]]);
  10063. const _sfc_main$a = {
  10064. data() {
  10065. return {};
  10066. },
  10067. methods: {
  10068. navBack() {
  10069. uni.navigateBack({
  10070. delta: 1
  10071. });
  10072. }
  10073. }
  10074. };
  10075. function _sfc_render$9(_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: "logo-area" }, [
  10093. vue.createElementVNode("image", {
  10094. class: "app-logo",
  10095. src: _imports_1$8,
  10096. mode: "aspectFit"
  10097. }),
  10098. vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
  10099. vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
  10100. ]),
  10101. vue.createElementVNode("view", { class: "group-card" }, [
  10102. vue.createElementVNode("view", { class: "list-item" }, [
  10103. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10104. vue.createElementVNode("image", {
  10105. class: "arrow-icon",
  10106. src: _imports_3
  10107. })
  10108. ]),
  10109. vue.createElementVNode("view", { class: "list-item" }, [
  10110. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10111. vue.createElementVNode("image", {
  10112. class: "arrow-icon",
  10113. src: _imports_3
  10114. })
  10115. ]),
  10116. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10117. vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
  10118. vue.createElementVNode("view", { class: "item-right" }, [
  10119. vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
  10120. vue.createElementVNode("image", {
  10121. class: "arrow-icon",
  10122. src: _imports_3
  10123. })
  10124. ])
  10125. ])
  10126. ])
  10127. ]);
  10128. }
  10129. 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"]]);
  10130. const _imports_1$2 = "/static/icons/wallet_white.svg";
  10131. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  10132. const _sfc_main$9 = {
  10133. data() {
  10134. return {
  10135. currentTab: 0,
  10136. list: [
  10137. {
  10138. title: "订单服务费用",
  10139. desc: "订单 T1002839 完成结算",
  10140. time: "2026-02-03 14:30",
  10141. amount: "20.00",
  10142. type: "income",
  10143. tag: "订单"
  10144. },
  10145. {
  10146. title: "奖励费用",
  10147. desc: "早高峰冲单奖励",
  10148. time: "2026-02-03 10:00",
  10149. amount: "15.00",
  10150. type: "income",
  10151. tag: "奖励"
  10152. },
  10153. {
  10154. title: "惩罚金额",
  10155. desc: "超时送达扣款",
  10156. time: "2026-02-02 18:20",
  10157. amount: "-10.00",
  10158. type: "expense",
  10159. tag: "惩罚"
  10160. },
  10161. {
  10162. title: "后台转账",
  10163. desc: "2026年1月工资发放",
  10164. time: "2026-02-01 09:00",
  10165. amount: "3500.00",
  10166. type: "income",
  10167. tag: "工资"
  10168. }
  10169. ]
  10170. };
  10171. },
  10172. computed: {
  10173. displayList() {
  10174. if (this.currentTab === 0)
  10175. return this.list;
  10176. if (this.currentTab === 1)
  10177. return this.list.filter((item) => item.type === "income");
  10178. if (this.currentTab === 2)
  10179. return this.list.filter((item) => item.type === "expense");
  10180. return [];
  10181. }
  10182. },
  10183. methods: {
  10184. navBack() {
  10185. uni.navigateBack();
  10186. },
  10187. navToBill() {
  10188. uni.navigateTo({
  10189. url: "/pages/mine/wallet/bill"
  10190. });
  10191. },
  10192. switchTab(index) {
  10193. this.currentTab = index;
  10194. }
  10195. }
  10196. };
  10197. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  10198. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10199. vue.createElementVNode("view", { class: "nav-bar" }, [
  10200. vue.createElementVNode("view", {
  10201. class: "nav-left",
  10202. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10203. }, [
  10204. vue.createElementVNode("image", {
  10205. class: "back-icon",
  10206. src: _imports_0
  10207. })
  10208. ]),
  10209. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  10210. vue.createElementVNode("view", { class: "nav-right" })
  10211. ]),
  10212. vue.createElementVNode("view", { class: "wallet-card" }, [
  10213. vue.createElementVNode("view", { class: "bg-circle big" }),
  10214. vue.createElementVNode("view", { class: "bg-circle small" }),
  10215. vue.createElementVNode("view", { class: "card-content" }, [
  10216. vue.createElementVNode("view", { class: "card-top" }, [
  10217. vue.createElementVNode("view", { class: "app-info" }, [
  10218. vue.createElementVNode("image", {
  10219. class: "app-logo",
  10220. src: _imports_1$2,
  10221. mode: "aspectFit"
  10222. }),
  10223. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  10224. ]),
  10225. vue.createElementVNode("view", {
  10226. class: "bill-btn",
  10227. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  10228. }, [
  10229. vue.createElementVNode("text", null, "账单")
  10230. ])
  10231. ]),
  10232. vue.createElementVNode("view", { class: "balance-container" }, [
  10233. vue.createElementVNode("view", { class: "balance-main" }, [
  10234. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  10235. vue.createElementVNode("text", { class: "balance-num" }, "2575.00")
  10236. ]),
  10237. vue.createElementVNode("view", { class: "balance-pending" }, [
  10238. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  10239. vue.createElementVNode("text", { class: "pending-num" }, "580.00")
  10240. ])
  10241. ])
  10242. ])
  10243. ]),
  10244. vue.createElementVNode("view", { class: "record-container" }, [
  10245. vue.createElementVNode("view", { class: "record-header" }, [
  10246. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  10247. vue.createElementVNode("view", {
  10248. class: "header-more",
  10249. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  10250. }, [
  10251. vue.createElementVNode("text", null, "查看全部"),
  10252. vue.createElementVNode("image", {
  10253. class: "more-icon",
  10254. src: _imports_2$2
  10255. })
  10256. ])
  10257. ]),
  10258. vue.createElementVNode("view", { class: "tabs-row" }, [
  10259. vue.createElementVNode(
  10260. "view",
  10261. {
  10262. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10263. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  10264. },
  10265. [
  10266. vue.createElementVNode("text", null, "全部"),
  10267. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10268. key: 0,
  10269. class: "tab-line"
  10270. })) : vue.createCommentVNode("v-if", true)
  10271. ],
  10272. 2
  10273. /* CLASS */
  10274. ),
  10275. vue.createElementVNode(
  10276. "view",
  10277. {
  10278. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10279. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  10280. },
  10281. [
  10282. vue.createElementVNode("text", null, "收入"),
  10283. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10284. key: 0,
  10285. class: "tab-line"
  10286. })) : vue.createCommentVNode("v-if", true)
  10287. ],
  10288. 2
  10289. /* CLASS */
  10290. ),
  10291. vue.createElementVNode(
  10292. "view",
  10293. {
  10294. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10295. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  10296. },
  10297. [
  10298. vue.createElementVNode("text", null, "支出"),
  10299. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10300. key: 0,
  10301. class: "tab-line"
  10302. })) : vue.createCommentVNode("v-if", true)
  10303. ],
  10304. 2
  10305. /* CLASS */
  10306. )
  10307. ]),
  10308. vue.createElementVNode("view", { class: "record-list" }, [
  10309. (vue.openBlock(true), vue.createElementBlock(
  10310. vue.Fragment,
  10311. null,
  10312. vue.renderList($options.displayList, (item, index) => {
  10313. return vue.openBlock(), vue.createElementBlock("view", {
  10314. class: "list-item",
  10315. key: index
  10316. }, [
  10317. vue.createElementVNode("view", { class: "item-left" }, [
  10318. vue.createElementVNode(
  10319. "text",
  10320. { class: "item-title" },
  10321. vue.toDisplayString(item.title),
  10322. 1
  10323. /* TEXT */
  10324. ),
  10325. vue.createElementVNode(
  10326. "text",
  10327. { class: "item-desc" },
  10328. vue.toDisplayString(item.desc),
  10329. 1
  10330. /* TEXT */
  10331. ),
  10332. vue.createElementVNode(
  10333. "text",
  10334. { class: "item-time" },
  10335. vue.toDisplayString(item.time),
  10336. 1
  10337. /* TEXT */
  10338. )
  10339. ]),
  10340. vue.createElementVNode("view", { class: "item-right" }, [
  10341. vue.createElementVNode(
  10342. "text",
  10343. {
  10344. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10345. },
  10346. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10347. 3
  10348. /* TEXT, CLASS */
  10349. ),
  10350. vue.createElementVNode("view", { class: "item-tag" }, [
  10351. vue.createElementVNode(
  10352. "text",
  10353. null,
  10354. vue.toDisplayString(item.tag),
  10355. 1
  10356. /* TEXT */
  10357. )
  10358. ])
  10359. ])
  10360. ]);
  10361. }),
  10362. 128
  10363. /* KEYED_FRAGMENT */
  10364. ))
  10365. ])
  10366. ])
  10367. ]);
  10368. }
  10369. 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"]]);
  10370. const _sfc_main$8 = {
  10371. data() {
  10372. return {
  10373. currentTab: 0,
  10374. // 模拟数据结构
  10375. groups: [
  10376. {
  10377. month: "2月 2026",
  10378. income: "35.00",
  10379. expense: "10.00",
  10380. items: [
  10381. {
  10382. title: "订单服务费用",
  10383. desc: "订单完成",
  10384. time: "02-03 14:30",
  10385. amount: "20.00",
  10386. type: "income",
  10387. tag: "订单"
  10388. },
  10389. {
  10390. title: "奖励费用",
  10391. desc: "早高峰奖励",
  10392. // shortened to match ui better
  10393. time: "02-03 10:00",
  10394. amount: "15.00",
  10395. type: "income",
  10396. tag: "奖励"
  10397. },
  10398. {
  10399. title: "惩罚金额",
  10400. desc: "超时送达",
  10401. time: "02-02 18:20",
  10402. amount: "-10.00",
  10403. type: "expense",
  10404. tag: "惩罚"
  10405. }
  10406. ]
  10407. },
  10408. {
  10409. month: "1月 2026",
  10410. income: "3500.00",
  10411. expense: "100.00",
  10412. items: [
  10413. {
  10414. title: "后台转账",
  10415. desc: "1月工资发放",
  10416. time: "01-31 09:00",
  10417. amount: "3500.00",
  10418. type: "income",
  10419. tag: "工资"
  10420. },
  10421. {
  10422. title: "装备扣款",
  10423. desc: "装备费用",
  10424. time: "01-15 10:00",
  10425. amount: "-100.00",
  10426. type: "expense",
  10427. tag: "扣款"
  10428. }
  10429. ]
  10430. }
  10431. ]
  10432. };
  10433. },
  10434. computed: {
  10435. displayGroups() {
  10436. if (this.currentTab === 0)
  10437. return this.groups;
  10438. return this.groups.map((group) => {
  10439. const filteredItems = group.items.filter((item) => {
  10440. const type = this.currentTab === 1 ? "income" : "expense";
  10441. return item.type === type;
  10442. });
  10443. return {
  10444. ...group,
  10445. items: filteredItems
  10446. };
  10447. }).filter((group) => group.items.length > 0);
  10448. }
  10449. },
  10450. methods: {
  10451. navBack() {
  10452. uni.navigateBack();
  10453. },
  10454. switchTab(index) {
  10455. this.currentTab = index;
  10456. }
  10457. }
  10458. };
  10459. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  10460. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10461. vue.createElementVNode("view", { class: "nav-bar" }, [
  10462. vue.createElementVNode("view", {
  10463. class: "nav-left",
  10464. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10465. }, [
  10466. vue.createElementVNode("image", {
  10467. class: "back-icon",
  10468. src: _imports_0
  10469. })
  10470. ]),
  10471. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  10472. vue.createElementVNode("view", { class: "nav-right" })
  10473. ]),
  10474. vue.createElementVNode("view", { class: "content-area" }, [
  10475. vue.createElementVNode("view", { class: "tabs-row" }, [
  10476. vue.createElementVNode(
  10477. "view",
  10478. {
  10479. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10480. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  10481. },
  10482. [
  10483. vue.createElementVNode("text", null, "全部"),
  10484. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10485. key: 0,
  10486. class: "tab-line"
  10487. })) : vue.createCommentVNode("v-if", true)
  10488. ],
  10489. 2
  10490. /* CLASS */
  10491. ),
  10492. vue.createElementVNode(
  10493. "view",
  10494. {
  10495. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10496. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  10497. },
  10498. [
  10499. vue.createElementVNode("text", null, "收入"),
  10500. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10501. key: 0,
  10502. class: "tab-line"
  10503. })) : vue.createCommentVNode("v-if", true)
  10504. ],
  10505. 2
  10506. /* CLASS */
  10507. ),
  10508. vue.createElementVNode(
  10509. "view",
  10510. {
  10511. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  10512. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  10513. },
  10514. [
  10515. vue.createElementVNode("text", null, "支出"),
  10516. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10517. key: 0,
  10518. class: "tab-line"
  10519. })) : vue.createCommentVNode("v-if", true)
  10520. ],
  10521. 2
  10522. /* CLASS */
  10523. )
  10524. ]),
  10525. vue.createElementVNode("scroll-view", {
  10526. "scroll-y": "",
  10527. class: "bill-list"
  10528. }, [
  10529. (vue.openBlock(true), vue.createElementBlock(
  10530. vue.Fragment,
  10531. null,
  10532. vue.renderList($options.displayGroups, (group, gIndex) => {
  10533. return vue.openBlock(), vue.createElementBlock("view", {
  10534. key: gIndex,
  10535. class: "month-group"
  10536. }, [
  10537. vue.createElementVNode("view", { class: "group-header" }, [
  10538. vue.createElementVNode(
  10539. "text",
  10540. { class: "month-title" },
  10541. vue.toDisplayString(group.month),
  10542. 1
  10543. /* TEXT */
  10544. ),
  10545. vue.createElementVNode(
  10546. "text",
  10547. { class: "month-summary" },
  10548. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  10549. 1
  10550. /* TEXT */
  10551. )
  10552. ]),
  10553. (vue.openBlock(true), vue.createElementBlock(
  10554. vue.Fragment,
  10555. null,
  10556. vue.renderList(group.items, (item, index) => {
  10557. return vue.openBlock(), vue.createElementBlock("view", {
  10558. class: "list-item",
  10559. key: index
  10560. }, [
  10561. vue.createElementVNode(
  10562. "view",
  10563. {
  10564. class: vue.normalizeClass(["item-icon-box", item.type])
  10565. },
  10566. [
  10567. vue.createElementVNode(
  10568. "text",
  10569. { class: "item-icon-symbol" },
  10570. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  10571. 1
  10572. /* TEXT */
  10573. )
  10574. ],
  10575. 2
  10576. /* CLASS */
  10577. ),
  10578. vue.createElementVNode("view", { class: "item-center" }, [
  10579. vue.createElementVNode(
  10580. "text",
  10581. { class: "item-title" },
  10582. vue.toDisplayString(item.title),
  10583. 1
  10584. /* TEXT */
  10585. ),
  10586. vue.createElementVNode(
  10587. "text",
  10588. { class: "item-desc" },
  10589. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  10590. 1
  10591. /* TEXT */
  10592. )
  10593. ]),
  10594. vue.createElementVNode("view", { class: "item-right" }, [
  10595. vue.createElementVNode(
  10596. "text",
  10597. {
  10598. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  10599. },
  10600. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  10601. 3
  10602. /* TEXT, CLASS */
  10603. ),
  10604. vue.createElementVNode("view", { class: "item-tag" }, [
  10605. vue.createElementVNode(
  10606. "text",
  10607. null,
  10608. vue.toDisplayString(item.tag),
  10609. 1
  10610. /* TEXT */
  10611. )
  10612. ])
  10613. ])
  10614. ]);
  10615. }),
  10616. 128
  10617. /* KEYED_FRAGMENT */
  10618. ))
  10619. ]);
  10620. }),
  10621. 128
  10622. /* KEYED_FRAGMENT */
  10623. )),
  10624. vue.createElementVNode("view", { class: "list-padding-bottom" })
  10625. ])
  10626. ])
  10627. ]);
  10628. }
  10629. 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"]]);
  10630. const _sfc_main$7 = {
  10631. data() {
  10632. return {
  10633. currentIndex: 2,
  10634. // 默认选中 L3
  10635. levels: [
  10636. {
  10637. id: "L1",
  10638. name: "青铜履约者",
  10639. score: "需成长值 0",
  10640. isCurrent: false,
  10641. benefits: [
  10642. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" }
  10643. ]
  10644. },
  10645. {
  10646. id: "L2",
  10647. name: "白银履约者",
  10648. score: "需成长值 200",
  10649. isCurrent: false,
  10650. benefits: [
  10651. { name: "新手任务", desc: "完成新手任务可获得额外奖励", icon: "/static/icons/reward.svg" },
  10652. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单", icon: "" }
  10653. ]
  10654. },
  10655. {
  10656. id: "L3",
  10657. name: "黄金履约者",
  10658. score: "需成长值 500",
  10659. isCurrent: true,
  10660. benefits: [
  10661. { name: "极速提现", desc: "提现申请 2 小时内极速到账,无需等待。", icon: "" },
  10662. { name: "晋升奖励", desc: "晋升等级可获得现金红包奖励。", icon: "/static/icons/reward.svg" },
  10663. { name: "优先派单", desc: "系统将优先为您派送附近的优质订单。", icon: "" }
  10664. ]
  10665. },
  10666. {
  10667. id: "L4",
  10668. name: "钻石履约者",
  10669. score: "需成长值 2000",
  10670. isCurrent: false,
  10671. benefits: [
  10672. { name: "专属客服", desc: "享受 7x24 小时专属客服通道。", icon: "/static/icons/service.svg" },
  10673. { name: "生日礼包", desc: "生日当天获赠专属礼包。", icon: "/static/icons/reward.svg" },
  10674. { name: "装备免费换", desc: "每年可免费更换一套履约装备。", icon: "" },
  10675. { name: "医疗互助", desc: "享受平台提供的医疗互助保障。", icon: "" }
  10676. ]
  10677. }
  10678. ],
  10679. isPopupShow: false,
  10680. currentBenefit: null
  10681. };
  10682. },
  10683. computed: {
  10684. currentLevel() {
  10685. return this.levels[this.currentIndex];
  10686. }
  10687. },
  10688. methods: {
  10689. navBack() {
  10690. uni.navigateBack({
  10691. delta: 1
  10692. });
  10693. },
  10694. swiperChange(e) {
  10695. this.currentIndex = e.detail.current;
  10696. },
  10697. changeLevel(index) {
  10698. this.currentIndex = index;
  10699. },
  10700. showBenefitDetail(benefit) {
  10701. this.currentBenefit = benefit;
  10702. this.isPopupShow = true;
  10703. },
  10704. closePopup() {
  10705. this.isPopupShow = false;
  10706. }
  10707. }
  10708. };
  10709. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  10710. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10711. vue.createElementVNode("view", { class: "custom-header" }, [
  10712. vue.createElementVNode("view", {
  10713. class: "header-left",
  10714. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10715. }, [
  10716. vue.createElementVNode("image", {
  10717. class: "back-icon",
  10718. src: _imports_0,
  10719. style: { "transform": "rotate(180deg)" }
  10720. })
  10721. ]),
  10722. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  10723. vue.createElementVNode("view", { class: "header-right" })
  10724. ]),
  10725. vue.createElementVNode("view", { class: "header-placeholder" }),
  10726. vue.createElementVNode("view", { class: "swiper-container" }, [
  10727. vue.createElementVNode("swiper", {
  10728. class: "level-swiper",
  10729. "previous-margin": "80rpx",
  10730. "next-margin": "80rpx",
  10731. current: $data.currentIndex,
  10732. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  10733. }, [
  10734. (vue.openBlock(true), vue.createElementBlock(
  10735. vue.Fragment,
  10736. null,
  10737. vue.renderList($data.levels, (level, index) => {
  10738. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  10739. key: index,
  10740. onClick: ($event) => $options.changeLevel(index)
  10741. }, [
  10742. vue.createElementVNode(
  10743. "view",
  10744. {
  10745. class: vue.normalizeClass(["level-card", "level-card-" + (index + 1)]),
  10746. style: vue.normalizeStyle({ transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)" })
  10747. },
  10748. [
  10749. vue.createElementVNode("view", { class: "card-content" }, [
  10750. vue.createElementVNode("view", { class: "card-header" }, [
  10751. vue.createElementVNode(
  10752. "view",
  10753. { class: "level-badge" },
  10754. vue.toDisplayString(level.id),
  10755. 1
  10756. /* TEXT */
  10757. ),
  10758. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  10759. key: 0,
  10760. class: "current-badge"
  10761. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  10762. ]),
  10763. vue.createElementVNode(
  10764. "text",
  10765. { class: "level-name" },
  10766. vue.toDisplayString(level.name),
  10767. 1
  10768. /* TEXT */
  10769. ),
  10770. vue.createElementVNode(
  10771. "text",
  10772. { class: "level-score" },
  10773. vue.toDisplayString(level.score),
  10774. 1
  10775. /* TEXT */
  10776. ),
  10777. vue.createElementVNode("image", {
  10778. class: "crown-overlay",
  10779. src: _imports_1$4,
  10780. mode: "aspectFit"
  10781. })
  10782. ])
  10783. ],
  10784. 6
  10785. /* CLASS, STYLE */
  10786. )
  10787. ], 8, ["onClick"]);
  10788. }),
  10789. 128
  10790. /* KEYED_FRAGMENT */
  10791. ))
  10792. ], 40, ["current"]),
  10793. vue.createElementVNode("view", { class: "swiper-dots" }, [
  10794. (vue.openBlock(true), vue.createElementBlock(
  10795. vue.Fragment,
  10796. null,
  10797. vue.renderList($data.levels, (item, index) => {
  10798. return vue.openBlock(), vue.createElementBlock(
  10799. "view",
  10800. {
  10801. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  10802. key: index
  10803. },
  10804. null,
  10805. 2
  10806. /* CLASS */
  10807. );
  10808. }),
  10809. 128
  10810. /* KEYED_FRAGMENT */
  10811. ))
  10812. ])
  10813. ]),
  10814. vue.createElementVNode("view", { class: "benefits-title-row" }, [
  10815. vue.createElementVNode(
  10816. "text",
  10817. { class: "benefits-title" },
  10818. vue.toDisplayString($options.currentLevel.id) + " 专属权益",
  10819. 1
  10820. /* TEXT */
  10821. ),
  10822. vue.createElementVNode(
  10823. "text",
  10824. { class: "benefits-count" },
  10825. "(" + vue.toDisplayString($options.currentLevel.benefits.length) + ")",
  10826. 1
  10827. /* TEXT */
  10828. )
  10829. ]),
  10830. vue.createElementVNode("view", { class: "benefits-grid" }, [
  10831. (vue.openBlock(true), vue.createElementBlock(
  10832. vue.Fragment,
  10833. null,
  10834. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  10835. return vue.openBlock(), vue.createElementBlock("view", {
  10836. class: "benefit-item",
  10837. key: index,
  10838. onClick: ($event) => $options.showBenefitDetail(benefit)
  10839. }, [
  10840. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  10841. benefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  10842. key: 0,
  10843. class: "benefit-icon",
  10844. src: benefit.icon,
  10845. mode: "aspectFit"
  10846. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  10847. "view",
  10848. {
  10849. key: 1,
  10850. class: "benefit-icon-placeholder"
  10851. },
  10852. vue.toDisplayString(benefit.name[0]),
  10853. 1
  10854. /* TEXT */
  10855. ))
  10856. ]),
  10857. vue.createElementVNode(
  10858. "text",
  10859. { class: "benefit-name" },
  10860. vue.toDisplayString(benefit.name),
  10861. 1
  10862. /* TEXT */
  10863. )
  10864. ], 8, ["onClick"]);
  10865. }),
  10866. 128
  10867. /* KEYED_FRAGMENT */
  10868. ))
  10869. ]),
  10870. vue.createElementVNode(
  10871. "view",
  10872. {
  10873. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  10874. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  10875. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  10876. }, ["stop", "prevent"]))
  10877. },
  10878. [
  10879. vue.createElementVNode("view", {
  10880. class: "popup-modal",
  10881. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  10882. }, ["stop"]))
  10883. }, [
  10884. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  10885. $data.currentBenefit && $data.currentBenefit.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  10886. key: 0,
  10887. class: "benefit-icon-large",
  10888. src: $data.currentBenefit.icon,
  10889. mode: "aspectFit"
  10890. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  10891. "view",
  10892. {
  10893. key: 1,
  10894. class: "benefit-icon-placeholder-large"
  10895. },
  10896. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  10897. 1
  10898. /* TEXT */
  10899. ))
  10900. ]),
  10901. vue.createElementVNode(
  10902. "text",
  10903. { class: "popup-title" },
  10904. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  10905. 1
  10906. /* TEXT */
  10907. ),
  10908. vue.createElementVNode(
  10909. "text",
  10910. { class: "popup-desc" },
  10911. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.desc : ""),
  10912. 1
  10913. /* TEXT */
  10914. ),
  10915. vue.createElementVNode("button", {
  10916. class: "popup-btn",
  10917. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  10918. }, "我知道了")
  10919. ])
  10920. ],
  10921. 34
  10922. /* CLASS, NEED_HYDRATION */
  10923. )
  10924. ]);
  10925. }
  10926. 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"]]);
  10927. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  10928. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  10929. const _sfc_main$6 = {
  10930. data() {
  10931. return {};
  10932. },
  10933. methods: {
  10934. navBack() {
  10935. uni.navigateBack();
  10936. },
  10937. navToOrderMsg() {
  10938. uni.navigateTo({
  10939. url: "/pages/mine/message/order"
  10940. });
  10941. },
  10942. navToSystemMsg() {
  10943. uni.navigateTo({
  10944. url: "/pages/mine/message/system"
  10945. });
  10946. }
  10947. }
  10948. };
  10949. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  10950. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10951. vue.createElementVNode("view", { class: "nav-bar" }, [
  10952. vue.createElementVNode("view", {
  10953. class: "nav-left",
  10954. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10955. }, [
  10956. vue.createElementVNode("image", {
  10957. class: "back-icon",
  10958. src: _imports_0,
  10959. style: { "transform": "rotate(180deg)" }
  10960. })
  10961. ]),
  10962. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  10963. vue.createElementVNode("view", { class: "nav-right" }, [
  10964. vue.createElementVNode("view", { class: "more-dots" }, [
  10965. vue.createElementVNode("view", { class: "dot" }),
  10966. vue.createElementVNode("view", { class: "dot" }),
  10967. vue.createElementVNode("view", { class: "dot" })
  10968. ])
  10969. ])
  10970. ]),
  10971. vue.createElementVNode("view", { class: "nav-placeholder" }),
  10972. vue.createElementVNode("view", { class: "message-list" }, [
  10973. vue.createElementVNode("view", {
  10974. class: "message-item",
  10975. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  10976. }, [
  10977. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  10978. vue.createElementVNode("image", {
  10979. class: "msg-icon",
  10980. src: _imports_1$1
  10981. }),
  10982. vue.createElementVNode("view", { class: "red-dot-badge" })
  10983. ]),
  10984. vue.createElementVNode("view", { class: "content-wrapper" }, [
  10985. vue.createElementVNode("view", { class: "top-row" }, [
  10986. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  10987. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  10988. ]),
  10989. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  10990. ])
  10991. ]),
  10992. vue.createElementVNode("view", {
  10993. class: "message-item",
  10994. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  10995. }, [
  10996. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  10997. vue.createElementVNode("image", {
  10998. class: "msg-icon",
  10999. src: _imports_2$1
  11000. })
  11001. ]),
  11002. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11003. vue.createElementVNode("view", { class: "top-row" }, [
  11004. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11005. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11006. ]),
  11007. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11008. ])
  11009. ])
  11010. ])
  11011. ]);
  11012. }
  11013. 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"]]);
  11014. const _sfc_main$5 = {
  11015. methods: {
  11016. navBack() {
  11017. uni.navigateBack();
  11018. }
  11019. }
  11020. };
  11021. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  11022. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11023. vue.createElementVNode("view", { class: "nav-bar" }, [
  11024. vue.createElementVNode("view", {
  11025. class: "nav-left",
  11026. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11027. }, [
  11028. vue.createElementVNode("image", {
  11029. class: "back-icon",
  11030. src: _imports_0,
  11031. style: { "transform": "rotate(180deg)" }
  11032. })
  11033. ]),
  11034. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  11035. vue.createElementVNode("view", { class: "nav-right" })
  11036. ]),
  11037. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11038. vue.createElementVNode("view", { class: "msg-group" }, [
  11039. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  11040. vue.createElementVNode("view", { class: "msg-card" }, [
  11041. vue.createElementVNode("view", { class: "card-header" }, [
  11042. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  11043. vue.createElementVNode("view", { class: "red-dot" })
  11044. ]),
  11045. vue.createElementVNode("view", { class: "card-body" }, [
  11046. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11047. ]),
  11048. vue.createElementVNode("view", { class: "card-footer" }, [
  11049. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  11050. vue.createElementVNode("image", {
  11051. class: "arrow-icon",
  11052. src: _imports_3
  11053. })
  11054. ])
  11055. ]),
  11056. vue.createElementVNode("view", { class: "msg-card" }, [
  11057. vue.createElementVNode("view", { class: "card-header" }, [
  11058. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  11059. ]),
  11060. vue.createElementVNode("view", { class: "card-body" }, [
  11061. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11062. ]),
  11063. vue.createElementVNode("view", { class: "card-footer" }, [
  11064. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  11065. vue.createElementVNode("image", {
  11066. class: "arrow-icon",
  11067. src: _imports_3
  11068. })
  11069. ])
  11070. ])
  11071. ]),
  11072. vue.createElementVNode("view", { class: "msg-group" }, [
  11073. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  11074. vue.createElementVNode("view", { class: "msg-card" }, [
  11075. vue.createElementVNode("view", { class: "card-header" }, [
  11076. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  11077. ]),
  11078. vue.createElementVNode("view", { class: "card-body" }, [
  11079. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  11080. ]),
  11081. vue.createElementVNode("view", { class: "card-footer" }, [
  11082. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  11083. vue.createElementVNode("image", {
  11084. class: "arrow-icon",
  11085. src: _imports_3
  11086. })
  11087. ])
  11088. ])
  11089. ])
  11090. ]);
  11091. }
  11092. 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"]]);
  11093. const _sfc_main$4 = {
  11094. methods: {
  11095. navBack() {
  11096. uni.navigateBack();
  11097. },
  11098. navToDetail() {
  11099. uni.navigateTo({
  11100. url: "/pages/mine/message/detail"
  11101. });
  11102. }
  11103. }
  11104. };
  11105. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11106. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11107. vue.createElementVNode("view", { class: "nav-bar" }, [
  11108. vue.createElementVNode("view", {
  11109. class: "nav-left",
  11110. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11111. }, [
  11112. vue.createElementVNode("image", {
  11113. class: "back-icon",
  11114. src: _imports_0,
  11115. style: { "transform": "rotate(180deg)" }
  11116. })
  11117. ]),
  11118. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  11119. vue.createElementVNode("view", { class: "nav-right" })
  11120. ]),
  11121. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11122. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  11123. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  11124. vue.createElementVNode("view", {
  11125. class: "sys-card",
  11126. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11127. }, [
  11128. vue.createElementVNode("view", { class: "sys-header" }, [
  11129. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  11130. vue.createElementVNode("view", { class: "red-dot" })
  11131. ]),
  11132. vue.createElementVNode("view", { class: "sys-content" }, [
  11133. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  11134. ]),
  11135. vue.createElementVNode("view", { class: "sys-footer" }, [
  11136. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  11137. vue.createElementVNode("view", { class: "check-more" }, [
  11138. vue.createElementVNode("text", null, "查看详情"),
  11139. vue.createElementVNode("image", {
  11140. class: "arrow-icon-small",
  11141. src: _imports_3
  11142. })
  11143. ])
  11144. ])
  11145. ]),
  11146. vue.createElementVNode("view", { class: "sys-card" }, [
  11147. vue.createElementVNode("view", { class: "sys-header" }, [
  11148. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  11149. ]),
  11150. vue.createElementVNode("view", { class: "sys-content" }, [
  11151. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  11152. ]),
  11153. vue.createElementVNode("view", { class: "sys-footer" }, [
  11154. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  11155. vue.createElementVNode("view", { class: "check-more" }, [
  11156. vue.createElementVNode("text", null, "查看详情"),
  11157. vue.createElementVNode("image", {
  11158. class: "arrow-icon-small",
  11159. src: _imports_3
  11160. })
  11161. ])
  11162. ])
  11163. ]),
  11164. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  11165. vue.createElementVNode("view", { class: "sys-card" }, [
  11166. vue.createElementVNode("view", { class: "sys-header" }, [
  11167. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  11168. ]),
  11169. vue.createElementVNode("view", { class: "sys-content" }, [
  11170. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  11171. ]),
  11172. vue.createElementVNode("view", { class: "sys-footer" }, [
  11173. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  11174. vue.createElementVNode("view", { class: "check-more" }, [
  11175. vue.createElementVNode("text", null, "查看详情"),
  11176. vue.createElementVNode("image", {
  11177. class: "arrow-icon-small",
  11178. src: _imports_3
  11179. })
  11180. ])
  11181. ])
  11182. ])
  11183. ])
  11184. ]);
  11185. }
  11186. 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"]]);
  11187. const _sfc_main$3 = {
  11188. methods: {
  11189. navBack() {
  11190. uni.navigateBack();
  11191. }
  11192. }
  11193. };
  11194. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  11195. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11196. vue.createElementVNode("view", { class: "nav-bar" }, [
  11197. vue.createElementVNode("view", {
  11198. class: "nav-left",
  11199. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11200. }, [
  11201. vue.createElementVNode("image", {
  11202. class: "back-icon",
  11203. src: _imports_0,
  11204. style: { "transform": "rotate(180deg)" }
  11205. })
  11206. ]),
  11207. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  11208. vue.createElementVNode("view", { class: "nav-right" })
  11209. ]),
  11210. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11211. vue.createElementVNode("view", { class: "detail-content" }, [
  11212. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  11213. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  11214. vue.createElementVNode("view", { class: "detail-body" }, [
  11215. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  11216. ]),
  11217. vue.createElementVNode("view", { class: "detail-footer" }, [
  11218. vue.createElementVNode("view", { class: "divider" }),
  11219. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  11220. ])
  11221. ])
  11222. ]);
  11223. }
  11224. 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"]]);
  11225. const _imports_1 = "/static/icons/diamond_white.svg";
  11226. const _imports_2 = "/static/icons/star_decor.svg";
  11227. const _sfc_main$2 = {
  11228. data() {
  11229. return {
  11230. currentTab: 0,
  11231. list: [
  11232. {
  11233. title: "订单完成奖励",
  11234. desc: "订单 T1002839 完成",
  11235. time: "2026-02-05 18:42",
  11236. amount: "10",
  11237. type: "income",
  11238. tag: "订单"
  11239. },
  11240. {
  11241. title: "好评奖励",
  11242. desc: "获得五星好评",
  11243. time: "2026-02-05 19:00",
  11244. amount: "5",
  11245. type: "income",
  11246. tag: "奖励"
  11247. },
  11248. {
  11249. title: "超时扣分",
  11250. desc: "订单 T1002830 超时送达",
  11251. time: "2026-02-04 10:20",
  11252. amount: "-10",
  11253. type: "expense",
  11254. tag: "惩罚"
  11255. }
  11256. ]
  11257. };
  11258. },
  11259. computed: {
  11260. displayList() {
  11261. if (this.currentTab === 0)
  11262. return this.list;
  11263. const type = this.currentTab === 1 ? "income" : "expense";
  11264. return this.list.filter((item) => item.type === type);
  11265. }
  11266. },
  11267. methods: {
  11268. navBack() {
  11269. uni.navigateBack();
  11270. },
  11271. navToDetail() {
  11272. uni.navigateTo({
  11273. url: "/pages/mine/points/detail"
  11274. });
  11275. },
  11276. navToEquity() {
  11277. },
  11278. switchTab(index) {
  11279. this.currentTab = index;
  11280. }
  11281. }
  11282. };
  11283. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  11284. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11285. vue.createElementVNode("view", { class: "nav-bar" }, [
  11286. vue.createElementVNode("view", {
  11287. class: "nav-left",
  11288. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11289. }, [
  11290. vue.createElementVNode("image", {
  11291. class: "back-icon",
  11292. src: _imports_0
  11293. })
  11294. ]),
  11295. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  11296. vue.createElementVNode("view", { class: "nav-right" })
  11297. ]),
  11298. vue.createElementVNode("view", { class: "points-card" }, [
  11299. vue.createElementVNode("view", { class: "card-header" }, [
  11300. vue.createElementVNode("view", {
  11301. class: "equity-btn",
  11302. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  11303. }, [
  11304. vue.createElementVNode("image", {
  11305. class: "equity-icon",
  11306. src: _imports_1
  11307. }),
  11308. vue.createElementVNode("text", null, "积分权益")
  11309. ]),
  11310. vue.createElementVNode("view", {
  11311. class: "detail-link",
  11312. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11313. }, [
  11314. vue.createElementVNode("text", null, "明细")
  11315. ])
  11316. ]),
  11317. vue.createElementVNode("view", { class: "card-body" }, [
  11318. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  11319. vue.createElementVNode("text", { class: "value" }, "1200")
  11320. ]),
  11321. vue.createElementVNode("image", {
  11322. class: "bg-decor",
  11323. src: _imports_2,
  11324. mode: "aspectFit"
  11325. })
  11326. ]),
  11327. vue.createElementVNode("view", { class: "record-container" }, [
  11328. vue.createElementVNode("view", { class: "record-header" }, [
  11329. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  11330. vue.createElementVNode("view", {
  11331. class: "header-more",
  11332. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11333. }, [
  11334. vue.createElementVNode("text", null, "查看全部"),
  11335. vue.createElementVNode("image", {
  11336. class: "more-icon",
  11337. src: _imports_3
  11338. })
  11339. ])
  11340. ]),
  11341. vue.createElementVNode("view", { class: "tabs-row" }, [
  11342. vue.createElementVNode(
  11343. "view",
  11344. {
  11345. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11346. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  11347. },
  11348. [
  11349. vue.createElementVNode("text", null, "全部"),
  11350. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11351. key: 0,
  11352. class: "tab-line"
  11353. })) : vue.createCommentVNode("v-if", true)
  11354. ],
  11355. 2
  11356. /* CLASS */
  11357. ),
  11358. vue.createElementVNode(
  11359. "view",
  11360. {
  11361. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11362. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  11363. },
  11364. [
  11365. vue.createElementVNode("text", null, "获取"),
  11366. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11367. key: 0,
  11368. class: "tab-line"
  11369. })) : vue.createCommentVNode("v-if", true)
  11370. ],
  11371. 2
  11372. /* CLASS */
  11373. ),
  11374. vue.createElementVNode(
  11375. "view",
  11376. {
  11377. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11378. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  11379. },
  11380. [
  11381. vue.createElementVNode("text", null, "扣减"),
  11382. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11383. key: 0,
  11384. class: "tab-line"
  11385. })) : vue.createCommentVNode("v-if", true)
  11386. ],
  11387. 2
  11388. /* CLASS */
  11389. )
  11390. ]),
  11391. vue.createElementVNode("view", { class: "record-list" }, [
  11392. (vue.openBlock(true), vue.createElementBlock(
  11393. vue.Fragment,
  11394. null,
  11395. vue.renderList($options.displayList, (item, index) => {
  11396. return vue.openBlock(), vue.createElementBlock("view", {
  11397. class: "list-item",
  11398. key: index
  11399. }, [
  11400. vue.createElementVNode("view", { class: "item-left" }, [
  11401. vue.createElementVNode(
  11402. "text",
  11403. { class: "item-title" },
  11404. vue.toDisplayString(item.title),
  11405. 1
  11406. /* TEXT */
  11407. ),
  11408. vue.createElementVNode(
  11409. "text",
  11410. { class: "item-desc" },
  11411. vue.toDisplayString(item.desc),
  11412. 1
  11413. /* TEXT */
  11414. ),
  11415. vue.createElementVNode(
  11416. "text",
  11417. { class: "item-time" },
  11418. vue.toDisplayString(item.time),
  11419. 1
  11420. /* TEXT */
  11421. )
  11422. ]),
  11423. vue.createElementVNode("view", { class: "item-right" }, [
  11424. vue.createElementVNode(
  11425. "text",
  11426. {
  11427. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11428. },
  11429. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11430. 3
  11431. /* TEXT, CLASS */
  11432. ),
  11433. vue.createElementVNode("view", { class: "item-tag" }, [
  11434. vue.createElementVNode(
  11435. "text",
  11436. null,
  11437. vue.toDisplayString(item.tag),
  11438. 1
  11439. /* TEXT */
  11440. )
  11441. ])
  11442. ])
  11443. ]);
  11444. }),
  11445. 128
  11446. /* KEYED_FRAGMENT */
  11447. ))
  11448. ])
  11449. ])
  11450. ]);
  11451. }
  11452. 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"]]);
  11453. const _sfc_main$1 = {
  11454. data() {
  11455. return {
  11456. currentTab: 0,
  11457. // 模拟数据结构
  11458. groups: [
  11459. {
  11460. month: "2月 2026",
  11461. income: "15",
  11462. expense: "10",
  11463. items: [
  11464. {
  11465. title: "订单完成奖励",
  11466. desc: "订单完成",
  11467. time: "02-05 18:42",
  11468. amount: "10",
  11469. type: "income",
  11470. tag: "订单"
  11471. },
  11472. {
  11473. title: "好评奖励",
  11474. desc: "五星好评",
  11475. time: "02-05 19:00",
  11476. amount: "5",
  11477. type: "income",
  11478. tag: "奖励"
  11479. },
  11480. {
  11481. title: "超时扣分",
  11482. desc: "订单超时",
  11483. time: "02-04 10:20",
  11484. amount: "-10",
  11485. type: "expense",
  11486. tag: "惩罚"
  11487. }
  11488. ]
  11489. },
  11490. {
  11491. month: "1月 2026",
  11492. income: "100",
  11493. expense: "0",
  11494. items: [
  11495. {
  11496. title: "新用户奖励",
  11497. desc: "注册赠送",
  11498. time: "01-10 09:00",
  11499. amount: "100",
  11500. type: "income",
  11501. tag: "系统"
  11502. }
  11503. ]
  11504. }
  11505. ]
  11506. };
  11507. },
  11508. computed: {
  11509. displayGroups() {
  11510. if (this.currentTab === 0)
  11511. return this.groups;
  11512. return this.groups.map((group) => {
  11513. const filteredItems = group.items.filter((item) => {
  11514. const type = this.currentTab === 1 ? "income" : "expense";
  11515. return item.type === type;
  11516. });
  11517. return {
  11518. ...group,
  11519. items: filteredItems
  11520. };
  11521. }).filter((group) => group.items.length > 0);
  11522. }
  11523. },
  11524. methods: {
  11525. navBack() {
  11526. uni.navigateBack();
  11527. },
  11528. switchTab(index) {
  11529. this.currentTab = index;
  11530. }
  11531. }
  11532. };
  11533. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  11534. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11535. vue.createElementVNode("view", { class: "nav-bar" }, [
  11536. vue.createElementVNode("view", {
  11537. class: "nav-left",
  11538. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11539. }, [
  11540. vue.createElementVNode("image", {
  11541. class: "back-icon",
  11542. src: _imports_0
  11543. })
  11544. ]),
  11545. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  11546. vue.createElementVNode("view", { class: "nav-right" })
  11547. ]),
  11548. vue.createElementVNode("view", { class: "content-area" }, [
  11549. vue.createElementVNode("view", { class: "tabs-row" }, [
  11550. vue.createElementVNode(
  11551. "view",
  11552. {
  11553. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11554. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11555. },
  11556. [
  11557. vue.createElementVNode("text", null, "全部"),
  11558. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11559. key: 0,
  11560. class: "tab-line"
  11561. })) : vue.createCommentVNode("v-if", true)
  11562. ],
  11563. 2
  11564. /* CLASS */
  11565. ),
  11566. vue.createElementVNode(
  11567. "view",
  11568. {
  11569. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11570. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11571. },
  11572. [
  11573. vue.createElementVNode("text", null, "获取"),
  11574. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11575. key: 0,
  11576. class: "tab-line"
  11577. })) : vue.createCommentVNode("v-if", true)
  11578. ],
  11579. 2
  11580. /* CLASS */
  11581. ),
  11582. vue.createElementVNode(
  11583. "view",
  11584. {
  11585. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11586. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11587. },
  11588. [
  11589. vue.createElementVNode("text", null, "扣减"),
  11590. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11591. key: 0,
  11592. class: "tab-line"
  11593. })) : vue.createCommentVNode("v-if", true)
  11594. ],
  11595. 2
  11596. /* CLASS */
  11597. )
  11598. ]),
  11599. vue.createElementVNode("scroll-view", {
  11600. "scroll-y": "",
  11601. class: "bill-list"
  11602. }, [
  11603. (vue.openBlock(true), vue.createElementBlock(
  11604. vue.Fragment,
  11605. null,
  11606. vue.renderList($options.displayGroups, (group, gIndex) => {
  11607. return vue.openBlock(), vue.createElementBlock("view", {
  11608. key: gIndex,
  11609. class: "month-group"
  11610. }, [
  11611. vue.createElementVNode("view", { class: "group-header" }, [
  11612. vue.createElementVNode(
  11613. "text",
  11614. { class: "month-title" },
  11615. vue.toDisplayString(group.month),
  11616. 1
  11617. /* TEXT */
  11618. ),
  11619. vue.createElementVNode(
  11620. "text",
  11621. { class: "month-summary" },
  11622. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  11623. 1
  11624. /* TEXT */
  11625. )
  11626. ]),
  11627. (vue.openBlock(true), vue.createElementBlock(
  11628. vue.Fragment,
  11629. null,
  11630. vue.renderList(group.items, (item, index) => {
  11631. return vue.openBlock(), vue.createElementBlock("view", {
  11632. class: "list-item",
  11633. key: index
  11634. }, [
  11635. vue.createElementVNode(
  11636. "view",
  11637. {
  11638. class: vue.normalizeClass(["item-icon-box", item.type])
  11639. },
  11640. [
  11641. vue.createElementVNode(
  11642. "text",
  11643. { class: "item-icon-symbol" },
  11644. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11645. 1
  11646. /* TEXT */
  11647. )
  11648. ],
  11649. 2
  11650. /* CLASS */
  11651. ),
  11652. vue.createElementVNode("view", { class: "item-center" }, [
  11653. vue.createElementVNode(
  11654. "text",
  11655. { class: "item-title" },
  11656. vue.toDisplayString(item.title),
  11657. 1
  11658. /* TEXT */
  11659. ),
  11660. vue.createElementVNode(
  11661. "text",
  11662. { class: "item-desc" },
  11663. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11664. 1
  11665. /* TEXT */
  11666. )
  11667. ]),
  11668. vue.createElementVNode("view", { class: "item-right" }, [
  11669. vue.createElementVNode(
  11670. "text",
  11671. {
  11672. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11673. },
  11674. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11675. 3
  11676. /* TEXT, CLASS */
  11677. ),
  11678. vue.createElementVNode("view", { class: "item-tag" }, [
  11679. vue.createElementVNode(
  11680. "text",
  11681. null,
  11682. vue.toDisplayString(item.tag),
  11683. 1
  11684. /* TEXT */
  11685. )
  11686. ])
  11687. ])
  11688. ]);
  11689. }),
  11690. 128
  11691. /* KEYED_FRAGMENT */
  11692. ))
  11693. ]);
  11694. }),
  11695. 128
  11696. /* KEYED_FRAGMENT */
  11697. )),
  11698. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11699. ])
  11700. ])
  11701. ]);
  11702. }
  11703. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  11704. __definePage("pages/login/login", PagesLoginLogin);
  11705. __definePage("pages/recruit/landing", PagesRecruitLanding);
  11706. __definePage("pages/recruit/form", PagesRecruitForm);
  11707. __definePage("pages/recruit/auth", PagesRecruitAuth);
  11708. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  11709. __definePage("pages/recruit/success", PagesRecruitSuccess);
  11710. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  11711. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  11712. __definePage("pages/home/index", PagesHomeIndex);
  11713. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  11714. __definePage("pages/orders/index", PagesOrdersIndex);
  11715. __definePage("pages/orders/detail", PagesOrdersDetail);
  11716. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  11717. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  11718. __definePage("pages/mine/rewards", PagesMineRewards);
  11719. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  11720. __definePage("pages/mine/index", PagesMineIndex);
  11721. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  11722. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  11723. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  11724. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  11725. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  11726. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  11727. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  11728. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  11729. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  11730. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  11731. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  11732. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  11733. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  11734. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  11735. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  11736. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  11737. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  11738. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  11739. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  11740. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  11741. const _sfc_main = {
  11742. onLaunch: function() {
  11743. formatAppLog("log", "at App.vue:6", "App Launch");
  11744. if (isLoggedIn()) {
  11745. uni.switchTab({
  11746. url: "/pages/home/index"
  11747. });
  11748. }
  11749. },
  11750. onShow: function() {
  11751. formatAppLog("log", "at App.vue:15", "App Show");
  11752. },
  11753. onHide: function() {
  11754. formatAppLog("log", "at App.vue:18", "App Hide");
  11755. }
  11756. };
  11757. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  11758. function createApp() {
  11759. const app = vue.createVueApp(App);
  11760. return {
  11761. app
  11762. };
  11763. }
  11764. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  11765. uni.Vuex = __Vuex__;
  11766. uni.Pinia = __Pinia__;
  11767. __app__.provide("__globalStyles", __uniConfig.styles);
  11768. __app__._component.mpType = "app";
  11769. __app__._component.render = () => {
  11770. };
  11771. __app__.mount("#app");
  11772. })(Vue);