app-service.js 492 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630
  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. function formatAppLog(type, filename, ...args) {
  35. if (uni.__log__) {
  36. uni.__log__(type, filename, ...args);
  37. } else {
  38. console[type].apply(console, [...args, filename]);
  39. }
  40. }
  41. const BASE_URL = "http://192.168.1.118:8080";
  42. const CLIENT_ID = "fe63fea7be31b0200b496d08bc6b517d";
  43. const PLATFORM_CODE = "FlfAppPlatformCodeX9kR7mT3wQ5vZ8nB1jY6pD4sL0hC2gA";
  44. function uploadGps(data) {
  45. return request({
  46. url: "/fulfiller/fulfiller/gps",
  47. method: "POST",
  48. data
  49. });
  50. }
  51. let gpsTimer = null;
  52. function reportGps() {
  53. uni.getLocation({
  54. type: "wgs84",
  55. success: function(res) {
  56. const data = {
  57. longitude: res.longitude,
  58. latitude: res.latitude
  59. };
  60. uploadGps(data).then(() => {
  61. formatAppLog("log", "at utils/gps.js:20", "GPS定位上传成功", data);
  62. }).catch((err) => {
  63. formatAppLog("error", "at utils/gps.js:22", "GPS定位上传失败", err);
  64. });
  65. },
  66. fail: function(err) {
  67. formatAppLog("error", "at utils/gps.js:26", "获取GPS定位失败", err);
  68. }
  69. });
  70. }
  71. function startGpsTimer() {
  72. stopGpsTimer();
  73. reportGps();
  74. gpsTimer = setInterval(() => {
  75. reportGps();
  76. }, 12e5);
  77. }
  78. function stopGpsTimer() {
  79. if (gpsTimer) {
  80. clearInterval(gpsTimer);
  81. gpsTimer = null;
  82. }
  83. }
  84. const TOKEN_KEY = "fulfiller_token";
  85. const USER_INFO_KEY = "fulfiller_user_info";
  86. function getToken() {
  87. return uni.getStorageSync(TOKEN_KEY) || "";
  88. }
  89. function setToken(token) {
  90. uni.setStorageSync(TOKEN_KEY, token);
  91. }
  92. function removeToken() {
  93. uni.removeStorageSync(TOKEN_KEY);
  94. }
  95. function isLoggedIn() {
  96. return !!getToken();
  97. }
  98. function removeUserInfo() {
  99. uni.removeStorageSync(USER_INFO_KEY);
  100. }
  101. function clearAuth() {
  102. removeToken();
  103. removeUserInfo();
  104. stopGpsTimer();
  105. }
  106. function request(options = {}) {
  107. const {
  108. url,
  109. method = "GET",
  110. data,
  111. header = {},
  112. needToken = true
  113. } = options;
  114. const headers = {
  115. "Content-Type": "application/json;charset=utf-8",
  116. "clientid": CLIENT_ID,
  117. "X-Platform-Code": PLATFORM_CODE,
  118. ...header
  119. };
  120. if (needToken) {
  121. const token = getToken();
  122. if (token) {
  123. headers["Authorization"] = "Bearer " + token;
  124. }
  125. }
  126. return new Promise((resolve, reject) => {
  127. uni.request({
  128. url: BASE_URL + url,
  129. method: method.toUpperCase(),
  130. data,
  131. header: headers,
  132. success: (res) => {
  133. formatAppLog("log", "at utils/request.js:50", res);
  134. const statusCode = res.statusCode;
  135. const code = res.data.code;
  136. const msg = res.data.msg;
  137. res.data.data;
  138. if (statusCode !== 200) {
  139. const errorMsg = msg || `请求失败(${statusCode})`;
  140. uni.showToast({ title: errorMsg, icon: "none" });
  141. return reject(new Error(errorMsg));
  142. }
  143. if (code === 401) {
  144. clearAuth();
  145. uni.showToast({ title: "登录已过期,请重新登录", icon: "none" });
  146. setTimeout(() => {
  147. uni.reLaunch({ url: "/pages/login/login" });
  148. }, 1500);
  149. return reject(new Error("未授权"));
  150. }
  151. if (code !== void 0 && code !== 200) {
  152. const errorMsg = msg || "操作失败";
  153. uni.showToast({ title: errorMsg, icon: "none" });
  154. return reject(new Error(errorMsg));
  155. }
  156. resolve(res.data);
  157. },
  158. fail: (err) => {
  159. uni.showToast({ title: "网络异常,请稍后重试", icon: "none" });
  160. reject(err);
  161. }
  162. });
  163. });
  164. }
  165. function loginByPassword(username, password) {
  166. return request({
  167. url: "/auth/login",
  168. method: "POST",
  169. needToken: false,
  170. data: {
  171. // tenantId: TENANT_ID,
  172. // platformId: PLATFORM_ID,
  173. userSource: 1,
  174. username,
  175. password,
  176. clientId: CLIENT_ID,
  177. grantType: "password",
  178. source: 1
  179. }
  180. });
  181. }
  182. function logout() {
  183. return request({
  184. url: "/auth/logout",
  185. method: "POST"
  186. });
  187. }
  188. const logic$9 = {
  189. data() {
  190. return {
  191. currentTab: 1,
  192. // 0: 免密, 1: 密码
  193. mobile: "",
  194. code: "",
  195. password: "",
  196. showPassword: false,
  197. isAgreed: false,
  198. countDown: 0,
  199. timer: null,
  200. showAgreementModal: false,
  201. currentAgreementId: "",
  202. // 当前显示的协议ID
  203. loginLoading: false
  204. };
  205. },
  206. methods: {
  207. /**
  208. * 显示协议弹窗
  209. * @param {Number} id 协议ID (1: 用户服务协议, 2: 隐私政策)
  210. */
  211. showAgreement(id) {
  212. this.currentAgreementId = id;
  213. this.showAgreementModal = true;
  214. },
  215. /* async getVerifyCode() {
  216. if (this.currentTab === 1) return;
  217. if (this.countDown > 0) return;
  218. if (!this.mobile || this.mobile.length !== 11) {
  219. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  220. return;
  221. }
  222. try {
  223. const res = await sendSmsCode(this.mobile);
  224. // 发送成功,启动倒计时
  225. this.countDown = 60;
  226. this.timer = setInterval(() => {
  227. this.countDown--;
  228. if (this.countDown <= 0) {
  229. clearInterval(this.timer);
  230. }
  231. }, 1000);
  232. // TODO 【生产环境必须删除】开发模式下后端会返回验证码,自动填入方便测试
  233. const devCode = res.data;
  234. if (devCode) {
  235. this.code = devCode;
  236. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  237. } else {
  238. uni.showToast({ title: '验证码已发送', icon: 'none' });
  239. }
  240. } catch (err) {
  241. __f__('error','at pages/login/logic.js:57','发送验证码失败:', err);
  242. }
  243. }, */
  244. async handleLogin() {
  245. var _a;
  246. if (!this.isAgreed) {
  247. uni.showToast({ title: "请先同意用户协议", icon: "none" });
  248. return;
  249. }
  250. if (!this.mobile) {
  251. uni.showToast({ title: "请输入手机号", icon: "none" });
  252. return;
  253. }
  254. if (!this.password) {
  255. uni.showToast({ title: "请输入密码", icon: "none" });
  256. return;
  257. }
  258. if (this.loginLoading)
  259. return;
  260. this.loginLoading = true;
  261. uni.showLoading({
  262. title: "登录中...",
  263. mask: true
  264. });
  265. try {
  266. let res;
  267. res = await loginByPassword(this.mobile, this.password);
  268. const token = ((_a = res.data) == null ? void 0 : _a.access_token) || res.access_token;
  269. if (token) {
  270. setToken(token);
  271. }
  272. startGpsTimer();
  273. uni.showToast({ title: "登录成功", icon: "success" });
  274. setTimeout(() => {
  275. uni.switchTab({
  276. url: "/pages/home/index"
  277. });
  278. }, 1e3);
  279. } catch (err) {
  280. formatAppLog("error", "at pages/login/logic.js:122", "登录失败:", err);
  281. } finally {
  282. this.loginLoading = false;
  283. uni.hideLoading();
  284. }
  285. },
  286. goToRecruit() {
  287. uni.navigateTo({
  288. url: "/pages/recruit/landing"
  289. });
  290. },
  291. goToForgotPwd() {
  292. uni.navigateTo({
  293. url: "/pages/login/reset-pwd-verify"
  294. });
  295. }
  296. }
  297. };
  298. function getAgreement(id) {
  299. return request({
  300. url: "/system/agreement/" + id,
  301. method: "get"
  302. });
  303. }
  304. const _export_sfc = (sfc, props) => {
  305. const target = sfc.__vccOpts || sfc;
  306. for (const [key, val] of props) {
  307. target[key] = val;
  308. }
  309. return target;
  310. };
  311. const _sfc_main$D = {
  312. name: "Agreement",
  313. props: {
  314. visible: {
  315. type: Boolean,
  316. default: false
  317. },
  318. agreementId: {
  319. type: [Number, String],
  320. default: ""
  321. }
  322. },
  323. data() {
  324. return {
  325. detail: {
  326. title: "",
  327. content: ""
  328. }
  329. };
  330. },
  331. watch: {
  332. visible(newVal) {
  333. if (newVal && this.agreementId) {
  334. this.fetchAgreementDetail();
  335. }
  336. }
  337. },
  338. methods: {
  339. /**
  340. * 获取协议详情
  341. */
  342. async fetchAgreementDetail() {
  343. try {
  344. uni.showLoading({ title: "加载中..." });
  345. const res = await getAgreement(this.agreementId);
  346. if (res.code === 200) {
  347. this.detail = res.data;
  348. } else {
  349. uni.showToast({ title: res.msg || "获取协议失败", icon: "none" });
  350. }
  351. } catch (error) {
  352. formatAppLog("error", "at src/components/agreement/index.vue:67", "获取协议详情失败:", error);
  353. } finally {
  354. uni.hideLoading();
  355. }
  356. },
  357. /**
  358. * 关闭弹窗
  359. */
  360. handleClose() {
  361. this.$emit("close");
  362. }
  363. }
  364. };
  365. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  366. return $props.visible ? (vue.openBlock(), vue.createElementBlock(
  367. "view",
  368. {
  369. key: 0,
  370. class: "agreement-mask",
  371. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => {
  372. }, ["stop", "prevent"]))
  373. },
  374. [
  375. vue.createElementVNode("view", { class: "agreement-container" }, [
  376. vue.createElementVNode("view", { class: "agreement-header" }, [
  377. vue.createElementVNode(
  378. "text",
  379. { class: "agreement-title" },
  380. vue.toDisplayString($data.detail.title || "协议详情"),
  381. 1
  382. /* TEXT */
  383. )
  384. ]),
  385. vue.createElementVNode("scroll-view", {
  386. "scroll-y": "",
  387. class: "agreement-body"
  388. }, [
  389. vue.createElementVNode("rich-text", {
  390. nodes: $data.detail.content
  391. }, null, 8, ["nodes"])
  392. ]),
  393. vue.createElementVNode("view", { class: "agreement-footer" }, [
  394. vue.createElementVNode("button", {
  395. class: "confirm-btn",
  396. onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args))
  397. }, "确 定")
  398. ])
  399. ])
  400. ],
  401. 32
  402. /* NEED_HYDRATION */
  403. )) : vue.createCommentVNode("v-if", true);
  404. }
  405. const Agreement = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-fe2c2596"], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/src/components/agreement/index.vue"]]);
  406. const _imports_0$3 = "/static/header.png";
  407. const _imports_1$8 = "/static/logo.png";
  408. const _sfc_main$C = {
  409. ...logic$9,
  410. components: {
  411. Agreement
  412. }
  413. };
  414. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  415. const _component_agreement = vue.resolveComponent("agreement");
  416. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  417. vue.createElementVNode("view", { class: "banner-area" }, [
  418. vue.createElementVNode("image", {
  419. class: "banner-img",
  420. src: _imports_0$3,
  421. mode: "widthFix"
  422. })
  423. ]),
  424. vue.createElementVNode("view", { class: "content-card" }, [
  425. vue.createElementVNode("view", { class: "logo-wrapper" }, [
  426. vue.createElementVNode("image", {
  427. class: "logo-img",
  428. src: _imports_1$8,
  429. mode: "widthFix"
  430. })
  431. ]),
  432. vue.createElementVNode("view", { class: "tabs" }, [
  433. vue.createElementVNode("view", { class: "tab-item active" }, [
  434. vue.createElementVNode("text", { class: "tab-text" }, "密码登录"),
  435. vue.createElementVNode("view", { class: "tab-indicator" })
  436. ])
  437. ]),
  438. vue.createElementVNode("view", { class: "form-area" }, [
  439. vue.createElementVNode("view", { class: "input-group" }, [
  440. vue.createElementVNode("view", { class: "area-code" }, [
  441. vue.createElementVNode("text", null, "+86"),
  442. vue.createElementVNode("text", { class: "arrow" }, "﹀")
  443. ]),
  444. vue.withDirectives(vue.createElementVNode(
  445. "input",
  446. {
  447. class: "input",
  448. type: "number",
  449. placeholder: "手机号",
  450. "placeholder-style": "color: #ccc",
  451. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.mobile = $event),
  452. maxlength: "11"
  453. },
  454. null,
  455. 512
  456. /* NEED_PATCH */
  457. ), [
  458. [vue.vModelText, _ctx.mobile]
  459. ])
  460. ]),
  461. vue.createElementVNode("view", { class: "input-group" }, [
  462. vue.withDirectives(vue.createElementVNode("input", {
  463. class: "input",
  464. password: !_ctx.showPassword,
  465. type: "text",
  466. placeholder: "请输入密码",
  467. "placeholder-style": "color: #ccc",
  468. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.password = $event)
  469. }, null, 8, ["password"]), [
  470. [vue.vModelText, _ctx.password]
  471. ]),
  472. vue.createElementVNode("view", {
  473. class: "eye-icon",
  474. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.showPassword = !_ctx.showPassword)
  475. }, [
  476. _ctx.showPassword ? (vue.openBlock(), vue.createElementBlock("svg", {
  477. key: 0,
  478. class: "svg-icon",
  479. viewBox: "0 0 24 24",
  480. fill: "none",
  481. xmlns: "http://www.w3.org/2000/svg"
  482. }, [
  483. vue.createElementVNode("path", {
  484. 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",
  485. fill: "#CCCCCC"
  486. })
  487. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  488. key: 1,
  489. class: "svg-icon",
  490. viewBox: "0 0 24 24",
  491. fill: "none",
  492. xmlns: "http://www.w3.org/2000/svg"
  493. }, [
  494. vue.createElementVNode("path", {
  495. d: "M12 7C7 7 2.73 10.11 1 14.5",
  496. stroke: "#CCCCCC",
  497. "stroke-width": "2",
  498. "stroke-linecap": "round"
  499. }),
  500. vue.createElementVNode("path", {
  501. d: "M23 14.5C21.27 10.11 17 7 12 7",
  502. stroke: "#CCCCCC",
  503. "stroke-width": "2",
  504. "stroke-linecap": "round"
  505. }),
  506. vue.createElementVNode("path", {
  507. d: "M12 7V4",
  508. stroke: "#CCCCCC",
  509. "stroke-width": "2",
  510. "stroke-linecap": "round"
  511. }),
  512. vue.createElementVNode("path", {
  513. d: "M16 8L18 5",
  514. stroke: "#CCCCCC",
  515. "stroke-width": "2",
  516. "stroke-linecap": "round"
  517. }),
  518. vue.createElementVNode("path", {
  519. d: "M8 8L6 5",
  520. stroke: "#CCCCCC",
  521. "stroke-width": "2",
  522. "stroke-linecap": "round"
  523. }),
  524. vue.createElementVNode("path", {
  525. d: "M20 10L22 8",
  526. stroke: "#CCCCCC",
  527. "stroke-width": "2",
  528. "stroke-linecap": "round"
  529. }),
  530. vue.createElementVNode("path", {
  531. d: "M4 10L2 8",
  532. stroke: "#CCCCCC",
  533. "stroke-width": "2",
  534. "stroke-linecap": "round"
  535. })
  536. ]))
  537. ])
  538. ]),
  539. vue.createElementVNode("button", {
  540. class: "login-btn",
  541. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleLogin && _ctx.handleLogin(...args))
  542. }, "登 录"),
  543. vue.createElementVNode("view", { class: "agreement" }, [
  544. vue.createElementVNode(
  545. "view",
  546. {
  547. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  548. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  549. },
  550. [
  551. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  552. key: 0,
  553. class: "check-mark"
  554. }, "✓")) : vue.createCommentVNode("v-if", true)
  555. ],
  556. 2
  557. /* CLASS */
  558. ),
  559. vue.createElementVNode("text", { class: "agree-text" }, [
  560. vue.createTextVNode(" 我已经阅读并同意 "),
  561. vue.createElementVNode("text", {
  562. class: "link",
  563. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.showAgreement(1), ["stop"]))
  564. }, "《用户服务协议》"),
  565. vue.createTextVNode(" 和 "),
  566. vue.createElementVNode("text", {
  567. class: "link",
  568. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.showAgreement(2), ["stop"]))
  569. }, "《隐私政策》")
  570. ])
  571. ])
  572. ]),
  573. vue.createElementVNode("view", {
  574. class: "footer-recruit",
  575. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.goToRecruit && _ctx.goToRecruit(...args))
  576. }, [
  577. vue.createElementVNode("view", { class: "recruit-badge" }, [
  578. (vue.openBlock(), vue.createElementBlock("svg", {
  579. class: "svg-icon flag-icon",
  580. viewBox: "0 0 24 24",
  581. fill: "none",
  582. xmlns: "http://www.w3.org/2000/svg",
  583. style: { "width": "30rpx", "height": "30rpx" }
  584. }, [
  585. vue.createElementVNode("path", {
  586. d: "M4 14V4H18L17 9L18 14H4Z",
  587. stroke: "#FF5722",
  588. "stroke-width": "2",
  589. "stroke-linejoin": "round"
  590. }),
  591. vue.createElementVNode("path", {
  592. d: "M4 22V14",
  593. stroke: "#FF5722",
  594. "stroke-width": "2",
  595. "stroke-linecap": "round"
  596. })
  597. ])),
  598. vue.createElementVNode("text", null, " 宠宝履约者招募")
  599. ])
  600. ]),
  601. vue.createVNode(_component_agreement, {
  602. visible: _ctx.showAgreementModal,
  603. "agreement-id": _ctx.currentAgreementId,
  604. onClose: _cache[8] || (_cache[8] = ($event) => _ctx.showAgreementModal = false)
  605. }, null, 8, ["visible", "agreement-id"])
  606. ])
  607. ]);
  608. }
  609. const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/login/login.vue"]]);
  610. const logic$8 = {
  611. data() {
  612. return {
  613. statusBarHeight: 20
  614. // 默认状态栏高度
  615. };
  616. },
  617. onLoad() {
  618. const sysInfo = uni.getSystemInfoSync();
  619. this.statusBarHeight = sysInfo.statusBarHeight || 20;
  620. },
  621. methods: {
  622. goBack() {
  623. const pages = getCurrentPages();
  624. if (pages.length > 1) {
  625. uni.navigateBack();
  626. } else {
  627. uni.reLaunch({
  628. url: "/pages/login/login"
  629. });
  630. }
  631. },
  632. goToForm() {
  633. uni.navigateTo({
  634. url: "/pages/recruit/form"
  635. });
  636. }
  637. }
  638. };
  639. const _sfc_main$B = logic$8;
  640. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  641. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  642. vue.createElementVNode(
  643. "view",
  644. {
  645. style: vue.normalizeStyle({ height: _ctx.statusBarHeight + "px" })
  646. },
  647. null,
  648. 4
  649. /* STYLE */
  650. ),
  651. vue.createElementVNode("view", { class: "nav-bar" }, [
  652. vue.createElementVNode("view", {
  653. class: "back-icon",
  654. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBack && _ctx.goBack(...args))
  655. }, "‹")
  656. ]),
  657. vue.createElementVNode("view", { class: "header-area" }, [
  658. vue.createElementVNode("text", { class: "main-title" }, "加入宠宝履约者"),
  659. vue.createElementVNode("text", { class: "sub-title" }, "月薪最高可达1.5万元")
  660. ]),
  661. vue.createElementVNode("view", { class: "content-card" }, [
  662. vue.createElementVNode("view", { class: "benefit-item" }, [
  663. vue.createElementVNode("view", { class: "icon-circle icon-money" }, [
  664. vue.createElementVNode("text", { class: "icon-text" }, "¥")
  665. ]),
  666. vue.createElementVNode("view", { class: "info" }, [
  667. vue.createElementVNode("text", { class: "item-title" }, "1、收入可观"),
  668. vue.createElementVNode("text", { class: "item-desc" }, "小默配送为您提供一种全新的赚钱选择,利用空闲时间,获得更多收入。")
  669. ])
  670. ]),
  671. vue.createElementVNode("view", { class: "benefit-item" }, [
  672. vue.createElementVNode("view", { class: "icon-circle icon-loc" }, [
  673. vue.createElementVNode("text", { class: "icon-text" }, "📍")
  674. ]),
  675. vue.createElementVNode("view", { class: "info" }, [
  676. vue.createElementVNode("text", { class: "item-title" }, "2、地点灵活"),
  677. vue.createElementVNode("text", { class: "item-desc" }, "小默配送覆盖国内各城市与港澳台等地,您可随时就近使用。")
  678. ])
  679. ]),
  680. vue.createElementVNode("view", { class: "benefit-item" }, [
  681. vue.createElementVNode("view", { class: "icon-circle icon-clock" }, [
  682. vue.createElementVNode("text", { class: "icon-text" }, "🕒")
  683. ]),
  684. vue.createElementVNode("view", { class: "info" }, [
  685. vue.createElementVNode("text", { class: "item-title" }, "3、时间自由"),
  686. vue.createElementVNode("text", { class: "item-desc" }, "不必再受繁琐事务约束,加入小默配送,自由分配个人时间,为自己工作。")
  687. ])
  688. ])
  689. ]),
  690. vue.createElementVNode("view", { class: "footer-area" }, [
  691. vue.createElementVNode("button", {
  692. class: "join-btn",
  693. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.goToForm && _ctx.goToForm(...args))
  694. }, "我要加入"),
  695. vue.createElementVNode("view", { class: "faq" }, [
  696. vue.createElementVNode("text", { class: "help-icon" }, "?"),
  697. vue.createTextVNode(" 常见问题 ")
  698. ])
  699. ])
  700. ]);
  701. }
  702. const PagesRecruitLanding = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/landing.vue"]]);
  703. function getMyProfile() {
  704. return request({
  705. url: "/fulfiller/fulfiller/my",
  706. method: "GET"
  707. });
  708. }
  709. function submitAudit(data) {
  710. return request({
  711. url: "/fulfiller/app/audit/submit",
  712. method: "POST",
  713. needToken: false,
  714. data
  715. });
  716. }
  717. function getServiceTypes() {
  718. return request({
  719. url: "/fulfiller/app/service/list",
  720. method: "GET",
  721. needToken: false
  722. });
  723. }
  724. function getAreaChildren(parentId = 0) {
  725. return request({
  726. url: "/fulfiller/app/area/children",
  727. method: "GET",
  728. needToken: false,
  729. data: { parentId }
  730. });
  731. }
  732. function uploadFile(filePath) {
  733. return new Promise((resolve, reject) => {
  734. const token = uni.getStorageSync("fulfiller_token");
  735. uni.uploadFile({
  736. url: BASE_URL + "/fulfiller/app/upload",
  737. filePath,
  738. name: "file",
  739. header: {
  740. "clientid": CLIENT_ID,
  741. "X-Platform-Code": PLATFORM_CODE,
  742. "Authorization": token ? `Bearer ${token}` : ""
  743. },
  744. success: (res) => {
  745. try {
  746. const data = JSON.parse(res.data);
  747. if (data.code === 200) {
  748. resolve(data);
  749. } else {
  750. uni.showToast({ title: data.msg || "上传失败", icon: "none" });
  751. reject(data);
  752. }
  753. } catch (e) {
  754. reject(e);
  755. }
  756. },
  757. fail: (err) => {
  758. uni.showToast({ title: "上传失败", icon: "none" });
  759. reject(err);
  760. }
  761. });
  762. });
  763. }
  764. function updateAvatar(avatar) {
  765. return request({
  766. url: "/fulfiller/fulfiller/my/avatar",
  767. method: "PUT",
  768. data: { avatar }
  769. });
  770. }
  771. function updateName(name) {
  772. return request({
  773. url: "/fulfiller/fulfiller/my/name",
  774. method: "PUT",
  775. data: { name }
  776. });
  777. }
  778. function updateStatus(status) {
  779. return request({
  780. url: "/fulfiller/fulfiller/my/status",
  781. method: "PUT",
  782. data: { status }
  783. });
  784. }
  785. function updateCity(data) {
  786. return request({
  787. url: "/fulfiller/fulfiller/my/city",
  788. method: "PUT",
  789. data
  790. });
  791. }
  792. function getAuthInfo() {
  793. return request({
  794. url: "/fulfiller/fulfiller/my/auth",
  795. method: "GET"
  796. });
  797. }
  798. function updatePhone(phone, code) {
  799. return request({
  800. url: "/fulfiller/fulfiller/my/phone",
  801. method: "PUT",
  802. data: { phone, code }
  803. });
  804. }
  805. function updatePassword(oldPassword, newPassword) {
  806. return request({
  807. url: "/fulfiller/fulfiller/my/password",
  808. method: "PUT",
  809. data: { oldPassword, newPassword }
  810. });
  811. }
  812. function deleteAccount() {
  813. return request({
  814. url: "/fulfiller/fulfiller/my/account",
  815. method: "DELETE"
  816. });
  817. }
  818. function updateAuthInfo(data) {
  819. return request({
  820. url: "/fulfiller/fulfiller/my/auth",
  821. method: "POST",
  822. data
  823. });
  824. }
  825. function getPendingOrders(params) {
  826. return request({
  827. url: "/order/subOrder/listPendingAccept",
  828. method: "GET",
  829. data: params
  830. });
  831. }
  832. function acceptOrder(orderId) {
  833. return request({
  834. url: "/order/subOrder/accept",
  835. method: "PUT",
  836. data: { orderId }
  837. });
  838. }
  839. function getOrderCount() {
  840. return request({
  841. url: "/order/subOrder/count",
  842. method: "GET"
  843. });
  844. }
  845. function getOrderStats() {
  846. return request({
  847. url: "/order/subOrderLog/count",
  848. method: "GET"
  849. });
  850. }
  851. function getStatisticOrders(params) {
  852. return request({
  853. url: "/order/subOrder/listOnStatistic",
  854. method: "GET",
  855. data: params
  856. });
  857. }
  858. function getMyOrders(params) {
  859. return request({
  860. url: "/order/subOrder/listOnMyOrder",
  861. method: "GET",
  862. data: params
  863. });
  864. }
  865. function getOrderInfo(id) {
  866. return request({
  867. url: `/order/subOrder/getInfo?id=${id}`,
  868. method: "GET"
  869. });
  870. }
  871. function getOrderLogs(orderId) {
  872. return request({
  873. url: `/order/subOrderLog/list?orderId=${orderId}`,
  874. method: "GET"
  875. });
  876. }
  877. function clockIn(data) {
  878. return request({
  879. url: "/order/subOrder/clockIn",
  880. method: "PUT",
  881. data
  882. });
  883. }
  884. function uploadAnamaly(data) {
  885. return request({
  886. url: "/fulfiller/anamaly/upload",
  887. method: "POST",
  888. data
  889. });
  890. }
  891. function getAnomalyList(orderId) {
  892. return request({
  893. url: `/fulfiller/anamaly/listOnOrder?orderId=${orderId}`,
  894. method: "GET"
  895. });
  896. }
  897. function submitNursingSummary(data) {
  898. return request({
  899. url: "/order/subOrder/nursingSummary",
  900. method: "PUT",
  901. data
  902. });
  903. }
  904. function listAllLevelConfigs() {
  905. return request({
  906. url: "/fulfiller/levelConfig/listAll",
  907. method: "GET"
  908. });
  909. }
  910. function listAllLevelRights() {
  911. return request({
  912. url: "/fulfiller/levelRights/listAll",
  913. method: "GET"
  914. });
  915. }
  916. function listAllService() {
  917. return request({
  918. url: "/service/list/listAll",
  919. method: "GET"
  920. });
  921. }
  922. const logic$7 = {
  923. data() {
  924. return {
  925. formData: {
  926. mobile: "",
  927. code: "",
  928. name: "",
  929. gender: 1,
  930. // 1男 2女
  931. birthday: "",
  932. password: "",
  933. serviceType: [],
  934. city: "",
  935. station: "",
  936. stationId: null
  937. },
  938. showPwd: false,
  939. isAgreed: false,
  940. serviceTypes: [],
  941. // 验证码倒计时
  942. countDown: 0,
  943. timer: null,
  944. // 日期选择器相关
  945. showPicker: false,
  946. years: [],
  947. months: [],
  948. days: [],
  949. pickerValue: [0, 0, 0],
  950. tempYear: 0,
  951. tempMonth: 0,
  952. tempDay: 0,
  953. // 城市选择器相关(从后端加载)
  954. showCityPicker: false,
  955. selectStep: 0,
  956. selectedPathway: [],
  957. currentList: [],
  958. selectedCityId: null,
  959. // 站点选择器相关(从后端加载)
  960. showStationPicker: false,
  961. stationList: [],
  962. // 协议弹窗
  963. showPrivacy: false,
  964. currentAgreementId: ""
  965. // 当前协议ID
  966. };
  967. },
  968. created() {
  969. this.initDateData();
  970. this.loadServiceTypes();
  971. },
  972. beforeDestroy() {
  973. if (this.timer)
  974. clearInterval(this.timer);
  975. },
  976. methods: {
  977. initDateData() {
  978. const now = /* @__PURE__ */ new Date();
  979. const currentYear = now.getFullYear();
  980. for (let i = 1980; i <= currentYear + 5; i++) {
  981. this.years.push(i);
  982. }
  983. for (let i = 1; i <= 12; i++) {
  984. this.months.push(i);
  985. }
  986. for (let i = 1; i <= 31; i++) {
  987. this.days.push(i);
  988. }
  989. },
  990. // 打开选择器
  991. openPicker() {
  992. const dateStr = this.formData.birthday || "2000-01-01";
  993. const [y, m, d] = dateStr.split("-").map(Number);
  994. const yIndex = this.years.indexOf(y);
  995. const mIndex = this.months.indexOf(m);
  996. const dIndex = this.days.indexOf(d);
  997. this.pickerValue = [
  998. yIndex > -1 ? yIndex : 0,
  999. mIndex > -1 ? mIndex : 0,
  1000. dIndex > -1 ? dIndex : 0
  1001. ];
  1002. this.tempYear = this.years[this.pickerValue[0]];
  1003. this.tempMonth = this.months[this.pickerValue[1]];
  1004. this.tempDay = this.days[this.pickerValue[2]];
  1005. this.showPicker = true;
  1006. },
  1007. closePicker() {
  1008. this.showPicker = false;
  1009. },
  1010. onPickerChange(e) {
  1011. const val = e.detail.value;
  1012. this.tempYear = this.years[val[0]];
  1013. this.tempMonth = this.months[val[1]];
  1014. this.tempDay = this.days[val[2]];
  1015. },
  1016. confirmPicker() {
  1017. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1018. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1019. this.formData.birthday = `${this.tempYear}-${mStr}-${dStr}`;
  1020. this.closePicker();
  1021. },
  1022. async loadServiceTypes() {
  1023. try {
  1024. const res = await listAllService();
  1025. this.serviceTypes = (res.data || []).map((item) => ({
  1026. id: item.id,
  1027. name: item.name
  1028. }));
  1029. } catch (err) {
  1030. formatAppLog("error", "at pages/recruit/logic.js:133", "加载服务类型失败:", err);
  1031. this.serviceTypes = [];
  1032. }
  1033. },
  1034. toggleService(item) {
  1035. const idx = this.formData.serviceType.indexOf(item.id);
  1036. if (idx > -1) {
  1037. this.formData.serviceType.splice(idx, 1);
  1038. } else {
  1039. this.formData.serviceType.push(item.id);
  1040. }
  1041. },
  1042. // 验证码
  1043. /* async getVerifyCode() {
  1044. if (this.countDown > 0) return;
  1045. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1046. uni.showToast({ title: '请输入正确的手机号', icon: 'none' });
  1047. return;
  1048. }
  1049. try {
  1050. const res = await sendSmsCode(this.formData.mobile);
  1051. this.countDown = 60;
  1052. this.timer = setInterval(() => {
  1053. this.countDown--;
  1054. if (this.countDown <= 0) clearInterval(this.timer);
  1055. }, 1000);
  1056. // TODO 【生产环境必须删除】开发模式自动填入验证码
  1057. const devCode = res.data;
  1058. if (devCode) {
  1059. this.formData.code = devCode;
  1060. uni.showToast({ title: '验证码: ' + devCode, icon: 'none', duration: 3000 });
  1061. } else {
  1062. uni.showToast({ title: '验证码已发送', icon: 'none' });
  1063. }
  1064. } catch (err) {
  1065. __f__('error','at pages/recruit/logic.js:170','发送验证码失败:', err);
  1066. }
  1067. }, */
  1068. // 城市选择器 logic(从后端加载)
  1069. async openCityPicker() {
  1070. this.showCityPicker = true;
  1071. if (this.selectedPathway.length === 0) {
  1072. await this.resetCityPicker();
  1073. }
  1074. },
  1075. async resetCityPicker() {
  1076. this.selectStep = 0;
  1077. this.selectedPathway = [];
  1078. await this.loadAreaChildren(0);
  1079. },
  1080. closeCityPicker() {
  1081. this.showCityPicker = false;
  1082. },
  1083. async loadAreaChildren(parentId) {
  1084. try {
  1085. const res = await getAreaChildren(parentId);
  1086. this.currentList = (res.data || []).filter((item) => item.type !== 2).map((item) => ({
  1087. id: item.id,
  1088. name: item.name,
  1089. type: item.type,
  1090. parentId: item.parentId
  1091. }));
  1092. } catch (err) {
  1093. formatAppLog("error", "at pages/recruit/logic.js:202", "加载区域数据失败:", err);
  1094. this.currentList = [];
  1095. }
  1096. },
  1097. async selectCityItem(item) {
  1098. this.selectedPathway[this.selectStep] = item;
  1099. if (item.type === 0) {
  1100. this.selectStep++;
  1101. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  1102. await this.loadAreaChildren(item.id);
  1103. if (this.currentList.length === 0) {
  1104. this.selectedCityId = item.id;
  1105. this.confirmCity();
  1106. }
  1107. } else {
  1108. this.selectedCityId = item.id;
  1109. this.confirmCity();
  1110. }
  1111. },
  1112. async jumpToStep(step) {
  1113. this.selectStep = step;
  1114. if (step === 0) {
  1115. await this.loadAreaChildren(0);
  1116. } else {
  1117. const parent = this.selectedPathway[step - 1];
  1118. if (parent) {
  1119. await this.loadAreaChildren(parent.id);
  1120. }
  1121. }
  1122. },
  1123. confirmCity() {
  1124. const fullPath = this.selectedPathway.map((i) => i.name).join(" ");
  1125. this.formData.city = fullPath;
  1126. this.formData.station = "";
  1127. this.formData.stationId = null;
  1128. const lastSelected = this.selectedPathway[this.selectedPathway.length - 1];
  1129. if (lastSelected) {
  1130. this.loadStations(lastSelected.id);
  1131. }
  1132. this.closeCityPicker();
  1133. },
  1134. // 站点选择器(从后端加载,只取type=2的站点)
  1135. async loadStations(parentId) {
  1136. try {
  1137. const res = await getAreaChildren(parentId);
  1138. this.stationList = (res.data || []).filter((item) => item.type === 2).map((item) => ({
  1139. id: item.id,
  1140. name: item.name
  1141. }));
  1142. } catch (err) {
  1143. formatAppLog("error", "at pages/recruit/logic.js:261", "加载站点数据失败:", err);
  1144. this.stationList = [];
  1145. }
  1146. },
  1147. openStationPicker() {
  1148. if (this.stationList.length === 0) {
  1149. uni.showToast({ title: "请先选择工作城市", icon: "none" });
  1150. return;
  1151. }
  1152. this.showStationPicker = true;
  1153. },
  1154. closeStationPicker() {
  1155. this.showStationPicker = false;
  1156. },
  1157. selectStation(item) {
  1158. this.formData.station = item.name;
  1159. this.formData.stationId = item.id;
  1160. this.closeStationPicker();
  1161. },
  1162. openPrivacy() {
  1163. this.currentAgreementId = 3;
  1164. this.showPrivacy = true;
  1165. },
  1166. goToAuth() {
  1167. if (!this.isAgreed) {
  1168. uni.showToast({ title: "请勾选协议", icon: "none" });
  1169. return;
  1170. }
  1171. if (!this.formData.mobile || this.formData.mobile.length !== 11) {
  1172. uni.showToast({ title: "请输入正确的手机号", icon: "none" });
  1173. return;
  1174. }
  1175. if (!this.formData.name) {
  1176. uni.showToast({ title: "请输入姓名", icon: "none" });
  1177. return;
  1178. }
  1179. if (this.formData.serviceType.length === 0) {
  1180. uni.showToast({ title: "请选择服务类型", icon: "none" });
  1181. return;
  1182. }
  1183. uni.setStorageSync("recruit_form_data", JSON.stringify(this.formData));
  1184. const selectedServices = this.serviceTypes.filter((s) => this.formData.serviceType.includes(s.id));
  1185. const services = JSON.stringify(selectedServices);
  1186. uni.navigateTo({
  1187. url: `/pages/recruit/auth?services=${encodeURIComponent(services)}`
  1188. });
  1189. }
  1190. }
  1191. };
  1192. const _sfc_main$A = {
  1193. ...logic$7,
  1194. components: {
  1195. Agreement
  1196. }
  1197. };
  1198. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  1199. const _component_agreement = vue.resolveComponent("agreement");
  1200. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  1201. vue.createElementVNode("view", { class: "card" }, [
  1202. vue.createElementVNode("view", { class: "form-item" }, [
  1203. vue.createElementVNode("text", { class: "label" }, "手机号"),
  1204. vue.createElementVNode("view", { class: "input-box" }, [
  1205. vue.createElementVNode("view", { class: "prefix-area" }, [
  1206. vue.createElementVNode("text", { class: "prefix" }, "+86"),
  1207. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  1208. ]),
  1209. vue.withDirectives(vue.createElementVNode(
  1210. "input",
  1211. {
  1212. class: "input",
  1213. type: "number",
  1214. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.mobile = $event)
  1215. },
  1216. null,
  1217. 512
  1218. /* NEED_PATCH */
  1219. ), [
  1220. [vue.vModelText, _ctx.formData.mobile]
  1221. ])
  1222. ])
  1223. ]),
  1224. vue.createElementVNode("view", { class: "form-item" }, [
  1225. vue.createElementVNode("text", { class: "label" }, "姓名"),
  1226. vue.createElementVNode("view", { class: "input-box" }, [
  1227. vue.withDirectives(vue.createElementVNode(
  1228. "input",
  1229. {
  1230. class: "input",
  1231. type: "text",
  1232. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.name = $event)
  1233. },
  1234. null,
  1235. 512
  1236. /* NEED_PATCH */
  1237. ), [
  1238. [vue.vModelText, _ctx.formData.name]
  1239. ])
  1240. ])
  1241. ]),
  1242. vue.createElementVNode("view", { class: "form-item" }, [
  1243. vue.createElementVNode("text", { class: "label" }, "性别"),
  1244. vue.createElementVNode("view", { class: "gender-group" }, [
  1245. vue.createElementVNode("view", {
  1246. class: "radio-item",
  1247. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.formData.gender = 1)
  1248. }, [
  1249. vue.createElementVNode(
  1250. "text",
  1251. {
  1252. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 1 }])
  1253. },
  1254. vue.toDisplayString(_ctx.formData.gender === 1 ? "♂" : "○"),
  1255. 3
  1256. /* TEXT, CLASS */
  1257. ),
  1258. vue.createElementVNode(
  1259. "text",
  1260. {
  1261. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 1 }])
  1262. },
  1263. " 男",
  1264. 2
  1265. /* CLASS */
  1266. )
  1267. ]),
  1268. vue.createElementVNode("view", {
  1269. class: "radio-item",
  1270. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.formData.gender = 2)
  1271. }, [
  1272. vue.createElementVNode(
  1273. "text",
  1274. {
  1275. class: vue.normalizeClass(["radio-icon", { active: _ctx.formData.gender === 2 }])
  1276. },
  1277. vue.toDisplayString(_ctx.formData.gender === 2 ? "♀" : "○"),
  1278. 3
  1279. /* TEXT, CLASS */
  1280. ),
  1281. vue.createElementVNode(
  1282. "text",
  1283. {
  1284. class: vue.normalizeClass(["radio-label", { active: _ctx.formData.gender === 2 }])
  1285. },
  1286. " 女",
  1287. 2
  1288. /* CLASS */
  1289. )
  1290. ])
  1291. ])
  1292. ]),
  1293. vue.createElementVNode("view", { class: "form-item" }, [
  1294. vue.createElementVNode("text", { class: "label" }, "生日"),
  1295. vue.createElementVNode("view", {
  1296. class: "input-box",
  1297. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1298. }, [
  1299. vue.createElementVNode(
  1300. "text",
  1301. null,
  1302. vue.toDisplayString(_ctx.formData.birthday || "请选择生日"),
  1303. 1
  1304. /* TEXT */
  1305. ),
  1306. (vue.openBlock(), vue.createElementBlock("svg", {
  1307. class: "arrow-right",
  1308. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1309. viewBox: "0 0 1024 1024",
  1310. version: "1.1",
  1311. xmlns: "http://www.w3.org/2000/svg"
  1312. }, [
  1313. vue.createElementVNode("path", {
  1314. 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",
  1315. fill: "#CCCCCC"
  1316. })
  1317. ]))
  1318. ])
  1319. ]),
  1320. vue.createElementVNode("view", { class: "form-item" }, [
  1321. vue.createElementVNode("text", { class: "label" }, "密码"),
  1322. vue.createElementVNode("view", { class: "input-box" }, [
  1323. vue.withDirectives(vue.createElementVNode("input", {
  1324. class: "input",
  1325. password: !_ctx.showPwd,
  1326. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.formData.password = $event),
  1327. placeholder: "设置登录密码"
  1328. }, null, 8, ["password"]), [
  1329. [vue.vModelText, _ctx.formData.password]
  1330. ]),
  1331. vue.createElementVNode("view", {
  1332. class: "monkey-icon",
  1333. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.showPwd = !_ctx.showPwd)
  1334. }, [
  1335. _ctx.showPwd ? (vue.openBlock(), vue.createElementBlock("svg", {
  1336. key: 0,
  1337. class: "svg-icon",
  1338. viewBox: "0 0 24 24",
  1339. fill: "none",
  1340. xmlns: "http://www.w3.org/2000/svg"
  1341. }, [
  1342. vue.createElementVNode("path", {
  1343. 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",
  1344. fill: "#CCCCCC"
  1345. })
  1346. ])) : (vue.openBlock(), vue.createElementBlock("svg", {
  1347. key: 1,
  1348. class: "svg-icon",
  1349. viewBox: "0 0 24 24",
  1350. fill: "none",
  1351. xmlns: "http://www.w3.org/2000/svg"
  1352. }, [
  1353. vue.createElementVNode("path", {
  1354. d: "M12 7C7 7 2.73 10.11 1 14.5",
  1355. stroke: "#CCCCCC",
  1356. "stroke-width": "2",
  1357. "stroke-linecap": "round"
  1358. }),
  1359. vue.createElementVNode("path", {
  1360. d: "M23 14.5C21.27 10.11 17 7 12 7",
  1361. stroke: "#CCCCCC",
  1362. "stroke-width": "2",
  1363. "stroke-linecap": "round"
  1364. }),
  1365. vue.createElementVNode("path", {
  1366. d: "M12 7V4",
  1367. stroke: "#CCCCCC",
  1368. "stroke-width": "2",
  1369. "stroke-linecap": "round"
  1370. }),
  1371. vue.createElementVNode("path", {
  1372. d: "M16 8L18 5",
  1373. stroke: "#CCCCCC",
  1374. "stroke-width": "2",
  1375. "stroke-linecap": "round"
  1376. }),
  1377. vue.createElementVNode("path", {
  1378. d: "M8 8L6 5",
  1379. stroke: "#CCCCCC",
  1380. "stroke-width": "2",
  1381. "stroke-linecap": "round"
  1382. }),
  1383. vue.createElementVNode("path", {
  1384. d: "M20 10L22 8",
  1385. stroke: "#CCCCCC",
  1386. "stroke-width": "2",
  1387. "stroke-linecap": "round"
  1388. }),
  1389. vue.createElementVNode("path", {
  1390. d: "M4 10L2 8",
  1391. stroke: "#CCCCCC",
  1392. "stroke-width": "2",
  1393. "stroke-linecap": "round"
  1394. })
  1395. ]))
  1396. ])
  1397. ])
  1398. ])
  1399. ]),
  1400. vue.createElementVNode("view", { class: "card" }, [
  1401. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  1402. vue.createElementVNode("view", { class: "service-types" }, [
  1403. (vue.openBlock(true), vue.createElementBlock(
  1404. vue.Fragment,
  1405. null,
  1406. vue.renderList(_ctx.serviceTypes, (item, index) => {
  1407. return vue.openBlock(), vue.createElementBlock("view", {
  1408. class: vue.normalizeClass(["type-btn", { selected: _ctx.formData.serviceType.includes(item.id) }]),
  1409. key: item.id,
  1410. onClick: ($event) => _ctx.toggleService(item)
  1411. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  1412. }),
  1413. 128
  1414. /* KEYED_FRAGMENT */
  1415. ))
  1416. ]),
  1417. vue.createElementVNode("view", { class: "form-item" }, [
  1418. vue.createElementVNode("text", { class: "label" }, "工作城市"),
  1419. vue.createElementVNode("view", {
  1420. class: "input-box",
  1421. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openCityPicker && _ctx.openCityPicker(...args))
  1422. }, [
  1423. vue.createElementVNode(
  1424. "text",
  1425. {
  1426. style: vue.normalizeStyle({ color: _ctx.formData.city ? "#333" : "#ccc" })
  1427. },
  1428. vue.toDisplayString(_ctx.formData.city || "请选择工作城市"),
  1429. 5
  1430. /* TEXT, STYLE */
  1431. ),
  1432. (vue.openBlock(), vue.createElementBlock("svg", {
  1433. class: "arrow-right",
  1434. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1435. viewBox: "0 0 1024 1024",
  1436. version: "1.1",
  1437. xmlns: "http://www.w3.org/2000/svg"
  1438. }, [
  1439. vue.createElementVNode("path", {
  1440. 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",
  1441. fill: "#CCCCCC"
  1442. })
  1443. ]))
  1444. ])
  1445. ]),
  1446. vue.createElementVNode("view", { class: "form-item" }, [
  1447. vue.createElementVNode("text", { class: "label" }, "服务站点"),
  1448. vue.createElementVNode("view", {
  1449. class: "input-box",
  1450. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.openStationPicker && _ctx.openStationPicker(...args))
  1451. }, [
  1452. vue.createElementVNode(
  1453. "text",
  1454. {
  1455. style: vue.normalizeStyle({ color: _ctx.formData.station ? "#333" : "#ccc" })
  1456. },
  1457. vue.toDisplayString(_ctx.formData.station || "请选择服务站点"),
  1458. 5
  1459. /* TEXT, STYLE */
  1460. ),
  1461. (vue.openBlock(), vue.createElementBlock("svg", {
  1462. class: "arrow-right",
  1463. style: { "width": "24rpx", "height": "24rpx", "margin-left": "auto" },
  1464. viewBox: "0 0 1024 1024",
  1465. version: "1.1",
  1466. xmlns: "http://www.w3.org/2000/svg"
  1467. }, [
  1468. vue.createElementVNode("path", {
  1469. 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",
  1470. fill: "#CCCCCC"
  1471. })
  1472. ]))
  1473. ])
  1474. ])
  1475. ]),
  1476. vue.createElementVNode(
  1477. "view",
  1478. {
  1479. class: vue.normalizeClass(["picker-mask", { show: _ctx.showCityPicker }]),
  1480. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1481. },
  1482. [
  1483. vue.createElementVNode("view", {
  1484. class: "picker-content",
  1485. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  1486. }, ["stop"]))
  1487. }, [
  1488. vue.createElementVNode("view", { class: "picker-header" }, [
  1489. vue.createElementVNode("text", {
  1490. class: "picker-btn-cancel",
  1491. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeCityPicker && _ctx.closeCityPicker(...args))
  1492. }, "取消"),
  1493. vue.createElementVNode("text", { class: "picker-title" }, "请选择工作城市"),
  1494. vue.createElementVNode("text", {
  1495. class: "picker-btn-confirm",
  1496. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmCity && _ctx.confirmCity(...args))
  1497. }, "确定")
  1498. ]),
  1499. vue.createElementVNode("view", { class: "picker-body" }, [
  1500. vue.createElementVNode("view", { class: "timeline-area" }, [
  1501. (vue.openBlock(true), vue.createElementBlock(
  1502. vue.Fragment,
  1503. null,
  1504. vue.renderList(_ctx.selectedPathway, (item, index) => {
  1505. return vue.openBlock(), vue.createElementBlock("view", {
  1506. class: "timeline-item",
  1507. key: index,
  1508. onClick: ($event) => _ctx.jumpToStep(index)
  1509. }, [
  1510. vue.createElementVNode("view", { class: "timeline-dot" }),
  1511. vue.createElementVNode(
  1512. "text",
  1513. null,
  1514. vue.toDisplayString(item.name),
  1515. 1
  1516. /* TEXT */
  1517. )
  1518. ], 8, ["onClick"]);
  1519. }),
  1520. 128
  1521. /* KEYED_FRAGMENT */
  1522. )),
  1523. _ctx.selectStep === _ctx.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  1524. key: 0,
  1525. class: "timeline-item active"
  1526. }, [
  1527. vue.createElementVNode("view", { class: "timeline-dot" }),
  1528. vue.createElementVNode("text", null, "请选择")
  1529. ])) : vue.createCommentVNode("v-if", true)
  1530. ]),
  1531. vue.createElementVNode("scroll-view", {
  1532. "scroll-y": "",
  1533. class: "list-area"
  1534. }, [
  1535. (vue.openBlock(true), vue.createElementBlock(
  1536. vue.Fragment,
  1537. null,
  1538. vue.renderList(_ctx.currentList, (item, index) => {
  1539. return vue.openBlock(), vue.createElementBlock("view", {
  1540. class: "list-item",
  1541. key: item.id,
  1542. onClick: ($event) => _ctx.selectCityItem(item)
  1543. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1544. }),
  1545. 128
  1546. /* KEYED_FRAGMENT */
  1547. )),
  1548. _ctx.currentList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  1549. key: 0,
  1550. style: { "padding": "20rpx", "color": "#999" }
  1551. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  1552. ])
  1553. ])
  1554. ])
  1555. ],
  1556. 2
  1557. /* CLASS */
  1558. ),
  1559. vue.createElementVNode(
  1560. "view",
  1561. {
  1562. class: vue.normalizeClass(["picker-mask", { show: _ctx.showStationPicker }]),
  1563. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1564. },
  1565. [
  1566. vue.createElementVNode("view", {
  1567. class: "picker-content",
  1568. onClick: _cache[14] || (_cache[14] = vue.withModifiers(() => {
  1569. }, ["stop"]))
  1570. }, [
  1571. vue.createElementVNode("view", {
  1572. class: "picker-header",
  1573. style: { "justify-content": "center", "position": "relative" }
  1574. }, [
  1575. vue.createElementVNode("text", {
  1576. class: "picker-btn-cancel",
  1577. style: { "position": "absolute", "left": "30rpx" },
  1578. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeStationPicker && _ctx.closeStationPicker(...args))
  1579. }, "取消"),
  1580. vue.createElementVNode("text", { class: "picker-title" }, "选择服务站点")
  1581. ]),
  1582. vue.createElementVNode("scroll-view", {
  1583. "scroll-y": "",
  1584. class: "picker-list"
  1585. }, [
  1586. (vue.openBlock(true), vue.createElementBlock(
  1587. vue.Fragment,
  1588. null,
  1589. vue.renderList(_ctx.stationList, (item, index) => {
  1590. return vue.openBlock(), vue.createElementBlock("view", {
  1591. class: "station-item",
  1592. key: index,
  1593. onClick: ($event) => _ctx.selectStation(item)
  1594. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  1595. }),
  1596. 128
  1597. /* KEYED_FRAGMENT */
  1598. ))
  1599. ])
  1600. ])
  1601. ],
  1602. 2
  1603. /* CLASS */
  1604. ),
  1605. vue.createElementVNode("view", { class: "footer-actions" }, [
  1606. vue.createElementVNode("view", { class: "agreement-row" }, [
  1607. vue.createElementVNode(
  1608. "view",
  1609. {
  1610. class: vue.normalizeClass(["checkbox", { checked: _ctx.isAgreed }]),
  1611. onClick: _cache[16] || (_cache[16] = ($event) => _ctx.isAgreed = !_ctx.isAgreed)
  1612. },
  1613. [
  1614. _ctx.isAgreed ? (vue.openBlock(), vue.createElementBlock("text", {
  1615. key: 0,
  1616. class: "check-mark"
  1617. }, "✓")) : vue.createCommentVNode("v-if", true)
  1618. ],
  1619. 2
  1620. /* CLASS */
  1621. ),
  1622. vue.createElementVNode("text", { class: "agree-text" }, [
  1623. vue.createTextVNode("我已阅读并同意 "),
  1624. vue.createElementVNode("text", {
  1625. style: { "color": "#2979ff" },
  1626. onClick: _cache[17] || (_cache[17] = vue.withModifiers((...args) => _ctx.openPrivacy && _ctx.openPrivacy(...args), ["stop"]))
  1627. }, "《宠宝履约者说明》")
  1628. ])
  1629. ]),
  1630. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  1631. vue.createElementVNode("button", {
  1632. class: "submit-btn",
  1633. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.goToAuth && _ctx.goToAuth(...args))
  1634. }, "下一步,实名认证")
  1635. ])
  1636. ]),
  1637. vue.createElementVNode(
  1638. "view",
  1639. {
  1640. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  1641. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1642. },
  1643. [
  1644. vue.createElementVNode("view", {
  1645. class: "picker-content",
  1646. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  1647. }, ["stop"]))
  1648. }, [
  1649. vue.createElementVNode("view", { class: "picker-header" }, [
  1650. vue.createElementVNode("text", {
  1651. class: "picker-btn-cancel",
  1652. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  1653. }, "取消"),
  1654. vue.createElementVNode("text", { class: "picker-title" }, "选择出生日期"),
  1655. vue.createElementVNode("text", {
  1656. class: "picker-btn-confirm",
  1657. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  1658. }, "确定")
  1659. ]),
  1660. vue.createElementVNode("picker-view", {
  1661. class: "picker-view",
  1662. "indicator-style": "height: 50px;",
  1663. value: _ctx.pickerValue,
  1664. onChange: _cache[21] || (_cache[21] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  1665. }, [
  1666. vue.createElementVNode("picker-view-column", null, [
  1667. (vue.openBlock(true), vue.createElementBlock(
  1668. vue.Fragment,
  1669. null,
  1670. vue.renderList(_ctx.years, (item, index) => {
  1671. return vue.openBlock(), vue.createElementBlock(
  1672. "view",
  1673. {
  1674. class: "picker-item",
  1675. key: index
  1676. },
  1677. vue.toDisplayString(item) + "年",
  1678. 1
  1679. /* TEXT */
  1680. );
  1681. }),
  1682. 128
  1683. /* KEYED_FRAGMENT */
  1684. ))
  1685. ]),
  1686. vue.createElementVNode("picker-view-column", null, [
  1687. (vue.openBlock(true), vue.createElementBlock(
  1688. vue.Fragment,
  1689. null,
  1690. vue.renderList(_ctx.months, (item, index) => {
  1691. return vue.openBlock(), vue.createElementBlock(
  1692. "view",
  1693. {
  1694. class: "picker-item",
  1695. key: index
  1696. },
  1697. vue.toDisplayString(item) + "月",
  1698. 1
  1699. /* TEXT */
  1700. );
  1701. }),
  1702. 128
  1703. /* KEYED_FRAGMENT */
  1704. ))
  1705. ]),
  1706. vue.createElementVNode("picker-view-column", null, [
  1707. (vue.openBlock(true), vue.createElementBlock(
  1708. vue.Fragment,
  1709. null,
  1710. vue.renderList(_ctx.days, (item, index) => {
  1711. return vue.openBlock(), vue.createElementBlock(
  1712. "view",
  1713. {
  1714. class: "picker-item",
  1715. key: index
  1716. },
  1717. vue.toDisplayString(item) + "日",
  1718. 1
  1719. /* TEXT */
  1720. );
  1721. }),
  1722. 128
  1723. /* KEYED_FRAGMENT */
  1724. ))
  1725. ])
  1726. ], 40, ["value"])
  1727. ])
  1728. ],
  1729. 2
  1730. /* CLASS */
  1731. ),
  1732. vue.createVNode(_component_agreement, {
  1733. visible: _ctx.showPrivacy,
  1734. "agreement-id": _ctx.currentAgreementId,
  1735. onClose: _cache[24] || (_cache[24] = ($event) => _ctx.showPrivacy = false)
  1736. }, null, 8, ["visible", "agreement-id"])
  1737. ]);
  1738. }
  1739. const PagesRecruitForm = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/form.vue"]]);
  1740. const logic$6 = {
  1741. data() {
  1742. return {
  1743. formData: {
  1744. idType: "居民身份证",
  1745. name: "",
  1746. idNumber: "",
  1747. expiryDate: ""
  1748. },
  1749. idCardFront: "",
  1750. // 身份证正面本地预览路径
  1751. idCardBack: "",
  1752. // 身份证反面本地预览路径
  1753. idCardFrontOssId: "",
  1754. // 身份证正面 OSS ID
  1755. idCardBackOssId: "",
  1756. // 身份证反面 OSS ID
  1757. showPicker: false,
  1758. pickerValue: [0, 0, 0],
  1759. // YYYY-MM-DD
  1760. years: [],
  1761. months: [],
  1762. days: [],
  1763. tempYear: 0,
  1764. tempMonth: 0,
  1765. tempDay: 0,
  1766. serviceType: [],
  1767. // 接收上一页的服务类型
  1768. isChoosingImage: false
  1769. // 标志位:是否正在选择图片中,防止 onShow 重置数据
  1770. };
  1771. },
  1772. onLoad(options) {
  1773. if (options.services) {
  1774. try {
  1775. this.serviceType = JSON.parse(decodeURIComponent(options.services));
  1776. } catch (e) {
  1777. formatAppLog("error", "at pages/recruit/auth_logic.js:33", "Parse services failed", e);
  1778. }
  1779. }
  1780. this.initDateData();
  1781. },
  1782. onShow() {
  1783. if (this.isChoosingImage) {
  1784. this.isChoosingImage = false;
  1785. return;
  1786. }
  1787. this.resetFormData();
  1788. },
  1789. methods: {
  1790. // --- 日期选择器逻辑 ---
  1791. initDateData() {
  1792. const date = /* @__PURE__ */ new Date();
  1793. const year = date.getFullYear();
  1794. for (let i = year; i <= year + 50; i++) {
  1795. this.years.push(i);
  1796. }
  1797. for (let i = 1; i <= 12; i++) {
  1798. this.months.push(i);
  1799. }
  1800. for (let i = 1; i <= 31; i++) {
  1801. this.days.push(i);
  1802. }
  1803. },
  1804. openPicker() {
  1805. const date = /* @__PURE__ */ new Date();
  1806. const dateStr = this.formData.expiryDate || `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
  1807. const [y, m, d] = dateStr.split("-").map(Number);
  1808. let yIndex = this.years.indexOf(y);
  1809. let mIndex = this.months.indexOf(m);
  1810. let dIndex = this.days.indexOf(d);
  1811. this.pickerValue = [
  1812. yIndex > -1 ? yIndex : 0,
  1813. mIndex > -1 ? mIndex : 0,
  1814. dIndex > -1 ? dIndex : 0
  1815. ];
  1816. this.tempYear = this.years[this.pickerValue[0]];
  1817. this.tempMonth = this.months[this.pickerValue[1]];
  1818. this.tempDay = this.days[this.pickerValue[2]];
  1819. this.showPicker = true;
  1820. },
  1821. closePicker() {
  1822. this.showPicker = false;
  1823. },
  1824. onPickerChange(e) {
  1825. const val = e.detail.value;
  1826. this.tempYear = this.years[val[0]];
  1827. this.tempMonth = this.months[val[1]];
  1828. this.tempDay = this.days[val[2]];
  1829. },
  1830. confirmPicker() {
  1831. const mStr = this.tempMonth < 10 ? "0" + this.tempMonth : this.tempMonth;
  1832. const dStr = this.tempDay < 10 ? "0" + this.tempDay : this.tempDay;
  1833. this.formData.expiryDate = `${this.tempYear}-${mStr}-${dStr}`;
  1834. this.closePicker();
  1835. },
  1836. // --- 数据持久化(防止返回上一级丢失) ---
  1837. restoreAuthData() {
  1838. try {
  1839. const saved = uni.getStorageSync("recruit_auth_data");
  1840. if (saved) {
  1841. const d = JSON.parse(saved);
  1842. this.formData.name = d.name || "";
  1843. this.formData.idNumber = d.idNumber || "";
  1844. this.formData.expiryDate = d.expiryDate || "";
  1845. this.idCardFront = d.idCardFront || "";
  1846. this.idCardBack = d.idCardBack || "";
  1847. this.idCardFrontOssId = d.idCardFrontOssId || "";
  1848. this.idCardBackOssId = d.idCardBackOssId || "";
  1849. }
  1850. } catch (e) {
  1851. formatAppLog("error", "at pages/recruit/auth_logic.js:115", "恢复认证数据失败", e);
  1852. }
  1853. },
  1854. saveAuthData() {
  1855. try {
  1856. uni.setStorageSync("recruit_auth_data", JSON.stringify({
  1857. name: this.formData.name,
  1858. idNumber: this.formData.idNumber,
  1859. expiryDate: this.formData.expiryDate,
  1860. idCardFront: this.idCardFront,
  1861. idCardBack: this.idCardBack,
  1862. idCardFrontOssId: this.idCardFrontOssId,
  1863. idCardBackOssId: this.idCardBackOssId
  1864. }));
  1865. } catch (e) {
  1866. formatAppLog("error", "at pages/recruit/auth_logic.js:130", "保存认证数据失败", e);
  1867. }
  1868. },
  1869. // --- 重置表单数据 ---
  1870. resetFormData() {
  1871. this.formData.name = "";
  1872. this.formData.idNumber = "";
  1873. this.formData.expiryDate = "";
  1874. this.idCardFront = "";
  1875. this.idCardBack = "";
  1876. this.idCardFrontOssId = "";
  1877. this.idCardBackOssId = "";
  1878. try {
  1879. uni.removeStorageSync("recruit_auth_data");
  1880. } catch (e) {
  1881. formatAppLog("error", "at pages/recruit/auth_logic.js:147", "清除缓存失败", e);
  1882. }
  1883. },
  1884. // --- 图片上传(选择后自动上传到OSS) ---
  1885. chooseImage(side) {
  1886. this.isChoosingImage = true;
  1887. uni.chooseImage({
  1888. count: 1,
  1889. sizeType: ["compressed"],
  1890. sourceType: ["album", "camera"],
  1891. success: async (res) => {
  1892. const tempPath = res.tempFilePaths[0];
  1893. if (side === "front") {
  1894. this.idCardFront = tempPath;
  1895. } else {
  1896. this.idCardBack = tempPath;
  1897. }
  1898. try {
  1899. uni.showLoading({ title: "上传中..." });
  1900. const uploadRes = await uploadFile(tempPath);
  1901. if (side === "front") {
  1902. this.idCardFrontOssId = uploadRes.data.ossId;
  1903. } else {
  1904. this.idCardBackOssId = uploadRes.data.ossId;
  1905. }
  1906. uni.hideLoading();
  1907. this.saveAuthData();
  1908. } catch (err) {
  1909. uni.hideLoading();
  1910. formatAppLog("error", "at pages/recruit/auth_logic.js:178", "上传身份证图片失败:", err);
  1911. }
  1912. }
  1913. });
  1914. },
  1915. // --- 提交 ---
  1916. goToQualifications() {
  1917. this.saveAuthData();
  1918. try {
  1919. const stored = uni.getStorageSync("recruit_form_data");
  1920. if (stored) {
  1921. const data = JSON.parse(stored);
  1922. data.realName = this.formData.name;
  1923. data.idNumber = this.formData.idNumber;
  1924. data.expiryDate = this.formData.expiryDate;
  1925. data.idCardFrontOssId = this.idCardFrontOssId;
  1926. data.idCardBackOssId = this.idCardBackOssId;
  1927. uni.setStorageSync("recruit_form_data", JSON.stringify(data));
  1928. }
  1929. } catch (e) {
  1930. formatAppLog("error", "at pages/recruit/auth_logic.js:215", "保存认证数据失败", e);
  1931. }
  1932. const services = JSON.stringify(this.serviceType);
  1933. uni.navigateTo({
  1934. url: `/pages/recruit/qualifications?services=${encodeURIComponent(services)}`
  1935. });
  1936. }
  1937. }
  1938. };
  1939. const _sfc_main$z = logic$6;
  1940. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  1941. return vue.openBlock(), vue.createElementBlock("view", { class: "auth-container" }, [
  1942. vue.createElementVNode("view", { class: "top-tip" }, "请确保身份信息的准确,以免影响后续履约费用结算。"),
  1943. vue.createElementVNode("view", { class: "form-card" }, [
  1944. vue.createElementVNode("view", { class: "form-item" }, [
  1945. vue.createElementVNode("text", { class: "label" }, "证件类型"),
  1946. vue.createElementVNode("view", { class: "read-only-text" }, "居民身份证")
  1947. ]),
  1948. vue.createElementVNode("view", { class: "form-item" }, [
  1949. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  1950. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1951. vue.withDirectives(vue.createElementVNode(
  1952. "input",
  1953. {
  1954. class: "input-area",
  1955. type: "text",
  1956. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.formData.name = $event),
  1957. placeholder: "证件姓名",
  1958. "placeholder-class": "input-placeholder"
  1959. },
  1960. null,
  1961. 512
  1962. /* NEED_PATCH */
  1963. ), [
  1964. [vue.vModelText, _ctx.formData.name]
  1965. ])
  1966. ])
  1967. ]),
  1968. vue.createElementVNode("view", { class: "form-item" }, [
  1969. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  1970. vue.createElementVNode("view", { class: "gray-input-box" }, [
  1971. vue.withDirectives(vue.createElementVNode(
  1972. "input",
  1973. {
  1974. class: "input-area",
  1975. type: "idcard",
  1976. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.formData.idNumber = $event),
  1977. placeholder: "身份证号",
  1978. "placeholder-class": "input-placeholder"
  1979. },
  1980. null,
  1981. 512
  1982. /* NEED_PATCH */
  1983. ), [
  1984. [vue.vModelText, _ctx.formData.idNumber]
  1985. ])
  1986. ])
  1987. ]),
  1988. vue.createElementVNode("view", { class: "form-item" }, [
  1989. vue.createElementVNode("text", { class: "label" }, "有效日期"),
  1990. vue.createElementVNode("view", {
  1991. class: "gray-input-box",
  1992. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openPicker && _ctx.openPicker(...args))
  1993. }, [
  1994. vue.createElementVNode(
  1995. "text",
  1996. {
  1997. class: vue.normalizeClass(["input-area", { "input-placeholder": !_ctx.formData.expiryDate }])
  1998. },
  1999. vue.toDisplayString(_ctx.formData.expiryDate || "选择有效结束期限"),
  2000. 3
  2001. /* TEXT, CLASS */
  2002. ),
  2003. (vue.openBlock(), vue.createElementBlock("svg", {
  2004. class: "arrow-right",
  2005. viewBox: "0 0 1024 1024",
  2006. version: "1.1",
  2007. xmlns: "http://www.w3.org/2000/svg"
  2008. }, [
  2009. vue.createElementVNode("path", {
  2010. 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",
  2011. fill: "#CCCCCC"
  2012. })
  2013. ]))
  2014. ])
  2015. ])
  2016. ]),
  2017. vue.createElementVNode("view", { class: "upload-card" }, [
  2018. vue.createElementVNode("view", {
  2019. class: "upload-box",
  2020. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.chooseImage("front"))
  2021. }, [
  2022. _ctx.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  2023. key: 0,
  2024. src: _ctx.idCardFront,
  2025. class: "preview-img",
  2026. mode: "aspectFill"
  2027. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2028. vue.Fragment,
  2029. { key: 1 },
  2030. [
  2031. (vue.openBlock(), vue.createElementBlock("svg", {
  2032. class: "camera-icon",
  2033. viewBox: "0 0 24 24",
  2034. fill: "none",
  2035. xmlns: "http://www.w3.org/2000/svg"
  2036. }, [
  2037. vue.createElementVNode("path", {
  2038. 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",
  2039. fill: "#E0E0E0"
  2040. }),
  2041. vue.createElementVNode("circle", {
  2042. cx: "12",
  2043. cy: "12",
  2044. r: "3",
  2045. stroke: "#CCCCCC",
  2046. "stroke-width": "2"
  2047. }),
  2048. vue.createElementVNode("path", {
  2049. 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",
  2050. fill: "#CCCCCC"
  2051. })
  2052. ])),
  2053. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2054. ],
  2055. 64
  2056. /* STABLE_FRAGMENT */
  2057. ))
  2058. ]),
  2059. vue.createElementVNode("text", { class: "card-label" }, "证件带照片面")
  2060. ]),
  2061. vue.createElementVNode("view", { class: "upload-card" }, [
  2062. vue.createElementVNode("view", {
  2063. class: "upload-box",
  2064. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.chooseImage("back"))
  2065. }, [
  2066. _ctx.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  2067. key: 0,
  2068. src: _ctx.idCardBack,
  2069. class: "preview-img",
  2070. mode: "aspectFill"
  2071. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  2072. vue.Fragment,
  2073. { key: 1 },
  2074. [
  2075. (vue.openBlock(), vue.createElementBlock("svg", {
  2076. class: "camera-icon",
  2077. viewBox: "0 0 24 24",
  2078. fill: "none",
  2079. xmlns: "http://www.w3.org/2000/svg"
  2080. }, [
  2081. vue.createElementVNode("path", {
  2082. 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",
  2083. fill: "#CCCCCC"
  2084. })
  2085. ])),
  2086. vue.createElementVNode("text", { class: "upload-text" }, "点击上传")
  2087. ],
  2088. 64
  2089. /* STABLE_FRAGMENT */
  2090. ))
  2091. ]),
  2092. vue.createElementVNode("text", { class: "card-label" }, "证件国徽面")
  2093. ]),
  2094. vue.createElementVNode("view", { class: "footer-btn-area" }, [
  2095. vue.createElementVNode("button", {
  2096. class: "next-btn",
  2097. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.goToQualifications && _ctx.goToQualifications(...args))
  2098. }, "下一步,完善资质")
  2099. ]),
  2100. vue.createElementVNode(
  2101. "view",
  2102. {
  2103. class: vue.normalizeClass(["picker-mask", { show: _ctx.showPicker }]),
  2104. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2105. },
  2106. [
  2107. vue.createElementVNode("view", {
  2108. class: "picker-content",
  2109. onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
  2110. }, ["stop"]))
  2111. }, [
  2112. vue.createElementVNode("view", { class: "picker-header" }, [
  2113. vue.createElementVNode("text", {
  2114. class: "picker-btn-cancel",
  2115. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.closePicker && _ctx.closePicker(...args))
  2116. }, "取消"),
  2117. vue.createElementVNode("text", { class: "picker-title" }, "选择有效结束期限"),
  2118. vue.createElementVNode("text", {
  2119. class: "picker-btn-confirm",
  2120. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmPicker && _ctx.confirmPicker(...args))
  2121. }, "确定")
  2122. ]),
  2123. vue.createElementVNode("picker-view", {
  2124. class: "picker-view",
  2125. "indicator-style": "height: 50px;",
  2126. value: _ctx.pickerValue,
  2127. onChange: _cache[8] || (_cache[8] = (...args) => _ctx.onPickerChange && _ctx.onPickerChange(...args))
  2128. }, [
  2129. vue.createElementVNode("picker-view-column", null, [
  2130. (vue.openBlock(true), vue.createElementBlock(
  2131. vue.Fragment,
  2132. null,
  2133. vue.renderList(_ctx.years, (item, index) => {
  2134. return vue.openBlock(), vue.createElementBlock(
  2135. "view",
  2136. {
  2137. class: "picker-item",
  2138. key: index
  2139. },
  2140. vue.toDisplayString(item) + "年",
  2141. 1
  2142. /* TEXT */
  2143. );
  2144. }),
  2145. 128
  2146. /* KEYED_FRAGMENT */
  2147. ))
  2148. ]),
  2149. vue.createElementVNode("picker-view-column", null, [
  2150. (vue.openBlock(true), vue.createElementBlock(
  2151. vue.Fragment,
  2152. null,
  2153. vue.renderList(_ctx.months, (item, index) => {
  2154. return vue.openBlock(), vue.createElementBlock(
  2155. "view",
  2156. {
  2157. class: "picker-item",
  2158. key: index
  2159. },
  2160. vue.toDisplayString(item) + "月",
  2161. 1
  2162. /* TEXT */
  2163. );
  2164. }),
  2165. 128
  2166. /* KEYED_FRAGMENT */
  2167. ))
  2168. ]),
  2169. vue.createElementVNode("picker-view-column", null, [
  2170. (vue.openBlock(true), vue.createElementBlock(
  2171. vue.Fragment,
  2172. null,
  2173. vue.renderList(_ctx.days, (item, index) => {
  2174. return vue.openBlock(), vue.createElementBlock(
  2175. "view",
  2176. {
  2177. class: "picker-item",
  2178. key: index
  2179. },
  2180. vue.toDisplayString(item) + "日",
  2181. 1
  2182. /* TEXT */
  2183. );
  2184. }),
  2185. 128
  2186. /* KEYED_FRAGMENT */
  2187. ))
  2188. ])
  2189. ], 40, ["value"])
  2190. ])
  2191. ],
  2192. 2
  2193. /* CLASS */
  2194. )
  2195. ]);
  2196. }
  2197. const PagesRecruitAuth = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/auth.vue"]]);
  2198. const logic$5 = {
  2199. data() {
  2200. return {
  2201. serviceTypes: [],
  2202. // 从上一页传递过来的服务类型列表
  2203. qualifications: {},
  2204. // 存储本地预览路径 { '宠物接送': ['path1', ...], ... }
  2205. qualOssIds: {}
  2206. // 存储OSS ID { '宠物接送': ['id1', ...], ... }
  2207. };
  2208. },
  2209. onLoad(options) {
  2210. if (options.services) {
  2211. try {
  2212. this.serviceTypes = JSON.parse(decodeURIComponent(options.services));
  2213. this.serviceTypes.forEach((item) => {
  2214. this.qualifications[item.name] = [];
  2215. this.qualOssIds[item.name] = [];
  2216. });
  2217. } catch (e) {
  2218. formatAppLog("error", "at pages/recruit/qualifications_logic.js:21", "Parse services failed", e);
  2219. }
  2220. }
  2221. },
  2222. methods: {
  2223. chooseImage(serviceName) {
  2224. uni.chooseImage({
  2225. count: 9,
  2226. sizeType: ["compressed"],
  2227. sourceType: ["album", "camera"],
  2228. success: async (res) => {
  2229. if (!this.qualifications[serviceName]) {
  2230. this.qualifications[serviceName] = [];
  2231. this.qualOssIds[serviceName] = [];
  2232. }
  2233. for (const tempPath of res.tempFilePaths) {
  2234. this.qualifications[serviceName].push(tempPath);
  2235. this.$forceUpdate();
  2236. try {
  2237. const uploadRes = await uploadFile(tempPath);
  2238. this.qualOssIds[serviceName].push(uploadRes.data.ossId);
  2239. } catch (err) {
  2240. formatAppLog("error", "at pages/recruit/qualifications_logic.js:44", "上传资质图片失败:", err);
  2241. }
  2242. }
  2243. }
  2244. });
  2245. },
  2246. deleteImage(serviceName, index) {
  2247. this.qualifications[serviceName].splice(index, 1);
  2248. if (this.qualOssIds[serviceName]) {
  2249. this.qualOssIds[serviceName].splice(index, 1);
  2250. }
  2251. this.$forceUpdate();
  2252. },
  2253. goBackToForm() {
  2254. const pages = getCurrentPages();
  2255. if (pages.length > 2) {
  2256. uni.navigateBack({
  2257. delta: 2
  2258. });
  2259. } else {
  2260. uni.reLaunch({
  2261. url: "/pages/recruit/form"
  2262. });
  2263. }
  2264. },
  2265. async submit() {
  2266. let recruitData = {};
  2267. try {
  2268. const stored = uni.getStorageSync("recruit_form_data");
  2269. if (stored) {
  2270. recruitData = JSON.parse(stored);
  2271. }
  2272. } catch (e) {
  2273. formatAppLog("error", "at pages/recruit/qualifications_logic.js:80", "读取招募表单数据失败", e);
  2274. }
  2275. const allQualOssIds = [];
  2276. Object.values(this.qualOssIds).forEach((ids) => {
  2277. allQualOssIds.push(...ids);
  2278. });
  2279. const auditData = {
  2280. name: recruitData.name || "",
  2281. phone: recruitData.mobile || "",
  2282. password: recruitData.password || "",
  2283. gender: recruitData.gender === 1 ? "0" : "1",
  2284. birthday: recruitData.birthday || "",
  2285. serviceTypes: (recruitData.serviceType || []).join(","),
  2286. // 逗号分隔的服务类型ID
  2287. city: recruitData.city || "",
  2288. stationId: recruitData.stationId || null,
  2289. realName: recruitData.realName || "",
  2290. idCard: recruitData.idNumber || "",
  2291. idValidDate: recruitData.expiryDate || "",
  2292. idCardFront: recruitData.idCardFrontOssId || null,
  2293. idCardBack: recruitData.idCardBackOssId || null,
  2294. qualifications: allQualOssIds.join(",")
  2295. // 逗号分隔的资质图片OSS ID
  2296. };
  2297. uni.showLoading({ title: "提交中..." });
  2298. try {
  2299. await submitAudit(auditData);
  2300. uni.hideLoading();
  2301. uni.reLaunch({
  2302. url: "/pages/recruit/success"
  2303. });
  2304. } catch (err) {
  2305. uni.hideLoading();
  2306. formatAppLog("error", "at pages/recruit/qualifications_logic.js:116", "提交申请失败:", err);
  2307. }
  2308. }
  2309. }
  2310. };
  2311. const _sfc_main$y = logic$5;
  2312. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2313. return vue.openBlock(), vue.createElementBlock("view", { class: "qual-container" }, [
  2314. vue.createElementVNode("view", { class: "top-tip" }, "根据国家政策要求,请尽快完成实名认证与健康认证,否则无法开展配送业务。我们承诺将严格保管好您的个人信息。"),
  2315. _ctx.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  2316. key: 0,
  2317. class: "empty-state"
  2318. }, [
  2319. vue.createElementVNode("text", { class: "empty-tip" }, "请返回第一步选择服务类型"),
  2320. vue.createElementVNode("button", {
  2321. class: "back-btn",
  2322. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goBackToForm && _ctx.goBackToForm(...args))
  2323. }, "返回选择")
  2324. ])) : vue.createCommentVNode("v-if", true),
  2325. (vue.openBlock(true), vue.createElementBlock(
  2326. vue.Fragment,
  2327. null,
  2328. vue.renderList(_ctx.serviceTypes, (item, index) => {
  2329. return vue.openBlock(), vue.createElementBlock("view", {
  2330. class: "qual-card",
  2331. key: item.id
  2332. }, [
  2333. vue.createElementVNode(
  2334. "view",
  2335. { class: "card-title" },
  2336. vue.toDisplayString(item.name) + "服务资质",
  2337. 1
  2338. /* TEXT */
  2339. ),
  2340. vue.createElementVNode("view", { class: "upload-wrapper" }, [
  2341. (vue.openBlock(true), vue.createElementBlock(
  2342. vue.Fragment,
  2343. null,
  2344. vue.renderList(_ctx.qualifications[item.name], (img, imgIndex) => {
  2345. return vue.openBlock(), vue.createElementBlock("view", {
  2346. class: "img-item",
  2347. key: imgIndex
  2348. }, [
  2349. vue.createElementVNode("image", {
  2350. src: img,
  2351. class: "preview-img",
  2352. mode: "aspectFill",
  2353. onClick: ($event) => _ctx.previewImage(item.name, imgIndex)
  2354. }, null, 8, ["src", "onClick"]),
  2355. vue.createElementVNode("view", {
  2356. class: "delete-btn",
  2357. onClick: vue.withModifiers(($event) => _ctx.deleteImage(item.name, imgIndex), ["stop"])
  2358. }, "×", 8, ["onClick"])
  2359. ]);
  2360. }),
  2361. 128
  2362. /* KEYED_FRAGMENT */
  2363. )),
  2364. vue.createElementVNode("view", {
  2365. class: "upload-box",
  2366. onClick: ($event) => _ctx.chooseImage(item.name)
  2367. }, [
  2368. vue.createElementVNode("text", { class: "plus-icon" }, "+"),
  2369. vue.createElementVNode("text", { class: "upload-text" }, "上传")
  2370. ], 8, ["onClick"])
  2371. ])
  2372. ]);
  2373. }),
  2374. 128
  2375. /* KEYED_FRAGMENT */
  2376. )),
  2377. vue.createElementVNode("view", { class: "footer-actions" }, [
  2378. vue.createElementVNode("button", {
  2379. class: "submit-btn",
  2380. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submit && _ctx.submit(...args))
  2381. }, "立即提交")
  2382. ])
  2383. ]);
  2384. }
  2385. const PagesRecruitQualifications = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/qualifications.vue"]]);
  2386. const logic$4 = {
  2387. data() {
  2388. return {
  2389. station: "民治街道第一站",
  2390. name: "张三哥",
  2391. phone: "+8613612345678"
  2392. };
  2393. },
  2394. methods: {
  2395. goHome() {
  2396. uni.reLaunch({
  2397. url: "/pages/login/login"
  2398. });
  2399. }
  2400. }
  2401. };
  2402. const _sfc_main$x = logic$4;
  2403. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2404. return vue.openBlock(), vue.createElementBlock("view", { class: "success-container" }, [
  2405. vue.createElementVNode("view", { class: "icon-area" }, [
  2406. (vue.openBlock(), vue.createElementBlock("svg", {
  2407. class: "success-icon",
  2408. viewBox: "0 0 1024 1024",
  2409. version: "1.1",
  2410. xmlns: "http://www.w3.org/2000/svg"
  2411. }, [
  2412. vue.createElementVNode("path", {
  2413. 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",
  2414. fill: "#64D01D"
  2415. }),
  2416. vue.createElementVNode("path", {
  2417. 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",
  2418. fill: "#64D01D"
  2419. })
  2420. ])),
  2421. vue.createElementVNode("text", { class: "main-title" }, "提交成功")
  2422. ]),
  2423. vue.createElementVNode("text", { class: "sub-tip" }, "请保持手机畅通,等待平台工作人员与您联系"),
  2424. vue.createElementVNode("view", { class: "info-card" }, [
  2425. vue.createElementVNode("view", { class: "info-item" }, [
  2426. vue.createElementVNode("text", { class: "label" }, "服务站点:"),
  2427. vue.createElementVNode(
  2428. "text",
  2429. { class: "value" },
  2430. vue.toDisplayString(_ctx.station),
  2431. 1
  2432. /* TEXT */
  2433. )
  2434. ]),
  2435. vue.createElementVNode("view", { class: "info-item" }, [
  2436. vue.createElementVNode("text", { class: "label" }, "报 名 人 :"),
  2437. vue.createElementVNode(
  2438. "text",
  2439. { class: "value" },
  2440. vue.toDisplayString(_ctx.name),
  2441. 1
  2442. /* TEXT */
  2443. )
  2444. ]),
  2445. vue.createElementVNode("view", { class: "info-item" }, [
  2446. vue.createElementVNode("text", { class: "label" }, "联系手机:"),
  2447. vue.createElementVNode(
  2448. "text",
  2449. { class: "value" },
  2450. vue.toDisplayString(_ctx.phone),
  2451. 1
  2452. /* TEXT */
  2453. )
  2454. ])
  2455. ]),
  2456. vue.createElementVNode("view", {
  2457. class: "footer-btn",
  2458. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goHome && _ctx.goHome(...args))
  2459. }, "我知道了")
  2460. ]);
  2461. }
  2462. const PagesRecruitSuccess = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/recruit/success.vue"]]);
  2463. const _sfc_main$w = {
  2464. data() {
  2465. return {
  2466. mobile: "",
  2467. code: "",
  2468. countDown: 0,
  2469. timer: null
  2470. };
  2471. },
  2472. computed: {
  2473. mobileMask() {
  2474. if (!this.mobile)
  2475. return "";
  2476. return this.mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  2477. }
  2478. },
  2479. onLoad(options) {
  2480. if (options.mobile) {
  2481. this.mobile = options.mobile;
  2482. } else {
  2483. this.mobile = "13412346783";
  2484. }
  2485. },
  2486. methods: {
  2487. getVerifyCode() {
  2488. if (this.countDown > 0)
  2489. return;
  2490. this.countDown = 60;
  2491. this.timer = setInterval(() => {
  2492. this.countDown--;
  2493. if (this.countDown <= 0) {
  2494. clearInterval(this.timer);
  2495. }
  2496. }, 1e3);
  2497. uni.showToast({ title: "验证码已发送", icon: "none" });
  2498. },
  2499. nextStep() {
  2500. if (!this.code) {
  2501. uni.showToast({ title: "请输入验证码", icon: "none" });
  2502. return;
  2503. }
  2504. uni.navigateTo({
  2505. url: "/pages/login/reset-pwd-set"
  2506. });
  2507. }
  2508. }
  2509. };
  2510. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2511. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2512. vue.createElementVNode("view", { class: "content" }, [
  2513. vue.createElementVNode(
  2514. "view",
  2515. { class: "tip-text" },
  2516. "请输入 +86 " + vue.toDisplayString($options.mobileMask) + " 收到的短信验证码,进行验证~",
  2517. 1
  2518. /* TEXT */
  2519. ),
  2520. vue.createElementVNode("view", { class: "input-group" }, [
  2521. vue.createElementVNode("text", { class: "label" }, "验证码"),
  2522. vue.createElementVNode("view", { class: "input-wrapper" }, [
  2523. vue.withDirectives(vue.createElementVNode(
  2524. "input",
  2525. {
  2526. class: "code-input",
  2527. type: "number",
  2528. maxlength: "6",
  2529. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.code = $event)
  2530. },
  2531. null,
  2532. 512
  2533. /* NEED_PATCH */
  2534. ), [
  2535. [vue.vModelText, $data.code]
  2536. ]),
  2537. vue.createElementVNode("view", {
  2538. class: "get-code-btn",
  2539. onClick: _cache[1] || (_cache[1] = (...args) => $options.getVerifyCode && $options.getVerifyCode(...args))
  2540. }, [
  2541. vue.createElementVNode(
  2542. "text",
  2543. { class: "btn-text" },
  2544. vue.toDisplayString($data.countDown > 0 ? `${$data.countDown}s` : "获取验证码"),
  2545. 1
  2546. /* TEXT */
  2547. )
  2548. ])
  2549. ])
  2550. ]),
  2551. vue.createElementVNode("button", {
  2552. class: "next-btn",
  2553. onClick: _cache[2] || (_cache[2] = (...args) => $options.nextStep && $options.nextStep(...args))
  2554. }, "下一步")
  2555. ])
  2556. ]);
  2557. }
  2558. 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"]]);
  2559. const _sfc_main$v = {
  2560. data() {
  2561. return {
  2562. pwd1: "",
  2563. pwd2: ""
  2564. };
  2565. },
  2566. methods: {
  2567. confirmReset() {
  2568. if (!this.pwd1 || !this.pwd2) {
  2569. uni.showToast({ title: "请输入密码", icon: "none" });
  2570. return;
  2571. }
  2572. if (this.pwd1 !== this.pwd2) {
  2573. uni.showToast({ title: "两次密码不一致", icon: "none" });
  2574. return;
  2575. }
  2576. uni.showToast({ title: "重置成功", icon: "success" });
  2577. setTimeout(() => {
  2578. uni.navigateBack({
  2579. delta: 2
  2580. // 返回到登录页
  2581. });
  2582. }, 1500);
  2583. }
  2584. }
  2585. };
  2586. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2587. return vue.openBlock(), vue.createElementBlock("view", { class: "reset-container" }, [
  2588. vue.createElementVNode("view", { class: "content" }, [
  2589. vue.createElementVNode("view", { class: "tip-text" }, "请输入新密码,并重新登录验证"),
  2590. vue.createElementVNode("view", { class: "input-form" }, [
  2591. vue.createElementVNode("view", { class: "input-row" }, [
  2592. vue.withDirectives(vue.createElementVNode(
  2593. "input",
  2594. {
  2595. class: "pwd-input",
  2596. type: "text",
  2597. password: "",
  2598. placeholder: "限12-20位字母和数字组合",
  2599. "placeholder-style": "color:#ccc",
  2600. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.pwd1 = $event)
  2601. },
  2602. null,
  2603. 512
  2604. /* NEED_PATCH */
  2605. ), [
  2606. [vue.vModelText, $data.pwd1]
  2607. ])
  2608. ]),
  2609. vue.createElementVNode("view", { class: "divider" }),
  2610. vue.createElementVNode("view", { class: "input-row" }, [
  2611. vue.withDirectives(vue.createElementVNode(
  2612. "input",
  2613. {
  2614. class: "pwd-input",
  2615. type: "text",
  2616. password: "",
  2617. placeholder: "限12-20位字母和数字组合",
  2618. "placeholder-style": "color:#ccc",
  2619. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.pwd2 = $event)
  2620. },
  2621. null,
  2622. 512
  2623. /* NEED_PATCH */
  2624. ), [
  2625. [vue.vModelText, $data.pwd2]
  2626. ])
  2627. ]),
  2628. vue.createElementVNode("view", { class: "divider" })
  2629. ]),
  2630. vue.createElementVNode("button", {
  2631. class: "confirm-btn",
  2632. onClick: _cache[2] || (_cache[2] = (...args) => $options.confirmReset && $options.confirmReset(...args))
  2633. }, "确定")
  2634. ])
  2635. ]);
  2636. }
  2637. 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"]]);
  2638. function cancelOrderApi(data) {
  2639. return request({
  2640. url: "/order/subOrder/cancel",
  2641. method: "PUT",
  2642. data
  2643. });
  2644. }
  2645. function rejectOrderApi(data) {
  2646. return request({
  2647. url: "/order/subOrder/reject",
  2648. method: "PUT",
  2649. data
  2650. });
  2651. }
  2652. const _sfc_main$u = {
  2653. __name: "index",
  2654. props: {
  2655. currentPath: {
  2656. type: String,
  2657. required: true
  2658. }
  2659. },
  2660. setup(__props, { expose: __expose }) {
  2661. __expose();
  2662. const props = __props;
  2663. const list = vue.ref([
  2664. {
  2665. pagePath: "pages/home/index",
  2666. text: "任务中心",
  2667. iconPath: "/static/tabbar/home.svg",
  2668. selectedIconPath: "/static/tabbar/home-active.svg"
  2669. },
  2670. {
  2671. pagePath: "pages/orders/index",
  2672. text: "我的订单",
  2673. iconPath: "/static/tabbar/order.svg",
  2674. selectedIconPath: "/static/tabbar/order-active.svg"
  2675. },
  2676. {
  2677. pagePath: "pages/mine/index",
  2678. text: "我的",
  2679. iconPath: "/static/tabbar/mine.svg",
  2680. selectedIconPath: "/static/tabbar/mine-active.svg"
  2681. }
  2682. ]);
  2683. const switchTab = (path) => {
  2684. if (props.currentPath === path)
  2685. return;
  2686. uni.switchTab({
  2687. url: "/" + path
  2688. });
  2689. };
  2690. const __returned__ = { props, list, switchTab, ref: vue.ref };
  2691. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  2692. return __returned__;
  2693. }
  2694. };
  2695. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  2696. return vue.openBlock(), vue.createElementBlock("view", { class: "custom-tabbar" }, [
  2697. vue.createElementVNode("view", { class: "tabbar-border" }),
  2698. vue.createElementVNode("view", { class: "tabbar-list" }, [
  2699. (vue.openBlock(true), vue.createElementBlock(
  2700. vue.Fragment,
  2701. null,
  2702. vue.renderList($setup.list, (item, index) => {
  2703. return vue.openBlock(), vue.createElementBlock("view", {
  2704. class: "tabbar-item",
  2705. key: index,
  2706. onClick: ($event) => $setup.switchTab(item.pagePath)
  2707. }, [
  2708. vue.createElementVNode("image", {
  2709. class: "tabbar-icon",
  2710. src: $props.currentPath === item.pagePath ? item.selectedIconPath : item.iconPath
  2711. }, null, 8, ["src"]),
  2712. vue.createElementVNode(
  2713. "view",
  2714. {
  2715. class: vue.normalizeClass(["tabbar-text", { "tabbar-text-active": $props.currentPath === item.pagePath }])
  2716. },
  2717. vue.toDisplayString(item.text),
  2718. 3
  2719. /* TEXT, CLASS */
  2720. )
  2721. ], 8, ["onClick"]);
  2722. }),
  2723. 128
  2724. /* KEYED_FRAGMENT */
  2725. ))
  2726. ])
  2727. ]);
  2728. }
  2729. 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"]]);
  2730. const logic$3 = {
  2731. components: {
  2732. customTabbar
  2733. },
  2734. data() {
  2735. return {
  2736. taskList: [],
  2737. currentFilter: "default",
  2738. // default, distance, time
  2739. filterCondition: "筛选条件",
  2740. sortDistance: "asc",
  2741. // asc, desc
  2742. sortTime: "asc",
  2743. scrollTop: 0,
  2744. // Track scroll position
  2745. isFilterShow: false,
  2746. tempFilter: {
  2747. service: null,
  2748. distance: "全部",
  2749. amount: "全部"
  2750. },
  2751. activeFilter: {
  2752. service: null,
  2753. distance: "全部",
  2754. amount: "全部"
  2755. },
  2756. workStatus: "resting",
  2757. // resting | busy | disabled
  2758. showConfirmModal: false,
  2759. showPetModal: false,
  2760. currentPetInfo: {},
  2761. showRejectModal: false,
  2762. rejectReason: "",
  2763. currentOrder: null,
  2764. showAcceptConfirmModal: false,
  2765. showNavModal: false,
  2766. navTargetItem: null,
  2767. navTargetPointType: "",
  2768. profile: null,
  2769. profileLoading: false,
  2770. serviceList: [],
  2771. orderStats: {
  2772. total: 0,
  2773. reject: 0,
  2774. completed: 0,
  2775. price: 0
  2776. }
  2777. };
  2778. },
  2779. onPageScroll(e) {
  2780. this.scrollTop = e.scrollTop;
  2781. },
  2782. async onLoad() {
  2783. this.checkWorkStatus();
  2784. await this.loadServiceList();
  2785. this.loadTaskList();
  2786. },
  2787. onShow() {
  2788. uni.hideTabBar();
  2789. this.checkWorkStatus();
  2790. if (isLoggedIn()) {
  2791. this.loadProfile();
  2792. this.loadOrderStats();
  2793. this.loadTaskList();
  2794. this.loadServiceList();
  2795. }
  2796. },
  2797. async onPullDownRefresh() {
  2798. this.checkWorkStatus();
  2799. try {
  2800. await this.loadServiceList();
  2801. const tasks = [
  2802. this.loadTaskList()
  2803. ];
  2804. if (isLoggedIn()) {
  2805. tasks.push(this.loadProfile());
  2806. tasks.push(this.loadOrderStats());
  2807. }
  2808. await Promise.all(tasks);
  2809. } catch (err) {
  2810. formatAppLog("error", "at pages/home/logic.js:90", "刷新异常:", err);
  2811. } finally {
  2812. uni.stopPullDownRefresh();
  2813. uni.showToast({ title: "刷新成功", icon: "success" });
  2814. }
  2815. },
  2816. methods: {
  2817. async loadProfile() {
  2818. if (this.profileLoading)
  2819. return;
  2820. this.profileLoading = true;
  2821. try {
  2822. const res = await getMyProfile();
  2823. const data = res.data || null;
  2824. this.profile = data;
  2825. if (data && data.status) {
  2826. this.workStatus = data.status;
  2827. uni.setStorageSync("workStatus", data.status);
  2828. }
  2829. } catch (err) {
  2830. formatAppLog("error", "at pages/home/logic.js:110", "获取个人信息失败:", err);
  2831. } finally {
  2832. this.profileLoading = false;
  2833. }
  2834. },
  2835. async loadServiceList() {
  2836. try {
  2837. const res = await listAllService();
  2838. this.serviceList = res.data || [];
  2839. } catch (err) {
  2840. formatAppLog("error", "at pages/home/logic.js:120", "获取服务类型失败:", err);
  2841. }
  2842. },
  2843. async loadOrderStats() {
  2844. try {
  2845. const res = await getOrderCount();
  2846. this.orderStats = res.data || { total: 0, reject: 0, completed: 0, price: 0 };
  2847. } catch (err) {
  2848. formatAppLog("error", "at pages/home/logic.js:128", "获取订单统计失败:", err);
  2849. }
  2850. },
  2851. checkWorkStatus() {
  2852. const status = uni.getStorageSync("workStatus");
  2853. if (status) {
  2854. this.workStatus = status;
  2855. } else {
  2856. this.workStatus = "resting";
  2857. uni.setStorageSync("workStatus", "resting");
  2858. }
  2859. },
  2860. toggleFilter() {
  2861. if (this.workStatus === "resting")
  2862. return;
  2863. this.isFilterShow = !this.isFilterShow;
  2864. },
  2865. goToWorkStatus() {
  2866. uni.navigateTo({
  2867. url: "/pages/home/work-status"
  2868. });
  2869. },
  2870. startWork() {
  2871. this.showConfirmModal = true;
  2872. },
  2873. confirmStartWork() {
  2874. this.workStatus = "busy";
  2875. uni.setStorageSync("workStatus", "busy");
  2876. this.loadTaskList();
  2877. this.showConfirmModal = false;
  2878. uni.showToast({ title: "已开始接单", icon: "success" });
  2879. },
  2880. closeConfirmModal() {
  2881. this.showConfirmModal = false;
  2882. },
  2883. showPetProfile(item) {
  2884. this.currentPetInfo = item;
  2885. this.showPetModal = true;
  2886. },
  2887. closePetProfile() {
  2888. this.showPetModal = false;
  2889. },
  2890. openRejectModal(item) {
  2891. this.currentOrder = item;
  2892. this.rejectReason = "";
  2893. this.showRejectModal = true;
  2894. },
  2895. closeRejectModal() {
  2896. this.showRejectModal = false;
  2897. this.currentOrder = null;
  2898. },
  2899. async confirmReject() {
  2900. var _a;
  2901. if (!this.rejectReason.trim()) {
  2902. uni.showToast({ title: "请输入拒绝理由", icon: "none" });
  2903. return;
  2904. }
  2905. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2906. return;
  2907. try {
  2908. uni.showLoading({ title: "提交中...", mask: true });
  2909. await rejectOrderApi({
  2910. orderId: this.currentOrder.id,
  2911. rejectReason: this.rejectReason
  2912. });
  2913. uni.showToast({ title: "已拒绝接单", icon: "success" });
  2914. this.showRejectModal = false;
  2915. this.currentOrder = null;
  2916. this.loadTaskList();
  2917. this.loadOrderStats();
  2918. } catch (err) {
  2919. formatAppLog("error", "at pages/home/logic.js:197", "拒绝接单失败:", err);
  2920. uni.showToast({ title: "操作失败", icon: "none" });
  2921. } finally {
  2922. uni.hideLoading();
  2923. }
  2924. },
  2925. openAcceptModal(item) {
  2926. this.currentOrder = item;
  2927. this.showAcceptConfirmModal = true;
  2928. },
  2929. closeAcceptModal() {
  2930. this.showAcceptConfirmModal = false;
  2931. this.currentOrder = null;
  2932. },
  2933. async confirmAccept() {
  2934. var _a;
  2935. if (!((_a = this.currentOrder) == null ? void 0 : _a.id))
  2936. return;
  2937. try {
  2938. await acceptOrder(this.currentOrder.id);
  2939. uni.showToast({ title: "接单成功", icon: "success" });
  2940. this.showAcceptConfirmModal = false;
  2941. this.currentOrder = null;
  2942. this.loadTaskList();
  2943. this.loadProfile();
  2944. this.loadOrderStats();
  2945. } catch (err) {
  2946. formatAppLog("error", "at pages/home/logic.js:222", "接单失败:", err);
  2947. uni.showToast({ title: "接单失败", icon: "none" });
  2948. }
  2949. },
  2950. openNavigation(item, pointType) {
  2951. this.navTargetItem = item;
  2952. this.navTargetPointType = pointType;
  2953. this.showNavModal = true;
  2954. },
  2955. closeNavModal() {
  2956. this.showNavModal = false;
  2957. },
  2958. chooseMap(mapType) {
  2959. let item = this.navTargetItem;
  2960. let pointType = this.navTargetPointType;
  2961. let name = pointType === "start" ? item.startLocation : item.endLocation;
  2962. let address = pointType === "start" ? item.startAddress : item.endAddress;
  2963. this.showNavModal = false;
  2964. uni.openLocation({
  2965. latitude: 30.52,
  2966. // Mock lat
  2967. longitude: 114.31,
  2968. // Mock lng
  2969. name: name || "目的地",
  2970. address: address || "默认地址",
  2971. success: function() {
  2972. formatAppLog("log", "at pages/home/logic.js:248", "打开导航成功: " + mapType);
  2973. }
  2974. });
  2975. },
  2976. selectService(type) {
  2977. this.tempFilter.service = type;
  2978. },
  2979. selectDistance(type) {
  2980. this.tempFilter.distance = type;
  2981. },
  2982. selectAmount(type) {
  2983. this.tempFilter.amount = type;
  2984. },
  2985. resetFilter() {
  2986. this.tempFilter = {
  2987. service: null,
  2988. distance: "全部",
  2989. amount: "全部"
  2990. };
  2991. },
  2992. confirmFilter() {
  2993. this.activeFilter = { ...this.tempFilter };
  2994. this.isFilterShow = false;
  2995. this.loadTaskList();
  2996. },
  2997. closeFilter() {
  2998. this.isFilterShow = false;
  2999. },
  3000. goToDetail(item) {
  3001. formatAppLog("log", "at pages/home/logic.js:277", "Go to detail", item);
  3002. },
  3003. async loadTaskList() {
  3004. try {
  3005. const params = {
  3006. service: this.activeFilter.service,
  3007. minPrice: this.getMinPrice(),
  3008. maxPrice: this.getMaxPrice(),
  3009. pageNum: 1,
  3010. pageSize: 20
  3011. };
  3012. const res = await getPendingOrders(params);
  3013. this.taskList = (res.rows || []).map((item) => this.transformOrder(item));
  3014. } catch (err) {
  3015. formatAppLog("error", "at pages/home/logic.js:291", "获取订单列表失败:", err);
  3016. uni.showToast({ title: "加载失败", icon: "none" });
  3017. this.taskList = [];
  3018. }
  3019. },
  3020. getMinPrice() {
  3021. const amount = this.activeFilter.amount;
  3022. if (amount === "100以下")
  3023. return 0;
  3024. if (amount === "100-200")
  3025. return 1e4;
  3026. if (amount === "200-500")
  3027. return 2e4;
  3028. if (amount === "500以上")
  3029. return 5e4;
  3030. return void 0;
  3031. },
  3032. getMaxPrice() {
  3033. const amount = this.activeFilter.amount;
  3034. if (amount === "100以下")
  3035. return 1e4;
  3036. if (amount === "100-200")
  3037. return 2e4;
  3038. if (amount === "200-500")
  3039. return 5e4;
  3040. return void 0;
  3041. },
  3042. transformOrder(item) {
  3043. const service = this.serviceList.find((s) => s.id === item.service);
  3044. const serviceText = (service == null ? void 0 : service.name) || "未知";
  3045. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  3046. const mode = (service == null ? void 0 : service.mode) || 0;
  3047. const isRoundTrip = mode === 1;
  3048. return {
  3049. id: item.id,
  3050. type: isRoundTrip ? 1 : item.service,
  3051. typeText: serviceText,
  3052. typeIcon: serviceIcon,
  3053. price: (item.price / 100).toFixed(2),
  3054. timeLabel: "服务时间",
  3055. time: item.serviceTime,
  3056. petAvatar: item.petAvatar || "/static/dog.png",
  3057. petAvatarUrl: item.petAvatarUrl || "",
  3058. petName: item.petName,
  3059. petBreed: item.breed,
  3060. petGender: "M",
  3061. petAge: "",
  3062. petWeight: "",
  3063. petPersonality: "",
  3064. petHobby: "",
  3065. petRemark: "",
  3066. petTags: [],
  3067. petLogs: [],
  3068. startLocation: isRoundTrip ? item.fromAddress : "",
  3069. startAddress: isRoundTrip ? item.fromAddress : "",
  3070. startDistance: "0km",
  3071. endLocation: (item.customerName || item.contact || "") + " " + (item.customerPhone || ""),
  3072. endAddress: item.toAddress,
  3073. endDistance: "0km",
  3074. serviceContent: "",
  3075. remark: item.remark || ""
  3076. };
  3077. },
  3078. setFilter(type) {
  3079. this.currentFilter = type;
  3080. if (type === "distance") {
  3081. this.sortDistance = this.sortDistance === "asc" ? "desc" : "asc";
  3082. uni.showToast({ title: `按距离${this.sortDistance === "asc" ? "升序" : "降序"}`, icon: "none" });
  3083. } else if (type === "time") {
  3084. this.sortTime = this.sortTime === "asc" ? "desc" : "asc";
  3085. uni.showToast({ title: `按时间${this.sortTime === "asc" ? "升序" : "降序"}`, icon: "none" });
  3086. }
  3087. },
  3088. showFilterDropdown() {
  3089. this.toggleFilter();
  3090. }
  3091. }
  3092. };
  3093. const _imports_3$2 = "/static/icons/nav_arrow.svg";
  3094. const _sfc_main$t = {
  3095. ...logic$3
  3096. };
  3097. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  3098. var _a, _b, _c;
  3099. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  3100. return vue.openBlock(), vue.createElementBlock(
  3101. vue.Fragment,
  3102. null,
  3103. [
  3104. vue.createElementVNode("view", { class: "container" }, [
  3105. vue.createElementVNode(
  3106. "view",
  3107. {
  3108. class: "custom-nav-bar",
  3109. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 20 ? "#fff" : "transparent" })
  3110. },
  3111. [
  3112. vue.createElementVNode("text", { class: "nav-title" }, "任务中心")
  3113. ],
  3114. 4
  3115. /* STYLE */
  3116. ),
  3117. vue.createElementVNode("view", { class: "nav-bg" }, [
  3118. vue.createElementVNode("view", { class: "bg-circle-left" }),
  3119. vue.createElementVNode("view", { class: "bg-circle-right" })
  3120. ]),
  3121. vue.createElementVNode("view", { class: "header-section" }, [
  3122. vue.createElementVNode("view", { class: "user-info" }, [
  3123. vue.createElementVNode("image", {
  3124. class: "avatar",
  3125. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  3126. mode: "aspectFill"
  3127. }, null, 8, ["src"]),
  3128. vue.createElementVNode("view", { class: "info-content" }, [
  3129. vue.createElementVNode("view", { class: "top-row" }, [
  3130. vue.createElementVNode(
  3131. "text",
  3132. { class: "name" },
  3133. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  3134. 1
  3135. /* TEXT */
  3136. ),
  3137. vue.createElementVNode(
  3138. "view",
  3139. {
  3140. class: vue.normalizeClass(["status-pill", { "resting": _ctx.workStatus !== "busy" }]),
  3141. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.goToWorkStatus && _ctx.goToWorkStatus(...args))
  3142. },
  3143. [
  3144. vue.createElementVNode(
  3145. "view",
  3146. {
  3147. class: vue.normalizeClass(["status-dot-bg", { "busy": _ctx.workStatus === "busy", "disabled": _ctx.workStatus === "disabled" }])
  3148. },
  3149. [
  3150. _ctx.workStatus === "busy" ? (vue.openBlock(), vue.createElementBlock("text", {
  3151. key: 0,
  3152. class: "check-mark"
  3153. }, "✔")) : (vue.openBlock(), vue.createElementBlock("text", {
  3154. key: 1,
  3155. class: "check-mark",
  3156. style: { "font-size": "16rpx", "line-height": "20rpx" }
  3157. }, "✕"))
  3158. ],
  3159. 2
  3160. /* CLASS */
  3161. ),
  3162. vue.createElementVNode(
  3163. "text",
  3164. { class: "status-text" },
  3165. vue.toDisplayString(_ctx.workStatus === "busy" ? "接单中" : _ctx.workStatus === "resting" ? "正在休息" : "已禁用"),
  3166. 1
  3167. /* TEXT */
  3168. ),
  3169. vue.createElementVNode("text", { class: "arrow-down" }, "▼")
  3170. ],
  3171. 2
  3172. /* CLASS */
  3173. )
  3174. ]),
  3175. vue.createElementVNode("view", { class: "bottom-row" }, [
  3176. vue.createElementVNode(
  3177. "text",
  3178. { class: "city-label" },
  3179. "接单城市:" + vue.toDisplayString(((_c = _ctx.profile) == null ? void 0 : _c.cityName) || "暂无"),
  3180. 1
  3181. /* TEXT */
  3182. ),
  3183. vue.createElementVNode("text", { class: "city-arrow" }, ">")
  3184. ])
  3185. ])
  3186. ]),
  3187. vue.createElementVNode("view", { class: "stats-card" }, [
  3188. vue.createElementVNode("view", { class: "stat-item" }, [
  3189. vue.createElementVNode(
  3190. "text",
  3191. { class: "num" },
  3192. vue.toDisplayString(_ctx.orderStats.total),
  3193. 1
  3194. /* TEXT */
  3195. ),
  3196. vue.createElementVNode("text", { class: "label" }, "全部订单")
  3197. ]),
  3198. vue.createElementVNode("view", { class: "divider" }),
  3199. vue.createElementVNode("view", { class: "stat-item" }, [
  3200. vue.createElementVNode(
  3201. "text",
  3202. { class: "num" },
  3203. vue.toDisplayString(_ctx.orderStats.reject),
  3204. 1
  3205. /* TEXT */
  3206. ),
  3207. vue.createElementVNode("text", { class: "label" }, "拒接订单")
  3208. ]),
  3209. vue.createElementVNode("view", { class: "divider" }),
  3210. vue.createElementVNode("view", { class: "stat-item" }, [
  3211. vue.createElementVNode(
  3212. "text",
  3213. { class: "num" },
  3214. vue.toDisplayString(_ctx.orderStats.completed),
  3215. 1
  3216. /* TEXT */
  3217. ),
  3218. vue.createElementVNode("text", { class: "label" }, "完成订单")
  3219. ]),
  3220. vue.createElementVNode("view", { class: "divider" }),
  3221. vue.createElementVNode("view", { class: "stat-item" }, [
  3222. vue.createElementVNode(
  3223. "text",
  3224. { class: "num" },
  3225. vue.toDisplayString((_ctx.orderStats.price / 100).toFixed(2)),
  3226. 1
  3227. /* TEXT */
  3228. ),
  3229. vue.createElementVNode("text", { class: "label" }, "服务总得")
  3230. ])
  3231. ])
  3232. ]),
  3233. vue.createElementVNode("view", { class: "task-header" }, [
  3234. vue.createElementVNode(
  3235. "view",
  3236. {
  3237. class: "header-inner",
  3238. style: vue.normalizeStyle({ backgroundColor: _ctx.scrollTop > 300 || _ctx.isFilterShow ? "#fff" : "transparent" })
  3239. },
  3240. [
  3241. vue.createElementVNode("view", { class: "left-title" }, [
  3242. vue.createElementVNode("view", { class: "orange-bar" }),
  3243. vue.createElementVNode("text", { class: "title" }, "任务大厅"),
  3244. vue.createElementVNode(
  3245. "text",
  3246. { class: "count" },
  3247. "- (" + vue.toDisplayString(_ctx.taskList.length) + "单)",
  3248. 1
  3249. /* TEXT */
  3250. )
  3251. ]),
  3252. vue.createElementVNode("view", { class: "filter-options" }, [
  3253. vue.createElementVNode("view", {
  3254. class: "dropdown",
  3255. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.showFilterDropdown && _ctx.showFilterDropdown(...args))
  3256. }, [
  3257. vue.createElementVNode("text", null, "筛选条件"),
  3258. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  3259. ])
  3260. ])
  3261. ],
  3262. 4
  3263. /* STYLE */
  3264. ),
  3265. _ctx.isFilterShow ? (vue.openBlock(), vue.createElementBlock("view", {
  3266. key: 0,
  3267. class: "filter-mask",
  3268. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.closeFilter && _ctx.closeFilter(...args))
  3269. })) : vue.createCommentVNode("v-if", true),
  3270. vue.createElementVNode(
  3271. "view",
  3272. {
  3273. class: vue.normalizeClass(["filter-panel", { show: _ctx.isFilterShow }])
  3274. },
  3275. [
  3276. vue.createElementVNode("view", { class: "filter-section" }, [
  3277. vue.createElementVNode("text", { class: "section-title" }, "服务类型"),
  3278. vue.createElementVNode("view", { class: "options-grid" }, [
  3279. vue.createElementVNode(
  3280. "view",
  3281. {
  3282. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === null }]),
  3283. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectService(null))
  3284. },
  3285. "全部",
  3286. 2
  3287. /* CLASS */
  3288. ),
  3289. (vue.openBlock(true), vue.createElementBlock(
  3290. vue.Fragment,
  3291. null,
  3292. vue.renderList(_ctx.serviceList, (item) => {
  3293. return vue.openBlock(), vue.createElementBlock("view", {
  3294. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.service === item.id }]),
  3295. key: item.id,
  3296. onClick: ($event) => _ctx.selectService(item.id)
  3297. }, vue.toDisplayString(item.name), 11, ["onClick"]);
  3298. }),
  3299. 128
  3300. /* KEYED_FRAGMENT */
  3301. ))
  3302. ])
  3303. ]),
  3304. vue.createElementVNode("view", { class: "filter-section" }, [
  3305. vue.createElementVNode("text", { class: "section-title" }, "金额"),
  3306. vue.createElementVNode("view", { class: "options-grid" }, [
  3307. vue.createElementVNode(
  3308. "view",
  3309. {
  3310. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "全部" }]),
  3311. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectAmount("全部"))
  3312. },
  3313. "全部",
  3314. 2
  3315. /* CLASS */
  3316. ),
  3317. vue.createElementVNode(
  3318. "view",
  3319. {
  3320. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100以下" }]),
  3321. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectAmount("100以下"))
  3322. },
  3323. "100以下",
  3324. 2
  3325. /* CLASS */
  3326. ),
  3327. vue.createElementVNode(
  3328. "view",
  3329. {
  3330. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "100-200" }]),
  3331. onClick: _cache[6] || (_cache[6] = ($event) => _ctx.selectAmount("100-200"))
  3332. },
  3333. "100-200",
  3334. 2
  3335. /* CLASS */
  3336. ),
  3337. vue.createElementVNode(
  3338. "view",
  3339. {
  3340. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "200-500" }]),
  3341. onClick: _cache[7] || (_cache[7] = ($event) => _ctx.selectAmount("200-500"))
  3342. },
  3343. "200-500",
  3344. 2
  3345. /* CLASS */
  3346. ),
  3347. vue.createElementVNode(
  3348. "view",
  3349. {
  3350. class: vue.normalizeClass(["option-btn", { active: _ctx.tempFilter.amount === "500以上" }]),
  3351. onClick: _cache[8] || (_cache[8] = ($event) => _ctx.selectAmount("500以上"))
  3352. },
  3353. "500以上",
  3354. 2
  3355. /* CLASS */
  3356. )
  3357. ])
  3358. ]),
  3359. vue.createElementVNode("view", { class: "filter-actions" }, [
  3360. vue.createElementVNode("button", {
  3361. class: "action-btn reset",
  3362. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.resetFilter && _ctx.resetFilter(...args))
  3363. }, "重置"),
  3364. vue.createElementVNode("button", {
  3365. class: "action-btn confirm",
  3366. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.confirmFilter && _ctx.confirmFilter(...args))
  3367. }, "确认")
  3368. ])
  3369. ],
  3370. 2
  3371. /* CLASS */
  3372. )
  3373. ]),
  3374. vue.createElementVNode("view", { class: "task-list-container" }, [
  3375. vue.createElementVNode("view", { class: "task-list" }, [
  3376. (vue.openBlock(true), vue.createElementBlock(
  3377. vue.Fragment,
  3378. null,
  3379. vue.renderList(_ctx.taskList, (item) => {
  3380. return vue.openBlock(), vue.createElementBlock("view", {
  3381. class: "task-card",
  3382. key: item.id,
  3383. onClick: ($event) => _ctx.goToDetail(item)
  3384. }, [
  3385. vue.createElementVNode("view", { class: "card-header" }, [
  3386. vue.createElementVNode("view", { class: "type-badge" }, [
  3387. vue.createElementVNode("image", {
  3388. class: "type-icon",
  3389. src: item.typeIcon
  3390. }, null, 8, ["src"]),
  3391. vue.createElementVNode(
  3392. "text",
  3393. { class: "type-text" },
  3394. vue.toDisplayString(item.typeText),
  3395. 1
  3396. /* TEXT */
  3397. )
  3398. ]),
  3399. vue.createElementVNode(
  3400. "text",
  3401. { class: "price" },
  3402. "¥" + vue.toDisplayString(item.price),
  3403. 1
  3404. /* TEXT */
  3405. )
  3406. ]),
  3407. vue.createElementVNode("view", { class: "card-body" }, [
  3408. vue.createElementVNode("view", { class: "time-row" }, [
  3409. vue.createElementVNode(
  3410. "text",
  3411. { class: "label" },
  3412. vue.toDisplayString(item.timeLabel) + ":",
  3413. 1
  3414. /* TEXT */
  3415. ),
  3416. vue.createElementVNode(
  3417. "text",
  3418. { class: "value" },
  3419. vue.toDisplayString(item.time),
  3420. 1
  3421. /* TEXT */
  3422. )
  3423. ]),
  3424. vue.createElementVNode("view", { class: "pet-card" }, [
  3425. vue.createElementVNode("image", {
  3426. class: "pet-avatar",
  3427. src: item.petAvatarUrl || item.petAvatar,
  3428. mode: "aspectFill"
  3429. }, null, 8, ["src"]),
  3430. vue.createElementVNode("view", { class: "pet-info" }, [
  3431. vue.createElementVNode(
  3432. "text",
  3433. { class: "pet-name" },
  3434. vue.toDisplayString(item.petName),
  3435. 1
  3436. /* TEXT */
  3437. ),
  3438. vue.createElementVNode(
  3439. "text",
  3440. { class: "pet-breed" },
  3441. "品种: " + vue.toDisplayString(item.petBreed),
  3442. 1
  3443. /* TEXT */
  3444. )
  3445. ])
  3446. ]),
  3447. vue.createElementVNode("view", { class: "route-info" }, [
  3448. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  3449. vue.Fragment,
  3450. { key: 0 },
  3451. [
  3452. vue.createElementVNode("view", {
  3453. class: "route-item",
  3454. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  3455. }, [
  3456. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  3457. vue.createElementVNode("view", { class: "route-line-vertical" }),
  3458. vue.createElementVNode("view", { class: "address-box" }, [
  3459. vue.createElementVNode(
  3460. "text",
  3461. { class: "addr-title" },
  3462. vue.toDisplayString(item.startLocation),
  3463. 1
  3464. /* TEXT */
  3465. ),
  3466. vue.createElementVNode(
  3467. "text",
  3468. { class: "addr-desc" },
  3469. vue.toDisplayString(item.startAddress),
  3470. 1
  3471. /* TEXT */
  3472. )
  3473. ]),
  3474. vue.createElementVNode("image", {
  3475. class: "nav-arrow",
  3476. src: _imports_3$2,
  3477. style: { "flex-shrink": "0", "align-self": "center" }
  3478. })
  3479. ], 8, ["onClick"]),
  3480. vue.createElementVNode("view", {
  3481. class: "route-item",
  3482. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3483. }, [
  3484. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  3485. vue.createElementVNode("view", { class: "address-box" }, [
  3486. vue.createElementVNode(
  3487. "text",
  3488. { class: "addr-title" },
  3489. vue.toDisplayString(item.endLocation),
  3490. 1
  3491. /* TEXT */
  3492. ),
  3493. vue.createElementVNode(
  3494. "text",
  3495. { class: "addr-desc" },
  3496. vue.toDisplayString(item.endAddress),
  3497. 1
  3498. /* TEXT */
  3499. )
  3500. ]),
  3501. vue.createElementVNode("image", {
  3502. class: "nav-arrow",
  3503. src: _imports_3$2,
  3504. style: { "flex-shrink": "0", "align-self": "center" }
  3505. })
  3506. ], 8, ["onClick"])
  3507. ],
  3508. 64
  3509. /* STABLE_FRAGMENT */
  3510. )) : (vue.openBlock(), vue.createElementBlock(
  3511. vue.Fragment,
  3512. { key: 1 },
  3513. [
  3514. vue.createElementVNode("view", {
  3515. class: "route-item",
  3516. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  3517. }, [
  3518. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  3519. vue.createElementVNode("view", { class: "address-box" }, [
  3520. vue.createElementVNode(
  3521. "text",
  3522. { class: "addr-title" },
  3523. vue.toDisplayString(item.endLocation),
  3524. 1
  3525. /* TEXT */
  3526. ),
  3527. vue.createElementVNode(
  3528. "text",
  3529. { class: "addr-desc" },
  3530. vue.toDisplayString(item.endAddress),
  3531. 1
  3532. /* TEXT */
  3533. )
  3534. ]),
  3535. vue.createElementVNode("image", {
  3536. class: "nav-arrow",
  3537. src: _imports_3$2,
  3538. style: { "flex-shrink": "0", "align-self": "center" }
  3539. })
  3540. ], 8, ["onClick"]),
  3541. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  3542. key: 0,
  3543. class: "service-content"
  3544. }, [
  3545. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  3546. vue.createElementVNode(
  3547. "text",
  3548. null,
  3549. vue.toDisplayString(item.serviceContent),
  3550. 1
  3551. /* TEXT */
  3552. )
  3553. ])) : vue.createCommentVNode("v-if", true)
  3554. ],
  3555. 64
  3556. /* STABLE_FRAGMENT */
  3557. ))
  3558. ]),
  3559. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  3560. key: 0,
  3561. class: "remark-box"
  3562. }, [
  3563. vue.createElementVNode(
  3564. "text",
  3565. null,
  3566. "备注:" + vue.toDisplayString(item.remark),
  3567. 1
  3568. /* TEXT */
  3569. )
  3570. ])) : vue.createCommentVNode("v-if", true)
  3571. ]),
  3572. vue.createElementVNode("view", { class: "action-btns" }, [
  3573. vue.createElementVNode("button", {
  3574. class: "btn reject",
  3575. onClick: vue.withModifiers(($event) => _ctx.openRejectModal(item), ["stop"])
  3576. }, "拒绝", 8, ["onClick"]),
  3577. vue.createElementVNode("button", {
  3578. class: "btn accept",
  3579. onClick: vue.withModifiers(($event) => _ctx.openAcceptModal(item), ["stop"])
  3580. }, "接单", 8, ["onClick"])
  3581. ])
  3582. ], 8, ["onClick"]);
  3583. }),
  3584. 128
  3585. /* KEYED_FRAGMENT */
  3586. )),
  3587. vue.createElementVNode("view", { style: { "height": "120rpx" } })
  3588. ])
  3589. ]),
  3590. _ctx.showConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3591. key: 0,
  3592. class: "modal-mask"
  3593. }, [
  3594. vue.createElementVNode("view", { class: "custom-modal" }, [
  3595. vue.createElementVNode("text", { class: "modal-title" }, "提示"),
  3596. vue.createElementVNode("text", { class: "modal-content" }, "是否确定结束休息,开始接单?"),
  3597. vue.createElementVNode("view", { class: "modal-btns" }, [
  3598. vue.createElementVNode("button", {
  3599. class: "modal-btn cancel",
  3600. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.closeConfirmModal && _ctx.closeConfirmModal(...args))
  3601. }, "取消"),
  3602. vue.createElementVNode("button", {
  3603. class: "modal-btn confirm",
  3604. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.confirmStartWork && _ctx.confirmStartWork(...args))
  3605. }, "确定")
  3606. ])
  3607. ])
  3608. ])) : vue.createCommentVNode("v-if", true),
  3609. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3610. key: 1,
  3611. class: "pet-modal-mask",
  3612. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3613. }, [
  3614. vue.createElementVNode("view", {
  3615. class: "pet-modal-content",
  3616. onClick: _cache[15] || (_cache[15] = vue.withModifiers(() => {
  3617. }, ["stop"]))
  3618. }, [
  3619. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  3620. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  3621. vue.createElementVNode("view", {
  3622. class: "close-icon-btn",
  3623. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3624. }, "×")
  3625. ]),
  3626. vue.createElementVNode("scroll-view", {
  3627. "scroll-y": "",
  3628. class: "pet-modal-scroll"
  3629. }, [
  3630. vue.createElementVNode("view", { class: "pet-base-info" }, [
  3631. vue.createElementVNode("image", {
  3632. class: "pm-avatar",
  3633. src: _ctx.currentPetInfo.petAvatar,
  3634. mode: "aspectFill"
  3635. }, null, 8, ["src"]),
  3636. vue.createElementVNode("view", { class: "pm-info-text" }, [
  3637. vue.createElementVNode("view", { class: "pm-name-row" }, [
  3638. vue.createElementVNode(
  3639. "text",
  3640. { class: "pm-name" },
  3641. vue.toDisplayString(_ctx.currentPetInfo.petName),
  3642. 1
  3643. /* TEXT */
  3644. ),
  3645. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  3646. key: 0,
  3647. class: "pm-gender"
  3648. }, [
  3649. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  3650. vue.createElementVNode("text", null, "公")
  3651. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  3652. key: 1,
  3653. class: "pm-gender female"
  3654. }, [
  3655. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  3656. vue.createElementVNode("text", null, "母")
  3657. ])) : vue.createCommentVNode("v-if", true)
  3658. ]),
  3659. vue.createElementVNode(
  3660. "text",
  3661. { class: "pm-breed" },
  3662. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  3663. 1
  3664. /* TEXT */
  3665. )
  3666. ])
  3667. ]),
  3668. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  3669. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3670. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  3671. vue.createElementVNode(
  3672. "text",
  3673. { class: "pm-val" },
  3674. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  3675. 1
  3676. /* TEXT */
  3677. )
  3678. ]),
  3679. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  3680. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  3681. vue.createElementVNode(
  3682. "text",
  3683. { class: "pm-val" },
  3684. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  3685. 1
  3686. /* TEXT */
  3687. )
  3688. ]),
  3689. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3690. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  3691. vue.createElementVNode(
  3692. "text",
  3693. { class: "pm-val" },
  3694. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  3695. 1
  3696. /* TEXT */
  3697. )
  3698. ]),
  3699. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3700. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  3701. vue.createElementVNode(
  3702. "text",
  3703. { class: "pm-val" },
  3704. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  3705. 1
  3706. /* TEXT */
  3707. )
  3708. ]),
  3709. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  3710. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  3711. vue.createElementVNode(
  3712. "text",
  3713. { class: "pm-val" },
  3714. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  3715. 1
  3716. /* TEXT */
  3717. )
  3718. ])
  3719. ]),
  3720. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  3721. key: 0,
  3722. class: "pm-tags"
  3723. }, [
  3724. (vue.openBlock(true), vue.createElementBlock(
  3725. vue.Fragment,
  3726. null,
  3727. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  3728. return vue.openBlock(), vue.createElementBlock(
  3729. "view",
  3730. {
  3731. class: "pm-tag",
  3732. key: index
  3733. },
  3734. vue.toDisplayString(tag),
  3735. 1
  3736. /* TEXT */
  3737. );
  3738. }),
  3739. 128
  3740. /* KEYED_FRAGMENT */
  3741. ))
  3742. ])) : vue.createCommentVNode("v-if", true),
  3743. vue.createElementVNode("view", { class: "pm-section-title" }, [
  3744. vue.createElementVNode("view", { class: "orange-bar" }),
  3745. vue.createElementVNode("text", null, "备注日志")
  3746. ]),
  3747. vue.createElementVNode("view", { class: "pm-log-list" }, [
  3748. (vue.openBlock(true), vue.createElementBlock(
  3749. vue.Fragment,
  3750. null,
  3751. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  3752. return vue.openBlock(), vue.createElementBlock("view", {
  3753. class: "pm-log-item",
  3754. key: lIndex
  3755. }, [
  3756. vue.createElementVNode(
  3757. "text",
  3758. { class: "pm-log-date" },
  3759. vue.toDisplayString(log.date),
  3760. 1
  3761. /* TEXT */
  3762. ),
  3763. vue.createElementVNode(
  3764. "text",
  3765. { class: "pm-log-text" },
  3766. vue.toDisplayString(log.content),
  3767. 1
  3768. /* TEXT */
  3769. ),
  3770. vue.createElementVNode(
  3771. "text",
  3772. { class: "pm-log-recorder" },
  3773. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  3774. 1
  3775. /* TEXT */
  3776. )
  3777. ]);
  3778. }),
  3779. 128
  3780. /* KEYED_FRAGMENT */
  3781. ))
  3782. ]),
  3783. vue.createElementVNode("view", { style: { "height": "40rpx" } }),
  3784. vue.createElementVNode("button", {
  3785. class: "pm-bottom-close",
  3786. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  3787. }, "关闭"),
  3788. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  3789. ])
  3790. ])
  3791. ])) : vue.createCommentVNode("v-if", true)
  3792. ]),
  3793. _ctx.showRejectModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3794. key: 0,
  3795. class: "modal-mask"
  3796. }, [
  3797. vue.createElementVNode("view", { class: "custom-modal" }, [
  3798. vue.createElementVNode("text", { class: "modal-title" }, "拒绝接单"),
  3799. vue.withDirectives(vue.createElementVNode(
  3800. "textarea",
  3801. {
  3802. class: "reject-textarea",
  3803. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => _ctx.rejectReason = $event),
  3804. placeholder: "请输入拒绝理由(必填)",
  3805. maxlength: "100"
  3806. },
  3807. null,
  3808. 512
  3809. /* NEED_PATCH */
  3810. ), [
  3811. [vue.vModelText, _ctx.rejectReason]
  3812. ]),
  3813. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3814. vue.createElementVNode("button", {
  3815. class: "modal-btn cancel",
  3816. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closeRejectModal && _ctx.closeRejectModal(...args))
  3817. }, "取消"),
  3818. vue.createElementVNode("button", {
  3819. class: "modal-btn confirm",
  3820. onClick: _cache[19] || (_cache[19] = (...args) => _ctx.confirmReject && _ctx.confirmReject(...args))
  3821. }, "提交")
  3822. ])
  3823. ])
  3824. ])) : vue.createCommentVNode("v-if", true),
  3825. _ctx.showAcceptConfirmModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3826. key: 1,
  3827. class: "modal-mask"
  3828. }, [
  3829. vue.createElementVNode("view", { class: "custom-modal" }, [
  3830. vue.createElementVNode("text", { class: "modal-title" }, "接单确认"),
  3831. vue.createElementVNode("view", { class: "modal-content-box" }, [
  3832. vue.createElementVNode("text", { class: "modal-content-main" }, "请确认是否接收此订单?"),
  3833. vue.createElementVNode("text", { class: "modal-content-sub" }, "接单后请尽快通过电话联系用户")
  3834. ]),
  3835. vue.createElementVNode("view", { class: "modal-btns mt-30" }, [
  3836. vue.createElementVNode("button", {
  3837. class: "modal-btn cancel",
  3838. onClick: _cache[20] || (_cache[20] = (...args) => _ctx.closeAcceptModal && _ctx.closeAcceptModal(...args))
  3839. }, "再想想"),
  3840. vue.createElementVNode("button", {
  3841. class: "modal-btn confirm",
  3842. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.confirmAccept && _ctx.confirmAccept(...args))
  3843. }, "确认接单")
  3844. ])
  3845. ])
  3846. ])) : vue.createCommentVNode("v-if", true),
  3847. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  3848. key: 2,
  3849. class: "nav-modal-mask",
  3850. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3851. }, [
  3852. vue.createElementVNode("view", {
  3853. class: "nav-action-sheet",
  3854. onClick: _cache[26] || (_cache[26] = vue.withModifiers(() => {
  3855. }, ["stop"]))
  3856. }, [
  3857. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  3858. vue.createElementVNode("view", {
  3859. class: "nav-sheet-item",
  3860. onClick: _cache[22] || (_cache[22] = ($event) => _ctx.chooseMap("高德"))
  3861. }, "高德地图"),
  3862. vue.createElementVNode("view", {
  3863. class: "nav-sheet-item",
  3864. onClick: _cache[23] || (_cache[23] = ($event) => _ctx.chooseMap("腾讯"))
  3865. }, "腾讯地图"),
  3866. vue.createElementVNode("view", {
  3867. class: "nav-sheet-item",
  3868. onClick: _cache[24] || (_cache[24] = ($event) => _ctx.chooseMap("百度"))
  3869. }, "百度地图"),
  3870. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  3871. vue.createElementVNode("view", {
  3872. class: "nav-sheet-item cancel",
  3873. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  3874. }, "取消")
  3875. ])
  3876. ])) : vue.createCommentVNode("v-if", true),
  3877. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/home/index" })
  3878. ],
  3879. 64
  3880. /* STABLE_FRAGMENT */
  3881. );
  3882. }
  3883. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/home/index.vue"]]);
  3884. const _sfc_main$s = {
  3885. data() {
  3886. return {
  3887. status: "resting",
  3888. // resting | busy | disabled
  3889. loading: false
  3890. };
  3891. },
  3892. onShow() {
  3893. const savedStatus = uni.getStorageSync("workStatus");
  3894. if (savedStatus) {
  3895. this.status = savedStatus;
  3896. }
  3897. this.fetchLatestProfile();
  3898. },
  3899. methods: {
  3900. async fetchLatestProfile() {
  3901. try {
  3902. const res = await getMyProfile();
  3903. if (res.data && res.data.status) {
  3904. this.status = res.data.status;
  3905. uni.setStorageSync("workStatus", this.status);
  3906. }
  3907. } catch (err) {
  3908. formatAppLog("error", "at pages/home/work-status.vue:64", "获取状态失败:", err);
  3909. }
  3910. },
  3911. async toggleStatus() {
  3912. if (this.loading)
  3913. return;
  3914. const targetStatus = this.status === "busy" ? "resting" : "busy";
  3915. const actionText = targetStatus === "busy" ? "恢复接单" : "停止接单";
  3916. try {
  3917. uni.showLoading({ title: "处理中...", mask: true });
  3918. this.loading = true;
  3919. await updateStatus(targetStatus);
  3920. await this.fetchLatestProfile();
  3921. uni.hideLoading();
  3922. uni.showToast({ title: actionText + "成功", icon: "success" });
  3923. } catch (err) {
  3924. uni.hideLoading();
  3925. formatAppLog("error", "at pages/home/work-status.vue:88", "切换状态失败:", err);
  3926. uni.showToast({ title: "操作失败,请重试", icon: "none" });
  3927. } finally {
  3928. this.loading = false;
  3929. }
  3930. }
  3931. }
  3932. };
  3933. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  3934. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  3935. vue.createElementVNode("view", { class: "signboard-container" }, [
  3936. vue.createElementVNode("view", { class: "rope" }),
  3937. vue.createElementVNode("view", { class: "nail" }),
  3938. vue.createElementVNode(
  3939. "view",
  3940. {
  3941. class: vue.normalizeClass(["board", { "resting": $data.status !== "busy" }])
  3942. },
  3943. [
  3944. vue.createElementVNode("view", { class: "screw top-left" }),
  3945. vue.createElementVNode("view", { class: "screw top-right" }),
  3946. vue.createElementVNode("view", { class: "screw bottom-left" }),
  3947. vue.createElementVNode("view", { class: "screw bottom-right" }),
  3948. vue.createElementVNode("view", { class: "board-inner" }, [
  3949. vue.createElementVNode(
  3950. "text",
  3951. { class: "status-text" },
  3952. vue.toDisplayString($data.status === "busy" ? "接单中" : "休息中"),
  3953. 1
  3954. /* TEXT */
  3955. )
  3956. ])
  3957. ],
  3958. 2
  3959. /* CLASS */
  3960. )
  3961. ]),
  3962. vue.createElementVNode("view", { class: "status-desc" }, [
  3963. vue.createElementVNode(
  3964. "text",
  3965. null,
  3966. vue.toDisplayString($data.status === "busy" ? "当前处于工作接单中,正常接收新订单" : "当前处于休息状态,暂停接收新订单"),
  3967. 1
  3968. /* TEXT */
  3969. )
  3970. ]),
  3971. vue.createElementVNode("view", { class: "action-area" }, [
  3972. vue.createElementVNode(
  3973. "button",
  3974. {
  3975. class: vue.normalizeClass(["action-btn", { "stop": $data.status === "busy", "start": $data.status !== "busy" }]),
  3976. onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleStatus && $options.toggleStatus(...args))
  3977. },
  3978. vue.toDisplayString($data.status === "busy" ? "停止接单" : "开始接单"),
  3979. 3
  3980. /* TEXT, CLASS */
  3981. ),
  3982. vue.createElementVNode("view", { class: "tips" }, [
  3983. $data.status === "busy" ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "当您希望长时间不再接收订单时,请点击上方按钮停止接单,开启后需手动恢复。")) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "点击上方按钮恢复接单,开始接收新的任务推送。"))
  3984. ])
  3985. ])
  3986. ]);
  3987. }
  3988. 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"]]);
  3989. const logic$2 = {
  3990. components: {
  3991. customTabbar
  3992. },
  3993. data() {
  3994. return {
  3995. currentTab: 0,
  3996. tabs: ["待接送/服务", "配送/服务中", "已完成", "已取消"],
  3997. typeFilterOptions: ["全部类型"],
  3998. currentTypeFilterIdx: 0,
  3999. activeDropdown: 0,
  4000. hasTimeFilter: false,
  4001. currentMonth: "2026年2月",
  4002. weekDays: ["日", "一", "二", "三", "四", "五", "六"],
  4003. calendarDays: [],
  4004. selectedDateRange: [],
  4005. allOrderList: [],
  4006. serviceList: [],
  4007. searchContent: "",
  4008. startServiceTime: "",
  4009. endServiceTime: "",
  4010. showPetModal: false,
  4011. currentPetInfo: {},
  4012. showNavModal: false,
  4013. navTargetItem: null,
  4014. navTargetPointType: "",
  4015. activeCallItem: null,
  4016. showRemarkInput: false,
  4017. remarkText: ""
  4018. };
  4019. },
  4020. created() {
  4021. this.initCalendar();
  4022. },
  4023. async onLoad() {
  4024. await this.loadServiceList();
  4025. await this.loadOrders();
  4026. },
  4027. onShow() {
  4028. uni.hideTabBar();
  4029. this.loadOrders();
  4030. },
  4031. async onPullDownRefresh() {
  4032. try {
  4033. await this.loadServiceList();
  4034. await this.loadOrders();
  4035. } finally {
  4036. uni.stopPullDownRefresh();
  4037. }
  4038. },
  4039. watch: {
  4040. currentTab() {
  4041. this.loadOrders();
  4042. },
  4043. currentTypeFilterIdx() {
  4044. this.loadOrders();
  4045. },
  4046. searchContent() {
  4047. this.loadOrders();
  4048. }
  4049. },
  4050. computed: {
  4051. orderList() {
  4052. return this.allOrderList;
  4053. }
  4054. },
  4055. methods: {
  4056. async loadServiceList() {
  4057. try {
  4058. const res = await listAllService();
  4059. this.serviceList = res.data || [];
  4060. this.typeFilterOptions = ["全部类型", ...this.serviceList.map((s) => s.name)];
  4061. } catch (err) {
  4062. formatAppLog("error", "at pages/orders/logic.js:83", "获取服务类型失败:", err);
  4063. }
  4064. },
  4065. async loadOrders() {
  4066. var _a;
  4067. try {
  4068. const statusMap = { 0: 2, 1: 3, 2: 4, 3: 5 };
  4069. const serviceId = this.currentTypeFilterIdx > 0 ? (_a = this.serviceList[this.currentTypeFilterIdx - 1]) == null ? void 0 : _a.id : void 0;
  4070. const params = {
  4071. status: statusMap[this.currentTab],
  4072. content: this.searchContent || void 0,
  4073. service: serviceId,
  4074. startServiceTime: this.startServiceTime || void 0,
  4075. endServiceTime: this.endServiceTime || void 0
  4076. };
  4077. formatAppLog("log", "at pages/orders/logic.js:97", "订单列表请求参数:", params);
  4078. const res = await getMyOrders(params);
  4079. formatAppLog("log", "at pages/orders/logic.js:99", "订单列表响应:", res);
  4080. const orders = res.rows || [];
  4081. formatAppLog("log", "at pages/orders/logic.js:101", "订单数量:", orders.length);
  4082. this.allOrderList = orders.map((order) => this.transformOrder(order, this.currentTab));
  4083. } catch (err) {
  4084. formatAppLog("error", "at pages/orders/logic.js:104", "获取订单列表失败:", err);
  4085. this.allOrderList = [];
  4086. }
  4087. },
  4088. transformOrder(order, tabIndex) {
  4089. const service = this.serviceList.find((s) => s.id === order.service);
  4090. const serviceText = (service == null ? void 0 : service.name) || "未知";
  4091. const serviceIcon = (service == null ? void 0 : service.iconUrl) || "";
  4092. const mode = (service == null ? void 0 : service.mode) || 0;
  4093. const isRoundTrip = mode === 1;
  4094. let statusText = "接单";
  4095. if (tabIndex === 0) {
  4096. statusText = "接单";
  4097. } else if (tabIndex === 1) {
  4098. statusText = isRoundTrip ? "出发" : "开始";
  4099. } else if (tabIndex === 2) {
  4100. statusText = "已完成";
  4101. } else if (tabIndex === 3) {
  4102. statusText = "已拒绝";
  4103. }
  4104. return {
  4105. id: order.id,
  4106. status: order.status,
  4107. // 保存原始 status 用于判断权限
  4108. type: isRoundTrip ? 1 : 2,
  4109. typeText: serviceText,
  4110. typeIcon: serviceIcon,
  4111. statusText,
  4112. price: (order.price / 100).toFixed(2),
  4113. timeLabel: "服务时间",
  4114. time: order.serviceTime || "",
  4115. petAvatar: order.petAvatar || "/static/dog.png",
  4116. petAvatarUrl: order.petAvatarUrl || "",
  4117. petName: order.petName || "",
  4118. petBreed: order.breed || "",
  4119. startLocation: order.fromAddress || "",
  4120. startAddress: order.fromAddress || "",
  4121. startDistance: "0km",
  4122. endLocation: (order.customerName || "") + " " + (order.customerPhone || ""),
  4123. endAddress: order.toAddress || "",
  4124. customerPhone: order.customerPhone || "",
  4125. endDistance: "0km",
  4126. serviceContent: order.remark || "",
  4127. remark: order.remark || ""
  4128. };
  4129. },
  4130. getDisplayStatus(item) {
  4131. if (item.statusText === "已完成")
  4132. return "已完成";
  4133. if (item.statusText === "已拒绝")
  4134. return "已拒绝";
  4135. if (item.statusText === "接单") {
  4136. return item.type === 1 ? "待接送" : "待服务";
  4137. }
  4138. return item.type === 1 ? "配送中" : "服务中";
  4139. },
  4140. getStatusClass(item) {
  4141. let display = this.getDisplayStatus(item);
  4142. if (display === "已完成")
  4143. return "finish";
  4144. if (display === "已拒绝")
  4145. return "reject";
  4146. if (display === "配送中" || display === "服务中")
  4147. return "processing";
  4148. return "highlight";
  4149. },
  4150. goToDetail(item) {
  4151. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4152. },
  4153. showPetProfile(item) {
  4154. this.currentPetInfo = {
  4155. ...item,
  4156. petGender: "M",
  4157. petAge: "2岁",
  4158. petWeight: "15kg",
  4159. petPersonality: "活泼亲人,精力旺盛",
  4160. petHobby: "喜欢追飞盘,爱吃肉干",
  4161. petRemark: "肠胃较弱,不能乱喂零食;出门易爆冲,请拉紧牵引绳。",
  4162. petTags: ["拉响警报", "不能吃鸡肉", "精力旺盛"],
  4163. petLogs: [
  4164. { date: "2026-02-09 14:00", content: "今天遛弯拉了两次粑粑,精神状态很好。", recorder: "王阿姨" },
  4165. { date: "2026-02-08 10:30", content: "有些挑食,剩了小半碗狗粮。", recorder: "李师傅" },
  4166. { date: "2026-02-05 09:00", content: "建档。", recorder: "系统记录" }
  4167. ]
  4168. };
  4169. this.showPetModal = true;
  4170. },
  4171. closePetProfile() {
  4172. this.showPetModal = false;
  4173. },
  4174. openNavigation(item, pointType) {
  4175. this.navTargetItem = item;
  4176. this.navTargetPointType = pointType;
  4177. this.showNavModal = true;
  4178. },
  4179. closeNavModal() {
  4180. this.showNavModal = false;
  4181. },
  4182. chooseMap(mapType) {
  4183. let item = this.navTargetItem;
  4184. let pointType = this.navTargetPointType;
  4185. let name = pointType === "start" ? item.startLocation : item.endLocation;
  4186. let address = pointType === "start" ? item.startAddress : item.endAddress;
  4187. this.showNavModal = false;
  4188. uni.openLocation({
  4189. latitude: 30.52,
  4190. longitude: 114.31,
  4191. name: name || "目的地",
  4192. address: address || "默认地址",
  4193. success: function() {
  4194. formatAppLog("log", "at pages/orders/logic.js:210", "打开导航成功: " + mapType);
  4195. }
  4196. });
  4197. },
  4198. toggleCallMenu(item) {
  4199. if (this.activeCallItem === item) {
  4200. this.activeCallItem = null;
  4201. } else {
  4202. this.activeCallItem = item;
  4203. }
  4204. },
  4205. closeCallMenu() {
  4206. this.activeCallItem = null;
  4207. },
  4208. doCall(type, item) {
  4209. let phoneNum = "";
  4210. const targetItem = item || this.activeCallItem;
  4211. if (type === "merchant") {
  4212. phoneNum = "18900008451";
  4213. } else if (type === "customer") {
  4214. phoneNum = (targetItem == null ? void 0 : targetItem.customerPhone) || "13800000001";
  4215. }
  4216. if (phoneNum) {
  4217. uni.makePhoneCall({ phoneNumber: phoneNum });
  4218. }
  4219. this.activeCallItem = null;
  4220. },
  4221. reportAbnormal(item) {
  4222. uni.navigateTo({ url: "/pages/orders/anomaly?orderId=" + (item.id || "") });
  4223. },
  4224. toggleDropdown(idx) {
  4225. if (this.activeDropdown === idx) {
  4226. this.activeDropdown = 0;
  4227. } else {
  4228. this.activeDropdown = idx;
  4229. }
  4230. },
  4231. closeDropdown() {
  4232. this.activeDropdown = 0;
  4233. },
  4234. selectType(index) {
  4235. this.currentTypeFilterIdx = index;
  4236. this.closeDropdown();
  4237. },
  4238. initCalendar() {
  4239. let days = [];
  4240. for (let i = 1; i <= 28; i++) {
  4241. days.push(i);
  4242. }
  4243. this.calendarDays = days;
  4244. this.selectedDateRange = [2, 4];
  4245. },
  4246. prevMonth() {
  4247. uni.showToast({ title: "上个月", icon: "none" });
  4248. },
  4249. nextMonth() {
  4250. uni.showToast({ title: "下个月", icon: "none" });
  4251. },
  4252. selectDateItem(day) {
  4253. if (this.selectedDateRange.length === 2) {
  4254. this.selectedDateRange = [day];
  4255. } else if (this.selectedDateRange.length === 1) {
  4256. let start = this.selectedDateRange[0];
  4257. if (day > start) {
  4258. this.selectedDateRange = [start, day];
  4259. } else if (day < start) {
  4260. this.selectedDateRange = [day, start];
  4261. } else {
  4262. this.selectedDateRange = [];
  4263. }
  4264. } else {
  4265. this.selectedDateRange = [day];
  4266. }
  4267. },
  4268. getDateClass(day) {
  4269. if (this.selectedDateRange.length === 0)
  4270. return "";
  4271. if (this.selectedDateRange.length === 1) {
  4272. return day === this.selectedDateRange[0] ? "is-start" : "";
  4273. }
  4274. let start = this.selectedDateRange[0];
  4275. let end = this.selectedDateRange[1];
  4276. if (day === start)
  4277. return "is-start";
  4278. if (day === end)
  4279. return "is-end";
  4280. if (day > start && day < end)
  4281. return "is-between";
  4282. return "";
  4283. },
  4284. resetTimeFilter() {
  4285. this.hasTimeFilter = false;
  4286. this.selectedDateRange = [];
  4287. this.startServiceTime = "";
  4288. this.endServiceTime = "";
  4289. this.closeDropdown();
  4290. this.loadOrders();
  4291. },
  4292. confirmTimeFilter() {
  4293. if (this.selectedDateRange.length === 0) {
  4294. uni.showToast({ title: "请先选择日期", icon: "none" });
  4295. return;
  4296. }
  4297. const year = this.currentMonth.replace(/[^0-9]/g, "").substring(0, 4);
  4298. const month = this.currentMonth.replace(/[^0-9]/g, "").substring(4);
  4299. const pad = (n) => String(n).padStart(2, "0");
  4300. if (this.selectedDateRange.length === 2) {
  4301. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4302. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[1])} 23:59:59`;
  4303. } else {
  4304. this.startServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 00:00:00`;
  4305. this.endServiceTime = `${year}-${pad(month)}-${pad(this.selectedDateRange[0])} 23:59:59`;
  4306. }
  4307. this.hasTimeFilter = true;
  4308. this.closeDropdown();
  4309. this.loadOrders();
  4310. },
  4311. getMainActionText(item) {
  4312. return "查看详情";
  4313. },
  4314. mainAction(item) {
  4315. uni.navigateTo({ url: `/pages/orders/detail?id=${item.id}` });
  4316. },
  4317. openRemarkInput() {
  4318. this.remarkText = "";
  4319. this.showRemarkInput = true;
  4320. },
  4321. closeRemarkInput() {
  4322. this.showRemarkInput = false;
  4323. this.remarkText = "";
  4324. },
  4325. submitRemark() {
  4326. const text = this.remarkText.trim();
  4327. if (!text) {
  4328. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  4329. return;
  4330. }
  4331. const now = /* @__PURE__ */ new Date();
  4332. 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")}`;
  4333. if (!this.currentPetInfo.petLogs) {
  4334. this.$set(this.currentPetInfo, "petLogs", []);
  4335. }
  4336. this.currentPetInfo.petLogs.unshift({
  4337. date: dateStr,
  4338. content: text,
  4339. recorder: "我"
  4340. });
  4341. uni.showToast({ title: "备注已添加", icon: "success" });
  4342. this.closeRemarkInput();
  4343. },
  4344. /**
  4345. * 取消订单处理逻辑
  4346. * @param {Object} item - 订单项
  4347. */
  4348. handleCancelOrder(item) {
  4349. uni.showModal({
  4350. title: "提示",
  4351. content: "确认是否取消这个订单?",
  4352. success: async (res) => {
  4353. if (res.confirm) {
  4354. try {
  4355. uni.showLoading({ title: "取消中...", mask: true });
  4356. await cancelOrderApi({ orderId: item.id });
  4357. uni.showToast({ title: "订单已取消", icon: "success" });
  4358. setTimeout(() => {
  4359. this.loadOrders();
  4360. }, 1500);
  4361. } catch (err) {
  4362. formatAppLog("error", "at pages/orders/logic.js:372", "取消订单失败:", err);
  4363. uni.showToast({ title: "取消失败", icon: "none" });
  4364. } finally {
  4365. uni.hideLoading();
  4366. }
  4367. }
  4368. }
  4369. });
  4370. }
  4371. }
  4372. };
  4373. const _sfc_main$r = {
  4374. ...logic$2
  4375. };
  4376. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  4377. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  4378. return vue.openBlock(), vue.createElementBlock(
  4379. vue.Fragment,
  4380. null,
  4381. [
  4382. vue.createElementVNode("view", { class: "container" }, [
  4383. vue.createElementVNode("view", { class: "sticky-header" }, [
  4384. vue.createElementVNode("view", { class: "status-tabs" }, [
  4385. (vue.openBlock(true), vue.createElementBlock(
  4386. vue.Fragment,
  4387. null,
  4388. vue.renderList(_ctx.tabs, (tab, index) => {
  4389. return vue.openBlock(), vue.createElementBlock("view", {
  4390. class: vue.normalizeClass(["tab-item", { active: _ctx.currentTab === index }]),
  4391. key: index,
  4392. onClick: ($event) => _ctx.currentTab = index
  4393. }, [
  4394. vue.createElementVNode(
  4395. "text",
  4396. null,
  4397. vue.toDisplayString(tab),
  4398. 1
  4399. /* TEXT */
  4400. ),
  4401. _ctx.currentTab === index ? (vue.openBlock(), vue.createElementBlock("view", {
  4402. key: 0,
  4403. class: "indicator"
  4404. })) : vue.createCommentVNode("v-if", true)
  4405. ], 10, ["onClick"]);
  4406. }),
  4407. 128
  4408. /* KEYED_FRAGMENT */
  4409. ))
  4410. ]),
  4411. vue.createElementVNode("view", { class: "search-bar" }, [
  4412. vue.createElementVNode("view", { class: "search-input-box" }, [
  4413. vue.withDirectives(vue.createElementVNode(
  4414. "input",
  4415. {
  4416. class: "search-input",
  4417. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchContent = $event),
  4418. placeholder: "搜索地址/电话/姓名",
  4419. "placeholder-class": "ph-style"
  4420. },
  4421. null,
  4422. 512
  4423. /* NEED_PATCH */
  4424. ), [
  4425. [vue.vModelText, _ctx.searchContent]
  4426. ])
  4427. ])
  4428. ]),
  4429. vue.createElementVNode("view", { class: "filter-wrapper" }, [
  4430. vue.createElementVNode("view", { class: "filter-bar" }, [
  4431. vue.createElementVNode(
  4432. "view",
  4433. {
  4434. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 1 }]),
  4435. onClick: _cache[1] || (_cache[1] = ($event) => _ctx.toggleDropdown(1))
  4436. },
  4437. [
  4438. vue.createElementVNode(
  4439. "text",
  4440. {
  4441. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 1 || _ctx.currentTypeFilterIdx > 0 })
  4442. },
  4443. vue.toDisplayString(_ctx.currentTypeFilterIdx > 0 ? _ctx.typeFilterOptions[_ctx.currentTypeFilterIdx] : "全部类型"),
  4444. 3
  4445. /* TEXT, CLASS */
  4446. ),
  4447. vue.createElementVNode(
  4448. "view",
  4449. {
  4450. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 1 ? "up" : "down"])
  4451. },
  4452. null,
  4453. 2
  4454. /* CLASS */
  4455. )
  4456. ],
  4457. 2
  4458. /* CLASS */
  4459. ),
  4460. vue.createElementVNode(
  4461. "view",
  4462. {
  4463. class: vue.normalizeClass(["filter-item", { "active": _ctx.activeDropdown === 2 }]),
  4464. onClick: _cache[2] || (_cache[2] = ($event) => _ctx.toggleDropdown(2))
  4465. },
  4466. [
  4467. vue.createElementVNode(
  4468. "text",
  4469. {
  4470. class: vue.normalizeClass({ "active-text": _ctx.activeDropdown === 2 || _ctx.hasTimeFilter })
  4471. },
  4472. "服务时间",
  4473. 2
  4474. /* CLASS */
  4475. ),
  4476. vue.createElementVNode(
  4477. "view",
  4478. {
  4479. class: vue.normalizeClass(["triangle", _ctx.activeDropdown === 2 ? "up" : "down"])
  4480. },
  4481. null,
  4482. 2
  4483. /* CLASS */
  4484. )
  4485. ],
  4486. 2
  4487. /* CLASS */
  4488. )
  4489. ]),
  4490. _ctx.activeDropdown !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4491. key: 0,
  4492. class: "dropdown-mask",
  4493. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.closeDropdown && _ctx.closeDropdown(...args))
  4494. })) : vue.createCommentVNode("v-if", true),
  4495. _ctx.activeDropdown === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  4496. key: 1,
  4497. class: "dropdown-panel"
  4498. }, [
  4499. (vue.openBlock(true), vue.createElementBlock(
  4500. vue.Fragment,
  4501. null,
  4502. vue.renderList(_ctx.typeFilterOptions, (item, index) => {
  4503. return vue.openBlock(), vue.createElementBlock("view", {
  4504. class: vue.normalizeClass(["type-option", { "selected": _ctx.currentTypeFilterIdx === index }]),
  4505. key: index,
  4506. onClick: ($event) => _ctx.selectType(index)
  4507. }, [
  4508. vue.createElementVNode(
  4509. "text",
  4510. null,
  4511. vue.toDisplayString(item),
  4512. 1
  4513. /* TEXT */
  4514. )
  4515. ], 10, ["onClick"]);
  4516. }),
  4517. 128
  4518. /* KEYED_FRAGMENT */
  4519. ))
  4520. ])) : vue.createCommentVNode("v-if", true),
  4521. _ctx.activeDropdown === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  4522. key: 2,
  4523. class: "dropdown-panel calendar-panel"
  4524. }, [
  4525. vue.createElementVNode("view", { class: "custom-calendar-container" }, [
  4526. vue.createElementVNode("view", { class: "cal-header" }, [
  4527. vue.createElementVNode("text", {
  4528. class: "cal-nav-btn",
  4529. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth && _ctx.prevMonth(...args))
  4530. }, "‹"),
  4531. vue.createElementVNode(
  4532. "text",
  4533. { class: "cal-title" },
  4534. vue.toDisplayString(_ctx.currentMonth),
  4535. 1
  4536. /* TEXT */
  4537. ),
  4538. vue.createElementVNode("text", {
  4539. class: "cal-nav-btn",
  4540. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.nextMonth && _ctx.nextMonth(...args))
  4541. }, "›")
  4542. ]),
  4543. vue.createElementVNode("view", { class: "cal-weekdays" }, [
  4544. (vue.openBlock(true), vue.createElementBlock(
  4545. vue.Fragment,
  4546. null,
  4547. vue.renderList(_ctx.weekDays, (wk, idx) => {
  4548. return vue.openBlock(), vue.createElementBlock(
  4549. "text",
  4550. {
  4551. key: idx,
  4552. class: "wk-item"
  4553. },
  4554. vue.toDisplayString(wk),
  4555. 1
  4556. /* TEXT */
  4557. );
  4558. }),
  4559. 128
  4560. /* KEYED_FRAGMENT */
  4561. ))
  4562. ]),
  4563. vue.createElementVNode("view", { class: "cal-body" }, [
  4564. (vue.openBlock(true), vue.createElementBlock(
  4565. vue.Fragment,
  4566. null,
  4567. vue.renderList(_ctx.calendarDays, (day, idx) => {
  4568. return vue.openBlock(), vue.createElementBlock("view", {
  4569. key: idx,
  4570. class: vue.normalizeClass(["cal-day-box", _ctx.getDateClass(day)]),
  4571. onClick: ($event) => _ctx.selectDateItem(day)
  4572. }, [
  4573. vue.createElementVNode(
  4574. "view",
  4575. { class: "cal-day-text" },
  4576. vue.toDisplayString(day),
  4577. 1
  4578. /* TEXT */
  4579. )
  4580. ], 10, ["onClick"]);
  4581. }),
  4582. 128
  4583. /* KEYED_FRAGMENT */
  4584. ))
  4585. ])
  4586. ]),
  4587. vue.createElementVNode("view", { class: "calendar-actions" }, [
  4588. vue.createElementVNode("button", {
  4589. class: "cal-btn reset",
  4590. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.resetTimeFilter && _ctx.resetTimeFilter(...args))
  4591. }, "重置"),
  4592. vue.createElementVNode("button", {
  4593. class: "cal-btn confirm",
  4594. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.confirmTimeFilter && _ctx.confirmTimeFilter(...args))
  4595. }, "确定")
  4596. ])
  4597. ])) : vue.createCommentVNode("v-if", true)
  4598. ])
  4599. ]),
  4600. vue.createElementVNode("view", { class: "order-list" }, [
  4601. (vue.openBlock(true), vue.createElementBlock(
  4602. vue.Fragment,
  4603. null,
  4604. vue.renderList(_ctx.orderList, (item, index) => {
  4605. return vue.openBlock(), vue.createElementBlock("view", {
  4606. class: "order-card",
  4607. key: index,
  4608. onClick: ($event) => _ctx.goToDetail(item)
  4609. }, [
  4610. vue.createElementVNode("view", { class: "card-header" }, [
  4611. vue.createElementVNode("view", { class: "type-badge" }, [
  4612. vue.createElementVNode("image", {
  4613. class: "type-icon",
  4614. src: item.typeIcon
  4615. }, null, 8, ["src"]),
  4616. vue.createElementVNode(
  4617. "text",
  4618. { class: "type-text" },
  4619. vue.toDisplayString(item.typeText),
  4620. 1
  4621. /* TEXT */
  4622. )
  4623. ]),
  4624. vue.createElementVNode(
  4625. "text",
  4626. {
  4627. class: vue.normalizeClass(["status-badge", _ctx.getStatusClass(item)])
  4628. },
  4629. vue.toDisplayString(_ctx.getDisplayStatus(item)),
  4630. 3
  4631. /* TEXT, CLASS */
  4632. )
  4633. ]),
  4634. vue.createElementVNode("view", { class: "card-body" }, [
  4635. vue.createElementVNode("view", { class: "time-row" }, [
  4636. vue.createElementVNode("view", { class: "time-col" }, [
  4637. vue.createElementVNode(
  4638. "text",
  4639. { class: "label" },
  4640. vue.toDisplayString(item.timeLabel) + ":",
  4641. 1
  4642. /* TEXT */
  4643. ),
  4644. vue.createElementVNode(
  4645. "text",
  4646. { class: "value" },
  4647. vue.toDisplayString(item.time),
  4648. 1
  4649. /* TEXT */
  4650. )
  4651. ]),
  4652. vue.createElementVNode(
  4653. "text",
  4654. { class: "price" },
  4655. "¥" + vue.toDisplayString(item.price),
  4656. 1
  4657. /* TEXT */
  4658. )
  4659. ]),
  4660. vue.createElementVNode("view", { class: "pet-card" }, [
  4661. vue.createElementVNode("image", {
  4662. class: "pet-avatar",
  4663. src: item.petAvatarUrl || item.petAvatar,
  4664. mode: "aspectFill"
  4665. }, null, 8, ["src"]),
  4666. vue.createElementVNode("view", { class: "pet-info" }, [
  4667. vue.createElementVNode(
  4668. "text",
  4669. { class: "pet-name" },
  4670. vue.toDisplayString(item.petName),
  4671. 1
  4672. /* TEXT */
  4673. ),
  4674. vue.createElementVNode(
  4675. "text",
  4676. { class: "pet-breed" },
  4677. "品种: " + vue.toDisplayString(item.petBreed),
  4678. 1
  4679. /* TEXT */
  4680. )
  4681. ])
  4682. ]),
  4683. vue.createElementVNode("view", { class: "route-info" }, [
  4684. item.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  4685. vue.Fragment,
  4686. { key: 0 },
  4687. [
  4688. vue.createElementVNode("view", {
  4689. class: "route-item",
  4690. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "start"), ["stop"])
  4691. }, [
  4692. vue.createElementVNode("view", { class: "icon-circle start" }, "取"),
  4693. vue.createElementVNode("view", { class: "route-line-vertical" }),
  4694. vue.createElementVNode("view", { class: "address-box" }, [
  4695. vue.createElementVNode(
  4696. "text",
  4697. { class: "addr-title" },
  4698. vue.toDisplayString(item.startLocation),
  4699. 1
  4700. /* TEXT */
  4701. ),
  4702. vue.createElementVNode(
  4703. "text",
  4704. { class: "addr-desc" },
  4705. vue.toDisplayString(item.startAddress),
  4706. 1
  4707. /* TEXT */
  4708. )
  4709. ]),
  4710. vue.createElementVNode("image", {
  4711. class: "nav-arrow",
  4712. src: _imports_3$2,
  4713. style: { "flex-shrink": "0", "align-self": "center" }
  4714. })
  4715. ], 8, ["onClick"]),
  4716. vue.createElementVNode("view", {
  4717. class: "route-item",
  4718. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4719. }, [
  4720. vue.createElementVNode("view", { class: "icon-circle end" }, "送"),
  4721. vue.createElementVNode("view", { class: "address-box" }, [
  4722. vue.createElementVNode(
  4723. "text",
  4724. { class: "addr-title" },
  4725. vue.toDisplayString(item.endLocation),
  4726. 1
  4727. /* TEXT */
  4728. ),
  4729. vue.createElementVNode(
  4730. "text",
  4731. { class: "addr-desc" },
  4732. vue.toDisplayString(item.endAddress),
  4733. 1
  4734. /* TEXT */
  4735. )
  4736. ]),
  4737. vue.createElementVNode("image", {
  4738. class: "nav-arrow",
  4739. src: _imports_3$2,
  4740. style: { "flex-shrink": "0", "align-self": "center" }
  4741. })
  4742. ], 8, ["onClick"])
  4743. ],
  4744. 64
  4745. /* STABLE_FRAGMENT */
  4746. )) : (vue.openBlock(), vue.createElementBlock(
  4747. vue.Fragment,
  4748. { key: 1 },
  4749. [
  4750. vue.createElementVNode("view", {
  4751. class: "route-item",
  4752. onClick: vue.withModifiers(($event) => _ctx.openNavigation(item, "end"), ["stop"])
  4753. }, [
  4754. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  4755. vue.createElementVNode("view", { class: "address-box" }, [
  4756. vue.createElementVNode(
  4757. "text",
  4758. { class: "addr-title" },
  4759. vue.toDisplayString(item.endLocation),
  4760. 1
  4761. /* TEXT */
  4762. ),
  4763. vue.createElementVNode(
  4764. "text",
  4765. { class: "addr-desc" },
  4766. vue.toDisplayString(item.endAddress),
  4767. 1
  4768. /* TEXT */
  4769. )
  4770. ]),
  4771. vue.createElementVNode("image", {
  4772. class: "nav-arrow",
  4773. src: _imports_3$2,
  4774. style: { "flex-shrink": "0", "align-self": "center" }
  4775. })
  4776. ], 8, ["onClick"]),
  4777. item.serviceContent ? (vue.openBlock(), vue.createElementBlock("view", {
  4778. key: 0,
  4779. class: "service-content"
  4780. }, [
  4781. vue.createElementVNode("text", { class: "content-label" }, "服务内容:"),
  4782. vue.createElementVNode(
  4783. "text",
  4784. null,
  4785. vue.toDisplayString(item.serviceContent),
  4786. 1
  4787. /* TEXT */
  4788. )
  4789. ])) : vue.createCommentVNode("v-if", true)
  4790. ],
  4791. 64
  4792. /* STABLE_FRAGMENT */
  4793. ))
  4794. ]),
  4795. item.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  4796. key: 0,
  4797. class: "remark-box"
  4798. }, [
  4799. vue.createElementVNode(
  4800. "text",
  4801. null,
  4802. "备注:" + vue.toDisplayString(item.remark),
  4803. 1
  4804. /* TEXT */
  4805. )
  4806. ])) : vue.createCommentVNode("v-if", true)
  4807. ]),
  4808. ["接单", "到达", "出发", "开始", "送达", "结束"].includes(item.statusText) ? (vue.openBlock(), vue.createElementBlock("view", {
  4809. key: 0,
  4810. class: "action-btns"
  4811. }, [
  4812. vue.createElementVNode("view", { class: "action-left" }, [
  4813. vue.createElementVNode("button", {
  4814. class: "btn normal",
  4815. onClick: vue.withModifiers(($event) => _ctx.doCall("customer", item), ["stop"])
  4816. }, "拨号", 8, ["onClick"])
  4817. ]),
  4818. vue.createElementVNode("view", { class: "action-right" }, [
  4819. item.status === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  4820. key: 0,
  4821. class: "btn normal danger",
  4822. onClick: vue.withModifiers(($event) => _ctx.handleCancelOrder(item), ["stop"])
  4823. }, "取消", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  4824. vue.createElementVNode("button", {
  4825. class: "btn normal",
  4826. onClick: vue.withModifiers(($event) => _ctx.reportAbnormal(item), ["stop"])
  4827. }, "异常上报", 8, ["onClick"]),
  4828. vue.createElementVNode("button", {
  4829. class: "btn primary",
  4830. onClick: vue.withModifiers(($event) => _ctx.mainAction(item), ["stop"])
  4831. }, "打卡", 8, ["onClick"])
  4832. ])
  4833. ])) : vue.createCommentVNode("v-if", true)
  4834. ], 8, ["onClick"]);
  4835. }),
  4836. 128
  4837. /* KEYED_FRAGMENT */
  4838. )),
  4839. vue.createElementVNode("view", { class: "loading-text" }, "已加载完"),
  4840. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  4841. ]),
  4842. _ctx.activeCallItem ? (vue.openBlock(), vue.createElementBlock("view", {
  4843. key: 0,
  4844. class: "call-mask",
  4845. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.closeCallMenu && _ctx.closeCallMenu(...args))
  4846. })) : vue.createCommentVNode("v-if", true)
  4847. ]),
  4848. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  4849. key: 0,
  4850. class: "pet-modal-mask",
  4851. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4852. }, [
  4853. vue.createElementVNode("view", {
  4854. class: "pet-modal-content",
  4855. onClick: _cache[11] || (_cache[11] = vue.withModifiers(() => {
  4856. }, ["stop"]))
  4857. }, [
  4858. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  4859. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  4860. vue.createElementVNode("view", { class: "pm-header-actions" }, [
  4861. vue.createElementVNode("view", {
  4862. class: "pm-remark-btn",
  4863. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openRemarkInput && _ctx.openRemarkInput(...args))
  4864. }, "备注"),
  4865. vue.createElementVNode("view", {
  4866. class: "close-icon-btn",
  4867. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  4868. }, "×")
  4869. ])
  4870. ]),
  4871. vue.createElementVNode("scroll-view", {
  4872. "scroll-y": "",
  4873. class: "pet-modal-scroll"
  4874. }, [
  4875. vue.createElementVNode("view", { class: "pet-base-info" }, [
  4876. vue.createElementVNode("image", {
  4877. class: "pm-avatar",
  4878. src: _ctx.currentPetInfo.petAvatar,
  4879. mode: "aspectFill"
  4880. }, null, 8, ["src"]),
  4881. vue.createElementVNode("view", { class: "pm-info-text" }, [
  4882. vue.createElementVNode("view", { class: "pm-name-row" }, [
  4883. vue.createElementVNode(
  4884. "text",
  4885. { class: "pm-name" },
  4886. vue.toDisplayString(_ctx.currentPetInfo.petName),
  4887. 1
  4888. /* TEXT */
  4889. ),
  4890. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  4891. key: 0,
  4892. class: "pm-gender"
  4893. }, [
  4894. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  4895. vue.createElementVNode("text", null, "公")
  4896. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  4897. key: 1,
  4898. class: "pm-gender female"
  4899. }, [
  4900. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  4901. vue.createElementVNode("text", null, "母")
  4902. ])) : vue.createCommentVNode("v-if", true)
  4903. ]),
  4904. vue.createElementVNode(
  4905. "text",
  4906. { class: "pm-breed" },
  4907. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  4908. 1
  4909. /* TEXT */
  4910. )
  4911. ])
  4912. ]),
  4913. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  4914. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4915. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  4916. vue.createElementVNode(
  4917. "text",
  4918. { class: "pm-val" },
  4919. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  4920. 1
  4921. /* TEXT */
  4922. )
  4923. ]),
  4924. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  4925. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  4926. vue.createElementVNode(
  4927. "text",
  4928. { class: "pm-val" },
  4929. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  4930. 1
  4931. /* TEXT */
  4932. )
  4933. ]),
  4934. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4935. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  4936. vue.createElementVNode(
  4937. "text",
  4938. { class: "pm-val" },
  4939. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  4940. 1
  4941. /* TEXT */
  4942. )
  4943. ]),
  4944. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4945. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  4946. vue.createElementVNode(
  4947. "text",
  4948. { class: "pm-val" },
  4949. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  4950. 1
  4951. /* TEXT */
  4952. )
  4953. ]),
  4954. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  4955. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  4956. vue.createElementVNode(
  4957. "text",
  4958. { class: "pm-val" },
  4959. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  4960. 1
  4961. /* TEXT */
  4962. )
  4963. ])
  4964. ]),
  4965. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4966. key: 0,
  4967. class: "pm-tags"
  4968. }, [
  4969. (vue.openBlock(true), vue.createElementBlock(
  4970. vue.Fragment,
  4971. null,
  4972. vue.renderList(_ctx.currentPetInfo.petTags, (tag, index) => {
  4973. return vue.openBlock(), vue.createElementBlock(
  4974. "view",
  4975. {
  4976. class: "pm-tag",
  4977. key: index
  4978. },
  4979. vue.toDisplayString(tag),
  4980. 1
  4981. /* TEXT */
  4982. );
  4983. }),
  4984. 128
  4985. /* KEYED_FRAGMENT */
  4986. ))
  4987. ])) : vue.createCommentVNode("v-if", true),
  4988. vue.createElementVNode("view", { class: "pm-section-title" }, [
  4989. vue.createElementVNode("view", { class: "orange-bar" }),
  4990. vue.createElementVNode("text", null, "备注日志")
  4991. ]),
  4992. vue.createElementVNode("view", { class: "pm-log-list" }, [
  4993. (vue.openBlock(true), vue.createElementBlock(
  4994. vue.Fragment,
  4995. null,
  4996. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  4997. return vue.openBlock(), vue.createElementBlock("view", {
  4998. class: "pm-log-item",
  4999. key: lIndex
  5000. }, [
  5001. vue.createElementVNode(
  5002. "text",
  5003. { class: "pm-log-date" },
  5004. vue.toDisplayString(log.date),
  5005. 1
  5006. /* TEXT */
  5007. ),
  5008. vue.createElementVNode(
  5009. "text",
  5010. { class: "pm-log-text" },
  5011. vue.toDisplayString(log.content),
  5012. 1
  5013. /* TEXT */
  5014. ),
  5015. vue.createElementVNode(
  5016. "text",
  5017. { class: "pm-log-recorder" },
  5018. vue.toDisplayString(log.recorder === "系统记录" ? "" : "记录人: ") + vue.toDisplayString(log.recorder),
  5019. 1
  5020. /* TEXT */
  5021. )
  5022. ]);
  5023. }),
  5024. 128
  5025. /* KEYED_FRAGMENT */
  5026. ))
  5027. ]),
  5028. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  5029. ])
  5030. ])
  5031. ])) : vue.createCommentVNode("v-if", true),
  5032. _ctx.showRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  5033. key: 1,
  5034. class: "remark-mask",
  5035. onClick: _cache[17] || (_cache[17] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  5036. }, [
  5037. vue.createElementVNode("view", {
  5038. class: "remark-sheet",
  5039. onClick: _cache[16] || (_cache[16] = vue.withModifiers(() => {
  5040. }, ["stop"]))
  5041. }, [
  5042. vue.createElementVNode("view", { class: "remark-sheet-header" }, [
  5043. vue.createElementVNode("text", { class: "remark-sheet-title" }, "添加备注"),
  5044. vue.createElementVNode("view", {
  5045. class: "close-icon-btn",
  5046. onClick: _cache[13] || (_cache[13] = (...args) => _ctx.closeRemarkInput && _ctx.closeRemarkInput(...args))
  5047. }, "×")
  5048. ]),
  5049. vue.withDirectives(vue.createElementVNode(
  5050. "textarea",
  5051. {
  5052. class: "remark-textarea",
  5053. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => _ctx.remarkText = $event),
  5054. placeholder: "请输入备注内容...",
  5055. maxlength: "500",
  5056. "auto-height": ""
  5057. },
  5058. null,
  5059. 512
  5060. /* NEED_PATCH */
  5061. ), [
  5062. [vue.vModelText, _ctx.remarkText]
  5063. ]),
  5064. vue.createElementVNode("view", {
  5065. class: "remark-submit-btn",
  5066. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.submitRemark && _ctx.submitRemark(...args))
  5067. }, "提交备注")
  5068. ])
  5069. ])) : vue.createCommentVNode("v-if", true),
  5070. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  5071. key: 2,
  5072. class: "nav-modal-mask",
  5073. onClick: _cache[23] || (_cache[23] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5074. }, [
  5075. vue.createElementVNode("view", {
  5076. class: "nav-action-sheet",
  5077. onClick: _cache[22] || (_cache[22] = vue.withModifiers(() => {
  5078. }, ["stop"]))
  5079. }, [
  5080. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  5081. vue.createElementVNode("view", {
  5082. class: "nav-sheet-item",
  5083. onClick: _cache[18] || (_cache[18] = ($event) => _ctx.chooseMap("高德"))
  5084. }, "高德地图"),
  5085. vue.createElementVNode("view", {
  5086. class: "nav-sheet-item",
  5087. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("腾讯"))
  5088. }, "腾讯地图"),
  5089. vue.createElementVNode("view", {
  5090. class: "nav-sheet-item",
  5091. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("百度"))
  5092. }, "百度地图"),
  5093. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  5094. vue.createElementVNode("view", {
  5095. class: "nav-sheet-item cancel",
  5096. onClick: _cache[21] || (_cache[21] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  5097. }, "取消")
  5098. ])
  5099. ])) : vue.createCommentVNode("v-if", true),
  5100. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/orders/index" })
  5101. ],
  5102. 64
  5103. /* STABLE_FRAGMENT */
  5104. );
  5105. }
  5106. const PagesOrdersIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/index.vue"]]);
  5107. function getDictDataByType(dictType) {
  5108. return request({
  5109. url: `/system/dict/data/type/${dictType}`,
  5110. method: "GET"
  5111. });
  5112. }
  5113. function getPetDetail(id) {
  5114. return request({
  5115. url: `/archieves/pet/${id}`,
  5116. method: "GET"
  5117. });
  5118. }
  5119. function submitPetRemark(data) {
  5120. return request({
  5121. url: "/archieves/pet/remark",
  5122. method: "POST",
  5123. data
  5124. });
  5125. }
  5126. function listChangeLog(params) {
  5127. return request({
  5128. url: "/archieves/changeLog/listAll",
  5129. method: "GET",
  5130. data: params
  5131. });
  5132. }
  5133. const logic$1 = {
  5134. data() {
  5135. return {
  5136. orderId: null,
  5137. pageLoading: true,
  5138. // 页面数据加载中
  5139. orderType: 1,
  5140. orderStatus: 2,
  5141. serviceId: null,
  5142. // 当前订单的服务类型ID
  5143. serviceMode: null,
  5144. // 当前订单的服务模式 (0: 喂遛/洗护, 1: 接送)
  5145. petId: null,
  5146. // 当前订单关联的宠物ID
  5147. petDetail: null,
  5148. // 宠物档案详情
  5149. // 从后端 clockInRemark 解析出的打卡步骤列表
  5150. // 格式: [{step:1, title:'到达打卡', remark:'照片视频二选一即可'}, ...]
  5151. clockInSteps: [],
  5152. // 当前应执行的打卡信息(从 clockInSteps 中取出)
  5153. currentClockIn: null,
  5154. currentStep: 0,
  5155. orderDetail: {
  5156. type: 1,
  5157. price: "0.00",
  5158. timeLabel: "服务时间",
  5159. time: "",
  5160. petAvatar: "/static/dog.png",
  5161. petName: "",
  5162. petBreed: "",
  5163. serviceTag: "",
  5164. startLocation: "",
  5165. startAddress: "",
  5166. endAddress: "",
  5167. customerPhone: "",
  5168. serviceContent: "",
  5169. remark: "",
  5170. orderNo: "",
  5171. createTime: "",
  5172. serviceName: "",
  5173. // 服务类型名称
  5174. progressLogs: [],
  5175. nursingSummary: ""
  5176. // 宠护小结
  5177. },
  5178. serviceList: [],
  5179. showPetModal: false,
  5180. currentPetInfo: {},
  5181. showNavModal: false,
  5182. navTargetPointType: "",
  5183. showUploadModal: false,
  5184. modalMediaList: [],
  5185. modalRemark: "",
  5186. showSumModal: false,
  5187. sumContent: "",
  5188. sumDate: "",
  5189. sumSigner: "未知",
  5190. showPetRemarkInput: false,
  5191. petRemarkText: "",
  5192. showAnomalyModal: false,
  5193. anomalyList: [],
  5194. anomalyTypeDict: [],
  5195. // 媒体预览相关
  5196. videoPlayerShow: false,
  5197. videoPlayerUrl: ""
  5198. };
  5199. },
  5200. computed: {
  5201. // 从 clockInSteps 中提取 title 数组作为打卡步骤名(内部逻辑用)
  5202. steps() {
  5203. if (this.clockInSteps.length > 0) {
  5204. return this.clockInSteps.map((s) => s.title);
  5205. }
  5206. return this.orderType === 1 ? ["到达打卡", "确认出发", "送达打卡"] : ["到达打卡", "开始服务", "服务结束"];
  5207. },
  5208. // 顶部进度条展示用:已接单 -> 各打卡步骤 -> 订单完成
  5209. progressSteps() {
  5210. return ["已接单", ...this.steps, "订单完成"];
  5211. },
  5212. // 进度条当前激活索引(= currentStep + 1,因为首位是"已接单")
  5213. progressIndex() {
  5214. return this.currentStep + 1;
  5215. },
  5216. displayStatusText() {
  5217. if (this.currentStep >= this.steps.length)
  5218. return "已完成";
  5219. if (this.currentStep > 0) {
  5220. return this.orderType === 1 ? "配送中" : "服务中";
  5221. }
  5222. return this.orderType === 1 ? "待接送" : "待服务";
  5223. },
  5224. currentStatusText() {
  5225. return this.currentStep >= this.steps.length ? "已完成" : this.steps[this.currentStep];
  5226. },
  5227. // 按钮文本:使用 clockInSteps 中对应步骤的 title
  5228. currentTaskTitle() {
  5229. if (this.currentStep >= this.steps.length)
  5230. return "订单已完成";
  5231. if (this.currentClockIn) {
  5232. return this.currentClockIn.title;
  5233. }
  5234. return this.steps[this.currentStep] || "打卡";
  5235. },
  5236. // 任务描述小字:使用 clockInSteps 中对应步骤的 remark
  5237. currentTaskDesc() {
  5238. if (this.currentStep >= this.steps.length)
  5239. return "感谢您的服务,请注意休息";
  5240. if (this.currentClockIn && this.currentClockIn.remark) {
  5241. return this.currentClockIn.remark;
  5242. }
  5243. return "请按要求提交照片或视频及备注";
  5244. }
  5245. },
  5246. async onLoad(options) {
  5247. if (options.id) {
  5248. this.orderId = options.id;
  5249. }
  5250. this.pageLoading = true;
  5251. try {
  5252. await this.loadAnomalyTypeDict();
  5253. await this.loadServiceList();
  5254. await this.loadOrderDetail();
  5255. } finally {
  5256. this.pageLoading = false;
  5257. }
  5258. },
  5259. methods: {
  5260. async loadServiceList() {
  5261. try {
  5262. const res = await listAllService();
  5263. this.serviceList = res.data || [];
  5264. } catch (err) {
  5265. formatAppLog("error", "at pages/orders/detail-logic.js:152", "获取服务类型失败:", err);
  5266. }
  5267. },
  5268. /**
  5269. * 根据服务类型ID获取服务详情,解析 clockInRemark 为打卡步骤
  5270. */
  5271. /**
  5272. * 基于已加载的 serviceList 进行前端匹配,解析 clockInRemark 为打卡步骤
  5273. */
  5274. loadServiceDetail(serviceId) {
  5275. formatAppLog("log", "at pages/orders/detail-logic.js:162", "前端匹配服务详情, ID:", serviceId);
  5276. const serviceInfo = (this.serviceList || []).find((s) => s.id === serviceId);
  5277. formatAppLog("log", "at pages/orders/detail-logic.js:164", "匹配到的服务信息:", serviceInfo);
  5278. if (serviceInfo) {
  5279. this.serviceMode = serviceInfo.mode;
  5280. this.orderDetail.serviceName = serviceInfo.name;
  5281. formatAppLog("log", "at pages/orders/detail-logic.js:168", "当前服务模式(mode):", this.serviceMode);
  5282. if (serviceInfo.clockInRemark) {
  5283. try {
  5284. const parsed = JSON.parse(serviceInfo.clockInRemark);
  5285. if (Array.isArray(parsed) && parsed.length > 0) {
  5286. this.clockInSteps = parsed;
  5287. formatAppLog("log", "at pages/orders/detail-logic.js:174", "解析打卡步骤:", this.clockInSteps);
  5288. }
  5289. } catch (parseErr) {
  5290. formatAppLog("error", "at pages/orders/detail-logic.js:177", "解析 clockInRemark 失败:", parseErr);
  5291. }
  5292. }
  5293. }
  5294. },
  5295. async loadOrderDetail() {
  5296. if (!this.orderId) {
  5297. formatAppLog("log", "at pages/orders/detail-logic.js:184", "订单ID缺失");
  5298. uni.showToast({ title: "订单ID缺失", icon: "none" });
  5299. return;
  5300. }
  5301. try {
  5302. formatAppLog("log", "at pages/orders/detail-logic.js:189", "请求订单详情,ID:", this.orderId);
  5303. const res = await getOrderInfo(this.orderId);
  5304. formatAppLog("log", "at pages/orders/detail-logic.js:191", "订单详情响应:", res);
  5305. const order = res.data;
  5306. if (!order) {
  5307. formatAppLog("log", "at pages/orders/detail-logic.js:194", "订单数据为空");
  5308. uni.showToast({ title: "订单不存在", icon: "none" });
  5309. return;
  5310. }
  5311. formatAppLog("log", "at pages/orders/detail-logic.js:198", "订单数据:", order);
  5312. this.serviceId = order.service;
  5313. this.petId = order.usrPet || null;
  5314. this.transformOrderData(order);
  5315. formatAppLog("log", "at pages/orders/detail-logic.js:202", "解析出的 serviceId:", this.serviceId);
  5316. if (this.serviceId) {
  5317. this.loadServiceDetail(this.serviceId);
  5318. } else {
  5319. formatAppLog("warn", "at pages/orders/detail-logic.js:208", "订单中未找到 service 字段,无法加载服务步骤");
  5320. }
  5321. if (this.petId) {
  5322. await this.loadPetDetail(this.petId);
  5323. }
  5324. await this.loadOrderLogs();
  5325. } catch (err) {
  5326. formatAppLog("error", "at pages/orders/detail-logic.js:219", "获取订单详情失败:", err);
  5327. uni.showToast({ title: "加载失败", icon: "none" });
  5328. }
  5329. },
  5330. async loadOrderLogs() {
  5331. try {
  5332. const res = await getOrderLogs(this.orderId);
  5333. const logs = res.data || [];
  5334. formatAppLog("log", "at pages/orders/detail-logic.js:227", "订单日志:", logs);
  5335. const progressLogs = logs.filter((log) => log.logType === 1);
  5336. this.orderDetail.progressLogs = progressLogs.map((log) => ({
  5337. status: log.title || "",
  5338. time: log.createTime || "",
  5339. medias: log.photoUrls || [],
  5340. remark: log.content || ""
  5341. }));
  5342. 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());
  5343. if (validLogs.length > 0) {
  5344. const latestLog = validLogs[0];
  5345. const latestStep = latestLog.step;
  5346. formatAppLog("log", "at pages/orders/detail-logic.js:246", "最新打卡日志 step:", latestStep);
  5347. const stepIndex = this.clockInSteps.findIndex((s) => s.step === latestStep);
  5348. if (stepIndex >= 0) {
  5349. this.currentStep = stepIndex + 1;
  5350. } else {
  5351. this.currentStep = Number(latestStep);
  5352. }
  5353. } else {
  5354. this.currentStep = 0;
  5355. }
  5356. this.updateCurrentClockIn();
  5357. formatAppLog("log", "at pages/orders/detail-logic.js:262", "根据最新日志推算的当前步骤:", this.currentStep, "当前打卡信息:", this.currentClockIn);
  5358. } catch (err) {
  5359. formatAppLog("error", "at pages/orders/detail-logic.js:264", "获取订单日志失败:", err);
  5360. }
  5361. },
  5362. /**
  5363. * 根据 currentStep 更新当前打卡信息
  5364. */
  5365. updateCurrentClockIn() {
  5366. if (this.currentStep < this.clockInSteps.length) {
  5367. this.currentClockIn = this.clockInSteps[this.currentStep];
  5368. } else {
  5369. this.currentClockIn = null;
  5370. }
  5371. },
  5372. transformOrderData(order) {
  5373. const mode = order.mode || 0;
  5374. const isRoundTrip = mode === 1;
  5375. this.orderType = isRoundTrip ? 1 : 2;
  5376. this.orderStatus = order.status || 2;
  5377. this.orderDetail = {
  5378. type: this.orderType,
  5379. price: (order.price / 100).toFixed(2),
  5380. timeLabel: isRoundTrip ? "取货时间" : "服务时间",
  5381. time: order.serviceTime || "",
  5382. petAvatar: "/static/dog.png",
  5383. petName: order.petName || order.contact || "",
  5384. petBreed: order.breed || "",
  5385. serviceTag: order.groupPurchasePackageName || "",
  5386. startLocation: order.fromAddress || "",
  5387. startAddress: order.fromAddress || "",
  5388. endLocation: (order.contact || "") + " " + (order.contactPhoneNumber || ""),
  5389. endAddress: order.toAddress || "",
  5390. customerPhone: order.contactPhoneNumber || "",
  5391. ownerName: order.contact || "",
  5392. // 宠主姓名(默认使用客户姓名)
  5393. serviceContent: "",
  5394. remark: "",
  5395. orderNo: order.code || "T" + order.id,
  5396. createTime: order.serviceTime || "",
  5397. nursingSummary: order.nursingSummary || "",
  5398. fulfillerName: order.fulfillerName || "",
  5399. // 履约者/护宠师姓名
  5400. progressLogs: [
  5401. { status: "您已接单", time: order.serviceTime || "" }
  5402. ]
  5403. };
  5404. if (this.orderDetail.fulfillerName) {
  5405. this.sumSigner = this.orderDetail.fulfillerName;
  5406. }
  5407. },
  5408. /**
  5409. * 根据宠物ID获取宠物档案详情
  5410. */
  5411. async loadPetDetail(petId) {
  5412. try {
  5413. const res = await getPetDetail(petId);
  5414. const pet = res.data;
  5415. if (pet) {
  5416. this.petDetail = pet;
  5417. this.orderDetail.petAvatar = pet.avatarUrl || "/static/dog.png";
  5418. this.orderDetail.petName = pet.name || this.orderDetail.petName;
  5419. this.orderDetail.petBreed = pet.breed || this.orderDetail.petBreed;
  5420. this.orderDetail.ownerName = pet.ownerName || this.orderDetail.ownerName;
  5421. formatAppLog("log", "at pages/orders/detail-logic.js:329", "宠物档案:", pet);
  5422. }
  5423. } catch (err) {
  5424. formatAppLog("error", "at pages/orders/detail-logic.js:332", "获取宠物档案失败:", err);
  5425. }
  5426. },
  5427. /**
  5428. * 加载异常记录列表
  5429. */
  5430. async loadAnomalyList() {
  5431. if (!this.orderId)
  5432. return;
  5433. try {
  5434. const res = await getAnomalyList(this.orderId);
  5435. const list = res.data || [];
  5436. this.anomalyList = list.map((item) => {
  5437. const dict = this.anomalyTypeDict.find((d) => d.value === item.type);
  5438. return {
  5439. ...item,
  5440. typeLabel: dict ? dict.label : item.type,
  5441. // 确保有图片数组供展示,如果后端没返 photoUrls,尝试兼容
  5442. photoUrls: item.photoUrls || []
  5443. };
  5444. });
  5445. } catch (err) {
  5446. formatAppLog("error", "at pages/orders/detail-logic.js:355", "获取异常列表失败:", err);
  5447. }
  5448. },
  5449. async loadAnomalyTypeDict() {
  5450. try {
  5451. const res = await getDictDataByType("flf_anamaly_type");
  5452. this.anomalyTypeDict = res.data.map((item) => ({
  5453. label: item.dictLabel,
  5454. value: item.dictValue
  5455. }));
  5456. } catch (err) {
  5457. formatAppLog("error", "at pages/orders/detail-logic.js:366", "获取异常字典失败:", err);
  5458. }
  5459. },
  5460. openAnomalyModal() {
  5461. this.showAnomalyModal = true;
  5462. this.loadAnomalyList();
  5463. },
  5464. closeAnomalyModal() {
  5465. this.showAnomalyModal = false;
  5466. },
  5467. getAnomalyStatusLabel(status) {
  5468. const map = {
  5469. 0: "待审核",
  5470. 1: "已通过",
  5471. 2: "已驳回"
  5472. };
  5473. return map[status] || "未知";
  5474. },
  5475. updateStepByStatus() {
  5476. if (this.orderStatus === 2) {
  5477. this.currentStep = 0;
  5478. } else if (this.orderStatus === 3) {
  5479. this.currentStep = 1;
  5480. } else if (this.orderStatus === 4) {
  5481. this.currentStep = this.steps.length - 1;
  5482. } else {
  5483. this.currentStep = 0;
  5484. }
  5485. },
  5486. showPetProfile() {
  5487. const pet = this.petDetail;
  5488. if (pet) {
  5489. this.currentPetInfo = {
  5490. petAvatar: pet.avatarUrl || "/static/dog.png",
  5491. petName: pet.name || "",
  5492. petBreed: pet.breed || "",
  5493. petGender: pet.gender === 1 ? "M" : pet.gender === 2 ? "F" : "",
  5494. petAge: pet.age ? pet.age + "岁" : "未知",
  5495. petWeight: pet.weight ? pet.weight + "kg" : "未知",
  5496. petPersonality: pet.personality || pet.cutePersonality || "无",
  5497. petHobby: "",
  5498. petRemark: pet.remark || "无",
  5499. petTags: (pet.tags || []).map((t) => t.name),
  5500. petLogs: [],
  5501. // 额外信息
  5502. petSize: pet.size || "",
  5503. petIsSterilized: pet.isSterilized,
  5504. petHealthStatus: pet.healthStatus || "",
  5505. petAllergies: pet.allergies || "",
  5506. petMedicalHistory: pet.medicalHistory || "",
  5507. petVaccineStatus: pet.vaccineStatus || "",
  5508. ownerName: pet.ownerName || "",
  5509. ownerPhone: pet.ownerPhone || ""
  5510. };
  5511. this.loadPetChangeLogs(pet.id);
  5512. } else {
  5513. this.currentPetInfo = {
  5514. ...this.orderDetail,
  5515. petGender: "",
  5516. petAge: "未知",
  5517. petWeight: "未知",
  5518. petPersonality: "无",
  5519. petHobby: "",
  5520. petRemark: "无",
  5521. petTags: [],
  5522. petLogs: []
  5523. };
  5524. }
  5525. this.showPetModal = true;
  5526. },
  5527. async loadPetChangeLogs(petId) {
  5528. if (!petId)
  5529. return;
  5530. try {
  5531. const res = await listChangeLog({
  5532. targetId: petId,
  5533. targetType: "pet"
  5534. });
  5535. const logs = res.data || [];
  5536. this.currentPetInfo.petLogs = logs.map((item) => ({
  5537. date: item.createTime || "",
  5538. content: item.content || "",
  5539. recorder: item.operatorName || "未知"
  5540. }));
  5541. } catch (err) {
  5542. formatAppLog("error", "at pages/orders/detail-logic.js:453", "获取宠物备注列表失败:", err);
  5543. }
  5544. },
  5545. closePetProfile() {
  5546. this.showPetModal = false;
  5547. },
  5548. openPetRemarkInput() {
  5549. this.petRemarkText = "";
  5550. this.showPetRemarkInput = true;
  5551. },
  5552. closePetRemarkInput() {
  5553. this.showPetRemarkInput = false;
  5554. },
  5555. async submitPetRemark() {
  5556. if (!this.petRemarkText.trim()) {
  5557. uni.showToast({ title: "备注内容不能为空", icon: "none" });
  5558. return;
  5559. }
  5560. if (!this.petId) {
  5561. uni.showToast({ title: "宠物信息缺失", icon: "none" });
  5562. return;
  5563. }
  5564. uni.showLoading({ title: "提交中...", mask: true });
  5565. try {
  5566. await submitPetRemark({
  5567. petId: this.petId,
  5568. content: this.petRemarkText
  5569. });
  5570. uni.hideLoading();
  5571. uni.showToast({ title: "备注已添加", icon: "success" });
  5572. this.closePetRemarkInput();
  5573. this.loadPetChangeLogs(this.petId);
  5574. } catch (err) {
  5575. uni.hideLoading();
  5576. formatAppLog("error", "at pages/orders/detail-logic.js:491", "提交宠物备注失败:", err);
  5577. }
  5578. },
  5579. goToAnomaly() {
  5580. uni.navigateTo({
  5581. url: "/pages/orders/anomaly?orderId=" + (this.orderId || "")
  5582. });
  5583. },
  5584. callPhone() {
  5585. const phoneNum = this.orderDetail.customerPhone || "18900008451";
  5586. uni.makePhoneCall({ phoneNumber: phoneNum });
  5587. },
  5588. openNavigation(type) {
  5589. this.navTargetPointType = type;
  5590. this.showNavModal = true;
  5591. },
  5592. closeNavModal() {
  5593. this.showNavModal = false;
  5594. },
  5595. chooseMap(mapType) {
  5596. let pointType = this.navTargetPointType;
  5597. let name = pointType === "start" ? this.orderDetail.startLocation : this.orderDetail.endLocation;
  5598. let address = pointType === "start" ? this.orderDetail.startAddress : this.orderDetail.endAddress;
  5599. this.showNavModal = false;
  5600. uni.openLocation({
  5601. latitude: 30.52,
  5602. // Mock lat
  5603. longitude: 114.31,
  5604. // Mock lng
  5605. name: name || "目的地",
  5606. address: address || "默认地址",
  5607. success: function() {
  5608. formatAppLog("log", "at pages/orders/detail-logic.js:524", "打开导航成功: " + mapType);
  5609. }
  5610. });
  5611. },
  5612. openUploadModal() {
  5613. this.modalMediaList = [];
  5614. this.modalRemark = "";
  5615. this.showUploadModal = true;
  5616. },
  5617. closeUploadModal() {
  5618. this.showUploadModal = false;
  5619. },
  5620. handleConfirmUpload() {
  5621. formatAppLog("log", "at pages/orders/detail-logic.js:537", "handleConfirmUpload被调用");
  5622. this.confirmUploadModal();
  5623. },
  5624. async chooseModalMedia() {
  5625. formatAppLog("log", "at pages/orders/detail-logic.js:541", "chooseModalMedia被调用");
  5626. uni.chooseMedia({
  5627. count: 5 - this.modalMediaList.length,
  5628. mediaType: ["image", "video"],
  5629. sourceType: ["album", "camera"],
  5630. success: async (res) => {
  5631. formatAppLog("log", "at pages/orders/detail-logic.js:548", "选择媒体文件成功:", res.tempFiles);
  5632. uni.showLoading({ title: "上传中...", mask: true });
  5633. try {
  5634. for (const file of res.tempFiles) {
  5635. const filePath = file.tempFilePath;
  5636. const fileType = file.fileType;
  5637. formatAppLog("log", "at pages/orders/detail-logic.js:554", "开始上传文件:", filePath, "类型:", fileType);
  5638. const uploadRes = await uploadFile(filePath);
  5639. formatAppLog("log", "at pages/orders/detail-logic.js:557", "服务器响应:", uploadRes);
  5640. if (uploadRes.code === 200) {
  5641. this.modalMediaList.push({
  5642. url: uploadRes.data.url,
  5643. ossId: uploadRes.data.ossId,
  5644. localPath: filePath,
  5645. mediaType: fileType,
  5646. thumb: file.thumbTempFilePath
  5647. // 视频缩略图(如果有)
  5648. });
  5649. formatAppLog("log", "at pages/orders/detail-logic.js:567", "媒体文件添加成功");
  5650. }
  5651. }
  5652. uni.hideLoading();
  5653. uni.showToast({ title: "上传成功", icon: "success" });
  5654. } catch (err) {
  5655. uni.hideLoading();
  5656. formatAppLog("error", "at pages/orders/detail-logic.js:574", "上传失败详情:", err);
  5657. uni.showToast({ title: "上传失败", icon: "none" });
  5658. }
  5659. },
  5660. fail: (err) => {
  5661. formatAppLog("error", "at pages/orders/detail-logic.js:579", "选择媒体文件失败:", err);
  5662. }
  5663. });
  5664. },
  5665. removeModalMedia(index) {
  5666. this.modalMediaList.splice(index, 1);
  5667. },
  5668. getCurrentTime() {
  5669. const now = /* @__PURE__ */ new Date();
  5670. const y = now.getFullYear();
  5671. const m = String(now.getMonth() + 1).padStart(2, "0");
  5672. const d = String(now.getDate()).padStart(2, "0");
  5673. const h = String(now.getHours()).padStart(2, "0");
  5674. const min = String(now.getMinutes()).padStart(2, "0");
  5675. return `${y}/${m}/${d} ${h}:${min}`;
  5676. },
  5677. async confirmUploadModal() {
  5678. formatAppLog("log", "at pages/orders/detail-logic.js:597", "confirmUploadModal被调用,文件数量:", this.modalMediaList.length);
  5679. if (this.modalMediaList.length === 0) {
  5680. uni.showToast({ title: "请上传至少一张图片或视频", icon: "none" });
  5681. return;
  5682. }
  5683. try {
  5684. uni.showLoading({ title: "提交中..." });
  5685. const uploadedMedias = this.modalMediaList.map((item) => item.url);
  5686. const ossIds = this.modalMediaList.map((item) => item.ossId);
  5687. formatAppLog("log", "at pages/orders/detail-logic.js:608", "准备打卡,ossIds:", ossIds);
  5688. const clockInType = this.currentClockIn ? this.currentClockIn.step : this.currentStep + 1;
  5689. const clockInData = {
  5690. orderId: this.orderId,
  5691. photos: ossIds,
  5692. content: this.modalRemark || "",
  5693. step: clockInType,
  5694. title: this.currentTaskTitle,
  5695. startFlag: Number(clockInType) === 1,
  5696. endFlag: Number(this.currentStep) === this.steps.length - 1
  5697. };
  5698. formatAppLog("log", "at pages/orders/detail-logic.js:623", "打卡数据:", clockInData);
  5699. await clockIn(clockInData);
  5700. uni.hideLoading();
  5701. this.closeUploadModal();
  5702. uni.showToast({ title: "打卡成功", icon: "success" });
  5703. await this.loadOrderDetail();
  5704. } catch (err) {
  5705. uni.hideLoading();
  5706. formatAppLog("error", "at pages/orders/detail-logic.js:633", "打卡失败:", err);
  5707. uni.showToast({ title: "打卡失败,请重试", icon: "none" });
  5708. }
  5709. },
  5710. copyOrderNo() {
  5711. uni.setClipboardData({
  5712. data: this.orderDetail.orderNo,
  5713. success: () => {
  5714. uni.showToast({ title: "复制成功", icon: "none" });
  5715. }
  5716. });
  5717. },
  5718. openSumModal() {
  5719. let displayDate = "";
  5720. if (this.orderDetail.time) {
  5721. displayDate = this.orderDetail.time.split(" ")[0].replace(/-/g, "/");
  5722. } else {
  5723. const now = /* @__PURE__ */ new Date();
  5724. const y = now.getFullYear();
  5725. const m = String(now.getMonth() + 1).padStart(2, "0");
  5726. const d = String(now.getDate()).padStart(2, "0");
  5727. displayDate = `${y}/${m}/${d}`;
  5728. }
  5729. this.sumDate = displayDate;
  5730. if (this.orderDetail.nursingSummary) {
  5731. this.sumContent = this.orderDetail.nursingSummary;
  5732. } else if (!this.sumContent) {
  5733. this.sumContent = "1. 精神/身体状态:\n2. 进食/饮水:\n3. 排泤情况:\n4. 卫生情况:\n5. 互动情况:\n6. 特殊情况/备注:";
  5734. }
  5735. this.showSumModal = true;
  5736. },
  5737. closeSumModal() {
  5738. this.showSumModal = false;
  5739. },
  5740. async submitSumModal() {
  5741. if (!this.sumContent.trim()) {
  5742. uni.showToast({ title: "请填写服务内容", icon: "none" });
  5743. return;
  5744. }
  5745. uni.showLoading({ title: "提交中...", mask: true });
  5746. try {
  5747. const res = await submitNursingSummary({
  5748. orderId: this.orderId,
  5749. content: this.sumContent
  5750. });
  5751. uni.hideLoading();
  5752. if (res.code === 200) {
  5753. uni.showToast({ title: "小结已提交", icon: "success" });
  5754. this.closeSumModal();
  5755. await this.loadOrderDetail();
  5756. } else {
  5757. uni.showToast({ title: res.msg || "提交失败", icon: "none" });
  5758. }
  5759. } catch (err) {
  5760. uni.hideLoading();
  5761. formatAppLog("error", "at pages/orders/detail-logic.js:701", "提交宠护小结失败:", err);
  5762. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  5763. }
  5764. },
  5765. /**
  5766. * 检查是否为视频
  5767. */
  5768. isVideo(url) {
  5769. if (!url)
  5770. return false;
  5771. const videoExts = [".mp4", ".mov", ".m4v", ".3gp", ".avi", ".wmv"];
  5772. const lowerUrl = url.toLowerCase();
  5773. return videoExts.some((ext) => lowerUrl.includes(ext));
  5774. },
  5775. /**
  5776. * 获取视频封面图 (第一帧)
  5777. * 兼容阿里云、腾讯云等主流 OSS
  5778. */
  5779. getVideoPoster(url) {
  5780. if (!this.isVideo(url))
  5781. return url;
  5782. if (url.includes("?x-oss-process") || url.includes("?ci-process") || url.includes("?vframe")) {
  5783. return url;
  5784. }
  5785. const aliyun = `?x-oss-process=video/snapshot,t_1,f_jpg,w_300,m_fast`;
  5786. const tencent = `?ci-process=snapshot&time=1`;
  5787. if (url.includes("myqcloud.com")) {
  5788. return url + tencent;
  5789. }
  5790. return url + aliyun;
  5791. },
  5792. /**
  5793. * 统一预览媒体
  5794. */
  5795. previewMedia(medias, currentIdx) {
  5796. const url = medias[currentIdx];
  5797. if (this.isVideo(url)) {
  5798. this.videoPlayerUrl = url;
  5799. this.videoPlayerShow = true;
  5800. } else {
  5801. const imageUrls = medias.filter((m) => !this.isVideo(m));
  5802. const currentImgUrl = url;
  5803. const newIdx = imageUrls.indexOf(currentImgUrl);
  5804. uni.previewImage({
  5805. current: newIdx >= 0 ? newIdx : 0,
  5806. urls: imageUrls
  5807. });
  5808. }
  5809. },
  5810. closeVideoPlayer() {
  5811. this.videoPlayerShow = false;
  5812. this.videoPlayerUrl = "";
  5813. }
  5814. }
  5815. };
  5816. const _imports_13 = "/static/icons/phone_orange.svg";
  5817. const _imports_1$7 = "/static/icons/clock.svg";
  5818. const _imports_0$2 = "/static/icons/right_arrow_orange.svg";
  5819. const _imports_4$1 = "/static/icons/file.svg";
  5820. const _imports_1$6 = "/static/icons/camera_grey.svg";
  5821. const _imports_6$1 = "/static/icons/order_no.svg";
  5822. const _imports_7 = "/static/icons/play_circle.svg";
  5823. const _imports_8$1 = "/static/empty-rest.png";
  5824. const _sfc_main$q = {
  5825. ...logic$1
  5826. };
  5827. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  5828. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-container" }, [
  5829. _ctx.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  5830. key: 0,
  5831. class: "loading-container"
  5832. }, [
  5833. vue.createElementVNode("view", { class: "skeleton-header" }, [
  5834. vue.createElementVNode("view", {
  5835. class: "skeleton-line skeleton-ani",
  5836. style: { "width": "30%", "height": "36rpx" }
  5837. }),
  5838. vue.createElementVNode("view", {
  5839. class: "skeleton-line skeleton-ani",
  5840. style: { "width": "20%", "height": "36rpx" }
  5841. })
  5842. ]),
  5843. vue.createElementVNode("view", { class: "skeleton-progress" }, [
  5844. (vue.openBlock(), vue.createElementBlock(
  5845. vue.Fragment,
  5846. null,
  5847. vue.renderList(4, (i) => {
  5848. return vue.createElementVNode("view", {
  5849. class: "skeleton-circle skeleton-ani",
  5850. key: i
  5851. });
  5852. }),
  5853. 64
  5854. /* STABLE_FRAGMENT */
  5855. ))
  5856. ]),
  5857. (vue.openBlock(), vue.createElementBlock(
  5858. vue.Fragment,
  5859. null,
  5860. vue.renderList(3, (j) => {
  5861. return vue.createElementVNode("view", {
  5862. class: "skeleton-card",
  5863. key: "c" + j
  5864. }, [
  5865. vue.createElementVNode("view", {
  5866. class: "skeleton-line skeleton-ani",
  5867. style: { "width": "60%", "height": "28rpx", "margin-bottom": "20rpx" }
  5868. }),
  5869. vue.createElementVNode("view", {
  5870. class: "skeleton-line skeleton-ani",
  5871. style: { "width": "90%", "height": "24rpx", "margin-bottom": "14rpx" }
  5872. }),
  5873. vue.createElementVNode("view", {
  5874. class: "skeleton-line skeleton-ani",
  5875. style: { "width": "75%", "height": "24rpx" }
  5876. })
  5877. ]);
  5878. }),
  5879. 64
  5880. /* STABLE_FRAGMENT */
  5881. ))
  5882. ])) : (vue.openBlock(), vue.createElementBlock(
  5883. vue.Fragment,
  5884. { key: 1 },
  5885. [
  5886. vue.createElementVNode("view", { class: "detail-header" }, [
  5887. vue.createElementVNode("view", { class: "status-row" }, [
  5888. vue.createElementVNode(
  5889. "text",
  5890. { class: "status-title" },
  5891. vue.toDisplayString(_ctx.displayStatusText),
  5892. 1
  5893. /* TEXT */
  5894. ),
  5895. vue.createElementVNode(
  5896. "text",
  5897. { class: "status-price" },
  5898. "¥" + vue.toDisplayString(_ctx.orderDetail.price),
  5899. 1
  5900. /* TEXT */
  5901. )
  5902. ]),
  5903. vue.createElementVNode("view", { class: "progress-bar" }, [
  5904. (vue.openBlock(true), vue.createElementBlock(
  5905. vue.Fragment,
  5906. null,
  5907. vue.renderList(_ctx.progressSteps, (step, index) => {
  5908. return vue.openBlock(), vue.createElementBlock(
  5909. "view",
  5910. {
  5911. class: vue.normalizeClass(["step-item", { "active": index === _ctx.progressIndex, "done": index < _ctx.progressIndex }]),
  5912. key: index
  5913. },
  5914. [
  5915. vue.createElementVNode("view", { class: "step-circle-wrapper" }, [
  5916. index !== 0 ? (vue.openBlock(), vue.createElementBlock(
  5917. "view",
  5918. {
  5919. key: 0,
  5920. class: vue.normalizeClass(["step-line", { "active-line": index <= _ctx.progressIndex }])
  5921. },
  5922. null,
  5923. 2
  5924. /* CLASS */
  5925. )) : vue.createCommentVNode("v-if", true),
  5926. vue.createElementVNode(
  5927. "view",
  5928. { class: "step-circle" },
  5929. vue.toDisplayString(index + 1),
  5930. 1
  5931. /* TEXT */
  5932. )
  5933. ]),
  5934. vue.createElementVNode(
  5935. "text",
  5936. { class: "step-text" },
  5937. vue.toDisplayString(step),
  5938. 1
  5939. /* TEXT */
  5940. )
  5941. ],
  5942. 2
  5943. /* CLASS */
  5944. );
  5945. }),
  5946. 128
  5947. /* KEYED_FRAGMENT */
  5948. ))
  5949. ])
  5950. ]),
  5951. vue.createElementVNode("scroll-view", {
  5952. "scroll-y": "",
  5953. class: "detail-content"
  5954. }, [
  5955. vue.createElementVNode("view", { class: "white-card pet-bar" }, [
  5956. vue.createElementVNode("image", {
  5957. class: "pb-avatar",
  5958. src: _ctx.orderDetail.petAvatar,
  5959. mode: "aspectFill"
  5960. }, null, 8, ["src"]),
  5961. vue.createElementVNode("view", { class: "pb-info" }, [
  5962. vue.createElementVNode("view", { class: "pb-name-row" }, [
  5963. vue.createElementVNode(
  5964. "text",
  5965. { class: "pb-name" },
  5966. vue.toDisplayString(_ctx.orderDetail.petName),
  5967. 1
  5968. /* TEXT */
  5969. )
  5970. ]),
  5971. vue.createElementVNode("view", { class: "pb-tags" }, [
  5972. vue.createElementVNode(
  5973. "text",
  5974. { class: "pb-tag" },
  5975. vue.toDisplayString(_ctx.orderDetail.serviceName),
  5976. 1
  5977. /* TEXT */
  5978. )
  5979. ])
  5980. ]),
  5981. vue.createElementVNode("view", { class: "pb-actions" }, [
  5982. vue.createElementVNode("view", {
  5983. class: "pb-btn profile-btn",
  5984. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.showPetProfile && _ctx.showPetProfile(...args))
  5985. }, "宠物档案"),
  5986. vue.createElementVNode("view", {
  5987. class: "pb-btn phone-btn",
  5988. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.callPhone && _ctx.callPhone(...args))
  5989. }, [
  5990. vue.createElementVNode("image", {
  5991. class: "phone-icon",
  5992. src: _imports_13
  5993. })
  5994. ])
  5995. ])
  5996. ]),
  5997. vue.createElementVNode("view", { class: "white-card service-info-card" }, [
  5998. vue.createElementVNode("view", { class: "si-row time-row" }, [
  5999. vue.createElementVNode("image", {
  6000. class: "si-icon outline",
  6001. src: _imports_1$7
  6002. }),
  6003. vue.createElementVNode("view", { class: "si-content" }, [
  6004. vue.createElementVNode("text", { class: "si-label" }, "服务时间"),
  6005. vue.createElementVNode(
  6006. "text",
  6007. { class: "si-val" },
  6008. vue.toDisplayString(_ctx.orderDetail.time),
  6009. 1
  6010. /* TEXT */
  6011. )
  6012. ]),
  6013. vue.createElementVNode("view", {
  6014. class: "si-action record-btn",
  6015. onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.openAnomalyModal && _ctx.openAnomalyModal(...args), ["stop"]))
  6016. }, [
  6017. vue.createElementVNode("text", null, "异常记录"),
  6018. vue.createElementVNode("image", {
  6019. class: "record-arrow",
  6020. src: _imports_0$2
  6021. })
  6022. ])
  6023. ]),
  6024. _ctx.orderDetail.type === 1 ? (vue.openBlock(), vue.createElementBlock(
  6025. vue.Fragment,
  6026. { key: 0 },
  6027. [
  6028. vue.createElementVNode("view", { class: "si-row addr-row start-addr" }, [
  6029. vue.createElementVNode("view", { class: "icon-circle start" }, "起"),
  6030. vue.createElementVNode("view", { class: "route-line-vertical" }),
  6031. vue.createElementVNode("view", { class: "si-content" }, [
  6032. vue.createElementVNode(
  6033. "text",
  6034. { class: "si-addr-title" },
  6035. vue.toDisplayString(_ctx.orderDetail.startLocation),
  6036. 1
  6037. /* TEXT */
  6038. ),
  6039. vue.createElementVNode(
  6040. "text",
  6041. { class: "si-addr-desc" },
  6042. vue.toDisplayString(_ctx.orderDetail.startAddress),
  6043. 1
  6044. /* TEXT */
  6045. )
  6046. ]),
  6047. vue.createElementVNode("view", {
  6048. class: "nav-btn-circle",
  6049. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.openNavigation("start"))
  6050. }, [
  6051. vue.createElementVNode("image", {
  6052. class: "nav-arrow",
  6053. src: _imports_3$2
  6054. })
  6055. ])
  6056. ]),
  6057. vue.createElementVNode("view", { class: "si-row addr-row end-addr" }, [
  6058. vue.createElementVNode("view", { class: "icon-circle end" }, "终"),
  6059. vue.createElementVNode("view", { class: "si-content" }, [
  6060. vue.createElementVNode(
  6061. "text",
  6062. { class: "si-addr-title" },
  6063. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6064. 1
  6065. /* TEXT */
  6066. ),
  6067. vue.createElementVNode(
  6068. "text",
  6069. { class: "si-addr-desc" },
  6070. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6071. 1
  6072. /* TEXT */
  6073. )
  6074. ]),
  6075. vue.createElementVNode("view", {
  6076. class: "nav-btn-circle",
  6077. onClick: _cache[4] || (_cache[4] = ($event) => _ctx.openNavigation("end"))
  6078. }, [
  6079. vue.createElementVNode("image", {
  6080. class: "nav-arrow",
  6081. src: _imports_3$2
  6082. })
  6083. ])
  6084. ])
  6085. ],
  6086. 64
  6087. /* STABLE_FRAGMENT */
  6088. )) : (vue.openBlock(), vue.createElementBlock("view", {
  6089. key: 1,
  6090. class: "si-row addr-row end-addr"
  6091. }, [
  6092. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  6093. vue.createElementVNode("view", { class: "si-content" }, [
  6094. vue.createElementVNode(
  6095. "text",
  6096. { class: "si-addr-title" },
  6097. vue.toDisplayString(_ctx.orderDetail.endLocation),
  6098. 1
  6099. /* TEXT */
  6100. ),
  6101. vue.createElementVNode(
  6102. "text",
  6103. { class: "si-addr-desc" },
  6104. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6105. 1
  6106. /* TEXT */
  6107. )
  6108. ]),
  6109. vue.createElementVNode("view", {
  6110. class: "nav-btn-circle",
  6111. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.openNavigation("end"))
  6112. }, [
  6113. vue.createElementVNode("image", {
  6114. class: "nav-arrow",
  6115. src: _imports_3$2
  6116. })
  6117. ])
  6118. ])),
  6119. vue.createElementVNode("view", { class: "si-row" }, [
  6120. vue.createElementVNode("image", {
  6121. class: "si-icon outline custom-icon-file",
  6122. src: _imports_4$1
  6123. }),
  6124. vue.createElementVNode("view", { class: "si-content" }, [
  6125. vue.createElementVNode("text", { class: "si-label" }, "备注"),
  6126. vue.createElementVNode(
  6127. "text",
  6128. { class: "si-val" },
  6129. vue.toDisplayString(_ctx.orderDetail.remark || "无"),
  6130. 1
  6131. /* TEXT */
  6132. )
  6133. ])
  6134. ])
  6135. ]),
  6136. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock("view", {
  6137. key: 0,
  6138. class: "white-card task-card"
  6139. }, [
  6140. vue.createElementVNode(
  6141. "text",
  6142. { class: "tc-title" },
  6143. "当前任务:" + vue.toDisplayString(_ctx.currentTaskTitle),
  6144. 1
  6145. /* TEXT */
  6146. ),
  6147. vue.createElementVNode(
  6148. "text",
  6149. { class: "tc-desc" },
  6150. vue.toDisplayString(_ctx.currentTaskDesc),
  6151. 1
  6152. /* TEXT */
  6153. ),
  6154. vue.createElementVNode("view", {
  6155. class: "full-media-add",
  6156. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6157. }, [
  6158. vue.createElementVNode("image", {
  6159. class: "upload-icon-large",
  6160. src: _imports_1$6
  6161. }),
  6162. vue.createElementVNode("text", { class: "upload-text-large" }, "上传图或视频")
  6163. ])
  6164. ])) : vue.createCommentVNode("v-if", true),
  6165. vue.createElementVNode("view", { class: "white-card base-info-card" }, [
  6166. vue.createElementVNode("view", { class: "bi-row" }, [
  6167. vue.createElementVNode("image", {
  6168. class: "si-icon outline",
  6169. src: _imports_6$1
  6170. }),
  6171. vue.createElementVNode("view", { class: "bi-content" }, [
  6172. vue.createElementVNode("text", { class: "bi-label" }, "订单编号"),
  6173. vue.createElementVNode("view", { class: "bi-val-row" }, [
  6174. vue.createElementVNode(
  6175. "text",
  6176. { class: "bi-val" },
  6177. vue.toDisplayString(_ctx.orderDetail.orderNo),
  6178. 1
  6179. /* TEXT */
  6180. ),
  6181. vue.createElementVNode("text", {
  6182. class: "bi-copy",
  6183. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.copyOrderNo && _ctx.copyOrderNo(...args))
  6184. }, "复制")
  6185. ])
  6186. ])
  6187. ]),
  6188. vue.createElementVNode("view", { class: "bi-row" }, [
  6189. vue.createElementVNode("image", {
  6190. class: "si-icon outline",
  6191. src: _imports_1$7
  6192. }),
  6193. vue.createElementVNode("view", { class: "bi-content" }, [
  6194. vue.createElementVNode("text", { class: "bi-label" }, "下单时间"),
  6195. vue.createElementVNode(
  6196. "text",
  6197. { class: "bi-val" },
  6198. vue.toDisplayString(_ctx.orderDetail.createTime),
  6199. 1
  6200. /* TEXT */
  6201. )
  6202. ])
  6203. ])
  6204. ]),
  6205. vue.createElementVNode("view", { class: "white-card timeline-card" }, [
  6206. vue.createElementVNode("view", { class: "tl-title-row" }, [
  6207. vue.createElementVNode("view", { class: "orange-bar" }),
  6208. vue.createElementVNode("text", { class: "tl-title" }, "订单进度")
  6209. ]),
  6210. vue.createElementVNode("view", { class: "tl-list" }, [
  6211. (vue.openBlock(true), vue.createElementBlock(
  6212. vue.Fragment,
  6213. null,
  6214. vue.renderList(_ctx.orderDetail.progressLogs, (log, idx) => {
  6215. return vue.openBlock(), vue.createElementBlock("view", {
  6216. class: "tl-item",
  6217. key: idx
  6218. }, [
  6219. vue.createElementVNode("view", { class: "tl-marker active" }, [
  6220. vue.createElementVNode("view", { class: "tl-dot-inner" })
  6221. ]),
  6222. vue.createElementVNode("view", { class: "tl-content-row" }, [
  6223. vue.createElementVNode("view", { class: "tl-header" }, [
  6224. vue.createElementVNode(
  6225. "text",
  6226. { class: "tl-status" },
  6227. vue.toDisplayString(log.status),
  6228. 1
  6229. /* TEXT */
  6230. ),
  6231. vue.createElementVNode(
  6232. "text",
  6233. { class: "tl-time" },
  6234. vue.toDisplayString(log.time),
  6235. 1
  6236. /* TEXT */
  6237. )
  6238. ]),
  6239. log.medias && log.medias.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6240. key: 0,
  6241. class: "tl-medias"
  6242. }, [
  6243. (vue.openBlock(true), vue.createElementBlock(
  6244. vue.Fragment,
  6245. null,
  6246. vue.renderList(log.medias, (media, midx) => {
  6247. return vue.openBlock(), vue.createElementBlock("view", {
  6248. class: "tl-media-item",
  6249. key: midx,
  6250. onClick: ($event) => _ctx.previewMedia(log.medias, midx)
  6251. }, [
  6252. !_ctx.isVideo(media) ? (vue.openBlock(), vue.createElementBlock("image", {
  6253. key: 0,
  6254. class: "tl-img",
  6255. src: media,
  6256. mode: "aspectFill"
  6257. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6258. key: 1,
  6259. class: "tl-video-placeholder"
  6260. }, [
  6261. vue.createElementVNode("view", { class: "tl-play-icon" }),
  6262. vue.createElementVNode("text", { class: "tl-video-label" }, "视频")
  6263. ]))
  6264. ], 8, ["onClick"]);
  6265. }),
  6266. 128
  6267. /* KEYED_FRAGMENT */
  6268. ))
  6269. ])) : vue.createCommentVNode("v-if", true),
  6270. log.remark ? (vue.openBlock(), vue.createElementBlock("view", {
  6271. key: 1,
  6272. class: "tl-remark"
  6273. }, [
  6274. vue.createElementVNode(
  6275. "text",
  6276. null,
  6277. vue.toDisplayString(log.remark),
  6278. 1
  6279. /* TEXT */
  6280. )
  6281. ])) : vue.createCommentVNode("v-if", true)
  6282. ])
  6283. ]);
  6284. }),
  6285. 128
  6286. /* KEYED_FRAGMENT */
  6287. ))
  6288. ])
  6289. ]),
  6290. vue.createElementVNode("view", { style: { "height": "140rpx" } })
  6291. ]),
  6292. vue.createElementVNode("view", { class: "bottom-action-bar" }, [
  6293. vue.createElementVNode("view", { class: "action-left" }, [
  6294. vue.createElementVNode("button", {
  6295. class: "action-btn outline grey-outline",
  6296. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.goToAnomaly && _ctx.goToAnomaly(...args))
  6297. }, "异常上报"),
  6298. _ctx.serviceMode === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  6299. key: 0,
  6300. class: "action-btn outline orange-outline",
  6301. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.openSumModal && _ctx.openSumModal(...args))
  6302. }, "宠护小结")) : vue.createCommentVNode("v-if", true)
  6303. ]),
  6304. vue.createElementVNode("view", { class: "action-right" }, [
  6305. _ctx.currentStep < _ctx.steps.length ? (vue.openBlock(), vue.createElementBlock(
  6306. "button",
  6307. {
  6308. key: 0,
  6309. class: "action-btn primary",
  6310. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.openUploadModal && _ctx.openUploadModal(...args))
  6311. },
  6312. vue.toDisplayString(_ctx.currentTaskTitle),
  6313. 1
  6314. /* TEXT */
  6315. )) : (vue.openBlock(), vue.createElementBlock("button", {
  6316. key: 1,
  6317. class: "action-btn primary grey-bg"
  6318. }, "已完成"))
  6319. ])
  6320. ]),
  6321. _ctx.showPetModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6322. key: 0,
  6323. class: "pet-modal-mask",
  6324. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6325. }, [
  6326. vue.createElementVNode("view", {
  6327. class: "pet-modal-content",
  6328. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  6329. }, ["stop"]))
  6330. }, [
  6331. vue.createElementVNode("view", { class: "pet-modal-header" }, [
  6332. vue.createElementVNode("text", { class: "pet-modal-title" }, "宠物档案"),
  6333. vue.createElementVNode("view", { style: { "flex": "1" } }),
  6334. vue.createElementVNode("view", {
  6335. class: "pm-remark-btn",
  6336. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openPetRemarkInput && _ctx.openPetRemarkInput(...args))
  6337. }, "备注"),
  6338. vue.createElementVNode("view", {
  6339. class: "close-icon-btn",
  6340. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.closePetProfile && _ctx.closePetProfile(...args))
  6341. }, "×")
  6342. ]),
  6343. vue.createElementVNode("scroll-view", {
  6344. "scroll-y": "",
  6345. class: "pet-modal-scroll"
  6346. }, [
  6347. vue.createElementVNode("view", { class: "pet-base-info" }, [
  6348. vue.createElementVNode("image", {
  6349. class: "pm-avatar",
  6350. src: _ctx.currentPetInfo.petAvatar,
  6351. mode: "aspectFill"
  6352. }, null, 8, ["src"]),
  6353. vue.createElementVNode("view", { class: "pm-info-text" }, [
  6354. vue.createElementVNode("view", { class: "pm-name-row" }, [
  6355. vue.createElementVNode(
  6356. "text",
  6357. { class: "pm-name" },
  6358. vue.toDisplayString(_ctx.currentPetInfo.petName),
  6359. 1
  6360. /* TEXT */
  6361. ),
  6362. _ctx.currentPetInfo.petGender === "M" ? (vue.openBlock(), vue.createElementBlock("view", {
  6363. key: 0,
  6364. class: "pm-gender"
  6365. }, [
  6366. vue.createElementVNode("text", { class: "gender-icon" }, "♂"),
  6367. vue.createElementVNode("text", null, "公")
  6368. ])) : _ctx.currentPetInfo.petGender === "F" ? (vue.openBlock(), vue.createElementBlock("view", {
  6369. key: 1,
  6370. class: "pm-gender female"
  6371. }, [
  6372. vue.createElementVNode("text", { class: "gender-icon" }, "♀"),
  6373. vue.createElementVNode("text", null, "母")
  6374. ])) : vue.createCommentVNode("v-if", true)
  6375. ]),
  6376. vue.createElementVNode(
  6377. "text",
  6378. { class: "pm-breed" },
  6379. "品种:" + vue.toDisplayString(_ctx.currentPetInfo.petBreed),
  6380. 1
  6381. /* TEXT */
  6382. )
  6383. ])
  6384. ]),
  6385. vue.createElementVNode("view", { class: "pm-detail-grid" }, [
  6386. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6387. vue.createElementVNode("text", { class: "pm-label" }, "年龄"),
  6388. vue.createElementVNode(
  6389. "text",
  6390. { class: "pm-val" },
  6391. vue.toDisplayString(_ctx.currentPetInfo.petAge || "未知"),
  6392. 1
  6393. /* TEXT */
  6394. )
  6395. ]),
  6396. vue.createElementVNode("view", { class: "pm-grid-item half" }, [
  6397. vue.createElementVNode("text", { class: "pm-label" }, "体重"),
  6398. vue.createElementVNode(
  6399. "text",
  6400. { class: "pm-val" },
  6401. vue.toDisplayString(_ctx.currentPetInfo.petWeight || "未知"),
  6402. 1
  6403. /* TEXT */
  6404. )
  6405. ]),
  6406. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6407. vue.createElementVNode("text", { class: "pm-label" }, "性格"),
  6408. vue.createElementVNode(
  6409. "text",
  6410. { class: "pm-val" },
  6411. vue.toDisplayString(_ctx.currentPetInfo.petPersonality || "无"),
  6412. 1
  6413. /* TEXT */
  6414. )
  6415. ]),
  6416. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6417. vue.createElementVNode("text", { class: "pm-label" }, "爱好"),
  6418. vue.createElementVNode(
  6419. "text",
  6420. { class: "pm-val" },
  6421. vue.toDisplayString(_ctx.currentPetInfo.petHobby || "无"),
  6422. 1
  6423. /* TEXT */
  6424. )
  6425. ]),
  6426. vue.createElementVNode("view", { class: "pm-grid-item full" }, [
  6427. vue.createElementVNode("text", { class: "pm-label" }, "备注"),
  6428. vue.createElementVNode(
  6429. "text",
  6430. { class: "pm-val" },
  6431. vue.toDisplayString(_ctx.currentPetInfo.petRemark || "无特殊过敏史"),
  6432. 1
  6433. /* TEXT */
  6434. )
  6435. ])
  6436. ]),
  6437. _ctx.currentPetInfo.petTags && _ctx.currentPetInfo.petTags.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6438. key: 0,
  6439. class: "pm-tags-row"
  6440. }, [
  6441. (vue.openBlock(true), vue.createElementBlock(
  6442. vue.Fragment,
  6443. null,
  6444. vue.renderList(_ctx.currentPetInfo.petTags, (tag, ti) => {
  6445. return vue.openBlock(), vue.createElementBlock("view", {
  6446. class: "pm-tag-chip",
  6447. key: ti
  6448. }, [
  6449. vue.createElementVNode(
  6450. "text",
  6451. { class: "pm-tag-chip-text" },
  6452. vue.toDisplayString(tag),
  6453. 1
  6454. /* TEXT */
  6455. )
  6456. ]);
  6457. }),
  6458. 128
  6459. /* KEYED_FRAGMENT */
  6460. ))
  6461. ])) : vue.createCommentVNode("v-if", true),
  6462. vue.createElementVNode("view", { class: "pm-log-section" }, [
  6463. vue.createElementVNode("view", { class: "pm-log-header" }, [
  6464. vue.createElementVNode("view", { style: { "width": "6rpx", "height": "28rpx", "background": "#FF9800", "border-radius": "3rpx", "margin-right": "12rpx" } }),
  6465. vue.createElementVNode("text", { class: "pm-log-section-title" }, "备注日志")
  6466. ]),
  6467. (vue.openBlock(true), vue.createElementBlock(
  6468. vue.Fragment,
  6469. null,
  6470. vue.renderList(_ctx.currentPetInfo.petLogs, (log, lIndex) => {
  6471. return vue.openBlock(), vue.createElementBlock("view", {
  6472. class: "pm-log-item",
  6473. key: lIndex
  6474. }, [
  6475. vue.createElementVNode(
  6476. "text",
  6477. { class: "pm-log-date" },
  6478. vue.toDisplayString(log.date),
  6479. 1
  6480. /* TEXT */
  6481. ),
  6482. vue.createElementVNode(
  6483. "text",
  6484. { class: "pm-log-text" },
  6485. vue.toDisplayString(log.content),
  6486. 1
  6487. /* TEXT */
  6488. ),
  6489. log.recorder !== "系统记录" ? (vue.openBlock(), vue.createElementBlock(
  6490. "text",
  6491. {
  6492. key: 0,
  6493. class: "pm-log-recorder"
  6494. },
  6495. "记录人:" + vue.toDisplayString(log.recorder),
  6496. 1
  6497. /* TEXT */
  6498. )) : (vue.openBlock(), vue.createElementBlock("text", {
  6499. key: 1,
  6500. class: "pm-log-recorder system"
  6501. }, "系统记录"))
  6502. ]);
  6503. }),
  6504. 128
  6505. /* KEYED_FRAGMENT */
  6506. ))
  6507. ]),
  6508. vue.createElementVNode("view", { style: { "height": "30rpx" } })
  6509. ])
  6510. ])
  6511. ])) : vue.createCommentVNode("v-if", true),
  6512. _ctx.showPetRemarkInput ? (vue.openBlock(), vue.createElementBlock("view", {
  6513. key: 1,
  6514. class: "upload-modal-mask",
  6515. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.closePetRemarkInput && _ctx.closePetRemarkInput(...args))
  6516. }, [
  6517. vue.createElementVNode("view", {
  6518. class: "upload-modal-content",
  6519. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  6520. }, ["stop"]))
  6521. }, [
  6522. vue.createElementVNode("view", { class: "um-header" }, [
  6523. vue.createElementVNode("text", { class: "um-title" }, "添加备注")
  6524. ]),
  6525. vue.createElementVNode("view", { class: "um-body" }, [
  6526. vue.withDirectives(vue.createElementVNode(
  6527. "textarea",
  6528. {
  6529. class: "um-textarea",
  6530. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.petRemarkText = $event),
  6531. "auto-height": "",
  6532. placeholder: "请输入宠物备注内容...",
  6533. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6534. },
  6535. null,
  6536. 512
  6537. /* NEED_PATCH */
  6538. ), [
  6539. [vue.vModelText, _ctx.petRemarkText]
  6540. ])
  6541. ]),
  6542. vue.createElementVNode("view", { class: "um-footer" }, [
  6543. vue.createElementVNode("button", {
  6544. class: "um-submit-btn active",
  6545. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.submitPetRemark && _ctx.submitPetRemark(...args))
  6546. }, "确认提交")
  6547. ])
  6548. ])
  6549. ])) : vue.createCommentVNode("v-if", true),
  6550. _ctx.showNavModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6551. key: 2,
  6552. class: "nav-modal-mask",
  6553. onClick: _cache[24] || (_cache[24] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6554. }, [
  6555. vue.createElementVNode("view", {
  6556. class: "nav-action-sheet",
  6557. onClick: _cache[23] || (_cache[23] = vue.withModifiers(() => {
  6558. }, ["stop"]))
  6559. }, [
  6560. vue.createElementVNode("view", { class: "nav-sheet-title" }, "选择地图进行导航"),
  6561. vue.createElementVNode("view", {
  6562. class: "nav-sheet-item",
  6563. onClick: _cache[19] || (_cache[19] = ($event) => _ctx.chooseMap("高德"))
  6564. }, "高德地图"),
  6565. vue.createElementVNode("view", {
  6566. class: "nav-sheet-item",
  6567. onClick: _cache[20] || (_cache[20] = ($event) => _ctx.chooseMap("腾讯"))
  6568. }, "腾讯地图"),
  6569. vue.createElementVNode("view", {
  6570. class: "nav-sheet-item",
  6571. onClick: _cache[21] || (_cache[21] = ($event) => _ctx.chooseMap("百度"))
  6572. }, "百度地图"),
  6573. vue.createElementVNode("view", { class: "nav-sheet-gap" }),
  6574. vue.createElementVNode("view", {
  6575. class: "nav-sheet-item cancel",
  6576. onClick: _cache[22] || (_cache[22] = (...args) => _ctx.closeNavModal && _ctx.closeNavModal(...args))
  6577. }, "取消")
  6578. ])
  6579. ])) : vue.createCommentVNode("v-if", true),
  6580. _ctx.showUploadModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6581. key: 3,
  6582. class: "upload-modal-mask",
  6583. onClick: _cache[29] || (_cache[29] = (...args) => _ctx.closeUploadModal && _ctx.closeUploadModal(...args))
  6584. }, [
  6585. vue.createElementVNode("view", {
  6586. class: "upload-modal-content",
  6587. onClick: _cache[28] || (_cache[28] = vue.withModifiers(() => {
  6588. }, ["stop"]))
  6589. }, [
  6590. vue.createElementVNode("view", { class: "um-header" }, [
  6591. vue.createElementVNode(
  6592. "text",
  6593. { class: "um-title" },
  6594. "上传图或视频 (" + vue.toDisplayString(_ctx.modalMediaList.length) + "/5)",
  6595. 1
  6596. /* TEXT */
  6597. ),
  6598. vue.createElementVNode(
  6599. "text",
  6600. { class: "um-remark-hint" },
  6601. vue.toDisplayString(_ctx.currentTaskDesc),
  6602. 1
  6603. /* TEXT */
  6604. )
  6605. ]),
  6606. vue.createElementVNode("view", { class: "um-body" }, [
  6607. vue.createElementVNode("view", { class: "um-grid" }, [
  6608. (vue.openBlock(true), vue.createElementBlock(
  6609. vue.Fragment,
  6610. null,
  6611. vue.renderList(_ctx.modalMediaList, (img, idx) => {
  6612. return vue.openBlock(), vue.createElementBlock("view", {
  6613. class: "um-item",
  6614. key: idx
  6615. }, [
  6616. vue.createElementVNode("image", {
  6617. class: "um-preview",
  6618. src: img.thumb || img.url || img.localPath || img,
  6619. mode: "aspectFill"
  6620. }, null, 8, ["src"]),
  6621. img.mediaType === "video" ? (vue.openBlock(), vue.createElementBlock("view", {
  6622. key: 0,
  6623. class: "um-video-badge"
  6624. }, [
  6625. vue.createElementVNode("image", {
  6626. class: "play-icon-small",
  6627. src: _imports_7
  6628. })
  6629. ])) : vue.createCommentVNode("v-if", true),
  6630. vue.createElementVNode("view", {
  6631. class: "um-del",
  6632. onClick: ($event) => _ctx.removeModalMedia(idx)
  6633. }, "×", 8, ["onClick"])
  6634. ]);
  6635. }),
  6636. 128
  6637. /* KEYED_FRAGMENT */
  6638. )),
  6639. _ctx.modalMediaList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  6640. key: 0,
  6641. class: "um-add",
  6642. onClick: _cache[25] || (_cache[25] = (...args) => _ctx.chooseModalMedia && _ctx.chooseModalMedia(...args))
  6643. }, [
  6644. vue.createElementVNode("image", {
  6645. class: "um-add-icon",
  6646. src: _imports_1$6
  6647. }),
  6648. vue.createElementVNode("text", { class: "um-add-text" }, "拍摄/上传")
  6649. ])) : vue.createCommentVNode("v-if", true)
  6650. ]),
  6651. vue.withDirectives(vue.createElementVNode(
  6652. "textarea",
  6653. {
  6654. class: "um-textarea",
  6655. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => _ctx.modalRemark = $event),
  6656. placeholder: "在此输入备注信息...",
  6657. "placeholder-style": "color:#ccc; font-size:26rpx;"
  6658. },
  6659. null,
  6660. 512
  6661. /* NEED_PATCH */
  6662. ), [
  6663. [vue.vModelText, _ctx.modalRemark]
  6664. ])
  6665. ]),
  6666. vue.createElementVNode("view", { class: "um-footer" }, [
  6667. vue.createElementVNode(
  6668. "view",
  6669. {
  6670. class: vue.normalizeClass(["um-submit-btn", { "active": _ctx.modalMediaList.length > 0 }]),
  6671. onClick: _cache[27] || (_cache[27] = (...args) => _ctx.handleConfirmUpload && _ctx.handleConfirmUpload(...args))
  6672. },
  6673. " 确认提交",
  6674. 2
  6675. /* CLASS */
  6676. )
  6677. ])
  6678. ])
  6679. ])) : vue.createCommentVNode("v-if", true),
  6680. _ctx.showSumModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6681. key: 4,
  6682. class: "sum-modal-mask",
  6683. onClick: _cache[33] || (_cache[33] = (...args) => _ctx.closeSumModal && _ctx.closeSumModal(...args))
  6684. }, [
  6685. vue.createElementVNode("view", {
  6686. class: "sum-modal-card",
  6687. onClick: _cache[32] || (_cache[32] = vue.withModifiers(() => {
  6688. }, ["stop"]))
  6689. }, [
  6690. vue.createElementVNode("scroll-view", {
  6691. "scroll-y": "",
  6692. class: "sum-modal-scroll"
  6693. }, [
  6694. vue.createElementVNode("view", { class: "sum-modal-inner" }, [
  6695. vue.createElementVNode("text", { class: "sum-modal-title" }, "宠物护理工作小结"),
  6696. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6697. vue.createElementVNode("text", { class: "sum-meta-label" }, "日期:"),
  6698. vue.createElementVNode(
  6699. "text",
  6700. { class: "sum-meta-val" },
  6701. vue.toDisplayString(_ctx.sumDate),
  6702. 1
  6703. /* TEXT */
  6704. )
  6705. ]),
  6706. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6707. vue.createElementVNode("text", { class: "sum-meta-label" }, "客户住址:"),
  6708. vue.createElementVNode(
  6709. "text",
  6710. { class: "sum-meta-val" },
  6711. vue.toDisplayString(_ctx.orderDetail.endAddress),
  6712. 1
  6713. /* TEXT */
  6714. )
  6715. ]),
  6716. vue.createElementVNode("view", { class: "sum-meta-row" }, [
  6717. vue.createElementVNode("text", { class: "sum-meta-label" }, "宠主姓名:"),
  6718. vue.createElementVNode(
  6719. "text",
  6720. { class: "sum-meta-val" },
  6721. vue.toDisplayString(_ctx.orderDetail.ownerName || "未知"),
  6722. 1
  6723. /* TEXT */
  6724. )
  6725. ]),
  6726. vue.createElementVNode("view", { class: "sum-section-title" }, "宠物信息"),
  6727. vue.createElementVNode("view", { class: "sum-pet-card" }, [
  6728. vue.createElementVNode("image", {
  6729. class: "sum-pet-avatar",
  6730. src: _ctx.orderDetail.petAvatar,
  6731. mode: "aspectFill"
  6732. }, null, 8, ["src"]),
  6733. vue.createElementVNode("view", { class: "sum-pet-info" }, [
  6734. vue.createElementVNode("view", { class: "sum-pet-name-row" }, [
  6735. vue.createElementVNode(
  6736. "text",
  6737. { class: "sum-pet-name" },
  6738. vue.toDisplayString(_ctx.orderDetail.petName || "未知"),
  6739. 1
  6740. /* TEXT */
  6741. ),
  6742. vue.createElementVNode(
  6743. "text",
  6744. { class: "sum-pet-breed" },
  6745. "品种: " + vue.toDisplayString(_ctx.orderDetail.petBreed || "未知"),
  6746. 1
  6747. /* TEXT */
  6748. )
  6749. ]),
  6750. vue.createElementVNode(
  6751. "text",
  6752. { class: "sum-pet-remark" },
  6753. vue.toDisplayString(_ctx.orderDetail.petNotes || "暂无备注"),
  6754. 1
  6755. /* TEXT */
  6756. )
  6757. ])
  6758. ]),
  6759. vue.createElementVNode("view", { class: "sum-section-title" }, "服务内容记录"),
  6760. vue.withDirectives(vue.createElementVNode(
  6761. "textarea",
  6762. {
  6763. class: "sum-textarea",
  6764. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => _ctx.sumContent = $event),
  6765. "auto-height": "",
  6766. placeholder: "请填写服务内容...",
  6767. "placeholder-style": "color:#ccc"
  6768. },
  6769. null,
  6770. 512
  6771. /* NEED_PATCH */
  6772. ), [
  6773. [vue.vModelText, _ctx.sumContent]
  6774. ]),
  6775. vue.createElementVNode("view", { class: "sum-sign-row" }, [
  6776. vue.createElementVNode("text", { class: "sum-sign-label" }, "护宠师签名:"),
  6777. vue.createElementVNode(
  6778. "text",
  6779. { class: "sum-sign-val" },
  6780. vue.toDisplayString(_ctx.sumSigner),
  6781. 1
  6782. /* TEXT */
  6783. )
  6784. ]),
  6785. vue.createElementVNode("view", { style: { "height": "20rpx" } })
  6786. ])
  6787. ]),
  6788. vue.createElementVNode("view", { class: "sum-footer" }, [
  6789. vue.createElementVNode("button", {
  6790. class: "sum-submit-btn",
  6791. onClick: _cache[31] || (_cache[31] = (...args) => _ctx.submitSumModal && _ctx.submitSumModal(...args))
  6792. }, "提交小结")
  6793. ])
  6794. ])
  6795. ])) : vue.createCommentVNode("v-if", true),
  6796. _ctx.showAnomalyModal ? (vue.openBlock(), vue.createElementBlock("view", {
  6797. key: 5,
  6798. class: "modal-mask",
  6799. onClick: _cache[36] || (_cache[36] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6800. }, [
  6801. vue.createElementVNode("view", {
  6802. class: "anomaly-modal-content",
  6803. onClick: _cache[35] || (_cache[35] = vue.withModifiers(() => {
  6804. }, ["stop"]))
  6805. }, [
  6806. vue.createElementVNode("view", { class: "am-header" }, [
  6807. vue.createElementVNode("text", { class: "am-title" }, "历史异常记录"),
  6808. vue.createElementVNode("view", {
  6809. class: "close-icon-btn",
  6810. onClick: _cache[34] || (_cache[34] = (...args) => _ctx.closeAnomalyModal && _ctx.closeAnomalyModal(...args))
  6811. }, "×")
  6812. ]),
  6813. vue.createElementVNode("scroll-view", {
  6814. "scroll-y": "",
  6815. class: "am-scroll-list"
  6816. }, [
  6817. _ctx.anomalyList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6818. key: 0,
  6819. class: "empty-list"
  6820. }, [
  6821. vue.createElementVNode("image", {
  6822. class: "empty-icon",
  6823. src: _imports_8$1,
  6824. mode: "aspectFit"
  6825. }),
  6826. vue.createElementVNode("text", { class: "empty-text" }, "暂无异常记录")
  6827. ])) : vue.createCommentVNode("v-if", true),
  6828. (vue.openBlock(true), vue.createElementBlock(
  6829. vue.Fragment,
  6830. null,
  6831. vue.renderList(_ctx.anomalyList, (item, index) => {
  6832. return vue.openBlock(), vue.createElementBlock("view", {
  6833. class: "am-item",
  6834. key: index
  6835. }, [
  6836. vue.createElementVNode("view", { class: "am-item-header" }, [
  6837. vue.createElementVNode(
  6838. "text",
  6839. { class: "am-item-type" },
  6840. vue.toDisplayString(item.typeLabel),
  6841. 1
  6842. /* TEXT */
  6843. ),
  6844. vue.createElementVNode(
  6845. "text",
  6846. {
  6847. class: vue.normalizeClass(["am-item-status", "status-" + item.status])
  6848. },
  6849. vue.toDisplayString(_ctx.getAnomalyStatusLabel(item.status)),
  6850. 3
  6851. /* TEXT, CLASS */
  6852. )
  6853. ]),
  6854. vue.createElementVNode(
  6855. "text",
  6856. { class: "am-item-content" },
  6857. vue.toDisplayString(item.content),
  6858. 1
  6859. /* TEXT */
  6860. ),
  6861. item.photos && item.photos.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6862. key: 0,
  6863. class: "am-item-photos"
  6864. }, [
  6865. (vue.openBlock(true), vue.createElementBlock(
  6866. vue.Fragment,
  6867. null,
  6868. vue.renderList(item.photoUrls, (photoUrl, pIdx) => {
  6869. return vue.openBlock(), vue.createElementBlock("view", {
  6870. class: "am-photo-item",
  6871. key: pIdx,
  6872. onClick: ($event) => _ctx.previewMedia(item.photoUrls, pIdx)
  6873. }, [
  6874. !_ctx.isVideo(photoUrl) ? (vue.openBlock(), vue.createElementBlock("image", {
  6875. key: 0,
  6876. class: "am-photo",
  6877. src: photoUrl,
  6878. mode: "aspectFill"
  6879. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  6880. key: 1,
  6881. class: "tl-video-placeholder miniaturized"
  6882. }, [
  6883. vue.createElementVNode("view", { class: "tl-play-icon small" }),
  6884. vue.createElementVNode("text", { class: "tl-video-label small" }, "视频")
  6885. ]))
  6886. ], 8, ["onClick"]);
  6887. }),
  6888. 128
  6889. /* KEYED_FRAGMENT */
  6890. ))
  6891. ])) : vue.createCommentVNode("v-if", true),
  6892. item.status !== 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  6893. key: 1,
  6894. class: "am-audit-box"
  6895. }, [
  6896. vue.createElementVNode("view", { class: "am-audit-header" }, [
  6897. vue.createElementVNode(
  6898. "text",
  6899. { class: "am-audit-label" },
  6900. vue.toDisplayString(item.status === 1 ? "审核通过" : "驳回理由"),
  6901. 1
  6902. /* TEXT */
  6903. ),
  6904. vue.createElementVNode(
  6905. "text",
  6906. { class: "am-audit-time" },
  6907. vue.toDisplayString(item.auditTime),
  6908. 1
  6909. /* TEXT */
  6910. )
  6911. ]),
  6912. vue.createElementVNode(
  6913. "text",
  6914. { class: "am-audit-remark" },
  6915. vue.toDisplayString(item.auditRemark || "无"),
  6916. 1
  6917. /* TEXT */
  6918. )
  6919. ])) : vue.createCommentVNode("v-if", true)
  6920. ]);
  6921. }),
  6922. 128
  6923. /* KEYED_FRAGMENT */
  6924. ))
  6925. ])
  6926. ])
  6927. ])) : vue.createCommentVNode("v-if", true),
  6928. _ctx.videoPlayerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  6929. key: 6,
  6930. class: "video-player-mask",
  6931. onClick: _cache[39] || (_cache[39] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6932. }, [
  6933. vue.createElementVNode("view", {
  6934. class: "video-player-content",
  6935. onClick: _cache[38] || (_cache[38] = vue.withModifiers(() => {
  6936. }, ["stop"]))
  6937. }, [
  6938. vue.createElementVNode("video", {
  6939. class: "v-player",
  6940. src: _ctx.videoPlayerUrl,
  6941. autoplay: "",
  6942. controls: ""
  6943. }, null, 8, ["src"]),
  6944. vue.createElementVNode("view", {
  6945. class: "v-close",
  6946. onClick: _cache[37] || (_cache[37] = (...args) => _ctx.closeVideoPlayer && _ctx.closeVideoPlayer(...args))
  6947. }, "×")
  6948. ])
  6949. ])) : vue.createCommentVNode("v-if", true)
  6950. ],
  6951. 64
  6952. /* STABLE_FRAGMENT */
  6953. ))
  6954. ]);
  6955. }
  6956. const PagesOrdersDetail = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/detail.vue"]]);
  6957. const _sfc_main$p = {
  6958. data() {
  6959. return {
  6960. orderId: "",
  6961. // 已选异常类型(dictValue)
  6962. selectedTypeValue: "",
  6963. // 已选异常类型标签(dictLabel,用于显示)
  6964. selectedTypeLabel: "",
  6965. // 异常描述
  6966. anomalyDesc: "",
  6967. // 照片列表(含 url 和 ossId)
  6968. photoList: [],
  6969. // 是否显示类型选择器
  6970. showTypeSheet: false,
  6971. // 异常类型字典列表(从后端获取)
  6972. anomalyTypes: []
  6973. };
  6974. },
  6975. onLoad(options) {
  6976. if (options.orderId) {
  6977. this.orderId = options.orderId;
  6978. }
  6979. this.loadAnomalyTypes();
  6980. },
  6981. computed: {
  6982. // 当前选中的类型显示文本
  6983. selectedType() {
  6984. return this.selectedTypeLabel || "";
  6985. }
  6986. },
  6987. methods: {
  6988. /**
  6989. * 加载异常类型字典数据
  6990. */
  6991. async loadAnomalyTypes() {
  6992. try {
  6993. const res = await getDictDataByType("flf_anamaly_type");
  6994. if (res.data && Array.isArray(res.data)) {
  6995. this.anomalyTypes = res.data.map((item) => ({
  6996. label: item.dictLabel,
  6997. value: item.dictValue,
  6998. dictCode: item.dictCode
  6999. }));
  7000. formatAppLog("log", "at pages/orders/anomaly.vue:136", "异常类型字典:", this.anomalyTypes);
  7001. }
  7002. } catch (err) {
  7003. formatAppLog("error", "at pages/orders/anomaly.vue:139", "获取异常类型字典失败:", err);
  7004. }
  7005. },
  7006. // 打开类型选择器
  7007. openTypeSheet() {
  7008. this.showTypeSheet = true;
  7009. },
  7010. // 关闭类型选择器
  7011. closeTypeSheet() {
  7012. this.showTypeSheet = false;
  7013. },
  7014. // 选择异常类型
  7015. selectType(type) {
  7016. this.selectedTypeValue = type.value;
  7017. this.selectedTypeLabel = type.label;
  7018. this.closeTypeSheet();
  7019. },
  7020. // 选择照片并上传
  7021. choosePhoto() {
  7022. uni.chooseImage({
  7023. count: 5 - this.photoList.length,
  7024. sizeType: ["compressed"],
  7025. sourceType: ["album", "camera"],
  7026. success: async (res) => {
  7027. uni.showLoading({ title: "上传中..." });
  7028. try {
  7029. for (const filePath of res.tempFilePaths) {
  7030. const uploadRes = await uploadFile(filePath);
  7031. if (uploadRes.code === 200) {
  7032. this.photoList.push({
  7033. url: uploadRes.data.url,
  7034. ossId: uploadRes.data.ossId,
  7035. localPath: filePath
  7036. });
  7037. }
  7038. }
  7039. uni.hideLoading();
  7040. } catch (err) {
  7041. uni.hideLoading();
  7042. formatAppLog("error", "at pages/orders/anomaly.vue:178", "上传失败:", err);
  7043. uni.showToast({ title: "上传失败", icon: "none" });
  7044. }
  7045. }
  7046. });
  7047. },
  7048. // 删除照片
  7049. removePhoto(idx) {
  7050. this.photoList.splice(idx, 1);
  7051. },
  7052. // 提交上报
  7053. async submitAnomaly() {
  7054. if (!this.selectedTypeValue) {
  7055. uni.showToast({ title: "请选择异常类型", icon: "none" });
  7056. return;
  7057. }
  7058. if (this.photoList.length === 0) {
  7059. uni.showToast({ title: "请上传现场照片", icon: "none" });
  7060. return;
  7061. }
  7062. const data = {
  7063. orderId: this.orderId,
  7064. type: this.selectedTypeValue,
  7065. content: this.anomalyDesc,
  7066. photos: this.photoList.map((p) => p.ossId)
  7067. };
  7068. try {
  7069. uni.showLoading({ title: "提交中..." });
  7070. await uploadAnamaly(data);
  7071. uni.hideLoading();
  7072. uni.showToast({ title: "上报成功", icon: "success" });
  7073. setTimeout(() => {
  7074. uni.navigateBack();
  7075. }, 1500);
  7076. } catch (err) {
  7077. uni.hideLoading();
  7078. formatAppLog("error", "at pages/orders/anomaly.vue:214", "异常上报失败:", err);
  7079. uni.showToast({ title: "提交失败,请重试", icon: "none" });
  7080. }
  7081. }
  7082. }
  7083. };
  7084. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  7085. return vue.openBlock(), vue.createElementBlock("view", { class: "anomaly-container" }, [
  7086. vue.createElementVNode("scroll-view", {
  7087. "scroll-y": "",
  7088. class: "anomaly-scroll"
  7089. }, [
  7090. vue.createElementVNode("view", { class: "ano-card" }, [
  7091. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7092. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7093. vue.createElementVNode("text", { class: "ano-title-text" }, "异常类型")
  7094. ]),
  7095. vue.createElementVNode("view", {
  7096. class: "ano-type-row",
  7097. onClick: _cache[0] || (_cache[0] = (...args) => $options.openTypeSheet && $options.openTypeSheet(...args))
  7098. }, [
  7099. vue.createElementVNode(
  7100. "text",
  7101. {
  7102. class: vue.normalizeClass(["ano-type-val", { "placeholder": !$options.selectedType }])
  7103. },
  7104. vue.toDisplayString($options.selectedType || "请选择异常类型"),
  7105. 3
  7106. /* TEXT, CLASS */
  7107. ),
  7108. vue.createElementVNode("image", {
  7109. class: "ano-right-arrow",
  7110. src: _imports_0$2
  7111. })
  7112. ])
  7113. ]),
  7114. vue.createElementVNode("view", { class: "ano-card" }, [
  7115. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7116. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7117. vue.createElementVNode("text", { class: "ano-title-text" }, "异常描述")
  7118. ]),
  7119. vue.withDirectives(vue.createElementVNode(
  7120. "textarea",
  7121. {
  7122. class: "ano-textarea",
  7123. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.anomalyDesc = $event),
  7124. placeholder: "请详细描述现场异常情况...",
  7125. "placeholder-style": "color:#ccc; font-size:28rpx;",
  7126. maxlength: "500"
  7127. },
  7128. null,
  7129. 512
  7130. /* NEED_PATCH */
  7131. ), [
  7132. [vue.vModelText, $data.anomalyDesc]
  7133. ])
  7134. ]),
  7135. vue.createElementVNode("view", { class: "ano-card" }, [
  7136. vue.createElementVNode("view", { class: "ano-section-title" }, [
  7137. vue.createElementVNode("view", { class: "ano-title-bar" }),
  7138. vue.createElementVNode("text", { class: "ano-title-text" }, "现场照片 (必填,最多5张)")
  7139. ]),
  7140. vue.createElementVNode("view", { class: "ano-photo-grid" }, [
  7141. (vue.openBlock(true), vue.createElementBlock(
  7142. vue.Fragment,
  7143. null,
  7144. vue.renderList($data.photoList, (img, idx) => {
  7145. return vue.openBlock(), vue.createElementBlock("view", {
  7146. class: "ano-photo-item",
  7147. key: idx
  7148. }, [
  7149. vue.createElementVNode("image", {
  7150. class: "ano-photo-preview",
  7151. src: img.url || img.localPath || img,
  7152. mode: "aspectFill"
  7153. }, null, 8, ["src"]),
  7154. vue.createElementVNode("view", {
  7155. class: "ano-photo-del",
  7156. onClick: ($event) => $options.removePhoto(idx)
  7157. }, "×", 8, ["onClick"])
  7158. ]);
  7159. }),
  7160. 128
  7161. /* KEYED_FRAGMENT */
  7162. )),
  7163. $data.photoList.length < 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  7164. key: 0,
  7165. class: "ano-photo-add",
  7166. onClick: _cache[2] || (_cache[2] = (...args) => $options.choosePhoto && $options.choosePhoto(...args))
  7167. }, [
  7168. vue.createElementVNode("image", {
  7169. class: "ano-add-icon",
  7170. src: _imports_1$6
  7171. }),
  7172. vue.createElementVNode("text", { class: "ano-add-text" }, "上传")
  7173. ])) : vue.createCommentVNode("v-if", true)
  7174. ])
  7175. ]),
  7176. vue.createElementVNode("view", { style: { "height": "160rpx" } })
  7177. ]),
  7178. vue.createElementVNode("view", { class: "ano-footer" }, [
  7179. vue.createElementVNode("button", {
  7180. class: "ano-submit-btn",
  7181. onClick: _cache[3] || (_cache[3] = (...args) => $options.submitAnomaly && $options.submitAnomaly(...args))
  7182. }, "提交上报")
  7183. ]),
  7184. $data.showTypeSheet ? (vue.openBlock(), vue.createElementBlock("view", {
  7185. key: 0,
  7186. class: "ano-sheet-mask",
  7187. onClick: _cache[6] || (_cache[6] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7188. }, [
  7189. vue.createElementVNode("view", {
  7190. class: "ano-sheet",
  7191. onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  7192. }, ["stop"]))
  7193. }, [
  7194. vue.createElementVNode("text", { class: "ano-sheet-title" }, "选择异常类型"),
  7195. vue.createElementVNode("scroll-view", {
  7196. "scroll-y": "",
  7197. class: "ano-sheet-list"
  7198. }, [
  7199. (vue.openBlock(true), vue.createElementBlock(
  7200. vue.Fragment,
  7201. null,
  7202. vue.renderList($data.anomalyTypes, (type, idx) => {
  7203. return vue.openBlock(), vue.createElementBlock("view", {
  7204. class: "ano-sheet-item",
  7205. key: idx,
  7206. onClick: ($event) => $options.selectType(type)
  7207. }, [
  7208. vue.createElementVNode(
  7209. "text",
  7210. {
  7211. class: vue.normalizeClass(["ano-sheet-item-text", { "selected": $data.selectedTypeValue === type.value }])
  7212. },
  7213. vue.toDisplayString(type.label),
  7214. 3
  7215. /* TEXT, CLASS */
  7216. ),
  7217. $data.selectedTypeValue === type.value ? (vue.openBlock(), vue.createElementBlock("image", {
  7218. key: 0,
  7219. class: "ano-check-icon",
  7220. src: _imports_0$2
  7221. })) : vue.createCommentVNode("v-if", true)
  7222. ], 8, ["onClick"]);
  7223. }),
  7224. 128
  7225. /* KEYED_FRAGMENT */
  7226. ))
  7227. ]),
  7228. vue.createElementVNode("view", {
  7229. class: "ano-sheet-cancel",
  7230. onClick: _cache[4] || (_cache[4] = (...args) => $options.closeTypeSheet && $options.closeTypeSheet(...args))
  7231. }, "取消")
  7232. ])
  7233. ])) : vue.createCommentVNode("v-if", true)
  7234. ]);
  7235. }
  7236. const PagesOrdersAnomaly = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/orders/anomaly.vue"]]);
  7237. const _sfc_main$o = {
  7238. data() {
  7239. return {
  7240. tabs: ["全部", "已完成", "已拒绝"],
  7241. activeTab: 0,
  7242. stats: {
  7243. total: 0,
  7244. reject: 0,
  7245. reward: 0,
  7246. punish: 0
  7247. },
  7248. orders: [],
  7249. serviceList: [],
  7250. pageNum: 1,
  7251. pageSize: 10,
  7252. total: 0,
  7253. loading: false
  7254. };
  7255. },
  7256. computed: {
  7257. filteredOrders() {
  7258. return this.orders;
  7259. }
  7260. },
  7261. async onLoad() {
  7262. await this.loadServiceList();
  7263. this.fetchStats();
  7264. this.fetchOrders(true);
  7265. },
  7266. methods: {
  7267. async loadServiceList() {
  7268. try {
  7269. const res = await listAllService();
  7270. this.serviceList = res.data || [];
  7271. } catch (err) {
  7272. formatAppLog("error", "at pages/mine/order-stats.vue:160", "获取服务类型失败:", err);
  7273. }
  7274. },
  7275. async fetchStats() {
  7276. try {
  7277. const res = await getOrderStats();
  7278. if (res.code === 200 && res.data) {
  7279. this.stats = {
  7280. ...this.stats,
  7281. ...res.data
  7282. };
  7283. }
  7284. } catch (err) {
  7285. formatAppLog("error", "at pages/mine/order-stats.vue:173", "获取统计值失败:", err);
  7286. }
  7287. },
  7288. async fetchOrders(reset = false) {
  7289. if (reset) {
  7290. this.pageNum = 1;
  7291. this.orders = [];
  7292. }
  7293. if (this.loading)
  7294. return;
  7295. if (!reset && this.orders.length >= this.total && this.total !== 0)
  7296. return;
  7297. this.loading = true;
  7298. try {
  7299. const statusMap = { 0: void 0, 1: 4, 2: 5 };
  7300. const params = {
  7301. status: statusMap[this.activeTab],
  7302. pageNum: this.pageNum,
  7303. pageSize: this.pageSize
  7304. };
  7305. const res = await getStatisticOrders(params);
  7306. if (res.code === 200) {
  7307. this.total = res.total || 0;
  7308. const rows = res.rows || [];
  7309. const mapped = rows.map((item) => this.transformOrder(item));
  7310. this.orders = this.orders.concat(mapped);
  7311. this.pageNum++;
  7312. }
  7313. } catch (err) {
  7314. formatAppLog("error", "at pages/mine/order-stats.vue:201", "获取订单列表失败:", err);
  7315. } finally {
  7316. this.loading = false;
  7317. }
  7318. },
  7319. transformOrder(order) {
  7320. const service = this.serviceList.find((s) => s.id === order.service);
  7321. const mode = (service == null ? void 0 : service.mode) || 0;
  7322. const isRoundTrip = mode === 1;
  7323. const statusMap = {
  7324. 0: { label: "待派单", color: "#f56c6c" },
  7325. 1: { label: "待接单", color: "#e6a23c" },
  7326. 2: { label: "待服务", color: "#49a3ff" },
  7327. 3: { label: "服务中", color: "#49a3ff" },
  7328. 4: { label: "已完成", color: "#67c23a" },
  7329. 5: { label: "已取消", color: "#909399" }
  7330. };
  7331. const statusInfo = statusMap[order.status] || { label: "未知", color: "#999" };
  7332. return {
  7333. id: order.id,
  7334. orderType: isRoundTrip ? 1 : 2,
  7335. typeName: (service == null ? void 0 : service.name) || "未知",
  7336. typeIcon: (service == null ? void 0 : service.iconUrl) || "",
  7337. statusLabel: statusInfo.label,
  7338. statusColor: statusInfo.color,
  7339. finishTime: order.serviceTime || "",
  7340. serviceTime: order.serviceTime || "",
  7341. petName: order.petName || "未知",
  7342. petBreed: order.breed || "未知",
  7343. petAvatar: order.petAvatarUrl || "/static/dog.png",
  7344. price: (order.price / 100).toFixed(2),
  7345. startName: order.fromAddress || "",
  7346. startAddr: order.fromAddress || "",
  7347. endName: (order.customerName || "") + " " + (order.customerPhone || ""),
  7348. endAddr: order.toAddress || "",
  7349. serviceNote: order.remark || ""
  7350. };
  7351. },
  7352. switchTab(idx) {
  7353. this.activeTab = idx;
  7354. this.fetchOrders(true);
  7355. },
  7356. onReachBottom() {
  7357. this.fetchOrders();
  7358. },
  7359. navBack() {
  7360. uni.navigateBack();
  7361. }
  7362. }
  7363. };
  7364. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  7365. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7366. vue.createElementVNode("view", { class: "stats-banner" }, [
  7367. vue.createElementVNode("view", { class: "banner-item" }, [
  7368. vue.createElementVNode(
  7369. "text",
  7370. { class: "banner-num" },
  7371. vue.toDisplayString($data.stats.total),
  7372. 1
  7373. /* TEXT */
  7374. ),
  7375. vue.createElementVNode("text", { class: "banner-label" }, "累计接单")
  7376. ]),
  7377. vue.createElementVNode("view", { class: "banner-item" }, [
  7378. vue.createElementVNode(
  7379. "text",
  7380. { class: "banner-num" },
  7381. vue.toDisplayString($data.stats.reject),
  7382. 1
  7383. /* TEXT */
  7384. ),
  7385. vue.createElementVNode("text", { class: "banner-label" }, "累计拒单")
  7386. ]),
  7387. vue.createElementVNode("view", { class: "banner-item" }, [
  7388. vue.createElementVNode(
  7389. "text",
  7390. { class: "banner-num" },
  7391. vue.toDisplayString($data.stats.reward),
  7392. 1
  7393. /* TEXT */
  7394. ),
  7395. vue.createElementVNode("text", { class: "banner-label" }, "奖励单量")
  7396. ]),
  7397. vue.createElementVNode("view", { class: "banner-item" }, [
  7398. vue.createElementVNode(
  7399. "text",
  7400. { class: "banner-num" },
  7401. vue.toDisplayString($data.stats.punish),
  7402. 1
  7403. /* TEXT */
  7404. ),
  7405. vue.createElementVNode("text", { class: "banner-label" }, "惩罚单量")
  7406. ])
  7407. ]),
  7408. vue.createElementVNode("view", { class: "tab-bar" }, [
  7409. (vue.openBlock(true), vue.createElementBlock(
  7410. vue.Fragment,
  7411. null,
  7412. vue.renderList($data.tabs, (tab, idx) => {
  7413. return vue.openBlock(), vue.createElementBlock("view", {
  7414. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7415. key: idx,
  7416. onClick: ($event) => $options.switchTab(idx)
  7417. }, [
  7418. vue.createElementVNode(
  7419. "text",
  7420. null,
  7421. vue.toDisplayString(tab),
  7422. 1
  7423. /* TEXT */
  7424. ),
  7425. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7426. key: 0,
  7427. class: "tab-line"
  7428. })) : vue.createCommentVNode("v-if", true)
  7429. ], 10, ["onClick"]);
  7430. }),
  7431. 128
  7432. /* KEYED_FRAGMENT */
  7433. ))
  7434. ]),
  7435. vue.createElementVNode(
  7436. "scroll-view",
  7437. {
  7438. "scroll-y": "",
  7439. class: "order-scroll",
  7440. onScrolltolower: _cache[0] || (_cache[0] = (...args) => $options.onReachBottom && $options.onReachBottom(...args))
  7441. },
  7442. [
  7443. vue.createElementVNode("view", { style: { "height": "16rpx" } }),
  7444. (vue.openBlock(true), vue.createElementBlock(
  7445. vue.Fragment,
  7446. null,
  7447. vue.renderList($options.filteredOrders, (order, idx) => {
  7448. return vue.openBlock(), vue.createElementBlock("view", {
  7449. class: "order-card",
  7450. key: idx
  7451. }, [
  7452. vue.createElementVNode("view", { class: "card-header" }, [
  7453. vue.createElementVNode("view", { class: "type-badge" }, [
  7454. vue.createElementVNode("image", {
  7455. class: "type-icon",
  7456. src: order.typeIcon
  7457. }, null, 8, ["src"]),
  7458. vue.createElementVNode(
  7459. "text",
  7460. { class: "type-text" },
  7461. vue.toDisplayString(order.typeName),
  7462. 1
  7463. /* TEXT */
  7464. )
  7465. ]),
  7466. vue.createElementVNode(
  7467. "text",
  7468. {
  7469. class: "status-text",
  7470. style: vue.normalizeStyle({ color: order.statusColor })
  7471. },
  7472. vue.toDisplayString(order.statusLabel),
  7473. 5
  7474. /* TEXT, STYLE */
  7475. )
  7476. ]),
  7477. vue.createElementVNode(
  7478. "text",
  7479. { class: "service-time" },
  7480. "服务时间:" + vue.toDisplayString(order.serviceTime),
  7481. 1
  7482. /* TEXT */
  7483. ),
  7484. vue.createElementVNode("view", { class: "pet-card" }, [
  7485. vue.createElementVNode("image", {
  7486. class: "pet-avatar",
  7487. src: order.petAvatar,
  7488. mode: "aspectFill"
  7489. }, null, 8, ["src"]),
  7490. vue.createElementVNode("view", { class: "pet-info" }, [
  7491. vue.createElementVNode(
  7492. "text",
  7493. { class: "pet-name" },
  7494. vue.toDisplayString(order.petName),
  7495. 1
  7496. /* TEXT */
  7497. ),
  7498. vue.createElementVNode(
  7499. "text",
  7500. { class: "pet-breed" },
  7501. "品种: " + vue.toDisplayString(order.petBreed),
  7502. 1
  7503. /* TEXT */
  7504. )
  7505. ]),
  7506. vue.createElementVNode(
  7507. "text",
  7508. { class: "pet-price" },
  7509. "¥" + vue.toDisplayString(order.price),
  7510. 1
  7511. /* TEXT */
  7512. )
  7513. ]),
  7514. vue.createElementVNode("view", { class: "route-info" }, [
  7515. order.orderType === 1 ? (vue.openBlock(), vue.createElementBlock(
  7516. vue.Fragment,
  7517. { key: 0 },
  7518. [
  7519. vue.createElementVNode("view", { class: "route-item" }, [
  7520. vue.createElementVNode("view", { class: "icon-circle pickup" }, "取"),
  7521. vue.createElementVNode("view", { class: "route-connector" }),
  7522. vue.createElementVNode("view", { class: "address-box" }, [
  7523. vue.createElementVNode(
  7524. "text",
  7525. { class: "addr-title" },
  7526. vue.toDisplayString(order.startName),
  7527. 1
  7528. /* TEXT */
  7529. ),
  7530. vue.createElementVNode(
  7531. "text",
  7532. { class: "addr-desc" },
  7533. vue.toDisplayString(order.startAddr),
  7534. 1
  7535. /* TEXT */
  7536. )
  7537. ])
  7538. ]),
  7539. vue.createElementVNode("view", { class: "route-item" }, [
  7540. vue.createElementVNode("view", { class: "icon-circle deliver" }, "送"),
  7541. vue.createElementVNode("view", { class: "address-box" }, [
  7542. vue.createElementVNode(
  7543. "text",
  7544. { class: "addr-title" },
  7545. vue.toDisplayString(order.endName),
  7546. 1
  7547. /* TEXT */
  7548. ),
  7549. vue.createElementVNode(
  7550. "text",
  7551. { class: "addr-desc" },
  7552. vue.toDisplayString(order.endAddr),
  7553. 1
  7554. /* TEXT */
  7555. )
  7556. ])
  7557. ])
  7558. ],
  7559. 64
  7560. /* STABLE_FRAGMENT */
  7561. )) : (vue.openBlock(), vue.createElementBlock(
  7562. vue.Fragment,
  7563. { key: 1 },
  7564. [
  7565. vue.createElementVNode("view", { class: "route-item" }, [
  7566. vue.createElementVNode("view", { class: "icon-circle service" }, "服"),
  7567. vue.createElementVNode("view", { class: "address-box" }, [
  7568. vue.createElementVNode(
  7569. "text",
  7570. { class: "addr-title" },
  7571. vue.toDisplayString(order.endName),
  7572. 1
  7573. /* TEXT */
  7574. ),
  7575. vue.createElementVNode(
  7576. "text",
  7577. { class: "addr-desc" },
  7578. vue.toDisplayString(order.endAddr),
  7579. 1
  7580. /* TEXT */
  7581. )
  7582. ])
  7583. ]),
  7584. order.serviceNote ? (vue.openBlock(), vue.createElementBlock("view", {
  7585. key: 0,
  7586. class: "service-note-row"
  7587. }, [
  7588. vue.createElementVNode(
  7589. "text",
  7590. { class: "service-note-text" },
  7591. "服务内容:" + vue.toDisplayString(order.serviceNote),
  7592. 1
  7593. /* TEXT */
  7594. )
  7595. ])) : vue.createCommentVNode("v-if", true)
  7596. ],
  7597. 64
  7598. /* STABLE_FRAGMENT */
  7599. ))
  7600. ])
  7601. ]);
  7602. }),
  7603. 128
  7604. /* KEYED_FRAGMENT */
  7605. )),
  7606. $options.filteredOrders.length === 0 && !$data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7607. key: 0,
  7608. class: "empty-state"
  7609. }, [
  7610. vue.createElementVNode("text", { class: "empty-text" }, "暂无相关订单")
  7611. ])) : vue.createCommentVNode("v-if", true),
  7612. $data.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  7613. key: 1,
  7614. class: "loading-more"
  7615. }, [
  7616. vue.createElementVNode("text", null, "加载中...")
  7617. ])) : vue.createCommentVNode("v-if", true),
  7618. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  7619. ],
  7620. 32
  7621. /* NEED_HYDRATION */
  7622. )
  7623. ]);
  7624. }
  7625. 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"]]);
  7626. function getBalanceOnApp() {
  7627. return request({
  7628. url: "/fulfiller/log/balanceOnApp",
  7629. method: "GET"
  7630. });
  7631. }
  7632. function pageBalanceOnApp(data) {
  7633. return request({
  7634. url: "/fulfiller/log/pageBalanceOnApp",
  7635. method: "GET",
  7636. data
  7637. });
  7638. }
  7639. function listBalanceOnApp(data) {
  7640. return request({
  7641. url: "/fulfiller/log/listBalanceOnApp",
  7642. method: "GET",
  7643. data
  7644. });
  7645. }
  7646. function pointsOnApp() {
  7647. return request({
  7648. url: "/fulfiller/log/pointsOnApp",
  7649. method: "GET"
  7650. });
  7651. }
  7652. function pagePointsOnApp(data) {
  7653. return request({
  7654. url: "/fulfiller/log/pagePointsOnApp",
  7655. method: "GET",
  7656. data
  7657. });
  7658. }
  7659. function listPointsOnApp(data) {
  7660. return request({
  7661. url: "/fulfiller/log/listPointsOnApp",
  7662. method: "GET",
  7663. data
  7664. });
  7665. }
  7666. function countOnAppReward(data) {
  7667. return request({
  7668. url: "/fulfiller/log/countOnAppReward",
  7669. method: "GET",
  7670. data
  7671. });
  7672. }
  7673. function listOnAppReward(data) {
  7674. return request({
  7675. url: "/fulfiller/log/listOnAppReward",
  7676. method: "GET",
  7677. data
  7678. });
  7679. }
  7680. const FlfBalanceBizType = {
  7681. admin_reward: "后台奖励",
  7682. admin_punish: "后台惩罚",
  7683. admin_adjust: "后台调整",
  7684. order_reward: "订单奖励",
  7685. order_punish: "订单惩罚",
  7686. order_finish: "订单完成",
  7687. salary: "工资发放",
  7688. withdraw: "提现"
  7689. };
  7690. const FlfPointsBizType = {
  7691. admin_reward: "后台奖励",
  7692. admin_punish: "后台惩罚",
  7693. admin_adjust: "后台调整",
  7694. order_reward: "订单奖励",
  7695. order_punish: "订单惩罚",
  7696. order_finish: "订单完成"
  7697. };
  7698. const FlfRewardBizType = {
  7699. admin_reward: "后台奖励",
  7700. admin_punish: "后台惩罚",
  7701. order_reward: "订单奖励",
  7702. order_punish: "订单惩罚",
  7703. order_finish: "订单完成"
  7704. };
  7705. const FlfActionType = {
  7706. add: "收入",
  7707. reduce: "支出"
  7708. };
  7709. const fulfillerEnum = {
  7710. FlfBalanceBizType,
  7711. FlfPointsBizType,
  7712. FlfRewardBizType,
  7713. FlfActionType
  7714. };
  7715. const bizTypeMap$5 = fulfillerEnum.FlfRewardBizType;
  7716. const _sfc_main$n = {
  7717. data() {
  7718. const now = /* @__PURE__ */ new Date();
  7719. return {
  7720. tabs: ["全部", "奖励", "惩罚"],
  7721. activeTab: 0,
  7722. selectedYear: now.getFullYear(),
  7723. selectedMonth: now.getFullYear() === 2026 && now.getMonth() < 2 ? 3 : now.getMonth() + 1,
  7724. // 默认当前月,处理一下测试数据时间
  7725. // 统计数据
  7726. stats: {
  7727. rewardCount: 0,
  7728. punishCount: 0,
  7729. rewardBalance: 0,
  7730. punishBalance: 0
  7731. },
  7732. // 月份选择器状态
  7733. showMonthPicker: false,
  7734. pickerYear: 2026,
  7735. pickerMonth: 3,
  7736. years: [2024, 2025, 2026],
  7737. months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  7738. yearScrollTop: 0,
  7739. monthScrollTop: 0,
  7740. // 奖惩记录列表
  7741. records: []
  7742. };
  7743. },
  7744. computed: {
  7745. filteredList() {
  7746. if (this.activeTab === 0)
  7747. return this.records;
  7748. const targetType = this.activeTab === 1 ? "reward" : "penalty";
  7749. return this.records.filter((r) => r.type === targetType);
  7750. }
  7751. },
  7752. onShow() {
  7753. if (this.selectedYear === 2026 && this.selectedMonth === 2)
  7754. ;
  7755. this.fetchData();
  7756. },
  7757. methods: {
  7758. async fetchData() {
  7759. const params = {
  7760. year: this.selectedYear,
  7761. month: this.selectedMonth
  7762. };
  7763. this.fetchStats(params);
  7764. this.fetchList(params);
  7765. },
  7766. async fetchStats(params) {
  7767. try {
  7768. const res = await countOnAppReward(params);
  7769. if (res.code === 200) {
  7770. this.stats = res.data || {
  7771. rewardCount: 0,
  7772. punishCount: 0,
  7773. rewardBalance: 0,
  7774. punishBalance: 0
  7775. };
  7776. }
  7777. } catch (err) {
  7778. formatAppLog("error", "at pages/mine/rewards.vue:196", "获取奖惩统计失败:", err);
  7779. }
  7780. },
  7781. async fetchList(params) {
  7782. try {
  7783. const res = await listOnAppReward(params);
  7784. if (res.code === 200) {
  7785. const list = res.data || [];
  7786. this.records = list.map((item) => {
  7787. const isAdd = item.type === "add";
  7788. const amountVal = Math.abs(item.amount) / 100;
  7789. let dateStr = "";
  7790. if (item.createTime) {
  7791. const datePart = item.createTime.split(" ")[0];
  7792. const parts = datePart.split("-");
  7793. if (parts.length >= 3) {
  7794. dateStr = `${parts[1]}-${parts[2]}`;
  7795. }
  7796. }
  7797. return {
  7798. ...item,
  7799. date: dateStr,
  7800. title: bizTypeMap$5[item.bizType] || item.bizType || "其他",
  7801. desc: item.reason || "",
  7802. amount: isAdd ? amountVal : -amountVal,
  7803. type: isAdd ? "reward" : "penalty",
  7804. status: isAdd ? "已入账" : "已扣款",
  7805. // 简化处理状态
  7806. statusClass: isAdd ? "credited" : "deducted"
  7807. };
  7808. });
  7809. }
  7810. } catch (err) {
  7811. formatAppLog("error", "at pages/mine/rewards.vue:231", "获取奖惩列表失败:", err);
  7812. }
  7813. },
  7814. switchTab(idx) {
  7815. this.activeTab = idx;
  7816. },
  7817. openMonthPicker() {
  7818. this.pickerYear = this.selectedYear;
  7819. this.pickerMonth = this.selectedMonth;
  7820. this.showMonthPicker = true;
  7821. },
  7822. closeMonthPicker() {
  7823. this.showMonthPicker = false;
  7824. },
  7825. confirmMonthPicker() {
  7826. this.selectedYear = this.pickerYear;
  7827. this.selectedMonth = this.pickerMonth;
  7828. this.closeMonthPicker();
  7829. this.fetchData();
  7830. },
  7831. goToAll() {
  7832. uni.navigateTo({ url: "/pages/mine/rewards-all" });
  7833. }
  7834. }
  7835. };
  7836. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  7837. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  7838. vue.createElementVNode("view", { class: "top-banner" }, [
  7839. vue.createElementVNode("view", {
  7840. class: "month-btn",
  7841. onClick: _cache[0] || (_cache[0] = (...args) => $options.openMonthPicker && $options.openMonthPicker(...args))
  7842. }, [
  7843. vue.createElementVNode(
  7844. "text",
  7845. { class: "month-text" },
  7846. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString($data.selectedMonth) + "月 ▾",
  7847. 1
  7848. /* TEXT */
  7849. )
  7850. ]),
  7851. vue.createElementVNode("view", { class: "stats-grid" }, [
  7852. vue.createElementVNode("view", { class: "stats-cell" }, [
  7853. vue.createElementVNode("text", { class: "stats-label" }, "奖励订单"),
  7854. vue.createElementVNode("text", { class: "stats-num" }, [
  7855. vue.createTextVNode(
  7856. vue.toDisplayString($data.stats.rewardCount),
  7857. 1
  7858. /* TEXT */
  7859. ),
  7860. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7861. ]),
  7862. vue.createElementVNode("view", { class: "stats-divider" }),
  7863. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7864. ]),
  7865. vue.createElementVNode("view", { class: "stats-cell" }, [
  7866. vue.createElementVNode("text", { class: "stats-label" }, "惩罚订单"),
  7867. vue.createElementVNode("text", { class: "stats-num" }, [
  7868. vue.createTextVNode(
  7869. vue.toDisplayString($data.stats.punishCount),
  7870. 1
  7871. /* TEXT */
  7872. ),
  7873. vue.createElementVNode("text", { class: "stats-unit" }, "单")
  7874. ]),
  7875. vue.createElementVNode("view", { class: "stats-divider" }),
  7876. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7877. ]),
  7878. vue.createElementVNode("view", { class: "stats-cell" }, [
  7879. vue.createElementVNode("text", { class: "stats-label" }, "奖励金额"),
  7880. vue.createElementVNode(
  7881. "text",
  7882. { class: "stats-num reward-num" },
  7883. vue.toDisplayString(($data.stats.rewardBalance / 100).toFixed(2)),
  7884. 1
  7885. /* TEXT */
  7886. ),
  7887. vue.createElementVNode("view", { class: "stats-divider" }),
  7888. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7889. ]),
  7890. vue.createElementVNode("view", { class: "stats-cell" }, [
  7891. vue.createElementVNode("text", { class: "stats-label" }, "惩罚金额"),
  7892. vue.createElementVNode(
  7893. "text",
  7894. { class: "stats-num penalty-num" },
  7895. vue.toDisplayString(($data.stats.punishBalance / 100).toFixed(2)),
  7896. 1
  7897. /* TEXT */
  7898. ),
  7899. vue.createElementVNode("view", { class: "stats-divider" }),
  7900. vue.createElementVNode("text", { class: "stats-sub" }, "月度统计")
  7901. ])
  7902. ])
  7903. ]),
  7904. vue.createElementVNode("view", { class: "list-header" }, [
  7905. vue.createElementVNode("view", { class: "tab-bar" }, [
  7906. (vue.openBlock(true), vue.createElementBlock(
  7907. vue.Fragment,
  7908. null,
  7909. vue.renderList($data.tabs, (tab, idx) => {
  7910. return vue.openBlock(), vue.createElementBlock("view", {
  7911. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  7912. key: idx,
  7913. onClick: ($event) => $options.switchTab(idx)
  7914. }, [
  7915. vue.createElementVNode(
  7916. "text",
  7917. null,
  7918. vue.toDisplayString(tab),
  7919. 1
  7920. /* TEXT */
  7921. ),
  7922. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  7923. key: 0,
  7924. class: "tab-line"
  7925. })) : vue.createCommentVNode("v-if", true)
  7926. ], 10, ["onClick"]);
  7927. }),
  7928. 128
  7929. /* KEYED_FRAGMENT */
  7930. ))
  7931. ]),
  7932. vue.createElementVNode("view", {
  7933. class: "view-all-btn",
  7934. onClick: _cache[1] || (_cache[1] = (...args) => $options.goToAll && $options.goToAll(...args))
  7935. }, [
  7936. vue.createElementVNode("text", { class: "view-all-text" }, "查看全部 ›")
  7937. ])
  7938. ]),
  7939. vue.createElementVNode("view", { class: "record-list" }, [
  7940. (vue.openBlock(true), vue.createElementBlock(
  7941. vue.Fragment,
  7942. null,
  7943. vue.renderList($options.filteredList, (item, idx) => {
  7944. return vue.openBlock(), vue.createElementBlock("view", {
  7945. class: "record-item",
  7946. key: idx
  7947. }, [
  7948. vue.createElementVNode(
  7949. "view",
  7950. {
  7951. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  7952. },
  7953. [
  7954. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  7955. ],
  7956. 2
  7957. /* CLASS */
  7958. ),
  7959. vue.createElementVNode("view", { class: "ri-content" }, [
  7960. vue.createElementVNode("view", { class: "ri-title-row" }, [
  7961. vue.createElementVNode(
  7962. "text",
  7963. { class: "ri-date" },
  7964. vue.toDisplayString(item.date),
  7965. 1
  7966. /* TEXT */
  7967. ),
  7968. vue.createElementVNode(
  7969. "text",
  7970. { class: "ri-title" },
  7971. vue.toDisplayString(item.title),
  7972. 1
  7973. /* TEXT */
  7974. )
  7975. ]),
  7976. vue.createElementVNode(
  7977. "text",
  7978. { class: "ri-desc" },
  7979. vue.toDisplayString(item.desc),
  7980. 1
  7981. /* TEXT */
  7982. )
  7983. ]),
  7984. vue.createElementVNode("view", { class: "ri-right" }, [
  7985. vue.createElementVNode(
  7986. "text",
  7987. {
  7988. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  7989. },
  7990. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  7991. 3
  7992. /* TEXT, CLASS */
  7993. ),
  7994. vue.createElementVNode(
  7995. "text",
  7996. {
  7997. class: vue.normalizeClass(["ri-status", item.statusClass])
  7998. },
  7999. vue.toDisplayString(item.status),
  8000. 3
  8001. /* TEXT, CLASS */
  8002. )
  8003. ])
  8004. ]);
  8005. }),
  8006. 128
  8007. /* KEYED_FRAGMENT */
  8008. )),
  8009. vue.createElementVNode("text", { class: "more-hint" }, "更多记录请点击上方的查看全部")
  8010. ]),
  8011. $data.showMonthPicker ? (vue.openBlock(), vue.createElementBlock("view", {
  8012. key: 0,
  8013. class: "picker-mask",
  8014. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  8015. }, [
  8016. vue.createElementVNode("view", {
  8017. class: "picker-sheet",
  8018. onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
  8019. }, ["stop"]))
  8020. }, [
  8021. vue.createElementVNode("view", { class: "picker-header" }, [
  8022. vue.createElementVNode("text", {
  8023. class: "picker-cancel",
  8024. onClick: _cache[2] || (_cache[2] = (...args) => $options.closeMonthPicker && $options.closeMonthPicker(...args))
  8025. }, "取消"),
  8026. vue.createElementVNode("text", { class: "picker-title" }, "选择时间"),
  8027. vue.createElementVNode("text", {
  8028. class: "picker-confirm",
  8029. onClick: _cache[3] || (_cache[3] = (...args) => $options.confirmMonthPicker && $options.confirmMonthPicker(...args))
  8030. }, "确定")
  8031. ]),
  8032. vue.createElementVNode("view", { class: "picker-body" }, [
  8033. vue.createElementVNode("scroll-view", {
  8034. "scroll-y": "",
  8035. class: "picker-column",
  8036. "scroll-top": $data.yearScrollTop,
  8037. onScroll: _cache[4] || (_cache[4] = (...args) => _ctx.onYearScroll && _ctx.onYearScroll(...args))
  8038. }, [
  8039. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  8040. (vue.openBlock(true), vue.createElementBlock(
  8041. vue.Fragment,
  8042. null,
  8043. vue.renderList($data.years, (year) => {
  8044. return vue.openBlock(), vue.createElementBlock("view", {
  8045. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerYear === year }]),
  8046. key: year,
  8047. onClick: ($event) => $data.pickerYear = year
  8048. }, vue.toDisplayString(year) + "年", 11, ["onClick"]);
  8049. }),
  8050. 128
  8051. /* KEYED_FRAGMENT */
  8052. )),
  8053. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8054. ], 40, ["scroll-top"]),
  8055. vue.createElementVNode("view", { class: "picker-highlight" }),
  8056. vue.createElementVNode("scroll-view", {
  8057. "scroll-y": "",
  8058. class: "picker-column",
  8059. "scroll-top": $data.monthScrollTop,
  8060. onScroll: _cache[5] || (_cache[5] = (...args) => _ctx.onMonthScroll && _ctx.onMonthScroll(...args))
  8061. }, [
  8062. vue.createElementVNode("view", { style: { "height": "80rpx" } }),
  8063. (vue.openBlock(true), vue.createElementBlock(
  8064. vue.Fragment,
  8065. null,
  8066. vue.renderList($data.months, (month) => {
  8067. return vue.openBlock(), vue.createElementBlock("view", {
  8068. class: vue.normalizeClass(["picker-col-item", { "picker-selected": $data.pickerMonth === month }]),
  8069. key: month,
  8070. onClick: ($event) => $data.pickerMonth = month
  8071. }, vue.toDisplayString(month) + "月", 11, ["onClick"]);
  8072. }),
  8073. 128
  8074. /* KEYED_FRAGMENT */
  8075. )),
  8076. vue.createElementVNode("view", { style: { "height": "80rpx" } })
  8077. ], 40, ["scroll-top"])
  8078. ])
  8079. ])
  8080. ])) : vue.createCommentVNode("v-if", true)
  8081. ]);
  8082. }
  8083. const PagesMineRewards = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/rewards.vue"]]);
  8084. const bizTypeMap$4 = fulfillerEnum.FlfRewardBizType;
  8085. const _sfc_main$m = {
  8086. data() {
  8087. const now = /* @__PURE__ */ new Date();
  8088. return {
  8089. tabs: ["全部", "奖励", "惩罚"],
  8090. activeTab: 0,
  8091. selectedYear: now.getFullYear(),
  8092. selectedMonth: now.getMonth() + 1,
  8093. // 原始分组数据
  8094. allGroups: [],
  8095. loading: false
  8096. };
  8097. },
  8098. computed: {
  8099. currentPickerDate() {
  8100. return `${this.selectedYear}-${String(this.selectedMonth).padStart(2, "0")}`;
  8101. },
  8102. filteredGroups() {
  8103. if (this.activeTab === 0)
  8104. return this.allGroups;
  8105. const typeKey = this.activeTab === 1 ? "reward" : "penalty";
  8106. return this.allGroups.map((g) => ({
  8107. ...g,
  8108. items: g.items.filter((i) => i.type === typeKey)
  8109. })).filter((g) => g.items.length > 0);
  8110. }
  8111. },
  8112. onShow() {
  8113. this.fetchMonthData();
  8114. },
  8115. methods: {
  8116. async fetchMonthData() {
  8117. if (this.loading)
  8118. return;
  8119. this.loading = true;
  8120. try {
  8121. const params = {
  8122. year: this.selectedYear,
  8123. month: this.selectedMonth
  8124. };
  8125. const res = await listOnAppReward(params);
  8126. const data = res.data || [];
  8127. if (data.length === 0) {
  8128. this.allGroups = [];
  8129. return;
  8130. }
  8131. let credited = 0;
  8132. const items = data.map((item) => {
  8133. const isAdd = item.type === "add";
  8134. const amountVal = Math.abs(item.amount) / 100;
  8135. if (isAdd)
  8136. credited += amountVal;
  8137. let dateStr = "";
  8138. if (item.createTime) {
  8139. const datePart = item.createTime.split(" ")[0];
  8140. const parts = datePart.split("-");
  8141. if (parts.length >= 3) {
  8142. dateStr = `${parts[1]}-${parts[2]}`;
  8143. }
  8144. }
  8145. return {
  8146. ...item,
  8147. date: dateStr,
  8148. title: bizTypeMap$4[item.bizType] || item.bizType || "其他",
  8149. desc: item.reason || "",
  8150. amount: isAdd ? amountVal : -amountVal,
  8151. type: isAdd ? "reward" : "penalty",
  8152. status: isAdd ? "已入账" : "已扣款",
  8153. statusClass: isAdd ? "credited" : "deducted"
  8154. };
  8155. });
  8156. this.allGroups = [{
  8157. month: this.selectedMonth,
  8158. year: this.selectedYear,
  8159. credited,
  8160. pending: 0,
  8161. items
  8162. }];
  8163. } catch (err) {
  8164. formatAppLog("error", "at pages/mine/rewards-all.vue:151", "获取奖惩明细失败:", err);
  8165. } finally {
  8166. this.loading = false;
  8167. }
  8168. },
  8169. onDateChange(e) {
  8170. const val = e.detail.value;
  8171. const parts = val.split("-");
  8172. this.selectedYear = parseInt(parts[0]);
  8173. this.selectedMonth = parseInt(parts[1]);
  8174. this.fetchMonthData();
  8175. },
  8176. switchTab(idx) {
  8177. this.activeTab = idx;
  8178. }
  8179. }
  8180. };
  8181. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  8182. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8183. vue.createElementVNode("view", { class: "filter-header" }, [
  8184. vue.createElementVNode("view", { class: "tab-bar" }, [
  8185. (vue.openBlock(true), vue.createElementBlock(
  8186. vue.Fragment,
  8187. null,
  8188. vue.renderList($data.tabs, (tab, idx) => {
  8189. return vue.openBlock(), vue.createElementBlock("view", {
  8190. class: vue.normalizeClass(["tab-item", { active: $data.activeTab === idx }]),
  8191. key: idx,
  8192. onClick: ($event) => $options.switchTab(idx)
  8193. }, [
  8194. vue.createElementVNode(
  8195. "text",
  8196. null,
  8197. vue.toDisplayString(tab),
  8198. 1
  8199. /* TEXT */
  8200. ),
  8201. $data.activeTab === idx ? (vue.openBlock(), vue.createElementBlock("view", {
  8202. key: 0,
  8203. class: "tab-line"
  8204. })) : vue.createCommentVNode("v-if", true)
  8205. ], 10, ["onClick"]);
  8206. }),
  8207. 128
  8208. /* KEYED_FRAGMENT */
  8209. ))
  8210. ]),
  8211. vue.createElementVNode("view", { class: "date-filter" }, [
  8212. vue.createElementVNode("picker", {
  8213. mode: "date",
  8214. fields: "month",
  8215. value: $options.currentPickerDate,
  8216. onChange: _cache[0] || (_cache[0] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  8217. }, [
  8218. vue.createElementVNode("view", { class: "picker-trigger" }, [
  8219. vue.createElementVNode(
  8220. "text",
  8221. null,
  8222. vue.toDisplayString($data.selectedYear) + "年" + vue.toDisplayString(String($data.selectedMonth).padStart(2, "0")) + "月",
  8223. 1
  8224. /* TEXT */
  8225. ),
  8226. vue.createElementVNode("text", { class: "arrow-icon" }, "▼")
  8227. ])
  8228. ], 40, ["value"])
  8229. ])
  8230. ]),
  8231. vue.createElementVNode("scroll-view", {
  8232. "scroll-y": "",
  8233. class: "main-scroll"
  8234. }, [
  8235. (vue.openBlock(true), vue.createElementBlock(
  8236. vue.Fragment,
  8237. null,
  8238. vue.renderList($options.filteredGroups, (group, gIdx) => {
  8239. return vue.openBlock(), vue.createElementBlock("view", {
  8240. key: gIdx,
  8241. class: "month-group"
  8242. }, [
  8243. vue.createElementVNode("view", { class: "month-header" }, [
  8244. vue.createElementVNode(
  8245. "text",
  8246. { class: "month-title" },
  8247. vue.toDisplayString(group.month) + "月",
  8248. 1
  8249. /* TEXT */
  8250. ),
  8251. vue.createElementVNode("view", { class: "month-summary" }, [
  8252. vue.createElementVNode(
  8253. "text",
  8254. { class: "month-sum-text" },
  8255. "已入账¥" + vue.toDisplayString(group.credited.toFixed(2)),
  8256. 1
  8257. /* TEXT */
  8258. ),
  8259. vue.createElementVNode(
  8260. "text",
  8261. { class: "month-sum-text" },
  8262. " 待入账¥" + vue.toDisplayString(group.pending.toFixed(2)),
  8263. 1
  8264. /* TEXT */
  8265. )
  8266. ])
  8267. ]),
  8268. (vue.openBlock(true), vue.createElementBlock(
  8269. vue.Fragment,
  8270. null,
  8271. vue.renderList(group.items, (item, rIdx) => {
  8272. return vue.openBlock(), vue.createElementBlock("view", {
  8273. class: "record-item",
  8274. key: rIdx
  8275. }, [
  8276. vue.createElementVNode(
  8277. "view",
  8278. {
  8279. class: vue.normalizeClass(["ri-icon", item.amount > 0 ? "ri-reward" : "ri-penalty"])
  8280. },
  8281. [
  8282. vue.createElementVNode("text", { class: "ri-icon-text" }, "¥")
  8283. ],
  8284. 2
  8285. /* CLASS */
  8286. ),
  8287. vue.createElementVNode("view", { class: "ri-content" }, [
  8288. vue.createElementVNode("view", { class: "ri-title-row" }, [
  8289. vue.createElementVNode(
  8290. "text",
  8291. { class: "ri-date" },
  8292. vue.toDisplayString(item.date),
  8293. 1
  8294. /* TEXT */
  8295. ),
  8296. vue.createElementVNode(
  8297. "text",
  8298. { class: "ri-title" },
  8299. vue.toDisplayString(item.title),
  8300. 1
  8301. /* TEXT */
  8302. )
  8303. ]),
  8304. vue.createElementVNode(
  8305. "text",
  8306. { class: "ri-desc" },
  8307. vue.toDisplayString(item.desc),
  8308. 1
  8309. /* TEXT */
  8310. )
  8311. ]),
  8312. vue.createElementVNode("view", { class: "ri-right" }, [
  8313. vue.createElementVNode(
  8314. "text",
  8315. {
  8316. class: vue.normalizeClass(["ri-amount", item.amount > 0 ? "positive" : "negative"])
  8317. },
  8318. vue.toDisplayString(item.amount > 0 ? "+" : "") + vue.toDisplayString(item.amount.toFixed(2)),
  8319. 3
  8320. /* TEXT, CLASS */
  8321. ),
  8322. vue.createElementVNode(
  8323. "text",
  8324. {
  8325. class: vue.normalizeClass(["ri-status", item.statusClass])
  8326. },
  8327. vue.toDisplayString(item.status),
  8328. 3
  8329. /* TEXT, CLASS */
  8330. )
  8331. ])
  8332. ]);
  8333. }),
  8334. 128
  8335. /* KEYED_FRAGMENT */
  8336. ))
  8337. ]);
  8338. }),
  8339. 128
  8340. /* KEYED_FRAGMENT */
  8341. )),
  8342. vue.createElementVNode("view", { style: { "height": "40rpx" } })
  8343. ])
  8344. ]);
  8345. }
  8346. 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"]]);
  8347. const logic = {
  8348. components: {
  8349. customTabbar
  8350. },
  8351. data() {
  8352. return {
  8353. showServicePopup: false,
  8354. showLogoutPopup: false,
  8355. profile: null,
  8356. profileLoading: false,
  8357. levelConfigs: []
  8358. // 等级配置列表
  8359. };
  8360. },
  8361. computed: {
  8362. // 根据 profile.level 匹配对应的等级名称
  8363. displayLevelName() {
  8364. if (!this.profile || !this.levelConfigs.length)
  8365. return "普通履约者";
  8366. const config = this.levelConfigs.find((c) => c.lvNo === this.profile.level);
  8367. return config ? config.name : this.profile.levelName || "普通履约者";
  8368. }
  8369. },
  8370. onShow() {
  8371. uni.hideTabBar();
  8372. if (isLoggedIn()) {
  8373. this.loadProfile();
  8374. this.loadLevelConfigs();
  8375. }
  8376. },
  8377. methods: {
  8378. async loadProfile() {
  8379. if (this.profileLoading)
  8380. return;
  8381. this.profileLoading = true;
  8382. try {
  8383. const res = await getMyProfile();
  8384. this.profile = res.data || null;
  8385. } catch (err) {
  8386. formatAppLog("error", "at pages/mine/logic.js:42", "获取个人信息失败:", err);
  8387. } finally {
  8388. this.profileLoading = false;
  8389. }
  8390. },
  8391. async loadLevelConfigs() {
  8392. try {
  8393. const res = await listAllLevelConfigs();
  8394. this.levelConfigs = res.data || [];
  8395. } catch (err) {
  8396. formatAppLog("error", "at pages/mine/logic.js:52", "加载等级配置失败:", err);
  8397. }
  8398. },
  8399. navToSettings() {
  8400. uni.navigateTo({
  8401. url: "/pages/mine/settings/index"
  8402. });
  8403. },
  8404. navToProfile() {
  8405. uni.navigateTo({
  8406. url: "/pages/mine/settings/profile/index"
  8407. });
  8408. },
  8409. navToLevel() {
  8410. uni.navigateTo({
  8411. url: "/pages/mine/level/index"
  8412. });
  8413. },
  8414. navToNotification() {
  8415. uni.navigateTo({
  8416. url: "/pages/mine/message/index"
  8417. });
  8418. },
  8419. navToWallet() {
  8420. uni.navigateTo({
  8421. url: "/pages/mine/wallet/index"
  8422. });
  8423. },
  8424. navToPoints() {
  8425. uni.navigateTo({
  8426. url: "/pages/mine/points/index"
  8427. });
  8428. },
  8429. navToOrderStats() {
  8430. uni.navigateTo({
  8431. url: "/pages/mine/order-stats"
  8432. });
  8433. },
  8434. navToRewards() {
  8435. uni.navigateTo({
  8436. url: "/pages/mine/rewards"
  8437. });
  8438. },
  8439. openServicePopup() {
  8440. this.showServicePopup = true;
  8441. },
  8442. closeServicePopup() {
  8443. this.showServicePopup = false;
  8444. },
  8445. previewQRCode() {
  8446. uni.previewImage({
  8447. urls: ["/static/logo.png"]
  8448. });
  8449. },
  8450. openOnlineService() {
  8451. uni.showToast({
  8452. title: "正在跳转企业微信客服...",
  8453. icon: "none"
  8454. });
  8455. },
  8456. callServicePhone() {
  8457. uni.makePhoneCall({
  8458. phoneNumber: "400-123-4567"
  8459. });
  8460. },
  8461. logout() {
  8462. this.showLogoutPopup = true;
  8463. },
  8464. cancelLogout() {
  8465. this.showLogoutPopup = false;
  8466. },
  8467. async confirmLogout() {
  8468. this.showLogoutPopup = false;
  8469. try {
  8470. await logout();
  8471. } catch (e) {
  8472. }
  8473. clearAuth();
  8474. uni.reLaunch({
  8475. url: "/pages/login/login"
  8476. });
  8477. }
  8478. }
  8479. };
  8480. const _imports_0$1 = "/static/icons/motorbike.svg";
  8481. const _imports_1$5 = "/static/icons/location.svg";
  8482. const _imports_0 = "/static/icons/chevron_right_dark.svg";
  8483. const _imports_3$1 = "/static/icons/calendar.svg";
  8484. const _imports_4 = "/static/icons/settings.svg";
  8485. const _imports_1$4 = "/static/icons/crown.svg";
  8486. const _imports_6 = "/static/icons/chevron_right_gold.svg";
  8487. const _imports_3 = "/static/icons/chevron_right.svg";
  8488. const _imports_8 = "/static/icons/money_linear.svg";
  8489. const _imports_9 = "/static/icons/headset_linear.svg";
  8490. const _imports_10 = "/static/icons/close_gray.svg";
  8491. const _imports_12 = "/static/icons/headset_green.svg";
  8492. const _imports_14 = "/static/icons/phone_green.svg";
  8493. const _sfc_main$l = {
  8494. ...logic
  8495. };
  8496. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  8497. var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
  8498. const _component_custom_tabbar = vue.resolveComponent("custom-tabbar");
  8499. return vue.openBlock(), vue.createElementBlock(
  8500. vue.Fragment,
  8501. null,
  8502. [
  8503. vue.createElementVNode("view", { class: "container" }, [
  8504. vue.createElementVNode("view", { class: "nav-bg" }, [
  8505. vue.createElementVNode("view", { class: "bg-circle-1" }),
  8506. vue.createElementVNode("view", { class: "bg-circle-2" })
  8507. ]),
  8508. vue.createElementVNode("view", { class: "header-section" }, [
  8509. vue.createElementVNode("view", { class: "title-bar" }, "个人中心"),
  8510. vue.createElementVNode("view", {
  8511. class: "user-card",
  8512. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.navToProfile && _ctx.navToProfile(...args))
  8513. }, [
  8514. vue.createElementVNode("image", {
  8515. class: "avatar",
  8516. src: ((_a = _ctx.profile) == null ? void 0 : _a.avatarUrl) || "/static/touxiang.png",
  8517. mode: "aspectFill"
  8518. }, null, 8, ["src"]),
  8519. vue.createElementVNode("view", { class: "info-content" }, [
  8520. vue.createElementVNode("view", { class: "name-row" }, [
  8521. vue.createElementVNode(
  8522. "text",
  8523. { class: "name" },
  8524. vue.toDisplayString(((_b = _ctx.profile) == null ? void 0 : _b.name) || "未登录"),
  8525. 1
  8526. /* TEXT */
  8527. ),
  8528. vue.createElementVNode("view", { class: "tags" }, [
  8529. ((_c = _ctx.profile) == null ? void 0 : _c.status) === "0" ? (vue.openBlock(), vue.createElementBlock("view", {
  8530. key: 0,
  8531. class: "tag green"
  8532. }, "接单中")) : ((_d = _ctx.profile) == null ? void 0 : _d.status) === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  8533. key: 1,
  8534. class: "tag green"
  8535. }, "休息中")) : ((_e = _ctx.profile) == null ? void 0 : _e.status) === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  8536. key: 2,
  8537. class: "tag",
  8538. style: { "background": "#eee", "color": "#999" }
  8539. }, "已禁用")) : vue.createCommentVNode("v-if", true),
  8540. ((_f = _ctx.profile) == null ? void 0 : _f.workType) === "full_time" ? (vue.openBlock(), vue.createElementBlock("view", {
  8541. key: 3,
  8542. class: "tag blue"
  8543. }, "全职")) : vue.createCommentVNode("v-if", true),
  8544. vue.createElementVNode("image", {
  8545. class: "bike-icon",
  8546. src: _imports_0$1
  8547. })
  8548. ])
  8549. ]),
  8550. vue.createElementVNode("view", { class: "detail-row" }, [
  8551. vue.createElementVNode("image", {
  8552. class: "small-icon",
  8553. src: _imports_1$5
  8554. }),
  8555. vue.createElementVNode(
  8556. "text",
  8557. null,
  8558. vue.toDisplayString(((_g = _ctx.profile) == null ? void 0 : _g.stationName) || ((_h = _ctx.profile) == null ? void 0 : _h.cityName) || "暂无站点"),
  8559. 1
  8560. /* TEXT */
  8561. ),
  8562. vue.createElementVNode("image", {
  8563. class: "arrow-icon-small",
  8564. src: _imports_0
  8565. })
  8566. ]),
  8567. vue.createElementVNode("view", { class: "detail-row" }, [
  8568. vue.createElementVNode("image", {
  8569. class: "small-icon",
  8570. src: _imports_3$1
  8571. }),
  8572. vue.createElementVNode(
  8573. "text",
  8574. null,
  8575. "已注册" + vue.toDisplayString(((_i = _ctx.profile) == null ? void 0 : _i.registerDays) || 0) + "天",
  8576. 1
  8577. /* TEXT */
  8578. )
  8579. ])
  8580. ]),
  8581. vue.createElementVNode("image", {
  8582. class: "settings-icon",
  8583. src: _imports_4,
  8584. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.navToSettings && _ctx.navToSettings(...args), ["stop"]))
  8585. })
  8586. ]),
  8587. vue.createElementVNode("view", { class: "vip-card" }, [
  8588. vue.createElementVNode("view", { class: "vip-left" }, [
  8589. vue.createElementVNode("image", {
  8590. class: "vip-icon",
  8591. src: _imports_1$4
  8592. }),
  8593. vue.createElementVNode("view", { class: "vip-text" }, [
  8594. vue.createElementVNode(
  8595. "text",
  8596. { class: "vip-title" },
  8597. vue.toDisplayString(_ctx.displayLevelName),
  8598. 1
  8599. /* TEXT */
  8600. ),
  8601. vue.createElementVNode("text", { class: "vip-desc" }, "完成更多订单即可升级")
  8602. ])
  8603. ]),
  8604. vue.createElementVNode("view", {
  8605. class: "vip-btn",
  8606. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.navToLevel && _ctx.navToLevel(...args))
  8607. }, [
  8608. vue.createElementVNode("text", null, "查看权益"),
  8609. vue.createElementVNode("image", {
  8610. class: "arrow-icon-small",
  8611. src: _imports_6
  8612. })
  8613. ])
  8614. ])
  8615. ]),
  8616. vue.createElementVNode("view", { class: "stats-panel" }, [
  8617. vue.createElementVNode("view", {
  8618. class: "stat-item",
  8619. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.navToWallet && _ctx.navToWallet(...args))
  8620. }, [
  8621. vue.createElementVNode("view", { class: "stat-header" }, [
  8622. vue.createElementVNode("view", { class: "red-bar" }),
  8623. vue.createElementVNode("text", { class: "label" }, "我的钱包"),
  8624. vue.createElementVNode("image", {
  8625. class: "arrow-icon",
  8626. src: _imports_3
  8627. })
  8628. ]),
  8629. vue.createElementVNode("view", { class: "stat-value" }, [
  8630. vue.createElementVNode(
  8631. "text",
  8632. { class: "num" },
  8633. vue.toDisplayString(((_j = _ctx.profile) == null ? void 0 : _j.balance) ? (_ctx.profile.balance / 100).toFixed(2) : "0.00"),
  8634. 1
  8635. /* TEXT */
  8636. ),
  8637. vue.createElementVNode("text", { class: "unit" }, "元")
  8638. ]),
  8639. vue.createElementVNode("text", { class: "sub-text" }, "账户余额")
  8640. ]),
  8641. vue.createElementVNode("view", { class: "divider" }),
  8642. vue.createElementVNode("view", {
  8643. class: "stat-item",
  8644. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.navToOrderStats && _ctx.navToOrderStats(...args))
  8645. }, [
  8646. vue.createElementVNode("view", { class: "stat-header" }, [
  8647. vue.createElementVNode("view", { class: "green-bar" }),
  8648. vue.createElementVNode("text", { class: "label" }, "订单统计"),
  8649. vue.createElementVNode("image", {
  8650. class: "arrow-icon",
  8651. src: _imports_3
  8652. })
  8653. ]),
  8654. vue.createElementVNode("view", { class: "stat-value" }, [
  8655. vue.createElementVNode(
  8656. "text",
  8657. { class: "num" },
  8658. vue.toDisplayString(((_k = _ctx.profile) == null ? void 0 : _k.orderCount) || 0),
  8659. 1
  8660. /* TEXT */
  8661. ),
  8662. vue.createElementVNode("text", { class: "unit" }, "单")
  8663. ]),
  8664. vue.createElementVNode("text", { class: "sub-text" }, "累计服务单量")
  8665. ]),
  8666. vue.createElementVNode("view", { class: "divider" }),
  8667. vue.createElementVNode("view", {
  8668. class: "stat-item",
  8669. onClick: _cache[5] || (_cache[5] = (...args) => _ctx.navToPoints && _ctx.navToPoints(...args))
  8670. }, [
  8671. vue.createElementVNode("view", { class: "stat-header" }, [
  8672. vue.createElementVNode("view", { class: "orange-bar" }),
  8673. vue.createElementVNode("text", { class: "label" }, "我的积分"),
  8674. vue.createElementVNode("image", {
  8675. class: "arrow-icon",
  8676. src: _imports_3
  8677. })
  8678. ]),
  8679. vue.createElementVNode("view", { class: "stat-value" }, [
  8680. vue.createElementVNode(
  8681. "text",
  8682. { class: "num" },
  8683. vue.toDisplayString(((_l = _ctx.profile) == null ? void 0 : _l.points) || 0),
  8684. 1
  8685. /* TEXT */
  8686. ),
  8687. vue.createElementVNode("text", { class: "unit" }, "分")
  8688. ]),
  8689. vue.createElementVNode("text", { class: "sub-text" }, "可兑换权益")
  8690. ])
  8691. ]),
  8692. vue.createElementVNode("view", { class: "menu-list" }, [
  8693. vue.createElementVNode("view", {
  8694. class: "menu-item",
  8695. onClick: _cache[6] || (_cache[6] = (...args) => _ctx.navToRewards && _ctx.navToRewards(...args))
  8696. }, [
  8697. vue.createElementVNode("image", {
  8698. class: "menu-icon",
  8699. src: _imports_8
  8700. }),
  8701. vue.createElementVNode("text", { class: "menu-text" }, "我的奖惩"),
  8702. vue.createElementVNode("image", {
  8703. class: "arrow-icon",
  8704. src: _imports_3
  8705. })
  8706. ]),
  8707. vue.createElementVNode("view", {
  8708. class: "menu-item",
  8709. onClick: _cache[7] || (_cache[7] = (...args) => _ctx.openServicePopup && _ctx.openServicePopup(...args))
  8710. }, [
  8711. vue.createElementVNode("image", {
  8712. class: "menu-icon",
  8713. src: _imports_9
  8714. }),
  8715. vue.createElementVNode("text", { class: "menu-text" }, "联系客服"),
  8716. vue.createElementVNode("image", {
  8717. class: "arrow-icon",
  8718. src: _imports_3
  8719. })
  8720. ])
  8721. ]),
  8722. vue.createElementVNode("view", {
  8723. class: "logout-btn",
  8724. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.logout && _ctx.logout(...args))
  8725. }, "退出登录"),
  8726. vue.createElementVNode("view", { class: "dev-tip" }, "本APP部分功能开发当中,请只进行修改个人信息、修改设置、完成订单流程操作"),
  8727. _ctx.showServicePopup ? (vue.openBlock(), vue.createElementBlock("view", {
  8728. key: 0,
  8729. class: "service-popup-mask",
  8730. onClick: _cache[14] || (_cache[14] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8731. }, [
  8732. vue.createElementVNode("view", {
  8733. class: "service-popup",
  8734. onClick: _cache[13] || (_cache[13] = vue.withModifiers(() => {
  8735. }, ["stop"]))
  8736. }, [
  8737. vue.createElementVNode("view", { class: "service-header" }, [
  8738. vue.createElementVNode("text", { class: "service-title" }, "联系客服"),
  8739. vue.createElementVNode("image", {
  8740. class: "close-icon",
  8741. src: _imports_10,
  8742. onClick: _cache[9] || (_cache[9] = (...args) => _ctx.closeServicePopup && _ctx.closeServicePopup(...args))
  8743. })
  8744. ]),
  8745. vue.createElementVNode("view", { class: "qr-section" }, [
  8746. vue.createElementVNode("text", { class: "qr-title" }, "客服二维码"),
  8747. vue.createElementVNode("image", {
  8748. class: "qr-img",
  8749. src: _imports_1$8,
  8750. onClick: _cache[10] || (_cache[10] = (...args) => _ctx.previewQRCode && _ctx.previewQRCode(...args))
  8751. }),
  8752. vue.createElementVNode("text", { class: "qr-desc" }, "点击查看大图")
  8753. ]),
  8754. vue.createElementVNode("view", { class: "service-list" }, [
  8755. vue.createElementVNode("view", {
  8756. class: "service-row",
  8757. onClick: _cache[11] || (_cache[11] = (...args) => _ctx.openOnlineService && _ctx.openOnlineService(...args))
  8758. }, [
  8759. vue.createElementVNode("image", {
  8760. class: "service-row-icon",
  8761. src: _imports_12
  8762. }),
  8763. vue.createElementVNode("view", { class: "service-info" }, [
  8764. vue.createElementVNode("text", { class: "service-name" }, "在线客服"),
  8765. vue.createElementVNode("text", { class: "service-desc" }, "企业微信专属客服在线解答")
  8766. ]),
  8767. vue.createElementVNode("image", {
  8768. class: "arrow-icon-small",
  8769. src: _imports_3
  8770. })
  8771. ]),
  8772. vue.createElementVNode("view", { class: "service-row" }, [
  8773. vue.createElementVNode("image", {
  8774. class: "service-row-icon",
  8775. src: _imports_13
  8776. }),
  8777. vue.createElementVNode("view", { class: "service-info" }, [
  8778. vue.createElementVNode("text", { class: "service-name" }, "客服电话"),
  8779. vue.createElementVNode("text", { class: "service-desc" }, "400-123-4567")
  8780. ]),
  8781. vue.createElementVNode("view", {
  8782. class: "call-btn",
  8783. onClick: _cache[12] || (_cache[12] = (...args) => _ctx.callServicePhone && _ctx.callServicePhone(...args))
  8784. }, [
  8785. vue.createElementVNode("image", {
  8786. class: "phone-icon-small",
  8787. src: _imports_14
  8788. }),
  8789. vue.createElementVNode("text", null, "拨打")
  8790. ])
  8791. ])
  8792. ])
  8793. ])
  8794. ])) : vue.createCommentVNode("v-if", true),
  8795. vue.createElementVNode(
  8796. "view",
  8797. {
  8798. class: vue.normalizeClass(["logout-popup-mask", { "show": _ctx.showLogoutPopup }]),
  8799. onClick: _cache[18] || (_cache[18] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args)),
  8800. onTouchmove: _cache[19] || (_cache[19] = vue.withModifiers(() => {
  8801. }, ["stop", "prevent"]))
  8802. },
  8803. [
  8804. vue.createElementVNode("view", {
  8805. class: "popup-modal",
  8806. onClick: _cache[17] || (_cache[17] = vue.withModifiers(() => {
  8807. }, ["stop"]))
  8808. }, [
  8809. vue.createElementVNode("text", { class: "popup-title" }, "退出登录"),
  8810. vue.createElementVNode("text", { class: "popup-desc" }, "确定要退出当前账号吗?\\n退出后需要重新登录才能使用完整功能。"),
  8811. vue.createElementVNode("view", { class: "popup-actions" }, [
  8812. vue.createElementVNode("view", {
  8813. class: "popup-btn cancel",
  8814. onClick: _cache[15] || (_cache[15] = (...args) => _ctx.cancelLogout && _ctx.cancelLogout(...args))
  8815. }, "取消"),
  8816. vue.createElementVNode("view", {
  8817. class: "popup-btn confirm",
  8818. onClick: _cache[16] || (_cache[16] = (...args) => _ctx.confirmLogout && _ctx.confirmLogout(...args))
  8819. }, "确定")
  8820. ])
  8821. ])
  8822. ],
  8823. 34
  8824. /* CLASS, NEED_HYDRATION */
  8825. )
  8826. ]),
  8827. vue.createVNode(_component_custom_tabbar, { currentPath: "pages/mine/index" })
  8828. ],
  8829. 64
  8830. /* STABLE_FRAGMENT */
  8831. );
  8832. }
  8833. const PagesMineIndex = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/index.vue"]]);
  8834. const _sfc_main$k = {
  8835. data() {
  8836. return {};
  8837. },
  8838. methods: {
  8839. navBack() {
  8840. uni.navigateBack({
  8841. delta: 1
  8842. });
  8843. },
  8844. navTo(type) {
  8845. let url = "";
  8846. switch (type) {
  8847. case "profile":
  8848. url = "/pages/mine/settings/profile/index";
  8849. break;
  8850. case "auth":
  8851. url = "/pages/mine/settings/auth/index";
  8852. break;
  8853. case "bank":
  8854. url = "/pages/mine/settings/bank/index";
  8855. break;
  8856. case "security":
  8857. url = "/pages/mine/settings/security/index";
  8858. break;
  8859. case "push":
  8860. url = "/pages/mine/settings/notification/index";
  8861. break;
  8862. case "about":
  8863. url = "/pages/mine/settings/about/index";
  8864. break;
  8865. default:
  8866. formatAppLog("log", "at pages/mine/settings/index.vue:104", "Navigate to:", type);
  8867. return;
  8868. }
  8869. uni.navigateTo({ url });
  8870. },
  8871. clearCache() {
  8872. uni.showToast({ title: "缓存已清理", icon: "none" });
  8873. }
  8874. }
  8875. };
  8876. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  8877. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  8878. vue.createElementVNode("view", { class: "custom-header" }, [
  8879. vue.createElementVNode("view", {
  8880. class: "header-left",
  8881. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  8882. }, [
  8883. vue.createElementVNode("image", {
  8884. class: "back-icon",
  8885. src: _imports_0,
  8886. style: { "transform": "rotate(180deg)" }
  8887. })
  8888. ]),
  8889. vue.createElementVNode("text", { class: "header-title" }, "设置"),
  8890. vue.createElementVNode("view", { class: "header-right" })
  8891. ]),
  8892. vue.createElementVNode("view", { class: "header-placeholder" }),
  8893. vue.createElementVNode("view", { class: "group-card" }, [
  8894. vue.createElementVNode("view", {
  8895. class: "list-item",
  8896. onClick: _cache[1] || (_cache[1] = ($event) => $options.navTo("profile"))
  8897. }, [
  8898. vue.createElementVNode("text", { class: "item-title" }, "个人资料"),
  8899. vue.createElementVNode("image", {
  8900. class: "arrow-icon",
  8901. src: _imports_3
  8902. })
  8903. ]),
  8904. vue.createElementVNode("view", {
  8905. class: "list-item",
  8906. onClick: _cache[2] || (_cache[2] = ($event) => $options.navTo("auth"))
  8907. }, [
  8908. vue.createElementVNode("text", { class: "item-title" }, "认证信息"),
  8909. vue.createElementVNode("image", {
  8910. class: "arrow-icon",
  8911. src: _imports_3
  8912. })
  8913. ]),
  8914. vue.createElementVNode("view", {
  8915. class: "list-item",
  8916. onClick: _cache[3] || (_cache[3] = ($event) => $options.navTo("bank"))
  8917. }, [
  8918. vue.createElementVNode("text", { class: "item-title" }, "银行卡信息"),
  8919. vue.createElementVNode("view", { class: "item-right" }, [
  8920. vue.createElementVNode("view", { class: "tag-status" }, "已完善"),
  8921. vue.createElementVNode("image", {
  8922. class: "arrow-icon",
  8923. src: _imports_3
  8924. })
  8925. ])
  8926. ]),
  8927. vue.createElementVNode("view", {
  8928. class: "list-item no-border",
  8929. onClick: _cache[4] || (_cache[4] = ($event) => $options.navTo("security"))
  8930. }, [
  8931. vue.createElementVNode("text", { class: "item-title" }, "账号与安全"),
  8932. vue.createElementVNode("image", {
  8933. class: "arrow-icon",
  8934. src: _imports_3
  8935. })
  8936. ])
  8937. ]),
  8938. vue.createElementVNode("view", { class: "group-card" }, [
  8939. vue.createElementVNode("view", {
  8940. class: "list-item",
  8941. onClick: _cache[5] || (_cache[5] = ($event) => $options.navTo("push"))
  8942. }, [
  8943. vue.createElementVNode("text", { class: "item-title" }, "推送通知"),
  8944. vue.createElementVNode("view", { class: "item-right" }, [
  8945. vue.createElementVNode("text", { class: "item-value" }, "部分开启"),
  8946. vue.createElementVNode("image", {
  8947. class: "arrow-icon",
  8948. src: _imports_3
  8949. })
  8950. ])
  8951. ]),
  8952. vue.createElementVNode("view", { class: "list-item" }, [
  8953. vue.createElementVNode("view", { class: "item-row-left" }, [
  8954. vue.createElementVNode("text", { class: "item-title" }, "位置上报"),
  8955. vue.createElementVNode("text", { class: "item-subtitle" }, "每隔20分钟自动上报位置")
  8956. ]),
  8957. vue.createElementVNode("switch", {
  8958. checked: "",
  8959. color: "#FF5722",
  8960. style: { "transform": "scale(0.8)" }
  8961. })
  8962. ]),
  8963. vue.createElementVNode("view", {
  8964. class: "list-item",
  8965. onClick: _cache[6] || (_cache[6] = (...args) => $options.clearCache && $options.clearCache(...args))
  8966. }, [
  8967. vue.createElementVNode("text", { class: "item-title" }, "清理缓存"),
  8968. vue.createElementVNode("view", { class: "item-right" }, [
  8969. vue.createElementVNode("text", { class: "item-value" }, "105.14MB"),
  8970. vue.createElementVNode("image", {
  8971. class: "arrow-icon",
  8972. src: _imports_3
  8973. })
  8974. ])
  8975. ]),
  8976. vue.createElementVNode("view", {
  8977. class: "list-item no-border",
  8978. onClick: _cache[7] || (_cache[7] = ($event) => $options.navTo("about"))
  8979. }, [
  8980. vue.createElementVNode("text", { class: "item-title" }, "关于我们"),
  8981. vue.createElementVNode("view", { class: "item-right" }, [
  8982. vue.createElementVNode("text", { class: "item-value" }, "v2.0.6"),
  8983. vue.createElementVNode("image", {
  8984. class: "arrow-icon",
  8985. src: _imports_3
  8986. })
  8987. ])
  8988. ])
  8989. ])
  8990. ]);
  8991. }
  8992. 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"]]);
  8993. function getAreaStationList() {
  8994. return request({
  8995. url: "/system/areaStation/list",
  8996. method: "GET"
  8997. });
  8998. }
  8999. const _sfc_main$j = {
  9000. data() {
  9001. return {
  9002. userInfo: {
  9003. name: "",
  9004. workType: "",
  9005. workStatus: "",
  9006. city: "",
  9007. avatar: "/static/touxiang.png",
  9008. stationName: "",
  9009. stationFullName: ""
  9010. },
  9011. isStatusPickerShow: false,
  9012. isCityPickerShow: false,
  9013. // 城市站点级联选择器
  9014. selectStep: 0,
  9015. selectedPathway: [],
  9016. currentCityList: [],
  9017. selectedCityId: null,
  9018. fullTree: []
  9019. // 树形结构数据
  9020. };
  9021. },
  9022. onLoad() {
  9023. this.loadUserInfo();
  9024. uni.$on("updateName", (newName) => {
  9025. this.userInfo.name = newName;
  9026. });
  9027. },
  9028. onUnload() {
  9029. uni.$off("updateName");
  9030. },
  9031. methods: {
  9032. // 加载用户信息 @author steelwei
  9033. async loadUserInfo() {
  9034. uni.showLoading({ title: "加载中..." });
  9035. try {
  9036. const res = await getMyProfile();
  9037. if (res.code === 200) {
  9038. const data = res.data;
  9039. this.userInfo = {
  9040. name: data.realName || data.name,
  9041. workType: data.workType === "full_time" ? "全职" : "兼职",
  9042. workStatus: this.formatStatus(data.status),
  9043. city: data.cityName || "",
  9044. avatar: data.avatarUrl || "/static/touxiang.png",
  9045. stationName: data.stationName || "",
  9046. stationFullName: data.cityName && data.stationName ? `${data.cityName}/${data.stationName}` : data.stationName || "未分配站点"
  9047. };
  9048. } else {
  9049. uni.showToast({ title: res.msg || "加载失败", icon: "none" });
  9050. }
  9051. } catch (error) {
  9052. formatAppLog("error", "at pages/mine/settings/profile/index.vue:171", "加载用户信息失败:", error);
  9053. uni.showToast({ title: "网络错误", icon: "none" });
  9054. } finally {
  9055. uni.hideLoading();
  9056. }
  9057. },
  9058. // 格式化状态 @author steelwei
  9059. formatStatus(status) {
  9060. const statusMap = {
  9061. "busy": "接单中",
  9062. "resting": "休息中",
  9063. "disabled": "已禁用"
  9064. };
  9065. return statusMap[status] || status;
  9066. },
  9067. navBack() {
  9068. uni.navigateBack({ delta: 1 });
  9069. },
  9070. // 修改头像 @author steelwei
  9071. changeAvatar() {
  9072. uni.chooseImage({
  9073. count: 1,
  9074. success: async (res) => {
  9075. const tempFilePath = res.tempFilePaths[0];
  9076. uni.showLoading({ title: "上传中..." });
  9077. try {
  9078. const uploadRes = await uploadFile(tempFilePath);
  9079. if (uploadRes.code === 200) {
  9080. const { url, ossId } = uploadRes.data;
  9081. const result = await updateAvatar(ossId);
  9082. if (result.code === 200) {
  9083. this.userInfo.avatar = url;
  9084. uni.showToast({ title: "修改成功", icon: "success" });
  9085. } else {
  9086. uni.showToast({ title: result.msg || "修改失败", icon: "none" });
  9087. }
  9088. }
  9089. } catch (error) {
  9090. formatAppLog("error", "at pages/mine/settings/profile/index.vue:216", "修改头像失败:", error);
  9091. uni.showToast({ title: "上传失败", icon: "none" });
  9092. } finally {
  9093. uni.hideLoading();
  9094. }
  9095. }
  9096. });
  9097. },
  9098. editName() {
  9099. uni.navigateTo({
  9100. url: `/pages/mine/settings/profile/edit-name?name=${this.userInfo.name}`
  9101. });
  9102. },
  9103. showStatusPicker() {
  9104. this.isStatusPickerShow = true;
  9105. },
  9106. closeStatusPicker() {
  9107. this.isStatusPickerShow = false;
  9108. },
  9109. // 选择状态 @author steelwei
  9110. async selectStatus(statusText) {
  9111. const statusMap = {
  9112. "接单中": "busy",
  9113. "休息中": "resting"
  9114. };
  9115. const status = statusMap[statusText];
  9116. try {
  9117. const res = await updateStatus(status);
  9118. if (res.code === 200) {
  9119. this.userInfo.workStatus = statusText;
  9120. uni.showToast({ title: "状态已更新", icon: "success" });
  9121. } else {
  9122. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9123. }
  9124. } catch (error) {
  9125. formatAppLog("error", "at pages/mine/settings/profile/index.vue:256", "修改状态失败:", error);
  9126. uni.showToast({ title: "网络错误", icon: "none" });
  9127. } finally {
  9128. this.closeStatusPicker();
  9129. }
  9130. },
  9131. // 城市和站点级联选择器 @author steelwei
  9132. async showCityPicker() {
  9133. this.isCityPickerShow = true;
  9134. if (this.fullTree.length === 0) {
  9135. await this.loadAreaStationTree();
  9136. }
  9137. if (this.selectedPathway.length === 0) {
  9138. this.resetCityPicker();
  9139. }
  9140. },
  9141. async loadAreaStationTree() {
  9142. try {
  9143. uni.showLoading({ title: "加载中..." });
  9144. const res = await getAreaStationList();
  9145. const list = res.data || [];
  9146. let map = {};
  9147. let roots = [];
  9148. list.forEach((node) => {
  9149. map[node.id] = { ...node, children: [] };
  9150. });
  9151. list.forEach((node) => {
  9152. if (node.parentId === 0 || !map[node.parentId]) {
  9153. roots.push(map[node.id]);
  9154. } else {
  9155. map[node.parentId].children.push(map[node.id]);
  9156. }
  9157. });
  9158. this.fullTree = roots;
  9159. } catch (err) {
  9160. formatAppLog("error", "at pages/mine/settings/profile/index.vue:293", "加载站点数据失败:", err);
  9161. this.fullTree = [];
  9162. } finally {
  9163. uni.hideLoading();
  9164. }
  9165. },
  9166. resetCityPicker() {
  9167. this.selectStep = 0;
  9168. this.selectedPathway = [];
  9169. this.currentCityList = this.fullTree;
  9170. },
  9171. closeCityPicker() {
  9172. this.isCityPickerShow = false;
  9173. },
  9174. selectCityItem(item) {
  9175. this.selectedPathway[this.selectStep] = item;
  9176. if (item.children && item.children.length > 0) {
  9177. this.selectStep++;
  9178. this.selectedPathway = this.selectedPathway.slice(0, this.selectStep);
  9179. this.currentCityList = item.children;
  9180. } else {
  9181. this.selectedCityId = item.id;
  9182. this.confirmCity();
  9183. }
  9184. },
  9185. jumpToStep(step) {
  9186. this.selectStep = step;
  9187. if (step === 0) {
  9188. this.currentCityList = this.fullTree;
  9189. } else {
  9190. const parent = this.selectedPathway[step - 1];
  9191. this.currentCityList = parent ? parent.children : [];
  9192. }
  9193. },
  9194. // 确认城市与站点选择 @author steelwei
  9195. async confirmCity() {
  9196. if (this.selectedPathway.length === 0) {
  9197. uni.showToast({ title: "请选择站点", icon: "none" });
  9198. return;
  9199. }
  9200. let stationNode = this.selectedPathway[this.selectedPathway.length - 1];
  9201. const fullName = this.selectedPathway.map((i) => i.name).join("/");
  9202. const reqData = {
  9203. stationId: stationNode.id
  9204. };
  9205. try {
  9206. const res = await updateCity(reqData);
  9207. if (res.code === 200) {
  9208. this.userInfo.stationFullName = fullName;
  9209. uni.showToast({ title: "修改成功", icon: "success" });
  9210. this.closeCityPicker();
  9211. this.selectedPathway = [];
  9212. } else {
  9213. uni.showToast({ title: res.msg || "修改失败", icon: "none" });
  9214. }
  9215. } catch (error) {
  9216. formatAppLog("error", "at pages/mine/settings/profile/index.vue:358", "修改失败:", error);
  9217. uni.showToast({ title: "网络错误", icon: "none" });
  9218. }
  9219. }
  9220. }
  9221. };
  9222. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  9223. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9224. vue.createElementVNode("view", { class: "custom-header" }, [
  9225. vue.createElementVNode("view", {
  9226. class: "header-left",
  9227. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9228. }, [
  9229. vue.createElementVNode("image", {
  9230. class: "back-icon",
  9231. src: _imports_0,
  9232. style: { "transform": "rotate(180deg)" }
  9233. })
  9234. ]),
  9235. vue.createElementVNode("text", { class: "header-title" }, "个人资料"),
  9236. vue.createElementVNode("view", { class: "header-right" })
  9237. ]),
  9238. vue.createElementVNode("view", { class: "header-placeholder" }),
  9239. vue.createElementVNode("view", { class: "group-card" }, [
  9240. vue.createElementVNode("view", {
  9241. class: "list-item",
  9242. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeAvatar && $options.changeAvatar(...args))
  9243. }, [
  9244. vue.createElementVNode("text", { class: "item-title" }, "头像"),
  9245. vue.createElementVNode("view", { class: "item-right" }, [
  9246. vue.createElementVNode("image", {
  9247. class: "user-avatar",
  9248. src: $data.userInfo.avatar,
  9249. mode: "aspectFill"
  9250. }, null, 8, ["src"]),
  9251. vue.createElementVNode("image", {
  9252. class: "arrow-icon",
  9253. src: _imports_3
  9254. })
  9255. ])
  9256. ]),
  9257. vue.createElementVNode("view", {
  9258. class: "list-item",
  9259. onClick: _cache[2] || (_cache[2] = (...args) => $options.editName && $options.editName(...args))
  9260. }, [
  9261. vue.createElementVNode("text", { class: "item-title" }, "真实姓名"),
  9262. vue.createElementVNode("view", { class: "item-right" }, [
  9263. vue.createElementVNode(
  9264. "text",
  9265. { class: "item-value" },
  9266. vue.toDisplayString($data.userInfo.name),
  9267. 1
  9268. /* TEXT */
  9269. ),
  9270. vue.createElementVNode("image", {
  9271. class: "arrow-icon",
  9272. src: _imports_3
  9273. })
  9274. ])
  9275. ])
  9276. ]),
  9277. vue.createElementVNode("view", { class: "group-card" }, [
  9278. vue.createElementVNode("view", {
  9279. class: "list-item",
  9280. onClick: _cache[3] || (_cache[3] = (...args) => $options.showStatusPicker && $options.showStatusPicker(...args))
  9281. }, [
  9282. vue.createElementVNode("text", { class: "item-title" }, "工作状态"),
  9283. vue.createElementVNode("view", { class: "item-right" }, [
  9284. vue.createElementVNode(
  9285. "text",
  9286. { class: "item-value-black" },
  9287. vue.toDisplayString($data.userInfo.workStatus),
  9288. 1
  9289. /* TEXT */
  9290. ),
  9291. vue.createElementVNode("image", {
  9292. class: "arrow-icon",
  9293. src: _imports_3
  9294. })
  9295. ])
  9296. ])
  9297. ]),
  9298. vue.createElementVNode("view", { class: "group-card" }, [
  9299. vue.createElementVNode("view", {
  9300. class: "list-item no-border",
  9301. onClick: _cache[4] || (_cache[4] = (...args) => $options.showCityPicker && $options.showCityPicker(...args))
  9302. }, [
  9303. vue.createElementVNode("text", { class: "item-title" }, "所属站点"),
  9304. vue.createElementVNode("view", { class: "item-right" }, [
  9305. vue.createElementVNode(
  9306. "text",
  9307. { class: "item-value" },
  9308. vue.toDisplayString($data.userInfo.stationFullName || "未分配站点"),
  9309. 1
  9310. /* TEXT */
  9311. ),
  9312. vue.createElementVNode("image", {
  9313. class: "arrow-icon",
  9314. src: _imports_3
  9315. })
  9316. ])
  9317. ])
  9318. ]),
  9319. $data.isStatusPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9320. key: 0,
  9321. class: "popup-mask",
  9322. onClick: _cache[9] || (_cache[9] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9323. }, [
  9324. vue.createElementVNode("view", {
  9325. class: "popup-content",
  9326. onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
  9327. }, ["stop"]))
  9328. }, [
  9329. vue.createElementVNode("view", { class: "popup-title" }, "选择工作状态"),
  9330. vue.createElementVNode("view", {
  9331. class: "popup-item",
  9332. onClick: _cache[5] || (_cache[5] = ($event) => $options.selectStatus("接单中"))
  9333. }, "接单中"),
  9334. vue.createElementVNode("view", {
  9335. class: "popup-item",
  9336. onClick: _cache[6] || (_cache[6] = ($event) => $options.selectStatus("休息中"))
  9337. }, "休息中"),
  9338. vue.createElementVNode("view", {
  9339. class: "popup-cancel",
  9340. onClick: _cache[7] || (_cache[7] = (...args) => $options.closeStatusPicker && $options.closeStatusPicker(...args))
  9341. }, "取消")
  9342. ])
  9343. ])) : vue.createCommentVNode("v-if", true),
  9344. $data.isCityPickerShow ? (vue.openBlock(), vue.createElementBlock("view", {
  9345. key: 1,
  9346. class: "popup-mask",
  9347. onClick: _cache[13] || (_cache[13] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9348. }, [
  9349. vue.createElementVNode("view", {
  9350. class: "popup-content",
  9351. onClick: _cache[12] || (_cache[12] = vue.withModifiers(() => {
  9352. }, ["stop"]))
  9353. }, [
  9354. vue.createElementVNode("view", { class: "popup-header-row" }, [
  9355. vue.createElementVNode("text", {
  9356. class: "popup-btn-cancel",
  9357. onClick: _cache[10] || (_cache[10] = (...args) => $options.closeCityPicker && $options.closeCityPicker(...args))
  9358. }, "取消"),
  9359. vue.createElementVNode("text", { class: "popup-title-text" }, "请选择工作城市和站点"),
  9360. vue.createElementVNode("text", {
  9361. class: "popup-btn-confirm",
  9362. onClick: _cache[11] || (_cache[11] = (...args) => $options.confirmCity && $options.confirmCity(...args))
  9363. }, "确定")
  9364. ]),
  9365. vue.createElementVNode("view", { class: "picker-body" }, [
  9366. vue.createElementVNode("view", { class: "timeline-area" }, [
  9367. (vue.openBlock(true), vue.createElementBlock(
  9368. vue.Fragment,
  9369. null,
  9370. vue.renderList($data.selectedPathway, (item, index) => {
  9371. return vue.openBlock(), vue.createElementBlock("view", {
  9372. class: "timeline-item",
  9373. key: index,
  9374. onClick: ($event) => $options.jumpToStep(index)
  9375. }, [
  9376. vue.createElementVNode("view", { class: "timeline-dot" }),
  9377. vue.createElementVNode(
  9378. "text",
  9379. null,
  9380. vue.toDisplayString(item.name),
  9381. 1
  9382. /* TEXT */
  9383. )
  9384. ], 8, ["onClick"]);
  9385. }),
  9386. 128
  9387. /* KEYED_FRAGMENT */
  9388. )),
  9389. $data.selectStep === $data.selectedPathway.length ? (vue.openBlock(), vue.createElementBlock("view", {
  9390. key: 0,
  9391. class: "timeline-item active"
  9392. }, [
  9393. vue.createElementVNode("view", { class: "timeline-dot" }),
  9394. vue.createElementVNode("text", null, "请选择")
  9395. ])) : vue.createCommentVNode("v-if", true)
  9396. ]),
  9397. vue.createElementVNode("scroll-view", {
  9398. "scroll-y": "",
  9399. class: "list-area"
  9400. }, [
  9401. (vue.openBlock(true), vue.createElementBlock(
  9402. vue.Fragment,
  9403. null,
  9404. vue.renderList($data.currentCityList, (item) => {
  9405. return vue.openBlock(), vue.createElementBlock("view", {
  9406. class: "list-item",
  9407. key: item.id,
  9408. onClick: ($event) => $options.selectCityItem(item)
  9409. }, vue.toDisplayString(item.name), 9, ["onClick"]);
  9410. }),
  9411. 128
  9412. /* KEYED_FRAGMENT */
  9413. )),
  9414. $data.currentCityList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  9415. key: 0,
  9416. style: { "padding": "20rpx", "color": "#999" }
  9417. }, " 无数据 ")) : vue.createCommentVNode("v-if", true)
  9418. ])
  9419. ])
  9420. ])
  9421. ])) : vue.createCommentVNode("v-if", true)
  9422. ]);
  9423. }
  9424. 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"]]);
  9425. const _sfc_main$i = {
  9426. data() {
  9427. return {
  9428. authInfo: {
  9429. realName: "",
  9430. idCard: "",
  9431. idCardFront: "",
  9432. idCardBack: "",
  9433. serviceTypes: [],
  9434. authId: false,
  9435. authQual: false,
  9436. pendingAudit: false,
  9437. qualImages: []
  9438. }
  9439. };
  9440. },
  9441. onLoad() {
  9442. this.loadAuthInfo();
  9443. },
  9444. methods: {
  9445. navBack() {
  9446. uni.navigateBack({
  9447. delta: 1
  9448. });
  9449. },
  9450. async loadAuthInfo() {
  9451. try {
  9452. const res = await getAuthInfo();
  9453. if (res.code === 200 && res.data) {
  9454. this.authInfo = {
  9455. realName: res.data.realName || "",
  9456. idCard: res.data.idCard || "",
  9457. idCardFront: res.data.idCardFrontUrl || "",
  9458. idCardBack: res.data.idCardBackUrl || "",
  9459. serviceTypes: res.data.serviceTypeList || [],
  9460. authId: res.data.authId || false,
  9461. authQual: res.data.authQual || false,
  9462. pendingAudit: res.data.pendingAudit || false,
  9463. qualImages: res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : []
  9464. };
  9465. }
  9466. } catch (e) {
  9467. formatAppLog("error", "at pages/mine/settings/auth/index.vue:133", "加载认证信息失败", e);
  9468. uni.showToast({ title: "加载失败", icon: "none" });
  9469. }
  9470. },
  9471. maskIdCard(idCard) {
  9472. if (!idCard || idCard.length < 8)
  9473. return idCard;
  9474. return idCard.substring(0, 4) + "**********" + idCard.substring(idCard.length - 4);
  9475. },
  9476. editAuth() {
  9477. uni.showModal({
  9478. title: "提示",
  9479. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9480. success: (res) => {
  9481. if (res.confirm) {
  9482. uni.navigateTo({
  9483. url: "/pages/mine/settings/auth/edit"
  9484. });
  9485. }
  9486. }
  9487. });
  9488. }
  9489. }
  9490. };
  9491. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  9492. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  9493. vue.createElementVNode("view", { class: "custom-header" }, [
  9494. vue.createElementVNode("view", {
  9495. class: "header-left",
  9496. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9497. }, [
  9498. vue.createElementVNode("image", {
  9499. class: "back-icon",
  9500. src: _imports_0,
  9501. style: { "transform": "rotate(180deg)" }
  9502. })
  9503. ]),
  9504. vue.createElementVNode("text", { class: "header-title" }, "认证信息"),
  9505. vue.createElementVNode("view", { class: "header-right" })
  9506. ]),
  9507. vue.createElementVNode("view", { class: "header-placeholder" }),
  9508. vue.createElementVNode("view", { class: "card" }, [
  9509. vue.createElementVNode("view", { class: "section-header" }, [
  9510. vue.createElementVNode("view", { class: "orange-bar" }),
  9511. vue.createElementVNode("text", { class: "section-title" }, "身份认证"),
  9512. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("view", {
  9513. key: 0,
  9514. class: "tag-orange"
  9515. }, "认证中")) : $data.authInfo.authId ? (vue.openBlock(), vue.createElementBlock("view", {
  9516. key: 1,
  9517. class: "tag-green"
  9518. }, "已认证")) : (vue.openBlock(), vue.createElementBlock("view", {
  9519. key: 2,
  9520. class: "tag-gray"
  9521. }, "未认证"))
  9522. ]),
  9523. vue.createElementVNode("view", { class: "info-row" }, [
  9524. vue.createElementVNode("text", { class: "label" }, "真实姓名"),
  9525. vue.createElementVNode(
  9526. "text",
  9527. { class: "value" },
  9528. vue.toDisplayString($data.authInfo.realName || "未设置"),
  9529. 1
  9530. /* TEXT */
  9531. )
  9532. ]),
  9533. vue.createElementVNode("view", { class: "info-row" }, [
  9534. vue.createElementVNode("text", { class: "label" }, "证件号码"),
  9535. vue.createElementVNode(
  9536. "text",
  9537. { class: "value" },
  9538. vue.toDisplayString($options.maskIdCard($data.authInfo.idCard) || "未设置"),
  9539. 1
  9540. /* TEXT */
  9541. )
  9542. ]),
  9543. vue.createElementVNode("view", { class: "id-card-row" }, [
  9544. $data.authInfo.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9545. key: 0,
  9546. class: "id-card-box green-bg"
  9547. }, [
  9548. vue.createElementVNode("image", {
  9549. class: "id-card-img",
  9550. src: $data.authInfo.idCardFront,
  9551. mode: "aspectFill"
  9552. }, null, 8, ["src"]),
  9553. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9554. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9555. key: 1,
  9556. class: "id-card-box green-bg"
  9557. }, [
  9558. vue.createElementVNode("text", { class: "id-text" }, "ID Front"),
  9559. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9560. ])),
  9561. $data.authInfo.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9562. key: 2,
  9563. class: "id-card-box green-bg"
  9564. }, [
  9565. vue.createElementVNode("image", {
  9566. class: "id-card-img",
  9567. src: $data.authInfo.idCardBack,
  9568. mode: "aspectFill"
  9569. }, null, 8, ["src"]),
  9570. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9571. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  9572. key: 3,
  9573. class: "id-card-box green-bg"
  9574. }, [
  9575. vue.createElementVNode("text", { class: "id-text" }, "ID Back"),
  9576. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9577. ]))
  9578. ])
  9579. ]),
  9580. vue.createElementVNode("view", { class: "card" }, [
  9581. vue.createElementVNode("view", { class: "section-header" }, [
  9582. vue.createElementVNode("view", { class: "orange-bar" }),
  9583. vue.createElementVNode("text", { class: "section-title" }, "服务类型")
  9584. ]),
  9585. vue.createElementVNode("view", { class: "tags-row" }, [
  9586. (vue.openBlock(true), vue.createElementBlock(
  9587. vue.Fragment,
  9588. null,
  9589. vue.renderList($data.authInfo.serviceTypes, (type, index) => {
  9590. return vue.openBlock(), vue.createElementBlock(
  9591. "view",
  9592. {
  9593. class: "service-tag",
  9594. key: index
  9595. },
  9596. vue.toDisplayString(type),
  9597. 1
  9598. /* TEXT */
  9599. );
  9600. }),
  9601. 128
  9602. /* KEYED_FRAGMENT */
  9603. )),
  9604. $data.authInfo.serviceTypes.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9605. key: 0,
  9606. class: "empty-text"
  9607. }, "暂无服务类型")) : vue.createCommentVNode("v-if", true)
  9608. ])
  9609. ]),
  9610. vue.createElementVNode("view", { class: "card" }, [
  9611. vue.createElementVNode("view", { class: "section-header" }, [
  9612. vue.createElementVNode("view", { class: "orange-bar" }),
  9613. vue.createElementVNode("text", { class: "section-title" }, "资质证书")
  9614. ]),
  9615. vue.createElementVNode(
  9616. "text",
  9617. { class: "sub-title" },
  9618. vue.toDisplayString($data.authInfo.authQual ? "已认证" : "未认证"),
  9619. 1
  9620. /* TEXT */
  9621. ),
  9622. vue.createElementVNode("view", { class: "cert-row" }, [
  9623. (vue.openBlock(true), vue.createElementBlock(
  9624. vue.Fragment,
  9625. null,
  9626. vue.renderList($data.authInfo.qualImages, (img, index) => {
  9627. return vue.openBlock(), vue.createElementBlock("view", {
  9628. class: "cert-box yellow-bg",
  9629. key: index
  9630. }, [
  9631. vue.createElementVNode("image", {
  9632. class: "cert-img",
  9633. src: img,
  9634. mode: "aspectFill"
  9635. }, null, 8, ["src"])
  9636. ]);
  9637. }),
  9638. 128
  9639. /* KEYED_FRAGMENT */
  9640. )),
  9641. $data.authInfo.qualImages.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  9642. key: 0,
  9643. class: "empty-text"
  9644. }, "暂无资质证书")) : vue.createCommentVNode("v-if", true)
  9645. ])
  9646. ]),
  9647. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  9648. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("button", {
  9649. key: 0,
  9650. class: "action-btn disabled",
  9651. disabled: ""
  9652. }, "认证审核中...")) : (vue.openBlock(), vue.createElementBlock("button", {
  9653. key: 1,
  9654. class: "action-btn",
  9655. onClick: _cache[1] || (_cache[1] = (...args) => $options.editAuth && $options.editAuth(...args))
  9656. }, "修改认证信息")),
  9657. $data.authInfo.pendingAudit ? (vue.openBlock(), vue.createElementBlock("text", {
  9658. key: 2,
  9659. class: "tips"
  9660. }, "认证信息正在审核中,请耐心等待")) : (vue.openBlock(), vue.createElementBlock("text", {
  9661. key: 3,
  9662. class: "tips"
  9663. }, "修改认证信息需要重新审核,审核期间无法接单"))
  9664. ])
  9665. ]);
  9666. }
  9667. 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"]]);
  9668. const _sfc_main$h = {
  9669. data() {
  9670. return {
  9671. idCardFront: "",
  9672. idCardBack: "",
  9673. idCardFrontOssId: "",
  9674. idCardBackOssId: "",
  9675. serviceOptions: [],
  9676. selectedServices: [],
  9677. qualifications: {},
  9678. qualOssIds: {}
  9679. };
  9680. },
  9681. async onLoad() {
  9682. await this.loadServiceOptions();
  9683. this.loadAuthInfo();
  9684. },
  9685. methods: {
  9686. async loadServiceOptions() {
  9687. try {
  9688. const res = await getServiceTypes();
  9689. this.serviceOptions = (res.data || []).map((item) => ({
  9690. id: String(item.id),
  9691. name: item.name
  9692. }));
  9693. } catch (e) {
  9694. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:134", "加载服务类型失败", e);
  9695. }
  9696. },
  9697. async loadAuthInfo() {
  9698. try {
  9699. uni.showLoading({ title: "加载中..." });
  9700. const res = await getAuthInfo();
  9701. if (res.code === 200 && res.data) {
  9702. this.idCardFront = res.data.idCardFrontUrl || "";
  9703. this.idCardBack = res.data.idCardBackUrl || "";
  9704. this.idCardFrontOssId = res.data.idCardFront || "";
  9705. this.idCardBackOssId = res.data.idCardBack || "";
  9706. let serviceIds = [];
  9707. if (res.data.serviceTypes) {
  9708. serviceIds = [...new Set(
  9709. String(res.data.serviceTypes).replace(/[\[\]"']/g, "").split(",").map((s) => s.trim()).filter((id) => id && id !== "0" && id !== "null" && id !== "undefined")
  9710. )];
  9711. }
  9712. this.selectedServices = serviceIds;
  9713. const qualUrlList = res.data.qualImageUrls ? res.data.qualImageUrls.split(",").filter(Boolean) : [];
  9714. const qualOssIdList = res.data.qualImages ? res.data.qualImages.replace(/[\[\]"]/g, "").split(",").map((s) => s.trim()).filter(Boolean) : [];
  9715. const validNames = serviceIds.map((sid) => this.getServiceName(sid)).filter(Boolean);
  9716. validNames.forEach((name, idx) => {
  9717. const start = Math.floor(idx * qualUrlList.length / validNames.length);
  9718. const end = Math.floor((idx + 1) * qualUrlList.length / validNames.length);
  9719. this.$set(this.qualifications, name, qualUrlList.slice(start, end));
  9720. this.$set(this.qualOssIds, name, qualOssIdList.slice(start, end));
  9721. });
  9722. }
  9723. uni.hideLoading();
  9724. } catch (e) {
  9725. uni.hideLoading();
  9726. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:176", "加载认证信息失败", e);
  9727. uni.showToast({ title: "加载失败", icon: "none" });
  9728. }
  9729. },
  9730. navBack() {
  9731. uni.navigateBack({ delta: 1 });
  9732. },
  9733. chooseImage(side) {
  9734. uni.chooseImage({
  9735. count: 1,
  9736. sizeType: ["compressed"],
  9737. sourceType: ["album", "camera"],
  9738. success: async (res) => {
  9739. const tempPath = res.tempFilePaths[0];
  9740. if (side === "front") {
  9741. this.idCardFront = tempPath;
  9742. } else {
  9743. this.idCardBack = tempPath;
  9744. }
  9745. try {
  9746. uni.showLoading({ title: "上传中..." });
  9747. const uploadRes = await uploadFile(tempPath);
  9748. if (side === "front") {
  9749. this.idCardFrontOssId = uploadRes.data.ossId;
  9750. } else {
  9751. this.idCardBackOssId = uploadRes.data.ossId;
  9752. }
  9753. uni.hideLoading();
  9754. uni.showToast({ title: "上传成功", icon: "success" });
  9755. } catch (err) {
  9756. uni.hideLoading();
  9757. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:208", "上传身份证图片失败:", err);
  9758. uni.showToast({ title: "上传失败", icon: "none" });
  9759. }
  9760. }
  9761. });
  9762. },
  9763. deleteImage(side) {
  9764. if (side === "front") {
  9765. this.idCardFront = "";
  9766. this.idCardFrontOssId = "";
  9767. } else {
  9768. this.idCardBack = "";
  9769. this.idCardBackOssId = "";
  9770. }
  9771. },
  9772. getServiceName(serviceId) {
  9773. const found = this.serviceOptions.find((s) => String(s.id) === String(serviceId));
  9774. return found ? found.name : "";
  9775. },
  9776. toggleService(service) {
  9777. const index = this.selectedServices.indexOf(service.id);
  9778. if (index > -1) {
  9779. this.selectedServices.splice(index, 1);
  9780. this.$delete(this.qualifications, service.name);
  9781. this.$delete(this.qualOssIds, service.name);
  9782. } else {
  9783. this.selectedServices.push(service.id);
  9784. this.$set(this.qualifications, service.name, []);
  9785. this.$set(this.qualOssIds, service.name, []);
  9786. }
  9787. this.$forceUpdate();
  9788. },
  9789. chooseQualImage(service) {
  9790. uni.chooseImage({
  9791. count: 9,
  9792. sizeType: ["compressed"],
  9793. sourceType: ["album", "camera"],
  9794. success: async (res) => {
  9795. if (!this.qualifications[service]) {
  9796. this.qualifications[service] = [];
  9797. this.qualOssIds[service] = [];
  9798. }
  9799. for (const tempPath of res.tempFilePaths) {
  9800. this.qualifications[service].push(tempPath);
  9801. this.$forceUpdate();
  9802. try {
  9803. uni.showLoading({ title: "上传中..." });
  9804. const uploadRes = await uploadFile(tempPath);
  9805. this.qualOssIds[service].push(uploadRes.data.ossId);
  9806. uni.hideLoading();
  9807. } catch (err) {
  9808. uni.hideLoading();
  9809. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:262", "上传资质图片失败:", err);
  9810. }
  9811. }
  9812. }
  9813. });
  9814. },
  9815. deleteQualImage(service, index) {
  9816. this.qualifications[service].splice(index, 1);
  9817. if (this.qualOssIds[service]) {
  9818. this.qualOssIds[service].splice(index, 1);
  9819. }
  9820. this.$forceUpdate();
  9821. },
  9822. previewImage(service, index) {
  9823. uni.previewImage({
  9824. urls: this.qualifications[service],
  9825. current: index
  9826. });
  9827. },
  9828. async submitAuth() {
  9829. if (!this.idCardFront || !this.idCardBack) {
  9830. uni.showToast({ title: "请上传身份证正反面", icon: "none" });
  9831. return;
  9832. }
  9833. if (this.selectedServices.length === 0) {
  9834. uni.showToast({ title: "请选择服务类型", icon: "none" });
  9835. return;
  9836. }
  9837. for (const serviceId of this.selectedServices) {
  9838. const name = this.getServiceName(serviceId);
  9839. if (!this.qualifications[name] || this.qualifications[name].length === 0) {
  9840. uni.showToast({ title: `请上传${name}资质`, icon: "none" });
  9841. return;
  9842. }
  9843. }
  9844. uni.showModal({
  9845. title: "提示",
  9846. content: "修改认证信息需要重新审核,审核期间无法接单,确定要继续吗?",
  9847. success: (res) => {
  9848. if (res.confirm) {
  9849. this.doSubmit();
  9850. }
  9851. }
  9852. });
  9853. },
  9854. async doSubmit() {
  9855. const allQualOssIds = [];
  9856. Object.values(this.qualOssIds).forEach((ids) => {
  9857. allQualOssIds.push(...ids);
  9858. });
  9859. const submitData = {
  9860. idCardFront: this.idCardFrontOssId,
  9861. idCardBack: this.idCardBackOssId,
  9862. serviceTypes: this.selectedServices.join(","),
  9863. // 逗号分隔的服务类型ID
  9864. qualifications: allQualOssIds.join(",")
  9865. // 逗号分隔的资质图片OSS ID
  9866. };
  9867. try {
  9868. uni.showLoading({ title: "提交中..." });
  9869. await updateAuthInfo(submitData);
  9870. uni.hideLoading();
  9871. uni.showToast({ title: "提交成功,等待审核", icon: "success", duration: 1500 });
  9872. setTimeout(() => {
  9873. uni.navigateBack({ delta: 1 });
  9874. }, 1500);
  9875. } catch (err) {
  9876. uni.hideLoading();
  9877. formatAppLog("error", "at pages/mine/settings/auth/edit.vue:333", "提交失败:", err);
  9878. uni.showToast({ title: "提交失败", icon: "none" });
  9879. }
  9880. }
  9881. }
  9882. };
  9883. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  9884. return vue.openBlock(), vue.createElementBlock("view", { class: "edit-auth-container" }, [
  9885. vue.createElementVNode("view", { class: "custom-header" }, [
  9886. vue.createElementVNode("view", {
  9887. class: "header-left",
  9888. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  9889. }, [
  9890. vue.createElementVNode("image", {
  9891. class: "back-icon",
  9892. src: _imports_0,
  9893. style: { "transform": "rotate(180deg)" }
  9894. })
  9895. ]),
  9896. vue.createElementVNode("text", { class: "header-title" }, "修改认证信息"),
  9897. vue.createElementVNode("view", { class: "header-right" })
  9898. ]),
  9899. vue.createElementVNode("view", { class: "header-placeholder" }),
  9900. vue.createElementVNode("view", { class: "warning-tip" }, [
  9901. vue.createElementVNode("text", { class: "warning-icon" }, "⚠"),
  9902. vue.createElementVNode("text", { class: "warning-text" }, "若修改认证信息,将在审核通过后生效")
  9903. ]),
  9904. vue.createElementVNode("view", { class: "section-card" }, [
  9905. vue.createElementVNode("view", { class: "section-title" }, "身份认证"),
  9906. vue.createElementVNode("text", { class: "section-subtitle" }, "点击图片修改"),
  9907. vue.createElementVNode("view", { class: "id-card-row" }, [
  9908. vue.createElementVNode("view", {
  9909. class: "id-card-upload",
  9910. onClick: _cache[2] || (_cache[2] = ($event) => $options.chooseImage("front"))
  9911. }, [
  9912. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("image", {
  9913. key: 0,
  9914. src: $data.idCardFront,
  9915. class: "id-card-img",
  9916. mode: "aspectFill"
  9917. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9918. key: 1,
  9919. class: "id-card-placeholder"
  9920. }, [
  9921. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Front")
  9922. ])),
  9923. $data.idCardFront ? (vue.openBlock(), vue.createElementBlock("view", {
  9924. key: 2,
  9925. class: "delete-btn",
  9926. onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $options.deleteImage("front"), ["stop"]))
  9927. }, "×")) : vue.createCommentVNode("v-if", true),
  9928. vue.createElementVNode("view", { class: "corner-tag" }, "人像面")
  9929. ]),
  9930. vue.createElementVNode("view", {
  9931. class: "id-card-upload",
  9932. onClick: _cache[4] || (_cache[4] = ($event) => $options.chooseImage("back"))
  9933. }, [
  9934. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("image", {
  9935. key: 0,
  9936. src: $data.idCardBack,
  9937. class: "id-card-img",
  9938. mode: "aspectFill"
  9939. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  9940. key: 1,
  9941. class: "id-card-placeholder"
  9942. }, [
  9943. vue.createElementVNode("text", { class: "placeholder-text" }, "ID Back")
  9944. ])),
  9945. $data.idCardBack ? (vue.openBlock(), vue.createElementBlock("view", {
  9946. key: 2,
  9947. class: "delete-btn",
  9948. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.deleteImage("back"), ["stop"]))
  9949. }, "×")) : vue.createCommentVNode("v-if", true),
  9950. vue.createElementVNode("view", { class: "corner-tag" }, "国徽面")
  9951. ])
  9952. ])
  9953. ]),
  9954. vue.createElementVNode("view", { class: "section-card" }, [
  9955. vue.createElementVNode("view", { class: "section-title" }, "服务类型"),
  9956. vue.createElementVNode("text", { class: "section-subtitle" }, "可多选"),
  9957. vue.createElementVNode("view", { class: "service-list" }, [
  9958. (vue.openBlock(true), vue.createElementBlock(
  9959. vue.Fragment,
  9960. null,
  9961. vue.renderList($data.serviceOptions, (service, index) => {
  9962. return vue.openBlock(), vue.createElementBlock("view", {
  9963. class: "service-item",
  9964. key: service.id,
  9965. onClick: ($event) => $options.toggleService(service)
  9966. }, [
  9967. vue.createElementVNode(
  9968. "text",
  9969. { class: "service-name" },
  9970. vue.toDisplayString(service.name),
  9971. 1
  9972. /* TEXT */
  9973. ),
  9974. vue.createElementVNode(
  9975. "view",
  9976. {
  9977. class: vue.normalizeClass(["check-icon", { active: $data.selectedServices.map(String).includes(String(service.id)) }])
  9978. },
  9979. [
  9980. $data.selectedServices.map(String).includes(String(service.id)) ? (vue.openBlock(), vue.createElementBlock("text", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
  9981. ],
  9982. 2
  9983. /* CLASS */
  9984. )
  9985. ], 8, ["onClick"]);
  9986. }),
  9987. 128
  9988. /* KEYED_FRAGMENT */
  9989. ))
  9990. ])
  9991. ]),
  9992. vue.createElementVNode("view", { class: "section-card" }, [
  9993. vue.createElementVNode("view", { class: "section-title" }, "资质证书"),
  9994. vue.createElementVNode("text", { class: "section-subtitle" }, "请上传对应服务的资质"),
  9995. (vue.openBlock(true), vue.createElementBlock(
  9996. vue.Fragment,
  9997. null,
  9998. vue.renderList($data.selectedServices, (serviceId, index) => {
  9999. return vue.openBlock(), vue.createElementBlock("view", {
  10000. key: serviceId,
  10001. class: "qual-section"
  10002. }, [
  10003. vue.createElementVNode(
  10004. "text",
  10005. { class: "qual-title" },
  10006. vue.toDisplayString($options.getServiceName(serviceId)) + "资质",
  10007. 1
  10008. /* TEXT */
  10009. ),
  10010. vue.createElementVNode("view", { class: "qual-upload-row" }, [
  10011. (vue.openBlock(true), vue.createElementBlock(
  10012. vue.Fragment,
  10013. null,
  10014. vue.renderList($data.qualifications[$options.getServiceName(serviceId)], (img, imgIndex) => {
  10015. return vue.openBlock(), vue.createElementBlock("view", {
  10016. class: "qual-item",
  10017. key: imgIndex,
  10018. onClick: ($event) => $options.previewImage($options.getServiceName(serviceId), imgIndex)
  10019. }, [
  10020. vue.createElementVNode("image", {
  10021. src: img,
  10022. class: "qual-img",
  10023. mode: "aspectFill"
  10024. }, null, 8, ["src"]),
  10025. vue.createElementVNode("view", {
  10026. class: "delete-btn",
  10027. onClick: vue.withModifiers(($event) => $options.deleteQualImage($options.getServiceName(serviceId), imgIndex), ["stop"])
  10028. }, "×", 8, ["onClick"])
  10029. ], 8, ["onClick"]);
  10030. }),
  10031. 128
  10032. /* KEYED_FRAGMENT */
  10033. )),
  10034. vue.createElementVNode("view", {
  10035. class: "qual-upload-btn",
  10036. onClick: ($event) => $options.chooseQualImage($options.getServiceName(serviceId))
  10037. }, [
  10038. vue.createElementVNode("text", { class: "plus-icon" }, "+")
  10039. ], 8, ["onClick"])
  10040. ])
  10041. ]);
  10042. }),
  10043. 128
  10044. /* KEYED_FRAGMENT */
  10045. )),
  10046. $data.selectedServices.length === 0 ? (vue.openBlock(), vue.createElementBlock("text", {
  10047. key: 0,
  10048. class: "empty-hint"
  10049. }, "请先选择服务类型")) : vue.createCommentVNode("v-if", true)
  10050. ]),
  10051. vue.createElementVNode("view", { class: "bottom-btn-area" }, [
  10052. vue.createElementVNode("button", {
  10053. class: "submit-btn",
  10054. onClick: _cache[5] || (_cache[5] = (...args) => $options.submitAuth && $options.submitAuth(...args))
  10055. }, "提交审核")
  10056. ])
  10057. ]);
  10058. }
  10059. 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"]]);
  10060. const _imports_1$3 = "/static/icons/shield.svg";
  10061. const _sfc_main$g = {
  10062. data() {
  10063. return {
  10064. hasShieldIcon: false
  10065. // 如果没有盾牌图标资源,暂时隐藏或用文字代替
  10066. };
  10067. },
  10068. methods: {
  10069. navBack() {
  10070. uni.navigateBack({
  10071. delta: 1
  10072. });
  10073. },
  10074. editBank() {
  10075. uni.showToast({ title: "跳转修改银行卡页", icon: "none" });
  10076. }
  10077. }
  10078. };
  10079. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  10080. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10081. vue.createElementVNode("view", { class: "custom-header" }, [
  10082. vue.createElementVNode("view", {
  10083. class: "header-left",
  10084. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10085. }, [
  10086. vue.createElementVNode("image", {
  10087. class: "back-icon",
  10088. src: _imports_0,
  10089. style: { "transform": "rotate(180deg)" }
  10090. })
  10091. ]),
  10092. vue.createElementVNode("text", { class: "header-title" }, "银行卡信息"),
  10093. vue.createElementVNode("view", { class: "header-right" })
  10094. ]),
  10095. vue.createElementVNode("view", { class: "header-placeholder" }),
  10096. vue.createElementVNode("view", { class: "bank-card" }, [
  10097. vue.createElementVNode("view", { class: "card-top" }, [
  10098. vue.createElementVNode("view", { class: "bank-info" }, [
  10099. vue.createElementVNode("view", { class: "bank-icon-circle" }, [
  10100. vue.createElementVNode("text", { class: "bank-icon-text" }, "招")
  10101. ]),
  10102. vue.createElementVNode("text", { class: "bank-name" }, "招商银行")
  10103. ]),
  10104. vue.createElementVNode("view", { class: "card-type" }, "储蓄卡")
  10105. ]),
  10106. vue.createElementVNode("view", { class: "card-number" }, "622588******1234"),
  10107. vue.createElementVNode("view", { class: "card-bg-circle" })
  10108. ]),
  10109. vue.createElementVNode("button", {
  10110. class: "action-btn",
  10111. onClick: _cache[1] || (_cache[1] = (...args) => $options.editBank && $options.editBank(...args))
  10112. }, "修改银行卡信息"),
  10113. vue.createElementVNode("view", { class: "security-tip" }, [
  10114. $data.hasShieldIcon ? (vue.openBlock(), vue.createElementBlock("image", {
  10115. key: 0,
  10116. class: "shield-icon",
  10117. src: _imports_1$3
  10118. })) : vue.createCommentVNode("v-if", true),
  10119. vue.createElementVNode("text", null, "信息已加密,仅用于收入发放")
  10120. ])
  10121. ]);
  10122. }
  10123. 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"]]);
  10124. const _sfc_main$f = {
  10125. data() {
  10126. return {
  10127. phone: "",
  10128. hasPassword: false
  10129. };
  10130. },
  10131. onLoad() {
  10132. this.loadProfile();
  10133. },
  10134. methods: {
  10135. navBack() {
  10136. uni.navigateBack({
  10137. delta: 1
  10138. });
  10139. },
  10140. async loadProfile() {
  10141. try {
  10142. const res = await getMyProfile();
  10143. if (res.code === 200 && res.data) {
  10144. this.phone = res.data.phone || "";
  10145. this.hasPassword = !!res.data.hasPassword;
  10146. }
  10147. } catch (e) {
  10148. formatAppLog("error", "at pages/mine/settings/security/index.vue:68", "加载个人信息失败", e);
  10149. }
  10150. },
  10151. maskPhone(phone) {
  10152. if (!phone || phone.length < 11)
  10153. return phone;
  10154. return phone.substring(0, 3) + "****" + phone.substring(7);
  10155. },
  10156. changeMobile() {
  10157. uni.navigateTo({
  10158. url: "/pages/mine/settings/security/change-phone"
  10159. });
  10160. },
  10161. changePassword() {
  10162. uni.navigateTo({
  10163. url: "/pages/mine/settings/security/change-password"
  10164. });
  10165. },
  10166. async deleteAccount() {
  10167. uni.showModal({
  10168. title: "警示",
  10169. content: "注销账号后将无法恢复,确定要继续吗?",
  10170. success: async (res) => {
  10171. if (res.confirm) {
  10172. try {
  10173. const result = await deleteAccount();
  10174. if (result.code === 200) {
  10175. uni.showToast({ title: "账号已注销", icon: "success" });
  10176. setTimeout(() => {
  10177. uni.reLaunch({ url: "/pages/login/login" });
  10178. }, 1500);
  10179. } else {
  10180. uni.showToast({ title: result.msg || "注销失败", icon: "none" });
  10181. }
  10182. } catch (e) {
  10183. formatAppLog("error", "at pages/mine/settings/security/index.vue:102", "注销账号失败", e);
  10184. uni.showToast({ title: "注销失败", icon: "none" });
  10185. }
  10186. }
  10187. }
  10188. });
  10189. }
  10190. }
  10191. };
  10192. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  10193. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10194. vue.createElementVNode("view", { class: "custom-header" }, [
  10195. vue.createElementVNode("view", {
  10196. class: "header-left",
  10197. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10198. }, [
  10199. vue.createElementVNode("image", {
  10200. class: "back-icon",
  10201. src: _imports_0,
  10202. style: { "transform": "rotate(180deg)" }
  10203. })
  10204. ]),
  10205. vue.createElementVNode("text", { class: "header-title" }, "账号与安全"),
  10206. vue.createElementVNode("view", { class: "header-right" })
  10207. ]),
  10208. vue.createElementVNode("view", { class: "header-placeholder" }),
  10209. vue.createElementVNode("view", { class: "section-title-security" }, "安全设置"),
  10210. vue.createElementVNode("view", { class: "group-card" }, [
  10211. vue.createElementVNode("view", {
  10212. class: "list-item",
  10213. onClick: _cache[1] || (_cache[1] = (...args) => $options.changeMobile && $options.changeMobile(...args))
  10214. }, [
  10215. vue.createElementVNode("text", { class: "item-title" }, "手机号"),
  10216. vue.createElementVNode("view", { class: "item-right" }, [
  10217. vue.createElementVNode(
  10218. "text",
  10219. { class: "item-value" },
  10220. vue.toDisplayString($options.maskPhone($data.phone) || "未设置"),
  10221. 1
  10222. /* TEXT */
  10223. ),
  10224. vue.createElementVNode("image", {
  10225. class: "arrow-icon",
  10226. src: _imports_3
  10227. })
  10228. ])
  10229. ]),
  10230. vue.createElementVNode("view", {
  10231. class: "list-item",
  10232. onClick: _cache[2] || (_cache[2] = (...args) => $options.changePassword && $options.changePassword(...args))
  10233. }, [
  10234. vue.createElementVNode("text", { class: "item-title" }, "登录密码"),
  10235. vue.createElementVNode("view", { class: "item-right" }, [
  10236. vue.createElementVNode(
  10237. "text",
  10238. { class: "item-value" },
  10239. vue.toDisplayString($data.hasPassword ? "已设置" : "未设置"),
  10240. 1
  10241. /* TEXT */
  10242. ),
  10243. vue.createElementVNode("image", {
  10244. class: "arrow-icon",
  10245. src: _imports_3
  10246. })
  10247. ])
  10248. ])
  10249. ]),
  10250. vue.createElementVNode("view", { class: "section-title-security" }, "高级设置"),
  10251. vue.createElementVNode("view", { class: "group-card" }, [
  10252. vue.createElementVNode("view", {
  10253. class: "list-item no-border",
  10254. onClick: _cache[3] || (_cache[3] = (...args) => $options.deleteAccount && $options.deleteAccount(...args))
  10255. }, [
  10256. vue.createElementVNode("text", { class: "item-title" }, "注销账号"),
  10257. vue.createElementVNode("image", {
  10258. class: "arrow-icon",
  10259. src: _imports_3
  10260. })
  10261. ])
  10262. ])
  10263. ]);
  10264. }
  10265. 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"]]);
  10266. const _sfc_main$e = {
  10267. data() {
  10268. return {
  10269. name: ""
  10270. };
  10271. },
  10272. onLoad(options) {
  10273. if (options.name) {
  10274. this.name = decodeURIComponent(options.name);
  10275. }
  10276. },
  10277. methods: {
  10278. navBack() {
  10279. uni.navigateBack({ delta: 1 });
  10280. },
  10281. // 提交修改 @author steelwei
  10282. async submitChange() {
  10283. if (!this.name || !this.name.trim()) {
  10284. uni.showToast({ title: "请输入姓名", icon: "none" });
  10285. return;
  10286. }
  10287. if (this.name.trim().length < 2) {
  10288. uni.showToast({ title: "姓名至少2个字符", icon: "none" });
  10289. return;
  10290. }
  10291. uni.showLoading({ title: "提交中..." });
  10292. try {
  10293. const res = await updateName(this.name.trim());
  10294. if (res.code === 200) {
  10295. uni.showToast({
  10296. title: "修改成功",
  10297. icon: "success",
  10298. duration: 2e3
  10299. });
  10300. uni.$emit("updateName", this.name.trim());
  10301. setTimeout(() => {
  10302. uni.navigateBack({ delta: 1 });
  10303. }, 2e3);
  10304. } else {
  10305. uni.showToast({
  10306. title: res.msg || "修改失败",
  10307. icon: "none"
  10308. });
  10309. }
  10310. } catch (error) {
  10311. formatAppLog("error", "at pages/mine/settings/profile/edit-name.vue:94", "修改姓名失败:", error);
  10312. uni.showToast({ title: "网络错误", icon: "none" });
  10313. } finally {
  10314. uni.hideLoading();
  10315. }
  10316. }
  10317. }
  10318. };
  10319. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  10320. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10321. vue.createElementVNode("view", { class: "custom-header" }, [
  10322. vue.createElementVNode("view", {
  10323. class: "header-left",
  10324. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10325. }, [
  10326. vue.createElementVNode("image", {
  10327. class: "back-icon",
  10328. src: _imports_0,
  10329. style: { "transform": "rotate(180deg)" }
  10330. })
  10331. ]),
  10332. vue.createElementVNode("text", { class: "header-title" }, "修改姓名"),
  10333. vue.createElementVNode("view", { class: "header-right" })
  10334. ]),
  10335. vue.createElementVNode("view", { class: "header-placeholder" }),
  10336. vue.createElementVNode("view", { class: "form-card" }, [
  10337. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10338. vue.createElementVNode("text", { class: "form-label" }, "真实姓名"),
  10339. vue.withDirectives(vue.createElementVNode(
  10340. "input",
  10341. {
  10342. class: "form-input",
  10343. type: "text",
  10344. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.name = $event),
  10345. placeholder: "请输入真实姓名",
  10346. "placeholder-class": "placeholder",
  10347. maxlength: "20"
  10348. },
  10349. null,
  10350. 512
  10351. /* NEED_PATCH */
  10352. ), [
  10353. [vue.vModelText, $data.name]
  10354. ])
  10355. ])
  10356. ]),
  10357. vue.createElementVNode("view", { class: "btn-area" }, [
  10358. vue.createElementVNode("button", {
  10359. class: "submit-btn",
  10360. onClick: _cache[2] || (_cache[2] = (...args) => $options.submitChange && $options.submitChange(...args))
  10361. }, "确认修改")
  10362. ]),
  10363. vue.createElementVNode("view", { class: "tips" }, [
  10364. vue.createElementVNode("text", { class: "tips-text" }, "• 请输入您的真实姓名"),
  10365. vue.createElementVNode("text", { class: "tips-text" }, "• 姓名将用于实名认证和订单服务")
  10366. ])
  10367. ]);
  10368. }
  10369. 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"]]);
  10370. const _sfc_main$d = {
  10371. data() {
  10372. return {
  10373. oldPassword: "",
  10374. newPassword: "",
  10375. confirmPassword: ""
  10376. };
  10377. },
  10378. methods: {
  10379. navBack() {
  10380. uni.navigateBack({ delta: 1 });
  10381. },
  10382. // 提交修改 @author steelwei
  10383. async submitChange() {
  10384. if (!this.oldPassword) {
  10385. uni.showToast({ title: "请输入旧密码", icon: "none" });
  10386. return;
  10387. }
  10388. if (!this.newPassword) {
  10389. uni.showToast({ title: "请输入新密码", icon: "none" });
  10390. return;
  10391. }
  10392. if (this.newPassword.length < 6 || this.newPassword.length > 20) {
  10393. uni.showToast({ title: "密码长度为6-20位", icon: "none" });
  10394. return;
  10395. }
  10396. if (this.newPassword !== this.confirmPassword) {
  10397. uni.showToast({ title: "两次密码输入不一致", icon: "none" });
  10398. return;
  10399. }
  10400. uni.showLoading({ title: "提交中..." });
  10401. try {
  10402. const res = await updatePassword(this.oldPassword, this.newPassword);
  10403. if (res.code === 200) {
  10404. uni.showToast({
  10405. title: "修改成功",
  10406. icon: "success",
  10407. duration: 2e3
  10408. });
  10409. setTimeout(() => {
  10410. uni.navigateBack({ delta: 1 });
  10411. }, 2e3);
  10412. } else {
  10413. uni.showToast({
  10414. title: res.msg || "修改失败",
  10415. icon: "none"
  10416. });
  10417. }
  10418. } catch (error) {
  10419. formatAppLog("error", "at pages/mine/settings/security/change-password.vue:109", "修改密码失败:", error);
  10420. uni.showToast({ title: "网络错误", icon: "none" });
  10421. } finally {
  10422. uni.hideLoading();
  10423. }
  10424. }
  10425. }
  10426. };
  10427. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  10428. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10429. vue.createElementVNode("view", { class: "custom-header" }, [
  10430. vue.createElementVNode("view", {
  10431. class: "header-left",
  10432. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10433. }, [
  10434. vue.createElementVNode("image", {
  10435. class: "back-icon",
  10436. src: _imports_0,
  10437. style: { "transform": "rotate(180deg)" }
  10438. })
  10439. ]),
  10440. vue.createElementVNode("text", { class: "header-title" }, "修改密码"),
  10441. vue.createElementVNode("view", { class: "header-right" })
  10442. ]),
  10443. vue.createElementVNode("view", { class: "header-placeholder" }),
  10444. vue.createElementVNode("view", { class: "form-card" }, [
  10445. vue.createElementVNode("view", { class: "form-item" }, [
  10446. vue.createElementVNode("text", { class: "form-label" }, "旧密码"),
  10447. vue.withDirectives(vue.createElementVNode(
  10448. "input",
  10449. {
  10450. class: "form-input",
  10451. type: "password",
  10452. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.oldPassword = $event),
  10453. placeholder: "请输入旧密码",
  10454. "placeholder-class": "placeholder"
  10455. },
  10456. null,
  10457. 512
  10458. /* NEED_PATCH */
  10459. ), [
  10460. [vue.vModelText, $data.oldPassword]
  10461. ])
  10462. ]),
  10463. vue.createElementVNode("view", { class: "form-item" }, [
  10464. vue.createElementVNode("text", { class: "form-label" }, "新密码"),
  10465. vue.withDirectives(vue.createElementVNode(
  10466. "input",
  10467. {
  10468. class: "form-input",
  10469. type: "password",
  10470. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.newPassword = $event),
  10471. placeholder: "请输入新密码(6-20位)",
  10472. "placeholder-class": "placeholder"
  10473. },
  10474. null,
  10475. 512
  10476. /* NEED_PATCH */
  10477. ), [
  10478. [vue.vModelText, $data.newPassword]
  10479. ])
  10480. ]),
  10481. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10482. vue.createElementVNode("text", { class: "form-label" }, "确认密码"),
  10483. vue.withDirectives(vue.createElementVNode(
  10484. "input",
  10485. {
  10486. class: "form-input",
  10487. type: "password",
  10488. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.confirmPassword = $event),
  10489. placeholder: "请再次输入新密码",
  10490. "placeholder-class": "placeholder"
  10491. },
  10492. null,
  10493. 512
  10494. /* NEED_PATCH */
  10495. ), [
  10496. [vue.vModelText, $data.confirmPassword]
  10497. ])
  10498. ])
  10499. ]),
  10500. vue.createElementVNode("view", { class: "btn-area" }, [
  10501. vue.createElementVNode("button", {
  10502. class: "submit-btn",
  10503. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10504. }, "确认修改")
  10505. ])
  10506. ]);
  10507. }
  10508. 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"]]);
  10509. const _sfc_main$c = {
  10510. data() {
  10511. return {
  10512. phone: "",
  10513. code: "",
  10514. countdown: 0,
  10515. timer: null
  10516. };
  10517. },
  10518. onUnload() {
  10519. if (this.timer) {
  10520. clearInterval(this.timer);
  10521. }
  10522. },
  10523. methods: {
  10524. navBack() {
  10525. uni.navigateBack({ delta: 1 });
  10526. },
  10527. // 发送验证码 @author steelwei
  10528. sendCode() {
  10529. if (!this.phone) {
  10530. uni.showToast({ title: "请输入手机号", icon: "none" });
  10531. return;
  10532. }
  10533. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10534. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10535. return;
  10536. }
  10537. uni.showToast({ title: "验证码已发送", icon: "success" });
  10538. this.countdown = 60;
  10539. this.timer = setInterval(() => {
  10540. this.countdown--;
  10541. if (this.countdown <= 0) {
  10542. clearInterval(this.timer);
  10543. }
  10544. }, 1e3);
  10545. },
  10546. // 提交修改 @author steelwei
  10547. async submitChange() {
  10548. if (!this.phone) {
  10549. uni.showToast({ title: "请输入手机号", icon: "none" });
  10550. return;
  10551. }
  10552. if (!/^1[3-9]\d{9}$/.test(this.phone)) {
  10553. uni.showToast({ title: "手机号格式不正确", icon: "none" });
  10554. return;
  10555. }
  10556. if (!this.code) {
  10557. uni.showToast({ title: "请输入验证码", icon: "none" });
  10558. return;
  10559. }
  10560. uni.showLoading({ title: "提交中..." });
  10561. try {
  10562. const res = await updatePhone(this.phone, this.code);
  10563. if (res.code === 200) {
  10564. uni.showToast({
  10565. title: "修改成功",
  10566. icon: "success",
  10567. duration: 2e3
  10568. });
  10569. setTimeout(() => {
  10570. uni.navigateBack({ delta: 1 });
  10571. }, 2e3);
  10572. } else {
  10573. uni.showToast({
  10574. title: res.msg || "修改失败",
  10575. icon: "none"
  10576. });
  10577. }
  10578. } catch (error) {
  10579. formatAppLog("error", "at pages/mine/settings/security/change-phone.vue:139", "修改手机号失败:", error);
  10580. uni.showToast({ title: "网络错误", icon: "none" });
  10581. } finally {
  10582. uni.hideLoading();
  10583. }
  10584. }
  10585. }
  10586. };
  10587. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  10588. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10589. vue.createElementVNode("view", { class: "custom-header" }, [
  10590. vue.createElementVNode("view", {
  10591. class: "header-left",
  10592. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10593. }, [
  10594. vue.createElementVNode("image", {
  10595. class: "back-icon",
  10596. src: _imports_0,
  10597. style: { "transform": "rotate(180deg)" }
  10598. })
  10599. ]),
  10600. vue.createElementVNode("text", { class: "header-title" }, "修改手机号"),
  10601. vue.createElementVNode("view", { class: "header-right" })
  10602. ]),
  10603. vue.createElementVNode("view", { class: "header-placeholder" }),
  10604. vue.createElementVNode("view", { class: "form-card" }, [
  10605. vue.createElementVNode("view", { class: "form-item" }, [
  10606. vue.createElementVNode("text", { class: "form-label" }, "新手机号"),
  10607. vue.withDirectives(vue.createElementVNode(
  10608. "input",
  10609. {
  10610. class: "form-input",
  10611. type: "number",
  10612. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.phone = $event),
  10613. placeholder: "请输入新手机号",
  10614. "placeholder-class": "placeholder",
  10615. maxlength: "11"
  10616. },
  10617. null,
  10618. 512
  10619. /* NEED_PATCH */
  10620. ), [
  10621. [vue.vModelText, $data.phone]
  10622. ])
  10623. ]),
  10624. vue.createElementVNode("view", { class: "form-item no-border" }, [
  10625. vue.createElementVNode("text", { class: "form-label" }, "验证码"),
  10626. vue.withDirectives(vue.createElementVNode(
  10627. "input",
  10628. {
  10629. class: "form-input",
  10630. type: "number",
  10631. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.code = $event),
  10632. placeholder: "请输入验证码",
  10633. "placeholder-class": "placeholder",
  10634. maxlength: "6"
  10635. },
  10636. null,
  10637. 512
  10638. /* NEED_PATCH */
  10639. ), [
  10640. [vue.vModelText, $data.code]
  10641. ]),
  10642. vue.createElementVNode("button", {
  10643. class: "code-btn",
  10644. disabled: $data.countdown > 0,
  10645. onClick: _cache[3] || (_cache[3] = (...args) => $options.sendCode && $options.sendCode(...args))
  10646. }, vue.toDisplayString($data.countdown > 0 ? `${$data.countdown}s` : "获取验证码"), 9, ["disabled"])
  10647. ])
  10648. ]),
  10649. vue.createElementVNode("view", { class: "btn-area" }, [
  10650. vue.createElementVNode("button", {
  10651. class: "submit-btn",
  10652. onClick: _cache[4] || (_cache[4] = (...args) => $options.submitChange && $options.submitChange(...args))
  10653. }, "确认修改")
  10654. ]),
  10655. vue.createElementVNode("view", { class: "tips" }, [
  10656. vue.createElementVNode("text", { class: "tips-text" }, "• 修改手机号后,新手机号将作为登录账号"),
  10657. vue.createElementVNode("text", { class: "tips-text" }, "• 请确保新手机号可以正常接收短信")
  10658. ])
  10659. ]);
  10660. }
  10661. 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"]]);
  10662. const _sfc_main$b = {
  10663. data() {
  10664. return {};
  10665. },
  10666. methods: {
  10667. navBack() {
  10668. uni.navigateBack({
  10669. delta: 1
  10670. });
  10671. },
  10672. switchChange(type, e) {
  10673. formatAppLog("log", "at pages/mine/settings/notification/index.vue:41", "switch change", type, e.detail.value);
  10674. }
  10675. }
  10676. };
  10677. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  10678. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10679. vue.createElementVNode("view", { class: "custom-header" }, [
  10680. vue.createElementVNode("view", {
  10681. class: "header-left",
  10682. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10683. }, [
  10684. vue.createElementVNode("image", {
  10685. class: "back-icon",
  10686. src: _imports_0,
  10687. style: { "transform": "rotate(180deg)" }
  10688. })
  10689. ]),
  10690. vue.createElementVNode("text", { class: "header-title" }, "推送通知设置"),
  10691. vue.createElementVNode("view", { class: "header-right" })
  10692. ]),
  10693. vue.createElementVNode("view", { class: "header-placeholder" }),
  10694. vue.createElementVNode("view", { class: "group-card" }, [
  10695. vue.createElementVNode("view", { class: "list-item" }, [
  10696. vue.createElementVNode("text", { class: "item-title" }, "系统消息通知"),
  10697. vue.createElementVNode(
  10698. "switch",
  10699. {
  10700. checked: "",
  10701. color: "#FF5722",
  10702. style: { "transform": "scale(0.8)" },
  10703. onChange: _cache[1] || (_cache[1] = ($event) => $options.switchChange("system", $event))
  10704. },
  10705. null,
  10706. 32
  10707. /* NEED_HYDRATION */
  10708. )
  10709. ]),
  10710. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10711. vue.createElementVNode("text", { class: "item-title" }, "订单消息通知"),
  10712. vue.createElementVNode(
  10713. "switch",
  10714. {
  10715. checked: "",
  10716. color: "#FF5722",
  10717. style: { "transform": "scale(0.8)" },
  10718. onChange: _cache[2] || (_cache[2] = ($event) => $options.switchChange("order", $event))
  10719. },
  10720. null,
  10721. 32
  10722. /* NEED_HYDRATION */
  10723. )
  10724. ])
  10725. ]),
  10726. vue.createElementVNode("text", { class: "tips-text" }, "关闭通知后将收不到消息通知推送")
  10727. ]);
  10728. }
  10729. 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"]]);
  10730. const _sfc_main$a = {
  10731. data() {
  10732. return {};
  10733. },
  10734. methods: {
  10735. navBack() {
  10736. uni.navigateBack({
  10737. delta: 1
  10738. });
  10739. }
  10740. }
  10741. };
  10742. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  10743. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10744. vue.createElementVNode("view", { class: "custom-header" }, [
  10745. vue.createElementVNode("view", {
  10746. class: "header-left",
  10747. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10748. }, [
  10749. vue.createElementVNode("image", {
  10750. class: "back-icon",
  10751. src: _imports_0,
  10752. style: { "transform": "rotate(180deg)" }
  10753. })
  10754. ]),
  10755. vue.createElementVNode("text", { class: "header-title" }, "关于我们"),
  10756. vue.createElementVNode("view", { class: "header-right" })
  10757. ]),
  10758. vue.createElementVNode("view", { class: "header-placeholder" }),
  10759. vue.createElementVNode("view", { class: "logo-area" }, [
  10760. vue.createElementVNode("image", {
  10761. class: "app-logo",
  10762. src: _imports_1$8,
  10763. mode: "aspectFit"
  10764. }),
  10765. vue.createElementVNode("text", { class: "app-name" }, "履约者APP"),
  10766. vue.createElementVNode("text", { class: "app-version" }, "Version 2.0.6")
  10767. ]),
  10768. vue.createElementVNode("view", { class: "group-card" }, [
  10769. vue.createElementVNode("view", { class: "list-item" }, [
  10770. vue.createElementVNode("text", { class: "item-title" }, "服务协议"),
  10771. vue.createElementVNode("image", {
  10772. class: "arrow-icon",
  10773. src: _imports_3
  10774. })
  10775. ]),
  10776. vue.createElementVNode("view", { class: "list-item" }, [
  10777. vue.createElementVNode("text", { class: "item-title" }, "隐私政策"),
  10778. vue.createElementVNode("image", {
  10779. class: "arrow-icon",
  10780. src: _imports_3
  10781. })
  10782. ]),
  10783. vue.createElementVNode("view", { class: "list-item no-border" }, [
  10784. vue.createElementVNode("text", { class: "item-title" }, "版本更新"),
  10785. vue.createElementVNode("view", { class: "item-right" }, [
  10786. vue.createElementVNode("view", { class: "badge-yellow" }, "1"),
  10787. vue.createElementVNode("image", {
  10788. class: "arrow-icon",
  10789. src: _imports_3
  10790. })
  10791. ])
  10792. ])
  10793. ])
  10794. ]);
  10795. }
  10796. 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"]]);
  10797. const _imports_1$2 = "/static/icons/wallet_white.svg";
  10798. const _imports_2$2 = "/static/icons/arrow_right_gray.svg";
  10799. const bizTypeMap$3 = fulfillerEnum.FlfBalanceBizType;
  10800. const _sfc_main$9 = {
  10801. data() {
  10802. return {
  10803. balance: "0.00",
  10804. pendingBalance: "0.00",
  10805. currentTab: 0,
  10806. list: [],
  10807. pageNum: 1,
  10808. pageSize: 10,
  10809. total: 0,
  10810. loading: false
  10811. };
  10812. },
  10813. computed: {
  10814. displayList() {
  10815. if (this.currentTab === 0)
  10816. return this.list;
  10817. if (this.currentTab === 1)
  10818. return this.list.filter((item) => item.type === "income");
  10819. if (this.currentTab === 2)
  10820. return this.list.filter((item) => item.type === "expense");
  10821. return [];
  10822. }
  10823. },
  10824. onShow() {
  10825. this.fetchData();
  10826. this.fetchList(true);
  10827. },
  10828. onReachBottom() {
  10829. this.fetchList();
  10830. },
  10831. methods: {
  10832. async fetchData() {
  10833. try {
  10834. const res = await getBalanceOnApp();
  10835. if (res.code === 200 && res.data) {
  10836. this.balance = (res.data.balance / 100).toFixed(2);
  10837. this.pendingBalance = (res.data.pendingBalance / 100).toFixed(2);
  10838. }
  10839. } catch (error) {
  10840. formatAppLog("error", "at pages/mine/wallet/index.vue:135", "获取余额数据失败", error);
  10841. }
  10842. },
  10843. async fetchList(reset = false) {
  10844. if (reset) {
  10845. this.pageNum = 1;
  10846. this.list = [];
  10847. this.total = 0;
  10848. }
  10849. if (this.loading)
  10850. return;
  10851. if (!reset && this.list.length >= this.total && this.total !== 0)
  10852. return;
  10853. this.loading = true;
  10854. try {
  10855. const res = await pageBalanceOnApp({
  10856. pageNum: this.pageNum,
  10857. pageSize: this.pageSize
  10858. });
  10859. if (res.code === 200) {
  10860. this.total = res.total || 0;
  10861. const rows = res.rows || [];
  10862. const mappedRows = rows.map((item) => {
  10863. const isAdd = item.type === "add";
  10864. const uiType = isAdd ? "income" : "expense";
  10865. const title = bizTypeMap$3[item.bizType] || item.bizType || "其他";
  10866. let amountStr = (Math.abs(item.amount) / 100).toFixed(2);
  10867. if (!isAdd) {
  10868. amountStr = "-" + amountStr;
  10869. }
  10870. return {
  10871. ...item,
  10872. title,
  10873. desc: item.reason || "",
  10874. time: item.createTime || "",
  10875. amount: amountStr,
  10876. type: uiType,
  10877. // 'income' or 'expense' for template class
  10878. tag: title
  10879. };
  10880. });
  10881. this.list = this.list.concat(mappedRows);
  10882. this.pageNum++;
  10883. }
  10884. } catch (error) {
  10885. formatAppLog("error", "at pages/mine/wallet/index.vue:182", "获取列表数据失败", error);
  10886. } finally {
  10887. this.loading = false;
  10888. }
  10889. },
  10890. navBack() {
  10891. uni.navigateBack();
  10892. },
  10893. navToBill() {
  10894. uni.navigateTo({
  10895. url: "/pages/mine/wallet/bill"
  10896. });
  10897. },
  10898. switchTab(index) {
  10899. this.currentTab = index;
  10900. }
  10901. }
  10902. };
  10903. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  10904. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  10905. vue.createElementVNode("view", { class: "nav-bar" }, [
  10906. vue.createElementVNode("view", {
  10907. class: "nav-left",
  10908. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  10909. }, [
  10910. vue.createElementVNode("image", {
  10911. class: "back-icon",
  10912. src: _imports_0
  10913. })
  10914. ]),
  10915. vue.createElementVNode("text", { class: "nav-title" }, "我的钱包"),
  10916. vue.createElementVNode("view", { class: "nav-right" })
  10917. ]),
  10918. vue.createElementVNode("view", { class: "wallet-card" }, [
  10919. vue.createElementVNode("view", { class: "bg-circle big" }),
  10920. vue.createElementVNode("view", { class: "bg-circle small" }),
  10921. vue.createElementVNode("view", { class: "card-content" }, [
  10922. vue.createElementVNode("view", { class: "card-top" }, [
  10923. vue.createElementVNode("view", { class: "app-info" }, [
  10924. vue.createElementVNode("image", {
  10925. class: "app-logo",
  10926. src: _imports_1$2,
  10927. mode: "aspectFit"
  10928. }),
  10929. vue.createElementVNode("text", { class: "app-name" }, "履约者APP")
  10930. ]),
  10931. vue.createElementVNode("view", {
  10932. class: "bill-btn",
  10933. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToBill && $options.navToBill(...args))
  10934. }, [
  10935. vue.createElementVNode("text", null, "账单")
  10936. ])
  10937. ]),
  10938. vue.createElementVNode("view", { class: "balance-container" }, [
  10939. vue.createElementVNode("view", { class: "balance-main" }, [
  10940. vue.createElementVNode("text", { class: "balance-label" }, "账户余额 (元)"),
  10941. vue.createElementVNode(
  10942. "text",
  10943. { class: "balance-num" },
  10944. vue.toDisplayString($data.balance),
  10945. 1
  10946. /* TEXT */
  10947. )
  10948. ]),
  10949. vue.createElementVNode("view", { class: "balance-pending" }, [
  10950. vue.createElementVNode("text", { class: "pending-label" }, "待入账 (元)"),
  10951. vue.createElementVNode(
  10952. "text",
  10953. { class: "pending-num" },
  10954. vue.toDisplayString($data.pendingBalance),
  10955. 1
  10956. /* TEXT */
  10957. )
  10958. ])
  10959. ])
  10960. ])
  10961. ]),
  10962. vue.createElementVNode("view", { class: "record-container" }, [
  10963. vue.createElementVNode("view", { class: "record-header" }, [
  10964. vue.createElementVNode("text", { class: "header-title" }, "最近账户余额变动记录"),
  10965. vue.createElementVNode("view", {
  10966. class: "header-more",
  10967. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToBill && $options.navToBill(...args))
  10968. }, [
  10969. vue.createElementVNode("text", null, "查看全部"),
  10970. vue.createElementVNode("image", {
  10971. class: "more-icon",
  10972. src: _imports_2$2
  10973. })
  10974. ])
  10975. ]),
  10976. vue.createElementVNode("view", { class: "tabs-row" }, [
  10977. vue.createElementVNode(
  10978. "view",
  10979. {
  10980. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  10981. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(0))
  10982. },
  10983. [
  10984. vue.createElementVNode("text", null, "全部"),
  10985. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10986. key: 0,
  10987. class: "tab-line"
  10988. })) : vue.createCommentVNode("v-if", true)
  10989. ],
  10990. 2
  10991. /* CLASS */
  10992. ),
  10993. vue.createElementVNode(
  10994. "view",
  10995. {
  10996. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  10997. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(1))
  10998. },
  10999. [
  11000. vue.createElementVNode("text", null, "收入"),
  11001. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11002. key: 0,
  11003. class: "tab-line"
  11004. })) : vue.createCommentVNode("v-if", true)
  11005. ],
  11006. 2
  11007. /* CLASS */
  11008. ),
  11009. vue.createElementVNode(
  11010. "view",
  11011. {
  11012. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11013. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(2))
  11014. },
  11015. [
  11016. vue.createElementVNode("text", null, "支出"),
  11017. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11018. key: 0,
  11019. class: "tab-line"
  11020. })) : vue.createCommentVNode("v-if", true)
  11021. ],
  11022. 2
  11023. /* CLASS */
  11024. )
  11025. ]),
  11026. vue.createElementVNode("view", { class: "record-list" }, [
  11027. (vue.openBlock(true), vue.createElementBlock(
  11028. vue.Fragment,
  11029. null,
  11030. vue.renderList($options.displayList, (item, index) => {
  11031. return vue.openBlock(), vue.createElementBlock("view", {
  11032. class: "list-item",
  11033. key: index
  11034. }, [
  11035. vue.createElementVNode("view", { class: "item-left" }, [
  11036. vue.createElementVNode(
  11037. "text",
  11038. { class: "item-title" },
  11039. vue.toDisplayString(item.title),
  11040. 1
  11041. /* TEXT */
  11042. ),
  11043. vue.createElementVNode(
  11044. "text",
  11045. { class: "item-desc" },
  11046. vue.toDisplayString(item.desc),
  11047. 1
  11048. /* TEXT */
  11049. ),
  11050. vue.createElementVNode(
  11051. "text",
  11052. { class: "item-time" },
  11053. vue.toDisplayString(item.time),
  11054. 1
  11055. /* TEXT */
  11056. )
  11057. ]),
  11058. vue.createElementVNode("view", { class: "item-right" }, [
  11059. vue.createElementVNode(
  11060. "text",
  11061. {
  11062. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11063. },
  11064. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11065. 3
  11066. /* TEXT, CLASS */
  11067. ),
  11068. vue.createElementVNode("view", { class: "item-tag" }, [
  11069. vue.createElementVNode(
  11070. "text",
  11071. null,
  11072. vue.toDisplayString(item.tag),
  11073. 1
  11074. /* TEXT */
  11075. )
  11076. ])
  11077. ])
  11078. ]);
  11079. }),
  11080. 128
  11081. /* KEYED_FRAGMENT */
  11082. ))
  11083. ])
  11084. ])
  11085. ]);
  11086. }
  11087. 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"]]);
  11088. const bizTypeMap$2 = fulfillerEnum.FlfBalanceBizType;
  11089. const _sfc_main$8 = {
  11090. data() {
  11091. const d = /* @__PURE__ */ new Date();
  11092. return {
  11093. currentTab: 0,
  11094. year: d.getFullYear(),
  11095. month: d.getMonth() + 1,
  11096. groups: []
  11097. };
  11098. },
  11099. computed: {
  11100. currentDate() {
  11101. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  11102. },
  11103. displayGroups() {
  11104. if (this.currentTab === 0)
  11105. return this.groups;
  11106. return this.groups.map((group) => {
  11107. const filteredItems = group.items.filter((item) => {
  11108. const type = this.currentTab === 1 ? "income" : "expense";
  11109. return item.type === type;
  11110. });
  11111. return {
  11112. ...group,
  11113. items: filteredItems
  11114. };
  11115. }).filter((group) => group.items.length > 0);
  11116. }
  11117. },
  11118. onShow() {
  11119. this.fetchData();
  11120. },
  11121. methods: {
  11122. async fetchData() {
  11123. try {
  11124. const res = await listBalanceOnApp({
  11125. year: this.year,
  11126. month: this.month
  11127. });
  11128. if (res.code === 200) {
  11129. const list = res.data || [];
  11130. let incomeTotal = 0;
  11131. let expenseTotal = 0;
  11132. const items = list.map((item) => {
  11133. const isAdd = item.type === "add";
  11134. const uiType = isAdd ? "income" : "expense";
  11135. const title = bizTypeMap$2[item.bizType] || item.bizType || "其他";
  11136. let amountVal = Math.abs(item.amount) / 100;
  11137. if (isAdd) {
  11138. incomeTotal += amountVal;
  11139. } else {
  11140. expenseTotal += amountVal;
  11141. }
  11142. let amountStr = amountVal.toFixed(2);
  11143. if (!isAdd)
  11144. amountStr = "-" + amountStr;
  11145. let timeStr = item.createTime || "";
  11146. if (timeStr.length >= 16) {
  11147. timeStr = timeStr.substring(5, 16);
  11148. }
  11149. return {
  11150. ...item,
  11151. title,
  11152. desc: item.reason || "",
  11153. time: timeStr,
  11154. amount: amountStr,
  11155. type: uiType,
  11156. tag: title
  11157. };
  11158. });
  11159. this.groups = [
  11160. {
  11161. month: `${this.month}月 ${this.year}`,
  11162. income: incomeTotal.toFixed(2),
  11163. expense: expenseTotal.toFixed(2),
  11164. items
  11165. }
  11166. ];
  11167. }
  11168. } catch (error) {
  11169. formatAppLog("error", "at pages/mine/wallet/bill.vue:175", "获取账单记录失败", error);
  11170. }
  11171. },
  11172. onDateChange(e) {
  11173. const val = e.detail.value;
  11174. const [y, m] = val.split("-");
  11175. this.year = parseInt(y, 10);
  11176. this.month = parseInt(m, 10);
  11177. this.fetchData();
  11178. },
  11179. navBack() {
  11180. uni.navigateBack();
  11181. },
  11182. switchTab(index) {
  11183. this.currentTab = index;
  11184. }
  11185. }
  11186. };
  11187. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  11188. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11189. vue.createElementVNode("view", { class: "nav-bar" }, [
  11190. vue.createElementVNode("view", {
  11191. class: "nav-left",
  11192. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11193. }, [
  11194. vue.createElementVNode("image", {
  11195. class: "back-icon",
  11196. src: _imports_0
  11197. })
  11198. ]),
  11199. vue.createElementVNode("text", { class: "nav-title" }, "账单明细"),
  11200. vue.createElementVNode("view", { class: "nav-right" })
  11201. ]),
  11202. vue.createElementVNode("view", { class: "content-area" }, [
  11203. vue.createElementVNode("view", { class: "filter-area" }, [
  11204. vue.createElementVNode("view", { class: "tabs-row" }, [
  11205. vue.createElementVNode(
  11206. "view",
  11207. {
  11208. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  11209. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  11210. },
  11211. [
  11212. vue.createElementVNode("text", null, "全部"),
  11213. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11214. key: 0,
  11215. class: "tab-line"
  11216. })) : vue.createCommentVNode("v-if", true)
  11217. ],
  11218. 2
  11219. /* CLASS */
  11220. ),
  11221. vue.createElementVNode(
  11222. "view",
  11223. {
  11224. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  11225. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  11226. },
  11227. [
  11228. vue.createElementVNode("text", null, "收入"),
  11229. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11230. key: 0,
  11231. class: "tab-line"
  11232. })) : vue.createCommentVNode("v-if", true)
  11233. ],
  11234. 2
  11235. /* CLASS */
  11236. ),
  11237. vue.createElementVNode(
  11238. "view",
  11239. {
  11240. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  11241. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  11242. },
  11243. [
  11244. vue.createElementVNode("text", null, "支出"),
  11245. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11246. key: 0,
  11247. class: "tab-line"
  11248. })) : vue.createCommentVNode("v-if", true)
  11249. ],
  11250. 2
  11251. /* CLASS */
  11252. )
  11253. ]),
  11254. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  11255. vue.createElementVNode("picker", {
  11256. mode: "date",
  11257. fields: "month",
  11258. value: $options.currentDate,
  11259. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  11260. }, [
  11261. vue.createElementVNode("view", { class: "date-picker" }, [
  11262. vue.createElementVNode(
  11263. "text",
  11264. { class: "date-text" },
  11265. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  11266. 1
  11267. /* TEXT */
  11268. ),
  11269. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  11270. ])
  11271. ], 40, ["value"])
  11272. ])
  11273. ]),
  11274. vue.createElementVNode("scroll-view", {
  11275. "scroll-y": "",
  11276. class: "bill-list"
  11277. }, [
  11278. (vue.openBlock(true), vue.createElementBlock(
  11279. vue.Fragment,
  11280. null,
  11281. vue.renderList($options.displayGroups, (group, gIndex) => {
  11282. return vue.openBlock(), vue.createElementBlock("view", {
  11283. key: gIndex,
  11284. class: "month-group"
  11285. }, [
  11286. vue.createElementVNode("view", { class: "group-header" }, [
  11287. vue.createElementVNode(
  11288. "text",
  11289. { class: "month-title" },
  11290. vue.toDisplayString(group.month),
  11291. 1
  11292. /* TEXT */
  11293. ),
  11294. vue.createElementVNode(
  11295. "text",
  11296. { class: "month-summary" },
  11297. "收入 ¥" + vue.toDisplayString(group.income) + " 支出 ¥" + vue.toDisplayString(group.expense),
  11298. 1
  11299. /* TEXT */
  11300. )
  11301. ]),
  11302. (vue.openBlock(true), vue.createElementBlock(
  11303. vue.Fragment,
  11304. null,
  11305. vue.renderList(group.items, (item, index) => {
  11306. return vue.openBlock(), vue.createElementBlock("view", {
  11307. class: "list-item",
  11308. key: index
  11309. }, [
  11310. vue.createElementVNode(
  11311. "view",
  11312. {
  11313. class: vue.normalizeClass(["item-icon-box", item.type])
  11314. },
  11315. [
  11316. vue.createElementVNode(
  11317. "text",
  11318. { class: "item-icon-symbol" },
  11319. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  11320. 1
  11321. /* TEXT */
  11322. )
  11323. ],
  11324. 2
  11325. /* CLASS */
  11326. ),
  11327. vue.createElementVNode("view", { class: "item-center" }, [
  11328. vue.createElementVNode(
  11329. "text",
  11330. { class: "item-title" },
  11331. vue.toDisplayString(item.title),
  11332. 1
  11333. /* TEXT */
  11334. ),
  11335. vue.createElementVNode(
  11336. "text",
  11337. { class: "item-desc" },
  11338. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  11339. 1
  11340. /* TEXT */
  11341. )
  11342. ]),
  11343. vue.createElementVNode("view", { class: "item-right" }, [
  11344. vue.createElementVNode(
  11345. "text",
  11346. {
  11347. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  11348. },
  11349. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  11350. 3
  11351. /* TEXT, CLASS */
  11352. ),
  11353. vue.createElementVNode("view", { class: "item-tag" }, [
  11354. vue.createElementVNode(
  11355. "text",
  11356. null,
  11357. vue.toDisplayString(item.tag),
  11358. 1
  11359. /* TEXT */
  11360. )
  11361. ])
  11362. ])
  11363. ]);
  11364. }),
  11365. 128
  11366. /* KEYED_FRAGMENT */
  11367. ))
  11368. ]);
  11369. }),
  11370. 128
  11371. /* KEYED_FRAGMENT */
  11372. )),
  11373. vue.createElementVNode("view", { class: "list-padding-bottom" })
  11374. ])
  11375. ])
  11376. ]);
  11377. }
  11378. 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"]]);
  11379. const _sfc_main$7 = {
  11380. data() {
  11381. return {
  11382. currentIndex: 0,
  11383. profile: null,
  11384. levels: [],
  11385. // 从后端获取的等级配置
  11386. rightsList: [],
  11387. // 从后端获取的所有权益列表
  11388. isPopupShow: false,
  11389. currentBenefit: null,
  11390. pageLoading: true
  11391. };
  11392. },
  11393. computed: {
  11394. currentLevel() {
  11395. return this.processedLevels[this.currentIndex];
  11396. },
  11397. // 合并等级与对应的权益详细信息
  11398. processedLevels() {
  11399. if (!this.levels.length)
  11400. return [];
  11401. return this.levels.map((lvl) => {
  11402. const benefits = (lvl.rights || []).map((rightId) => {
  11403. return this.rightsList.find((r) => r.id === rightId);
  11404. }).filter(Boolean);
  11405. return {
  11406. ...lvl,
  11407. isCurrent: this.profile && this.profile.level === lvl.lvNo,
  11408. benefits
  11409. };
  11410. }).sort((a, b) => a.lvNo - b.lvNo);
  11411. }
  11412. },
  11413. async onLoad() {
  11414. await this.initData();
  11415. },
  11416. methods: {
  11417. async initData() {
  11418. this.pageLoading = true;
  11419. uni.showLoading({ title: "加载中..." });
  11420. try {
  11421. const [profileRes, levelsRes, rightsRes] = await Promise.all([
  11422. getMyProfile(),
  11423. listAllLevelConfigs(),
  11424. listAllLevelRights()
  11425. ]);
  11426. this.profile = profileRes.data;
  11427. this.levels = levelsRes.data || [];
  11428. this.rightsList = rightsRes.data || [];
  11429. if (this.profile) {
  11430. const idx = this.processedLevels.findIndex((lvl) => lvl.lvNo === this.profile.level);
  11431. if (idx !== -1) {
  11432. this.currentIndex = idx;
  11433. }
  11434. }
  11435. } catch (err) {
  11436. formatAppLog("error", "at pages/mine/level/index.vue:155", "初始化等级页面失败:", err);
  11437. uni.showToast({ title: "数据加载失败", icon: "none" });
  11438. } finally {
  11439. this.pageLoading = false;
  11440. uni.hideLoading();
  11441. }
  11442. },
  11443. navBack() {
  11444. uni.navigateBack();
  11445. },
  11446. swiperChange(e) {
  11447. this.currentIndex = e.detail.current;
  11448. },
  11449. changeLevel(index) {
  11450. this.currentIndex = index;
  11451. },
  11452. showBenefitDetail(benefit) {
  11453. this.currentBenefit = benefit;
  11454. this.isPopupShow = true;
  11455. },
  11456. closePopup() {
  11457. this.isPopupShow = false;
  11458. }
  11459. }
  11460. };
  11461. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  11462. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11463. vue.createElementVNode("view", { class: "custom-header" }, [
  11464. vue.createElementVNode("view", {
  11465. class: "header-left",
  11466. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11467. }, [
  11468. vue.createElementVNode("image", {
  11469. class: "back-icon",
  11470. src: _imports_0,
  11471. style: { "transform": "rotate(180deg)" }
  11472. })
  11473. ]),
  11474. vue.createElementVNode("text", { class: "header-title" }, "履约者等级权益"),
  11475. vue.createElementVNode("view", { class: "header-right" })
  11476. ]),
  11477. vue.createElementVNode("view", { class: "header-placeholder" }),
  11478. !$data.pageLoading ? (vue.openBlock(), vue.createElementBlock("view", {
  11479. key: 0,
  11480. class: "swiper-container"
  11481. }, [
  11482. vue.createElementVNode("swiper", {
  11483. class: "level-swiper",
  11484. "previous-margin": "80rpx",
  11485. "next-margin": "80rpx",
  11486. current: $data.currentIndex,
  11487. onChange: _cache[1] || (_cache[1] = (...args) => $options.swiperChange && $options.swiperChange(...args))
  11488. }, [
  11489. (vue.openBlock(true), vue.createElementBlock(
  11490. vue.Fragment,
  11491. null,
  11492. vue.renderList($options.processedLevels, (level, index) => {
  11493. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  11494. key: index,
  11495. onClick: ($event) => $options.changeLevel(index)
  11496. }, [
  11497. vue.createElementVNode(
  11498. "view",
  11499. {
  11500. class: "level-card",
  11501. style: vue.normalizeStyle({
  11502. transform: $data.currentIndex === index ? "scale(1)" : "scale(0.9)",
  11503. backgroundImage: "url(" + level.backgroundUrl + ")",
  11504. backgroundSize: "cover",
  11505. backgroundPosition: "center"
  11506. })
  11507. },
  11508. [
  11509. vue.createElementVNode("view", { class: "card-content" }, [
  11510. vue.createElementVNode("view", { class: "card-header" }, [
  11511. vue.createElementVNode(
  11512. "view",
  11513. { class: "level-badge" },
  11514. "L" + vue.toDisplayString(index + 1),
  11515. 1
  11516. /* TEXT */
  11517. ),
  11518. level.isCurrent ? (vue.openBlock(), vue.createElementBlock("view", {
  11519. key: 0,
  11520. class: "current-badge"
  11521. }, "当前等级")) : vue.createCommentVNode("v-if", true)
  11522. ]),
  11523. vue.createElementVNode(
  11524. "text",
  11525. { class: "level-name" },
  11526. vue.toDisplayString(level.name),
  11527. 1
  11528. /* TEXT */
  11529. ),
  11530. vue.createElementVNode(
  11531. "text",
  11532. { class: "level-score" },
  11533. "所需积分: " + vue.toDisplayString(level.upgradePoints || 0),
  11534. 1
  11535. /* TEXT */
  11536. ),
  11537. vue.createElementVNode("image", {
  11538. class: "crown-overlay",
  11539. src: _imports_1$4,
  11540. mode: "aspectFit"
  11541. })
  11542. ])
  11543. ],
  11544. 4
  11545. /* STYLE */
  11546. )
  11547. ], 8, ["onClick"]);
  11548. }),
  11549. 128
  11550. /* KEYED_FRAGMENT */
  11551. ))
  11552. ], 40, ["current"]),
  11553. vue.createElementVNode("view", { class: "swiper-dots" }, [
  11554. (vue.openBlock(true), vue.createElementBlock(
  11555. vue.Fragment,
  11556. null,
  11557. vue.renderList($options.processedLevels, (item, index) => {
  11558. return vue.openBlock(), vue.createElementBlock(
  11559. "view",
  11560. {
  11561. class: vue.normalizeClass(["dot", { active: $data.currentIndex === index }]),
  11562. key: index
  11563. },
  11564. null,
  11565. 2
  11566. /* CLASS */
  11567. );
  11568. }),
  11569. 128
  11570. /* KEYED_FRAGMENT */
  11571. ))
  11572. ])
  11573. ])) : vue.createCommentVNode("v-if", true),
  11574. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11575. key: 1,
  11576. class: "benefits-title-row"
  11577. }, [
  11578. vue.createElementVNode("text", { class: "benefits-title" }, "专属权益"),
  11579. vue.createElementVNode(
  11580. "text",
  11581. { class: "benefits-count" },
  11582. "(" + vue.toDisplayString($options.currentLevel.benefits ? $options.currentLevel.benefits.length : 0) + ")",
  11583. 1
  11584. /* TEXT */
  11585. )
  11586. ])) : vue.createCommentVNode("v-if", true),
  11587. !$data.pageLoading && $options.currentLevel ? (vue.openBlock(), vue.createElementBlock("view", {
  11588. key: 2,
  11589. class: "benefits-grid"
  11590. }, [
  11591. (vue.openBlock(true), vue.createElementBlock(
  11592. vue.Fragment,
  11593. null,
  11594. vue.renderList($options.currentLevel.benefits, (benefit, index) => {
  11595. return vue.openBlock(), vue.createElementBlock("view", {
  11596. class: "benefit-item",
  11597. key: index,
  11598. onClick: ($event) => $options.showBenefitDetail(benefit)
  11599. }, [
  11600. vue.createElementVNode("view", { class: "benefit-icon-wrapper" }, [
  11601. benefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11602. key: 0,
  11603. class: "benefit-icon",
  11604. src: benefit.iconUrl,
  11605. mode: "aspectFit"
  11606. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11607. "view",
  11608. {
  11609. key: 1,
  11610. class: "benefit-icon-placeholder"
  11611. },
  11612. vue.toDisplayString(benefit.name[0]),
  11613. 1
  11614. /* TEXT */
  11615. ))
  11616. ]),
  11617. vue.createElementVNode(
  11618. "text",
  11619. { class: "benefit-name" },
  11620. vue.toDisplayString(benefit.name),
  11621. 1
  11622. /* TEXT */
  11623. )
  11624. ], 8, ["onClick"]);
  11625. }),
  11626. 128
  11627. /* KEYED_FRAGMENT */
  11628. )),
  11629. !$options.currentLevel.benefits || $options.currentLevel.benefits.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11630. key: 0,
  11631. class: "empty-benefits"
  11632. }, [
  11633. vue.createElementVNode("text", null, "该等级暂无特殊权益")
  11634. ])) : vue.createCommentVNode("v-if", true)
  11635. ])) : vue.createCommentVNode("v-if", true),
  11636. vue.createElementVNode(
  11637. "view",
  11638. {
  11639. class: vue.normalizeClass(["popup-mask", { "show": $data.isPopupShow }]),
  11640. onClick: _cache[4] || (_cache[4] = (...args) => $options.closePopup && $options.closePopup(...args)),
  11641. onTouchmove: _cache[5] || (_cache[5] = vue.withModifiers(() => {
  11642. }, ["stop", "prevent"]))
  11643. },
  11644. [
  11645. vue.createElementVNode("view", {
  11646. class: "popup-modal",
  11647. onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  11648. }, ["stop"]))
  11649. }, [
  11650. vue.createElementVNode("view", { class: "popup-icon-wrapper" }, [
  11651. $data.currentBenefit && $data.currentBenefit.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  11652. key: 0,
  11653. class: "benefit-icon-large",
  11654. src: $data.currentBenefit.iconUrl,
  11655. mode: "aspectFit"
  11656. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  11657. "view",
  11658. {
  11659. key: 1,
  11660. class: "benefit-icon-placeholder-large"
  11661. },
  11662. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name[0] : ""),
  11663. 1
  11664. /* TEXT */
  11665. ))
  11666. ]),
  11667. vue.createElementVNode(
  11668. "text",
  11669. { class: "popup-title" },
  11670. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.name : ""),
  11671. 1
  11672. /* TEXT */
  11673. ),
  11674. vue.createElementVNode(
  11675. "text",
  11676. { class: "popup-desc" },
  11677. vue.toDisplayString($data.currentBenefit ? $data.currentBenefit.statement : ""),
  11678. 1
  11679. /* TEXT */
  11680. ),
  11681. vue.createElementVNode("button", {
  11682. class: "popup-btn",
  11683. onClick: _cache[2] || (_cache[2] = (...args) => $options.closePopup && $options.closePopup(...args))
  11684. }, "我知道了")
  11685. ])
  11686. ],
  11687. 34
  11688. /* CLASS, NEED_HYDRATION */
  11689. )
  11690. ]);
  11691. }
  11692. 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"]]);
  11693. const _imports_1$1 = "/static/icons/icon_order_msg.svg";
  11694. const _imports_2$1 = "/static/icons/icon_system_msg.svg";
  11695. const _sfc_main$6 = {
  11696. data() {
  11697. return {};
  11698. },
  11699. methods: {
  11700. navBack() {
  11701. uni.navigateBack();
  11702. },
  11703. navToOrderMsg() {
  11704. uni.navigateTo({
  11705. url: "/pages/mine/message/order"
  11706. });
  11707. },
  11708. navToSystemMsg() {
  11709. uni.navigateTo({
  11710. url: "/pages/mine/message/system"
  11711. });
  11712. }
  11713. }
  11714. };
  11715. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  11716. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11717. vue.createElementVNode("view", { class: "nav-bar" }, [
  11718. vue.createElementVNode("view", {
  11719. class: "nav-left",
  11720. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11721. }, [
  11722. vue.createElementVNode("image", {
  11723. class: "back-icon",
  11724. src: _imports_0,
  11725. style: { "transform": "rotate(180deg)" }
  11726. })
  11727. ]),
  11728. vue.createElementVNode("text", { class: "nav-title" }, "消息中心"),
  11729. vue.createElementVNode("view", { class: "nav-right" }, [
  11730. vue.createElementVNode("view", { class: "more-dots" }, [
  11731. vue.createElementVNode("view", { class: "dot" }),
  11732. vue.createElementVNode("view", { class: "dot" }),
  11733. vue.createElementVNode("view", { class: "dot" })
  11734. ])
  11735. ])
  11736. ]),
  11737. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11738. vue.createElementVNode("view", { class: "message-list" }, [
  11739. vue.createElementVNode("view", {
  11740. class: "message-item",
  11741. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToOrderMsg && $options.navToOrderMsg(...args))
  11742. }, [
  11743. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11744. vue.createElementVNode("image", {
  11745. class: "msg-icon",
  11746. src: _imports_1$1
  11747. }),
  11748. vue.createElementVNode("view", { class: "red-dot-badge" })
  11749. ]),
  11750. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11751. vue.createElementVNode("view", { class: "top-row" }, [
  11752. vue.createElementVNode("text", { class: "msg-title" }, "订单消息"),
  11753. vue.createElementVNode("text", { class: "msg-time" }, "5分钟前")
  11754. ]),
  11755. vue.createElementVNode("text", { class: "msg-preview" }, "你收到一个站长手动派单的新订单")
  11756. ])
  11757. ]),
  11758. vue.createElementVNode("view", {
  11759. class: "message-item",
  11760. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToSystemMsg && $options.navToSystemMsg(...args))
  11761. }, [
  11762. vue.createElementVNode("view", { class: "icon-wrapper" }, [
  11763. vue.createElementVNode("image", {
  11764. class: "msg-icon",
  11765. src: _imports_2$1
  11766. })
  11767. ]),
  11768. vue.createElementVNode("view", { class: "content-wrapper" }, [
  11769. vue.createElementVNode("view", { class: "top-row" }, [
  11770. vue.createElementVNode("text", { class: "msg-title" }, "系统消息"),
  11771. vue.createElementVNode("text", { class: "msg-time" }, "7天前")
  11772. ]),
  11773. vue.createElementVNode("text", { class: "msg-preview" }, "你的健康证明认证审核已通过。")
  11774. ])
  11775. ])
  11776. ])
  11777. ]);
  11778. }
  11779. 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"]]);
  11780. const _sfc_main$5 = {
  11781. methods: {
  11782. navBack() {
  11783. uni.navigateBack();
  11784. }
  11785. }
  11786. };
  11787. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  11788. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11789. vue.createElementVNode("view", { class: "nav-bar" }, [
  11790. vue.createElementVNode("view", {
  11791. class: "nav-left",
  11792. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11793. }, [
  11794. vue.createElementVNode("image", {
  11795. class: "back-icon",
  11796. src: _imports_0,
  11797. style: { "transform": "rotate(180deg)" }
  11798. })
  11799. ]),
  11800. vue.createElementVNode("text", { class: "nav-title" }, "订单消息"),
  11801. vue.createElementVNode("view", { class: "nav-right" })
  11802. ]),
  11803. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11804. vue.createElementVNode("view", { class: "msg-group" }, [
  11805. vue.createElementVNode("view", { class: "date-label" }, "2099-12-28"),
  11806. vue.createElementVNode("view", { class: "msg-card" }, [
  11807. vue.createElementVNode("view", { class: "card-header" }, [
  11808. vue.createElementVNode("text", { class: "card-title" }, "站长手动派单"),
  11809. vue.createElementVNode("view", { class: "red-dot" })
  11810. ]),
  11811. vue.createElementVNode("view", { class: "card-body" }, [
  11812. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11813. ]),
  11814. vue.createElementVNode("view", { class: "card-footer" }, [
  11815. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503521"),
  11816. vue.createElementVNode("image", {
  11817. class: "arrow-icon",
  11818. src: _imports_3
  11819. })
  11820. ])
  11821. ]),
  11822. vue.createElementVNode("view", { class: "msg-card" }, [
  11823. vue.createElementVNode("view", { class: "card-header" }, [
  11824. vue.createElementVNode("text", { class: "card-title" }, "系统自动派单")
  11825. ]),
  11826. vue.createElementVNode("view", { class: "card-body" }, [
  11827. vue.createElementVNode("text", { class: "msg-text" }, "你收到一个新订单,请及时查看并接单。")
  11828. ]),
  11829. vue.createElementVNode("view", { class: "card-footer" }, [
  11830. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503523"),
  11831. vue.createElementVNode("image", {
  11832. class: "arrow-icon",
  11833. src: _imports_3
  11834. })
  11835. ])
  11836. ])
  11837. ]),
  11838. vue.createElementVNode("view", { class: "msg-group" }, [
  11839. vue.createElementVNode("view", { class: "date-label" }, "2099-12-27"),
  11840. vue.createElementVNode("view", { class: "msg-card" }, [
  11841. vue.createElementVNode("view", { class: "card-header" }, [
  11842. vue.createElementVNode("text", { class: "card-title" }, "系统取消派单")
  11843. ]),
  11844. vue.createElementVNode("view", { class: "card-body" }, [
  11845. vue.createElementVNode("text", { class: "msg-text" }, "订单由于超时未接单已被系统取消。")
  11846. ]),
  11847. vue.createElementVNode("view", { class: "card-footer" }, [
  11848. vue.createElementVNode("text", { class: "order-id" }, "订单: 2099091503111"),
  11849. vue.createElementVNode("image", {
  11850. class: "arrow-icon",
  11851. src: _imports_3
  11852. })
  11853. ])
  11854. ])
  11855. ])
  11856. ]);
  11857. }
  11858. 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"]]);
  11859. const _sfc_main$4 = {
  11860. methods: {
  11861. navBack() {
  11862. uni.navigateBack();
  11863. },
  11864. navToDetail() {
  11865. uni.navigateTo({
  11866. url: "/pages/mine/message/detail"
  11867. });
  11868. }
  11869. }
  11870. };
  11871. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11872. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11873. vue.createElementVNode("view", { class: "nav-bar" }, [
  11874. vue.createElementVNode("view", {
  11875. class: "nav-left",
  11876. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11877. }, [
  11878. vue.createElementVNode("image", {
  11879. class: "back-icon",
  11880. src: _imports_0,
  11881. style: { "transform": "rotate(180deg)" }
  11882. })
  11883. ]),
  11884. vue.createElementVNode("text", { class: "nav-title" }, "系统消息"),
  11885. vue.createElementVNode("view", { class: "nav-right" })
  11886. ]),
  11887. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11888. vue.createElementVNode("view", { class: "sys-msg-list" }, [
  11889. vue.createElementVNode("view", { class: "date-label" }, "2023-11-01"),
  11890. vue.createElementVNode("view", {
  11891. class: "sys-card",
  11892. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  11893. }, [
  11894. vue.createElementVNode("view", { class: "sys-header" }, [
  11895. vue.createElementVNode("text", { class: "sys-title" }, "账号审核通过"),
  11896. vue.createElementVNode("view", { class: "red-dot" })
  11897. ]),
  11898. vue.createElementVNode("view", { class: "sys-content" }, [
  11899. vue.createElementVNode("text", { class: "sys-text" }, "恭喜,您的健康证已通过审核,现在可以开始接单了。")
  11900. ]),
  11901. vue.createElementVNode("view", { class: "sys-footer" }, [
  11902. vue.createElementVNode("text", { class: "sys-time" }, "10:00"),
  11903. vue.createElementVNode("view", { class: "check-more" }, [
  11904. vue.createElementVNode("text", null, "查看详情"),
  11905. vue.createElementVNode("image", {
  11906. class: "arrow-icon-small",
  11907. src: _imports_3
  11908. })
  11909. ])
  11910. ])
  11911. ]),
  11912. vue.createElementVNode("view", { class: "sys-card" }, [
  11913. vue.createElementVNode("view", { class: "sys-header" }, [
  11914. vue.createElementVNode("text", { class: "sys-title" }, "活动奖励到账")
  11915. ]),
  11916. vue.createElementVNode("view", { class: "sys-content" }, [
  11917. vue.createElementVNode("text", { class: "sys-text" }, "您参与的“新手启航”活动奖励金 ¥50 已发放到您的账户。")
  11918. ]),
  11919. vue.createElementVNode("view", { class: "sys-footer" }, [
  11920. vue.createElementVNode("text", { class: "sys-time" }, "09:15"),
  11921. vue.createElementVNode("view", { class: "check-more" }, [
  11922. vue.createElementVNode("text", null, "查看详情"),
  11923. vue.createElementVNode("image", {
  11924. class: "arrow-icon-small",
  11925. src: _imports_3
  11926. })
  11927. ])
  11928. ])
  11929. ]),
  11930. vue.createElementVNode("view", { class: "date-label" }, "2023-10-30"),
  11931. vue.createElementVNode("view", { class: "sys-card" }, [
  11932. vue.createElementVNode("view", { class: "sys-header" }, [
  11933. vue.createElementVNode("text", { class: "sys-title" }, "系统维护通知")
  11934. ]),
  11935. vue.createElementVNode("view", { class: "sys-content" }, [
  11936. vue.createElementVNode("text", { class: "sys-text" }, "平台将于 11月5日 凌晨 02:00-04:00 进行系统维护,届时将无法接单。")
  11937. ]),
  11938. vue.createElementVNode("view", { class: "sys-footer" }, [
  11939. vue.createElementVNode("text", { class: "sys-time" }, "18:30"),
  11940. vue.createElementVNode("view", { class: "check-more" }, [
  11941. vue.createElementVNode("text", null, "查看详情"),
  11942. vue.createElementVNode("image", {
  11943. class: "arrow-icon-small",
  11944. src: _imports_3
  11945. })
  11946. ])
  11947. ])
  11948. ])
  11949. ])
  11950. ]);
  11951. }
  11952. 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"]]);
  11953. const _sfc_main$3 = {
  11954. methods: {
  11955. navBack() {
  11956. uni.navigateBack();
  11957. }
  11958. }
  11959. };
  11960. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  11961. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  11962. vue.createElementVNode("view", { class: "nav-bar" }, [
  11963. vue.createElementVNode("view", {
  11964. class: "nav-left",
  11965. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  11966. }, [
  11967. vue.createElementVNode("image", {
  11968. class: "back-icon",
  11969. src: _imports_0,
  11970. style: { "transform": "rotate(180deg)" }
  11971. })
  11972. ]),
  11973. vue.createElementVNode("text", { class: "nav-title" }, "消息详情"),
  11974. vue.createElementVNode("view", { class: "nav-right" })
  11975. ]),
  11976. vue.createElementVNode("view", { class: "nav-placeholder" }),
  11977. vue.createElementVNode("view", { class: "detail-content" }, [
  11978. vue.createElementVNode("text", { class: "detail-title" }, "账号审核通过"),
  11979. vue.createElementVNode("text", { class: "detail-time" }, "2023-11-01 10:00"),
  11980. vue.createElementVNode("view", { class: "detail-body" }, [
  11981. vue.createElementVNode("text", null, "尊敬的用户,您的健康认证资料已通过平台审核。作为履约者,您现在可以正常接收并处理订单。请确保您熟读平台规则,遵守交通法规,安全配送。祝您工作愉快!")
  11982. ]),
  11983. vue.createElementVNode("view", { class: "detail-footer" }, [
  11984. vue.createElementVNode("view", { class: "divider" }),
  11985. vue.createElementVNode("text", { class: "footer-text" }, "如有疑问,请咨询在线客服。")
  11986. ])
  11987. ])
  11988. ]);
  11989. }
  11990. 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"]]);
  11991. const _imports_1 = "/static/icons/diamond_white.svg";
  11992. const _imports_2 = "/static/icons/star_decor.svg";
  11993. const bizTypeMap$1 = fulfillerEnum.FlfPointsBizType;
  11994. const _sfc_main$2 = {
  11995. data() {
  11996. return {
  11997. points: 0,
  11998. currentTab: 0,
  11999. list: [],
  12000. pageNum: 1,
  12001. pageSize: 10,
  12002. total: 0,
  12003. loading: false
  12004. };
  12005. },
  12006. computed: {
  12007. displayList() {
  12008. if (this.currentTab === 0)
  12009. return this.list;
  12010. const type = this.currentTab === 1 ? "income" : "expense";
  12011. return this.list.filter((item) => item.type === type);
  12012. }
  12013. },
  12014. onShow() {
  12015. this.fetchPoints();
  12016. this.fetchList(true);
  12017. },
  12018. onReachBottom() {
  12019. this.fetchList();
  12020. },
  12021. methods: {
  12022. async fetchPoints() {
  12023. try {
  12024. const res = await pointsOnApp();
  12025. if (res.code === 200) {
  12026. this.points = res.data || 0;
  12027. }
  12028. } catch (error) {
  12029. formatAppLog("error", "at pages/mine/points/index.vue:120", "获取当前积分失败", error);
  12030. }
  12031. },
  12032. async fetchList(reset = false) {
  12033. if (reset) {
  12034. this.pageNum = 1;
  12035. this.list = [];
  12036. this.total = 0;
  12037. }
  12038. if (this.loading)
  12039. return;
  12040. if (!reset && this.list.length >= this.total && this.total !== 0)
  12041. return;
  12042. this.loading = true;
  12043. try {
  12044. const res = await pagePointsOnApp({
  12045. pageNum: this.pageNum,
  12046. pageSize: this.pageSize
  12047. });
  12048. if (res.code === 200) {
  12049. this.total = res.total || 0;
  12050. const rows = res.rows || [];
  12051. const mappedRows = rows.map((item) => {
  12052. const isAdd = item.type === "add";
  12053. const uiType = isAdd ? "income" : "expense";
  12054. const title = bizTypeMap$1[item.bizType] || item.bizType || "其他";
  12055. let amountStr = Math.abs(item.amount);
  12056. if (!isAdd) {
  12057. amountStr = "-" + amountStr;
  12058. }
  12059. return {
  12060. ...item,
  12061. title,
  12062. desc: item.reason || "",
  12063. time: item.createTime || "",
  12064. amount: amountStr,
  12065. type: uiType,
  12066. tag: title
  12067. };
  12068. });
  12069. this.list = this.list.concat(mappedRows);
  12070. this.pageNum++;
  12071. }
  12072. } catch (error) {
  12073. formatAppLog("error", "at pages/mine/points/index.vue:163", "获取积分明细失败", error);
  12074. } finally {
  12075. this.loading = false;
  12076. }
  12077. },
  12078. navBack() {
  12079. uni.navigateBack();
  12080. },
  12081. navToDetail() {
  12082. uni.navigateTo({
  12083. url: "/pages/mine/points/detail"
  12084. });
  12085. },
  12086. navToEquity() {
  12087. },
  12088. switchTab(index) {
  12089. this.currentTab = index;
  12090. }
  12091. }
  12092. };
  12093. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  12094. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12095. vue.createElementVNode("view", { class: "nav-bar" }, [
  12096. vue.createElementVNode("view", {
  12097. class: "nav-left",
  12098. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12099. }, [
  12100. vue.createElementVNode("image", {
  12101. class: "back-icon",
  12102. src: _imports_0
  12103. })
  12104. ]),
  12105. vue.createElementVNode("text", { class: "nav-title" }, "我的积分"),
  12106. vue.createElementVNode("view", { class: "nav-right" })
  12107. ]),
  12108. vue.createElementVNode("view", { class: "points-card" }, [
  12109. vue.createElementVNode("view", { class: "card-header" }, [
  12110. vue.createElementVNode("view", {
  12111. class: "equity-btn",
  12112. onClick: _cache[1] || (_cache[1] = (...args) => $options.navToEquity && $options.navToEquity(...args))
  12113. }, [
  12114. vue.createElementVNode("image", {
  12115. class: "equity-icon",
  12116. src: _imports_1
  12117. }),
  12118. vue.createElementVNode("text", null, "积分权益")
  12119. ]),
  12120. vue.createElementVNode("view", {
  12121. class: "detail-link",
  12122. onClick: _cache[2] || (_cache[2] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12123. }, [
  12124. vue.createElementVNode("text", null, "明细")
  12125. ])
  12126. ]),
  12127. vue.createElementVNode("view", { class: "card-body" }, [
  12128. vue.createElementVNode("text", { class: "label" }, "当前积分"),
  12129. vue.createElementVNode(
  12130. "text",
  12131. { class: "value" },
  12132. vue.toDisplayString($data.points),
  12133. 1
  12134. /* TEXT */
  12135. )
  12136. ]),
  12137. vue.createElementVNode("image", {
  12138. class: "bg-decor",
  12139. src: _imports_2,
  12140. mode: "aspectFit"
  12141. })
  12142. ]),
  12143. vue.createElementVNode("view", { class: "record-container" }, [
  12144. vue.createElementVNode("view", { class: "record-header" }, [
  12145. vue.createElementVNode("text", { class: "header-title" }, "最近积分变动"),
  12146. vue.createElementVNode("view", {
  12147. class: "header-more",
  12148. onClick: _cache[3] || (_cache[3] = (...args) => $options.navToDetail && $options.navToDetail(...args))
  12149. }, [
  12150. vue.createElementVNode("text", null, "查看全部"),
  12151. vue.createElementVNode("image", {
  12152. class: "more-icon",
  12153. src: _imports_3
  12154. })
  12155. ])
  12156. ]),
  12157. vue.createElementVNode("view", { class: "tabs-row" }, [
  12158. vue.createElementVNode(
  12159. "view",
  12160. {
  12161. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12162. onClick: _cache[4] || (_cache[4] = ($event) => $options.switchTab(0))
  12163. },
  12164. [
  12165. vue.createElementVNode("text", null, "全部"),
  12166. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12167. key: 0,
  12168. class: "tab-line"
  12169. })) : vue.createCommentVNode("v-if", true)
  12170. ],
  12171. 2
  12172. /* CLASS */
  12173. ),
  12174. vue.createElementVNode(
  12175. "view",
  12176. {
  12177. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12178. onClick: _cache[5] || (_cache[5] = ($event) => $options.switchTab(1))
  12179. },
  12180. [
  12181. vue.createElementVNode("text", null, "获取"),
  12182. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12183. key: 0,
  12184. class: "tab-line"
  12185. })) : vue.createCommentVNode("v-if", true)
  12186. ],
  12187. 2
  12188. /* CLASS */
  12189. ),
  12190. vue.createElementVNode(
  12191. "view",
  12192. {
  12193. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12194. onClick: _cache[6] || (_cache[6] = ($event) => $options.switchTab(2))
  12195. },
  12196. [
  12197. vue.createElementVNode("text", null, "扣减"),
  12198. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12199. key: 0,
  12200. class: "tab-line"
  12201. })) : vue.createCommentVNode("v-if", true)
  12202. ],
  12203. 2
  12204. /* CLASS */
  12205. )
  12206. ]),
  12207. vue.createElementVNode("view", { class: "record-list" }, [
  12208. (vue.openBlock(true), vue.createElementBlock(
  12209. vue.Fragment,
  12210. null,
  12211. vue.renderList($options.displayList, (item, index) => {
  12212. return vue.openBlock(), vue.createElementBlock("view", {
  12213. class: "list-item",
  12214. key: index
  12215. }, [
  12216. vue.createElementVNode("view", { class: "item-left" }, [
  12217. vue.createElementVNode(
  12218. "text",
  12219. { class: "item-title" },
  12220. vue.toDisplayString(item.title),
  12221. 1
  12222. /* TEXT */
  12223. ),
  12224. vue.createElementVNode(
  12225. "text",
  12226. { class: "item-desc" },
  12227. vue.toDisplayString(item.desc),
  12228. 1
  12229. /* TEXT */
  12230. ),
  12231. vue.createElementVNode(
  12232. "text",
  12233. { class: "item-time" },
  12234. vue.toDisplayString(item.time),
  12235. 1
  12236. /* TEXT */
  12237. )
  12238. ]),
  12239. vue.createElementVNode("view", { class: "item-right" }, [
  12240. vue.createElementVNode(
  12241. "text",
  12242. {
  12243. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12244. },
  12245. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12246. 3
  12247. /* TEXT, CLASS */
  12248. ),
  12249. vue.createElementVNode("view", { class: "item-tag" }, [
  12250. vue.createElementVNode(
  12251. "text",
  12252. null,
  12253. vue.toDisplayString(item.tag),
  12254. 1
  12255. /* TEXT */
  12256. )
  12257. ])
  12258. ])
  12259. ]);
  12260. }),
  12261. 128
  12262. /* KEYED_FRAGMENT */
  12263. ))
  12264. ])
  12265. ])
  12266. ]);
  12267. }
  12268. 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"]]);
  12269. const bizTypeMap = fulfillerEnum.FlfPointsBizType;
  12270. const _sfc_main$1 = {
  12271. data() {
  12272. const d = /* @__PURE__ */ new Date();
  12273. return {
  12274. currentTab: 0,
  12275. year: d.getFullYear(),
  12276. month: d.getMonth() + 1,
  12277. groups: []
  12278. };
  12279. },
  12280. computed: {
  12281. currentDate() {
  12282. return `${this.year}-${String(this.month).padStart(2, "0")}`;
  12283. },
  12284. displayGroups() {
  12285. if (this.currentTab === 0)
  12286. return this.groups;
  12287. return this.groups.map((group) => {
  12288. const filteredItems = group.items.filter((item) => {
  12289. const type = this.currentTab === 1 ? "income" : "expense";
  12290. return item.type === type;
  12291. });
  12292. return {
  12293. ...group,
  12294. items: filteredItems
  12295. };
  12296. }).filter((group) => group.items.length > 0);
  12297. }
  12298. },
  12299. onShow() {
  12300. this.fetchData();
  12301. },
  12302. methods: {
  12303. async fetchData() {
  12304. try {
  12305. const res = await listPointsOnApp({
  12306. year: this.year,
  12307. month: this.month
  12308. });
  12309. if (res.code === 200) {
  12310. const list = res.data || [];
  12311. let incomeTotal = 0;
  12312. let expenseTotal = 0;
  12313. const items = list.map((item) => {
  12314. const isAdd = item.type === "add";
  12315. const uiType = isAdd ? "income" : "expense";
  12316. const title = bizTypeMap[item.bizType] || item.bizType || "其他";
  12317. let amountVal = Math.abs(item.amount);
  12318. if (isAdd) {
  12319. incomeTotal += amountVal;
  12320. } else {
  12321. expenseTotal += amountVal;
  12322. }
  12323. let amountStr = String(amountVal);
  12324. if (!isAdd)
  12325. amountStr = "-" + amountStr;
  12326. let timeStr = item.createTime || "";
  12327. if (timeStr.length >= 16) {
  12328. timeStr = timeStr.substring(5, 16);
  12329. }
  12330. return {
  12331. ...item,
  12332. title,
  12333. desc: item.reason || "",
  12334. time: timeStr,
  12335. amount: amountStr,
  12336. type: uiType,
  12337. tag: title
  12338. };
  12339. });
  12340. this.groups = [
  12341. {
  12342. month: `${this.month}月 ${this.year}`,
  12343. income: String(incomeTotal),
  12344. expense: String(expenseTotal),
  12345. items
  12346. }
  12347. ];
  12348. }
  12349. } catch (error) {
  12350. formatAppLog("error", "at pages/mine/points/detail.vue:174", "获取积分明细记录失败", error);
  12351. }
  12352. },
  12353. onDateChange(e) {
  12354. const val = e.detail.value;
  12355. const [y, m] = val.split("-");
  12356. this.year = parseInt(y, 10);
  12357. this.month = parseInt(m, 10);
  12358. this.fetchData();
  12359. },
  12360. navBack() {
  12361. uni.navigateBack();
  12362. },
  12363. switchTab(index) {
  12364. this.currentTab = index;
  12365. }
  12366. }
  12367. };
  12368. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  12369. return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
  12370. vue.createElementVNode("view", { class: "nav-bar" }, [
  12371. vue.createElementVNode("view", {
  12372. class: "nav-left",
  12373. onClick: _cache[0] || (_cache[0] = (...args) => $options.navBack && $options.navBack(...args))
  12374. }, [
  12375. vue.createElementVNode("image", {
  12376. class: "back-icon",
  12377. src: _imports_0
  12378. })
  12379. ]),
  12380. vue.createElementVNode("text", { class: "nav-title" }, "积分明细"),
  12381. vue.createElementVNode("view", { class: "nav-right" })
  12382. ]),
  12383. vue.createElementVNode("view", { class: "content-area" }, [
  12384. vue.createElementVNode("view", { class: "filter-area" }, [
  12385. vue.createElementVNode("view", { class: "tabs-row" }, [
  12386. vue.createElementVNode(
  12387. "view",
  12388. {
  12389. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 0 }]),
  12390. onClick: _cache[1] || (_cache[1] = ($event) => $options.switchTab(0))
  12391. },
  12392. [
  12393. vue.createElementVNode("text", null, "全部"),
  12394. $data.currentTab === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12395. key: 0,
  12396. class: "tab-line"
  12397. })) : vue.createCommentVNode("v-if", true)
  12398. ],
  12399. 2
  12400. /* CLASS */
  12401. ),
  12402. vue.createElementVNode(
  12403. "view",
  12404. {
  12405. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 1 }]),
  12406. onClick: _cache[2] || (_cache[2] = ($event) => $options.switchTab(1))
  12407. },
  12408. [
  12409. vue.createElementVNode("text", null, "获取"),
  12410. $data.currentTab === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12411. key: 0,
  12412. class: "tab-line"
  12413. })) : vue.createCommentVNode("v-if", true)
  12414. ],
  12415. 2
  12416. /* CLASS */
  12417. ),
  12418. vue.createElementVNode(
  12419. "view",
  12420. {
  12421. class: vue.normalizeClass(["tab-item", { active: $data.currentTab === 2 }]),
  12422. onClick: _cache[3] || (_cache[3] = ($event) => $options.switchTab(2))
  12423. },
  12424. [
  12425. vue.createElementVNode("text", null, "扣减"),
  12426. $data.currentTab === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12427. key: 0,
  12428. class: "tab-line"
  12429. })) : vue.createCommentVNode("v-if", true)
  12430. ],
  12431. 2
  12432. /* CLASS */
  12433. )
  12434. ]),
  12435. vue.createElementVNode("view", { class: "date-picker-wrap" }, [
  12436. vue.createElementVNode("picker", {
  12437. mode: "date",
  12438. fields: "month",
  12439. value: $options.currentDate,
  12440. onChange: _cache[4] || (_cache[4] = (...args) => $options.onDateChange && $options.onDateChange(...args))
  12441. }, [
  12442. vue.createElementVNode("view", { class: "date-picker" }, [
  12443. vue.createElementVNode(
  12444. "text",
  12445. { class: "date-text" },
  12446. vue.toDisplayString($data.year) + "年" + vue.toDisplayString(`${$data.month}`.padStart(2, "0")) + "月",
  12447. 1
  12448. /* TEXT */
  12449. ),
  12450. vue.createElementVNode("text", { class: "arrow-down" }, "﹀")
  12451. ])
  12452. ], 40, ["value"])
  12453. ])
  12454. ]),
  12455. vue.createElementVNode("scroll-view", {
  12456. "scroll-y": "",
  12457. class: "bill-list"
  12458. }, [
  12459. (vue.openBlock(true), vue.createElementBlock(
  12460. vue.Fragment,
  12461. null,
  12462. vue.renderList($options.displayGroups, (group, gIndex) => {
  12463. return vue.openBlock(), vue.createElementBlock("view", {
  12464. key: gIndex,
  12465. class: "month-group"
  12466. }, [
  12467. vue.createElementVNode("view", { class: "group-header" }, [
  12468. vue.createElementVNode(
  12469. "text",
  12470. { class: "month-title" },
  12471. vue.toDisplayString(group.month),
  12472. 1
  12473. /* TEXT */
  12474. ),
  12475. vue.createElementVNode(
  12476. "text",
  12477. { class: "month-summary" },
  12478. "获取 " + vue.toDisplayString(group.income) + " 扣减 " + vue.toDisplayString(group.expense),
  12479. 1
  12480. /* TEXT */
  12481. )
  12482. ]),
  12483. (vue.openBlock(true), vue.createElementBlock(
  12484. vue.Fragment,
  12485. null,
  12486. vue.renderList(group.items, (item, index) => {
  12487. return vue.openBlock(), vue.createElementBlock("view", {
  12488. class: "list-item",
  12489. key: index
  12490. }, [
  12491. vue.createElementVNode(
  12492. "view",
  12493. {
  12494. class: vue.normalizeClass(["item-icon-box", item.type])
  12495. },
  12496. [
  12497. vue.createElementVNode(
  12498. "text",
  12499. { class: "item-icon-symbol" },
  12500. vue.toDisplayString(item.type === "income" ? "+" : "-"),
  12501. 1
  12502. /* TEXT */
  12503. )
  12504. ],
  12505. 2
  12506. /* CLASS */
  12507. ),
  12508. vue.createElementVNode("view", { class: "item-center" }, [
  12509. vue.createElementVNode(
  12510. "text",
  12511. { class: "item-title" },
  12512. vue.toDisplayString(item.title),
  12513. 1
  12514. /* TEXT */
  12515. ),
  12516. vue.createElementVNode(
  12517. "text",
  12518. { class: "item-desc" },
  12519. vue.toDisplayString(item.time) + " " + vue.toDisplayString(item.desc),
  12520. 1
  12521. /* TEXT */
  12522. )
  12523. ]),
  12524. vue.createElementVNode("view", { class: "item-right" }, [
  12525. vue.createElementVNode(
  12526. "text",
  12527. {
  12528. class: vue.normalizeClass(["item-amount", { income: item.type === "income", expense: item.type === "expense" }])
  12529. },
  12530. vue.toDisplayString(item.type === "income" ? "+" : "") + vue.toDisplayString(item.amount),
  12531. 3
  12532. /* TEXT, CLASS */
  12533. ),
  12534. vue.createElementVNode("view", { class: "item-tag" }, [
  12535. vue.createElementVNode(
  12536. "text",
  12537. null,
  12538. vue.toDisplayString(item.tag),
  12539. 1
  12540. /* TEXT */
  12541. )
  12542. ])
  12543. ])
  12544. ]);
  12545. }),
  12546. 128
  12547. /* KEYED_FRAGMENT */
  12548. ))
  12549. ]);
  12550. }),
  12551. 128
  12552. /* KEYED_FRAGMENT */
  12553. )),
  12554. vue.createElementVNode("view", { class: "list-padding-bottom" })
  12555. ])
  12556. ])
  12557. ]);
  12558. }
  12559. const PagesMinePointsDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/pages/mine/points/detail.vue"]]);
  12560. __definePage("pages/login/login", PagesLoginLogin);
  12561. __definePage("pages/recruit/landing", PagesRecruitLanding);
  12562. __definePage("pages/recruit/form", PagesRecruitForm);
  12563. __definePage("pages/recruit/auth", PagesRecruitAuth);
  12564. __definePage("pages/recruit/qualifications", PagesRecruitQualifications);
  12565. __definePage("pages/recruit/success", PagesRecruitSuccess);
  12566. __definePage("pages/login/reset-pwd-verify", PagesLoginResetPwdVerify);
  12567. __definePage("pages/login/reset-pwd-set", PagesLoginResetPwdSet);
  12568. __definePage("pages/home/index", PagesHomeIndex);
  12569. __definePage("pages/home/work-status", PagesHomeWorkStatus);
  12570. __definePage("pages/orders/index", PagesOrdersIndex);
  12571. __definePage("pages/orders/detail", PagesOrdersDetail);
  12572. __definePage("pages/orders/anomaly", PagesOrdersAnomaly);
  12573. __definePage("pages/mine/order-stats", PagesMineOrderStats);
  12574. __definePage("pages/mine/rewards", PagesMineRewards);
  12575. __definePage("pages/mine/rewards-all", PagesMineRewardsAll);
  12576. __definePage("pages/mine/index", PagesMineIndex);
  12577. __definePage("pages/mine/settings/index", PagesMineSettingsIndex);
  12578. __definePage("pages/mine/settings/profile/index", PagesMineSettingsProfileIndex);
  12579. __definePage("pages/mine/settings/auth/index", PagesMineSettingsAuthIndex);
  12580. __definePage("pages/mine/settings/auth/edit", PagesMineSettingsAuthEdit);
  12581. __definePage("pages/mine/settings/bank/index", PagesMineSettingsBankIndex);
  12582. __definePage("pages/mine/settings/security/index", PagesMineSettingsSecurityIndex);
  12583. __definePage("pages/mine/settings/profile/edit-name", PagesMineSettingsProfileEditName);
  12584. __definePage("pages/mine/settings/security/change-password", PagesMineSettingsSecurityChangePassword);
  12585. __definePage("pages/mine/settings/security/change-phone", PagesMineSettingsSecurityChangePhone);
  12586. __definePage("pages/mine/settings/notification/index", PagesMineSettingsNotificationIndex);
  12587. __definePage("pages/mine/settings/about/index", PagesMineSettingsAboutIndex);
  12588. __definePage("pages/mine/wallet/index", PagesMineWalletIndex);
  12589. __definePage("pages/mine/wallet/bill", PagesMineWalletBill);
  12590. __definePage("pages/mine/level/index", PagesMineLevelIndex);
  12591. __definePage("pages/mine/message/index", PagesMineMessageIndex);
  12592. __definePage("pages/mine/message/order", PagesMineMessageOrder);
  12593. __definePage("pages/mine/message/system", PagesMineMessageSystem);
  12594. __definePage("pages/mine/message/detail", PagesMineMessageDetail);
  12595. __definePage("pages/mine/points/index", PagesMinePointsIndex);
  12596. __definePage("pages/mine/points/detail", PagesMinePointsDetail);
  12597. const _sfc_main = {
  12598. onLaunch: function() {
  12599. formatAppLog("log", "at App.vue:7", "App Launch");
  12600. if (isLoggedIn()) {
  12601. startGpsTimer();
  12602. uni.switchTab({
  12603. url: "/pages/home/index"
  12604. });
  12605. }
  12606. },
  12607. onShow: function() {
  12608. formatAppLog("log", "at App.vue:17", "App Show");
  12609. },
  12610. onHide: function() {
  12611. formatAppLog("log", "at App.vue:20", "App Hide");
  12612. }
  12613. };
  12614. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/CodeProjects/Cursor/pet-system-fulfiller-app/App.vue"]]);
  12615. function createApp() {
  12616. const app = vue.createVueApp(App);
  12617. return {
  12618. app
  12619. };
  12620. }
  12621. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  12622. uni.Vuex = __Vuex__;
  12623. uni.Pinia = __Pinia__;
  12624. __app__.provide("__globalStyles", __uniConfig.styles);
  12625. __app__._component.mpType = "app";
  12626. __app__._component.render = () => {
  12627. };
  12628. __app__.mount("#app");
  12629. })(Vue);